func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
TEST(ExpressionArrayToObjectTest, KVFormatWithDuplicates) { assertExpectedResults("$arrayToObject", {{{Value(BSON_ARRAY(BSON("k" << "hi" << "v" ...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
12,598,649,452,284,020,000,000,000,000,000,000,000
12
SERVER-38070 fix infinite loop in agg expression
WReverseVideo(p, on) struct win *p; int on; { struct canvas *cv; for (cv = p->w_layer.l_cvlist; cv; cv = cv->c_lnext) { display = cv->c_display; if (cv != D_forecv) continue; ReverseVideo(on); if (!on && p->w_revvid && !D_CVR) { if (D_VB) AddCStr(D_VB); else p->w_bell =...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
265,226,327,952,252,000,000,000,000,000,000,000,000
20
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
static bool rename_path_prefix_equal(const struct smb_filename *smb_fname_src, const struct smb_filename *smb_fname_dst) { const char *psrc = smb_fname_src->base_name; const char *pdst = smb_fname_dst->base_name; size_t slen; if (psrc[0] == '.' && psrc[1] == '/') { psrc += 2; } if (pdst[0] == '.' && p...
0
[ "CWE-200" ]
samba
3ddc9344c2fa7461336899fbddb0bb80995e9170
177,816,631,675,608,950,000,000,000,000,000,000,000
18
CVE-2022-32742: s3: smbd: Harden the smbreq_bufrem() macro. Fixes the raw.write.bad-write test. NB. We need the two (==0) changes in source3/smbd/smb2_reply.c as the gcc optimizer now knows that the return from smbreq_bufrem() can never be less than zero. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15085 Remove...
static void fuse_lib_setxattr(fuse_req_t req, fuse_ino_t ino, const char *name, const char *value, size_t size, int flags) { struct fuse *f = req_fuse_prepare(req); char *path; int err; err = -ENOENT; pthread_rwlock_rdlock(&f->tree_lock); path = get_path(f, ino); ...
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
59,380,260,220,781,210,000,000,000,000,000,000,000
20
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
uint32_t cli_bcapi_trace_op(struct cli_bc_ctx *ctx, const uint8_t *op, uint32_t col) { if (LIKELY(ctx->trace_level < trace_col)) return 0; if (ctx->trace_level&0xc0) { ctx->col = col; /* func/scope changed and they needed param/location event */ ctx->trace(ctx, (ctx->trace_level&0x80) ? trace_func : trace_s...
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
181,191,246,905,119,720,000,000,000,000,000,000,000
24
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
static int hugetlb_vmtruncate(struct inode *inode, loff_t offset) { pgoff_t pgoff; struct address_space *mapping = inode->i_mapping; struct hstate *h = hstate_inode(inode); BUG_ON(offset & ~huge_page_mask(h)); pgoff = offset >> PAGE_SHIFT; i_size_write(inode, offset); mutex_lock(&mapping->i_mmap_mutex); if (!...
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
296,548,478,170,199,920,000,000,000,000,000,000,000
17
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
rsvg_linear_gradient_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts) { RsvgLinearGradient *grad = (RsvgLinearGradient *) self; const char *value; if (rsvg_property_bag_size (atts)) { if ((value = rsvg_property_bag_lookup (atts, "id"))) rsvg_defs_register_name (ctx->...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
220,899,803,106,098,820,000,000,000,000,000,000,000
54
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
static void srpt_queue_tm_rsp(struct se_cmd *cmd) { srpt_queue_response(cmd); }
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
2,945,010,982,471,973,000,000,000,000,000,000,000
4
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
DEFUN(chkWORD, MARK_WORD, "Turn current word into hyperlink") { char *p; int spos, epos; p = getCurWord(Currentbuf, &spos, &epos); if (p == NULL) return; reAnchorWord(Currentbuf, Currentbuf->currentLine, spos, epos); displayBuffer(Currentbuf, B_FORCE_REDRAW); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
117,725,816,082,257,760,000,000,000,000,000,000,000
10
Make temporary directory safely when ~/.w3m is unwritable
static int ipgre_tunnel_encap_add_mpls_ops(void) { return ip_tunnel_encap_add_ops(&mpls_iptun_ops, TUNNEL_ENCAP_MPLS); }
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
164,816,358,459,864,170,000,000,000,000,000,000,000
4
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
GC_API void GC_CALL GC_set_all_interior_pointers(int value) { DCL_LOCK_STATE; GC_all_interior_pointers = value ? 1 : 0; if (GC_is_initialized) { /* It is not recommended to change GC_all_interior_pointers value */ /* after GC is initialized but it seems GC could work correctly */ /* eve...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
166,699,026,037,673,670,000,000,000,000,000,000,000
16
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
void HttpIntegrationTest::testRouterHeaderOnlyRequestAndResponse( ConnectionCreationFunction* create_connection, int upstream_index, const std::string& path, const std::string& authority) { auto response = makeHeaderOnlyRequest(create_connection, upstream_index, path, authority); checkSimpleRequestSuccess(0...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
231,062,319,421,519,350,000,000,000,000,000,000,000
6
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
void aes_setkey_enc( aes_context *ctx, const unsigned char *key, int keysize ) { int i; unsigned long *RK; #if !defined(XYSSL_AES_ROM_TABLES) if( aes_init_done == 0 ) { aes_gen_tables(); aes_init_done = 1; } #endif switch( keysize ) { case 128: ctx->nr = 10; break; ...
0
[]
ghostpdl
8e9ce5016db968b40e4ec255a3005f2786cce45f
288,502,722,046,080,840,000,000,000,000,000,000,000
99
Bug 699665 "memory corruption in aesdecode" The specimen file calls aesdecode without specifying the key to be used, though it does manage to do enough work with the PDF interpreter routines to get access to aesdecode (which isn't normally available). This causes us to read uninitialised memory, which can (and often ...
static uint64_t sysbus_esp_pdma_read(void *opaque, hwaddr addr, unsigned int size) { SysBusESPState *sysbus = opaque; ESPState *s = ESP(&sysbus->esp); uint64_t val = 0; trace_esp_pdma_read(size); switch (size) { case 1: val = esp_pdma_read(s); ...
0
[ "CWE-476" ]
qemu
0db895361b8a82e1114372ff9f4857abea605701
97,766,147,808,067,200,000,000,000,000,000,000,000
23
esp: always check current_req is not NULL before use in DMA callbacks After issuing a SCSI command the SCSI layer can call the SCSIBusInfo .cancel callback which resets both current_req and current_dev to NULL. If any data is left in the transfer buffer (async_len != 0) then the next TI (Transfer Information) command ...
static int add_object_entry_from_bitmap(const unsigned char *sha1, enum object_type type, int flags, uint32_t name_hash, struct packed_git *pack, off_t offset) { uint32_t index_pos; if (have_duplicate_entry(sha1, 0, &index_pos)) return 0; create_object_entry(sha1, type, name_hash, 0, 0, index_pos,...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
31,195,744,343,091,934,000,000,000,000,000,000,000
15
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
virDomainVcpuThreadSchedParse(xmlNodePtr node, virDomainDefPtr def) { return virDomainThreadSchedParseHelper(node, "vcpus", virDomainDefGetVcpuSched, def); }
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
146,462,036,385,438,040,000,000,000,000,000,000,000
7
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
void WAVEFile::initCompressionParams() { Track *track = getTrack(); if (track->f.compressionType == AF_COMPRESSION_IMA) initIMACompressionParams(); else if (track->f.compressionType == AF_COMPRESSION_MS_ADPCM) initMSADPCMCompressionParams(); }
0
[ "CWE-119", "CWE-284" ]
audiofile
a2e9eab8ea87c4ffc494d839ebb4ea145eb9f2e6
111,985,314,265,112,020,000,000,000,000,000,000,000
8
Actually fail when error occurs in parseFormat When there's an unsupported number of bits per sample or an invalid number of samples per block, don't only print an error message using the error handler, but actually stop parsing the file. This fixes #35 (also reported at https://bugzilla.opensuse.org/show_bug.cgi?id=...
MOBI_RET mobi_reconstruct_infl(char *outstring, const MOBIIndx *infl, const MOBIIndexEntry *orth_entry) { const char *label = orth_entry->label; uint32_t *infl_groups = NULL; size_t infl_count = mobi_get_indxentry_tagarray(&infl_groups, orth_entry, INDX_TAGARR_ORTH_INFL); if (infl_count == 0 || !in...
0
[ "CWE-703", "CWE-125" ]
libmobi
fb1ab50e448ddbed746fd27ae07469bc506d838b
300,271,360,489,014,300,000,000,000,000,000,000,000
86
Fix array boundary check when parsing inflections which could result in buffer over-read with corrupt input
R_API void r_egg_free(REgg *egg) { if (egg) { r_buf_free (egg->src); r_buf_free (egg->buf); r_buf_free (egg->bin); r_list_free (egg->list); r_asm_free (egg->rasm); r_syscall_free (egg->syscall); sdb_free (egg->db); r_list_free (egg->plugins); r_list_free (egg->patches); r_egg_lang_free (egg); fre...
0
[ "CWE-125" ]
radare2
e710401ebb4a892a87b0c709d709af8b5dcbbb01
183,363,271,337,069,630,000,000,000,000,000,000,000
15
patch #14211 heap buffer overflow in large ragg2 inputs. this should be refactored to use an RBuffer to enable dynamic resizing, but for now just patching it to bail out if we are about to overwrite the allocated statically sized buffer
sctp_disposition_t sctp_sf_eat_fwd_tsn_fast( const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *chunk = arg; struct sctp_fwdtsn_hdr *fwdtsn_hdr; __u16 len; __u32 tsn; if (!sctp_vtag_verify(chunk, asoc)) { ...
1
[ "CWE-119" ]
linux-2.6
9fcb95a105758b81ef0131cd18e2db5149f13e95
44,099,590,711,358,880,000,000,000,000,000,000,000
58
sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID If FWD-TSN chunk is received with bad stream ID, the sctp will not do the validity check, this may cause memory overflow when overwrite the TSN of the stream ID. The FORWARD-TSN chunk is like this: FORWARD-TSN chunk Type ...
UsbHubAckHubStatus ( IN USB_DEVICE *HubDev ) { EFI_USB_PORT_STATUS HubState; EFI_STATUS Status; Status = UsbHubCtrlGetHubStatus (HubDev, (UINT32 *) &HubState); if (EFI_ERROR (Status)) { return Status; } if (USB_BIT_IS_SET (HubState.PortChangeStatus, USB_HUB_...
0
[ "CWE-787" ]
edk2
acebdf14c985c5c9f50b37ece0b15ada87767359
75,206,444,899,490,620,000,000,000,000,000,000,000
23
MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub desc REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973 HUB descriptor has variable length. But the code uses stack (HubDesc in UsbHubInit) with fixed length sizeof(EFI_USB_HUB_DESCRIPTOR) to hold HUB descriptor data. It uses hard code length value...
void auth_request_log_error(struct auth_request *auth_request, const char *subsystem, const char *format, ...) { struct event *event = get_request_event(auth_request, subsystem); va_list va; va_start(va, format); T_BEGIN { string_t *str = t_str_new(128); str_vprintfa(str, format, va); e_error(e...
0
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
98,636,302,629,229,880,000,000,000,000,000,000,000
15
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr) { long ret; if (b->next_bio == NULL) return (0); switch (cmd) { case BIO_CTRL_DUP: ret = 0L; break; default: ret = BIO_ctrl(b->next_bio, cmd, num, ptr); break; } return (ret); }
0
[ "CWE-399" ]
openssl
380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e
283,117,869,575,567,840,000,000,000,000,000,000,000
16
CVE-2016-0798: avoid memory leak in SRP The SRP user database lookup method SRP_VBASE_get_by_user had confusing memory management semantics; the returned pointer was sometimes newly allocated, and sometimes owned by the callee. The calling code has no way of distinguishing these two cases. Specifically, SRP servers t...
static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *regs) { struct sigframe __user *frame; int err = 0; int signal; frame = get_sigframe(ka, regs->regs[REG_SP], sizeof(*frame)); if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; signal = curren...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
153,381,219,701,835,070,000,000,000,000,000,000,000
104
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
int lstat_cache_aware_rmdir(const char *path) { /* Any change in this function must be made also in `mingw_rmdir()` */ int ret = rmdir(path); if (!ret) invalidate_lstat_cache(); return ret; }
0
[ "CWE-59", "CWE-61" ]
git
684dd4c2b414bcf648505e74498a608f28de4592
268,154,461,426,149,150,000,000,000,000,000,000,000
10
checkout: fix bug that makes checkout follow symlinks in leading path Before checking out a file, we have to confirm that all of its leading components are real existing directories. And to reduce the number of lstat() calls in this process, we cache the last leading path known to contain only directories. However, wh...
bool Item_hex_constant::eq(const Item *arg, bool binary_cmp) const { if (arg->basic_const_item() && arg->type() == type() && arg->cast_to_int_type() == cast_to_int_type()) { if (binary_cmp) return !stringcmp(&str_value, &arg->str_value); return !sortcmp(&str_value, &arg->str_value, collation.col...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
23,308,330,674,468,137,000,000,000,000,000,000,000
11
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
svcauth_gss_destroy(SVCAUTH *auth) { struct svc_rpc_gss_data *gd; OM_uint32 min_stat; log_debug("in svcauth_gss_destroy()"); gd = SVCAUTH_PRIVATE(auth); gss_delete_sec_context(&min_stat, &gd->ctx, GSS_C_NO_BUFFER); gss_release_buffer(&min_stat, &gd->cname); gss_release_buffer(&min_stat, &gd->checksum); if...
0
[ "CWE-200" ]
krb5
5bb8a6b9c9eb8dd22bc9526751610aaa255ead9c
272,674,287,954,367,300,000,000,000,000,000,000,000
21
Fix gssrpc data leakage [CVE-2014-9423] [MITKRB5-SA-2015-001] In svcauth_gss_accept_sec_context(), do not copy bytes from the union context into the handle field we send to the client. We do not use this handle field, so just supply a fixed string of "xxxx". In gss_union_ctx_id_struct, remove the unused "interposer"...
static int bpf_adj_delta_to_off(struct bpf_insn *insn, u32 pos, u32 delta, u32 curr, const bool probe_pass) { const s32 off_min = S16_MIN, off_max = S16_MAX; s32 off = insn->off; if (curr < pos && curr + off + 1 > pos) off += delta; else if (curr > pos + delta && curr + off + 1 <= pos + delta) off -= delta...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
141,157,251,856,020,550,000,000,000,000,000,000,000
16
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
static void tipc_node_assign_peer_net(struct tipc_node *n, u32 hash_mixes) { int net_id = tipc_netid(n->net); struct tipc_net *tn_peer; struct net *tmp; u32 hash_chk; if (n->peer_net) return; for_each_net_rcu(tmp) { tn_peer = tipc_net(tmp); if (!tn_peer) continue; /* Integrity checking whether node e...
0
[]
linux
0217ed2848e8538bcf9172d97ed2eeb4a26041bb
271,838,336,926,301,800,000,000,000,000,000,000,000
27
tipc: better validate user input in tipc_nl_retrieve_key() Before calling tipc_aead_key_size(ptr), we need to ensure we have enough data to dereference ptr->keylen. We probably also want to make sure tipc_aead_key_size() wont overflow with malicious ptr->keylen values. Syzbot reported: BUG: KMSAN: uninit-value in _...
int router_differences_are_cosmetic(const routerinfo_t *r1, const routerinfo_t *r2) { time_t r1pub, r2pub; long time_difference; tor_assert(r1 && r2); /* r1 should be the one that was published first. */ if (r1->cache_info.published_on > r2->cache_info.published_on) { const routerinfo_t *ri_tmp = r2; ...
1
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
117,352,906,012,763,910,000,000,000,000,000,000,000
75
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
GF_Err cprt_dump(GF_Box *a, FILE * trace) { GF_CopyrightBox *p; p = (GF_CopyrightBox *)a; gf_isom_box_dump_start(a, "CopyrightBox", trace); fprintf(trace, "LanguageCode=\"%s\" CopyrightNotice=\"%s\">\n", p->packedLanguageCode, p->notice); gf_isom_box_dump_done("CopyrightBox", a, trace); return GF_OK; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
269,072,427,334,602,500,000,000,000,000,000,000,000
10
fixed 2 possible heap overflows (inc. #1088)
void ConnectionManagerImpl::doDeferredStreamDestroy(ActiveStream& stream) { if (stream.max_stream_duration_timer_) { stream.max_stream_duration_timer_->disableTimer(); stream.max_stream_duration_timer_ = nullptr; } if (stream.stream_idle_timer_ != nullptr) { stream.stream_idle_timer_->disableTimer(); ...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
186,923,623,088,204,260,000,000,000,000,000,000,000
34
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
u32 tipc_node_get_addr(struct tipc_node *node) { return (node) ? node->addr : 0; }
0
[]
linux
0217ed2848e8538bcf9172d97ed2eeb4a26041bb
215,973,246,284,203,400,000,000,000,000,000,000,000
4
tipc: better validate user input in tipc_nl_retrieve_key() Before calling tipc_aead_key_size(ptr), we need to ensure we have enough data to dereference ptr->keylen. We probably also want to make sure tipc_aead_key_size() wont overflow with malicious ptr->keylen values. Syzbot reported: BUG: KMSAN: uninit-value in _...
set_interp_require(bool trusted) { if (trusted) { PL_ppaddr[OP_REQUIRE] = pp_require_safe; PL_ppaddr[OP_DOFILE] = pp_require_safe; } else { PL_ppaddr[OP_REQUIRE] = pp_require_orig; PL_ppaddr[OP_DOFILE] = pp_require_orig; } }
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
265,607,184,043,628,230,000,000,000,000,000,000,000
13
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
static void ql_mac_cfg_pause(struct ql3_adapter *qdev, u32 enable) { struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; u32 value; if (enable) value = ((MAC_CONFIG_REG_TF | MAC_CONFIG_REG_RF) | ((MAC_CONFIG_REG_TF | MAC_CONFIG_REG_RF) << 16)); else value = ((MAC_CONFIG_R...
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
234,955,456,868,767,640,000,000,000,000,000,000,000
18
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
next_packet (unsigned char const **bufptr, size_t *buflen, unsigned char const **r_data, size_t *r_datalen, int *r_pkttype, size_t *r_ntotal) { const unsigned char *buf = *bufptr; size_t len = *buflen; int c, ctb, pkttype; unsigned long pktlen; if (!len) return gpg_error (GPG_ER...
1
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
257,739,300,163,296,070,000,000,000,000,000,000,000
104
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static int decode_pathconf(struct xdr_stream *xdr, struct nfs_pathconf *pathconf) { __be32 *savep; uint32_t attrlen, bitmap[2] = {0}; int status; if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0) goto xdr_error; if ((status = decode_attr_bitmap(xdr, bitmap)) != 0) goto xdr_error; if ((status = decode_...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
146,280,553,292,779,540,000,000,000,000,000,000,000
24
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_UNUSED == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_UNUSED != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_UNUSED_...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
237,512,413,984,813,900,000,000,000,000,000,000,000
13
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
symbol_free (void *ptr) { symbol *sym = (symbol *)ptr; if (!sym->is_alias) sym_content_free (sym->content); free (sym); }
0
[]
bison
b7aab2dbad43aaf14eebe78d54aafa245a000988
227,659,011,811,151,600,000,000,000,000,000,000,000
8
fix: crash when redefining the EOF token Reported by Agency for Defense Development. https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html On an empty such as %token FOO BAR FOO 0 %% input: %empty we crash because when we find FOO 0, we decrement ntokens (since FOO was discovered...
MagickExport MagickBooleanType SetImageStorageClass(Image *image, const ClassType storage_class) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); image->storage_cla...
0
[ "CWE-665" ]
ImageMagick6
27b1c74979ac473a430e266ff6c4b645664bc805
192,835,350,202,540,350,000,000,000,000,000,000,000
10
https://github.com/ImageMagick/ImageMagick/issues/1522
static void receive_header(VirtIONet *n, const struct iovec *iov, int iov_cnt, const void *buf, size_t size) { if (n->has_vnet_hdr) { /* FIXME this cast is evil */ void *wbuf = (void *)buf; work_around_broken_dhclient(wbuf, wbuf + n->host_hdr_len, ...
0
[ "CWE-703" ]
qemu
abe300d9d894f7138e1af7c8e9c88c04bfe98b37
207,405,363,215,056,760,000,000,000,000,000,000,000
21
virtio-net: fix map leaking on error during receive Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") tries to fix the use after free of the sg by caching the virtqueue elements in an array and unmap them at once after receiving the packets, But it forgot to unmap the cached elements on error which ...
file_id_hasher (void const *entry, size_t table_size) { file_id const *e = entry; size_t i = e->ino + e->dev; return i % table_size; }
0
[ "CWE-22" ]
patch
685a78b6052f4df6eac6d625a545cfb54a6ac0e1
149,403,079,241,256,150,000,000,000,000,000,000,000
6
Do not let a malicious patch create files above current directory This addresses CVE-2010-4651, reported by Jakub Wilk. https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2010-4651 * src/util.c (strip_leading_slashes): Reject absolute file names and file names containing a component of "..". * tests/bad-filenames: New fi...
normalize_uri (const gchar *address, gchar **server) { SoupURI *uri; gchar *scheme; gchar *ret; gchar *uri_string; guint std_port; uri = NULL; uri_string = NULL; scheme = g_uri_parse_scheme (address); std_port = 0; ret = NULL; if (g_strcmp0 (scheme, "http") == 0 || g_strcmp0 (scheme, "dav...
0
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
228,432,327,625,280,400,000,000,000,000,000,000,000
69
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
static int ocfs2_sync_file(struct file *file, loff_t start, loff_t end, int datasync) { int err = 0; struct inode *inode = file->f_mapping->host; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); struct ocfs2_inode_info *oi = OCFS2_I(inode); journal_t *journal = osb->journal->j_journal; int ret; tid_t commi...
0
[ "CWE-401" ]
linux
28f5a8a7c033cbf3e32277f4cc9c6afd74f05300
52,769,835,675,701,690,000,000,000,000,000,000,000
41
ocfs2: should wait dio before inode lock in ocfs2_setattr() we should wait dio requests to finish before inode lock in ocfs2_setattr(), otherwise the following deadlock will happen: process 1 process 2 process 3 truncate file 'A' end_io of writing file 'A' receiving the ...
int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt, mbedtls_x509_crt *trust_ca, mbedtls_x509_crl *ca_crl, const mbedtls_x509_crt_profile *profile, const char *cn, uint32_t *flags, int (*f_vrfy)(void *, ...
1
[ "CWE-287", "CWE-284" ]
mbedtls
d15795acd5074e0b44e71f7ede8bdfe1b48591fc
260,571,214,915,258,930,000,000,000,000,000,000,000
125
Improve behaviour on fatal errors If we didn't walk the whole chain, then there may be any kind of errors in the part of the chain we didn't check, so setting all flags looks like the safe thing to do.
ecc_mod_mul_canonical (const struct ecc_modulo *m, mp_limb_t *rp, const mp_limb_t *ap, const mp_limb_t *bp, mp_limb_t *tp) { mp_limb_t cy; mpn_mul_n (tp, ap, bp, m->size); m->reduce (m, tp + m->size, tp); cy = mpn_sub_n (rp, tp + m->size, m->m, m->size); cnd_copy (cy, rp, tp + m->size, m->size); }
0
[ "CWE-787" ]
nettle
a63893791280d441c713293491da97c79c0950fe
139,026,181,108,634,070,000,000,000,000,000,000,000
10
New functions ecc_mod_mul_canonical and ecc_mod_sqr_canonical. * ecc-mod-arith.c (ecc_mod_mul_canonical, ecc_mod_sqr_canonical): New functions. * ecc-internal.h: Declare and document new functions. * curve448-eh-to-x.c (curve448_eh_to_x): Use ecc_mod_sqr_canonical. * curve25519-eh-to-x.c (curve25519_eh_to_x): Use ecc_...
create_instance( /*============*/ uint64_t interface, /*!< in: protocol version, currently always 1 */ GET_SERVER_API get_server_api, /*!< in: Callback the engines may call to get the public server interface */ ENGINE_HANDLE** handle ) /*!< out: Engine handle */ { ENGINE_ERROR_CODE err_ret; st...
0
[]
mysql-server
659514dc83299a7d8c7defeb543be4339fbe1ee1
15,892,018,649,331,350,000,000,000,000,000,000,000
73
Bug #25147515 SET DAEMON_MEMCACHED_R_BATCH_SIZE GREATER THAN 1 MAKE MYSQLD CRASHED PROBLEM ------- User starts a "get" the the connection with SET DAEMON_MEMCACHED_R_BATCH_SIZE= 5 and with binlog on. Since "get" is a read transaction this connection is not allocated any conn_data->thd (which is used for bin log commit...
static int smack_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc) { struct socket_smack *ssp; struct socket *sock; struct super_block *sbp; struct inode *ip = (struct inode *)inode; char *isp; int ilen; int rc = 0; if (strcmp(name, XATTR_SMACK_SUFFIX) == 0...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
220,710,989,559,537,540,000,000,000,000,000,000,000
47
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy) { int i; gdImagePtr im; if (overflow2(sx, sy)) { return NULL; } if (overflow2(sizeof (unsigned char *), sy)) { return NULL; } if (overflow2(sizeof (unsigned char), sx)) { return NULL; } im = (gdImage *) gdCalloc(1, sizeof(gdImage)); if (!im) { r...
1
[ "CWE-20" ]
libgd
1846f48e5fcdde996e7c27a4bbac5d0aef183e4b
35,894,093,252,501,957,000,000,000,000,000,000,000
67
Fix #340: System frozen gdImageCreate() doesn't check for oversized images and as such is prone to DoS vulnerabilities. We fix that by applying the same overflow check that is already in place for gdImageCreateTrueColor(). CVE-2016-9317
static void setup_struct_phy_for_init(struct b43_wldev *dev, struct b43_phy *phy) { phy->hardware_power_control = !!modparam_hwpctl; phy->next_txpwr_check_time = jiffies; /* PHY TX errors counter. */ atomic_set(&phy->txerr_cnt, B43_PHY_TX_BADNESS_LIMIT); #if B43_DEBUG phy->phy_locked = false; phy->radi...
0
[ "CWE-134" ]
wireless
9538cbaab6e8b8046039b4b2eb6c9d614dc782bd
217,603,853,052,052,850,000,000,000,000,000,000,000
13
b43: stop format string leaking into error msgs The module parameter "fwpostfix" is userspace controllable, unfiltered, and is used to define the firmware filename. b43_do_request_fw() populates ctx->errors[] on error, containing the firmware filename. b43err() parses its arguments as a format string. For systems with...
static void ov6xx0_configure(struct sd *sd) { struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; int rc; gspca_dbg(gspca_dev, D_PROBE, "starting OV6xx0 configuration\n"); /* Detect sensor (sub)type */ rc = i2c_r(sd, OV7610_REG_COM_I); if (rc < 0) { gspca_err(gspca_dev, "Error detecting sensor type\n"); r...
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
178,564,232,116,790,760,000,000,000,000,000,000,000
47
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
int app_isdir(const char *name) { #if defined(S_ISDIR) struct stat st; if (stat(name,&st)==0) return S_ISDIR(st.st_mode); else return -1; #else return -1; #endif }
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
255,493,206,871,876,460,000,000,000,000,000,000,000
11
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
_XimCheckNestQuarkList(quark_list, num_quark, quark, separator) XrmQuark *quark_list; int num_quark; XrmQuark quark; XrmQuark separator; { register int i; for (i = 0; i < num_quark; i++) { if (quark_list[i] == separator) { break; } if (quark_list[i] == quark) { return True...
0
[ "CWE-190" ]
libx11
1a566c9e00e5f35c1f9e7f3d741a02e5170852b2
4,093,960,330,223,953,000,000,000,000,000,000,000
18
Zero out buffers in functions It looks like uninitialized stack or heap memory can leak out via padding bytes. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
vhost_user_set_postcopy_advise(struct virtio_net **pdev, struct VhostUserMsg *msg, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; #ifdef RTE_LIBRTE_VHOST_POSTCOPY struct uffdio_api api_struct; if (validate_msg_fds(msg, 0) != 0) return RTE_VHOST_MSG_RESULT_ERR; dev->postcopy_ufd = syscall(__NR...
0
[]
dpdk
bf472259dde6d9c4dd3ebad2c2b477a168c6e021
263,117,227,643,002,200,000,000,000,000,000,000,000
38
vhost: fix possible denial of service by leaking FDs A malicious Vhost-user master could send in loop hand-crafted vhost-user messages containing more file descriptors the vhost-user slave expects. Doing so causes the application using the vhost-user library to run out of FDs. This issue has been assigned CVE-2019-14...
static void hardware_disable(void *garbage) { if (vmm_exclusive) { vmclear_local_vcpus(); kvm_cpu_vmxoff(); } write_cr4(read_cr4() & ~X86_CR4_VMXE); }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
17,596,370,579,229,583,000,000,000,000,000,000,000
8
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
sctp_disposition_t sctp_sf_ignore_primitive( const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { SCTP_DEBUG_PRINTK("Primitive type %d is ignored.\n", type.primitive); return SCTP_DISPOSITION_DISCARD; }
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
26,206,293,896,036,323,000,000,000,000,000,000,000
10
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
int parse_uid_range(const char *s, uid_t *ret_lower, uid_t *ret_upper) { uint32_t u, l; int r; assert(s); assert(ret_lower); assert(ret_upper); r = parse_range(s, &l, &u); if (r < 0) return r; if (l > u) return -EINVAL; ...
0
[ "CWE-269" ]
systemd
156a5fd297b61bce31630d7a52c15614bf784843
302,426,538,269,348,860,000,000,000,000,000,000,000
22
basic/user-util: always use base 10 for user/group numbers We would parse numbers with base prefixes as user identifiers. For example, "0x2b3bfa0" would be interpreted as UID==45334432 and "01750" would be interpreted as UID==1000. This parsing was used also in cases where either a user/group name or number may be spe...
void (*SSL_get_info_callback(const SSL *ssl))(const SSL * /*ssl*/,int /*type*/,int /*val*/) { return ssl->info_callback; }
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
78,125,291,047,490,190,000,000,000,000,000,000,000
4
Add Next Protocol Negotiation.
void adapter_shutdown(void) { GList *list; DBG(""); powering_down = true; for (list = g_list_first(adapter_list); list; list = g_list_next(list)) { struct btd_adapter *adapter = list->data; if (!(adapter->current_settings & MGMT_SETTING_POWERED)) continue; clear_discoverable(adapter); remove_t...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
213,189,793,174,662,980,000,000,000,000,000,000,000
25
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static long vhost_vdpa_get_device_id(struct vhost_vdpa *v, u8 __user *argp) { struct vdpa_device *vdpa = v->vdpa; const struct vdpa_config_ops *ops = vdpa->config; u32 device_id; device_id = ops->get_device_id(vdpa); if (copy_to_user(argp, &device_id, sizeof(device_id))) return -EFAULT; return 0; }
0
[ "CWE-416" ]
linux
f6bbf0010ba004f5e90c7aefdebc0ee4bd3283b9
44,250,520,279,261,790,000,000,000,000,000,000,000
13
vhost-vdpa: fix use-after-free of v->config_ctx When the 'v->config_ctx' eventfd_ctx reference is released we didn't set it to NULL. So if the same character device (e.g. /dev/vhost-vdpa-0) is re-opened, the 'v->config_ctx' is invalid and calling again vhost_vdpa_config_put() causes use-after-free issues like the foll...
libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session, const char *user, unsigned int user_len, const char *publickey, const char *privatekey, ...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
307,406,705,976,414,020,000,000,000,000,000,000,000
20
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
static void cleanup_single_sta(struct sta_info *sta) { struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_local *local = sdata->local; __cleanup_single_sta(sta); sta_info_free(local, sta); }
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
86,935,998,469,131,900,000,000,000,000,000,000,000
8
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
*/ void xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathObjectPtr hay, needle; CHECK_ARITY(2); CAST_TO_STRING; CHECK_TYPE(XPATH_STRING); needle = valuePop(ctxt); CAST_TO_STRING; hay = valuePop(ctxt); if ((hay == NULL) || (hay->type != XPATH_STRING)) { xml...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
79,393,241,444,478,530,000,000,000,000,000,000,000
22
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
GF_Err ftab_box_dump(GF_Box *a, FILE * trace) { u32 i; GF_FontTableBox *p = (GF_FontTableBox *)a; gf_isom_box_dump_start(a, "FontTableBox", trace); gf_fprintf(trace, ">\n"); for (i=0; i<p->entry_count; i++) { gf_fprintf(trace, "<FontRecord ID=\"%d\" name=\"%s\"/>\n", p->fonts[i].fontID, p->fonts[i].fontName ? p-...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
71,912,800,788,964,980,000,000,000,000,000,000,000
15
fixed #2138
cmd_http_expect(CMD_ARGS) { struct http *hp; const char *lhs; char *cmp; const char *rhs; (void)cmd; (void)vl; CAST_OBJ_NOTNULL(hp, priv, HTTP_MAGIC); assert(!strcmp(av[0], "expect")); av++; AN(av[0]); AN(av[1]); AN(av[2]); AZ(av[3]); lhs = cmd_var_resolve(hp, av[0]); cmp = av[1]; rhs = cmd_var_resolv...
0
[ "CWE-269" ]
Varnish-Cache
85e8468bec9416bd7e16b0d80cb820ecd2b330c3
252,562,304,075,169,400,000,000,000,000,000,000,000
40
Do not consider a CR by itself as a valid line terminator Varnish (prior to version 4.0) was not following the standard with regard to line separator. Spotted and analyzed by: Régis Leroy [regilero] regis.leroy@makina-corpus.com
lyd_new_output_leaf(struct lyd_node *parent, const struct lys_module *module, const char *name, const char *val_str) { const struct lys_node *snode = NULL, *siblings; if ((!parent && !module) || !name) { LOGARG; return NULL; } siblings = lyd_new_find_schema(parent, module, 1); if (...
1
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
177,434,104,804,178,500,000,000,000,000,000,000,000
23
schema tree BUGFIX do not check features while still resolving schema Fixes #723
arrangeCursor(Buffer *buf) { int col, col2, pos; int delta = 1; if (buf == NULL || buf->currentLine == NULL) return; /* Arrange line */ if (buf->currentLine->linenumber - buf->topLine->linenumber >= buf->LINES || buf->currentLine->linenumber < buf->topLine->linenumber) { /* * buf->topLine = buf...
0
[ "CWE-119" ]
w3m
0c3f5d0e0d9269ad47b8f4b061d7818993913189
179,563,537,981,172,700,000,000,000,000,000,000,000
58
Prevent array index out of bounds for symbol Bug-Debian: https://github.com/tats/w3m/issues/38
static int airo_set_power(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { struct airo_info *local = dev->ml_priv; readConfigRid(local, 1); if (vwrq->disabled) { if (sniffing_mode(local)) return -EINVAL; local->config.powerSaveMode = POWERSAVE_CAM; ...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
314,454,502,740,786,200,000,000,000,000,000,000,000
52
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
encode_ofpact(const struct ofpact *a, enum ofp_version ofp_version, struct ofpbuf *out) { switch (a->type) { #define OFPACT(ENUM, STRUCT, MEMBER, NAME) \ case OFPACT_##ENUM: \ encode_##ENUM(ofpact_get_##ENUM(a...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
347,542,977,678,789,500,000,000,000,000,000,000
14
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
int handler::ha_external_lock(THD *thd, int lock_type) { int error; DBUG_ENTER("handler::ha_external_lock"); /* Whether this is lock or unlock, this should be true, and is to verify that if get_auto_increment() was called (thus may have reserved intervals or taken a table lock), ha_release_auto_increm...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
33,587,311,582,392,150,000,000,000,000,000,000,000
74
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
static Object find_node(CVarRef children, xmlNodePtr node) { for (ArrayIter iter(children.toArray()); iter; ++iter) { if (iter.second().isObject()) { c_SimpleXMLElement *elem = iter.second().toObject().getTyped<c_SimpleXMLElement>(); Object ret = elem->m_node == node ? elem ...
0
[ "CWE-94" ]
hhvm
95f96e7287effe2fcdfb9a5338d1a7e4f55b083b
188,927,172,130,252,200,000,000,000,000,000,000,000
15
Fix libxml_disable_entity_loader() This wasn't calling requestInit and setting the libxml handler no null. So the first time an error came along it would reset the handler from no-op to reading again. This is a much better fix, we set our custom handler in requestInit and when libxml_disable_entity_loader we store th...
static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int retval; if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } els...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
120,134,862,525,934,420,000,000,000,000,000,000,000
30
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static void qemu_chr_close_stdio(struct CharDriverState *chr) { term_exit(); fd_chr_close(chr); }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
69,872,968,998,237,800,000,000,000,000,000,000,000
5
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static void print_serial(sc_card_t *in_card) { int r; sc_serial_number_t serial; r = sc_lock(card); if (r == SC_SUCCESS) r = sc_card_ctl(in_card, SC_CARDCTL_GET_SERIALNR, &serial); sc_unlock(card); if (r) fprintf(stderr, "sc_card_ctl(*, SC_CARDCTL_GET_SERIALNR, *) failed\n"); else util_hex_dump_asc(stdout...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
79,639,957,265,641,910,000,000,000,000,000,000,000
14
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, unsigned long max_load_move, struct sched_domain *sd, enum cpu_idle_type idle, int *all_pinned, int *this_best_prio) { long rem_load_move = max_load_move; int busiest_cpu = cpu_of(busiest); struct task_group *tg; rcu_read_lock(); ...
0
[]
linux-2.6
ac884dec6d4a7df252150af875cffddf8f1d9c15
280,430,966,476,784,970,000,000,000,000,000,000,000
53
sched: fair-group scheduling vs latency Currently FAIR_GROUP sched grows the scheduler latency outside of sysctl_sched_latency, invert this so it stays within. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
ptvcursor_set_tree(ptvcursor_t *ptvc, proto_tree *tree) { ptvc->tree = tree; }
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
302,965,354,312,157,640,000,000,000,000,000,000,000
4
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
void dev_printk(const char *level, const struct device *dev, const char *fmt, ...) { struct va_format vaf; va_list args; va_start(args, fmt); vaf.fmt = fmt; vaf.va = &args; __dev_printk(level, dev, &vaf); va_end(args); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
191,675,236,759,438,230,000,000,000,000,000,000,000
15
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
gst_mpegts_section_new (guint16 pid, guint8 * data, gsize data_size) { GstMpegtsSection *res = NULL; guint8 tmp; guint8 table_id; guint16 section_length; /* Check for length */ section_length = GST_READ_UINT16_BE (data + 1) & 0x0FFF; if (G_UNLIKELY (data_size < section_length + 3)) goto short_packet;...
1
[ "CWE-125" ]
gst-plugins-bad
d58f668ece8795bddb3316832e1848c7b7cf38ac
214,999,627,840,689,900,000,000,000,000,000,000,000
56
mpegtssection: Add more section size checks The smallest section ever needs to be at least 3 bytes (i.e. just the short header). Non-short headers need to be at least 11 bytes long (3 for the minimum header, 5 for the non-short header, and 4 for the CRC). https://bugzilla.gnome.org/show_bug.cgi?id=775048
static void pb_release_single_field(pb_field_iter_t *field) { pb_type_t type; type = field->type; if (PB_HTYPE(type) == PB_HTYPE_ONEOF) { if (*(pb_size_t*)field->pSize != field->tag) return; /* This is not the current field in the union */ } /* Release anything contained in...
0
[ "CWE-763" ]
nanopb
e2f0ccf939d9f82931d085acb6df8e9a182a4261
31,674,340,861,981,850,000,000,000,000,000,000,000
90
Fix invalid free() with oneof (#647) Nanopb would call free() or realloc() on an invalid (attacker controlled) pointer value when all the following conditions are true: - PB_ENABLE_MALLOC is defined at the compile time - Message definition contains an oneof field, and the oneof contains at least one pointer type fi...
delete_conn(struct conn *conn) { ovs_assert(conn->conn_type == CT_CONN_TYPE_DEFAULT); ovs_mutex_destroy(&conn->lock); free(conn->nat_conn); delete_conn_cmn(conn); }
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
50,820,272,189,398,070,000,000,000,000,000,000,000
7
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *mntfh, struct nfs_fsinfo *info) { int error; struct nfs_fattr *fattr = info->fattr; struct nfs4_label *label = fattr->label; error = nfs4_server_capabilities(server, mntfh); if (error < 0) { dprintk("nfs4_get_root: getcaps error = ...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
132,395,343,793,845,860,000,000,000,000,000,000,000
26
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static int set_max_huge_pages(struct hstate *h, unsigned long count, int nid, nodemask_t *nodes_allowed) { unsigned long min_count, ret; struct page *page; LIST_HEAD(page_list); NODEMASK_ALLOC(nodemask_t, node_alloc_noretry, GFP_KERNEL); /* * Bit mask controlling how hard we retry per-node allocations....
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
62,739,707,413,603,170,000,000,000,000,000,000,000
149
hugetlbfs: flush TLBs correctly after huge_pmd_unshare When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB flush is missing. This TLB flush must be performed before releasing the i_mmap_rwsem, in order to prevent an unshared PMDs page from being released and reused before the TLB flush took place...
static int _hostsock_getsockopt( oe_fd_t* sock_, int level, int optname, void* optval, oe_socklen_t* optlen) { int ret = -1; sock_t* sock = _cast_sock(sock_); oe_socklen_t optlen_in = 0; oe_socklen_t optlen_out = 0; oe_errno = 0; if (!sock || !optval || !optlen) OE_...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
155,363,369,873,911,480,000,000,000,000,000,000,000
50
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
arcmsr_Read_iop_rqbuffer_data(struct AdapterControlBlock *acb, struct QBUFFER __iomem *prbuffer) { uint8_t *pQbuffer; uint8_t __iomem *iop_data; uint32_t iop_len; if (acb->adapter_type & (ACB_ADAPTER_TYPE_C | ACB_ADAPTER_TYPE_D)) return arcmsr_Read_iop_rqbuffer_in_DWORD(acb, prbuffer); iop_data = (uint8_t __i...
0
[ "CWE-119", "CWE-787" ]
linux
7bc2b55a5c030685b399bb65b6baa9ccc3d1f167
185,034,664,231,145,930,000,000,000,000,000,000,000
22
scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer() We need to put an upper bound on "user_len" so the memcpy() doesn't overflow. Cc: <stable@vger.kernel.org> Reported-by: Marco Grassi <marco.gra@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Sig...
psutil_net_io_counters(PyObject *self, PyObject *args) { char *buf = NULL, *lim, *next; struct if_msghdr *ifm; int mib[6]; size_t len; PyObject *py_retdict = PyDict_New(); PyObject *py_ifc_info = NULL; if (py_retdict == NULL) return NULL; mib[0] = CTL_NET; // networking...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
150,870,156,566,438,700,000,000,000,000,000,000,000
89
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
CImg<T>& normalize() { const ulongT whd = (ulongT)_width*_height*_depth; cimg_pragma_openmp(parallel for cimg_openmp_collapse(2) cimg_openmp_if(_width>=(cimg_openmp_sizefactor)*512 && _height*_depth>=16)) cimg_forYZ(*this,y,z) { ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
302,673,499,995,430,630,000,000,000,000,000,000,000
18
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
TEST_F(ExprMatchTest, LteWithLHSFieldPathMatchesCorrectly) { createMatcher(fromjson("{$expr: {$lte: ['$x', 3]}}")); ASSERT_TRUE(matches(BSON("x" << 3))); ASSERT_FALSE(matches(BSON("x" << 10))); }
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
26,015,544,976,406,900,000,000,000,000,000,000,000
6
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static int cx23888_ir_rx_s_parameters(struct v4l2_subdev *sd, struct v4l2_subdev_ir_parameters *p) { struct cx23888_ir_state *state = to_state(sd); struct cx23885_dev *dev = state->dev; struct v4l2_subdev_ir_parameters *o = &state->rx_params; u16 rxclk_divider; if (p->shutdown) return cx23888_ir_rx_sh...
0
[ "CWE-400", "CWE-401" ]
linux
a7b2df76b42bdd026e3106cf2ba97db41345a177
62,606,693,024,685,090,000,000,000,000,000,000,000
86
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
static void cfg_indent(FILE *fp, int indent) { while (indent--) fprintf(fp, " "); }
0
[]
libconfuse
d73777c2c3566fb2647727bb56d9a2295b81669b
55,825,219,630,870,880,000,000,000,000,000,000,000
5
Fix #163: unterminated username used with getpwnam() Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; div_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRML...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
78,197,640,666,168,570,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
GC_API char * GC_CALL GC_strndup(const char *str, size_t size) { char *copy; size_t len = strlen(str); /* str is expected to be non-NULL */ if (len > size) len = size; copy = GC_malloc_atomic(len + 1); if (copy == NULL) { # ifndef MSWINCE errno = ENOMEM; # endif return NULL; } BCOPY(str...
0
[ "CWE-189" ]
bdwgc
be9df82919960214ee4b9d3313523bff44fd99e1
222,532,994,461,852,940,000,000,000,000,000,000,000
17
Fix allocation size overflows due to rounding. * malloc.c (GC_generic_malloc): Check if the allocation size is rounded to a smaller value. * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
void addQueryableBackupPrivileges(PrivilegeVector* privileges) { Privilege::addPrivilegeToPrivilegeVector( privileges, Privilege(ResourcePattern::forAnyResource(), ActionType::collStats)); Privilege::addPrivilegeToPrivilegeVector( privileges, Privilege(ResourcePattern::forAnyNormalResource(), Ac...
0
[ "CWE-20" ]
mongo
865eccaf35aca29d1b71764d50227cdf853752d0
9,036,507,213,519,624,000,000,000,000,000,000,000
62
SERVER-36263 Bypassing operation validation in applyOps should require special privilege
const Tags* Segment::GetTags() const { return m_pTags; }
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
241,306,355,042,705,750,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
static blkcnt_t ext4_inode_blocks(struct ext4_inode *raw_inode, struct ext4_inode_info *ei) { blkcnt_t i_blocks ; struct inode *inode = &(ei->vfs_inode); struct super_block *sb = inode->i_sb; if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) { /* we are using combined 48 bit field *...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
153,796,081,034,545,930,000,000,000,000,000,000,000
22
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
struct tcp_sock_t *tcp_open(uint16_t port) { struct tcp_sock_t *this = calloc(1, sizeof *this); if (this == NULL) { ERR("IPv4: callocing this failed"); goto error; } // Open [S]ocket [D]escriptor this->sd = -1; this->sd = socket(AF_INET, SOCK_STREAM, 0); if (this->sd < 0) { ERR("IPv4 socket open failed");...
0
[ "CWE-284", "CWE-264" ]
ippusbxd
46844402bca7a38fc224483ba6f0a93c4613203f
151,464,632,518,567,830,000,000,000,000,000,000,000
50
SECURITY FIX: Actually restrict the access to the printer to localhost Before, any machine in any network connected by any of the interfaces (as listed by "ifconfig") could access to an IPP-over-USB printer on the assigned port, allowing users on remote machines to print and to access the web configuration interface o...
static inline struct sctp_chunk *sctp_make_op_error_fixed( const struct sctp_association *asoc, const struct sctp_chunk *chunk) { size_t size = asoc ? asoc->pathmtu : 0; if (!size) size = SCTP_DEFAULT_MAXSEGMENT; return sctp_make_op_error_space(asoc, chunk, size); }
0
[ "CWE-20" ]
linux
07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c
168,537,732,422,891,570,000,000,000,000,000,000,000
11
sctp: verify size of a new chunk in _sctp_make_chunk() When SCTP makes INIT or INIT_ACK packet the total chunk length can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when transmitting these packets, e.g. the crash on sending INIT_ACK: [ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168 ...
Status GetSliceAxis(const NodeDef* node, const NodeDef* pack, const PartialTensorShape& pack_output_shape, int pack_axis, int64* slice_start_value, bool* found, bool* must_expand_dims) { *found = false; if (IsSlice(*node)) { *must_expand_...
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
276,787,926,111,093,600,000,000,000,000,000,000,000
14
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
int cil_gen_constraint_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **expr) { int rc = SEPOL_ERR; if (current->cl_head == NULL) { goto exit; } rc = __cil_fill_constraint_expr(current->cl_head, flavor, expr); if (rc != SEPOL_OK) { goto exit; } return SEPOL_OK; exit: cil_lo...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
338,431,504,309,879,880,000,000,000,000,000,000,000
20
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
void XMLRPC_SetValueInt(XMLRPC_VALUE value, int val) { if(value) { value->type = xmlrpc_int; value->i = val; } }
0
[ "CWE-119" ]
php-src
88412772d295ebf7dd34409534507dc9bcac726e
53,201,235,181,706,040,000,000,000,000,000,000,000
6
Fix bug #68027 - fix date parsing in XMLRPC lib
DECLAREcpFunc(cpSeparateTiles2SeparateStrips) { return cpImage(in, out, readSeparateTilesIntoBuffer, writeBufferToSeparateStrips, imagelength, imagewidth, spp); }
0
[ "CWE-190" ]
libtiff
43c0b81a818640429317c80fea1e66771e85024b
240,161,965,749,895,580,000,000,000,000,000,000,000
7
* tools/tiffcp.c: fix read of undefined variable in case of missing required tags. Found on test case of MSVR 35100. * tools/tiffcrop.c: fix read of undefined buffer in readContigStripsIntoBuffer() due to uint16 overflow. Probably not a security issue but I can be wrong. Reported as MSVR 35100 by Axel Souchet from the ...