func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void io_kill_linked_timeout(struct io_kiocb *req) { struct io_ring_ctx *ctx = req->ctx; bool wake_ev; if (!(req->flags & REQ_F_COMP_LOCKED)) { unsigned long flags; spin_lock_irqsave(&ctx->completion_lock, flags); wake_ev = __io_kill_linked_timeout(req); spin_unlock_irqrestore(&ctx->completion_lock, ...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
282,942,115,389,283,700,000,000,000,000,000,000,000
18
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static sdlContentModelPtr sdl_deserialize_model(sdlTypePtr *types, sdlTypePtr *elements, char **in) { int i; sdlContentModelPtr model = emalloc(sizeof(sdlContentModel)); WSDL_CACHE_GET_1(model->kind, sdlContentKind, in); WSDL_CACHE_GET_INT(model->min_occurs, in); WSDL_CACHE_GET_INT(model->max_occurs, in); switch...
0
[ "CWE-476" ]
php-src
3c939e3f69955d087e0bb671868f7267dfb2a502
102,258,355,938,674,560,000,000,000,000,000,000,000
37
Fix bug #80672 - Null Dereference in SoapClient
gnutls_x509_crt_get_issuer_dn2(gnutls_x509_crt_t cert, gnutls_datum_t * dn) { if (cert == NULL) { gnutls_assert(); return GNUTLS_E_INVALID_REQUEST; } return _gnutls_x509_get_dn(cert->cert, "tbsCertificate.issuer.rdnSequence", dn); }
0
[ "CWE-295" ]
gnutls
6e76e9b9fa845b76b0b9a45f05f4b54a052578ff
213,861,110,504,973,950,000,000,000,000,000,000,000
11
on certificate import check whether the two signature algorithms match
TEST_P(Http2CodecImplTest, InvalidContinueWithFin) { initialize(); TestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); EXPECT_CALL(request_decoder_, decodeHeaders_(_, true)); request_encoder_->encodeHeaders(request_headers, true); TestHeaderMapImpl continue_headers{{":s...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
228,459,749,371,114,800,000,000,000,000,000,000,000
12
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static inline u128_t u128_and(u128_t x, u128_t y) { u128_t rv; rv.h = x.h & y.h; rv.l = x.l & y.l; return rv; }
0
[]
netmask
29a9c239bd1008363f5b34ffd6c2cef906f3660c
169,585,933,600,845,250,000,000,000,000,000,000,000
6
bump version to 2.4.4 * remove checks for negative unsigned ints, fixes #2 * harden error logging functions, fixes #3
vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct inode *inode = file_inode(file); struct vc_data *vc; long pos; long attr, size, written; char *con_buf0; int col, maxcol, viewed; u16 *org0 = NULL, *org = NULL; size_t ret; char *con_buf; if (use_unicode(inode)) retur...
0
[ "CWE-125" ]
tty
0c9acb1af77a3cb8707e43f45b72c95266903cee
286,903,214,448,452,900,000,000,000,000,000,000,000
188
vcs: prevent write access to vcsu devices Commit d21b0be246bf ("vt: introduce unicode mode for /dev/vcs") guarded against using devices containing attributes as this is not yet implemented. It however failed to guard against writes to any devices as this is also unimplemented. Reported-by: Or Cohen <orcohen@paloalton...
static int handle_vmclear(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); gpa_t vmptr; struct vmcs12 *vmcs12; struct page *page; if (!nested_vmx_check_permission(vcpu)) return 1; if (nested_vmx_check_vmptr(vcpu, EXIT_REASON_VMCLEAR, &vmptr)) return 1; if (vmptr == vmx->nested.current_vmptr) ...
0
[ "CWE-388" ]
linux
ef85b67385436ddc1998f45f1d6a210f935b3388
59,081,808,523,387,210,000,000,000,000,000,000,000
38
kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF) When L2 exits to L0 due to "exception or NMI", software exceptions (#BP and #OF) for which L1 has requested an intercept should be handled by L1 rather than L0. Previously, only hardware exceptions were forwarded to L1. Signed-off-by: Jim Mattson <jma...
sigquit_handler(int sig) { pqsignal(SIGINT, SIG_DFL); kill(getpid(), SIGINT); }
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
232,914,451,735,578,670,000,000,000,000,000,000,000
5
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
static char *r_core_anal_hasrefs_to_depth(RCore *core, ut64 value, int depth) { r_return_val_if_fail (core, NULL); if (depth < 1 || value == UT64_MAX) { return NULL; } RStrBuf *s = r_strbuf_new (NULL); char *mapname = NULL; RFlagItem *fi = r_flag_get_i (core->flags, value); ut64 type = r_core_anal_address (cor...
0
[ "CWE-415", "CWE-703" ]
radare2
cb8b683758edddae2d2f62e8e63a738c39f92683
325,757,291,944,935,960,000,000,000,000,000,000,000
171
Fix #16303 - c->table_query double free (#16318)
BasicIo::AutoPtr ImageFactory::createIo(const std::string& path, bool useCurl) { Protocol fProt = fileProtocol(path); #ifdef EXV_USE_SSH if (fProt == pSsh || fProt == pSftp) { return BasicIo::AutoPtr(new SshIo(path)); // may throw } #endif #ifdef EXV_USE_CURL if (us...
0
[ "CWE-835" ]
exiv2
ae49250942f4395639961abeed3c15920fcd7241
147,856,523,419,639,700,000,000,000,000,000,000,000
27
Check in Image::printIFDStructure if seek and reads are OK
SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length ) { /* * not quite sure how the descriptor can be * allocated to a statement, all the documentation talks ...
0
[ "CWE-119", "CWE-369" ]
unixODBC
45ef78e037f578b15fc58938a3a3251655e71d6f
37,209,740,387,407,160,000,000,000,000,000,000,000
261
New Pre Source
int qemu_chr_fe_set_msgfds(CharBackend *be, int *fds, int num) { CharDriverState *s = be->chr; if (!s) { return -1; } return s->set_msgfds ? s->set_msgfds(s, fds, num) : -1; }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
212,920,629,278,605,030,000,000,000,000,000,000,000
10
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...
void chrm_box_del(GF_Box *s) { gf_free(s); }
0
[ "CWE-476" ]
gpac
6170024568f4dda310e98ef7508477b425c58d09
183,984,194,225,703,750,000,000,000,000,000,000,000
4
fixed potential crash - cf #1263
static void addrconf_leave_anycast(struct inet6_ifaddr *ifp) { struct in6_addr addr; if (ifp->prefix_len >= 127) /* RFC 6164 */ return; ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len); if (ipv6_addr_any(&addr)) return; __ipv6_dev_ac_dec(ifp->idev, &addr); }
0
[ "CWE-20" ]
linux
77751427a1ff25b27d47a4c36b12c3c8667855ac
179,230,028,683,631,100,000,000,000,000,000,000,000
11
ipv6: addrconf: validate new MTU before applying it Currently we don't check if the new MTU is valid or not and this allows one to configure a smaller than minimum allowed by RFCs or even bigger than interface own MTU, which is a problem as it may lead to packet drops. If you have a daemon like NetworkManager running...
static int aio_setup_ring(struct kioctx *ctx) { struct aio_ring *ring; unsigned nr_events = ctx->max_reqs; struct mm_struct *mm = current->mm; unsigned long size, unused; int nr_pages; int i; struct file *file; /* Compensate for the ring buffer's head/tail overlap entry */ nr_events += 2; /* 1 is required, 2 ...
0
[]
linux-stable
c4f4b82694fe48b02f7a881a1797131a6dad1364
1,278,912,064,320,785,000,000,000,000,000,000,000
92
AIO: properly check iovec sizes In Linus's tree, the iovec code has been reworked massively, but in older kernels the AIO layer should be checking this before passing the request on to other layers. Many thanks to Ben Hawkes of Google Project Zero for pointing out the issue. Reported-by: Ben Hawkes <hawkes@google.co...
static void mg_md5_transform(uint32_t buf[4], uint32_t const in[16]) { uint32_t a, b, c, d; a = buf[0]; b = buf[1]; c = buf[2]; d = buf[3]; MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); MD5STEP(F1, b,...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
42,734,847,124,480,210,000,000,000,000,000,000,000
81
Protect against the directory traversal in mg_upload()
ConnectionManagerImpl::ConnectionManagerImpl(ConnectionManagerConfig& config, const Network::DrainDecision& drain_close, Runtime::RandomGenerator& random_generator, Http::Context& http_...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
210,050,506,814,296,460,000,000,000,000,000,000,000
22
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static bool io_cqring_event_overflow(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags, u64 extra1, u64 extra2) { struct io_overflow_cqe *ocqe; size_t ocq_size = sizeof(struct io_overflow_cqe); bool is_cqe32 = (ctx->flags & IORING_SETUP_CQE32); if (is_cqe32) ocq_size += sizeof(struct ...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
249,884,355,766,305,960,000,000,000,000,000,000,000
38
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
snmpTreeEntry(oid entry, snint len, mib_tree_entry * current) { mib_tree_entry *next = NULL; int count = 0; while ((!next) && current && (count < current->children)) { if (current->leaves[count]->name[len] == entry) { next = current->leaves[count]; } ++count; } ...
0
[ "CWE-772" ]
squid
983c5c36e5f109512ed1af38a329d0b5d0967498
107,403,972,100,829,970,000,000,000,000,000,000,000
15
Fix memory leak when parsing SNMP packet (#313) SNMP queries denied by snmp_access rules and queries with certain unsupported SNMPv2 commands were leaking a few hundred bytes each. Such queries trigger "SNMP agent query DENIED from..." WARNINGs in cache.log.
void virtio_queue_set_vector(VirtIODevice *vdev, int n, uint16_t vector) { if (n < VIRTIO_PCI_QUEUE_MAX) vdev->vq[n].vector = vector; }
0
[ "CWE-94" ]
qemu
cc45995294b92d95319b4782750a3580cabdbc0c
318,887,284,651,559,650,000,000,000,000,000,000,000
5
virtio: out-of-bounds buffer write on invalid state load CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in virtio_load@hw/virtio/virtio.c So we have this code since way back when: num = qemu_get_be32(f); for (i = 0; i < num; i++) { vdev->vq[i].vring.num = qemu_get_be32(f); array of vqs has size ...
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2, free_res; zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); if (...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
173,327,751,989,515,570,000,000,000,000,000,000,000
41
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
CServer* CIRCNetwork::GetCurrentServer() const { size_t uIdx = (m_uServerIdx) ? m_uServerIdx - 1 : 0; if (uIdx >= m_vServers.size()) { return nullptr; } return m_vServers[uIdx]; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
321,987,204,092,792,660,000,000,000,000,000,000,000
9
Don't crash if user specified invalid encoding. This is CVE-2019-9917
void vmalloc_sync_all(void) { unsigned long address; if (SHARED_KERNEL_PMD) return; for (address = VMALLOC_START & PMD_MASK; address >= TASK_SIZE_MAX && address < FIXADDR_TOP; address += PMD_SIZE) { struct page *page; spin_lock(&pgd_lock); list_for_each_entry(page, &pgd_list, lru) { spinloc...
0
[ "CWE-20" ]
linux
342db04ae71273322f0011384a9ed414df8bdae4
118,213,172,889,055,120,000,000,000,000,000,000,000
30
x86/dumpstack: Don't dump kernel memory based on usermode RIP show_opcodes() is used both for dumping kernel instructions and for dumping user instructions. If userspace causes #PF by jumping to a kernel address, show_opcodes() can be reached with regs->ip controlled by the user, pointing to kernel code. Make sure th...
static int wc_ecc_cmp_param(const char* curveParam, const byte* param, word32 paramSz) { int err = MP_OKAY; mp_int a, b; if (param == NULL || curveParam == NULL) return BAD_FUNC_ARG; if ((err = mp_init_multi(&a, &b, NULL, NULL, NULL, NULL)) != MP_OKAY) retur...
0
[ "CWE-200" ]
wolfssl
9b9568d500f31f964af26ba8d01e542e1f27e5ca
158,977,241,094,864,100,000,000,000,000,000,000,000
31
Change ECDSA signing to use blinding.
static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread) { HEVCContext *s = avctxt->priv_data; int ctb_size = 1 << s->ps.sps->log2_ctb_size; int more_data = 1; int x_ctb = 0; int y_ctb = 0; int ctb_addr_ts = s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs]...
0
[ "CWE-476" ]
FFmpeg
9ccc633068c6fe76989f487c8932bd11886ad65b
116,763,737,673,063,710,000,000,000,000,000,000,000
60
avcodec/hevcdec: Avoid only partly skiping duplicate first slices Fixes: NULL pointer dereference and out of array access Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432 Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304 This also fi...
ZrtpPacketRelayAck* ZRtp::prepareRelayAck(ZrtpPacketSASrelay* srly, uint32_t* errMsg) { // handle and render SAS relay data only if the peer announced that it is a trusted // PBX. Don't handle SAS relay in paranoidMode. if (!mitmSeen || paranoidMode) return &zrtpRelayAck; uint8_t* hkey, *ekey; ...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
321,703,630,699,179,970,000,000,000,000,000,000,000
74
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
ignoreSectionProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = doIgnoreSection(parser, parser->m_encoding, &start, end, endPtr, (XML_Bool)! parser->m_parsingStatus.finalBuffer); if (result != XML_ERROR...
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
76,176,368,876,374,250,000,000,000,000,000,000,000
13
xmlparse.c: Deny internal entities closing the doctype
registerImg(Buffer *buf, char *url, char *title, int line, int pos) { Anchor *a; buf->img = putAnchor(buf->img, url, NULL, &a, NULL, title, '\0', line, pos); return a; }
0
[ "CWE-119" ]
w3m
4e464819dd360ffd3d58fa2a89216fe413cfcc74
202,300,290,086,742,100,000,000,000,000,000,000,000
7
Prevent segfault due to buffer overflows in addMultirowsForm Bug-Debian: https://github.com/tats/w3m/issues/21 Bug-Debian: https://github.com/tats/w3m/issues/26
static int DecodeIPV6FragTest01 (void) { uint8_t raw_frag1[] = { 0x60, 0x0f, 0x1a, 0xcf, 0x05, 0xa8, 0x2c, 0x36, 0x20, 0x01, 0x04, 0x70, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0x09, 0x80, 0x32, 0xb2, 0x00, 0x01, 0x2e, 0x41, 0x38, 0xff, 0xfe, 0xa7...
0
[ "CWE-20" ]
suricata
11f3659f64a4e42e90cb3c09fcef66894205aefe
324,028,609,305,735,800,000,000,000,000,000,000,000
164
teredo: be stricter on what to consider valid teredo Invalid Teredo can lead to valid DNS traffic (or other UDP traffic) being misdetected as Teredo. This leads to false negatives in the UDP payload inspection. Make the teredo code only consider a packet teredo if the encapsulated data was decoded without any 'invali...
static int dx2_decode_slice_410(GetBitContext *gb, int width, int height, uint8_t *Y, uint8_t *U, uint8_t *V, int ystride, int ustride, int vstride) { int x, y, i, j; uint8_t lru[3][8]; for (i = 0; i < 3; i++) memcpy(lru[i], def_lru, 8...
0
[ "CWE-190" ]
FFmpeg
a392bf657015c9a79a5a13adfbfb15086c1943b9
194,606,429,429,997,640,000,000,000,000,000,000,000
26
avcodec/dxtory: fix src size checks Fixes integer overflow Fixes out of array read Fixes: d104661bb59b202df7671fb19a00ca6c-asan_heap-oob_d6429d_5066_cov_1729501105_dxtory_mic.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
_blit_spans (void *abstract_renderer, int y, int h, const cairo_half_open_span_t *spans, unsigned num_spans) { cairo_image_span_renderer_t *r = abstract_renderer; int cpp; if (num_spans == 0) return CAIRO_STATUS_SUCCESS; cpp = r->bpp/8; if (likely (h == 1)) { uint8_t *src = r->u.blit.src_d...
0
[ "CWE-787" ]
cairo
c986a7310bb06582b7d8a566d5f007ba4e5e75bf
248,267,197,652,993,400,000,000,000,000,000,000,000
76
image: Enable inplace compositing with opacities for general routines On a SNB i5-2500: Speedups ======== firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup ocitysmap 485.64 -> 431.94: 1.12x speedup Slowdowns ===...
pixGetOuterBordersPtaa(PIX *pixs) { l_int32 i, n; BOX *box; BOXA *boxa; PIX *pix; PIXA *pixa; PTA *pta; PTAA *ptaa; PROCNAME("pixGetOuterBordersPtaa"); if (!pixs) return (PTAA *)ERROR_PTR("pixs not defined", procName, NULL); if (pixGetDepth(pixs) != 1) return (PTAA *...
0
[ "CWE-125" ]
leptonica
8d6e1755518cfb98536d6c3daf0601f226d16842
99,138,909,088,662,950,000,000,000,000,000,000,000
40
Issue 23433 in oss-fuzz: Heap-buffer-overflow in findNextBorderPixel() * Check pix boundary when looking for the next pixel.
__packet_set_data(struct dp_packet *b, uint16_t v) { b->mbuf.data_off = v; }
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
88,542,618,478,946,100,000,000,000,000,000,000,000
4
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
GF_Err trak_box_dump(GF_Box *a, FILE * trace) { GF_TrackBox *p; p = (GF_TrackBox *)a; gf_isom_box_dump_start(a, "TrackBox", trace); gf_fprintf(trace, ">\n"); if (p->size && !p->Header) { gf_fprintf(trace, "<!--INVALID FILE: Missing Track Header-->\n"); } gf_isom_box_dump_done("TrackBox", a, trace); return GF...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
326,246,107,206,935,600,000,000,000,000,000,000,000
13
fixed #2138
static int get_mnt_opts(int flags, char *opts, char **mnt_optsp) { int i; int l; if (!(flags & MS_RDONLY) && add_option(mnt_optsp, "rw", 0) == -1) return -1; for (i = 0; mount_flags[i].opt != NULL; i++) { if (mount_flags[i].on && (flags & mount_flags[i].flag) && add_option(mnt_optsp, mount_flags[i].opt,...
0
[ "CWE-269" ]
libfuse
28bdae3d113ef479c1660a581ef720cdc33bf466
93,051,244,795,122,500,000,000,000,000,000,000,000
31
fusermount: don't feed "escaped commas" into mount options The old code permits the following behavior: $ _FUSE_COMMFD=10000 priv_strace -etrace=mount -s200 fusermount -o 'foobar=\,allow_other' mount mount("/dev/fuse", ".", "fuse", MS_NOSUID|MS_NODEV, "foobar=\\,allow_other,fd=3,rootmode=40000,user_id=1000,group_id=1...
static inline __u8 qeth_get_ipa_adp_type(enum qeth_link_types link_type) { switch (link_type) { case QETH_LINK_TYPE_HSTR: return 2; default: return 1; } }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
87,425,042,056,533,050,000,000,000,000,000,000,000
9
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
_equalVariableSetStmt(const VariableSetStmt *a, const VariableSetStmt *b) { COMPARE_SCALAR_FIELD(kind); COMPARE_STRING_FIELD(name); COMPARE_NODE_FIELD(args); COMPARE_SCALAR_FIELD(is_local); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
7,501,754,465,160,600,000,000,000,000,000,000,000
9
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...
push_context (name, is_subshell, tempvars) char *name; /* function name */ int is_subshell; HASH_TABLE *tempvars; { if (is_subshell == 0) push_dollar_vars (); variable_context++; push_var_context (name, VC_FUNCENV, tempvars); }
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
83,468,752,180,618,190,000,000,000,000,000,000,000
10
commit bash-20120224 snapshot
static av_cold int decode_end(AVCodecContext *avctx) { Mpeg4DecContext *ctx = avctx->priv_data; int i; if (!avctx->internal->is_copy) { for (i = 0; i < 12; i++) ff_free_vlc(&ctx->studio_intra_tab[i]); ff_free_vlc(&ctx->studio_luma_dc); ff_free_vlc(&ctx->studio_chroma_dc...
0
[ "CWE-476" ]
FFmpeg
2aa9047486dbff12d9e040f917e5f799ed2fd78b
260,445,878,330,449,350,000,000,000,000,000,000,000
15
avcodec/mpeg4videodec: Check read profile before setting it Fixes: null pointer dereference Fixes: ffmpeg_crash_7.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
ServerKeyBase* CreateDHServerKEA() { return NEW_YS DH_Server; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
321,509,434,523,374,170,000,000,000,000,000,000,000
1
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
void visit(PrioritizedChoice &ope) override { for (auto op : ope.opes_) { if (!IsLiteralToken::check(*op)) { return; } } result_ = true; }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
101,279,372,662,084,700,000,000,000,000,000,000,000
6
Fix #122
static void yam_start_tx(struct net_device *dev, struct yam_port *yp) { if ((yp->tx_state == TX_TAIL) || (yp->txd == 0)) yp->tx_count = 1; else yp->tx_count = (yp->bitrate * yp->txd) / 8000; yp->tx_state = TX_HEAD; ptt_on(dev); }
0
[ "CWE-401" ]
linux
29eb31542787e1019208a2e1047bb7c76c069536
203,710,108,576,374,000,000,000,000,000,000,000,000
9
yam: fix a memory leak in yam_siocdevprivate() ym needs to be free when ym->cmd != SIOCYAMSMCS. Fixes: 0781168e23a2 ("yam: fix a missing-check bug") Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static void DrawPathLineToHorizontal(DrawingWand *wand,const PathMode mode, const double x) { assert(wand != (DrawingWand *) NULL); assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if ((wand->path_operation ...
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
274,710,044,544,914,500,000,000,000,000,000,000,000
18
https://github.com/ImageMagick/ImageMagick/issues/716
bool Cipher::neededFeaturesAvailable() { QCA::Initializer init; if (QCA::isSupported("blowfish-ecb") && QCA::isSupported("blowfish-cbc") && QCA::isSupported("dh")) return true; return false; }
0
[ "CWE-125" ]
quassel
8b5ecd226f9208af3074b33d3b7cf5e14f55b138
87,556,990,418,236,900,000,000,000,000,000,000,000
9
Check for invalid input in encrypted buffers The ECB Blowfish decryption function assumed that encrypted input would always come in blocks of 12 characters, as specified. However, buggy clients or annoying people may not adhere to that assumption, causing the core to crash while trying to process the invalid base64 in...
static enum test_return cache_reuse_test(void) { int ii; cache_t *cache = cache_create("test", sizeof(uint32_t), sizeof(char*), NULL, NULL); char *ptr = cache_alloc(cache); cache_free(cache, ptr); for (ii = 0; ii < 100; ++ii) { char *p = cache_alloc(cache); ...
0
[ "CWE-20" ]
memcached
75cc83685e103bc8ba380a57468c8f04413033f9
122,363,774,950,270,160,000,000,000,000,000,000,000
15
Issue 102: Piping null to the server will crash it
static Quantum *GetAuthenticPixelsFromCache(const Image *image) { CacheInfo *magick_restrict cache_info; const int id = GetOpenMPThreadId(); assert(image != (const Image *) NULL); assert(image->signature == MagickCoreSignature); assert(image->cache != (Cache) NULL); cache_info=(CacheInfo *) image-...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
241,554,007,709,253,740,000,000,000,000,000,000,000
16
Set pixel cache to undefined if any resource limit is exceeded
void perf_prepare_sample(struct perf_event_header *header, struct perf_sample_data *data, struct perf_event *event, struct pt_regs *regs) { u64 sample_type = event->attr.sample_type; header->type = PERF_RECORD_SAMPLE; header->size = sizeof(*header) + event->header_size; header->misc = 0; header->misc...
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
81,062,047,692,373,650,000,000,000,000,000,000,000
105
perf: Fix race in swevent hash There's a race on CPU unplug where we free the swevent hash array while it can still have events on. This will result in a use-after-free which is BAD. Simply do not free the hash array on unplug. This leaves the thing around and no use-after-free takes place. When the last swevent die...
HttpHeader::HttpHeader(const http_hdr_owner_type anOwner): owner(anOwner), len(0), conflictingContentLength_(false) { assert(anOwner > hoNone && anOwner < hoEnd); debugs(55, 7, "init-ing hdr: " << this << " owner: " << owner); httpHeaderMaskInit(&mask, 0); }
0
[ "CWE-444" ]
squid
9c8e2a71aa1d3c159a319d9365c346c48dc783a5
252,402,924,137,830,640,000,000,000,000,000,000,000
6
Enforce token characters for field-name (#700) RFC 7230 defines field-name as a token. Request splitting and cache poisoning attacks have used non-token characters to fool broken HTTP agents behind or in front of Squid for years. This change should significantly reduce that abuse. If we discover exceptional situatio...
static void lo_do_readdir(fuse_req_t req, fuse_ino_t ino, size_t size, off_t offset, struct fuse_file_info *fi, int plus) { struct lo_data *lo = lo_data(req); struct lo_dirp *d = NULL; struct lo_inode *dinode; char *buf = NULL; char *p; size_t rem = size; int err = ...
0
[]
qemu
6084633dff3a05d63176e06d7012c7e15aba15be
286,966,762,917,623,920,000,000,000,000,000,000,000
110
tools/virtiofsd: xattr name mappings: Add option Add an option to define mappings of xattr names so that the client and server filesystems see different views. This can be used to have different SELinux mappings as seen by the guest, to run the virtiofsd with less privileges (e.g. in a case where it can't set trusted/...
static void addLengthDistance(uivector* values, size_t length, size_t distance) { /*values in encoded vector are those used by deflate: 0-255: literal bytes 256: end 257-285: length/distance pair (length code, followed by extra length bits, distance code, extra distance bits) 286-287: invalid*/ unsigned le...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
48,006,063,950,141,970,000,000,000,000,000,000,000
18
Fixed #5645: realloc return handling
g_file_append_to_async (GFile *file, GFileCreateFlags flags, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer u...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
52,565,777,984,183,420,000,000,000,000,000,000,000
19
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
static void vmx_set_virtual_x2apic_mode(struct kvm_vcpu *vcpu, bool set) { u32 sec_exec_control; /* Postpone execution until vmcs01 is the current VMCS. */ if (is_guest_mode(vcpu)) { to_vmx(vcpu)->nested.change_vmcs01_virtual_x2apic_mode = true; return; } if (!cpu_has_vmx_virtualize_x2apic_mode()) return; ...
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
48,081,954,855,364,390,000,000,000,000,000,000,000
30
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ The value of the guest_irq argument to vmx_update_pi_irte() is ultimately coming from a KVM_IRQFD API call. Do not BUG() in vmx_update_pi_irte() if the value is out-of bounds. (Especially, since KVM as a whole seems to hang after that.) Instead, print a message only o...
int ha_partition::index_first(uchar * buf) { DBUG_ENTER("ha_partition::index_first"); decrement_statistics(&SSV::ha_read_first_count); end_range= 0; m_index_scan_type= partition_index_first; DBUG_RETURN(common_first_last(buf)); }
0
[]
server
f305a7ce4bccbd56520d874e1d81a4f29bc17a96
181,007,950,815,029,800,000,000,000,000,000,000,000
9
bugfix: long partition names
compile_while(char_u *arg, cctx_T *cctx) { char_u *p = arg; scope_T *scope; scope = new_scope(cctx, WHILE_SCOPE); if (scope == NULL) return NULL; // "endwhile" jumps back here, one before when profiling or using cmdmods scope->se_u.se_while.ws_top_label = current_instr_idx(cctx); // comp...
0
[ "CWE-703", "CWE-122" ]
vim
d1d8f6bacb489036d0fd479c9dd3c0102c988889
201,953,825,925,087,430,000,000,000,000,000,000,000
38
patch 9.0.0211: invalid memory access when compiling :lockvar Problem: Invalid memory access when compiling :lockvar. Solution: Don't read past the end of the line.
void unregister_displaychangelistener(DisplayChangeListener *dcl) { DisplayState *ds = dcl->ds; trace_displaychangelistener_unregister(dcl, dcl->ops->dpy_name); if (dcl->con) { dcl->con->dcls--; } QLIST_REMOVE(dcl, next); gui_setup_refresh(ds); }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
214,369,554,707,496,220,000,000,000,000,000,000,000
10
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...
int RGWHandler::do_init_permissions() { int ret = rgw_build_bucket_policies(store, s); if (ret < 0) { ldout(s->cct, 10) << "init_permissions on " << s->bucket << " failed, ret=" << ret << dendl; return ret==-ENODATA ? -EACCES : ret; } s->env = rgw_build_iam_environment(store, s); return ret; ...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
294,061,286,607,954,300,000,000,000,000,000,000,000
12
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
__read_extent_tree_block(const char *function, unsigned int line, struct inode *inode, ext4_fsblk_t pblk, int depth, int flags) { struct buffer_head *bh; int err; gfp_t gfp_flags = __GFP_MOVABLE | GFP_NOFS; if (flags & EXT4_EX_NOFAIL) gfp_flags |= __GFP_NOFAIL; bh = sb_getblk_gfp(inode->i_sb, pb...
1
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
285,775,323,619,071,000,000,000,000,000,000,000,000
45
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
d_lite_equal(VALUE self, VALUE other) { if (!k_date_p(other)) return equal_gen(self, other); { get_d2(self, other); if (!(m_gregorian_p(adat) == m_gregorian_p(bdat))) return equal_gen(self, other); { VALUE a_nth, b_nth; int a_jd, b_jd; m_canonicalize_jd(self, adat); m_canonicali...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
281,057,637,698,625,800,000,000,000,000,000,000,000
28
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static int f2fs_drop_inode(struct inode *inode) { int ret; /* * This is to avoid a deadlock condition like below. * writeback_single_inode(inode) * - f2fs_write_data_page * - f2fs_gc -> iput -> evict * - inode_wait_for_writeback(inode) */ if ((!inode_unhashed(inode) && inode->i_state & I_SYNC))...
0
[ "CWE-284" ]
linux
b9dd46188edc2f0d1f37328637860bb65a771124
134,430,742,134,458,720,000,000,000,000,000,000,000
42
f2fs: sanity check segment count F2FS uses 4 bytes to represent block address. As a result, supported size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. Signed-off-by: Jin Qian <jinqian@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
TEST_F(HttpConnectionManagerImplTest, 100ContinueResponseWithDecoderPause) { proxy_100_continue_ = true; setup(false, "envoy-custom-server", false); std::shared_ptr<MockStreamDecoderFilter> filter(new NiceMock<MockStreamDecoderFilter>()); // Allow headers to pass. EXPECT_CALL(*filter, decodeHeaders(_, false...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
240,039,098,439,526,640,000,000,000,000,000,000,000
64
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
int ldb_repl_meta_data_module_init(const char *version) { LDB_MODULE_CHECK_VERSION(version); return ldb_register_module(&ldb_repl_meta_data_module_ops); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
185,520,864,660,466,360,000,000,000,000,000,000,000
5
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static struct baselangextent *ParseBaseLang(FILE *sfd) { struct baselangextent *bl; struct baselangextent *cur, *last; int ch; while ( (ch=nlgetc(sfd))==' ' ); if ( ch=='{' ) { bl = chunkalloc(sizeof(struct baselangextent)); while ( (ch=nlgetc(sfd))==' ' ); ungetc(ch,sfd); if ( ch=='\'' ) ...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
120,332,329,936,649,010,000,000,000,000,000,000,000
31
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
refresh_command() { c_token++; refresh_request(); }
0
[ "CWE-415" ]
gnuplot
052cbd17c3cbbc602ee080b2617d32a8417d7563
97,347,783,036,189,310,000,000,000,000,000,000,000
5
successive failures of "set print <foo>" could cause double-free Bug #2312
void opj_j2k_read_float32_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem) { OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data; OPJ_FLOAT32 * l_dest_data = (OPJ_FLOAT32 *) p_dest_data; OPJ_UINT32 i; OPJ_FLOAT32 l_temp; for (i=0;i<p_nb_elem;++i) { ...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
205,256,959,253,353,070,000,000,000,000,000,000,000
15
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
libxlDomainDefNamespaceParse(xmlXPathContextPtr ctxt, void **data) { libxlDomainXmlNsDef *nsdata = NULL; g_autofree xmlNodePtr *nodes = NULL; ssize_t nnodes; size_t i; int ret = -1; if ((nnodes = virXPathNodeSet("./xen:commandline/xen:arg", ctxt, &nodes)) < 0) ...
0
[ "CWE-667" ]
libvirt
23b51d7b8ec885e97a9277cf0a6c2833db4636e8
338,533,715,875,833,700,000,000,000,000,000,000,000
33
libxl: Disable death events after receiving a shutdown event The libxl driver will handle all domain destruction and cleanup when receiving a domain shutdown event from libxl. Commit fa30ee04a2a introduced the ignoreDeathEvent boolean in the DomainObjPrivate struct to ignore subsequent death events from libxl. But lib...
static ssize_t resv_hugepages_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { struct hstate *h = kobj_to_hstate(kobj, NULL); return sysfs_emit(buf, "%lu\n", h->resv_huge_pages); }
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
22,715,012,496,800,610,000,000,000,000,000,000,000
6
hugetlbfs: flush TLBs correctly after huge_pmd_unshare When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB flush is missing. This TLB flush must be performed before releasing the i_mmap_rwsem, in order to prevent an unshared PMDs page from being released and reused before the TLB flush took place...
int ec_point_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx) { if (group->meth->blind_coordinates == NULL) return 1; /* ignore if not implemented */ return group->meth->blind_coordinates(group, p, ctx); }
0
[]
openssl
30c22fa8b1d840036b8e203585738df62a03cec8
176,303,337,873,681,440,000,000,000,000,000,000,000
7
[crypto/ec] for ECC parameters with NULL or zero cofactor, compute it The cofactor argument to EC_GROUP_set_generator is optional, and SCA mitigations for ECC currently use it. So the library currently falls back to very old SCA-vulnerable code if the cofactor is not present. This PR allows EC_GROUP_set_generator to ...
static int unquoted_member (character, string) int character; char *string; { size_t slen; int sindex, c; DECLARE_MBSTATE; slen = strlen (string); sindex = 0; while (c = string[sindex]) { if (c == character) return (1); switch (c) { default: ADVANCE_CHAR (string, slen, sind...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
218,149,140,232,062,860,000,000,000,000,000,000,000
38
Bash-4.4 patch 7
Item *Item_field::replace_equal_field(uchar *arg) { REPLACE_EQUAL_FIELD_ARG* param= (REPLACE_EQUAL_FIELD_ARG*)arg; if (item_equal && item_equal == param->item_equal) { Item *const_item= item_equal->get_const(); if (const_item) { if (!has_compatible_context(const_item)) return this; ...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
87,505,359,778,612,740,000,000,000,000,000,000,000
21
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
static void free_alien_cache(struct alien_cache **alc_ptr) { int i; if (!alc_ptr) return; for_each_node(i) kfree(alc_ptr[i]); kfree(alc_ptr); }
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
196,361,690,392,633,500,000,000,000,000,000,000,000
10
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 void csi_J(struct vc_data *vc, int vpar) { unsigned int count; unsigned short * start; switch (vpar) { case 0: /* erase from cursor to end of display */ vc_uniscr_clear_line(vc, vc->state.x, vc->vc_cols - vc->state.x); vc_uniscr_clear_lines(vc, vc->state.y + 1, vc->vc_rows - vc->...
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
186,097,792,344,311,100,000,000,000,000,000,000,000
36
vt: Disable KD_FONT_OP_COPY It's buggy: On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote: > We recently discovered a slab-out-of-bounds read in fbcon in the latest > kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that > "fbcon_do_set_font" did not handle "vc->vc_font.data" and > "vc->...
int nsim_bpf_disable_tc(struct netdevsim *ns) { if (ns->bpf_offloaded && !nsim_xdp_offload_active(ns)) return -EBUSY; return 0; }
0
[]
net
481221775d53d6215a6e5e9ce1cce6d2b4ab9a46
77,640,155,271,032,500,000,000,000,000,000,000,000
6
netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc Zero-initialize memory for new map's value in function nsim_bpf_map_alloc since it may cause a potential kernel information leak issue, as follows: 1. nsim_bpf_map_alloc calls nsim_map_alloc_elem to allocate elements for a new map. 2....
PHPAPI zend_string *php_escape_shell_cmd(char *str) { register int x, y, l = (int)strlen(str); size_t estimate = (2 * l) + 1; zend_string *cmd; #ifndef PHP_WIN32 char *p = NULL; #endif cmd = zend_string_alloc(2 * l, 0); for (x = 0, y = 0; x < l; x++) { int mb_len = php_mblen(str + x, (l - x)); /* skip non...
1
[ "CWE-703", "CWE-189" ]
php-src
2871c70efaaaa0f102557a17c727fd4d5204dd4b
222,023,592,477,065,500,000,000,000,000,000,000,000
91
Patch for Heap Buffer Overflow in EscapeShell Proposed patch for bug #71270
static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) { Image *image, *image2=NULL, *rotated_image; register Quantum *q; unsigned int status; MATHeader MATLAB_HDR; size_t size; size_t CellType; QuantumInfo *quantum_info; ImageInfo *clone_info; int i; ssize_t ldblk; u...
1
[ "CWE-772" ]
ImageMagick
ece953bbe14e8514afc23e05e4030eea872e29da
145,194,956,713,709,760,000,000,000,000,000,000,000
563
https://github.com/ImageMagick/ImageMagick/issues/878
static int decode_attr_layout_blksize(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *res) { __be32 *p; dprintk("%s: bitmap is %x\n", __func__, bitmap[2]); *res = 0; if (bitmap[2] & FATTR4_WORD2_LAYOUT_BLKSIZE) { p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) return -EIO; *res = be32_to_cp...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
23,274,630,596,876,810,000,000,000,000,000,000,000
16
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
void line6_pcm_release(struct snd_line6_pcm *line6pcm, int type) { struct line6_pcm_stream *pstr; int dir; mutex_lock(&line6pcm->state_mutex); for (dir = 0; dir < 2; dir++) line6_stream_stop(line6pcm, dir, type); for (dir = 0; dir < 2; dir++) { pstr = get_stream(line6pcm, dir); line6_buffer_release(line6pcm...
0
[ "CWE-476" ]
linux
3450121997ce872eb7f1248417225827ea249710
202,098,020,095,678,050,000,000,000,000,000,000,000
14
ALSA: line6: Fix write on zero-sized buffer LINE6 drivers allocate the buffers based on the value returned from usb_maxpacket() calls. The manipulated device may return zero for this, and this results in the kmalloc() with zero size (and it may succeed) while the other part of the driver code writes the packet data w...
static coolkey_private_data_t *coolkey_new_private_data(void) { coolkey_private_data_t *priv; /* allocate priv and zero all the fields */ priv = calloc(1, sizeof(coolkey_private_data_t)); if (!priv) return NULL; /* set other fields as appropriate */ priv->key_id = COOLKEY_INVALID_KEY; if (list_init(&priv->ob...
0
[ "CWE-415" ]
OpenSC
c246f6f69a749d4f68626b40795a4f69168008f4
46,546,241,749,473,830,000,000,000,000,000,000,000
20
coolkey: Make sure the object ID is unique when filling list Thanks to oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208
void Compute(OpKernelContext* ctx) override { const Tensor& input = ctx->input(0); OP_REQUIRES( ctx, axis_ >= -1, errors::InvalidArgument("Axis must be at least -1. Found ", axis_)); OP_REQUIRES( ctx, (axis_ == -1 || axis_ < input.shape().dims()), errors::InvalidArgument("S...
0
[ "CWE-20", "CWE-703" ]
tensorflow
098e7762d909bac47ce1dbabe6dfd06294cb9d58
191,820,106,298,784,500,000,000,000,000,000,000,000
59
Fix tf.raw_ops.QuantizeAndDequantizeV4Grad vulnerability with invalid input_min or input_max. Check that argument is actually a scalar before treating it as such. PiperOrigin-RevId: 445198280
int search_binary_handler(struct linux_binprm *bprm) { bool need_retry = IS_ENABLED(CONFIG_MODULES); struct linux_binfmt *fmt; int retval; /* This allows 4 levels of binfmt rewrites before failing hard. */ if (bprm->recursion_depth > 5) return -ELOOP; retval = security_bprm_check(bprm); if (retval) return ...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
71,769,548,688,471,460,000,000,000,000,000,000,000
53
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
char **lxc_normalize_path(const char *path) { char **components; char **p; size_t components_len = 0; size_t pos = 0; components = lxc_string_split(path, '/'); if (!components) return NULL; for (p = components; *p; p++) components_len++; /* resolve '.' and '..' */ for (pos = 0; pos < components_len; ) {...
0
[ "CWE-417" ]
lxc
c1cf54ebf251fdbad1e971679614e81649f1c032
250,115,352,814,001,660,000,000,000,000,000,000,000
35
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
void log_it(const char *username, PID_T xpid, const char *event, const char *detail, int err) { #if defined(LOG_FILE) || DEBUGGING PID_T pid = xpid; #endif #if defined(LOG_FILE) char *msg; TIME_T now = time((TIME_T) 0); struct tm *t = localtime(&now); int msg_size; #endif #if defined(LOG_FILE) /* we assume that...
0
[ "CWE-476" ]
cronie
a6576769f01325303b11edc3e0cfb05ef382ce56
165,569,498,118,805,620,000,000,000,000,000,000,000
81
Fix CVE-2019-9704 and CVE-2019-9705 The users can cause DoS of the crond by loading huge crontab files. We now allow maximum 1000 environment variables and 1000 crontab entries. Also the comments and whitespace between the entries and variables are now limited to 32768 characters.
CImg<T>& load_heif(const char *const filename) { return _load_heif(filename); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
104,190,417,213,678,530,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int nested_vmx_store_msr(struct kvm_vcpu *vcpu, u64 gpa, u32 count) { u32 i; struct vmx_msr_entry e; for (i = 0; i < count; i++) { struct msr_data msr_info; if (kvm_vcpu_read_guest(vcpu, gpa + i * sizeof(e), &e, 2 * sizeof(u32))) { pr_warn_ratelimited( "%s cannot read MSR entry (%u, 0x%0...
0
[ "CWE-284", "CWE-264" ]
linux
3ce424e45411cf5a13105e0386b6ecf6eeb4f66f
117,861,389,033,891,340,000,000,000,000,000,000,000
41
kvm:vmx: more complete state update on APICv on/off The function to update APICv on/off state (in particular, to deactivate it when enabling Hyper-V SynIC) is incomplete: it doesn't adjust APICv-related fields among secondary processor-based VM-execution controls. As a result, Windows 2012 guests get stuck when SynIC...
host_write_f2d (SF_PRIVATE *psf, const float *ptr, sf_count_t len) { BUF_UNION ubuf ; int bufferlen, writecount ; sf_count_t total = 0 ; bufferlen = ARRAY_LEN (ubuf.dbuf) ; while (len > 0) { if (len < bufferlen) bufferlen = (int) len ; f2d_array (ptr + total, ubuf.dbuf, bufferlen) ; if (psf->peak_info)...
0
[ "CWE-369" ]
libsndfile
85c877d5072866aadbe8ed0c3e0590fbb5e16788
326,568,325,937,434,300,000,000,000,000,000,000,000
27
double64_init: Check psf->sf.channels against upper bound This prevents division by zero later in the code. While the trivial case to catch this (i.e. sf.channels < 1) has already been covered, a crafted file may report a number of channels that is so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets miscal...
TEST_F(HttpConnectionManagerImplTest, ConnectLegacyClose) { TestScopedRuntime scoped_runtime; Runtime::LoaderSingleton::getExisting()->mergeValues( {{"envoy.reloadable_features.fixed_connection_close", "false"}}); setup(false, ""); RequestDecoder* decoder = nullptr; NiceMock<MockResponseEncoder> encoder...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
133,385,812,296,559,300,000,000,000,000,000,000,000
24
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
ArgParser::arg128Modify(char* parameter) { if (strcmp(parameter, "all") == 0) { o.r3_assemble = true; o.r3_annotate_and_form = true; o.r3_form_filling = true; o.r3_modify_other = true; } else if (strcmp(parameter, "annotate") == 0) { o.r3_assemble = true; ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
229,831,380,813,831,500,000,000,000,000,000,000,000
42
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 ...
mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size) { if ((!pZip) || (pZip->m_pState) || (!pZip->m_pWrite) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID)) return MZ_FALSE; if (pZip->m_file_offset_alignment) { // Ensure user specified file offset alignment is a power of 2. if (...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
261,377,134,853,473,580,000,000,000,000,000,000,000
32
Make line_no with too large value(2**20) invalid. Fixes #124
bytes_rindex(PyBytesObject *self, PyObject *args) { Py_ssize_t result = bytes_find_internal(self, args, -1); if (result == -2) return NULL; if (result == -1) { PyErr_SetString(PyExc_ValueError, "substring not found"); return NULL; } return PyLong_FromS...
0
[ "CWE-190" ]
cpython
6c004b40f9d51872d848981ef1a18bb08c2dfc42
72,667,433,386,951,850,000,000,000,000,000,000,000
12
bpo-30657: Fix CVE-2017-1000158 (#4758) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
char *timestring(time_t t) { static char TimeBuf[200]; struct tm *tm = localtime(&t); char *p; #ifdef HAVE_STRFTIME strftime(TimeBuf, sizeof TimeBuf - 1, "%Y/%m/%d %H:%M:%S", tm); #else strlcpy(TimeBuf, asctime(tm), sizeof TimeBuf); #endif if ((p = strchr(TimeBuf, '\n')) != NULL) *p = '\0'; return TimeBuf; ...
0
[ "CWE-59" ]
rsync
4cad402ea8a91031f86c53961d78bb7f4f174790
238,645,739,392,531,450,000,000,000,000,000,000,000
17
Receiver now rejects invalid filenames in filelist. If the receiver gets a filename with a leading slash (w/o --relative) and/or a filename with an embedded ".." dir in the path, it dies with an error (rather than continuing). Those invalid paths should never happen in reality, so just reject someone trying to pull a ...
static void perf_event_for_each(struct perf_event *event, void (*func)(struct perf_event *)) { struct perf_event_context *ctx = event->ctx; struct perf_event *sibling; lockdep_assert_held(&ctx->mutex); event = event->group_leader; perf_event_for_each_child(event, func); list_for_each_entry(sibling, &even...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
49,755,973,615,972,380,000,000,000,000,000,000,000
14
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
static void xar_get_checksum_values(xmlTextReaderPtr reader, unsigned char ** cksum, int * hash) { xmlChar * style = xmlTextReaderGetAttribute(reader, (const xmlChar *)"style"); const xmlChar * xmlval; *hash = XAR_CKSUM_NONE; if (style == NULL) { cli_dbgmsg("cli_scaxar: xmlTextReaderGetAttribut...
0
[ "CWE-125" ]
clamav-devel
d96a6b8bcc7439fa7e3876207aa0a8e79c8451b6
12,714,023,224,432,777,000,000,000,000,000,000,000
46
bb11588 - fix out of bounds read.
handle_delete_command(GraphicsManager *self, const GraphicsCommand *g, Cursor *c, bool *is_dirty, CellPixelSize cell) { static GraphicsCommand d; switch (g->delete_action) { #define I(u, data, func) filter_refs(self, data, g->delete_action == u, func, cell); *is_dirty = true; break #define D(l, u, data, func) c...
0
[ "CWE-787" ]
kitty
82c137878c2b99100a3cdc1c0f0efea069313901
146,096,056,004,919,240,000,000,000,000,000,000,000
27
Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters Fixes #3128
connection_dir_retry_bridges(smartlist_t *descs) { char digest[DIGEST_LEN]; SMARTLIST_FOREACH(descs, const char *, cp, { if (base16_decode(digest, DIGEST_LEN, cp, strlen(cp))<0) { log_warn(LD_BUG, "Malformed fingerprint in list: %s", escaped(cp)); continue; } retry_bridge_des...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
317,357,218,162,755,280,000,000,000,000,000,000,000
13
Fix assertion failure in tor_timegm. Fixes bug 6811.
static ssize_t proc_fault_inject_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { struct task_struct *task = get_proc_task(file_inode(file)); char buffer[PROC_NUMBUF]; size_t len; int make_it_fail; if (!task) return -ESRCH; make_it_fail = task->make_it_fail; put_task_struct(...
0
[ "CWE-362" ]
linux
8148a73c9901a8794a50f950083c00ccf97d43b3
317,112,679,719,179,230,000,000,000,000,000,000,000
17
proc: prevent accessing /proc/<PID>/environ until it's ready If /proc/<PID>/environ gets read before the envp[] array is fully set up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to read more bytes than are actually written, as env_start will already be set but env_end will still be zero, makin...
static void propagate_and_change_item_tree(THD *thd, Item **place, COND_EQUAL *cond, const Item::Context &ctx) { Item *new_value= (*place)->propagate_equal_fields(thd, ctx, cond); if (new_value && *place != new_value) thd->cha...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
141,564,773,169,814,160,000,000,000,000,000,000,000
8
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
void imap_error(const char *where, const char *msg) { mutt_error("%s [%s]\n", where, msg); }
0
[ "CWE-78", "CWE-77" ]
neomutt
e52393740334443ae0206cab2d7caef381646725
118,507,728,367,036,780,000,000,000,000,000,000,000
4
quote imap strings more carefully Co-authored-by: JerikoOne <jeriko.one@gmx.us>
static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, const void *ptr) { xmaddr_t mach_lp = arbitrary_virt_to_machine(&dt[entrynum]); u64 entry = *(u64 *)ptr; trace_xen_cpu_write_ldt_entry(dt, entrynum, entry); preempt_disable(); xen_mc_flush(); if (HYPERVISOR_update_descriptor(mach_lp.madd...
0
[ "CWE-703" ]
linux
96e8fc5818686d4a1591bb6907e7fdb64ef29884
18,789,247,556,455,282,000,000,000,000,000,000,000
16
x86/xen: Use clear_bss() for Xen PV guests Instead of clearing the bss area in assembly code, use the clear_bss() function. This requires to pass the start_info address as parameter to xen_start_kernel() in order to avoid the xen_start_info being zeroed again. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-of...
void lock(const unsigned int n) { WaitForSingleObject(mutex[n],INFINITE); }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
239,183,479,485,336,970,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
Chapter* Segment::AddChapter() { return chapters_.AddChapter(&seed_); }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
305,979,266,252,764,400,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
explicit FoldTransposeIntoMatMul(const GraphOptimizerContext& ctx, const ArithmeticOptimizerContext& ctx_ext) : ArithmeticOptimizerStage("FoldTransposeIntoMatMul", ctx, ctx_ext) {}
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
175,681,383,053,116,950,000,000,000,000,000,000,000
3
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...