func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int br_nf_pre_routing_finish_ipv6(struct sk_buff *skb) { struct nf_bridge_info *nf_bridge = skb->nf_bridge; struct rtable *rt; if (nf_bridge->mask & BRNF_PKT_TYPE) { skb->pkt_type = PACKET_OTHERHOST; nf_bridge->mask ^= BRNF_PKT_TYPE; } nf_bridge->mask ^= BRNF_NF_BRIDGE_PREROUTING; rt = bridge_parent_...
0
[]
linux-2.6
f8e9881c2aef1e982e5abc25c046820cd0b7cf64
50,528,780,416,610,540,000,000,000,000,000,000,000
26
bridge: reset IPCB in br_parse_ip_options Commit 462fb2af9788a82 (bridge : Sanitize skb before it enters the IP stack), missed one IPCB init before calling ip_options_compile() Thanks to Scot Doyle for his tests and bug reports. Reported-by: Scot Doyle <lkml@scotdoyle.com> Signed-off-by: Eric Dumazet <eric.dumazet@g...
void PSOutputDev::updateWordSpace(GfxState *state) { writePSFmt("{0:.6g} Tw\n", state->getWordSpace()); }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
14,608,455,852,500,832,000,000,000,000,000,000,000
3
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
init_netdev(struct net_device *dev, char *name) { dev->netdev_ops = &ar6000_netdev_ops; dev->watchdog_timeo = AR6000_TX_TIMEOUT; /* * We need the OS to provide us with more headroom in order to * perform dix to 802.3, WMI header encap, and the HTC header */ if (processDot11Hdr) { dev...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
216,939,809,930,961,500,000,000,000,000,000,000,000
29
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...
evalvars_clear(void) { int i; struct vimvar *p; for (i = 0; i < VV_LEN; ++i) { p = &vimvars[i]; if (p->vv_di.di_tv.v_type == VAR_STRING) VIM_CLEAR(p->vv_str); else if (p->vv_di.di_tv.v_type == VAR_LIST) { list_unref(p->vv_list); p->vv_list = NULL; } } hash_clear(&vimv...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
237,581,428,887,723,740,000,000,000,000,000,000,000
30
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
static int ssl_parse_client_hello_v2( ssl_context *ssl ) { int ret; unsigned int i, j; size_t n; unsigned int ciph_len, sess_len, chal_len; unsigned char *buf, *p; SSL_DEBUG_MSG( 2, ( "=> parse client hello v2" ) ); if( ssl->renegotiation != SSL_INITIAL_HANDSHAKE ) { SSL_DEBUG_...
0
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
70,463,891,311,495,430,000,000,000,000,000,000,000
207
RSA blinding on CRT operations to counter timing attacks
xmlTextReaderReadTree(xmlTextReaderPtr reader) { if (reader->state == XML_TEXTREADER_END) return(0); next_node: if (reader->node == NULL) { if (reader->doc->children == NULL) { reader->state = XML_TEXTREADER_END; return(0); } reader->node = reader->doc->...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
132,296,689,035,802,860,000,000,000,000,000,000,000
61
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
poppler_document_init (PopplerDocument *document) { }
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
91,138,593,820,033,930,000,000,000,000,000,000,000
3
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
static EContactAddress * getormakeEContactAddress (EContact * card, EContactField field) { EContactAddress *contact_addr = e_contact_get (card, field); if (!contact_addr) contact_addr = g_new0 (EContactAddress, 1); return contact_addr; }
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
315,022,853,635,908,600,000,000,000,000,000,000,000
7
Bug 796174 - strcat() considered unsafe for buffer overflow
convert_setup(vimconv_T *vcp, char_u *from, char_u *to) { return convert_setup_ext(vcp, from, TRUE, to, TRUE); }
0
[ "CWE-122", "CWE-787" ]
vim
f6d39c31d2177549a986d170e192d8351bd571e2
295,206,102,685,462,940,000,000,000,000,000,000,000
4
patch 9.0.0220: invalid memory access with for loop over NULL string Problem: Invalid memory access with for loop over NULL string. Solution: Make sure mb_ptr2len() consistently returns zero for NUL.
static int jpeg_skip_1(Image *ifile) { int c; c = ReadBlobByte(ifile); if (c == EOF) return EOF; return c; }
0
[ "CWE-772" ]
ImageMagick
46382526a3f09cebf9f2af680fc55b2a668fcbef
68,965,593,467,852,310,000,000,000,000,000,000,000
9
https://github.com/ImageMagick/ImageMagick/issues/643
static int __init acpi_configfs_init(void) { int ret; struct config_group *root = &acpi_configfs.su_group; config_group_init(root); ret = configfs_register_subsystem(&acpi_configfs); if (ret) return ret; acpi_table_group = configfs_register_default_group(root, "table", &acpi_tables_type); return P...
0
[ "CWE-862" ]
linux
75b0cea7bf307f362057cc778efe89af4c615354
206,520,147,269,444,360,000,000,000,000,000,000,000
15
ACPI: configfs: Disallow loading ACPI tables when locked down Like other vectors already patched, this one here allows the root user to load ACPI tables, which enables arbitrary physical address writes, which in turn makes it possible to disable lockdown. Prevents this by checking the lockdown status before allowing ...
static inline void trace_module_remove_evals(struct module *mod) { }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
101,977,662,359,306,080,000,000,000,000,000,000,000
1
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
safeboolean empty_output_buffer (j_compress_ptr cinfo) { my_dest_ptr dest = (my_dest_ptr) cinfo->dest; if (gdPutBuf (dest->buffer, OUTPUT_BUF_SIZE, dest->outfile) != (size_t) OUTPUT_BUF_SIZE) { ERREXIT (cinfo, JERR_FILE_WRITE); } dest->pub.next_output_byte = dest->buffer; dest->pub.free_in_buffer = OUTPUT_BUF_...
0
[ "CWE-415" ]
php-src
089f7c0bc28d399b0420aa6ef058e4c1c120b2ae
29,651,277,181,321,437,000,000,000,000,000,000,000
13
Sync with upstream Even though libgd/libgd#492 is not a relevant bug fix for PHP, since the binding doesn't use the `gdImage*Ptr()` functions at all, we're porting the fix to stay in sync here.
static u32 veth_get_tx_csum(struct net_device *dev) { return (dev->features & NETIF_F_NO_CSUM) != 0; }
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
259,221,289,494,575,920,000,000,000,000,000,000,000
4
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names, int max) { xmlValidCtxt vctxt; int nb_valid_elements = 0; const xmlChar *elements[256]={0}; int nb_elements = 0, i; const xmlChar *name; xmlNode *ref_node; xmlNode *parent; xmlNode *te...
0
[]
libxml2
932cc9896ab41475d4aa429c27d9afd175959d74
293,061,412,974,063,950,000,000,000,000,000,000,000
103
Fix buffer size checks in xmlSnprintfElementContent xmlSnprintfElementContent failed to correctly check the available buffer space in two locations. Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048). Thanks to Marcel Böhme and Thuan Pham for the report.
static void snd_usbmidi_out_tasklet(unsigned long data) { struct snd_usb_midi_out_endpoint *ep = (struct snd_usb_midi_out_endpoint *) data; snd_usbmidi_do_output(ep); }
0
[ "CWE-703" ]
linux
07d86ca93db7e5cdf4743564d98292042ec21af7
325,772,162,978,318,520,000,000,000,000,000,000,000
7
ALSA: usb-audio: avoid freeing umidi object twice The 'umidi' object will be free'd on the error path by snd_usbmidi_free() when tearing down the rawmidi interface. So we shouldn't try to free it in snd_usbmidi_create() after having registered the rawmidi interface. Found by KASAN. Signed-off-by: Andrey Konovalov <a...
static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) { int err; struct net_device *dev = __dev_get_by_name(net, ifr->ifr_name); const struct net_device_ops *ops; if (!dev) return -ENODEV; ops = dev->netdev_ops; switch (cmd) { case SIOCSIFFLAGS: /* Set interface flags */ return dev_c...
0
[ "CWE-264" ]
linux
8909c9ad8ff03611c9c96c9a92656213e4bb495b
157,273,134,996,066,000,000,000,000,000,000,000,000
99
net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are limited to /lib/modules/**. However, CAP_NET_ADMIN...
static void econet_hw_initialise(void) { dev_add_pack(&econet_packet_type); }
0
[ "CWE-200" ]
linux-2.6
80922bbb12a105f858a8f0abb879cb4302d0ecaa
111,219,171,434,214,500,000,000,000,000,000,000,000
4
econet: Fix econet_getname() leak econet_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
GF_Err clef_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_ApertureBox *ptr = (GF_ApertureBox *)s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->width); gf_bs_write_u32(bs, ptr->height); return GF_OK; }
0
[ "CWE-476" ]
gpac
6170024568f4dda310e98ef7508477b425c58d09
167,692,066,767,028,320,000,000,000,000,000,000,000
11
fixed potential crash - cf #1263
process_log_prefix_padding(const char *p, int *ppadding) { int paddingsign = 1; int padding = 0; if (*p == '-') { p++; if (*p == '\0') /* Did the buf end in %- ? */ return NULL; paddingsign = -1; } /* generate an int version of the numerical string */ while (*p >= '0' && *p <= '9') padding = ...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
231,178,524,363,294,600,000,000,000,000,000,000,000
26
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
fill5 (unsigned short data[/*n*/], int n) { for (int i = 0; i < n; ++i) data[i] = 0; int j = 0, k = 0; for (int i = 0; i < n; ++i) { data[i] = j; j = j + k; k = k + 1; if (j > USHRT_MAX) break; } }
0
[ "CWE-190" ]
openexr
51a92d67f53c08230734e74564c807043cbfe41e
161,633,878,137,050,420,000,000,000,000,000,000,000
17
check for valid Huf code lengths (#849) * check for valid Huf code lengths * test non-fast huf decoder in testHuf Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
void Inspect::operator()(Wrapped_Selector_Ptr s) { if (s->name() == " ") { append_string(""); } else { bool was = in_wrapped; in_wrapped = true; append_token(s->name(), s); append_string("("); bool was_comma_array = in_comma_array; in_comma_array = false; s->s...
0
[ "CWE-476" ]
libsass
38f4c3699d06b64128bebc7cf1e8b3125be74dc4
217,177,780,915,601,200,000,000,000,000,000,000,000
17
Fix possible bug with handling empty reference combinators Fixes #2665
format_WRITE_ACTIONS(const struct ofpact_nest *a, struct ds *s) { ds_put_format(s, "%swrite_actions(%s", colors.paren, colors.end); ofpacts_format(a->actions, ofpact_nest_get_action_len(a), s); ds_put_format(s, "%s)%s", colors.paren, colors.end); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
159,871,295,423,201,000,000,000,000,000,000,000,000
6
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>
free_res_descriptor(RES_DESCRIPTOR * rd) { RES_DESCRIPTOR *nxt; if (rd == NULL) return; nxt = rd->next; if (rd->name != NULL) free(rd->name); free(rd); free_res_descriptor(nxt); // tail recursive }
0
[ "CWE-190", "CWE-284" ]
sleuthkit
114cd3d0aac8bd1aeaf4b33840feb0163d342d5b
315,714,503,279,416,220,000,000,000,000,000,000,000
12
hfs: fix keylen check in hfs_cat_traverse() If key->key_len is 65535, calculating "uint16_t keylen' would cause an overflow: uint16_t keylen; ... keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len) so the code bypasses the sanity check "if (keylen > nodesize)" which results in crash later: ./too...
ofputil_queue_stats_from_ofp11(struct ofputil_queue_stats *oqs, const struct ofp11_queue_stats *qs11) { enum ofperr error; error = ofputil_port_from_ofp11(qs11->port_no, &oqs->port_no); if (error) { return error; } oqs->queue_id = ntohl(qs11->queue_id); o...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
156,784,323,161,945,440,000,000,000,000,000,000,000
18
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
int connect_n_handle_errors(struct st_command *command, MYSQL* con, const char* host, const char* user, const char* pass, const char* db, int port, const char* sock) { DYNAMIC_STRING *ds; int failed_attempts= 0; ds= &ds_res; /...
0
[ "CWE-319" ]
mysql-server
060b1eadf4913f7066484ea34ec62feead1bca44
327,645,186,738,971,600,000,000,000,000,000,000,000
89
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99)
void vmx_update_exception_bitmap(struct kvm_vcpu *vcpu) { u32 eb; eb = (1u << PF_VECTOR) | (1u << UD_VECTOR) | (1u << MC_VECTOR) | (1u << DB_VECTOR) | (1u << AC_VECTOR); /* * Guest access to VMware backdoor ports could legitimately * trigger #GP because of TSS I/O permission bitmap. * We intercept those...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
125,006,798,254,804,880,000,000,000,000,000,000,000
58
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
static int read_off64(off_t *var, unsigned char *mem, struct mspack_system *sys, struct mspack_file *fh) { #ifdef LARGEFILE_SUPPORT *var = EndGetI64(mem); #else *var = EndGetI32(mem); if ((*var & 0x80000000) || EndGetI32(mem+4)) { sys->message(fh, (char *)largefile_msg); return 1; } #endif ...
0
[ "CWE-20", "CWE-193", "CWE-682" ]
libmspack
72e70a921f0f07fee748aec2274b30784e1d312a
46,657,577,938,378,610,000,000,000,000,000,000,000
14
Fix off-by-one bounds check on CHM PMGI/PMGL chunk numbers and reject empty filenames. Thanks to Hanno Böck for reporting
int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr) { struct iscsi_param *param = NULL; struct iscsi_param_list *pl; pl = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL); if (!pl) { pr_err("Unable to allocate memory for" " struct iscsi_param_list.\n"); return -1 ; } INIT_LIST_H...
0
[ "CWE-119" ]
target-pending
cea4dcfdad926a27a18e188720efe0f2c9403456
78,279,413,487,667,670,000,000,000,000,000,000,000
237
iscsi-target: fix heap buffer overflow on error If a key was larger than 64 bytes, as checked by iscsi_check_key(), the error response packet, generated by iscsi_add_notunderstood_response(), would still attempt to copy the entire key into the packet, overflowing the structure on the heap. Remote preauthentication ke...
struct tevent_req *smbXcli_conn_samba_suicide_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct smbXcli_conn *conn, uint8_t exitcode) { struct tevent_req *req, *subreq; struct smbXcli_conn_samba_suicide_state *state; req = tevent_req_create(mem_ctx, &state, struct smbXcli_co...
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
301,745,563,592,383,040,000,000,000,000,000,000,000
46
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
int phar_get_archive(phar_archive_data **archive, char *fname, int fname_len, char *alias, int alias_len, char **error) /* {{{ */ { phar_archive_data *fd, *fd_ptr; char *my_realpath, *save; int save_len; phar_request_initialize(); if (error) { *error = NULL; } *archive = NULL; if (PHAR_G(last_phar) && fna...
0
[ "CWE-119", "CWE-787" ]
php-src
0bfb970f43acd1e81d11be1154805f86655f15d5
228,938,742,934,402,200,000,000,000,000,000,000,000
199
Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile (cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2)
static int test_sm2_crypt(const EC_GROUP *group, const EVP_MD *digest, const char *privkey_hex, const char *message, const char *k_hex, const char *ctext_hex) { const size_t msg_len = strlen(message); BIGNUM ...
1
[ "CWE-120" ]
openssl
59f5e75f3bced8fc0e130d72a3f582cf7b480b46
170,789,511,176,849,380,000,000,000,000,000,000,000
71
Correctly calculate the length of SM2 plaintext given the ciphertext Previously the length of the SM2 plaintext could be incorrectly calculated. The plaintext length was calculated by taking the ciphertext length and taking off an "overhead" value. The overhead value was assumed to have a "fixed" element of 10 bytes....
MagickExport DrawInfo *CloneDrawInfo(const ImageInfo *image_info, const DrawInfo *draw_info) { DrawInfo *clone_info; ExceptionInfo *exception; clone_info=(DrawInfo *) AcquireCriticalMemory(sizeof(*clone_info)); GetDrawInfo(image_info,clone_info); if (draw_info == (DrawInfo *) NULL) return(clon...
0
[ "CWE-416" ]
ImageMagick
ecf7c6b288e11e7e7f75387c5e9e93e423b98397
226,440,485,544,557,670,000,000,000,000,000,000,000
115
...
copy_move_file (CopyMoveJob *copy_job, GFile *src, GFile *dest_dir, gboolean same_fs, gboolean unique_names, char **dest_fs_type, SourceInfo *source_info, TransferInfo *transfer_info, GHashTable *debuting_files, GdkPoint *position, gboolean overwrite, gboolean *skipped_file, gboolean readonly_so...
0
[]
nautilus
a0f7bb5f2e9af8ecb463b13da834fa8559b0a481
43,974,503,431,672,965,000,000,000,000,000,000,000
434
Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop 2009-02-25 Alexander Larsson <alexl@redhat.com> * src/nautilus-application.c: Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop file trust operation. * libnautilus-private/nautilus-file-utilities.[ch]: Ad...
void reds_on_main_agent_tokens(RedsState *reds, MainChannelClient *mcc, uint32_t num_tokens) { RedClient *client = mcc->get_client(); if (!reds->vdagent) { return; } spice_assert(reds->vdagent->st); reds->vdagent->st->send_to_client_tokens_add((RedCharDeviceClientOpaque *)client, ...
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
151,127,913,932,684,770,000,000,000,000,000,000,000
10
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static boost::optional<ceph::bufferlist> as_binary(const std::string& s) { // In a just world ceph::bufferlist base64; // I could populate a bufferlist base64.push_back(buffer::create_static( s.length(), const_cast<char*>(s.data()))); // Yuck // From a base64 encoded std::string....
0
[ "CWE-617" ]
ceph
b3118cabb8060a8cc6a01c4e8264cb18e7b1745a
248,748,032,446,503,900,000,000,000,000,000,000,000
17
rgw: Remove assertions in IAM Policy A couple of them could be triggered by user input. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
static void php_openssl_csr_free(zend_resource *rsrc) { X509_REQ * csr = (X509_REQ*)rsrc->ptr; X509_REQ_free(csr); }
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
203,588,433,657,896,300,000,000,000,000,000,000,000
5
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
struct net_device *ax25_fwd_dev(struct net_device *dev) { ax25_dev *ax25_dev; if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) return dev; if (ax25_dev->forward == NULL) return dev; return ax25_dev->forward; }
0
[ "CWE-416" ]
linux
d01ffb9eee4af165d83b08dd73ebdf9fe94a519b
69,638,733,883,844,310,000,000,000,000,000,000,000
12
ax25: add refcount in ax25_dev to avoid UAF bugs If we dereference ax25_dev after we call kfree(ax25_dev) in ax25_dev_device_down(), it will lead to concurrency UAF bugs. There are eight syscall functions suffer from UAF bugs, include ax25_bind(), ax25_release(), ax25_connect(), ax25_ioctl(), ax25_getname(), ax25_send...
nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_remove *remove) { __be32 status; if (opens_in_grace(SVC_NET(rqstp))) return nfserr_grace; status = nfsd_unlink(rqstp, &cstate->current_fh, 0, remove->rm_name, remove->rm_namelen); if (!status) { fh_unlock(&csta...
0
[ "CWE-20", "CWE-129" ]
linux
b550a32e60a4941994b437a8d662432a486235a5
163,217,692,943,797,920,000,000,000,000,000,000,000
15
nfsd: fix undefined behavior in nfsd4_layout_verify UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34 shift exponent 128 is too large for 32-bit type 'int' Depending on compiler+architecture, this may cause the check for layout_type to succeed for overly large values (which seems to be the case with amd64)...
char *replace_cntrl_chars(const char *str, char c) { assert(str); char *rv = strdup(str); if (!rv) errExit("strdup"); do_replace_cntrl_chars(rv, c); return rv; }
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
254,848,922,417,056,300,000,000,000,000,000,000,000
10
fixing CVE-2022-31214
parser_error_to_string (parser_error_t error) /**< error code */ { switch (error) { case PARSER_ERR_OUT_OF_MEMORY: { return "Out of memory"; } case PARSER_ERR_LITERAL_LIMIT_REACHED: { return "Maximum number of literals reached"; } case PARSER_ERR_SCOPE_STACK_LIMIT_REACHED: ...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
150,189,925,865,448,000,000,000,000,000,000,000,000
523
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static double mp_complex_pow_ss(_cimg_math_parser& mp) { const double val1 = _mp_arg(2), val2 = _mp_arg(3); double *ptrd = &_mp_arg(1) + 1; _mp_complex_pow(val1,0,val2,0,ptrd); return cimg::type<double>::nan();
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
223,622,214,062,601,600,000,000,000,000,000,000,000
6
Fix other issues in 'CImg<T>::load_bmp()'.
nautilus_file_invalidate_extension_info_internal (NautilusFile *file) { if (file->details->pending_info_providers) eel_g_object_list_free (file->details->pending_info_providers); file->details->pending_info_providers = nautilus_module_get_extensions_for_type (NAUTILUS_TYPE_INFO_PROVIDER); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
300,588,645,154,939,730,000,000,000,000,000,000,000
8
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static void sock_inuse_add(struct net *net, int val) { }
0
[]
net
35306eb23814444bd4021f8a1c3047d3cb0c8b2b
269,095,136,614,083,230,000,000,000,000,000,000,000
3
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred. In order to fix this issue, this patch adds a new spinlock that needs to be used whenever these fields are read o...
static int blosc_c(struct thread_context* thread_context, int32_t bsize, int32_t leftoverblock, int32_t ntbytes, int32_t destsize, const uint8_t* src, const int32_t offset, uint8_t* dest, uint8_t* tmp, uint8_t* tmp2) { blosc2_context* context = thread_context->...
0
[ "CWE-787" ]
c-blosc2
c4c6470e88210afc95262c8b9fcc27e30ca043ee
111,230,234,594,530,950,000,000,000,000,000,000,000
174
Fixed asan heap buffer overflow when not enough space to write compressed block size.
static MagickBooleanType WritePSDImage(const ImageInfo *image_info, Image *image,ExceptionInfo *exception) { const char *property; const StringInfo *icc_profile; Image *base_image, *next_image; MagickBooleanType status; PSDInfo psd_info; register ssize_t i; size_t c...
0
[ "CWE-125" ]
ImageMagick
5f16640725b1225e6337c62526e6577f0f88edb8
270,859,039,718,921,280,000,000,000,000,000,000,000
346
Fixed head buffer overflow reported in: https://github.com/ImageMagick/ImageMagick/issues/98
static void addrconf_sysctl_unregister(struct inet6_dev *idev) { __addrconf_sysctl_unregister(&idev->cnf); neigh_sysctl_unregister(idev->nd_parms); }
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
56,931,985,425,026,390,000,000,000,000,000,000,000
5
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
void Server::msgContextAction(ServerUser *uSource, MumbleProto::ContextAction &msg) { MSG_SETUP(ServerUser::Authenticated); unsigned int session = msg.has_session() ? msg.session() : 0; int id = msg.has_channel_id() ? static_cast<int>(msg.channel_id()) : -1; if (session && ! qhUsers.contains(session)) return; ...
0
[ "CWE-20" ]
mumble
6b33dda344f89e5a039b7d79eb43925040654242
212,763,805,975,432,420,000,000,000,000,000,000,000
12
Don't crash on long usernames
static struct hog_device *hog_device_new(struct btd_device *device) { struct hog_device *dev; dev = new0(struct hog_device, 1); dev->device = btd_device_ref(device); if (!devices) devices = queue_new(); queue_push_tail(devices, dev); return dev; }
0
[]
bluez
8cdbd3b09f29da29374e2f83369df24228da0ad1
113,278,190,430,900,560,000,000,000,000,000,000,000
14
HOGP must only accept data from bonded devices. HOGP 1.0 Section 6.1 establishes that the HOGP must require bonding. Reference: https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.htm
Gets the ACL for a given mailbox */ PHP_FUNCTION(imap_getacl) { zval *streamind; zend_string *mailbox; pils *imap_le_struct; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS", &streamind, &mailbox) == FAILURE) { return; } if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) =...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
137,102,840,013,623,100,000,000,000,000,000,000,000
29
Disable rsh/ssh functionality in imap by default (bug #77153)
static bool r_bin_mdmp_init_hdr(struct r_bin_mdmp_obj *obj) { obj->hdr = R_NEW (struct minidump_header); if (!obj->hdr) { return false; } read_hdr (obj->b, obj->hdr); if (obj->hdr->number_of_streams == 0) { eprintf ("[WARN] No streams present!\n"); return false; } if (obj->hdr->stream_directory_rva < siz...
0
[ "CWE-400", "CWE-703" ]
radare2
27fe8031782d3a06c3998eaa94354867864f9f1b
38,724,268,490,136,690,000,000,000,000,000,000,000
32
Fix DoS in the minidump parser ##crash * Reported by lazymio via huntr.dev * Reproducer: mdmp-dos
static struct root_domain *alloc_rootdomain(void) { struct root_domain *rd; rd = kmalloc(sizeof(*rd), GFP_KERNEL); if (!rd) return NULL; init_rootdomain(rd); return rd; }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
330,809,661,447,748,430,000,000,000,000,000,000,000
12
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
static int resolveOrderByTermToExprList( Parse *pParse, /* Parsing context for error messages */ Select *pSelect, /* The SELECT statement with the ORDER BY clause */ Expr *pE /* The specific ORDER BY term */ ){ int i; /* Loop counter */ ExprList *pEList; /* The columns of the resu...
0
[ "CWE-416" ]
sqlite
4ded26a53c4df312e9fd06facbbf70377e969983
198,672,551,288,963,940,000,000,000,000,000,000,000
43
Prevent aliases of window functions expressions from being used as arguments to aggregate or other window functions. FossilOrigin-Name: 1e16d3e8fc60d39ca3899759ff15d355fdd7d3e23b325d8d2b0f954e11ce8dce
DataBuf PngChunk::parseTXTChunk(const DataBuf& data, int keysize, TxtChunkType type) { DataBuf arr; if(type == zTXt_Chunk) { // Extract a deflate compressed Latin-1 text chunk /...
1
[ "CWE-125" ]
exiv2
35b3e596edacd2437c2c5d3dd2b5c9502626163d
253,459,434,779,449,440,000,000,000,000,000,000,000
106
Add overflow & overread checks to PngChunk::parseTXTChunk() This function was creating a lot of new pointers and strings without properly checking the array bounds. This commit adds several calls to enforce(), making sure that the pointers stay within bounds. Strings are now created using the helper function string_fr...
static bool pmc_overflow(unsigned long val) { if ((int)val < 0) return true; return false; }
0
[ "CWE-476" ]
linux
60b7ed54a41b550d50caf7f2418db4a7e75b5bdc
102,320,273,277,261,010,000,000,000,000,000,000,000
7
powerpc/perf: Fix crash in perf_instruction_pointer() when ppmu is not set On systems without any specific PMU driver support registered, running perf record causes Oops. The relevant portion from call trace: BUG: Kernel NULL pointer dereference on read at 0x00000040 Faulting instruction address: 0xc0021f0c Oo...
static int mton(uint32_t mask) { int i = 0; mask = ntohl(mask); /* 111110000-like bit pattern */ while (mask) { i++; mask <<= 1; } return i; }
0
[ "CWE-20" ]
busybox
7280d2017d8075267a12e469983e38277dcf0374
229,814,054,172,217,240,000,000,000,000,000,000,000
10
udhcpc: sanitize hostnames in incoming packets. Closes 3979. The following options are replaced with string "bad" if they contain malformed hostname: HOST_NAME, DOMAIN_NAME, NIS_DOMAIN, TFTP_SERVER_NAME function old new delta xmalloc_optname_optval ...
} static bool is_nan(const float val) { #ifdef isnan return (bool)isnan(val); #else return !(val==val); #endif
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
223,101,967,338,477,480,000,000,000,000,000,000,000
7
Fix other issues in 'CImg<T>::load_bmp()'.
static BOOL video_onMappedGeometryUpdate(MAPPED_GEOMETRY* geometry) { PresentationContext* presentation = (PresentationContext*)geometry->custom; RDP_RECT* r = &geometry->geometry.boundingRect; WLog_DBG(TAG, "geometry updated topGeom=(%d,%d-%dx%d) geom=(%d,%d-%dx%d) rects=(%d,%d-%dx%d)", geometry->topLevel...
0
[ "CWE-190" ]
FreeRDP
06c32f170093a6ecde93e3bc07fed6a706bfbeb3
259,882,948,403,808,070,000,000,000,000,000,000,000
19
Fixed int overflow in PresentationContext_new Thanks to hac425 CVE-2020-11038
const Type_handler *real_type_handler() const { if (field->is_created_from_null_item) return &type_handler_null; return field->type_handler(); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
62,089,774,209,800,030,000,000,000,000,000,000,000
6
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
gdm_session_worker_set_server_address (GdmSessionWorker *worker, const char *address) { g_free (worker->priv->server_address); worker->priv->server_address = g_strdup (address); }
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
40,085,876,265,512,605,000,000,000,000,000,000,000
6
Store the face and dmrc files in a cache. Refer to bug #565151.
void safe_connect(MYSQL* mysql, const char *name, const char *host, const char *user, const char *pass, const char *db, int port, const char *sock) { int failed_attempts= 0; DBUG_ENTER("safe_connect"); verbose_msg("Connecting to server %s:%d (socket %s) as '%s'" ...
1
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
51,572,565,378,482,120,000,000,000,000,000,000,000
52
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
static void virtnet_set_rx_mode(struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); struct scatterlist sg[2]; u8 promisc, allmulti; struct virtio_net_ctrl_mac *mac_data; struct netdev_hw_addr *ha; int uc_count; int mc_count; void *buf; int i; /* We can't dynamically set ndo_set_rx_mode, so ...
0
[ "CWE-119", "CWE-787" ]
linux
48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
185,396,807,739,424,100,000,000,000,000,000,000,000
70
virtio-net: drop NETIF_F_FRAGLIST virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRA...
PHP_FUNCTION(imageinterlace) { zval *IM; int argc = ZEND_NUM_ARGS(); zend_long INT = 0; gdImagePtr im; if (zend_parse_parameters(argc, "r|l", &IM, &INT) == FAILURE) { return; } if ((im = (gdImagePtr)zend_fetch_resource(Z_RES_P(IM), "Image", le_gd)) == NULL) { RETURN_FALSE; } if (argc > 1) { gdImageInt...
0
[ "CWE-787" ]
php-src
28022c9b1fd937436ab67bb3d61f652c108baf96
8,002,705,685,638,008,000,000,000,000,000,000,000
21
Fix bug#72697 - select_colors write out-of-bounds (cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4) Conflicts: ext/gd/gd.c
CURLcode Curl_http(struct connectdata *conn, bool *done) { struct SessionHandle *data = conn->data; CURLcode result = CURLE_OK; struct HTTP *http; const char *ppath = data->state.path; bool paste_ftp_userpwd = FALSE; char ftp_typecode[sizeof("/;type=?")] = ""; const char *host = conn->host.name; const c...
0
[ "CWE-284" ]
curl
79b9d5f1a42578f807a6c94914bc65cbaa304b6d
157,072,341,933,772,270,000,000,000,000,000,000,000
1,013
http_done: close Negotiate connections when done When doing HTTP requests Negotiate authenticated, the entire connnection may become authenticated and not just the specific HTTP request which is otherwise how HTTP works, as Negotiate can basically use NTLM under the hood. curl was not adhering to this fact but would a...
BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size) { _noLibzError(); return NULL; }
0
[ "CWE-20" ]
libgd
fe9ed49dafa993e3af96b6a5a589efeea9bfb36f
233,558,145,621,413,240,000,000,000,000,000,000,000
5
Fix DOS vulnerability in gdImageCreateFromGd2Ctx() We must not pretend that there are image data if there are none. Instead we fail reading the image file gracefully.
const std::string& serverName() const override { return server_name_; }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
326,573,390,255,477,800,000,000,000,000,000,000,000
1
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static bool rt_cache_valid(const struct rtable *rt) { return rt && rt->dst.obsolete == DST_OBSOLETE_FORCE_CHK && !rt_is_expired(rt); }
0
[ "CWE-17" ]
linux
df4d92549f23e1c037e83323aff58a21b3de7fe0
225,690,901,714,207,450,000,000,000,000,000,000,000
6
ipv4: try to cache dst_entries which would cause a redirect Not caching dst_entries which cause redirects could be exploited by hosts on the same subnet, causing a severe DoS attack. This effect aggravated since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()"). Lookups causing redirects will be allocated...
LUA_API int lua_isyieldable (lua_State *L) { return yieldable(L); }
0
[ "CWE-416", "CWE-125", "CWE-787" ]
lua
6298903e35217ab69c279056f925fb72900ce0b7
153,733,363,218,023,190,000,000,000,000,000,000,000
3
Keep minimum size when shrinking a stack When shrinking a stack (during GC), do not make it smaller than the initial stack size.
int __udp_disconnect(struct sock *sk, int flags) { struct inet_sock *inet = inet_sk(sk); /* * 1003.1g - break association. */ sk->sk_state = TCP_CLOSE; inet->inet_daddr = 0; inet->inet_dport = 0; sock_rps_reset_rxhash(sk); sk->sk_bound_dev_if = 0; if (!(sk->sk_userlocks & SOCK_BINDADDR_LOCK)) inet_reset_...
0
[ "CWE-362" ]
net
85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa
82,267,378,158,322,310,000,000,000,000,000,000,000
22
udp: consistently apply ufo or fragmentation When iteratively building a UDP datagram with MSG_MORE and that datagram exceeds MTU, consistently choose UFO or fragmentation. Once skb_is_gso, always apply ufo. Conversely, once a datagram is split across multiple skbs, do not consider ufo. Sendpage already maintains th...
struct mii_bus *mdiobus_alloc_size(size_t size) { struct mii_bus *bus; size_t aligned_size = ALIGN(sizeof(*bus), NETDEV_ALIGN); size_t alloc_size; int i; /* If we alloc extra space, it should be aligned */ if (size) alloc_size = aligned_size + size; else alloc_size = sizeof(*bus); bus = kzalloc(alloc_size...
0
[ "CWE-416" ]
linux
6ff7b060535e87c2ae14dd8548512abfdda528fb
56,646,964,097,454,610,000,000,000,000,000,000,000
27
mdio_bus: Fix use-after-free on device_register fails KASAN has found use-after-free in fixed_mdio_bus_init, commit 0c692d07842a ("drivers/net/phy/mdio_bus.c: call put_device on device_register() failure") call put_device() while device_register() fails,give up the last reference to the device and allow mdiobus_releas...
bool Item_func_set_user_var::register_field_in_read_map(void *arg) { if (result_field) { TABLE *table= (TABLE *) arg; if (result_field->table == table || !table) bitmap_set_bit(result_field->table->read_set, result_field->field_index); if (result_field->vcol_info) return result_field->vcol_i...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
23,213,361,861,186,524,000,000,000,000,000,000,000
13
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static PHP_FUNCTION(preg_match_all) { php_do_pcre_match(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); }
0
[ "CWE-119" ]
php-src
c351b47ce85a3a147cfa801fa9f0149ab4160834
81,946,884,182,769,770,000,000,000,000,000,000,000
4
Initialize the offset table - PCRE may sometimes miss offsets
PJ_DEF(pj_status_t) pjsip_dlg_set_via_sent_by( pjsip_dialog *dlg, pjsip_host_port *via_addr, pjsip_transport *via_tp) { PJ_ASSERT_RETURN(dlg, PJ_EINVAL); if (!via_addr) pj_bzero(&dlg->via_addr, sizeof(dlg->via_addr)); else { ...
0
[ "CWE-297", "CWE-295" ]
pjproject
67e46c1ac45ad784db5b9080f5ed8b133c122872
49,586,437,314,602,420,000,000,000,000,000,000,000
17
Merge pull request from GHSA-8hcp-hm38-mfph * Check hostname during TLS transport selection * revision based on feedback * remove the code in create_request that has been moved
HttpTransact::client_result_stat(State* s, ink_hrtime total_time, ink_hrtime request_process_time) { ClientTransactionResult_t client_transaction_result = CLIENT_TRANSACTION_RESULT_UNDEFINED; /////////////////////////////////////////////////////// // don't count errors we generated as hits or misses // ///////...
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
136,100,934,809,183,390,000,000,000,000,000,000,000
200
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
static double mp_list_set_Joff_s(_cimg_math_parser& mp) { if (!mp.imglist.width()) return cimg::type<double>::nan(); const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()); CImg<T> &img = mp.imglist[ind]; const int ox = (int)mp.mem[_cimg_mp_s...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
304,211,128,670,847,770,000,000,000,000,000,000,000
17
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
finish_xact_command(void) { if (xact_started) { /* Cancel any active statement timeout before committing */ disable_timeout(STATEMENT_TIMEOUT, false); /* Now commit the command */ ereport(DEBUG3, (errmsg_internal("CommitTransactionCommand"))); CommitTransactionCommand(); #ifdef MEMORY_CONTEXT_CHECKIN...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
116,737,998,159,927,600,000,000,000,000,000,000,000
27
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
static struct v4l2_loopback_device *v4l2loopback_cd2dev(struct device *cd) { struct video_device *loopdev = to_video_device(cd); struct v4l2loopback_private *ptr = (struct v4l2loopback_private *)video_get_drvdata(loopdev); int nr = ptr->devicenr; if (nr < 0 || nr >= devices) { printk(KERN_ERR "v4l2-loopback: i...
0
[ "CWE-787" ]
v4l2loopback
64a216af4c09c9ba9326057d7e78994271827eff
186,630,523,245,161,750,000,000,000,000,000,000,000
13
add explicit format specifier to printf() invocations CWE-134
void MOADNSParser::init(const char *packet, unsigned int len) { if(len < sizeof(dnsheader)) throw MOADNSException("Packet shorter than minimal header"); memcpy(&d_header, packet, sizeof(dnsheader)); if(d_header.opcode != Opcode::Query && d_header.opcode != Opcode::Notify && d_header.opcode != Opcode::Upda...
0
[ "CWE-399" ]
pdns
adb10be102ddd4d2baf7a8adbb5673946fe5e555
118,459,132,568,345,430,000,000,000,000,000,000,000
91
fix forward reference-check in getLabelFromContent()
void Item_ref::print(String *str, enum_query_type query_type) { if (ref) { if ((*ref)->type() != Item::CACHE_ITEM && (*ref)->type() != Item::WINDOW_FUNC_ITEM && ref_type() != VIEW_REF && !table_name && name && alias_name_used) { THD *thd= current_thd; append_identifier(th...
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
286,345,736,793,831,750,000,000,000,000,000,000,000
19
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
static const char *vnc_auth_name(VncDisplay *vd) { switch (vd->auth) { case VNC_AUTH_INVALID: return "invalid"; case VNC_AUTH_NONE: return "none"; case VNC_AUTH_VNC: return "vnc"; case VNC_AUTH_RA2: return "ra2"; case VNC_AUTH_RA2NE: return "ra2ne"; ca...
0
[ "CWE-125" ]
qemu
bea60dd7679364493a0d7f5b54316c767cf894ef
302,811,837,233,903,220,000,000,000,000,000,000,000
50
ui/vnc: fix potential memory corruption issues this patch makes the VNC server work correctly if the server surface and the guest surface have different sizes. Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of VNC_DIRTY_PIXELS...
flatpak_dir_check_for_update (FlatpakDir *self, FlatpakRemoteState *state, FlatpakDecomposed *ref, const char *checksum_or_latest, const char **op...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
32,068,004,727,617,406,000,000,000,000,000,000,000
41
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
static int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type) { register struct sock *sk; struct hlist_node *node; int lm = 0; if (type != SCO_LINK && type != ESCO_LINK) return -EINVAL; BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr)); /* Find listening sockets */ read_lock(&sco_sk_...
0
[ "CWE-200" ]
linux
c4c896e1471aec3b004a693c689f60be3b17ac86
3,799,527,688,980,741,000,000,000,000,000,000,000
27
Bluetooth: sco: fix information leak to userspace struct sco_conninfo has one padding byte in the end. Local variable cinfo of type sco_conninfo is copied to userspace with this uninizialized one byte, leading to old stack contents leak. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. ...
static int git_proxy_command_options(const char *var, const char *value, void *cb) { if (!strcmp(var, "core.gitproxy")) { const char *for_pos; int matchlen = -1; int hostlen; const char *rhost_name = cb; int rhost_len = strlen(rhost_name); if (git_proxy_command) return 0; if (!value) return conf...
0
[ "CWE-706" ]
git
f82a97eb9197c1e3768e72648f37ce0ca3233734
294,973,039,071,786,400,000,000,000,000,000,000,000
49
mingw: handle `subst`-ed "DOS drives" Over a decade ago, in 25fe217b86c (Windows: Treat Windows style path names., 2008-03-05), Git was taught to handle absolute Windows paths, i.e. paths that start with a drive letter and a colon. Unbeknownst to us, while drive letters of physical drives are limited to letters of th...
gs_currentdefaultcmykicc(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = DEFAULT_CMYK_ICC; if (pgs->icc_manager->default_cmyk == NULL) { pval->data = (const byte *) rfs; pval->persistent = true; } else { pval->data = (const byte *) (pgs->icc_manager->...
0
[]
ghostpdl
6d444c273da5499a4cd72f21cb6d4c9a5256807d
162,445,399,558,280,310,000,000,000,000,000,000,000
13
Bug 697178: Add a file permissions callback For the rare occasions when the graphics library directly opens a file (currently for reading), this allows us to apply any restrictions on file access normally applied in the interpteter.
DeployPkg_DeployPackageFromFile(const char* file) { int retStatus; sLog(log_info, "Initializing deployment module. \n"); Init(); sLog(log_info, "Deploying cabinet file %s. \n", file); retStatus = Deploy(file); if (retStatus != DEPLOY_SUCCESS) { sLog(log_error, "Deploy error: %s \n", GetDeploy...
0
[ "CWE-362" ]
open-vm-tools
c1304ce8bfd9c0c33999e496bf7049d5c3d45821
323,719,062,321,612,600,000,000,000,000,000,000,000
19
randomly generate tmp directory name, and add StrUtil_ReplaceAll() function.
static CCPrepare gen_prepare_eflags_p(DisasContext *s, TCGv reg) { gen_compute_eflags(s); return (CCPrepare) { .cond = TCG_COND_NE, .reg = cpu_cc_src, .mask = CC_P }; }
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
169,879,835,147,465,180,000,000,000,000,000,000,000
6
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
int LibRaw_buffer_datastream::scanf_one(const char *fmt, void* val) { if(substream) return substream->scanf_one(fmt,val); int scanf_res; if(streampos>streamsize) return 0; #ifndef WIN32SECURECALLS scanf_res = sscanf((char*)(buf+streampos),fmt,val); #else scanf_res = sscanf_s((char*)(buf+streampos),...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
331,283,047,590,125,180,000,000,000,000,000,000,000
27
cumulated data checks patch
static int check_vmentry_prereqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { struct vcpu_vmx *vmx = to_vmx(vcpu); if (vmcs12->guest_activity_state != GUEST_ACTIVITY_ACTIVE && vmcs12->guest_activity_state != GUEST_ACTIVITY_HLT) return VMXERR_ENTRY_INVALID_CONTROL_FIELD; if (nested_vmx_check_io_bitmap_con...
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
104,004,132,508,482,400,000,000,000,000,000,000,000
66
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ The value of the guest_irq argument to vmx_update_pi_irte() is ultimately coming from a KVM_IRQFD API call. Do not BUG() in vmx_update_pi_irte() if the value is out-of bounds. (Especially, since KVM as a whole seems to hang after that.) Instead, print a message only o...
static void floppy_rb0_cb(struct bio *bio) { struct rb0_cbdata *cbdata = (struct rb0_cbdata *)bio->bi_private; int drive = cbdata->drive; if (bio->bi_status) { pr_info("floppy: error %d while reading block 0\n", bio->bi_status); set_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags); } complete(&cbdata->complete);...
0
[ "CWE-190", "CWE-125" ]
linux
da99466ac243f15fbba65bd261bfc75ffa1532b6
30,292,326,888,704,290,000,000,000,000,000,000,000
12
floppy: fix out-of-bounds read in copy_buffer This fixes a global out-of-bounds read access in the copy_buffer function of the floppy driver. The FDDEFPRM ioctl allows one to set the geometry of a disk. The sect and head fields (unsigned int) of the floppy_drive structure are used to compute the max_sector (int) in ...
g_NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason) { if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; if (plugin_funcs.destroystream == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; if (stream == NULL) return NPERR_INVALID_PARAM; D(bugiI("NPP_DestroyStream instance=%p, stream=%p,...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
275,480,186,786,823,250,000,000,000,000,000,000,000
27
Support all the new variables added
static void __init __map_region(efi_memory_desc_t *md, u64 va) { unsigned long flags = _PAGE_RW; unsigned long pfn; pgd_t *pgd = efi_mm.pgd; if (!(md->attribute & EFI_MEMORY_WB)) flags |= _PAGE_PCD; if (sev_active() && md->type != EFI_MEMORY_MAPPED_IO) flags |= _PAGE_ENC; pfn = md->phys_addr >> PAGE_SHIFT;...
0
[ "CWE-388" ]
tip
4e78921ba4dd0aca1cc89168f45039add4183f8e
298,520,927,691,154,260,000,000,000,000,000,000,000
17
efi/x86/Add missing error handling to old_memmap 1:1 mapping code The old_memmap flow in efi_call_phys_prolog() performs numerous memory allocations, and either does not check for failure at all, or it does but fails to propagate it back to the caller, which may end up calling into the firmware with an incomplete 1:1 ...
TEST_F(HttpConnectionManagerImplTest, FilterAddBodyContinuation) { InSequence s; setup(false, ""); EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> Http::Status { RequestDecoder* decoder = &conn_manager_->newStream(response_encoder_); RequestHeaderMapPtr headers{ new Te...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
293,416,431,151,005,650,000,000,000,000,000,000,000
52
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
DataWriterListener* DataWriterImpl::get_listener_for( const StatusMask& status) { if (listener_ != nullptr && user_datawriter_->get_status_mask().is_active(status)) { return listener_; } return publisher_->get_listener_for(status); }
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
186,040,479,499,383,120,000,000,000,000,000,000,000
10
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
get_pfxmatch( char ** s, struct masks *m ) { while (m->name) { if (strncmp(*s, m->name, strlen(m->name)) == 0) { *s += strlen(m->name); return m->mask; } else { m++; } } return 0; }
0
[ "CWE-20" ]
ntp
52e977d79a0c4ace997e5c74af429844da2f27be
117,358,845,803,368,420,000,000,000,000,000,000,000
15
[Bug 1773] openssl not detected during ./configure. [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
**/ CImg<T>& sinh() { if (is_empty()) return *this; cimg_pragma_openmp(parallel for cimg_openmp_if(size()>=2048)) cimg_rof(*this,ptrd,T) *ptrd = (T)std::sinh((double)*ptrd); return *this;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
178,109,755,406,045,770,000,000,000,000,000,000,000
6
Fix other issues in 'CImg<T>::load_bmp()'.
static void fts3CursorFinalizeStmt(Fts3Cursor *pCsr){ if( pCsr->bSeekStmt ){ Fts3Table *p = (Fts3Table *)pCsr->base.pVtab; if( p->pSeekStmt==0 ){ p->pSeekStmt = pCsr->pStmt; sqlite3_reset(pCsr->pStmt); pCsr->pStmt = 0; } pCsr->bSeekStmt = 0; } sqlite3_finalize(pCsr->pStmt); }
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
184,239,028,486,496,200,000,000,000,000,000,000,000
12
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
void xen_blkbk_unmap_purged_grants(struct work_struct *work) { struct gnttab_unmap_grant_ref unmap[BLKIF_MAX_SEGMENTS_PER_REQUEST]; struct page *pages[BLKIF_MAX_SEGMENTS_PER_REQUEST]; struct persistent_gnt *persistent_gnt; int segs_to_unmap = 0; struct xen_blkif_ring *ring = container_of(work, typeof(*ring), persi...
0
[ "CWE-200" ]
linux
089bc0143f489bd3a4578bdff5f4ca68fb26f341
232,674,037,311,240,240,000,000,000,000,000,000,000
40
xen-blkback: don't leak stack data via response ring Rather than constructing a local structure instance on the stack, fill the fields directly on the shared ring, just like other backends do. Build on the fact that all response structure flavors are actually identical (the old code did make this assumption too). Thi...
jint InstanceKlass::get_cached_class_file_len() { return VM_RedefineClasses::get_cached_class_file_len(_cached_class_file); }
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
41,474,805,993,666,330,000,000,000,000,000,000,000
3
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
int ZEXPORT inflateEnd(strm) z_streamp strm; { struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (state->window != Z_NULL) ZFREE(strm, state->window); ZFREE(s...
0
[ "CWE-703", "CWE-189" ]
zlib
e54e1299404101a5a9d0cf5e45512b543967f958
16,545,438,006,997,812,000,000,000,000,000,000,000
13
Avoid shifts of negative values inflateMark(). The C standard says that bit shifts of negative integers is undefined. This casts to unsigned values to assure a known result.
bgp_attr_flush (struct attr *attr) { if (attr->aspath && ! attr->aspath->refcnt) aspath_free (attr->aspath); if (attr->community && ! attr->community->refcnt) community_free (attr->community); if (attr->extra) { struct attr_extra *attre = attr->extra; if (attre->ecommunity && ! attre->eco...
0
[]
quagga
8794e8d229dc9fe29ea31424883433d4880ef408
290,961,800,955,679,930,000,000,000,000,000,000,000
18
bgpd: Fix regression in args consolidation, total should be inited from args * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.