func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
PHP_METHOD(Phar, setAlias) { char *alias, *error, *oldalias; phar_archive_data *fd_ptr; size_t alias_len, oldalias_len; int old_temp, readd = 0; PHAR_ARCHIVE_OBJECT(); if (PHAR_G(readonly) && !phar_obj->archive->is_data) { zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Cannot write out phar a...
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
145,274,401,542,698,370,000,000,000,000,000,000,000
96
Fix bug #71860: Require valid paths for phar filenames
static unsigned int llcp_sock_poll(struct file *file, struct socket *sock, poll_table *wait) { struct sock *sk = sock->sk; unsigned int mask = 0; pr_debug("%p\n", sk); sock_poll_wait(file, sk_sleep(sk), wait); if (sk->sk_state == LLCP_LISTEN) return llcp_accept_poll(sk); if (sk->sk_err || !skb_queue_...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
159,411,280,585,961,300,000,000,000,000,000,000,000
38
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static int __init parse_efi_cmdline(char *str) { if (!str) { pr_warn("need at least one option\n"); return -EINVAL; } if (parse_option_str(str, "debug")) set_bit(EFI_DBG, &efi.flags); if (parse_option_str(str, "noruntime")) disable_runtime = true; return 0; }
0
[]
linux
1957a85b0032a81e6482ca4aab883643b8dae06e
125,317,018,731,055,480,000,000,000,000,000,000,000
15
efi: Restrict efivar_ssdt_load when the kernel is locked down efivar_ssdt_load allows the kernel to import arbitrary ACPI code from an EFI variable, which gives arbitrary code execution in ring 0. Prevent that when the kernel is locked down. Signed-off-by: Matthew Garrett <mjg59@google.com> Acked-by: Ard Biesheuvel <...
static inline void ConvertLuvToXYZ(const double L,const double u,const double v, double *X,double *Y,double *Z) { double gamma; assert(X != (double *) NULL); assert(Y != (double *) NULL); assert(Z != (double *) NULL); if (L > (CIEK*CIEEpsilon)) *Y=(double) pow((L+16.0)/116.0,3.0); else *Y=L/C...
0
[]
ImageMagick6
bbb2dff98d0e97a0fe3f7e187855476c4590eed2
270,769,771,300,312,020,000,000,000,000,000,000,000
20
https://github.com/ImageMagick/ImageMagick/issues/3317
chdlc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, register const u_char *p) { return chdlc_print(ndo, p, h->len); }
0
[ "CWE-125", "CWE-787" ]
tcpdump
1dcd10aceabbc03bf571ea32b892c522cbe923de
270,602,191,655,162,250,000,000,000,000,000,000,000
4
CVE-2017-12897/ISO CLNS: Use ND_TTEST() for the bounds checks in isoclns_print(). This fixes a buffer over-read discovered by Kamil Frankowicz. Don't pass the remaining caplen - that's too hard to get right, and we were getting it wrong in at least one case; just use ND_TTEST(). Add a test using the capture file sup...
koi8_r_apply_all_case_fold(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg) { return onigenc_apply_all_case_fold_with_map( sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, flag, f, arg); }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
339,810,613,486,174,560,000,000,000,000,000,000,000
7
onig-5.9.2
GGadget *GNumericFieldCreate(struct gwindow *base, GGadgetData *gd,void *data) { GTextField *gt = calloc(1,sizeof(GNumericField)); gt->numericfield = true; _GTextFieldCreate(gt,base,gd,data,&gnumericfield_box); return( &gt->g ); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
259,832,700,972,894,300,000,000,000,000,000,000,000
7
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
void mnt_drop_write(struct vfsmount *mnt) { __mnt_drop_write(mnt); sb_end_write(mnt->mnt_sb); }
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
104,509,279,184,914,800,000,000,000,000,000,000,000
5
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part) { if (part->policy && op_is_write(bio_op(bio))) { char b[BDEVNAME_SIZE]; printk(KERN_ERR "generic_make_request: Trying to write " "to read-only block-device %s (partno %d)\n", bio_devname(bio, b), part->partno); return true;...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
157,849,325,129,769,580,000,000,000,000,000,000,000
14
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
int mp_prime_is_prime_ex(mp_int* a, int t, int* result, WC_RNG* rng) { int ret = FP_YES; if (a == NULL || result == NULL || rng == NULL) return FP_VAL; if (fp_isone(a)) { *result = FP_NO; return FP_OKAY; } if (ret == FP_YES) { fp_digit d; int r; /*...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
128,556,754,611,415,500,000,000,000,000,000,000,000
123
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
static void pci_piix_ide_exitfn(PCIDevice *dev) { PCIIDEState *d = PCI_IDE(dev); unsigned i; for (i = 0; i < 2; ++i) { memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].extra_io); memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].addr_ioport); } }
0
[]
qemu
6cd387833d05e8ad31829d97e474dc420625aed9
162,251,654,763,010,120,000,000,000,000,000,000,000
10
Fix release_drive on unplugged devices (pci_piix3_xen_ide_unplug) pci_piix3_xen_ide_unplug should completely unhook the unplugged IDEDevice from the corresponding BlockBackend, otherwise the next call to release_drive will try to detach the drive again. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefa...
static int ntop_get_ndpi_protocol_name(lua_State* vm) { NetworkInterfaceView *ntop_interface = getCurrentInterface(vm); nDPIStats stats; int proto; ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TNUMBER)) return(CONST_LUA_ERROR); proto = (...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
46,264,134,415,626,430,000,000,000,000,000,000,000
21
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
DeepTiledInputFile::~DeepTiledInputFile () { if (!_data->memoryMapped) for (size_t i = 0; i < _data->tileBuffers.size(); i++) if (_data->tileBuffers[i]->buffer != 0) delete [] _data->tileBuffers[i]->buffer; if (_data->_deleteStream) delete _data->_streamData->is; ...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
42,711,368,148,400,280,000,000,000,000,000,000,000
20
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
PyObject *PyBytes_DecodeEscape(const char *s, Py_ssize_t len, const char *errors, Py_ssize_t unicode, const char *recode_encoding) { int c; char *p, *buf; const char *end; PyOb...
0
[ "CWE-190" ]
cpython
6c004b40f9d51872d848981ef1a18bb08c2dfc42
11,612,054,423,155,708,000,000,000,000,000,000,000
142
bpo-30657: Fix CVE-2017-1000158 (#4758) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
int yr_re_exec( uint8_t* re_code, uint8_t* input_data, size_t input_forwards_size, size_t input_backwards_size, int flags, RE_MATCH_CALLBACK_FUNC callback, void* callback_args, int* matches) { uint8_t* ip; uint8_t* input; uint8_t mask; uint8_t value; uint8_t character_size; ...
0
[ "CWE-674", "CWE-787" ]
yara
925bcf3c3b0a28b5b78e25d9efda5c0bf27ae699
259,555,460,285,925,400,000,000,000,000,000,000,000
338
Fix issue #674. Move regexp limits to limits.h.
static void addjump(JF, enum js_AstType type, js_Ast *target, int inst) { js_JumpList *jump = js_malloc(J, sizeof *jump); jump->type = type; jump->inst = inst; jump->next = target->jumps; target->jumps = jump; }
0
[ "CWE-476" ]
mujs
5008105780c0b0182ea6eda83ad5598f225be3ee
18,702,879,340,103,472,000,000,000,000,000,000,000
8
Fix 697172: degenerate labeled break/continue statement. A labeled break statement will look for a matching label through its chain of parent statements. We start looking at the break statement though, so if the label is attached to the break, we'll return the break statement itself as a break target. Start looking f...
scrub_message(sldns_buffer* pkt, struct msg_parse* msg, struct query_info* qinfo, uint8_t* zonename, struct regional* region, struct module_env* env, struct iter_env* ie) { /* basic sanity checks */ log_nametypeclass(VERB_ALGO, "scrub for", zonename, LDNS_RR_TYPE_NS, qinfo->qclass); if(msg->qdcount > 1) retu...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
219,232,747,356,253,300,000,000,000,000,000,000,000
38
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
nautilus_unique_temporary_file_name (void) { const char *prefix = "/tmp/nautilus-temp-file"; char *file_name; int fd; file_name = g_strdup_printf ("%sXXXXXX", prefix); fd = g_mkstemp (file_name); if (fd == -1) { g_free (file_name); file_name = NULL; } else { close (fd); } return file_name; }
0
[]
nautilus
a0f7bb5f2e9af8ecb463b13da834fa8559b0a481
185,450,242,757,172,380,000,000,000,000,000,000,000
18
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...
hts_idx_t *bcf_index(htsFile *fp, int min_shift) { int n_lvls; bcf1_t *b = NULL; hts_idx_t *idx = NULL; bcf_hdr_t *h; int r; h = bcf_hdr_read(fp); if ( !h ) return NULL; int nids = 0; n_lvls = idx_calc_n_lvls_ids(h, min_shift, 0, &nids); idx = hts_idx_init(nids, HTS_FMT_CSI, bgzf...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
190,024,287,182,406,900,000,000,000,000,000,000,000
32
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
static int whereLoopAddVirtualOne( WhereLoopBuilder *pBuilder, Bitmask mPrereq, /* Mask of tables that must be used. */ Bitmask mUsable, /* Mask of usable tables */ u16 mExclude, /* Exclude terms using these operators */ sqlite3_index_info *pIdxInfo, /* Popula...
0
[ "CWE-129" ]
sqlite
effc07ec9c6e08d3bd17665f8800054770f8c643
301,850,627,178,346,470,000,000,000,000,000,000,000
177
Fix the whereKeyStats() routine (part of STAT4 processing only) so that it is able to cope with row-value comparisons against the primary key index of a WITHOUT ROWID table. [forum:/forumpost/3607259d3c|Forum post 3607259d3c]. FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb
TEST_CASE("Action taking non const Semantic Values parameter", "[general]") { parser parser(R"( ROOT <- TEXT TEXT <- [a-zA-Z]+ )"); parser["ROOT"] = [&](SemanticValues& sv) { auto s = any_cast<std::string>(sv[0]); s[0] = 'H'; // mutate return std::string(std::move(s)...
1
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
25,677,531,704,606,455,000,000,000,000,000,000,000
22
Fix #122
static int tcp_parse_aligned_timestamp(struct tcp_sock *tp, const struct tcphdr *th) { const __be32 *ptr = (const __be32 *)(th + 1); if (*ptr == htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) { tp->rx_opt.saw_tstamp = 1; ++ptr; tp->rx_opt.rcv_tsval = ntohl(*p...
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
198,912,827,383,991,800,000,000,000,000,000,000,000
15
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
find_check_entry(struct arpt_entry *e, const char *name, unsigned int size) { struct xt_entry_target *t; struct xt_target *target; int ret; ret = check_entry(e, name); if (ret) return ret; e->counters.pcnt = xt_percpu_counter_alloc(); if (IS_ERR_VALUE(e->counters.pcnt)) return -ENOMEM; t = arpt_get_targe...
1
[]
linux
bdf533de6968e9686df777dc178486f600c6e617
231,344,432,330,459,100,000,000,000,000,000,000,000
35
netfilter: x_tables: validate e->target_offset early We should check that e->target_offset is sane before mark_source_chains gets called since it will fetch the target entry for loop detection. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
EC_GROUP *EC_GROUP_new(const EC_METHOD *meth) { EC_GROUP *ret; if (meth == NULL) { ECerr(EC_F_EC_GROUP_NEW, EC_R_SLOT_FULL); return NULL; } if (meth->group_init == 0) { ECerr(EC_F_EC_GROUP_NEW, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return NULL; } ret = OPENSSL_malloc(sizeof *ret); if (ret == NULL)...
0
[ "CWE-320" ]
openssl
8aed2a7548362e88e84a7feb795a3a97e8395008
246,315,555,395,545,000,000,000,000,000,000,000,000
46
Reserve option to use BN_mod_exp_mont_consttime in ECDSA. Submitted by Shay Gueron, Intel Corp. RT: 3149 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12)
bool qemu_console_is_gl_blocked(QemuConsole *con) { assert(con != NULL); return con->gl_block; }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
238,788,762,226,599,230,000,000,000,000,000,000,000
5
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static struct inet6_dev * ipv6_add_dev(struct net_device *dev) { struct inet6_dev *ndev; ASSERT_RTNL(); if (dev->mtu < IPV6_MIN_MTU) return NULL; ndev = kmalloc(sizeof(struct inet6_dev), GFP_KERNEL); if (ndev) { memset(ndev, 0, sizeof(struct inet6_dev)); rwlock_init(&ndev->lock); ndev->dev = dev; me...
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
73,460,288,508,680,910,000,000,000,000,000,000,000
88
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
static void rdma_umap_open(struct vm_area_struct *vma) { struct ib_uverbs_file *ufile = vma->vm_file->private_data; struct rdma_umap_priv *opriv = vma->vm_private_data; struct rdma_umap_priv *priv; if (!opriv) return; /* We are racing with disassociation */ if (!down_read_trylock(&ufile->hw_destroy_rwsem)) ...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
45,095,287,418,818,540,000,000,000,000,000,000,000
37
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
content_set_byte_order (ExifContent *content, void *data) { exif_content_foreach_entry (content, entry_set_byte_order, data); }
0
[ "CWE-400", "CWE-703" ]
libexif
6aa11df549114ebda520dde4cdaea2f9357b2c89
114,716,815,390,292,680,000,000,000,000,000,000,000
4
Improve deep recursion detection in exif_data_load_data_content. The existing detection was still vulnerable to pathological cases causing DoS by wasting CPU. The new algorithm takes the number of tags into account to make it harder to abuse by cases using shallow recursion but with a very large number of tags. This ...
getFIOPName(unsigned iFIOP) { char *pRet; switch(iFIOP) { case FIOP_CONTAINS: pRet = "contains"; break; case FIOP_ISEQUAL: pRet = "isequal"; break; case FIOP_STARTSWITH: pRet = "startswith"; break; case FIOP_REGEX: pRet = "regex"; break; default: pRet = "NOP"; break; } return...
0
[ "CWE-119" ]
rsyslog
1ca6cc236d1dabf1633238b873fb1c057e52f95e
318,240,536,597,997,450,000,000,000,000,000,000,000
22
bugfix: off-by-one(two) bug in legacy syslog parser
find_is_eval_item( char_u *ptr, int *colp, int *bnp, int dir) { // Accept everything inside []. if ((*ptr == ']' && dir == BACKWARD) || (*ptr == '[' && dir == FORWARD)) ++*bnp; if (*bnp > 0) { if ((*ptr == '[' && dir == BACKWARD) || (*ptr == ']' && dir == FORWARD)) --*bnp; ret...
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
188,531,510,794,689,560,000,000,000,000,000,000,000
29
patch 8.2.3428: using freed memory when replacing Problem: Using freed memory when replacing. (Dhiraj Mishra) Solution: Get the line pointer after calling ins_copychar().
static int mixer_ctl_feature_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct usb_mixer_elem_info *cval = kcontrol->private_data; int c, cnt, val, err; ucontrol->value.integer.value[0] = cval->min; if (cval->cmask) { cnt = 0; for (c = 0; c < MAX_CHANNELS; c++) { if (!(cv...
0
[ "CWE-416", "CWE-787" ]
linux
124751d5e63c823092060074bd0abaae61aaa9c4
69,490,934,678,286,470,000,000,000,000,000,000,000
30
ALSA: usb-audio: Kill stray URB at exiting USB-audio driver may leave a stray URB for the mixer interrupt when it exits by some error during probe. This leads to a use-after-free error as spotted by syzkaller like: ================================================================== BUG: KASAN: use-after-free in sn...
static void io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool force, struct task_struct *tsk, struct files_struct *files) { if (test_bit(0, &ctx->cq_check_overflow)) { /* iopoll syncs against uring_lock, not completion_lock */ if (ctx->flags & IORING_SETUP_IOPOLL) mutex_lock(&ctx->uring_l...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
119,020,083,646,390,360,000,000,000,000,000,000,000
13
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
EXPORTED char *mailbox_cache_get_env(struct mailbox *mailbox, const struct index_record *record, int token) { char *env; char *envtokens[NUMENVTOKENS]; char *field; if (mailbox_cacherecord(mailbox, record)) return NULL; ...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
77,900,082,996,185,200,000,000,000,000,000,000,000
31
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
bool Column_definition::fix_attributes_int(uint default_length) { if (length) return check_length(ER_TOO_BIG_DISPLAYWIDTH, MAX_FIELD_CHARLENGTH); length= default_length; return false; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
225,751,259,418,014,500,000,000,000,000,000,000,000
7
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...
uint is_row() const { return m_row_field_definitions != NULL; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
246,150,062,606,210,200,000,000,000,000,000,000,000
4
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 lo_listxattr(fuse_req_t req, fuse_ino_t ino, size_t size) { struct lo_data *lo = lo_data(req); g_autofree char *value = NULL; char procname[64]; struct lo_inode *inode; ssize_t ret; int saverr; int fd = -1; inode = lo_inode(req, ino); if (!inode) { fuse_reply_err...
0
[ "CWE-273" ]
qemu
449e8171f96a6a944d1f3b7d3627ae059eae21ca
47,611,865,619,599,160,000,000,000,000,000,000,000
131
virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358) At the start, drop membership of all supplementary groups. This is not required. If we have membership of "root" supplementary group and when we switch uid/gid using setresuid/setsgid, we still retain membership of existing supplemntary groups. An...
MagickExport Image *AcquireImage(const ImageInfo *image_info, ExceptionInfo *exception) { const char *option; Image *image; MagickStatusType flags; /* Allocate image structure. */ (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); image=(Image *) AcquireMagickMemory(sizeof(*im...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
50,324,362,622,875,520,000,000,000,000,000,000,000
170
Set pixel cache to undefined if any resource limit is exceeded
static bool pathmatch(const char* cookie_path, const char* request_uri) { size_t cookie_path_len; size_t uri_path_len; char* uri_path = NULL; char* pos; bool ret = FALSE; /* cookie_path must not have last '/' separator. ex: /sample */ cookie_path_len = strlen(cookie_path); if(1 == cookie_path_len) { ...
0
[ "CWE-119" ]
curl
b5f947b8ac0e282c61c75b69cd5b9d37dafc6959
100,435,968,694,281,430,000,000,000,000,000,000,000
70
cookie: cookie parser out of boundary memory access The internal libcurl function called sanitize_cookie_path() that cleans up the path element as given to it from a remote site or when read from a file, did not properly validate the input. If given a path that consisted of a single double-quote, libcurl would index a...
static int __init inet6_init(void) { struct list_head *r; int err = 0; BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > FIELD_SIZEOF(struct sk_buff, cb)); /* Register the socket-side information for inet6_create. */ for (r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r) INIT_LIST_HEAD(r); if (disable_ipv6_mod) { ...
0
[]
net
5f81bd2e5d804ca93f3ec8873451b22d2f454721
8,708,356,037,908,829,000,000,000,000,000,000,000
201
ipv6: export a stub for IPv6 symbols used by vxlan In case IPv6 is compiled as a module, introduce a stub for ipv6_sock_mc_join and ipv6_sock_mc_drop etc.. It will be used by vxlan module. Suggested by Ben. This is an ugly but easy solution for now. Cc: Ben Hutchings <bhutchings@solarflare.com> Cc: Stephen Hemminger...
plperl_spi_exec_prepared(char *query, HV *attr, int argc, SV **argv) { HV *ret_hv; SV **sv; int i, limit, spi_rv; char *nulls; Datum *argvalues; plperl_query_desc *qdesc; plperl_query_entry *hash_entry; /* * Execute the query inside a sub-transaction, so we can cope with errors * san...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
184,428,458,164,000,700,000,000,000,000,000,000,000
136
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
static void exif_tag_ht_dtor(zval *zv) { HashTable *ht = Z_PTR_P(zv); zend_hash_destroy(ht); free(ht); }
0
[ "CWE-125" ]
php-src
0c77b4307df73217283a4aaf9313e1a33a0967ff
235,466,578,148,888,980,000,000,000,000,000,000,000
6
Fixed bug #79282
static ssize_t fuse_file_read_iter(struct kiocb *iocb, struct iov_iter *to) { struct file *file = iocb->ki_filp; struct fuse_file *ff = file->private_data; struct inode *inode = file_inode(file); if (fuse_is_bad(inode)) return -EIO; if (FUSE_IS_DAX(inode)) return fuse_dax_read_iter(iocb, to); if (!(ff->ope...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
206,775,719,786,079,230,000,000,000,000,000,000,000
17
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
rsvg_cairo_get_surface_of_node (RsvgDrawingCtx *ctx, RsvgNode *drawable, double width, double height) { cairo_surface_t *surface; cairo_t *cr; RsvgCairoRender *save_render = (RsvgCairoRender *) ctx->render; ...
0
[]
librsvg
a51919f7e1ca9c535390a746fbf6e28c8402dc61
321,047,897,780,642,740,000,000,000,000,000,000,000
33
rsvg: Add rsvg_acquire_node() This function does proper recursion checks when looking up resources from URLs and thereby helps avoiding infinite loops when cyclic references span multiple types of elements.
char *ndpi_strncasestr(const char *s, const char *find, size_t slen) { char c; size_t len; if((c = *find++) != '\0') { len = strlen(find); do { char sc; do { if(slen-- < 1 || (sc = *s++) == '\0') return(NULL); } while (sc != c); if(len > slen) return(NULL); } while (str...
0
[ "CWE-125" ]
nDPI
61066fb106efa6d3d95b67e47b662de208b2b622
147,828,153,663,402,170,000,000,000,000,000,000,000
22
Added check for heap buffer overflow read
static bool ldm_parse_privhead(const u8 *data, struct privhead *ph) { bool is_vista = false; BUG_ON(!data || !ph); if (MAGIC_PRIVHEAD != get_unaligned_be64(data)) { ldm_error("Cannot find PRIVHEAD structure. LDM database is" " corrupt. Aborting."); return false; } ph->ver_major = get_unaligned_be16(data + ...
0
[ "CWE-119", "CWE-787" ]
linux
cae13fe4cc3f24820ffb990c09110626837e85d4
297,342,120,704,391,400,000,000,000,000,000,000,000
44
Fix for buffer overflow in ldm_frag_add not sufficient As Ben Hutchings discovered [1], the patch for CVE-2011-1017 (buffer overflow in ldm_frag_add) is not sufficient. The original patch in commit c340b1d64000 ("fs/partitions/ldm.c: fix oops caused by corrupted partition table") does not consider that, for subsequen...
uint STDCALL symver16_mysql_errno(MYSQL *mysql) { return mysql_errno(mysql);
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
91,646,706,038,247,310,000,000,000,000,000,000,000
4
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)
XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName) { if (parser == NULL) return XML_STATUS_ERROR; /* Block after XML_Parse()/XML_ParseBuffer() has been called. XXX There's no way for the caller to determine which of the XXX possible error cases caused the XML_STATUS_ERROR return. */ ...
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
220,310,112,684,619,500,000,000,000,000,000,000,000
25
xmlparse.c: Deny internal entities closing the doctype
byte* RemoteIo::mmap(bool /*isWriteable*/) { if ( !bigBlock_ ) { size_t nRealData = 0 ; size_t blockSize = p_->blockSize_; size_t blocks = (p_->size_ + blockSize -1)/blockSize ; bigBlock_ = new byte[blocks*blockSize] ; for ( size_t block = 0 ...
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
44,944,844,074,685,780,000,000,000,000,000,000,000
21
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
static ssize_t memcpy_count_show(struct device *dev, struct device_attribute *attr, char *buf) { struct dma_chan *chan; unsigned long count = 0; int i; int err; mutex_lock(&dma_list_mutex); chan = dev_to_dma_chan(dev); if (chan) { for_each_possible_cpu(i) count += per_cpu_ptr(chan->local, i)->memcpy_c...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
184,126,488,949,173,620,000,000,000,000,000,000,000
20
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
MaybeLocal<Object> Http2StreamPerformanceEntryTraits::GetDetails( Environment* env, const Http2StreamPerformanceEntry& entry) { Local<Object> obj = Object::New(env->isolate()); #define SET(name, val) \ if (!obj->Set( ...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
248,667,832,586,193,300,000,000,000,000,000,000,000
38
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
static int cdrom_mrw_probe_pc(struct cdrom_device_info *cdi) { struct packet_command cgc; char buffer[16]; init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ); cgc.timeout = HZ; cgc.quiet = 1; if (!cdrom_mode_sense(cdi, &cgc, MRW_MODE_PC, 0)) { cdi->mrw_mode_page = MRW_MODE_PC; return 0; } els...
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
122,850,445,830,960,140,000,000,000,000,000,000,000
20
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
bool ath_drain_all_txq(struct ath_softc *sc) { struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(sc->sc_ah); struct ath_txq *txq; int i; u32 npend = 0; if (test_bit(SC_OP_INVALID, &sc->sc_flags)) return true; ath9k_hw_abort_tx_dma(ah); /* Check if any queue remains active */ for (...
0
[ "CWE-362", "CWE-241" ]
linux
21f8aaee0c62708654988ce092838aa7df4d25d8
7,449,436,433,830,939,000,000,000,000,000,000,000
44
ath9k: protect tid->sched check We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That is race condition which can result of doing list_del(&tid->list) twice (second time with poisoned list node) and cause crash like shown below: [424271.637220] BUG: unable to handle kernel paging request at 00100104 [...
static bool imap_parser_is_next_text(struct imap_parser *parser) { const struct imap_arg *arg; size_t len; if (parser->cur_list != &parser->root_list) return FALSE; arg = array_back(&parser->root_list); if (arg->type != IMAP_ARG_ATOM) return FALSE; len = strlen(arg->_data.str); return len > 0 && arg->_dat...
0
[ "CWE-787" ]
core
85fcb895ca7f0bcb8ee72047fe0e1e78532ff90b
291,034,491,259,596,300,000,000,000,000,000,000,000
15
lib-imap: Don't accept strings with NULs IMAP doesn't allow NULs except in binary literals. We'll still allow them in regular literals as well, but just not in strings. This fixes a bug with unescaping a string with NULs: str_unescape() could have been called for memory that points outside the allocated string, causi...
node_new_enclosure_if_else(Node* cond, Node* Then, Node* Else) { Node* n; n = node_new_enclosure(ENCLOSURE_IF_ELSE); CHECK_NULL_RETURN(n); NODE_BODY(n) = cond; ENCLOSURE_(n)->te.Then = Then; ENCLOSURE_(n)->te.Else = Else; return n; }
0
[ "CWE-476" ]
oniguruma
850bd9b0d8186eb1637722b46b12656814ab4ad2
200,119,607,505,020,930,000,000,000,000,000,000,000
11
fix #87: Read unknown address in onig_error_code_to_str()
void audit_log_end(struct audit_buffer *ab) { if (!ab) return; if (!audit_rate_check()) { audit_log_lost("rate limit exceeded"); } else { struct nlmsghdr *nlh = nlmsg_hdr(ab->skb); nlh->nlmsg_len = ab->skb->len - NLMSG_HDRLEN; if (audit_pid) { skb_queue_tail(&audit_skb_queue, ab->skb); wake_up_inter...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
304,683,132,378,087,300,000,000,000,000,000,000,000
20
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
ep0_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) { struct dev_data *dev = fd->private_data; ssize_t retval = -ESRCH; /* report fd mode change before acting on it */ if (dev->setup_abort) { dev->setup_abort = 0; retval = -EIDRM; /* data and/or status stage for control request */...
0
[ "CWE-763" ]
linux
501e38a5531efbd77d5c73c0ba838a889bfc1d74
5,292,127,366,843,462,600,000,000,000,000,000,000
53
usb: gadget: clear related members when goto fail dev->config and dev->hs_config and dev->dev need to be cleaned if dev_config fails to avoid UAF. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Link: https://lore.kernel.org/r/20211231172138.7993-3-hbh25y@gmail.com Signed...
static int bar_read(struct pci_dev *dev, int offset, u32 * value, void *data) { struct pci_bar_info *bar = data; if (unlikely(!bar)) { pr_warn(DRV_NAME ": driver data not found for %s\n", pci_name(dev)); return XEN_PCI_ERR_op_failed; } *value = bar->which ? bar->len_val : bar->val; return 0; }
0
[ "CWE-284", "CWE-264" ]
linux
af6fc858a35b90e89ea7a7ee58e66628c55c776b
254,538,484,548,877,200,000,000,000,000,000,000,000
14
xen-pciback: limit guest control of command register Otherwise the guest can abuse that control to cause e.g. PCIe Unsupported Request responses by disabling memory and/or I/O decoding and subsequently causing (CPU side) accesses to the respective address ranges, which (depending on system configuration) may be fatal ...
static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf) { SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req); SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev); uint64_t nb_sectors; uint8_t *outbuf; int buflen; switch (req->cmd.buf[0]) { case INQUIRY: case MODE...
0
[ "CWE-193" ]
qemu
b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8
41,463,370,725,956,013,000,000,000,000,000,000,000
276
hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands This avoids an off-by-one read of 'mode_sense_valid' buffer in hw/scsi/scsi-disk.c:mode_sense_page(). Fixes: CVE-2021-3930 Cc: qemu-stable@nongnu.org Reported-by: Alexander Bulekov <alxndr@bu.edu> Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa...
static ssize_t iwl_dbgfs_monitor_data_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct iwl_trans *trans = file->private_data; struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); void *cpu_addr = (void *)trans->dbg.fw_mon[0].block, *curr_buf; struct...
0
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
227,619,065,615,904,900,000,000,000,000,000,000,000
82
iwlwifi: pcie: fix rb_allocator workqueue allocation We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Sig...
activate_parameters_install_free (ActivateParametersInstall *parameters_install) { if (parameters_install->slot) { g_object_remove_weak_pointer (G_OBJECT (parameters_install->slot), (gpointer *) &parameters_install->slot); } if (parameters_install->parent_window) { g_object_remove_we...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
127,385,317,942,701,790,000,000,000,000,000,000,000
22
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
void add_map_inc_bl(epoch_t e, bufferlist& bl) { return service.add_map_inc_bl(e, bl); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
138,113,745,015,761,170,000,000,000,000,000,000,000
3
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
rpc_C_GetMechanismList (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_SLOT_ID slot_id; CK_MECHANISM_TYPE_PTR mechanism_list; CK_ULONG count; BEGIN_CALL (GetMechanismList); IN_ULONG (slot_id); IN_ULONG_BUFFER (mechanism_list, count); PROCESS_CALL ((self, slot_id, mechanism_list, ...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
41,326,728,722,851,564,000,000,000,000,000,000,000
14
Check for arithmetic overflows before allocating
int advance_dma_data(struct rxe_dma_info *dma, unsigned int length) { struct rxe_sge *sge = &dma->sge[dma->cur_sge]; int offset = dma->sge_offset; int resid = dma->resid; while (length) { unsigned int bytes; if (offset >= sge->length) { sge++; dma->cur_sge++; offset = 0; if (dma->cur_sge >= d...
0
[ "CWE-190" ]
linux
647bf3d8a8e5777319da92af672289b2a6c4dc66
39,502,878,078,292,962,000,000,000,000,000,000,000
32
IB/rxe: Fix mem_check_range integer overflow Update the range check to avoid integer-overflow in edge case. Resolves CVE 2016-8636. Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <d...
av_cold int avcodec_close(AVCodecContext *avctx) { int i; if (!avctx) return 0; if (avcodec_is_open(avctx)) { FramePool *pool = avctx->internal->pool; if (CONFIG_FRAME_THREAD_ENCODER && avctx->internal->frame_thread_encoder && avctx->thread_count > 1) { ff_f...
0
[ "CWE-476" ]
FFmpeg
8df6884832ec413cf032dfaa45c23b1c7876670c
199,278,300,248,518,370,000,000,000,000,000,000,000
65
avcodec/utils: Check close before calling it Fixes: NULL pointer dereference Fixes: 15733/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IDF_fuzzer-5658616977162240 Reviewed-by: Paul B Mahol <onemda@gmail.com> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signe...
void IndexBoundsBuilder::intersectize(const OrderedIntervalList& oilA, OrderedIntervalList* oilB) { invariant(oilB); invariant(oilA.name == oilB->name); size_t oilAIdx = 0; const vector<Interval>& oilAIntervals = oilA.intervals; size_t oilBIdx = 0; vector<Interval>& oilBIntervals = oilB->inter...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
218,813,665,076,929,800,000,000,000,000,000,000,000
52
SERVER-44377 generate correct plan for indexed inequalities to null
static int unix_dgram_peer_wake_relay(wait_queue_entry_t *q, unsigned mode, int flags, void *key) { struct unix_sock *u; wait_queue_head_t *u_sleep; u = container_of(q, struct unix_sock, peer_wake); __remove_wait_queue(&unix_sk(u->peer_wake.private)->peer_wait, q); u->peer_wake.private = NULL; ...
0
[ "CWE-362" ]
linux
cbcf01128d0a92e131bd09f1688fe032480b65ca
204,652,130,517,986,320,000,000,000,000,000,000,000
19
af_unix: fix garbage collect vs MSG_PEEK unix_gc() assumes that candidate sockets can never gain an external reference (i.e. be installed into an fd) while the unix_gc_lock is held. Except for MSG_PEEK this is guaranteed by modifying inflight count under the unix_gc_lock. MSG_PEEK does not touch any variable protec...
static int cma_resolve_ib_udp(struct rdma_id_private *id_priv, struct rdma_conn_param *conn_param) { struct ib_cm_sidr_req_param req; struct ib_cm_id *id; void *private_data; int offset, ret; memset(&req, 0, sizeof req); offset = cma_user_data_offset(id_priv); req.private_data_len = offset + conn_param...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
268,369,180,984,794,530,000,000,000,000,000,000,000
55
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
atm_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { u_int caplen = h->caplen; u_int length = h->len; uint32_t llchdr; u_int hdrlen = 0; if (caplen < 1 || length < 1) { ND_PRINT((ndo, "%s", tstr)); return (caplen); } /* Cisco Style NLPID ? */ if ...
1
[ "CWE-125", "CWE-787" ]
tcpdump
1dcd10aceabbc03bf571ea32b892c522cbe923de
256,732,994,024,372,400,000,000,000,000,000,000,000
75
CVE-2017-12897/ISO CLNS: Use ND_TTEST() for the bounds checks in isoclns_print(). This fixes a buffer over-read discovered by Kamil Frankowicz. Don't pass the remaining caplen - that's too hard to get right, and we were getting it wrong in at least one case; just use ND_TTEST(). Add a test using the capture file sup...
static int TIFFWriteDirectoryTagDouble(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value) { if (dir==NULL) { (*ndir)++; return(1); } return(TIFFWriteDirectoryTagCheckedDouble(tif,ndir,dir,tag,value)); }
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
41,614,283,250,492,740,000,000,000,000,000,000,000
9
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
CairoFont::getGlyph(CharCode code, Unicode *u, int uLen) { FT_UInt gid; if (codeToGID && code < codeToGIDLen) { gid = (FT_UInt)codeToGID[code]; } else { gid = (FT_UInt)code; } return gid; }
0
[ "CWE-20" ]
poppler
1a531dcfee1c6fc79a414c38cbe7327fbf9a59d8
324,412,137,948,543,600,000,000,000,000,000,000,000
11
Fix a crash with invalid embedded fonts
bool Item_exists_subselect::fix_fields(THD *thd, Item **ref) { DBUG_ENTER("Item_exists_subselect::fix_fields"); if (exists_transformed) DBUG_RETURN( !( (*ref)= new (thd->mem_root) Item_int(thd, 1))); DBUG_RETURN(Item_subselect::fix_fields(thd, ref)); }
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
194,829,205,267,966,500,000,000,000,000,000,000,000
7
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...
server_client_is_default_key_table(struct client *c, struct key_table *table) { return (strcmp(table->name, server_client_get_key_table(c)) == 0); }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
100,853,644,816,692,730,000,000,000,000,000,000,000
4
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
ModuleExport void UnregisterPS2Image(void) { (void) UnregisterMagickInfo("EPS2"); (void) UnregisterMagickInfo("PS2"); }
0
[ "CWE-401" ]
ImageMagick
ba0e05ee5a983c202f1030c7901ed6b3ed7d652c
191,760,587,530,867,440,000,000,000,000,000,000,000
5
https://github.com/ImageMagick/ImageMagick/issues/1542
static int check_map_access_adj(struct bpf_verifier_env *env, u32 regno, int off, int size) { struct bpf_verifier_state *state = &env->cur_state; struct bpf_reg_state *reg = &state->regs[regno]; int err; /* We adjusted the register to this map value, so we * need to change off and size to min_value and max_v...
0
[ "CWE-200" ]
linux
0d0e57697f162da4aa218b5feafe614fb666db07
223,346,105,503,549,760,000,000,000,000,000,000,000
43
bpf: don't let ldimm64 leak map addresses on unprivileged The patch fixes two things at once: 1) It checks the env->allow_ptr_leaks and only prints the map address to the log if we have the privileges to do so, otherwise it just dumps 0 as we would when kptr_restrict is enabled on %pK. Given the latter is of...
static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words) { BN_ULONG *A,*a = NULL; const BN_ULONG *B; int i; bn_check_top(b); if (words > (INT_MAX/(4*BN_BITS2))) { BNerr(BN_F_BN_EXPAND_INTERNAL,BN_R_BIGNUM_TOO_LONG); return NULL; } if (BN_get_flags(b,BN_FLG_STATIC_DATA)) { BNerr(BN_F_BN_EXPAN...
0
[ "CWE-310" ]
openssl
f9b6c0ba4c02497782f801e3c45688f3efaac55c
57,685,891,203,463,360,000,000,000,000,000,000,000
63
Fix for CVE-2014-0076 Fix for the attack described in the paper "Recovering OpenSSL ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack" by Yuval Yarom and Naomi Benger. Details can be obtained from: http://eprint.iacr.org/2014/140 Thanks to Yuval Yarom and Naomi Benger for discovering this flaw and to Yuva...
CompileKeymap(XkbFile *file, struct xkb_keymap *keymap, enum merge_mode merge) { bool ok; XkbFile *files[LAST_KEYMAP_FILE_TYPE + 1] = { NULL }; enum xkb_file_type type; struct xkb_context *ctx = keymap->ctx; /* Collect section files and check for duplicates. */ for (file = (XkbFile *) file->def...
0
[ "CWE-476" ]
libxkbcommon
917636b1d0d70205a13f89062b95e3a0fc31d4ff
78,373,742,293,605,700,000,000,000,000,000,000,000
67
xkbcomp: fix crash when parsing an xkb_geometry section xkb_geometry sections are ignored; previously the had done so by returning NULL for the section's XkbFile, however some sections of the code do not expect this. Instead, create an XkbFile for it, it will never be processes and discarded later. Caught with the af...
int ssl3_accept(SSL *s) { BUF_MEM *buf; unsigned long alg_k, Time = (unsigned long)time(NULL); void (*cb) (const SSL *ssl, int type, int val) = NULL; int ret = -1; int new_state, state, skip = 0; RAND_add(&Time, sizeof(Time), 0); ERR_clear_error(); clear_sys_error(); if (s->info_ca...
0
[]
openssl
d6be3124f22870f1888c532523b74ea5d89795eb
151,430,494,313,199,300,000,000,000,000,000,000,000
678
Fix PSK handling. The PSK identity hint should be stored in the SSL_SESSION structure and not in the parent context (which will overwrite values used by other SSL structures with the same SSL_CTX). Use BUF_strndup when copying identity as it may not be null terminated. Reviewed-by: Tim Hudson <tjh@openssl.org> (cher...
delay(int us) { struct timeval tv; tv.tv_sec = 0; tv.tv_usec = us; (void) select(1, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, &tv); return 1; }
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
330,854,807,174,880,100,000,000,000,000,000,000,000
9
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
void avahi_server_prepare_matching_responses(AvahiServer *s, AvahiInterface *i, AvahiKey *k, int unicast_response) { assert(s); assert(i); assert(k); /* Push all records that match the specified key to the record list */ if (avahi_key_is_pattern(k)) { AvahiEntry *e; /* Handle ANY ...
0
[ "CWE-399" ]
avahi
3093047f1aa36bed8a37fa79004bf0ee287929f4
325,022,608,024,745,800,000,000,000,000,000,000,000
40
Don't get confused by UDP packets with a source port that is zero This is a fix for rhbz 475394. Problem identified by Hugo Dias.
NAN_METHOD(XmlDocument::Encoding) { Nan::HandleScope scope; XmlDocument* document = Nan::ObjectWrap::Unwrap<XmlDocument>(info.Holder()); assert(document); // if no args, get the encoding if (info.Length() == 0 || info[0]->IsUndefined()) { if (document->xml_obj->encoding) return ...
0
[ "CWE-400" ]
libxmljs
2501807bde9b38cfaed06d1e140487516d91379d
300,699,589,935,077,670,000,000,000,000,000,000,000
25
Ensure parseXml/parseHtml input is string or buffer (#594)
static int jas_cmshapmatlut_invert(jas_cmshapmatlut_t *invlut, jas_cmshapmatlut_t *lut, int n) { int i; int j; int k; jas_cmreal_t ax; jas_cmreal_t ay; jas_cmreal_t bx; jas_cmreal_t by; jas_cmreal_t sx; jas_cmreal_t sy; assert(n >= 2); if (invlut->data) { jas_free(invlut->data); invlut->data = 0; } /...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
174,067,106,391,873,250,000,000,000,000,000,000,000
70
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...
static void git_proxy_connect(int fd[2], char *host) { const char *port = STR(DEFAULT_GIT_PORT); char *colon, *end; const char *argv[4]; struct child_process proxy; if (host[0] == '[') { end = strchr(host + 1, ']'); if (end) { *end = 0; end++; host++; } else end = host; } else end = host; co...
0
[]
git
73bb33a94ec67a53e7d805b12ad9264fa25f4f8d
45,512,503,821,801,460,000,000,000,000,000,000,000
37
daemon: Strictly parse the "extra arg" part of the command Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon") git daemon enters an infinite loop and never terminates if a client hides any extra arguments in the initial request line which is not exactly "\0host=blah\0". Since that change, a client m...
static void ath6kl_usb_usb_transmit_complete(struct urb *urb) { struct ath6kl_urb_context *urb_context = urb->context; struct ath6kl_usb_pipe *pipe = urb_context->pipe; struct sk_buff *skb; ath6kl_dbg(ATH6KL_DBG_USB_BULK, "%s: pipe: %d, stat:%d, len:%d\n", __func__, pipe->logical_pipe_num, urb->status, ...
0
[ "CWE-476" ]
linux
39d170b3cb62ba98567f5c4f40c27b5864b304e5
63,406,481,168,596,810,000,000,000,000,000,000,000
25
ath6kl: fix a NULL-ptr-deref bug in ath6kl_usb_alloc_urb_from_pipe() The `ar_usb` field of `ath6kl_usb_pipe_usb_pipe` objects are initialized to point to the containing `ath6kl_usb` object according to endpoint descriptors read from the device side, as shown below in `ath6kl_usb_setup_pipe_resources`: for (i = 0; i <...
TEST(ArrayOpsTest, ExpandDims_ShapeFn) { ShapeInferenceTestOp op("ExpandDims"); op.input_tensors.resize(2); // With unknown dim tensor value, output is unknown. INFER_OK(op, "?;?", "?"); Tensor dim_t; op.input_tensors[1] = &dim_t; // Expand at front of tensor. for (int32_t idx : {0, -4}) { dim_t =...
0
[ "CWE-125" ]
tensorflow
7cf73a2274732c9d82af51c2bc2cf90d13cd7e6d
220,249,351,465,607,070,000,000,000,000,000,000,000
78
Address QuantizeAndDequantizeV* heap oob. Added additional checks for the 'axis' attribute. PiperOrigin-RevId: 402446942 Change-Id: Id2f6b82e4e740d0550329be02621c46466b5a5b9
dir_s_aref(int argc, VALUE *argv, VALUE obj) { VALUE opts, base; argc = rb_scan_args(argc, argv, "*:", NULL, &opts); dir_glob_options(opts, &base, NULL); if (argc == 1) { return rb_push_glob(argv[0], base, 0); } return dir_globs(argc, argv, base, 0); }
0
[ "CWE-22" ]
ruby
bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8
60,816,615,918,292,480,000,000,000,000,000,000,000
10
dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
void Compute(OpKernelContext* ctx) override { const Tensor* input_tensor; OP_REQUIRES_OK(ctx, ctx->input("input", &input_tensor)); // Go through all the strings in `input`. const auto& input_vec = input_tensor->flat<tstring>(); std::unique_ptr<WrappedConverter> input_encoder = absl::make...
0
[ "CWE-824", "CWE-787" ]
tensorflow
2e0ee46f1a47675152d3d865797a18358881d7a6
207,207,146,793,827,600,000,000,000,000,000,000,000
69
Ensure non-empty input_splits in tf.raw_ops.UnicodeEncode PiperOrigin-RevId: 387170080 Change-Id: I3b489acc51c5cb4124c535b9df7cc6e62ef21766
String *Item::check_well_formed_result(String *str, bool send_error) { /* Check whether we got a well-formed string */ CHARSET_INFO *cs= str->charset(); uint wlen= str->well_formed_length(); null_value= false; if (unlikely(wlen < str->length())) { THD *thd= current_thd; char hexbuf[7]; uint diff...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
136,617,874,629,351,040,000,000,000,000,000,000,000
35
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
inline v8::Local<v8::Value> Get() { if (_persistent.IsEmpty()) { return v8::Local<v8::Value>(); } else { return v8::Local<v8::Value>::New(_env->isolate, _persistent); } }
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
19,424,497,838,087,044,000,000,000,000,000,000,000
7
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
GC_INNER ptr_t GC_alloc_large(size_t lb, int k, unsigned flags) { struct hblk * h; word n_blocks; ptr_t result; GC_bool retry = FALSE; /* Round up to a multiple of a granule. */ lb = (lb + GRANULE_BYTES - 1) & ~(GRANULE_BYTES - 1); n_blocks = OBJ_SZ_TO_BLOCKS(lb); if (!EXPECT(GC_is_in...
0
[ "CWE-189" ]
bdwgc
be9df82919960214ee4b9d3313523bff44fd99e1
33,024,980,530,119,920,000,000,000,000,000,000,000
38
Fix allocation size overflows due to rounding. * malloc.c (GC_generic_malloc): Check if the allocation size is rounded to a smaller value. * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
Document getSpec() { return DOC("input" << DOC_ARRAY(DOC_ARRAY(1 << 2) << Value(BSONNULL)) << "expected" << DOC("$setIntersection" << BSONNULL << "$setUnion" << BSONNULL << "$setDifference" ...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
78,826,091,610,465,170,000,000,000,000,000,000,000
9
SERVER-38070 fix infinite loop in agg expression
static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id) { int r; struct kvm_vcpu *vcpu; if (id >= KVM_MAX_VCPU_ID) return -EINVAL; mutex_lock(&kvm->lock); if (kvm->created_vcpus == KVM_MAX_VCPUS) { mutex_unlock(&kvm->lock); return -EINVAL; } kvm->created_vcpus++; mutex_unlock(&kvm->lock); vcpu =...
0
[ "CWE-416", "CWE-362" ]
linux
cfa39381173d5f969daf43582c95ad679189cbc9
141,292,904,952,677,000,000,000,000,000,000,000,000
73
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) kvm_ioctl_create_device() does the following: 1. creates a device that holds a reference to the VM object (with a borrowed reference, the VM's refcount has not been bumped yet) 2. initializes the device 3. transfers the reference to the device t...
static int __kvm_write_guest_page(struct kvm *kvm, struct kvm_memory_slot *memslot, gfn_t gfn, const void *data, int offset, int len) { int r; unsigned long addr; addr = gfn_to_hva_memslot(memslot, gfn); if (kvm_is_error_hva(addr)) return -EFAULT; r = __copy_to_user((void __user *)addr + off...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
94,977,448,830,575,480,000,000,000,000,000,000,000
16
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) { struct nfs_server *server; struct nfs_inode *nfsi = NFS_I(inode); loff_t cur_isize, new_isize; unsigned long invalid = 0; unsigned long now = jiffies; dfprintk(VFS, "NFS: %s(%s/%ld ct=%d info=0x%x)\n", __func__, inode->i_sb->s_id, ino...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
100,138,549,557,540,870,000,000,000,000,000,000,000
148
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr, char *plimit) { int slen; int rootflag; struct SL_component *oldslp; struct SL_component *slp; slen = rr->len - 5; slp = &rr->u.SL.link; while (slen > 1) { rootflag = 0; switch (slp->flags & ~1) { case 0: if (slp->len > plimit - rpnt) ...
0
[ "CWE-20", "CWE-399" ]
linux
410dd3cf4c9b36f27ed4542ee18b1af5e68645a4
241,621,424,959,903,140,000,000,000,000,000,000,000
67
isofs: Fix unbounded recursion when processing relocated directories We did not check relocated directory in any way when processing Rock Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL entry pointing to another CL entry leading to possibly unbounded recursion in kernel code and thus stack overflow...
CImg<Tuchar> get_CMYtoRGB() const { return CImg<Tuchar>(*this,false).CMYtoRGB(); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
271,427,043,129,943,500,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.
void v9fs_path_init(V9fsPath *path) { path->data = NULL; path->size = 0; }
0
[ "CWE-362" ]
qemu
89fbea8737e8f7b954745a1ffc4238d377055305
154,416,785,827,421,030,000,000,000,000,000,000,000
5
9pfs: Fully restart unreclaim loop (CVE-2021-20181) Depending on the client activity, the server can be asked to open a huge number of file descriptors and eventually hit RLIMIT_NOFILE. This is currently mitigated using a reclaim logic : the server closes the file descriptors of idle fids, based on the assumption that...
static void __exit dn_rtmsg_fini(void) { nf_unregister_hook(&dnrmg_ops); netlink_kernel_release(dnrmg); }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
282,697,647,240,626,700,000,000,000,000,000,000,000
5
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static void vrend_hw_emit_rs(struct vrend_context *ctx) { struct pipe_rasterizer_state *state = &ctx->sub->rs_state; int i; if (has_feature(feat_depth_clamp)) { if (state->depth_clip) glDisable(GL_DEPTH_CLAMP); else glEnable(GL_DEPTH_CLAMP); } if (vrend_state.use_gles) { ...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
151,845,902,966,946,900,000,000,000,000,000,000,000
262
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
QPDFObjectHandle::rotatePage(int angle, bool relative) { if ((angle % 90) != 0) { throw std::runtime_error( "QPDF::rotatePage called with an" " angle that is not a multiple of 90"); } int new_angle = angle; if (relative) { int old_angle = 0; bool f...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
65,455,907,128,145,750,000,000,000,000,000,000,000
53
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) { #ifdef CONFIG_PPC64 unsigned long load_addr = regs->gpr[2]; /* saved by ELF_PLAT_INIT */ #endif /* * If we exec out of a kernel thread then thread.regs will not be * set. Do it now. */ if (!current->thread.regs) { struct pt_re...
0
[]
linux
5d176f751ee3c6eededd984ad409bff201f436a7
73,818,563,484,265,180,000,000,000,000,000,000,000
115
powerpc: tm: Enable transactional memory (TM) lazily for userspace Currently the MSR TM bit is always set if the hardware is TM capable. This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and TFAIR) must be swapped for each process regardless of if they use TM. For processes that don't use TM the TM MSR ...