func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
286,478,841,607,319,660,000,000,000,000,000,000,000
12
- 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
void PSOutputDev::writePageTrailer() { if (mode != psModeForm) { writePS("pdfEndPage\n"); } }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
298,904,641,679,721,900,000,000,000,000,000,000,000
5
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
int red_stream_get_family(const RedStream *s) { spice_return_val_if_fail(s != NULL, -1); if (s->socket == -1) return -1; return s->priv->info->laddr_ext.ss_family; }
0
[]
spice
95a0cfac8a1c8eff50f05e65df945da3bb501fc9
17,904,496,123,747,223,000,000,000,000,000,000,000
9
With OpenSSL 1.0.2 and earlier: disable client-side renegotiation. Fixed issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
reg_foreach_name(regex_t* reg, int (*func)(const unsigned char*, const unsigned char*,int,int*,regex_t*,void*), void* arg) { i_wrap warg; warg.func = func; warg.reg = reg; warg.arg = arg; return onig_foreach_name(ONIG_C(reg), i_wrapper, &warg); }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
302,189,948,732,206,400,000,000,000,000,000,000,000
12
onig-5.9.2
static int still_interesting(struct commit_list *src, unsigned long date, int slop) { /* * No source list at all? We're definitely done.. */ if (!src) return 0; /* * Does the destination list contain entries with a date * before the source list? Definitely _not_ done. */ if (date < src->item->date) r...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
250,434,269,269,947,100,000,000,000,000,000,000,000
25
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
print_message( message_t *message) { char *msg; if (message == NULL) return NULL; msg = sprint_message(message); g_printf("%s", msg); g_free(msg); return message; }
0
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
261,121,143,366,857,400,000,000,000,000,000,000,000
13
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
OPJ_BOOL opj_tcd_dwt_encode ( opj_tcd_t *p_tcd ) { opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; opj_tcd_tilecomp_t * l_tile_comp = p_tcd->tcd_image->tiles->comps; opj_tccp_t * l_tccp = p_tcd->tcp->tccps; OPJ_UINT32 compno; for (compno = 0; compno < l_tile->numcomps; ++comp...
0
[ "CWE-190" ]
openjpeg
5d00b719f4b93b1445e6fb4c766b9a9883c57949
176,337,414,088,826,700,000,000,000,000,000,000,000
25
[trunk] fixed a buffer overflow in opj_tcd_init_decode_tile Update issue 431
static int fetch(struct transport *transport, int nr_heads, struct ref **to_fetch) { struct helper_data *data = transport->data; int i, count; if (process_connect(transport, 0)) { do_take_over(transport); return transport->fetch(transport, nr_heads, to_fetch); } count = 0; for (i = 0; i < nr_heads; i++) ...
0
[]
git
68061e3470210703cb15594194718d35094afdc0
84,084,388,111,997,130,000,000,000,000,000,000,000
37
fast-import: disallow "feature export-marks" by default The fast-import stream command "feature export-marks=<path>" lets the stream write marks to an arbitrary path. This may be surprising if you are running fast-import against an untrusted input (which otherwise cannot do anything except update Git objects and refs)...
void RGWGetBucketWebsite::execute() { if (!s->bucket_info.has_website) { op_ret = -ERR_NO_SUCH_WEBSITE_CONFIGURATION; } }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
275,258,811,321,975,900,000,000,000,000,000,000,000
6
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 <...
GF_Err flxs_dump(GF_Box *a, FILE * trace) { GF_AdobeFlashAccessParamsBox *ptr = (GF_AdobeFlashAccessParamsBox *)a; if (!a) return GF_BAD_PARAM; gf_isom_box_dump_start(a, "AdobeFlashAccessParamsBox", trace); fprintf(trace, ">\n"); if (ptr->metadata) fprintf(trace, "<FmrmsV2Metadata=\"%s\"/>\n", ptr->metadata); g...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
86,539,547,189,447,260,000,000,000,000,000,000,000
11
fixed 2 possible heap overflows (inc. #1088)
ssize_t Http2Stream::Provider::FD::OnRead(nghttp2_session* handle, int32_t id, uint8_t* buf, size_t length, uint32_t* flags, ...
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
50,705,999,930,514,320,000,000,000,000,000,000,000
61
http2: add altsvc support Add support for sending and receiving ALTSVC frames. PR-URL: https://github.com/nodejs/node/pull/17917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
static u32 iwl_dump_ini_txf_ranges(struct iwl_fw_runtime *fwrt, struct iwl_fw_ini_region_cfg *reg) { u32 num_of_fifos = 0; while (iwl_ini_txf_iter(fwrt, reg, num_of_fifos)) num_of_fifos++; return num_of_fifos; }
0
[ "CWE-400", "CWE-401" ]
linux
b4b814fec1a5a849383f7b3886b654a13abbda7d
125,093,967,573,173,550,000,000,000,000,000,000,000
10
iwlwifi: dbg_ini: fix memory leak in alloc_sgtable In alloc_sgtable if alloc_page fails, the alocated table should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
static int cgw_notifier(struct notifier_block *nb, unsigned long msg, void *ptr) { struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct net *net = dev_net(dev); if (dev->type != ARPHRD_CAN) return NOTIFY_DONE; if (msg == NETDEV_UNREGISTER) { struct cgw_job *gwj = NULL; struct hlist_node *nx...
0
[ "CWE-787" ]
linux
0aaa81377c5a01f686bcdb8c7a6929a7bf330c68
25,502,274,830,182,300,000,000,000,000,000,000,000
28
can: gw: ensure DLC boundaries after CAN frame modification Muyu Yu provided a POC where user root with CAP_NET_ADMIN can create a CAN frame modification rule that makes the data length code a higher value than the available CAN frame data size. In combination with a configured checksum calculation where the result is...
ipmi_sdr_get_next_header(struct ipmi_intf *intf, struct ipmi_sdr_iterator *itr) { struct sdr_get_rs *header; if (itr->next == 0xffff) return NULL; header = ipmi_sdr_get_header(intf, itr); if (!header) return NULL; itr->next = header->next; return header; }
0
[ "CWE-120" ]
ipmitool
7ccea283dd62a05a320c1921e3d8d71a87772637
27,589,961,245,858,590,000,000,000,000,000,000,000
15
fru, sdr: Fix id_string buffer overflows Final part of the fixes for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp 9 variants of stack buffer overflow when parsing `id_string` field of SDR records returned from `CMD_GET_SDR` command. SDR record structs have an `id_co...
hstore_svals(PG_FUNCTION_ARGS) { FuncCallContext *funcctx; HStore *hs; int i; if (SRF_IS_FIRSTCALL()) { hs = PG_GETARG_HS(0); funcctx = SRF_FIRSTCALL_INIT(); setup_firstcall(funcctx, hs, NULL); } funcctx = SRF_PERCALL_SETUP(); hs = (HStore *) funcctx->user_fctx; i = funcctx->call_cntr; if (i < H...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
301,252,125,917,325,230,000,000,000,000,000,000,000
44
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
lexer_construct_unused_literal (parser_context_t *context_p) /**< context */ { lexer_literal_t *literal_p; if (context_p->literal_count >= PARSER_MAXIMUM_NUMBER_OF_LITERALS) { parser_raise_error (context_p, PARSER_ERR_LITERAL_LIMIT_REACHED); } literal_p = (lexer_literal_t *) parser_list_append (context_...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
147,800,047,235,351,700,000,000,000,000,000,000,000
14
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 uECC_compress(const uint8_t *public_key, uint8_t *compressed, uECC_Curve curve) { wordcount_t i; for (i = 0; i < curve->num_bytes; ++i) { compressed[i+1] = public_key[i]; } #if uECC_VLI_NATIVE_LITTLE_ENDIAN compressed[0] = 2 + (public_key[curve->num_bytes] & 0x01); #else compressed[0] =...
0
[ "CWE-415" ]
micro-ecc
1b5f5cea5145c96dd8791b9b2c41424fc74c2172
140,902,876,694,656,440,000,000,000,000,000,000,000
11
Fix for #168
process_bitmap_data(STREAM s) { uint16 left, top, right, bottom, width, height; uint16 cx, cy, bpp, Bpp, flags, bufsize, size; uint8 *data, *bmpdata; struct stream packet = *s; in_uint16_le(s, left); /* destLeft */ in_uint16_le(s, top); /* destTop */ in_uint16_le(s, right); /* destRight */ in_uint16_le(s, bot...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
82,211,644,992,428,450,000,000,000,000,000,000,000
99
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static ssize_t pipe_get_pages(struct iov_iter *i, struct page **pages, size_t maxsize, unsigned maxpages, size_t *start) { unsigned int iter_head, npages; size_t capacity; if (!sanity(i)) return -EFAULT; data_start(i, &iter_head, start); /* Amount of free space: some of this one + all after this one ...
0
[ "CWE-665", "CWE-284" ]
linux
9d2231c5d74e13b2a0546fee6737ee4446017903
240,363,389,164,609,000,000,000,000,000,000,000,000
17
lib/iov_iter: initialize "flags" in new pipe_buffer The functions copy_page_to_iter_pipe() and push_pipe() can both allocate a new pipe_buffer, but the "flags" member initializer is missing. Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed") To: Alexander Viro <viro@zeniv.linux.org.uk> To: linux-fsdevel@vger.k...
static int lex(struct cstate *g) { int quoted = nextrune(g); if (quoted) { switch (g->yychar) { case 'b': return L_WORD; case 'B': return L_NWORD; case 'd': newcclass(g); addranges_d(g); return L_CCLASS; case 's': newcclass(g); addranges_s(g); return L_CCLASS; case 'w': newcclass(g); addranges_w(g); retur...
0
[ "CWE-703", "CWE-674" ]
mujs
160ae29578054dc09fd91e5401ef040d52797e61
337,224,164,798,090,920,000,000,000,000,000,000,000
55
Issue #162: Check stack overflow during regexp compilation. Only bother checking during the first compilation pass that counts the size of the program.
static void ahash_def_finup_done2(struct crypto_async_request *req, int err) { struct ahash_request *areq = req->data; ahash_def_finup_finish2(areq, err); areq->base.complete(&areq->base, err); }
1
[ "CWE-835" ]
linux
ef0579b64e93188710d48667cb5e014926af9f1b
178,153,390,172,226,800,000,000,000,000,000,000,000
8
crypto: ahash - Fix EINPROGRESS notification callback The ahash API modifies the request's callback function in order to clean up after itself in some corner cases (unaligned final and missing finup). When the request is complete ahash will restore the original callback and everything is fine. However, when the requ...
static bool parse_reconnect(struct pool *pool, json_t *val) { char *sockaddr_url, *stratum_port, *tmp; char *url, *port, address[256]; memset(address, 0, 255); url = (char *)json_string_value(json_array_get(val, 0)); if (!url) url = pool->sockaddr_url; else { char *dot_pool, *dot_reconnect; dot_pool = strc...
0
[ "CWE-119", "CWE-787" ]
cgminer
e1c5050734123973b99d181c45e74b2cbb00272e
15,830,062,137,024,783,000,000,000,000,000,000,000
61
Do some random sanity checking for stratum message parsing
int espruino_snprintf( char * s, size_t n, const char * fmt, ... ) { espruino_snprintf_data d; d.outPtr = s; d.idx = 0; d.len = n; va_list argp; va_start(argp, fmt); vcbprintf(espruino_snprintf_cb,&d, fmt, argp); va_end(argp); if (d.idx < d.len) d.outPtr[d.idx] = 0; else d.outPtr[d.len-1] = 0; ...
0
[ "CWE-119", "CWE-787" ]
Espruino
0a7619875bf79877907205f6bee08465b89ff10b
118,985,494,681,518,440,000,000,000,000,000,000,000
16
Fix strncat/cpy bounding issues (fix #1425)
static UINT serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp) { DWORD DesiredAccess; DWORD SharedAccess; DWORD CreateDisposition; UINT32 PathLength; if (Stream_GetRemainingLength(irp->input) < 32) return ERROR_INVALID_DATA; Stream_Read_UINT32(irp->input, DesiredAccess); /* DesiredAccess (4 bytes)...
1
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
186,555,818,305,227,340,000,000,000,000,000,000,000
81
Fixed oob read in irp_write and similar
int service_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **envp __attribute__((unused))) { int r, opt, i, allow_trace = config_getswitch(IMAPOPT_HTTPALLOWTRACE); LIBXML_TEST_VERSION initialize_http_error_table(); if (geteuid() == 0) fatal("must run as the Cyr...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
278,189,250,612,226,350,000,000,000,000,000,000,000
105
HTTP: don't overrun buffer when parsing strings with sscanf()
unres_data_del(struct unres_data *unres, uint32_t i) { /* there are items after the one deleted */ if (i+1 < unres->count) { /* we only move the data, memory is left allocated, why bother */ memmove(&unres->node[i], &unres->node[i+1], (unres->count-(i+1)) * sizeof *unres->node); /* deleting...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
204,272,114,871,876,140,000,000,000,000,000,000,000
16
schema tree BUGFIX do not check features while still resolving schema Fixes #723
int unit_kill(Unit *u, KillWho w, int signo, sd_bus_error *error) { assert(u); assert(w >= 0 && w < _KILL_WHO_MAX); assert(signo > 0); assert(signo < _NSIG); if (!UNIT_VTABLE(u)->kill) return -ENOTSUP; return UNIT_VTABLE(u)->kill(u, w, signo, error); }
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
18,087,795,065,359,128,000,000,000,000,000,000,000
11
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
static void gem_transmit_updatestats(CadenceGEMState *s, const uint8_t *packet, unsigned bytes) { uint64_t octets; /* Total octets (bytes) transmitted */ octets = ((uint64_t)(s->regs[GEM_OCTTXLO]) << 32) | s->regs[GEM_OCTTXHI]; octets += bytes; s->r...
0
[ "CWE-835" ]
qemu
e73adfbeec9d4e008630c814759052ed945c3fed
21,418,337,891,408,520,000,000,000,000,000,000,000
41
cadence_gem: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redha...
static void nci_stop_poll(struct nfc_dev *nfc_dev) { struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); if ((atomic_read(&ndev->state) != NCI_DISCOVERY) && (atomic_read(&ndev->state) != NCI_W4_ALL_DISCOVERIES)) { pr_err("unable to stop poll, since poll is not active\n"); return; } nci_request(ndev, nci_rf_...
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
336,793,630,469,612,060,000,000,000,000,000,000,000
14
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
static int wrap_cmp( xmlNodePtr x, xmlNodePtr y ) { int res = xmlXPathCmpNodesExt(x, y); return res == -2 ? res : -res; }
0
[]
libxml2
03c6723043775122313f107695066e5744189a08
96,924,466,363,958,720,000,000,000,000,000,000,000
5
Handling of XPath function arguments in error case The XPath engine tries to guarantee that every XPath function can pop 'nargs' non-NULL values off the stack. libxslt, for example, relies on this assumption. But the check isn't thorough enough if there are errors during the evaluation of arguments. This can lead to s...
std::string Box_clap::dump(Indent& indent) const { std::ostringstream sstr; sstr << Box::dump(indent); sstr << indent << "clean_aperture: " << m_clean_aperture_width.numerator << "/" << m_clean_aperture_width.denominator << " x " << m_clean_aperture_height.numerator << "/" << m_clean_apertur...
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
295,233,935,290,596,670,000,000,000,000,000,000,000
16
force fraction to a limited resolution to finally solve those pesky numerical edge cases
static int qcow2_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVQcowState *s = bs->opaque; int len, i, ret = 0; QCowHeader header; QemuOpts *opts; Error *local_err = NULL; uint64_t ext_end; uint64_t l1_vm_state_index; const char *opt_overl...
1
[ "CWE-20" ]
qemu
24342f2cae47d03911e346fe1e520b00dc2818e0
262,484,886,545,905,600,000,000,000,000,000,000,000
338
qcow2: Check header_length (CVE-2014-0144) This fixes an unbounded allocation for s->unknown_header_fields. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
static void mce_timer_fn(struct timer_list *t) { struct timer_list *cpu_t = this_cpu_ptr(&mce_timer); unsigned long iv; WARN_ON(cpu_t != t); iv = __this_cpu_read(mce_next_interval); if (mce_available(this_cpu_ptr(&cpu_info))) { machine_check_poll(0, this_cpu_ptr(&mce_poll_banks)); if (mce_intel_cmci_poll()...
0
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
309,738,299,404,063,850,000,000,000,000,000,000,000
31
x86/MCE: Serialize sysfs changes The check_interval file in /sys/devices/system/machinecheck/machinecheck<cpu number> directory is a global timer value for MCE polling. If it is changed by one CPU, mce_restart() broadcasts the event to other CPUs to delete and restart the MCE polling timer and __mcheck_cpu_init_ti...
ffi_prep_cif_machdep (ffi_cif *cif) { ffi_type *rtype = cif->rtype; size_t bytes = cif->bytes; int flags, i, n; switch (rtype->type) { case FFI_TYPE_VOID: flags = AARCH64_RET_VOID; break; case FFI_TYPE_UINT8: flags = AARCH64_RET_UINT8; break; case FFI_TYPE_UINT16: ...
0
[ "CWE-787" ]
libffi
44a6c28545186d78642487927952844156fc7ab5
71,976,177,550,580,880,000,000,000,000,000,000,000
81
aarch64: Flush code mapping in addition to data mapping (#471) This needs a new function, ffi_data_to_code_pointer, to translate from data pointers to code pointers. Fixes issue #470.
static bool is_nan(const half val) { // Custom version that works with '-ffast-math' if (sizeof(half)==2) { short u; std::memcpy(&u,&val,sizeof(short)); return (bool)((u&0x7fff)>0x7c00); } return cimg::type<float>::is_nan((float)val); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
150,756,094,995,316,990,000,000,000,000,000,000,000
8
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static struct kobject *floppy_find(dev_t dev, int *part, void *data) { int drive = (*part & 3) | ((*part & 0x80) >> 5); if (drive >= N_DRIVE || !floppy_available(drive)) return NULL; if (((*part >> 2) & 0x1f) >= ARRAY_SIZE(floppy_type)) return NULL; *part = 0; return get_disk(disks[drive]); }
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
272,625,757,616,008,270,000,000,000,000,000,000,000
10
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
dp_packet_set_size(struct dp_packet *b, uint32_t v) { /* netdev-dpdk does not currently support segmentation; consequently, for * all intents and purposes, 'data_len' (16 bit) and 'pkt_len' (32 bit) may * be used interchangably. * * On the datapath, it is expected that the size of packets *...
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
205,396,326,470,594,940,000,000,000,000,000,000,000
14
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...
void HValueMap::Kill(GVNFlagSet flags) { GVNFlagSet depends_flags = HValue::ConvertChangesToDependsFlags(flags); if (!present_flags_.ContainsAnyOf(depends_flags)) return; present_flags_.RemoveAll(); for (int i = 0; i < array_size_; ++i) { HValue* value = array_[i].value; if (value != NULL) { // Cl...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
152,537,615,049,995,020,000,000,000,000,000,000,000
46
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
isdn_get_free_channel(int usage, int l2_proto, int l3_proto, int pre_dev ,int pre_chan, char *msn) { int i; ulong features; ulong vfeatures; features = ((1 << l2_proto) | (0x10000 << l3_proto)); vfeatures = (((1 << l2_proto) | (0x10000 << l3_proto)) & ~(ISDN_FEATURE_L2_V11096|ISDN_FEATURE_L2_V11019...
0
[ "CWE-119" ]
linux-2.6
eafe1aa37e6ec2d56f14732b5240c4dd09f0613a
317,103,610,111,023,500,000,000,000,000,000,000,000
47
I4L: fix isdn_ioctl memory overrun vulnerability Fix possible memory overrun issue in the isdn ioctl code. Found by ADLAB <adlab@venustech.com.cn> Signed-off-by: Karsten Keil <kkeil@suse.de> Cc: ADLAB <adlab@venustech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off...
get_request_entity(struct conn_s *connptr) { int ret; pollfd_struct fds[1] = {0}; fds[0].fd = connptr->client_fd; fds[0].events |= MYPOLL_READ; ret = mypoll(fds, 1, config->idletimeout); if (ret == -1) { log_message (LOG_ERR, ...
0
[ "CWE-200" ]
tinyproxy
3764b8551463b900b5b4e3ec0cd9bb9182191cb7
285,613,674,871,427,800,000,000,000,000,000,000,000
39
prevent junk from showing up in error page in invalid requests fixes #457
ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group) { struct ext4_group_desc *desc; struct ext4_sb_info *sbi = EXT4_SB(sb); struct buffer_head *bh; ext4_fsblk_t bitmap_blk; int err; desc = ext4_get_group_desc(sb, block_group, NULL); if (!desc) return ERR_PTR(-EFSCORRUPTED); bitmap...
1
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
294,541,772,633,658,250,000,000,000,000,000,000,000
79
ext4: only look at the bg_flags field if it is valid The bg_flags field in the block group descripts is only valid if the uninit_bg or metadata_csum feature is enabled. We were not consistently looking at this field; fix this. Also block group #0 must never have uninitialized allocation bitmaps, or need to be zeroed...
static int ocfs2_grab_pages_for_write(struct address_space *mapping, struct ocfs2_write_ctxt *wc, u32 cpos, loff_t user_pos, unsigned user_len, int new, struct page *mmap_page) { int ret = 0, i; unsigned long start, target_index, end_index, index; struct inode *inode = mapping...
0
[ "CWE-362" ]
linux
3e4c56d41eef5595035872a2ec5a483f42e8917f
54,910,699,712,690,320,000,000,000,000,000,000,000
86
ocfs2: ip_alloc_sem should be taken in ocfs2_get_block() ip_alloc_sem should be taken in ocfs2_get_block() when reading file in DIRECT mode to prevent concurrent access to extent tree with ocfs2_dio_end_io_write(), which may cause BUGON in the following situation: read file 'A' end_io...
static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva, hpa_t root_hpa) { struct kvm_shadow_walk_iterator iterator; struct kvm_mmu_page *sp; u64 old_spte; int level; u64 *sptep; vcpu_clear_mmio_info(vcpu, gva); /* * No need to check return value here, rmap_can_add() can * help us to skip pte prefetch l...
0
[]
linux
b1bd5cba3306691c771d558e94baa73e8b0b96b7
72,759,626,539,730,590,000,000,000,000,000,000,000
58
KVM: X86: MMU: Use the correct inherited permissions to get shadow page When computing the access permissions of a shadow page, use the effective permissions of the walk up to that point, i.e. the logic AND of its parents' permissions. Two guest PxE entries that point at the same table gfn need to be shadowed with di...
ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr, char *page) { struct perf_pmu_events_attr *pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr); if (pmu_attr->event_str) return sprintf(page, "%s\n", pmu_attr->event_str); return 0; }
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
152,566,450,251,171,820,000,000,000,000,000,000,000
11
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...
parse_SET_MPLS_TTL(char *arg, const struct ofpact_parse_params *pp) { struct ofpact_mpls_ttl *mpls_ttl = ofpact_put_SET_MPLS_TTL(pp->ofpacts); if (*arg == '\0') { return xstrdup("set_mpls_ttl: expected ttl."); } mpls_ttl->ttl = atoi(arg); return NULL; }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
16,940,595,146,349,301,000,000,000,000,000,000,000
11
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
exit_sg(void) { #ifdef CONFIG_SCSI_PROC_FS sg_proc_cleanup(); #endif /* CONFIG_SCSI_PROC_FS */ scsi_unregister_interface(&sg_interface); class_destroy(sg_sysfs_class); sg_sysfs_valid = 0; unregister_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0), SG_MAX_DEVS); idr_destroy(&sg_index_idr); }
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
54,342,351,301,472,980,000,000,000,000,000,000,000
12
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static void set_auto_event_chain(GtkButton *button, gpointer user_data) { //event is selected, so make sure the expert mode is disabled g_expert_mode = false; workflow_t *w = (workflow_t *)user_data; config_item_info_t *info = workflow_get_config_info(w); log_notice("selected workflow '%s'", ci_get...
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
50,563,757,196,750,900,000,000,000,000,000,000,000
33
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
static void var_free(void *v) { VAR *var= (VAR*) v; my_free(var->str_val); if (var->alloced) my_free(var); }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
56,948,878,299,593,710,000,000,000,000,000,000,000
7
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
R_API ut64 r_bin_java_element_pair_calc_size(RBinJavaElementValuePair *evp) { ut64 sz = 2; if (evp && evp->value) { // evp->element_name_idx = r_bin_java_read_short(bin, bin->b->cur); // evp->value = r_bin_java_element_value_new (bin, offset+2); sz += r_bin_java_element_value_calc_size (evp->value); } return ...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
160,399,646,169,480,450,000,000,000,000,000,000,000
9
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
int Curl_none_shutdown(struct Curl_easy *data UNUSED_PARAM, struct connectdata *conn UNUSED_PARAM, int sockindex UNUSED_PARAM) { (void)data; (void)conn; (void)sockindex; return 0; }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
110,916,288,869,743,070,000,000,000,000,000,000,000
9
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static PyObject *Log_isatty(LogObject *self, PyObject *args) { PyObject *result = NULL; if (!PyArg_ParseTuple(args, ":isatty")) return NULL; Py_INCREF(Py_False); return Py_False; }
0
[ "CWE-264" ]
mod_wsgi
d9d5fea585b23991f76532a9b07de7fcd3b649f4
240,967,341,552,284,700,000,000,000,000,000,000,000
10
Local privilege escalation when using daemon mode. (CVE-2014-0240)
static void fetch_bit_operand(struct x86_emulate_ctxt *ctxt) { long sv = 0, mask; if (ctxt->dst.type == OP_MEM && ctxt->src.type == OP_REG) { mask = ~(ctxt->dst.bytes * 8 - 1); if (ctxt->src.bytes == 2) sv = (s16)ctxt->src.val & (s16)mask; else if (ctxt->src.bytes == 4) sv = (s32)ctxt->src.val & (s32)ma...
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
286,498,742,121,767,850,000,000,000,000,000,000,000
18
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
uint8_t *dhcp_get_option(struct dhcp_packet *packet, int code) { int len, rem; uint8_t *optionptr; uint8_t overload = 0; /* option bytes: [code][len][data1][data2]..[dataLEN] */ optionptr = packet->options; rem = sizeof(packet->options); while (1) { if (rem <= 0) /* Bad packet, malformed option field */ ...
1
[]
connman
58d397ba74873384aee449690a9070bacd5676fa
309,749,066,381,347,020,000,000,000,000,000,000,000
59
gdhcp: Avoid reading invalid data in dhcp_get_option
virDomainChrSourceDefClear(virDomainChrSourceDefPtr def) { switch (def->type) { case VIR_DOMAIN_CHR_TYPE_PTY: case VIR_DOMAIN_CHR_TYPE_DEV: case VIR_DOMAIN_CHR_TYPE_FILE: case VIR_DOMAIN_CHR_TYPE_PIPE: VIR_FREE(def->data.file.path); break; case VIR_DOMAIN_CHR_TYPE_NMDM: ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
113,165,523,216,094,100,000,000,000,000,000,000,000
38
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
void addReplyStatus(redisClient *c, char *status) { _addReplyStatus(c,status,strlen(status)); }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
177,175,882,619,494,340,000,000,000,000,000,000,000
3
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
void streamGetEdgeID(stream *s, int first, int skip_tombstones, streamID *edge_id) { streamIterator si; int64_t numfields; streamIteratorStart(&si,s,NULL,NULL,!first); si.skip_tombstones = skip_tombstones; int found = streamIteratorGetID(&si,edge_id,&numfields); if (!found) { streamID mi...
0
[ "CWE-703", "CWE-401" ]
redis
4a7a4e42db8ff757cdf3f4a824f66426036034ef
73,487,053,115,791,770,000,000,000,000,000,000,000
13
Fix memory leak in streamGetEdgeID (#10753) si is initialized by streamIteratorStart(), we should call streamIteratorStop() on it when done. regression introduced in #9127 (redis 7.0)
static int ext4_xattr_ensure_credits(handle_t *handle, struct inode *inode, int credits, struct buffer_head *bh, bool dirty, bool block_csum) { int error; if (!ext4_handle_valid(handle)) return 0; if (handle->h_buffer_credits >= credits) return 0; error = ext4_journal_extend(handle, credits...
0
[]
linux
54dd0e0a1b255f115f8647fc6fb93273251b01b9
73,458,626,842,403,170,000,000,000,000,000,000,000
48
ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.or...
static struct tree_content *dup_tree_content(struct tree_content *s) { struct tree_content *d; struct tree_entry *a, *b; unsigned int i; if (!s) return NULL; d = new_tree_content(s->entry_count); for (i = 0; i < s->entry_count; i++) { a = s->entries[i]; b = new_tree_entry(); memcpy(b, a, sizeof(*a)); i...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
9,494,014,519,525,860,000,000,000,000,000,000,000
24
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
static void btrfs_merge_extent_hook(struct inode *inode, struct extent_state *new, struct extent_state *other) { u64 new_size, old_size; u64 num_extents; /* not delalloc, ignore it */ if (!(other->state & EXTENT_DELALLOC)) return; if (new->start > other->start) new_size = new->end - other->st...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
234,134,312,368,109,360,000,000,000,000,000,000,000
57
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
static int postrotateSingleLog(const struct logInfo *log, unsigned logNum, struct logState *state, struct logNames *rotNames) { int hasErrors = 0; if (!state->doRotate) { return 0; } if (!hasErrors && (log->flags & LOG_FLAG_TMPFILEN...
0
[ "CWE-732" ]
logrotate
f46d0bdfc9c53515c13880c501f4d2e1e7dd8b25
317,370,995,258,757,980,000,000,000,000,000,000,000
48
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...
\param[out] voxel_size Voxel size, as stored in the filename. \param[out] description Description, as stored in the filename. **/ CImgList<T>& load_tiff(const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
296,311,166,812,506,400,000,000,000,000,000,000,000
47
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
auth_update_key(struct sc_card *card, struct sc_cardctl_oberthur_updatekey_info *info) { int rv, ii; LOG_FUNC_CALLED(card->ctx); if (info->data_len != sizeof(void *) || !info->data) LOG_FUNC_RETURN(card->ctx, SC_ERROR_INVALID_ARGUMENTS); if (info->type == SC_CARDCTL_OBERTHUR_KEY_RSA_CRT) { struct sc_pkcs15...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
176,799,906,124,310,600,000,000,000,000,000,000,000
41
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static int check_reg_type(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, const u32 *arg_btf_id) { struct bpf_reg_state *regs = cur_regs(env), *reg = &regs[regno]; enum bpf_reg_type expected, type = reg->type; const struct bpf_reg_types *compatible; int i, j; compatible = compatible...
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
89,490,640,035,589,160,000,000,000,000,000,000,000
57
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
multi_process_per_second_timers_dowork(struct multi_context *m) { /* possibly reap instances/routes in vhash */ multi_reap_process(m); /* possibly print to status log */ if (m->top.c1.status_output) { if (status_trigger(m->top.c1.status_output)) { multi_print_status(m, m...
0
[ "CWE-362", "CWE-476" ]
openvpn
37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab
260,020,242,378,672,370,000,000,000,000,000,000,000
27
Fix illegal client float (CVE-2020-11810) There is a time frame between allocating peer-id and initializing data channel key (which is performed on receiving push request or on async push-reply) in which the existing peer-id float checks do not work right. If a "rogue" data channel packet arrives during that time fra...
nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) { struct nfsd4_copy *copy = &u->copy; __be32 status; struct nfsd4_copy *async_copy = NULL; status = nfsd4_verify_copy(rqstp, cstate, &copy->cp_src_stateid, &copy->file_src, &copy->cp_dst_stateid, &copy->fil...
0
[ "CWE-476" ]
linux
01310bb7c9c98752cc763b36532fab028e0f8f81
113,568,899,099,821,220,000,000,000,000,000,000,000
49
nfsd: COPY and CLONE operations require the saved filehandle to be set Make sure we have a saved filehandle, otherwise we'll oops with a null pointer dereference in nfs4_preprocess_stateid_op(). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat....
MagickExport MagickBooleanType FunctionImage(Image *image, const MagickFunction function,const size_t number_parameters, const double *parameters,ExceptionInfo *exception) { MagickBooleanType status; status=FunctionImageChannel(image,CompositeChannels,function, number_parameters,parameters,exception); ...
0
[ "CWE-119", "CWE-787" ]
ImageMagick6
91e58d967a92250439ede038ccfb0913a81e59fe
270,898,544,446,057,460,000,000,000,000,000,000,000
11
https://github.com/ImageMagick/ImageMagick/issues/1615
GF_Err av1dmx_process_buffer(GF_Filter *filter, GF_AV1DmxCtx *ctx, const char *data, u32 data_size, Bool is_copy) { u32 last_obu_end = 0; GF_Err e = GF_OK; if (!ctx->bs) ctx->bs = gf_bs_new(data, data_size, GF_BITSTREAM_READ); else gf_bs_reassign_buffer(ctx->bs, data, data_size); #ifndef GPAC_DISABLE_LOG if (ctx...
0
[ "CWE-476", "CWE-787" ]
gpac
13dad7d5ef74ca2e6fe4010f5b03eb12e9bbe0ec
235,484,317,529,668,630,000,000,000,000,000,000,000
46
fixed #1719
R_API int r_bin_select_idx(RBin *bin, const char *name, int idx) { RBinFile *nbinfile = NULL, *binfile = r_bin_cur (bin); RBinObject *obj = NULL; const char *tname = !name && binfile? binfile->file: name; int res = false; if (!tname || !bin) { return res; } nbinfile = r_bin_file_find_by_name_n (bin, tname, idx...
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
155,453,221,097,988,100,000,000,000,000,000,000,000
13
Fix #8748 - Fix oobread on string search
query_dname_tolower(uint8_t* dname) { /* the dname is stored uncompressed */ uint8_t labellen; labellen = *dname; while(labellen) { dname++; while(labellen--) { *dname = (uint8_t)tolower((unsigned char)*dname); dname++; } labellen = *dname; } }
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
151,715,492,421,945,370,000,000,000,000,000,000,000
14
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
static int megasas_dcmd_get_fw_time(MegasasState *s, MegasasCmd *cmd) { uint64_t fw_time; size_t dcmd_size = sizeof(fw_time); fw_time = cpu_to_le64(megasas_fw_time()); cmd->iov_size -= dma_buf_read((uint8_t *)&fw_time, dcmd_size, &cmd->qsg); return MFI_STAT_OK; }
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
144,293,545,015,719,410,000,000,000,000,000,000,000
10
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
static ssize_t _hostfs_write(oe_fd_t* desc, const void* buf, size_t count) { ssize_t ret = -1; file_t* file = _cast_file(desc); /* * Check parameters. * According to the POSIX specification, when the count is greater * than SSIZE_MAX, the result is implementation-defined. OE raises an *...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
238,354,254,807,144,680,000,000,000,000,000,000,000
34
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, int (*output)(struct net *, struct sock *, struct sk_buff *)) { struct iphdr *iph; int ptr; struct sk_buff *skb2; unsigned int mtu, hlen, left, len, ll_rs; int offset; __be16 not_last_frag; struct rtable *rt = skb_rtable(skb); int er...
0
[ "CWE-362" ]
net
85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa
154,444,670,053,617,130,000,000,000,000,000,000,000
257
udp: consistently apply ufo or fragmentation When iteratively building a UDP datagram with MSG_MORE and that datagram exceeds MTU, consistently choose UFO or fragmentation. Once skb_is_gso, always apply ufo. Conversely, once a datagram is split across multiple skbs, do not consider ufo. Sendpage already maintains th...
int i40e_config_rss(struct i40e_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size) { struct i40e_pf *pf = vsi->back; if (pf->hw_features & I40E_HW_RSS_AQ_CAPABLE) return i40e_config_rss_aq(vsi, seed, lut, lut_size); else return i40e_config_rss_reg(vsi, seed, lut, lut_size); }
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
311,365,106,068,560,580,000,000,000,000,000,000,000
9
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
static int __tipc_nl_add_udp_addr(struct sk_buff *skb, struct udp_media_addr *addr, int nla_t) { if (ntohs(addr->proto) == ETH_P_IP) { struct sockaddr_in ip4; memset(&ip4, 0, sizeof(ip4)); ip4.sin_family = AF_INET; ip4.sin_port = addr->port; ip4.sin_addr.s_addr = addr->ipv4.s_addr; if (nla_put(skb, ...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
95,099,200,938,127,780,000,000,000,000,000,000,000
28
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static int irda_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; struct irda_sock *self; struct sk_buff *skb; int err = -EPIPE; pr_debug("%s(), len=%zd\n", __func__, len); /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_...
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
75,998,899,040,694,190,000,000,000,000,000,000,000
83
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
static void ieee80211_stop_nan(struct wiphy *wiphy, struct wireless_dev *wdev) { struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); drv_stop_nan(sdata->local, sdata); ieee80211_sdata_stop(sdata); }
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
200,470,789,796,373,820,000,000,000,000,000,000,000
8
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
}; static umode_t iscsi_flashnode_sess_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) { struct device *dev = container_of(kobj, struct device, kobj); struct iscsi_bus_flash_session *fnode_sess = iscsi_dev_to_flash_session(dev); struct iscsi_transport *t = fnode_sess->...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
231,060,919,797,986,760,000,000,000,000,000,000,000
83
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
static struct input_pixel_processor *dce110_ipp_create( struct dc_context *ctx, uint32_t inst) { struct dce_ipp *ipp = kzalloc(sizeof(struct dce_ipp), GFP_KERNEL); if (!ipp) { BREAK_TO_DEBUGGER(); return NULL; } dce_ipp_construct(ipp, ctx, inst, &ipp_regs[inst], &ipp_shift, &ipp_mask); return &ipp->base;...
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
110,610,608,003,538,360,000,000,000,000,000,000,000
14
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
translate_ring_addresses(struct virtio_net *dev, int vq_index) { struct vhost_virtqueue *vq = dev->virtqueue[vq_index]; struct vhost_vring_addr *addr = &vq->ring_addrs; uint64_t len, expected_len; if (vq_is_packed(dev)) { len = sizeof(struct vring_packed_desc) * vq->size; vq->desc_packed = (struct vring_packed...
0
[ "CWE-190" ]
dpdk
d87f1a1cb7b666550bb53e39c1d85d9f7b861e6f
261,067,189,644,219,620,000,000,000,000,000,000,000
127
vhost: support inflight info sharing This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Signed-off-by: Lin Li <lilin24@baidu.com> Signed-off-by: Xun Ni <nixun@baidu.com> Signed-off-by: Yu Zhang <zhangyu31@b...
static void unfold_conds(struct condition *cnd, u_int32 a, u_int32 b) { struct unfold_elm *ue = NULL; do { /* the progress bar */ ef_debug(1, "?"); /* insert the condition as is */ SAFE_CALLOC(ue, 1, sizeof(struct unfold_elm)); memcpy(&ue->fop, &cnd->fop, sizeof(struct fil...
0
[ "CWE-703", "CWE-125" ]
ettercap
626dc56686f15f2dda13c48f78c2a666cb6d8506
102,247,494,969,828,860,000,000,000,000,000,000,000
31
Exit gracefully in case of corrupted filters (Closes issue #782)
void hns_ppe_set_rss_key(struct hns_ppe_cb *ppe_cb, const u32 rss_key[HNS_PPEV2_RSS_KEY_NUM]) { u32 key_item; for (key_item = 0; key_item < HNS_PPEV2_RSS_KEY_NUM; key_item++) dsaf_write_dev(ppe_cb, PPEV2_RSS_KEY_REG + key_item * 0x4, rss_key[key_item]); }
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
1,612,799,439,288,146,500,000,000,000,000,000,000
9
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...
static void FV_ToggleCharChanged(SplineChar *sc) { int i, j; int pos; FontView *fv; for ( fv = (FontView *) (sc->parent->fv); fv!=NULL; fv=(FontView *) (fv->b.nextsame) ) { if ( fv->b.sf!=sc->parent ) /* Can happen in CID fonts if char's parent is not currently active */ continue; if ( fv->v==NU...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
136,523,990,214,089,430,000,000,000,000,000,000,000
27
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, CACHE_SLOT) { USE_OPLINE zend_free_op free_op1, free_op2; zval *container, *property, *result; SAVE_OPLINE(); container = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_UNSET); if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
238,939,930,994,395,000,000,000,000,000,000,000,000
22
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
TEST_F(HttpConnectionManagerImplTest, IdleTimeoutNoCodec) { // Not used in the test. delete codec_; idle_timeout_ = (std::chrono::milliseconds(10)); Event::MockTimer* idle_timer = setUpTimer(); EXPECT_CALL(*idle_timer, enableTimer(_, _)); setup(false, ""); EXPECT_CALL(filter_callbacks_.connection_, clos...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
67,240,460,937,413,310,000,000,000,000,000,000,000
15
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...
spop(void) { static char dummy[] = ""; /* avoid const-cast */ char *result = dummy; if (TPS(stack_ptr) > 0) { TPS(stack_ptr)--; if (!TPS(stack)[TPS(stack_ptr)].num_type && TPS(stack)[TPS(stack_ptr)].data.str != 0) result = TPS(stack)[TPS(stack_ptr)].data.str; } else { DEBUG(2, ("spop: stack...
1
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
211,745,626,213,376,480,000,000,000,000,000,000,000
15
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
static const char *cgfs_get_cgroup(void *hdata, const char *subsystem) { struct cgfs_data *d = hdata; if (!d) return NULL; return lxc_cgroup_get_hierarchy_path_data(subsystem, d); }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
221,463,938,185,093,470,000,000,000,000,000,000,000
8
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static int config_input(AVFilterLink *inlink) { int ret; AVFilterContext *ctx = inlink->dst; FieldMatchContext *fm = ctx->priv; const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(inlink->format); const int w = inlink->w; const int h = inlink->h; fm->scthresh = (int64_t)((w * h * 255.0...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
e43a0a232dbf6d3c161823c2e07c52e76227a1bc
63,302,837,192,713,530,000,000,000,000,000,000,000
30
avfilter: fix plane validity checks Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
void object_err(struct kmem_cache *s, struct page *page, u8 *object, char *reason) { slab_bug(s, "%s", reason); print_trailer(s, page, object); }
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
137,506,395,319,502,240,000,000,000,000,000,000,000
6
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
ex_undo(exarg_T *eap) { if (eap->addr_count == 1) // :undo 123 undo_time(eap->line2, FALSE, FALSE, TRUE); else u_undo(1); }
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
325,059,026,393,779,650,000,000,000,000,000,000,000
7
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
static const char *ai_name(const struct addrinfo *ai) { static char addr[NI_MAXHOST]; if (getnameinfo(ai->ai_addr, ai->ai_addrlen, addr, sizeof(addr), NULL, 0, NI_NUMERICHOST) != 0) xsnprintf(addr, sizeof(addr), "(unknown)"); return addr; }
0
[ "CWE-706" ]
git
f82a97eb9197c1e3768e72648f37ce0ca3233734
674,547,171,312,854,100,000,000,000,000,000,000
9
mingw: handle `subst`-ed "DOS drives" Over a decade ago, in 25fe217b86c (Windows: Treat Windows style path names., 2008-03-05), Git was taught to handle absolute Windows paths, i.e. paths that start with a drive letter and a colon. Unbeknownst to us, while drive letters of physical drives are limited to letters of th...
ha_myisam::ha_myisam(handlerton *hton, TABLE_SHARE *table_arg) :handler(hton, table_arg), file(0), int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER | HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY | ...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
234,734,655,780,064,260,000,000,000,000,000,000,000
10
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
ses_res_attr(struct sess *sp, enum sess_attr a, void **dst, int sz) { ssize_t o; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); assert(a < SA_LAST); assert(sz >= 0); AN(dst); o = WS_ReserveSize(sp->ws, sz); if (o < sz) return (0); *dst = sp->ws->f; o = sp->ws->f - sp->ws->s; WS_Release(sp->ws, sz); assert(o >= 0 && o...
0
[ "CWE-617" ]
varnish-cache
2d8fc1a784a1e26d78c30174923a2b14ee2ebf62
61,018,513,506,626,000,000,000,000,000,000,000,000
18
Take sizeof pool_task into account when reserving WS in SES_Wait The assert on WS_ReserveSize() in ses_handle() can not trip because sizeof (struct pool_task) is less than sizeof (struct waited). But to safe guard against future problems if that were to change, this patch makes sure that the session workspace can hold...
static void sun6i_display_factors(struct factors_request *req) { u8 m; if (req->rate > req->parent_rate) req->rate = req->parent_rate; m = DIV_ROUND_UP(req->parent_rate, req->rate); req->rate = req->parent_rate / m; req->m = m - 1; }
0
[ "CWE-476" ]
linux
fcdf445ff42f036d22178b49cf64e92d527c1330
39,036,322,367,263,036,000,000,000,000,000,000,000
12
clk-sunxi: fix a missing-check bug in sunxi_divs_clk_setup() In sunxi_divs_clk_setup(), 'derived_name' is allocated by kstrndup(). It returns NULL when fails. 'derived_name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
void sqlite_iterator_get_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC) { struct php_sqlite_result *res = ((sqlite_object_iterator*)iter)->res; *data = &((sqlite_object_iterator*)iter)->value; if (res && !**data) { MAKE_STD_ZVAL(**data); php_sqlite_fetch_array(res, res->mode, 1, 0, **data TSRM...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
80,352,299,263,492,770,000,000,000,000,000,000,000
11
- 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
void MirrorJob::TransferFinished(Job *j) { long long bytes_count=j->GetBytesCount(); AddBytesTransferred(bytes_count); stats.bytes+=bytes_count; stats.time +=j->GetTimeSpent(); if(j->ExitCode()==0 && verbose_report>=2) { xstring finished; const xstring& cmd=j->GetCmdLine(); if(cmd[0]=='...
0
[ "CWE-20", "CWE-401" ]
lftp
a27e07d90a4608ceaf928b1babb27d4d803e1992
185,765,120,386,586,060,000,000,000,000,000,000,000
23
mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452)
GF_Err hmhd_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_HintMediaHeaderBox *ptr = (GF_HintMediaHeaderBox *)s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u16(bs, ptr->maxPDUSize); gf_bs_write_u16(bs, ptr->avgPDUSize); gf_bs_write_u32(bs, ptr->maxBitrate); gf_bs_write_u32(bs, ptr->avgB...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
81,528,680,470,022,730,000,000,000,000,000,000,000
14
prevent dref memleak on invalid input (#1183)
QPDF::reserveObjects(QPDFObjectHandle foreign, ObjCopier& obj_copier, bool top) { if (foreign.isReserved()) { throw std::logic_error( "QPDF: attempting to copy a foreign reserved object"); } if (foreign.isPagesObject()) { QTC::TC("qpdf", "QPDF not co...
0
[ "CWE-399", "CWE-835" ]
qpdf
701b518d5c56a1449825a3a37a716c58e05e1c3e
273,625,412,769,975,120,000,000,000,000,000,000,000
85
Detect recursion loops resolving objects (fixes #51) During parsing of an object, sometimes parts of the object have to be resolved. An example is stream lengths. If such an object directly or indirectly points to the object being parsed, it can cause an infinite loop. Guard against all cases of re-entrant resolution ...
static int strToMatch(const char* str ,char *retstr) { char* anchor = NULL; const char* anchor1 = NULL; int result = 0; if( (!str) || str[0] == '\0'){ return result; } else { anchor = retstr; anchor1 = str; while( (*str)!='\0' ){ if( *str == '-' ){ *retstr = '_'; } else { *...
0
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
218,261,915,452,650,370,000,000,000,000,000,000,000
28
Fix bug #72241: get_icu_value_internal out-of-bounds read
**/ bool is_key(const unsigned int keycode) const { #define _cimg_iskey_test(k) if (keycode==cimg::key##k) return _is_key##k; _cimg_iskey_test(ESC); _cimg_iskey_test(F1); _cimg_iskey_test(F2); _cimg_iskey_test(F3); _cimg_iskey_test(F4); _cimg_iskey_test(F5); _cimg_iskey_test(F6); _cimg_iskey_test(F7...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
173,214,574,473,148,830,000,000,000,000,000,000,000
29
Fix other issues in 'CImg<T>::load_bmp()'.
bool TABLE::add_tmp_key(uint key, uint key_parts, uint (*next_field_no) (uchar *), uchar *arg, bool unique) { DBUG_ASSERT(key < max_keys); char buf[NAME_CHAR_LEN]; KEY* keyinfo; Field **reg_field; uint i; bool key_start= TRUE; KEY_PART_INFO* key_part_info=...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
328,040,743,934,023,860,000,000,000,000,000,000,000
77
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.