func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
auth_server_connection_input_line(struct auth_server_connection *conn, const char *line) { const char *const *args; if (conn->client->debug) i_debug("auth input: %s", line); args = t_strsplit_tabescaped(line); if (args[0] == NULL) { i_error("Auth server sent empty line"); return -1; } if (strcmp(arg...
0
[]
core
a9b135760aea6d1790d447d351c56b78889dac22
114,749,812,665,068,270,000,000,000,000,000,000,000
34
lib-auth: Remove request after abort Otherwise the request will still stay in hash table and get dereferenced when all requests are aborted causing an attempt to access free'd memory. Found by Apollon Oikonomopoulos <apoikos@debian.org> Broken in 1a29ed2f96da1be22fa5a4d96c7583aa81b8b060
static int on_osc(const char *command, size_t cmdlen, void *user) { VTermState *state = user; if(cmdlen < 2) return 0; if(strneq(command, "0;", 2)) { settermprop_string(state, VTERM_PROP_ICONNAME, command + 2, cmdlen - 2); settermprop_string(state, VTERM_PROP_TITLE, command + 2, cmdlen - 2); ret...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
15,594,523,588,752,990,000,000,000,000,000,000,000
46
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static void FUNC(pred_angular_2)(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int c_idx, int mode) { FUNC(pred_angular)(src, top, left, stride, c_idx, mode, 1 << 4); }
0
[ "CWE-703" ]
FFmpeg
dfefc9097e9b4bb20442e65454a40043bd189b3d
153,692,117,844,144,460,000,000,000,000,000,000,000
6
avcodec/hevcpred_template: also initialize top[-1] for constrained intra prediction Fixes out of array read Fixes: 387713a12dc5cfa27fcb4178084ce1ea-asan_stack-oob_131176a_1182_cov_3861068719_CAINIT_C_SHARP_3.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at...
win_altframe( win_T *win, tabpage_T *tp) /* tab page "win" is in, NULL for current */ { frame_T *frp; frame_T *other_fr, *target_fr; if (tp == NULL ? ONE_WINDOW : tp->tp_firstwin == tp->tp_lastwin) return alt_tabpage()->tp_curwin->w_frame; frp = win->w_frame; if (frp->fr_prev == NULL) ...
0
[ "CWE-416" ]
vim
ec66c41d84e574baf8009dbc0bd088d2bc5b2421
286,052,349,448,869,300,000,000,000,000,000,000,000
40
patch 8.1.2136: using freed memory with autocmd from fuzzer Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra, Dominique Pelle) Solution: Avoid using "wp" after autocommands. (closes #5041)
ExprResolveLhs(struct xkb_context *ctx, const ExprDef *expr, const char **elem_rtrn, const char **field_rtrn, ExprDef **index_rtrn) { switch (expr->expr.op) { case EXPR_IDENT: *elem_rtrn = NULL; *field_rtrn = xkb_atom_text(ctx, expr->ident.ident); *index_rtr...
1
[ "CWE-476" ]
libxkbcommon
bb4909d2d8fa6b08155e449986a478101e2b2634
118,727,616,497,587,450,000,000,000,000,000,000,000
26
Fail expression lookup on invalid atoms If we fail atom lookup, then we should not claim that we successfully looked up the expression. Signed-off-by: Daniel Stone <daniels@collabora.com>
gnutls_cipher_get_key_size (gnutls_cipher_algorithm_t algorithm) { /* In bytes */ size_t ret = 0; GNUTLS_ALG_LOOP (ret = p->keysize); return ret; }
0
[ "CWE-310" ]
gnutls
34d87a7c3f12794a3ec2305cd2fdbae152bf2a76
286,076,859,646,175,530,000,000,000,000,000,000,000
7
(_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the NULL OID value in the hash_algorithms array, which happens when the input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160. Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>.
JVM_IsNaN(jdouble dbl) { Trc_SC_IsNaN(*(jlong*)&dbl); return IS_NAN_DBL(dbl); }
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
66,731,596,798,372,970,000,000,000,000,000,000,000
5
Clean up jio_snprintf and jio_vfprintf Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659 Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg, struct msghdr *msg_sys, unsigned int flags, int nosec) { struct compat_msghdr __user *msg_compat = (struct compat_msghdr __user *)msg; struct iovec iovstack[UIO_FASTIOV]; struct iovec *iov = iovstack; unsigned long cmsg_ptr; in...
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
160,850,394,342,654,380,000,000,000,000,000,000,000
68
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
static void calipso_doi_free(struct calipso_doi *doi_def) { kfree(doi_def); }
0
[ "CWE-416" ]
linux
ad5d07f4a9cd671233ae20983848874731102c08
5,105,497,289,687,760,000,000,000,000,000,000,000
4
cipso,calipso: resolve a number of problems with the DOI refcounts The current CIPSO and CALIPSO refcounting scheme for the DOI definitions is a bit flawed in that we: 1. Don't correctly match gets/puts in netlbl_cipsov4_list(). 2. Decrement the refcount on each attempt to remove the DOI from the DOI list, only re...
_equalDropRoleStmt(const DropRoleStmt *a, const DropRoleStmt *b) { COMPARE_NODE_FIELD(roles); COMPARE_SCALAR_FIELD(missing_ok); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
85,662,345,341,745,800,000,000,000,000,000,000,000
7
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
cr_input_get_end_of_line (CRInput const * a_this, gboolean * a_eol) { g_return_val_if_fail (a_this && PRIVATE (a_this) && a_eol, CR_BAD_PARAM_ERROR); *a_eol = PRIVATE (a_this)->end_of_line; return CR_OK; }
0
[ "CWE-125" ]
libcroco
898e3a8c8c0314d2e6b106809a8e3e93cf9d4394
320,241,198,241,904,870,000,000,000,000,000,000,000
9
input: check end of input before reading a byte When reading bytes we weren't check that the index wasn't out of bound and this could produce an invalid read which could deal to a security bug.
static inline int GetFirstGlobbingEntry(const std::vector<std::string>& dirs) { int i = 0; for (const auto& d : dirs) { if (IsGlobbingPattern(d)) { break; } i++; } return i; }
0
[ "CWE-125" ]
tensorflow
8b5b9dc96666a3a5d27fad7179ff215e3b74b67c
147,809,132,850,302,040,000,000,000,000,000,000,000
10
Completely rewrite `GetMatchingPaths`. The current parallel implementation is too complex (lambda inside lambda, two levels of parallelism) and has a read outside of bounds issue. The new implementation cleans up artifacts from the previous implementations that were left in the code as it evolves. We add multiple hel...
void fpar_box_del(GF_Box *s) { FilePartitionBox *ptr = (FilePartitionBox *)s; if (ptr == NULL) return; if (ptr->scheme_specific_info) gf_free(ptr->scheme_specific_info); if (ptr->entries) gf_free(ptr->entries); gf_free(ptr); }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
264,803,540,095,594,700,000,000,000,000,000,000,000
8
fixed #2255
dwg_ref_object (const Dwg_Data *restrict dwg, Dwg_Object_Ref *restrict ref) { if (!ref) return NULL; if (ref->obj && !dwg->dirty_refs) return ref->obj; // Without obj we don't get an absolute_ref from relative OFFSETOBJHANDLE // handle types. if ((ref->handleref.code < 6 && dwg_resolve_handlere...
0
[ "CWE-787" ]
libredwg
ecf5183d8b3b286afe2a30021353b7116e0208dd
83,181,658,082,594,320,000,000,000,000,000,000,000
22
dwg_section_wtype: fix fuzzing overflow with illegal and overlong section names. Fixes GH #349, #352 section names cannot be longer than 24
pfm_flush_pmds(struct task_struct *task, pfm_context_t *ctx) { u64 pmc0; unsigned long mask2, val, pmd_val, ovfl_val; int i, can_access_pmu = 0; int is_self; /* * is the caller the task being monitored (or which initiated the * session for system wide measurements) */ is_self = ctx->ctx_task == task ? 1 : ...
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
48,376,758,959,585,920,000,000,000,000,000,000,000
108
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
virtio_pci_modern_pio_read(struct vmctx *ctx, int vcpu, struct pci_vdev *dev, int baridx, uint64_t offset, int size) { /* guest driver should not read notify pio */ return 0; }
0
[ "CWE-476" ]
acrn-hypervisor
154fe59531c12b82e26d1b24b5531f5066d224f5
318,732,430,637,706,840,000,000,000,000,000,000,000
6
dm: validate inputs in vq_endchains inputs shall be validated to avoid NULL pointer access. Tracked-On: #6129 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
blk_status_t blk_insert_cloned_request(struct request_queue *q, struct request *rq) { unsigned long flags; int where = ELEVATOR_INSERT_BACK; if (blk_cloned_rq_check_limits(q, rq)) return BLK_STS_IOERR; if (rq->rq_disk && should_fail_request(&rq->rq_disk->part0, blk_rq_bytes(rq))) return BLK_STS_IOERR; ...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
50,383,514,738,956,130,000,000,000,000,000,000,000
45
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...
yang_fill_import(struct lys_module *module, struct lys_import *imp_old, struct lys_import *imp_new, char *value, struct unres_schema *unres) { const char *exp; int rc; if (!imp_old->prefix) { LOGVAL(module->ctx, LYE_MISSCHILDSTMT, LY_VLOG_NONE, NULL, "prefix", "import"); go...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
199,433,526,293,686,030,000,000,000,000,000,000,000
33
yang parser BUGFIX double free Fixes #742
SDL_FreePalette(SDL_Palette * palette) { if (!palette) { SDL_InvalidParamError("palette"); return; } if (--palette->refcount > 0) { return; } SDL_free(palette->colors); SDL_free(palette); }
0
[ "CWE-703", "CWE-787" ]
SDL
8c91cf7dba5193f5ce12d06db1336515851c9ee9
311,223,600,482,747,660,000,000,000,000,000,000,000
12
Always create a full 256-entry map in case color values are out of range Fixes https://github.com/libsdl-org/SDL/issues/5042
void jslKill() { lex->tk = LEX_EOF; // safety ;) if (lex->it.var) jsvLockAgain(lex->it.var); // see jslGetNextCh jsvStringIteratorFree(&lex->it); if (lex->tokenValue) { jsvUnLock(lex->tokenValue); lex->tokenValue = 0; } jsvUnLock(lex->sourceVar); lex->tokenStart.it.var = 0; lex->tokenStart.currC...
0
[ "CWE-787" ]
Espruino
bed844f109b6c222816740555068de2e101e8018
325,823,938,435,558,230,000,000,000,000,000,000,000
12
remove strncpy usage as it's effectively useless, replace with an assertion since fn is only used internally (fix #1426)
static uint64_t pxa2xx_i2c_read(void *opaque, hwaddr addr, unsigned size) { PXA2xxI2CState *s = (PXA2xxI2CState *) opaque; I2CSlave *slave; addr -= s->offset; switch (addr) { case ICR: return s->control; case ISR: return s->status | (i2c_bus_busy(...
0
[ "CWE-119" ]
qemu
caa881abe0e01f9931125a0977ec33c5343e4aa7
158,095,073,787,500,360,000,000,000,000,000,000,000
29
pxa2xx: avoid buffer overrun on incoming migration CVE-2013-4533 s->rx_level is read from the wire and used to determine how many bytes to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the length of s->rx_fifo[] the buffer can be overrun with arbitrary data from the wire. Fix this by validating rx_leve...
static void handle_refs(const char *submodule, struct rev_info *revs, unsigned flags, int (*for_each)(const char *, each_ref_fn, void *)) { struct all_refs_cb cb; init_all_refs_cb(&cb, revs, flags); for_each(submodule, handle_one_ref, &cb); }
0
[]
git
a937b37e766479c8e780b17cce9c4b252fd97e40
186,659,764,688,802,840,000,000,000,000,000,000,000
7
revision: quit pruning diff more quickly when possible When the revision traversal machinery is given a pathspec, we must compute the parent-diff for each commit to determine which ones are TREESAME. We set the QUICK diff flag to avoid looking at more entries than we need; we really just care whether there are any cha...
static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception) { Image *image, *svg_image; MagickBooleanType status; assert(image_info != (const ImageInfo *) NULL); assert(image_info->signature == MagickCoreSignature); assert(exception != (ExceptionInfo *) NULL); if (image_in...
1
[ "CWE-674" ]
ImageMagick6
6ba5e4b1673d75988d8dde38118b495a342823c8
206,173,432,474,645,020,000,000,000,000,000,000,000
42
[FG-VD-19-136] ImageMagick Convert SVG MacOS Denial Of Service
static bool match_scancode(struct hid_usage *usage, unsigned int cur_idx, unsigned int scancode) { return (usage->hid & (HID_USAGE_PAGE | HID_USAGE)) == scancode; }
0
[ "CWE-787" ]
linux
35556bed836f8dc07ac55f69c8d17dce3e7f0e25
194,391,031,702,860,600,000,000,000,000,000,000,000
5
HID: core: Sanitize event code and type when mapping input When calling into hid_map_usage(), the passed event code is blindly stored as is, even if it doesn't fit in the associated bitmap. This event code can come from a variety of sources, including devices masquerading as input devices, only a bit more "programmab...
static void set_cloexec_flag(const int fd) { fcntl(fd, F_SETFD, FD_CLOEXEC); }
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
2,310,150,978,714,816,200,000,000,000,000,000,000
4
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
read_line(const char *prompt, int start) { TBOOLEAN more = FALSE; int last = 0; current_prompt = prompt; /* Once we start to read a new line, the tokens pointing into the old */ /* line are no longer valid. We used to _not_ clear things here, but */ /* that lead to errors when a mouse-trigger...
0
[ "CWE-415" ]
gnuplot
052cbd17c3cbbc602ee080b2617d32a8417d7563
323,716,231,702,174,200,000,000,000,000,000,000,000
64
successive failures of "set print <foo>" could cause double-free Bug #2312
static inline u32 twd_fxsr_to_i387(struct fxregs_state *fxsave) { struct _fpxreg *st; u32 tos = (fxsave->swd >> 11) & 7; u32 twd = (unsigned long) fxsave->twd; u32 tag; u32 ret = 0xffff0000u; int i; for (i = 0; i < 8; i++, twd >>= 1) { if (twd & 0x1) { st = FPREG_ADDR(fxsave, (i - tos) & 7); switch (st...
0
[ "CWE-200" ]
linux
814fb7bb7db5433757d76f4c4502c96fc53b0b5e
251,251,177,298,101,800,000,000,000,000,000,000,000
40
x86/fpu: Don't let userspace set bogus xcomp_bv On x86, userspace can use the ptrace() or rt_sigreturn() system calls to set a task's extended state (xstate) or "FPU" registers. ptrace() can set them for another task using the PTRACE_SETREGSET request with NT_X86_XSTATE, while rt_sigreturn() can set them for the curr...
static pfn_t kvm_pin_pages(struct kvm *kvm, struct kvm_memory_slot *slot, gfn_t gfn, unsigned long size) { gfn_t end_gfn; pfn_t pfn; pfn = gfn_to_pfn_memslot(kvm, slot, gfn); end_gfn = gfn + (size >> PAGE_SHIFT); gfn += 1; if (is_error_pfn(pfn)) return pfn; while (gfn < end_gfn) gfn_to_pfn_me...
0
[ "CWE-264" ]
kvm
32f6daad4651a748a58a3ab6da0611862175722f
289,058,182,511,519,150,000,000,000,000,000,000,000
18
KVM: unmap pages from the iommu when slots are removed We've been adding new mappings, but not destroying old mappings. This can lead to a page leak as pages are pinned using get_user_pages, but only unpinned with put_page if they still exist in the memslots list on vm shutdown. A memslot that is destroyed while an i...
get_viminfo_parameter(int type) { char_u *p; p = find_viminfo_parameter(type); if (p != NULL && VIM_ISDIGIT(*p)) return atoi((char *)p); return -1; }
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
274,834,870,594,683,670,000,000,000,000,000,000,000
9
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
static JSValue js_bs_get_u64_le(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { GET_JSBS if (!bs) return GF_JS_EXCEPTION(ctx); return JS_NewInt64(ctx, gf_bs_read_u64_le(bs) ); }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
124,700,969,416,123,440,000,000,000,000,000,000,000
6
fixed #2138
void sdp_del(GF_Box *s) { GF_SDPBox *ptr = (GF_SDPBox *)s; if (ptr->sdpText) gf_free(ptr->sdpText); gf_free(ptr); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
279,069,657,387,797,770,000,000,000,000,000,000,000
7
prevent dref memleak on invalid input (#1183)
void visit(NotPredicate &ope) override { ope.ope_->accept(*this); found_ope = npd(found_ope); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
28,882,400,318,167,600,000,000,000,000,000,000,000
4
Fix #122
tcp_option_len_check(proto_item* length_item, packet_info *pinfo, guint len, guint optlen) { if (len != optlen) { /* Bogus - option length isn't what it's supposed to be for this option. */ expert_add_info_format(pinfo, length_item, &ei_tcp_opt_len_invalid, "option len...
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
154,522,424,541,514,130,000,000,000,000,000,000,000
11
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
inline void swap(T1& a1, T1& b1, T2& a2, T2& b2, T3& a3, T3& b3, T4& a4, T4& b4, T5& a5, T5& b5, T6& a6, T6& b6, T7& a7, T7& b7, T8& a8, T8& b8) { cimg::swap(a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7); cimg::swap(a8,b8); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
65,445,356,192,444,950,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.
void abort_creds(struct cred *new) { kdebug("abort_creds(%p{%d,%d})", new, atomic_read(&new->usage), read_cred_subscribers(new)); #ifdef CONFIG_DEBUG_CREDENTIALS BUG_ON(read_cred_subscribers(new) != 0); #endif BUG_ON(atomic_read(&new->usage) < 1); put_cred(new); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
167,314,268,168,179,060,000,000,000,000,000,000,000
12
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
int platform_irq_count(struct platform_device *dev) { int ret, nr = 0; while ((ret = platform_get_irq(dev, nr)) >= 0) nr++; if (ret == -EPROBE_DEFER) return ret; return nr; }
0
[ "CWE-362", "CWE-284" ]
linux
6265539776a0810b7ce6398c27866ddb9c6bd154
171,975,962,730,096,500,000,000,000,000,000,000,000
12
driver core: platform: fix race condition with driver_override The driver_override implementation is susceptible to race condition when different threads are reading vs storing a different driver override. Add locking to avoid race condition. Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive...
init_state(struct posix_acl_state *state, int cnt) { int alloc; memset(state, 0, sizeof(struct posix_acl_state)); state->empty = 1; /* * In the worst case, each individual acl could be for a distinct * named user or group, but we don't no which, so we allocate * enough space for either: */ alloc = sizeof(...
1
[ "CWE-119" ]
linux-2.6
91b80969ba466ba4b915a4a1d03add8c297add3f
335,186,061,217,322,500,000,000,000,000,000,000,000
23
nfsd: fix buffer overrun decoding NFSv4 acl The array we kmalloc() here is not large enough. Thanks to Johann Dahm and David Richter for bug report and testing. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: David Richter <richterd@citi.umich.edu> Tested-by: Johann Dahm <jdahm@umich.edu>
PackLinuxElf32::elf_get_offset_from_address(unsigned addr) const { Elf32_Phdr const *phdr = phdri; int j = e_phnum; for (; --j>=0; ++phdr) if (is_LOAD32(phdr)) { unsigned const t = addr - get_te32(&phdr->p_vaddr); if (t < get_te32(&phdr->p_filesz)) { unsigned const p_offset = get...
0
[ "CWE-476", "CWE-415" ]
upx
90279abdfcd235172eab99651043051188938dcc
232,964,487,881,753,230,000,000,000,000,000,000,000
19
PackLinuxElf::canUnpack must checkEhdr() for ELF input https://github.com/upx/upx/issues/485 modified: p_lx_elf.cpp
u_freeentry(u_entry_T *uep, long n) { while (n > 0) vim_free(uep->ue_array[--n]); vim_free((char_u *)uep->ue_array); #ifdef U_DEBUG uep->ue_magic = 0; #endif vim_free((char_u *)uep); }
0
[ "CWE-190" ]
vim
3eb1637b1bba19519885dd6d377bd5596e91d22c
338,967,137,501,205,470,000,000,000,000,000,000,000
10
patch 8.0.0377: possible overflow when reading corrupted undo file Problem: Possible overflow when reading corrupted undo file. Solution: Check if allocated size is not too big. (King)
static int cuse_release(struct inode *inode, struct file *file) { struct fuse_file *ff = file->private_data; struct fuse_conn *fc = ff->fc; fuse_sync_release(ff, file->f_flags); fuse_conn_put(fc); return 0; }
0
[ "CWE-399" ]
linux
2c5816b4beccc8ba709144539f6fdd764f8fa49c
268,440,986,245,277,970,000,000,000,000,000,000,000
10
cuse: fix memory leak The problem is that fuse_dev_alloc() acquires an extra reference to cc.fc, and the original ref count is never dropped. Reported-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Fixes: cc080e9e9be1 ("fuse: introduce per-instance fuse_dev structure")...
int sas_ata_init(struct domain_device *found_dev) { struct sas_ha_struct *ha = found_dev->port->ha; struct Scsi_Host *shost = ha->core.shost; struct ata_port *ap; int rc; ata_host_init(&found_dev->sata_dev.ata_host, ha->dev, &sas_sata_ops); ap = ata_sas_port_alloc(&found_dev->sata_dev.ata_host, &sata_port_in...
0
[ "CWE-284" ]
linux
0558f33c06bb910e2879e355192227a8e8f0219d
308,942,780,184,697,470,000,000,000,000,000,000,000
28
scsi: libsas: direct call probe and destruct In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") introduced disco mutex to prevent rediscovery competing with ata error handling and put the whole revalidation in the mutex. But the rphy add/remove needs to wait for the ...
static void dp8393x_do_receiver_disable(dp8393xState *s) { s->regs[SONIC_CR] &= ~SONIC_CR_RXEN; }
0
[]
qemu
915976bd98a9286efe6f2e573cb4f1360603adf9
60,326,160,852,536,560,000,000,000,000,000,000,000
4
hw/net/dp8393x: fix integer underflow in dp8393x_do_transmit_packets() An integer underflow could occur during packet transmission due to 'tx_len' not being updated if SONIC_TFC register is set to zero. Check for negative 'tx_len' when removing existing FCS. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1899722 S...
static int tt_s2_4600_read_status(struct dvb_frontend *fe, enum fe_status *status) { struct dvb_usb_adapter *d = (struct dvb_usb_adapter *)(fe->dvb->priv); struct dw2102_state *st = (struct dw2102_state *)d->dev->priv; int ret; ret = st->fe_read_status(fe, status); /* resync slave fifo when signal change...
0
[ "CWE-476", "CWE-119" ]
linux
606142af57dad981b78707234cfbd15f9f7b7125
333,229,712,694,369,180,000,000,000,000,000,000,000
17
[media] dw2102: don't do DMA on stack On Kernel 4.9, WARNINGs about doing DMA on stack are hit at the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach(). Both were due to the use of buffers on the stack as parameters to dvb_usb_generic_rw() and the resulting attempt to do DMA with...
static int jas_icclut16_getsize(jas_iccattrval_t *attrval) { jas_icclut16_t *lut16 = &attrval->data.lut16; return 44 + 2 * (lut16->numinchans * lut16->numintabents + lut16->numoutchans * lut16->numouttabents + jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans); }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
274,069,651,482,327,120,000,000,000,000,000,000,000
7
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 int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen) { struct smack_known *skp = smk_of_inode(inode); *ctx = skp->smk_known; *ctxlen = strlen(skp->smk_known); return 0; }
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
319,903,413,405,512,050,000,000,000,000,000,000,000
8
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
void AsyncSSLSocket::shutdownWrite() { // SSL sockets do not support half-shutdown, so just perform a full shutdown. // // (Performing a full shutdown here is more desirable than doing nothing at // all. The purpose of shutdownWrite() is normally to notify the other end // of the connection that no more data...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
232,365,656,532,212,300,000,000,000,000,000,000,000
10
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s, AVFrame *p) { size_t x, y; uint8_t *buffer; if (s->blend_op == APNG_BLEND_OP_OVER && avctx->pix_fmt != AV_PIX_FMT_RGBA && avctx->pix_fmt != AV_PIX_FMT_GRAY8A && avctx->pix_fmt != A...
0
[ "CWE-787" ]
FFmpeg
e371f031b942d73e02c090170975561fabd5c264
66,594,166,773,131,000,000,000,000,000,000,000,000
112
avcodec/pngdec: Fix off by 1 size in decode_zbuf() Fixes out of array access Fixes: 444/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_PNG_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
make_env_array_from_var_list (vars) SHELL_VAR **vars; { register int i, list_index; register SHELL_VAR *var; char **list, *value; list = strvec_create ((1 + strvec_len ((char **)vars))); #define USE_EXPORTSTR (value == var->exportstr) for (i = 0, list_index = 0; var = vars[i]; i++) { #if defined (...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
219,107,703,638,836,170,000,000,000,000,000,000,000
63
commit bash-20120224 snapshot
e1000e_lower_legacy_irq(E1000ECore *core) { trace_e1000e_irq_legacy_notify(false); pci_set_irq(core->owner, 0); }
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
16,851,899,077,194,061,000,000,000,000,000,000,000
5
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
static int perf_ftrace_function_register(struct perf_event *event) { struct ftrace_ops *ops = &event->ftrace_ops; ops->flags |= FTRACE_OPS_FL_CONTROL; ops->func = perf_ftrace_function_call; return register_ftrace_function(ops); }
0
[]
linux
ced39002f5ea736b716ae233fb68b26d59783912
242,177,334,108,953,200,000,000,000,000,000,000,000
8
ftrace, perf: Add support to use function tracepoint in perf Adding perf registration support for the ftrace function event, so it is now possible to register it via perf interface. The perf_event struct statically contains ftrace_ops as a handle for function tracer. The function tracer is registered/unregistered in ...
loff_t ext4_llseek(struct file *file, loff_t offset, int whence) { struct inode *inode = file->f_mapping->host; loff_t maxbytes; if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) maxbytes = EXT4_SB(inode->i_sb)->s_bitmap_maxbytes; else maxbytes = inode->i_sb->s_maxbytes; switch (whence) { case SEEK_SE...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
187,078,268,805,457,500,000,000,000,000,000,000,000
24
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
CImg<T>& operator=(const CImgDisplay& disp) { disp.snapshot(*this); return *this; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
15,494,667,242,451,343,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.
static void io_rw_resubmit(struct callback_head *cb) { struct io_kiocb *req = container_of(cb, struct io_kiocb, task_work); struct io_ring_ctx *ctx = req->ctx; int err; err = io_sq_thread_acquire_mm(ctx, req); if (io_resubmit_prep(req, err)) { refcount_inc(&req->refs); io_queue_async_work(req); } percpu_r...
0
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
87,946,252,993,303,380,000,000,000,000,000,000,000
15
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
PJ_DEF(pj_status_t) pjsip_ua_register_dlg( pjsip_user_agent *ua, pjsip_dialog *dlg ) { /* Sanity check. */ PJ_ASSERT_RETURN(ua && dlg, PJ_EINVAL); /* For all dialogs, local tag (inc hash) must has been initialized. */ PJ_ASSERT_RETURN(dlg->local.info && dlg->local.info->tag.slen && dlg->...
1
[ "CWE-416" ]
pjproject
db3235953baa56d2fb0e276ca510fefca751643f
319,743,340,938,493,300,000,000,000,000,000,000,000
77
Merge pull request from GHSA-ffff-m5fm-qm62 * Update pjsip_ua_unregister_dlg(): - update the hash key if the dialog being unregistered is used as hash key. - add an assertion check to make sure that the dlg_set to be removed is valid (can be found in the hash table). * Change hash key string comparison method.
MagickExport Image *InterpolativeResizeImage(const Image *image, const size_t columns,const size_t rows,const PixelInterpolateMethod method, ExceptionInfo *exception) { #define InterpolativeResizeImageTag "Resize/Image" CacheView *image_view, *resize_view; Image *resize_image; MagickBooleanTyp...
0
[ "CWE-125" ]
ImageMagick
c5402b6e0fcf8b694ae2af6a6652ebb8ce0ccf46
157,048,482,426,881,380,000,000,000,000,000,000,000
127
https://github.com/ImageMagick/ImageMagick/issues/717
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = kmalloc(info->dqi_usable_bs, GFP_NOFS); int ret = 0; uint newblk; __le32 *ref = (__le32 *)buf; if (!buf) return -ENOMEM; ret = read_blk(info, *blk, buf); if (ret < 0) { quota_error(dquot->...
1
[ "CWE-416" ]
linux
9bf3d20331295b1ecb81f4ed9ef358c51699a050
264,352,427,685,747,700,000,000,000,000,000,000,000
46
quota: check block number when reading the block in quota file The block number in the quota tree on disk should be smaller than the v2_disk_dqinfo.dqi_blocks. If the quota file was corrupted, we may be allocating an 'allocated' block and that would lead to a loop in a tree, which will probably trigger oops later. Thi...
struct sighand_struct *lock_task_sighand(struct task_struct *tsk, unsigned long *flags) { struct sighand_struct *sighand; rcu_read_lock(); for (;;) { sighand = rcu_dereference(tsk->sighand); if (unlikely(sighand == NULL)) break; spin_lock_irqsave(&sighand->siglock, *flags); if (likely(sighand == tsk->si...
0
[]
linux-2.6
0083fc2c50e6c5127c2802ad323adf8143ab7856
328,870,717,114,253,000,000,000,000,000,000,000,000
19
do_sigaltstack: avoid copying 'stack_t' as a structure to user space Ulrich Drepper correctly points out that there is generally padding in the structure on 64-bit hosts, and that copying the structure from kernel to user space can leak information from the kernel stack in those padding bytes. Avoid the whole issue b...
static int usb_audio_probe(struct usb_interface *intf, const struct usb_device_id *usb_id) { struct usb_device *dev = interface_to_usbdev(intf); const struct snd_usb_audio_quirk *quirk = (const struct snd_usb_audio_quirk *)usb_id->driver_info; struct snd_usb_audio *chip; int i, err; struct usb_host_interfa...
1
[ "CWE-416" ]
sound
5f8cf712582617d523120df67d392059eaf2fc4b
333,256,967,215,378,500,000,000,000,000,000,000,000
124
ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c If a USB sound card reports 0 interfaces, an error condition is triggered and the function usb_audio_probe errors out. In the error path, there was a use-after-free vulnerability where the memory object of the card was first freed, followed by...
get_min_filtered_sample_size(void) { return networkstatus_get_param(NULL, "guard-min-filtered-sample-size", DFLT_MIN_FILTERED_SAMPLE_SIZE, 1, INT32_MAX); }
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
46,756,073,948,106,820,000,000,000,000,000,000,000
6
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static void setAtimeMtime(const char *filename, const struct stat *sb) { /* If we can't change atime/mtime, it's not a disaster. It might possibly fail under SELinux. But do try to preserve the fractional part if we have utimensat(). */ #if defined HAVE_UTIMENSAT && !defined(__APPLE__) struct tim...
0
[ "CWE-732" ]
logrotate
f46d0bdfc9c53515c13880c501f4d2e1e7dd8b25
95,226,287,337,277,710,000,000,000,000,000,000,000
19
Lock state file to prevent parallel execution Running multiple instances of logrotate on the same set of log-files might have undesirable effects. Add command line option --skip-state-lock to skip locking the state file, for example if locking is unsupported or prohibited. Fixes: https://github.com/logrotate/logrota...
live_consensus_is_missing(const guard_selection_t *gs) { tor_assert(gs); if (gs->type == GS_TYPE_BRIDGE) { /* We don't update bridges from the consensus; they aren't there. */ return 0; } return networkstatus_get_live_consensus(approx_time()) == NULL; }
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
284,043,388,878,000,500,000,000,000,000,000,000,000
9
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static int set_txreq_header(struct user_sdma_request *req, struct user_sdma_txreq *tx, u32 datalen) { struct hfi1_user_sdma_pkt_q *pq = req->pq; struct hfi1_pkt_header *hdr = &tx->hdr; u8 omfactor; /* KDETH.OM */ u16 pbclen; int ret; u32 tidval = 0, lrhlen = get_lrh_len(*hdr, pad_len(datalen)); /* Copy t...
0
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
136,933,298,423,884,170,000,000,000,000,000,000,000
113
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
void sremCommand(client *c) { robj *set; int j, deleted = 0, keyremoved = 0; if ((set = lookupKeyWriteOrReply(c,c->argv[1],shared.czero)) == NULL || checkType(c,set,OBJ_SET)) return; for (j = 2; j < c->argc; j++) { if (setTypeRemove(set,c->argv[j]->ptr)) { deleted++; ...
0
[ "CWE-190" ]
redis
a30d367a71b7017581cf1ca104242a3c644dec0f
90,420,373,418,838,330,000,000,000,000,000,000,000
27
Fix Integer overflow issue with intsets (CVE-2021-32687) The vulnerability involves changing the default set-max-intset-entries configuration parameter to a very large value and constructing specially crafted commands to manipulate sets
static int airo_set_rts(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra) { struct airo_info *local = dev->ml_priv; int rthr = vwrq->value; if(vwrq->disabled) rthr = AIRO_DEF_MTU; if((rthr < 0) || (rthr > AIRO_DEF_MTU)) { return -EINVAL; } readConfigRid(local,...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
332,188,527,710,153,920,000,000,000,000,000,000,000
19
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static u32 __bpf_skb_max_len(const struct sk_buff *skb) { return skb->dev->mtu + skb->dev->hard_header_len; }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
102,297,852,543,165,600,000,000,000,000,000,000,000
4
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
has_winscrolled(void) { return (first_autopat[(int)EVENT_WINSCROLLED] != NULL); }
0
[ "CWE-122", "CWE-787" ]
vim
5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
84,436,640,583,546,720,000,000,000,000,000,000,000
4
patch 9.0.0061: ml_get error with nested autocommand Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes #10761)
static void read4B(UINT32* dest, UINT8* buf) { *dest = (UINT32)((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]); }
0
[ "CWE-120", "CWE-787" ]
Pillow
a79b65c47c7dc6fe623aadf09aa6192fc54548f3
292,532,090,939,295,400,000,000,000,000,000,000,000
4
Catch SGI buffer overruns
static noinline struct page *get_valid_first_slab(struct kmem_cache_node *n, struct page *page, bool pfmemalloc) { if (!page) return NULL; if (pfmemalloc) return page; if (!PageSlabPfmemalloc(page)) return page; /* No need to keep pfmemalloc slab if we have enough free objects */ if (n->free_objects ...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
116,247,516,288,040,750,000,000,000,000,000,000,000
41
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
static ssize_t aac_show_monitor_version(struct device *device, struct device_attribute *attr, char *buf) { struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; int len, tmp; tmp = le32_to_cpu(dev->adapter_info.monitorrev); len = snprintf(buf, PAGE_SIZE, "%d.%d-%d[%d]\n", tmp >> 24,...
0
[ "CWE-284", "CWE-264" ]
linux
f856567b930dfcdbc3323261bf77240ccdde01f5
49,489,673,908,143,780,000,000,000,000,000,000,000
13
aacraid: missing capable() check in compat ioctl In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the check as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torv...
static int do_send_NPSetWindowCallbackStruct(rpc_message_t *message, void *p_value) { NPSetWindowCallbackStruct *ws_info = (NPSetWindowCallbackStruct *)p_value; int error; if (ws_info) { if ((error = rpc_message_send_uint32(message, 1)) < 0) return error; if ((error = rpc_message_send_int32(message, ws_info...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
328,806,065,927,147,230,000,000,000,000,000,000,000
24
Support all the new variables added
get_token(FILE * fp, char *token, int maxtlen) { register int ch, ch_next; register char *cp = token; register int hash = 0; register struct tok *tp; int too_long = 0; enum { bdigits, xdigits, other } seenSymbols; /* * skip all white space */ do { c...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
7,007,388,314,258,529,000,000,000,000,000,000,000
205
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
static void pvclock_update_vm_gtod_copy(struct kvm *kvm) { #ifdef CONFIG_X86_64 struct kvm_arch *ka = &kvm->arch; int vclock_mode; bool host_tsc_clocksource, vcpus_matched; vcpus_matched = (ka->nr_vcpus_matched_tsc + 1 == atomic_read(&kvm->online_vcpus)); /* * If the host uses TSC clock, then passthrough TS...
0
[ "CWE-369" ]
linux
0185604c2d82c560dab2f2933a18f797e74ab5a8
36,837,836,293,669,674,000,000,000,000,000,000,000
30
KVM: x86: Reload pit counters for all channels when restoring state Currently if userspace restores the pit counters with a count of 0 on channels 1 or 2 and the guest attempts to read the count on those channels, then KVM will perform a mod of 0 and crash. This will ensure that 0 values are converted to 65536 as per...
xmlParserInputBufferRead(xmlParserInputBufferPtr in, int len) { if ((in == NULL) || (in->error)) return(-1); if (in->readcallback != NULL) return(xmlParserInputBufferGrow(in, len)); else if (xmlBufGetAllocationScheme(in->buffer) == XML_BUFFER_ALLOC_IMMUTABLE) return(0); else return(-1); }
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
293,381,737,602,697,300,000,000,000,000,000,000,000
9
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
JNI_a2e_vsprintf(char *target, const char *format, va_list args) { jint result; preloadLibraries(); Trc_SC_a2e_vsprintf_Entry(target, format); result = global_a2e_vsprintf(target, format, args); Trc_SC_a2e_vsprintf_Exit(result); return result; }
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
213,533,921,393,851,930,000,000,000,000,000,000,000
14
Clean up jio_snprintf and jio_vfprintf Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659 Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
static NTSTATUS open_directory(connection_struct *conn, struct smb_request *req, struct smb_filename *smb_dname, uint32 access_mask, uint32 share_access, uint32 create_disposition, uint32 create_options, uint32 file_attributes, int *pinfo, ...
0
[]
samba
60f922bf1bd8816eacbb32c24793ad1f97a1d9f2
209,923,933,643,655,430,000,000,000,000,000,000,000
291
Fix bug #10229 - No access check verification on stream files. https://bugzilla.samba.org/show_bug.cgi?id=10229 We need to check if the requested access mask could be used to open the underlying file (if it existed), as we're passing in zero for the access mask to the base filename. Signed-off-by: Jeremy Allison <jr...
void *nft_set_elem_init(const struct nft_set *set, const struct nft_set_ext_tmpl *tmpl, const u32 *key, const u32 *key_end, const u32 *data, u64 timeout, u64 expiration, gfp_t gfp) { struct nft_set_ext *ext; void *elem; elem = kzalloc(set->ops->elemsize + tmpl->len, gfp); if (elem == NULL) return ERR_PT...
0
[ "CWE-400", "CWE-703" ]
linux
e02f0d3970404bfea385b6edb86f2d936db0ea2b
336,786,387,237,586,700,000,000,000,000,000,000,000
45
netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung <exsociety@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static size_t h2_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t count, int flags) { struct h2s *h2s = cs->ctx; struct h2c *h2c = h2s->h2c; struct htx *h2s_htx = NULL; struct htx *buf_htx = NULL; struct htx_ret htx_ret; size_t ret = 0; /* transfer possibly pending data to the upper layer */ if (h2c-...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
86,687,378,504,768,730,000,000,000,000,000,000,000
57
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
TEST_P(ProtocolIntegrationTest, AddEncodedTrailers) { config_helper_.prependFilter(R"EOF( name: add-trailers-filter typed_config: "@type": type.googleapis.com/google.protobuf.Empty )EOF"); initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto response = codec_client_->makeRequestWithBody...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
205,787,455,307,196,980,000,000,000,000,000,000,000
27
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
XML_MemFree(XML_Parser parser, void *ptr) { FREE(ptr); }
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
11,509,788,384,704,409,000,000,000,000,000,000,000
4
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
ecma_string_copy_to_cesu8_buffer (const ecma_string_t *string_p, /**< ecma-string descriptor */ lit_utf8_byte_t *buffer_p, /**< destination buffer pointer * (can be NULL if buffer_size == 0) */ ...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
31,263,054,053,910,760,000,000,000,000,000,000,000
42
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
void WebPImage::printStructure(std::ostream& out, PrintStructureOption option,int depth) { if (io_->open() != 0) { throw Error(kerDataSourceOpenFailed, io_->path(), strError()); } // Ensure this is the correct image type if (!isWebPType(*io_, true)) { if (...
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
33,349,074,898,878,250,000,000,000,000,000,000,000
63
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
PHP_FUNCTION(dns_check_record) { #ifndef MAXPACKET #define MAXPACKET 8192 /* max packet size used internally by BIND */ #endif u_char ans[MAXPACKET]; char *hostname, *rectype = NULL; size_t hostname_len, rectype_len = 0; int type = T_MX, i; #if defined(HAVE_DNS_SEARCH) struct sockaddr_storage from; uint32_t from...
0
[ "CWE-125" ]
php-src
8d3dfabef459fe7815e8ea2fd68753fd17859d7b
124,252,285,177,435,520,000,000,000,000,000,000,000
70
Fix #77369 - memcpy with negative length via crafted DNS response
local void process(char *path) { int method = -1; /* get_header() return value */ size_t len; /* length of base name (minus suffix) */ struct stat st; /* to get file type and mod time */ /* all compressed suffixes for decoding search, in length order */...
1
[ "CWE-703", "CWE-22" ]
pigz
fdad1406b3ec809f4954ff7cdf9e99eb18c2458f
179,869,259,401,201,900,000,000,000,000,000,000,000
317
When decompressing with -N or -NT, strip any path from header name. This uses the path of the compressed file combined with the name from the header as the name of the decompressed output file. Any path information in the header name is stripped. This avoids a possible vulnerability where absolute or descending path...
struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q, const int cpu) { return q->queue_hw_ctx[q->mq_map[cpu]]; }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
144,193,496,734,977,240,000,000,000,000,000,000,000
4
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
static void write_reply_cb(DBusMessage *message, void *user_data) { struct pending_op *op = user_data; struct external_chrc *chrc; struct external_desc *desc; DBusError err; DBusMessageIter iter; uint8_t ecode = 0; if (!op->owner_queue) { DBG("Pending write was canceled when object got removed"); return; }...
1
[ "CWE-416" ]
bluez
838c0dc7641e1c991c0f3027bf94bee4606012f8
119,367,383,115,853,830,000,000,000,000,000,000,000
47
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...
int CServer::SnapNewID() { return m_IDPool.NewID(); }
0
[ "CWE-20" ]
teeworlds
a766cb44bcffcdb0b88e776d01c5ee1323d44f85
65,543,981,672,584,840,000,000,000,000,000,000,000
4
fixed a server crash
static inline void native_set_pud(pud_t *pudp, pud_t pud) { set_64bit((unsigned long long *)(pudp), native_pud_val(pud)); }
0
[ "CWE-362", "CWE-401" ]
linux
26c191788f18129af0eb32a358cdaea0c7479626
149,840,273,197,044,550,000,000,000,000,000,000,000
4
mm: pmd_read_atomic: fix 32bit PAE pmd walk vs pmd_populate SMP race condition When holding the mmap_sem for reading, pmd_offset_map_lock should only run on a pmd_t that has been read atomically from the pmdp pointer, otherwise we may read only half of it leading to this crash. PID: 11679 TASK: f06e8000 CPU: 3 CO...
static void info_fn(struct cgit_context *ctx) { cgit_clone_info(ctx); }
0
[]
cgit
02a545e63454530c1639014d3239c14ced2022c6
301,366,096,627,978,000,000,000,000,000,000,000,000
4
Add support for cloning over http This patch implements basic support for cloning over http, based on the work on git-http-backend by Shawn O. Pearce. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
int bson_check_string( bson *b, const char *string, const int length ) { return bson_validate_string( b, ( const unsigned char * )string, length, 1, 0, 0 ); }
1
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
147,301,886,807,424,740,000,000,000,000,000,000,000
5
don't mix up int and size_t (first pass to fix that)
inline void Mul(const ArithmeticParams& params, const RuntimeShape& input1_shape, const int16* input1_data, const RuntimeShape& input2_shape, const int16* input2_data, const RuntimeShape& output_shape, uint8* output_data) { ruy::profiler::ScopeLabel label("Mul/Int16Uint...
0
[ "CWE-125" ]
tensorflow
595a65a3e224a0362d7e68c2213acfc2b499a196
324,124,236,393,800,800,000,000,000,000,000,000,000
28
Return a TFLite error if gather_nd will result in reading invalid memory PiperOrigin-RevId: 463054033
BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) { _gdImageBmpCtx(im, out, compression); }
0
[ "CWE-415" ]
libgd
ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5
132,120,183,037,344,030,000,000,000,000,000,000,000
4
bmp: check return value in gdImageBmpPtr Closes #447.
virtual ~TProtocol() {}
1
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
49,074,957,131,036,530,000,000,000,000,000,000,000
1
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
static int TS_RESP_check_request(TS_RESP_CTX *ctx) { TS_REQ *request = ctx->request; TS_MSG_IMPRINT *msg_imprint; X509_ALGOR *md_alg; int md_alg_id; ASN1_OCTET_STRING *digest; EVP_MD *md = NULL; int i; /* Checking request version. */ if (TS_REQ_get_version(request) != 1) { TS_RESP_CTX_set_status_info(ctx...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
324,444,598,864,897,940,000,000,000,000,000,000,000
60
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
static void rxfilter_notify(NetClientState *nc) { VirtIONet *n = qemu_get_nic_opaque(nc); if (nc->rxfilter_notify_enabled) { char *path = object_get_canonical_path(OBJECT(n->qdev)); qapi_event_send_nic_rx_filter_changed(!!n->netclient_name, n->netcl...
0
[ "CWE-703" ]
qemu
abe300d9d894f7138e1af7c8e9c88c04bfe98b37
266,524,659,915,635,230,000,000,000,000,000,000,000
14
virtio-net: fix map leaking on error during receive Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") tries to fix the use after free of the sg by caching the virtqueue elements in an array and unmap them at once after receiving the packets, But it forgot to unmap the cached elements on error which ...
PHP_FUNCTION(imagecolormatch) { zval *IM1, *IM2; gdImagePtr im1, im2; int result; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &IM1, &IM2) == FAILURE) { return; } ZEND_FETCH_RESOURCE(im1, gdImagePtr, &IM1, -1, "Image", le_gd); ZEND_FETCH_RESOURCE(im2, gdImagePtr, &IM2, -1, "Image", le_gd); re...
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
244,022,532,140,837,600,000,000,000,000,000,000,000
35
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, void *arg) { if (!cstate->save_fh.fh_dentry) return nfserr_restorefh; fh_dup2(&cstate->current_fh, &cstate->save_fh); if (HAS_STATE_ID(cstate, SAVED_STATE_ID_FLAG)) { memcpy(&cstate->current_stateid, &cstate->save_stateid, sizeof(sta...
0
[ "CWE-20", "CWE-129" ]
linux
b550a32e60a4941994b437a8d662432a486235a5
176,876,698,066,847,800,000,000,000,000,000,000,000
13
nfsd: fix undefined behavior in nfsd4_layout_verify UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34 shift exponent 128 is too large for 32-bit type 'int' Depending on compiler+architecture, this may cause the check for layout_type to succeed for overly large values (which seems to be the case with amd64)...
static u64 tg3_refclk_read(struct tg3 *tp) { u64 stamp = tr32(TG3_EAV_REF_CLCK_LSB); return stamp | (u64)tr32(TG3_EAV_REF_CLCK_MSB) << 32; }
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
61,773,768,497,131,310,000,000,000,000,000,000,000
5
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
_run_trap_internal (sig, tag) int sig; char *tag; { char *trap_command, *old_trap; int trap_exit_value, *token_state; volatile int save_return_catch_flag, function_code, top_level_code, old_int; int flags; procenv_t save_return_catch; WORD_LIST *save_subst_varlist; HASH_TABLE *save_tempenv; sh...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
155,558,781,753,807,120,000,000,000,000,000,000,000
121
bash-4.4-rc2 release
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns) { if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) { if (ns) { xmlNsPtr nsPtr = node_find_ns(node); if (nsPtr) { return (strcmp((char*)nsPtr->href, ns) == 0); } else { return FALSE; } } return TRUE; } ret...
0
[ "CWE-476" ]
php-src
3c939e3f69955d087e0bb671868f7267dfb2a502
165,010,252,547,140,340,000,000,000,000,000,000,000
15
Fix bug #80672 - Null Dereference in SoapClient
void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); const TensorShape& input_shape = input.shape(); const int32_t input_dims = input_shape.dims(); const Tensor& segment_id = context->input(1); const TensorShape& segment_id_shape = segment_id.shape(); con...
1
[ "CWE-20", "CWE-703" ]
tensorflow
84563f265f28b3c36a15335c8b005d405260e943
252,101,268,949,737,650,000,000,000,000,000,000,000
66
Validate `num_segments > 0` in `unsorted_segment_join` Fixes #55305 PiperOrigin-RevId: 442047005