func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void pngwarn(png_struct *p, const char *s) { PF("Warning: %s: %s", (char *)png_get_error_ptr(p), s); }
0
[ "CWE-415", "CWE-787" ]
png2webp
8f21ad79b0cd98fc22d5b49734543101946abbff
10,816,426,467,036,443,000,000,000,000,000,000,000
3
v1.0.5: fix buffer overrun when reading bad WebPs
static int check_fsflags(unsigned int flags) { if (flags & ~(FS_IMMUTABLE_FL | FS_APPEND_FL | \ FS_NOATIME_FL | FS_NODUMP_FL | \ FS_SYNC_FL | FS_DIRSYNC_FL | \ FS_NOCOMP_FL | FS_COMPR_FL | FS_NOCOW_FL)) return -EOPNOTSUPP; if ((flags & FS_NOCOMP_FL) && (flags & FS_COMPR_FL)) retur...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
235,263,805,026,205,370,000,000,000,000,000,000,000
14
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
static int firm_close(struct usb_serial_port *port) { struct whiteheat_simple close_command; close_command.port = port->port_number + 1; return firm_send_command(port, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command)); }
0
[ "CWE-399" ]
linux
cbb4be652d374f64661137756b8f357a1827d6a4
275,764,273,742,263,070,000,000,000,000,000,000,000
8
USB: whiteheat: fix potential null-deref at probe Fix potential null-pointer dereference at probe by making sure that the required endpoints are present. The whiteheat driver assumes there are at least five pairs of bulk endpoints, of which the final pair is used for the "command port". An attempt to bind to an inter...
inline uint8_t* WireFormatLite::WriteUInt64ToArray( int field_number, const RepeatedField<uint64_t>& value, uint8_t* target) { return WritePrimitiveToArray(field_number, value, WriteUInt64ToArray, target); }
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
207,652,255,319,644,860,000,000,000,000,000,000,000
4
Apply patch
void HeaderMapImpl::HeaderEntryImpl::value(const char* value, uint32_t size) { value_.setCopy(value, size); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
121,489,110,631,113,050,000,000,000,000,000,000,000
3
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...
static struct pkg_envra *get_script_name(const char *cmdline, char **executable) { // TODO: we don't verify that python executable is not modified // or that python package is properly signed // (see CheckFingerprint/CheckHash below) /* Try to find package for the script by looking at argv[1]. * This will work...
0
[ "CWE-59" ]
abrt
fdf93685d4f3fc36fe50d34a11e24662c4cb2d8c
137,346,381,732,530,690,000,000,000,000,000,000,000
27
a-a-save-package-data: turn off reading data from root directories Making copies of files from arbitrary root directories is not secure. Related: #1211835 Signed-off-by: Jakub Filak <jfilak@redhat.com>
lib_file_open_search_with_no_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p, const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile, gx_io_device *iodev, bool starting_arg_file, char *fmode) { ...
0
[]
ghostpdl
0d3901189f245232f0161addf215d7268c4d05a3
306,940,636,326,469,600,000,000,000,000,000,000,000
33
Bug 699657: properly apply file permissions to .tempfile
static bool ossl_data_pending(const struct connectdata *conn, int connindex) { const struct ssl_connect_data *connssl = &conn->ssl[connindex]; if(connssl->backend->handle && SSL_pending(connssl->backend->handle)) return TRUE; #ifndef CURL_DISABLE_PROXY { const struct ssl_conn...
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
293,713,849,600,832,200,000,000,000,000,000,000,000
15
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static int xemaclite_mdio_wait(struct net_local *lp) { u32 val; /* wait for the MDIO interface to not be busy or timeout * after some time. */ return readx_poll_timeout(xemaclite_readl, lp->base_addr + XEL_MDIOCTRL_OFFSET, val, !(val & XEL_MDIOCTRL_MDIOSTS_MASK), 1000, 20000); }
0
[ "CWE-703", "CWE-824" ]
linux
d0d62baa7f505bd4c59cd169692ff07ec49dde37
196,453,721,938,034,400,000,000,000,000,000,000,000
12
net: xilinx_emaclite: Do not print real IOMEM pointer Printing kernel pointers is discouraged because they might leak kernel memory layout. This fixes smatch warning: drivers/net/ethernet/xilinx/xilinx_emaclite.c:1191 xemaclite_of_probe() warn: argument 4 to %08lX specifier is cast from pointer Signed-off-by: YueH...
NumberFormatTest::TestCurrencyParsing() { static const char* DATA[][6] = { // the data are: // locale, // currency amount to be formatted, // currency ISO code to be formatted, // format result using CURRENCYSTYLE, // format result using ISOCURRENCYSTYLE, // f...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
307,565,787,915,958,470,000,000,000,000,000,000,000
118
ICU-20246 Fixing another integer overflow in number parsing.
static void *rose_info_next(struct seq_file *seq, void *v, loff_t *pos) { ++*pos; return (v == SEQ_START_TOKEN) ? sk_head(&rose_list) : sk_next((struct sock *)v); }
0
[ "CWE-200" ]
linux-2.6
17ac2e9c58b69a1e25460a568eae1b0dc0188c25
110,448,364,601,192,060,000,000,000,000,000,000,000
7
rose: Fix rose_getname() leak rose_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>
bool pm_suspended_storage(void) { if ((gfp_allowed_mask & (__GFP_IO | __GFP_FS)) == (__GFP_IO | __GFP_FS)) return false; return true; }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
191,179,539,248,099,680,000,000,000,000,000,000,000
6
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
_hivex_get_children (hive_h *h, hive_node_h node, hive_node_h **children_ret, size_t **blocks_ret, int flags) { if (!IS_VALID_BLOCK (h, node) || !block_id_eq (h, node, "nk")) { SET_ERRNO (EINVAL, "invalid block or not an 'nk' block"); return -1; } struct ntreg_nk...
0
[ "CWE-400" ]
hivex
771728218dac2fbf6997a7e53225e75a4c6b7255
155,456,350,977,786,530,000,000,000,000,000,000,000
100
lib/node.c: Limit recursion in ri-records (CVE-2021-3622) Windows Registry hive "ri"-records are arbitrarily nested B-tree-like structures: +-------------+ | ri | |-------------| | nr_offsets | | offset[0] ------> points to another lf/lh/li/ri block | offset[1] ------> | offset[2] -----...
verify_dir_is_empty_or_create(char *dirname) { switch (pg_check_dir(dirname)) { case 0: /* * Does not exist, so create */ if (pg_mkdir_p(dirname, S_IRWXU) == -1) { fprintf(stderr, _("%s: could not create directory \"%s\": %s\n"), progname, dirname, strerror(errno)); disconnect_...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
270,233,881,555,739,360,000,000,000,000,000,000,000
44
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
dissect_kafka_expire_delegation_token_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { offset = dissect_kafka_bytes(tree, hf_kafka_token_hmac, tvb, pinfo, offset, api_version >= 2, NULL, NULL); offset = diss...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
196,663,867,790,928,560,000,000,000,000,000,000,000
13
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
rb_str_downcase_bang(VALUE str) { rb_encoding *enc; char *s, *send; int modify = 0; str_modify_keep_cr(str); enc = STR_ENC_GET(str); rb_str_check_dummy_enc(enc); s = RSTRING_PTR(str); send = RSTRING_END(str); if (single_byte_optimizable(str)) { while (s < send) { unsigned int c = ...
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
207,022,805,786,908,330,000,000,000,000,000,000,000
50
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static inline void apic_clear_isr(int vec, struct kvm_lapic *apic) { struct kvm_vcpu *vcpu; if (!__apic_test_and_clear_vector(vec, apic->regs + APIC_ISR)) return; vcpu = apic->vcpu; /* * We do get here for APIC virtualization enabled if the guest * uses the Hyper-V APIC enlightenment. In this case we may n...
0
[ "CWE-703", "CWE-459" ]
linux
f7d8a19f9a056a05c5c509fa65af472a322abfee
130,761,555,031,570,290,000,000,000,000,000,000,000
24
Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET" Revert a change to open code bits of kvm_lapic_set_base() when emulating APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base and apic_hw_disabled being unsyncrhonized when the APIC is created. If kvm_arch_vcpu_crea...
int r_jwe_advanced_parsen_json_str(jwe_t * jwe, const char * jwe_json_str, size_t jwe_json_str_len, uint32_t parse_flags, int x5u_flags) { json_t * jwe_json = NULL; int ret; jwe_json = json_loadb(jwe_json_str, jwe_json_str_len, JSON_DECODE_ANY, NULL); ret = r_jwe_advanced_parse_json_t(jwe, jwe_json, parse_flag...
0
[ "CWE-787" ]
rhonabwy
b4c2923a1ba4fabf9b55a89244127e153a3e549b
110,429,201,928,285,500,000,000,000,000,000,000,000
10
Fix buffer overflow on r_jwe_aesgcm_key_unwrap
static status ParseCues (AFfilehandle filehandle, AFvirtualfile *fp, uint32_t id, size_t size) { _Track *track; uint32_t markerCount; int i; track = _af_filehandle_get_track(filehandle, AF_DEFAULT_TRACK); af_read_uint32_le(&markerCount, fp); track->markerCount = markerCount; if (markerCount == 0) { trac...
0
[ "CWE-119" ]
audiofile
e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd
182,094,807,074,497,800,000,000,000,000,000,000,000
48
Fix decoding of multi-channel ADPCM audio files.
custom_attr_visible (MonoImage *image, MonoReflectionCustomAttr *cattr) { /* FIXME: Need to do more checks */ if (cattr->ctor->method && (cattr->ctor->method->klass->image != image)) { int visibility = cattr->ctor->method->klass->flags & TYPE_ATTRIBUTE_VISIBILITY_MASK; if ((visibility != TYPE_ATTRIBUTE_PUBLIC) &...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
109,798,824,441,003,200,000,000,000,000,000,000,000
12
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
transaction_id_pick(struct evdns_base *base) { ASSERT_LOCKED(base); for (;;) { u16 trans_id; evutil_secure_rng_get_bytes(&trans_id, sizeof(trans_id)); if (trans_id == 0xffff) continue; /* now check to see if that id is already inflight */ if (request_find_from_trans_id(base, trans_id) == NULL) return tr...
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
90,927,511,235,868,150,000,000,000,000,000,000,000
12
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
PHP_FUNCTION(rmdir) { char *dir; int dir_len; zval *zcontext = NULL; php_stream_context *context; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|r", &dir, &dir_len, &zcontext) == FAILURE) { RETURN_FALSE; } context = php_stream_context_from_zval(zcontext, 0); RETURN_BOOL(php_stream_rmdir(dir, REPOR...
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
23,302,731,048,545,230,000,000,000,000,000,000,000
15
Fixed bug #69418 - more s->p fixes for filenames
static void tcp_rcv_synrecv_state_fastopen(struct sock *sk) { tcp_try_undo_loss(sk, false); /* Reset rtx states to prevent spurious retransmits_timed_out() */ tcp_sk(sk)->retrans_stamp = 0; inet_csk(sk)->icsk_retransmits = 0; /* Once we leave TCP_SYN_RECV or TCP_FIN_WAIT_1, * we no longer need req so release i...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
3,715,659,902,208,618,000,000,000,000,000,000,000
23
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
static int abbrev_cmp(const void *a, const void *b) { const RzBinDwarfAbbrevDecl *first = a; const RzBinDwarfAbbrevDecl *second = b; if (first->offset > second->offset) { return 1; } else if (first->offset < second->offset) { return -1; } else { return 0; } }
0
[ "CWE-787" ]
rizin
aa6917772d2f32e5a7daab25a46c72df0b5ea406
232,458,714,375,308,670,000,000,000,000,000,000,000
12
Fix oob write for dwarf with abbrev with count 0 (Fix #2083) (#2086)
static int isdn_ppp_set_compressor(struct ippp_struct *is, struct isdn_ppp_comp_data *data) { struct isdn_ppp_compressor *ipc = ipc_head; int ret; void *stat; int num = data->num; if (is->debug & 0x10) printk(KERN_DEBUG "[%d] Set %s type %d\n", is->unit, (data->flags & IPPP_COMP_FLAG_XMIT) ? "compresso...
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
228,008,466,777,711,700,000,000,000,000,000,000,000
72
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
void Magick::Image::chromaRedPrimary(const double x_,const double y_, const double z_) { modifyImage(); image()->chromaticity.red_primary.x=x_; image()->chromaticity.red_primary.y=y_; image()->chromaticity.red_primary.z=z_; }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
75,139,801,308,105,190,000,000,000,000,000,000,000
8
Added missing return to avoid use after free.
void RGWGetACLs::execute() { stringstream ss; RGWAccessControlPolicy* const acl = \ (!s->object.empty() ? s->object_acl.get() : s->bucket_acl.get()); RGWAccessControlPolicy_S3* const s3policy = \ static_cast<RGWAccessControlPolicy_S3*>(acl); s3policy->to_xml(ss); acls = ss.str(); }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
98,181,290,889,327,960,000,000,000,000,000,000,000
10
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
Opens the module of the algorithm and the mode to be used */ PHP_FUNCTION(mcrypt_module_open) { char *cipher, *cipher_dir; char *mode, *mode_dir; int cipher_len, cipher_dir_len; int mode_len, mode_dir_len; MCRYPT td; php_mcrypt *pm; if (zend_parse_parameters (ZEND_NUM_ARGS() TSRMLS_CC, "ssss", &cip...
0
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
148,202,923,992,726,540,000,000,000,000,000,000,000
32
Fix bug #72455: Heap Overflow due to integer overflows
f_serverlist(typval_T *argvars UNUSED, typval_T *rettv) { char_u *r = NULL; #ifdef FEAT_CLIENTSERVER # ifdef WIN32 r = serverGetVimNames(); # else make_connection(); if (X_DISPLAY != NULL) r = serverGetVimNames(X_DISPLAY); # endif #endif rettv->v_type = VAR_STRING; rettv->vval.v_string = r; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
298,604,291,073,099,700,000,000,000,000,000,000,000
16
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
CImg<Tfloat> get_distance(const T& value, const unsigned int metric=2) const { return CImg<Tfloat>(*this,false).distance((Tfloat)value,metric); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
91,600,045,236,759,200,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static UINT drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, wStream* s) { int value; UINT error; UINT32 ChannelId; wStream* data_out; ChannelId = drdynvc_read_variable_uint(s, cbChId); WLog_Print(drdynvc->log, WLOG_DEBUG, "process_close_request: Sp=%d cbChId=%d, ChannelId=%"PRIu3...
1
[ "CWE-125" ]
FreeRDP
baee520e3dd9be6511c45a14c5f5e77784de1471
208,297,862,710,221,820,000,000,000,000,000,000,000
37
Fix for #4866: Added additional length checks
static inline MagickSizeType ScaleQuantumToLongLong(const Quantum quantum) { #if !defined(MAGICKCORE_HDRI_SUPPORT) return((MagickSizeType) (MagickULLConstant(72340172838076673)*quantum)); #else if ((IsNaN(quantum) != MagickFalse) || (quantum <= 0.0)) return(0UL); if ((72340172838076673.0*quantum) >= 184467440...
0
[ "CWE-190" ]
ImageMagick
95d4e94e0353e503b71a53f5e6fad173c7c70c90
260,686,599,639,438,900,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1751
repodata_serialize_key(Repodata *data, struct extdata *newincore, struct extdata *newvincore, Id *schema, Repokey *key, Id val) { Id *ida; struct extdata *xd; unsigned int oldvincorelen = 0; Id schemaid, *sp; xd = newincore; if (key->storage == KEY_STORAGE_VERTICAL_OFFSET) { ...
0
[ "CWE-125" ]
libsolv
fdb9c9c03508990e4583046b590c30d958f272da
14,712,801,474,409,040,000,000,000,000,000,000,000
158
repodata_schema2id: fix heap-buffer-overflow in memcmp When the length of last schema in data->schemadata is less than length of input schema, we got a read overflow in asan test. Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
static int minix_remount (struct super_block * sb, int * flags, char * data) { struct minix_sb_info * sbi = minix_sb(sb); struct minix_super_block * ms; ms = sbi->s_ms; if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) return 0; if (*flags & MS_RDONLY) { if (ms->s_state & MINIX_VALID_FS || !(sbi->s...
0
[ "CWE-189" ]
linux-2.6
f5fb09fa3392ad43fbcfc2f4580752f383ab5996
38,085,420,617,799,960,000,000,000,000,000,000,000
30
[PATCH] Fix for minix crash Mounting a (corrupt) minix filesystem with zero s_zmap_blocks gives a spectacular crash on my 2.6.17.8 system, no doubt because minix/inode.c does an unconditional minix_set_bit(0,sbi->s_zmap[0]->b_data); [akpm@osdl.org: make labels conistent while we're there] Signed-off-by: Andrew Mort...
static int selinux_task_setrlimit(unsigned int resource, struct rlimit *new_rlim) { struct rlimit *old_rlim = current->signal->rlim + resource; /* Control the ability to change the hard limit (whether lowering or raising it), so that the hard limit can later be used as a safe reset point for the soft limit ...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
319,525,610,057,420,750,000,000,000,000,000,000,000
13
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...
static int ip6_frags_sysctl_register(void) { ip6_ctl_header = register_net_sysctl_rotable(net_ipv6_ctl_path, ip6_frags_ctl_table); return ip6_ctl_header == NULL ? -ENOMEM : 0; }
0
[]
linux-2.6
70789d7052239992824628db8133de08dc78e593
79,129,637,896,370,810,000,000,000,000,000,000,000
6
ipv6: discard overlapping fragment RFC5722 prohibits reassembling fragments when some data overlaps. Bug spotted by Zhang Zuotao <zuotao.zhang@6wind.com>. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
MagickExport const DelegateInfo *GetDelegateInfo(const char *decode, const char *encode,ExceptionInfo *exception) { register const DelegateInfo *p; assert(exception != (ExceptionInfo *) NULL); if (IsDelegateCacheInstantiated(exception) == MagickFalse) return((const DelegateInfo *) NULL); /* Searc...
0
[ "CWE-476" ]
ImageMagick
2c75f301d9ac84f91071393b02d8c88c8341c91c
190,485,730,117,132,700,000,000,000,000,000,000,000
53
https://github.com/ImageMagick/ImageMagick/issues/1225
Item_subselect::Item_subselect(THD *thd_arg): Item_result_field(thd_arg), Used_tables_and_const_cache(), value_assigned(0), own_engine(0), thd(0), old_engine(0), have_to_be_excluded(0), inside_first_fix_fields(0), done_first_fix_fields(FALSE), expr_cache(0), forced_const(FALSE), substitution(0), engine(0), e...
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
3,139,641,459,350,960,300,000,000,000,000,000,000
24
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
TEST_P(Http2IntegrationTest, PauseAndResumeHeadersOnly) { config_helper_.addFilter(R"EOF( name: stop-iteration-and-continue-filter config: {} )EOF"); initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto response = codec_client_->makeHeaderOnlyRequest(default_request_headers_); AS...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
218,675,937,935,361,270,000,000,000,000,000,000,000
18
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...
static int phar_tar_process_metadata(phar_entry_info *entry, php_stream *fp TSRMLS_DC) /* {{{ */ { char *metadata; size_t save = php_stream_tell(fp), read; phar_entry_info *mentry; metadata = (char *) emalloc(entry->uncompressed_filesize + 1); read = php_stream_read(fp, metadata, entry->uncompressed_filesize); ...
1
[ "CWE-189" ]
php-src
158d8a6b088662ce9d31e0c777c6ebe90efdc854
49,600,625,714,303,040,000,000,000,000,000,000,000
35
fix unchecked emalloc
QPDF::Members::Members() : encrypted(false), encryption_initialized(false), ignore_xref_streams(false), suppress_warnings(false), out_stream(&std::cout), err_stream(&std::cerr), attempt_recovery(true), encryption_V(0), encryption_R(0), encrypt_metadata(true), cf_stream(e_none...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
166,862,071,909,278,430,000,000,000,000,000,000,000
23
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static Image *ReadXBMImage(const ImageInfo *image_info,ExceptionInfo *exception) { char buffer[MagickPathExtent], name[MagickPathExtent]; Image *image; MagickBooleanType status; register ssize_t i, x; register Quantum *q; register unsigned char *p; short int hex_d...
1
[ "CWE-703", "CWE-834" ]
ImageMagick
d9a8234d211da30baf9526fbebe9a8438ea7e11c
34,722,320,842,227,897,000,000,000,000,000,000,000
221
https://github.com/ImageMagick/ImageMagick/issues/712
static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev, u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ieee80211_local *local = sdata->local; struct sta_info *sta = NULL; const s...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
339,139,063,656,300,480,000,000,000,000,000,000,000
115
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-...
static int crypto_rng_report(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_rng rrng; snprintf(rrng.type, CRYPTO_MAX_ALG_NAME, "%s", "rng"); rrng.seedsize = alg->cra_rng.seedsize; if (nla_put(skb, CRYPTOCFGA_REPORT_RNG, sizeof(struct crypto_report_rng), &rrng)) goto nla_put_failure; ...
1
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
329,527,465,895,646,200,000,000,000,000,000,000,000
16
crypto: user - fix info leaks in report API Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of th...
XML_SetCharacterDataHandler(XML_Parser parser, XML_CharacterDataHandler handler) { if (parser != NULL) characterDataHandler = handler; }
0
[ "CWE-611" ]
libexpat
c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f
221,665,960,177,562,900,000,000,000,000,000,000,000
6
xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233)
xmlRelaxNGParseElement(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node) { xmlRelaxNGDefinePtr ret, cur, last; xmlNodePtr child; const xmlChar *olddefine; ret = xmlRelaxNGNewDefine(ctxt, node); if (ret == NULL) return (NULL); ret->type = XML_RELAXNG_ELEMENT; ret->parent = ctxt->def; ...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
53,223,569,732,891,200,000,000,000,000,000,000,000
101
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
R_API bool r_sys_mkdirp(const char *dir) { bool ret = true; char slash = R_SYS_DIR[0]; char *path = strdup (dir), *ptr = path; if (!path) { eprintf ("r_sys_mkdirp: Unable to allocate memory\n"); return false; } if (*ptr == slash) { ptr++; } #if __WINDOWS__ { char *p = strstr (ptr, ":\\"); if (p) { ...
1
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
112,209,163,629,125,260,000,000,000,000,000,000,000
45
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
static ssize_t auto_online_blocks_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { const int online_type = memhp_online_type_from_str(buf); if (online_type < 0) return -EINVAL; memhp_default_online_type = online_type; return count; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
99,892,954,750,939,940,000,000,000,000,000,000,000
12
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...
int _yr_emit_inst_arg_struct( RE_EMIT_CONTEXT* emit_context, uint8_t opcode, void* structure, size_t structure_size, uint8_t** instruction_addr, void** argument_addr, int* code_size) { FAIL_ON_ERROR(yr_arena_write_data( emit_context->arena, &opcode, sizeof(uint8_t), ...
0
[ "CWE-125" ]
yara
83d799804648c2a0895d40a19835d9b757c6fa4e
184,418,821,036,278,300,000,000,000,000,000,000,000
25
Fix issue #646 (#648) * Fix issue #646 and some edge cases with wide regexps using \b and \B * Rename function IS_WORD_CHAR to _yr_re_is_word_char
static inline void task_numa_free(struct task_struct *p, bool final) { }
0
[ "CWE-416" ]
linux
16d51a590a8ce3befb1308e0e7ab77f3b661af33
260,246,702,181,622,400,000,000,000,000,000,000,000
3
sched/fair: Don't free p->numa_faults with concurrent readers When going through execve(), zero out the NUMA fault statistics instead of freeing them. During execve, the task is reachable through procfs and the scheduler. A concurrent /proc/*/sched reader can read data from a freed ->numa_faults allocation (confirmed...
static void rtl8139_transfer_frame(RTL8139State *s, uint8_t *buf, int size, int do_interrupt, const uint8_t *dot1q_buf) { struct iovec *iov = NULL; struct iovec vlan_iov[3]; if (!size) { DPRINTF("+++ empty ethernet frame\n"); return; } if (dot1q_buf && size >= ETH_ALEN * 2)...
1
[ "CWE-835" ]
qemu
5311fb805a4403bba024e83886fa0e7572265de4
96,858,383,543,054,050,000,000,000,000,000,000,000
52
rtl8139: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826...
static int oploop(RAsm *a, ut8 *data, const Opcode *op) { int l = 0; data[l++] = 0xe2; st8 delta = op->operands[0].immediate - a->pc - 2; data[l++] = (ut8)delta; return l; }
0
[ "CWE-119", "CWE-125", "CWE-787" ]
radare2
9b46d38dd3c4de6048a488b655c7319f845af185
250,844,615,076,010,770,000,000,000,000,000,000,000
7
Fix #12372 and #12373 - Crash in x86 assembler (#12380) 0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL- leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
NIFinishBuild(IspellDict *Conf) { /* Release no-longer-needed temp memory */ MemoryContextDelete(Conf->buildCxt); /* Just for cleanliness, zero the now-dangling pointers */ Conf->buildCxt = NULL; Conf->Spell = NULL; Conf->firstfree = NULL; }
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
172,789,080,528,192,600,000,000,000,000,000,000,000
9
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
su_main (int argc, char **argv, int mode) { int optc; const char *new_user = DEFAULT_USER, *runuser_user = NULL; char *command = NULL; int request_same_session = 0; char *shell = NULL; struct passwd *pw; struct passwd pw_copy; gid_t *groups = NULL; size_t ngroups = 0; bool use_supp = false; bool ...
0
[ "CWE-362" ]
util-linux
dffab154d29a288aa171ff50263ecc8f2e14a891
188,688,130,919,110,670,000,000,000,000,000,000,000
217
su: properly clear child PID Reported-by: Tobias Stöckmann <tobias@stoeckmann.org> Signed-off-by: Karel Zak <kzak@redhat.com>
nfsd4_encode_layout_types(struct xdr_stream *xdr, u32 layout_types) { __be32 *p; unsigned long i = hweight_long(layout_types); p = xdr_reserve_space(xdr, 4 + 4 * i); if (!p) return nfserr_resource; *p++ = cpu_to_be32(i); for (i = LAYOUT_NFSV4_1_FILES; i < LAYOUT_TYPE_MAX; ++i) if (layout_types & (1 << i))...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
122,653,890,116,680,870,000,000,000,000,000,000,000
17
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
jpc_mqdec_t *jpc_mqdec_create(int maxctxs, jas_stream_t *in) { jpc_mqdec_t *mqdec; /* There must be at least one context. */ assert(maxctxs > 0); /* Allocate memory for the MQ decoder. */ if (!(mqdec = jas_malloc(sizeof(jpc_mqdec_t)))) { goto error; } mqdec->in = in; mqdec->maxctxs = maxctxs; /* Allocate m...
1
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
113,827,245,081,707,280,000,000,000,000,000,000,000
37
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
dns_zone_checknames(dns_zone_t *zone, const dns_name_t *name, dns_rdata_t *rdata) { bool ok = true; bool fail = false; char namebuf[DNS_NAME_FORMATSIZE]; char namebuf2[DNS_NAME_FORMATSIZE]; char typebuf[DNS_RDATATYPE_FORMATSIZE]; int level = ISC_LOG_WARNING; dns_name_t bad; REQUIRE(DNS_ZONE_VALID(zone));...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
270,182,168,250,277,500,000,000,000,000,000,000,000
47
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
void LinkResolver::lookup_method_in_interfaces(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) { InstanceKlass *ik = InstanceKlass::cast(klass()); // Specify 'true' in order to skip default methods when searching the // interfaces. Function lookup_method_in_klasses() already loo...
0
[]
jdk8u
f14e35d20e1a4d0f507f05838844152f2242c6d3
74,855,797,154,327,840,000,000,000,000,000,000,000
8
8281866: Enhance MethodHandle invocations Reviewed-by: andrew Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
static void nfs4_sequence_free_slot(struct nfs4_sequence_res *res) { if (res->sr_slot != NULL) nfs40_sequence_free_slot(res); }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
229,027,850,341,317,400,000,000,000,000,000,000,000
5
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...
nautilus_file_can_mount (NautilusFile *file) { g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE); return file->details->can_mount; }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
221,058,099,403,976,930,000,000,000,000,000,000,000
6
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 launch(OpKernelContext* context, const Tensor& tensor_in, const std::array<int64, 3>& window, const std::array<int64, 3>& stride, const std::array<int64, 3>& padding, TensorFormat data_format, Padding padding_type, ...
0
[ "CWE-369", "CWE-787" ]
tensorflow
63c6a29d0f2d692b247f7bf81f8732d6442fad09
123,588,646,971,898,460,000,000,000,000,000,000,000
9
Add missing validation, prevent heap OOB PiperOrigin-RevId: 372246723 Change-Id: I1a454a643810e77d7d14821b342098c56a09fbbf
void DSA_Public_Decoder::Decode(DSA_PublicKey& key) { ReadHeader(); if (source_.GetError().What()) return; // group parameters key.SetModulus(GetInteger(Integer().Ref())); key.SetSubGroupOrder(GetInteger(Integer().Ref())); key.SetSubGroupGenerator(GetInteger(Integer().Ref())); // key k...
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
255,265,468,425,740,150,000,000,000,000,000,000,000
13
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
KaxInternalBlock::KaxInternalBlock(const KaxInternalBlock & ElementToClone) :EbmlBinary(ElementToClone) ,myBuffers(ElementToClone.myBuffers.size()) ,Timecode(ElementToClone.Timecode) ,LocalTimecode(ElementToClone.LocalTimecode) ,bLocalTimecodeUsed(ElementToClone.bLocalTimecodeUsed) ,TrackNumber(ElementToClo...
0
[ "CWE-200", "CWE-399", "CWE-119" ]
libmatroska
0a2d3e3644a7453b6513db2f9bc270f77943573f
54,484,801,280,492,580,000,000,000,000,000,000,000
17
KaxBlockInternal: check EBML lace sizes against available buffer space
static void populate_devinfo_service(struct btd_gatt_database *database) { struct gatt_db_attribute *service; struct gatt_db_attribute *attrib; bt_uuid_t uuid; if (!btd_opts.did_source) return; bt_uuid16_create(&uuid, UUID_DIS); service = gatt_db_add_service(database->db, &uuid, true, 3); bt_uuid16_create(&...
0
[ "CWE-416" ]
bluez
838c0dc7641e1c991c0f3027bf94bee4606012f8
2,644,640,693,132,121,000,000,000,000,000,000,000
24
gatt: Fix not cleaning up when disconnected There is a current use after free possible on a gatt server if a client disconnects while a WriteValue call is being processed with dbus. This patch includes the addition of a pending disconnect callback to handle cleanup better if a disconnect occurs during a write, an acq...
finish_get_edata(void *arg, krb5_error_code code, krb5_pa_data *pa) { krb5_error_code ret; struct hint_state *state = arg; if (code == 0) { if (pa == NULL) { ret = alloc_pa_data(state->pa_type, 0, &pa); if (ret) goto error; } /* add_pa_data_el...
0
[ "CWE-617" ]
krb5
94e5eda5bb94d1d44733a49c3d9b6d1e42c74def
262,358,310,906,137,240,000,000,000,000,000,000,000
24
Remove incorrect KDC assertion The assertion in return_enc_padata() is reachable because kdc_make_s4u2self_rep() may have previously added encrypted padata. It is no longer necessary because the code uses add_pa_data_element() instead of allocating a new list. CVE-2018-20217: In MIT krb5 1.8 or later, an authenticat...
static patricia_tree_t* get_allowed_nets(lua_State* vm) { ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); lua_getglobal(vm, CONST_ALLOWED_NETS); return((patricia_tree_t*)lua_touserdata(vm, lua_gettop(vm))); }
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
83,368,673,563,034,380,000,000,000,000,000,000,000
6
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
static int aac_get_hba_info(struct aac_dev *dev, void __user *arg) { struct aac_hba_info hbainfo; hbainfo.adapter_number = (u8) dev->id; hbainfo.system_io_bus_number = dev->pdev->bus->number; hbainfo.device_number = (dev->pdev->devfn >> 3); hbainfo.function_number = (dev->pdev->devfn & 0x0007); hbainfo.vendo...
1
[ "CWE-200" ]
linux
342ffc26693b528648bdc9377e51e4f2450b4860
242,610,856,632,228,180,000,000,000,000,000,000,000
21
scsi: aacraid: Don't copy uninitialized stack memory to userspace Both aac_send_raw_srb() and aac_get_hba_info() may copy stack allocated structs to userspace without initializing all members of these structs. Clear out this memory to prevent information leaks. Fixes: 423400e64d377 ("scsi: aacraid: Include HBA direct...
flatpak_dir_new (GFile *path, gboolean user) { /* We are only interested on extra data for system-wide installations, in which case we use _new_full() directly, so here we just call it passing NULL */ return flatpak_dir_new_full (path, user, NULL); }
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
272,724,808,239,658,000,000,000,000,000,000,000,000
6
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static CImg<T> diagonal(const T& a0, const T& a1, const T& a2, const T& a3) { return matrix(a0,0,0,0,0,a1,0,0,0,0,a2,0,0,0,0,a3); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
329,515,996,135,732,050,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static inline int do_fontx_ioctl(struct vc_data *vc, int cmd, struct consolefontdesc __user *user_cfd, struct console_font_op *op) { struct consolefontdesc cfdarg; int i; if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc))) return -EFAULT; switch (cmd) { case PIO_FONTX: op->op = KD_FONT...
0
[ "CWE-662" ]
linux
90bfdeef83f1d6c696039b6a917190dcbbad3220
26,870,581,507,551,694,000,000,000,000,000,000,000
38
tty: make FONTX ioctl use the tty pointer they were actually passed Some of the font tty ioctl's always used the current foreground VC for their operations. Don't do that then. This fixes a data race on fg_console. Side note: both Michael Ellerman and Jiri Slaby point out that all these ioctls are deprecated, and s...
prompt_for_password (void) { if (opt.user) printf (_("Password for user %s: "), quote (opt.user)); else printf (_("Password: ")); return getpass(""); }
0
[ "CWE-20" ]
wget
3e25a9817f47fbb8660cc6a3b2f3eea239526c6c
188,323,554,937,939,400,000,000,000,000,000,000,000
8
Introduce --trust-server-names. Close CVE-2010-2252.
static int bond_close(struct net_device *bond_dev) { struct bonding *bond = netdev_priv(bond_dev); bond_work_cancel_all(bond); bond->send_peer_notif = 0; if (bond_is_lb(bond)) bond_alb_deinitialize(bond); bond->recv_probe = NULL; return 0; }
0
[ "CWE-476", "CWE-703" ]
linux
105cd17a866017b45f3c45901b394c711c97bf40
299,551,996,739,533,920,000,000,000,000,000,000,000
12
bonding: fix null dereference in bond_ipsec_add_sa() If bond doesn't have real device, bond->curr_active_slave is null. But bond_ipsec_add_sa() dereferences bond->curr_active_slave without null checking. So, null-ptr-deref would occur. Test commands: ip link add bond0 type bond ip link set bond0 up ip x s...
cmd_file (const char *com _GL_UNUSED, const char *val, void *place) { char **pstring = (char **)place; xfree (*pstring); /* #### If VAL is empty, perhaps should set *PLACE to NULL. */ *pstring = xstrdup (val); #if defined(WINDOWS) || defined(MSDOS) /* Convert "\" to "/". */ { char *s; for (s = ...
0
[ "CWE-200" ]
wget
c125d24762962d91050d925fbbd9e6f30b2302f8
176,774,559,089,790,640,000,000,000,000,000,000,000
21
Don't use extended attributes (--xattr) by default * src/init.c (defaults): Set enable_xattr to false by default * src/main.c (print_help): Reverse option logic of --xattr * doc/wget.texi: Add description for --xattr Users may not be aware that the origin URL and Referer are saved including credentials, and possibly ...
static int mwifiex_pcie_create_txbd_ring(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; /* * driver maintaines the write pointer and firmware maintaines the read * pointer. The write pointer starts at 0 (zero) while th...
0
[ "CWE-400", "CWE-200", "CWE-401" ]
linux
d10dcb615c8e29d403a24d35f8310a7a53e3050c
299,625,214,553,101,280,000,000,000,000,000,000,000
46
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release for skb and card->evtbd_ring_vbase is added. Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines...
void Field_time::sort_string(uchar *to,uint length __attribute__((unused))) { to[0] = (uchar) (ptr[2] ^ 128); to[1] = ptr[1]; to[2] = ptr[0]; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
113,503,280,498,357,660,000,000,000,000,000,000,000
6
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static void long2str(unsigned char *dst, s32 n) { dst[0] = (n )&0xff; dst[1] = (n>> 8)&0xff; dst[2] = (n>>16)&0xff; dst[3] = (n>>24)&0xff; }
0
[ "CWE-835" ]
gpac
7f060bbb72966cae80d6fee338d0b07fa3fc06e1
91,389,115,200,044,250,000,000,000,000,000,000,000
7
fixed #2159
static const char* l4proto_name(u16 proto) { switch (proto) { case IPPROTO_ICMP: return "icmp"; case IPPROTO_TCP: return "tcp"; case IPPROTO_UDP: return "udp"; case IPPROTO_DCCP: return "dccp"; case IPPROTO_GRE: return "gre"; case IPPROTO_SCTP: return "sctp"; case IPPROTO_UDPLITE: return "udplite"; } return ...
0
[ "CWE-203" ]
linux
2671fa4dc0109d3fb581bc3078fdf17b5d9080f6
77,164,485,188,658,170,000,000,000,000,000,000,000
14
netfilter: conntrack: Make global sysctls readonly in non-init netns These sysctls point to global variables: - NF_SYSCTL_CT_MAX (&nf_conntrack_max) - NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max) - NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user) Because their data pointers are not updated to point to per-netns s...
DEATH_TEST_REGEX_F(DocumentSourceMatchTest, ShouldFailToDescendExpressionOnPathThatIsNotACommonPrefix, "Invariant failure.*expression::isPathPrefixOf") { const auto expCtx = getExpCtx(); const auto matchSpec = BSON("a.b" << 1 << "b.c" << 1); const auto matchExpression =...
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
255,577,057,400,500,950,000,000,000,000,000,000,000
9
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
static void sctp_control_set_owner_w(struct sctp_chunk *chunk) { struct sctp_association *asoc = chunk->asoc; struct sk_buff *skb = chunk->skb; /* TODO: properly account for control chunks. * To do it right we'll need: * 1) endpoint if association isn't known. * 2) proper memory accounting. * * For now...
0
[ "CWE-704" ]
linux
a2d859e3fc97e79d907761550dbc03ff1b36479c
95,016,785,216,714,320,000,000,000,000,000,000,000
20
sctp: account stream padding length for reconf chunk sctp_make_strreset_req() makes repeated calls to sctp_addto_chunk() which will automatically account for padding on each call. inreq and outreq are already 4 bytes aligned, but the payload is not and doing SCTP_PAD4(a + b) (which _sctp_make_chunk() did implicitly he...
void hugetlb_report_usage(struct seq_file *m, struct mm_struct *mm) { seq_printf(m, "HugetlbPages:\t%8lu kB\n", atomic_long_read(&mm->hugetlb_usage) << (PAGE_SHIFT - 10)); }
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
193,340,616,041,742,150,000,000,000,000,000,000,000
5
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
bool readFileIfThere(const char* fname, std::string* line) { line->clear(); FILE* fp = fopen(fname, "r"); if(!fp) return false; stringfgets(fp, *line); fclose(fp); return true; }
0
[ "CWE-399" ]
pdns
881b5b03a590198d03008e4200dd00cc537712f3
285,231,447,949,668,200,000,000,000,000,000,000,000
10
Reject qname's wirelength > 255, `chopOff()` handle dot inside labels
/** \param img Reference to image to test. **/ bool contains(const CImg<T>& img) const {
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
154,802,008,620,466,990,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int unit_write_settingf(Unit *u, UnitWriteFlags flags, const char *name, const char *format, ...) { _cleanup_free_ char *p = NULL; va_list ap; int r; assert(u); assert(name); assert(format); if (UNIT_WRITE_FLAGS_NOOP(flags)) return 0; va...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
156,074,184,658,084,550,000,000,000,000,000,000,000
21
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
virDomainLeaseRemoveAt(virDomainDefPtr def, size_t i) { virDomainLeaseDefPtr lease = def->leases[i]; VIR_DELETE_ELEMENT(def->leases, i, def->nleases); return lease; }
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
49,695,630,723,813,630,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...
methodHandle LinkResolver::resolve_method(const LinkInfo& link_info, Bytecodes::Code code, TRAPS) { Handle nested_exception; Klass* resolved_klass = link_info.resolved_klass(); // 1. For invokevirtual, cannot call an interface method if (code == Bytecodes::_invokevirt...
0
[]
jdk11u
132745902a4601dc64b2c8ca112ca30292feccb4
29,090,376,896,609,300,000,000,000,000,000,000,000
71
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
bool read_ujpg( void ) { using namespace IOUtil; using namespace Sirikata; // colldata.start_decoder_worker_thread(std::bind(&simple_decoder, &colldata, str_in)); unsigned char ujpg_mrk[ 64 ]; // this is where we will enable seccomp, before reading user data write_byte_bill(Billing::HEADER, true,...
0
[ "CWE-399", "CWE-190" ]
lepton
6a5ceefac1162783fffd9506a3de39c85c725761
47,308,297,314,155,570,000,000,000,000,000,000,000
246
fix #111
static struct page *new_page(struct page *page, unsigned long start, int **x) { return NULL; }
0
[ "CWE-388" ]
linux
cf01fb9985e8deb25ccf0ea54d916b8871ae0e62
139,084,981,297,925,100,000,000,000,000,000,000,000
4
mm/mempolicy.c: fix error handling in set_mempolicy and mbind. In the case that compat_get_bitmap fails we do not want to copy the bitmap to the user as it will contain uninitialized stack data and leak sensitive data. Signed-off-by: Chris Salls <salls@cs.ucsb.edu> Signed-off-by: Linus Torvalds <torvalds@linux-founda...
static struct sock *udp_v6_mcast_next(struct net *net, struct sock *sk, __be16 loc_port, const struct in6_addr *loc_addr, __be16 rmt_port, const struct in6_addr *rmt_addr, int dif) { struct hlist_nulls_node *node; struct sock *s = sk; unsigned short num = ntohs(loc_port); sk_nulls_for...
0
[ "CWE-399", "CWE-703" ]
linux
8822b64a0fa64a5dd1dfcf837c5b0be83f8c05d1
16,286,343,524,836,760,000,000,000,000,000,000,000
40
ipv6: call udp_push_pending_frames when uncorking a socket with AF_INET pending data We accidentally call down to ip6_push_pending_frames when uncorking pending AF_INET data on a ipv6 socket. This results in the following splat (from Dave Jones): skbuff: skb_under_panic: text:ffffffff816765f6 len:48 put:40 head:ffff8...
static void hns_gmac_disable(void *mac_drv, enum mac_commom_mode mode) { struct mac_driver *drv = (struct mac_driver *)mac_drv; /*disable GE rX/tX */ if ((mode == MAC_COMM_MODE_TX) || (mode == MAC_COMM_MODE_RX_AND_TX)) dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_TX_EN_B, 0); if ((mode == MAC_COMM_MODE_RX)...
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
75,039,669,967,528,385,000,000,000,000,000,000,000
11
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...
void br_mdb_init(void) { rtnl_register(PF_BRIDGE, RTM_GETMDB, NULL, br_mdb_dump, NULL); rtnl_register(PF_BRIDGE, RTM_NEWMDB, br_mdb_add, NULL, NULL); rtnl_register(PF_BRIDGE, RTM_DELMDB, br_mdb_del, NULL, NULL); }
0
[ "CWE-399" ]
linux-2.6
c085c49920b2f900ba716b4ca1c1a55ece9872cc
224,146,614,702,034,420,000,000,000,000,000,000,000
6
bridge: fix mdb info leaks The bridging code discloses heap and stack bytes via the RTM_GETMDB netlink interface and via the notify messages send to group RTNLGRP_MDB afer a successful add/del. Fix both cases by initializing all unset members/padding bytes with memset(0). Cc: Stephen Hemminger <stephen@networkplumbe...
void __init fork_init(unsigned long mempages) { #ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR #ifndef ARCH_MIN_TASKALIGN #define ARCH_MIN_TASKALIGN L1_CACHE_BYTES #endif /* create a slab on which task_structs can be allocated */ task_struct_cachep = kmem_cache_create("task_struct", sizeof(struct task_struct), ARCH_M...
0
[ "CWE-20" ]
linux
f106eee10038c2ee5b6056aaf3f6d5229be6dcdd
249,562,892,641,240,200,000,000,000,000,000,000,000
33
pids: fix fork_idle() to setup ->pids correctly copy_process(pid => &init_struct_pid) doesn't do attach_pid/etc. It shouldn't, but this means that the idle threads run with the wrong pids copied from the caller's task_struct. In x86 case the caller is either kernel_init() thread or keventd. In particular, this means...
Error Box_iloc::append_data(heif_item_id item_ID, const std::vector<uint8_t>& data, uint8_t construction_method) { // check whether this item ID already exists size_t idx; for (idx=0;idx<m_items.size();idx++) { if (m_items[idx].item_ID == item_ID) { ...
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
147,918,497,389,687,020,000,000,000,000,000,000,000
33
force fraction to a limited resolution to finally solve those pesky numerical edge cases
RequestDecoder& ConnectionManagerImpl::newStream(ResponseEncoder& response_encoder, bool is_internally_created) { if (connection_idle_timer_) { connection_idle_timer_->disableTimer(); } ENVOY_CONN_LOG(debug, "new stream", read_callbacks_->connection()); Acti...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
225,882,247,480,606,440,000,000,000,000,000,000,000
19
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
bool Subgraph::OpMightHaveSideEffect( const TfLiteNode* node, const TfLiteRegistration* registration) const { // Check if any of the input tensors are of type resource. if (AnyTensorOfTypeResource(tensors_, node->inputs)) return true; // Check if any of the output tensors are of type resource. if (AnyTensor...
0
[ "CWE-476" ]
tensorflow
f8378920345f4f4604202d4ab15ef64b2aceaa16
87,858,654,097,688,200,000,000,000,000,000,000,000
14
Prevent a null pointer dereference in TFLite. PiperOrigin-RevId: 370800353 Change-Id: Ic9c9712ce5c6e384c954dcd640a5bd9ff05c9a05
//! Convert pixel values from HSV to RGB color spaces \newinstance. CImg<Tuchar> get_HSVtoRGB() const { return CImg<Tuchar>(*this,false).HSVtoRGB();
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
195,050,312,991,171,600,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static inline struct list_head *chunk_hash(const struct inode *inode) { unsigned long n = (unsigned long)inode / L1_CACHE_BYTES; return chunk_hash_heads + n % HASH_SIZE; }
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
71,614,131,554,888,940,000,000,000,000,000,000,000
5
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
int bus_exec_context_set_transient_property( Unit *u, ExecContext *c, const char *name, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error) { const char *suffix; int r; assert(u); ...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
184,620,153,270,982,270,000,000,000,000,000,000,000
1,395
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static int count_ah_combs(const struct xfrm_tmpl *t) { int i, sz = 0; for (i = 0; ; i++) { const struct xfrm_algo_desc *aalg = xfrm_aalg_get_byidx(i); if (!aalg) break; if (!aalg->pfkey_supported) continue; if (aalg_tmpl_set(t, aalg)) sz += sizeof(struct sadb_comb); } return sz + sizeof(struct sad...
0
[ "CWE-200" ]
linux
9a564bccb78a76740ea9d75a259942df8143d02c
172,255,628,053,880,300,000,000,000,000,000,000,000
15
af_key: add __GFP_ZERO flag for compose_sadb_supported in function pfkey_register Add __GFP_ZERO flag for compose_sadb_supported in function pfkey_register to initialize the buffer of supp_skb to fix a kernel-info-leak issue. 1) Function pfkey_register calls compose_sadb_supported to request a sk_buff. 2) compose_sadb...
sc_pkcs15emu_get_df(sc_pkcs15_card_t *p15card, unsigned int type) { sc_pkcs15_df_t *df; sc_file_t *file; int created = 0; while (1) { for (df = p15card->df_list; df; df = df->next) { if (df->type == type) { if (created) df->enumerated = 1; return df; } } assert(created == 0); file = s...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
105,716,253,730,927,180,000,000,000,000,000,000,000
26
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
void CLASS foveon_sd_load_raw() { #ifdef LIBRAW_LIBRARY_BUILD if(!image) throw LIBRAW_EXCEPTION_IO_CORRUPT; #endif struct decode *dindex; short diff[1024]; unsigned bitbuf=0; int pred[3], row, col, bit=-1, c, i; read_shorts ((ushort *) diff, 1024); if (!load_flags) foveon_decoder (1024, 0); for (r...
0
[ "CWE-369", "CWE-704" ]
LibRaw
9f26ce37f5be86ea11bfc6831366558650b1f6ff
153,195,759,954,081,670,000,000,000,000,000,000,000
39
SA81000: LibRaw 0.18.8