func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int init_wvx_bitstream (WavpackStream *wps, WavpackMetadata *wpmd) { unsigned char *cp = (unsigned char *)wpmd->data; if (wpmd->byte_length <= 4 || (wpmd->byte_length & 1)) return FALSE; wps->crc_wvx = *cp++; wps->crc_wvx |= (int32_t) *cp++ << 8; wps->crc_wvx |= (int32_t) *cp++ << 1...
0
[ "CWE-125" ]
WavPack
bba5389dc598a92bdf2b297c3ea34620b6679b5b
190,286,652,099,661,400,000,000,000,000,000,000,000
15
issue #54: fix potential out-of-bounds heap read
rl_dump_functions (count, key) int count, key; { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); rl_function_dumper (rl_explicit_arg); rl_on_new_line (); return (0); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
259,831,076,202,059,060,000,000,000,000,000,000,000
9
bash-4.4-rc2 release
void __perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) { int ctxn; if (__this_cpu_read(perf_sched_cb_usages)) perf_pmu_sched_task(task, next, false); if (atomic_read(&nr_switch_events)) perf_event_switch(task, next, false); for_each_task_context_nr(ctxn) perf_event_contex...
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
320,146,740,239,963,030,000,000,000,000,000,000,000
22
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...
get_usages (struct hid_device_info *dev, unsigned short *usage_page, unsigned short *usage) { #ifdef __linux int res, desc_size; int ret = U2FH_TRANSPORT_ERROR; struct hidraw_report_descriptor rpt_desc; int handle = open (dev->path, O_RDWR); if (handle > 0) { memset (&rpt_desc, 0, sizeof (rpt_d...
0
[ "CWE-119", "CWE-908", "CWE-22" ]
libu2f-host
e4bb58cc8b6202a421e65f8230217d8ae6e16eb5
32,666,496,111,274,990,000,000,000,000,000,000,000
35
fix filling out of initresp
void jpc_pchglist_destroy(jpc_pchglist_t *pchglist) { int pchgno; if (pchglist->pchgs) { for (pchgno = 0; pchgno < pchglist->numpchgs; ++pchgno) { jpc_pchg_destroy(pchglist->pchgs[pchgno]); } jas_free(pchglist->pchgs); } jas_free(pchglist); }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
62,185,532,455,164,160,000,000,000,000,000,000,000
11
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
SimpleDataBuffer::SimpleDataBuffer(const SimpleDataBuffer & ToClone) :DataBuffer((binary *)malloc(ToClone.mySize * sizeof(binary)), ToClone.mySize, myFreeBuffer) { assert(myBuffer != NULL); memcpy(myBuffer, ToClone.myBuffer ,mySize ); bValidValue = ToClone.bValidValue; }
0
[ "CWE-200", "CWE-399", "CWE-119" ]
libmatroska
0a2d3e3644a7453b6513db2f9bc270f77943573f
140,047,595,353,336,180,000,000,000,000,000,000,000
7
KaxBlockInternal: check EBML lace sizes against available buffer space
TEST(ComparisonsTest, EqualBool) { ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, TensorType_BOOL, BuiltinOperator_EQUAL); model.PopulateTensor<bool>(model.input1(), {true, false, true, false}); model.PopulateTensor<bool>(model.input2(), {true, true, false, false}); model.Invoke()...
0
[ "CWE-20", "CWE-703" ]
tensorflow
a989426ee1346693cc015792f11d715f6944f2b8
220,713,247,339,026,350,000,000,000,000,000,000,000
10
Improve to cover scale value greater than one PiperOrigin-RevId: 433050921
static CURLcode tftp_set_timeouts(tftp_state_data_t *state) { time_t maxtime, timeout; timediff_t timeout_ms; bool start = (state->state == TFTP_STATE_START) ? TRUE : FALSE; time(&state->start_time); /* Compute drop-dead time */ timeout_ms = Curl_timeleft(state->conn->data, NULL, start); if(timeout_ms ...
0
[ "CWE-787" ]
curl
facb0e4662415b5f28163e853dc6742ac5fafb3d
54,175,581,048,900,960,000,000,000,000,000,000,000
74
tftp: Alloc maximum blksize, and use default unless OACK is received Fixes potential buffer overflow from 'recvfrom()', should the server return an OACK without blksize. Bug: https://curl.haxx.se/docs/CVE-2019-5482.html CVE-2019-5482
static void clear_context(MpegEncContext *s) { int i, j, k; memset(&s->next_picture, 0, sizeof(s->next_picture)); memset(&s->last_picture, 0, sizeof(s->last_picture)); memset(&s->current_picture, 0, sizeof(s->current_picture)); memset(&s->new_picture, 0, sizeof(s->new_picture)); memset(s->thre...
0
[ "CWE-476" ]
FFmpeg
b3332a182f8ba33a34542e4a0370f38b914ccf7d
185,313,839,270,259,270,000,000,000,000,000,000,000
75
avcodec/idctdsp: Transmit studio_profile to init instead of using AVCodecContext profile These 2 fields are not always the same, it is simpler to always use the same field for detecting studio profile Fixes: null pointer dereference Fixes: ffmpeg_crash_3.avi Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böh...
static int __init ebtables_init(void) { int ret; ret = xt_register_target(&ebt_standard_target); if (ret < 0) return ret; ret = nf_register_sockopt(&ebt_sockopts); if (ret < 0) { xt_unregister_target(&ebt_standard_target); return ret; } printk(KERN_INFO "Ebtables v2.0 registered\n"); return 0; }
0
[ "CWE-20" ]
linux
d846f71195d57b0bbb143382647c2c6638b04c5a
96,801,649,926,279,670,000,000,000,000,000,000,000
16
bridge: netfilter: fix information leak Struct tmp is copied from userspace. It is not checked whether the "name" field is NULL terminated. This may lead to buffer overflow and passing contents of kernel stack as a module name to try_then_request_module() and, consequently, to modprobe commandline. It would be seen...
static enum hrtimer_restart vmx_preemption_timer_fn(struct hrtimer *timer) { struct vcpu_vmx *vmx = container_of(timer, struct vcpu_vmx, nested.preemption_timer); vmx->nested.preemption_timer_expired = true; kvm_make_request(KVM_REQ_EVENT, &vmx->vcpu); kvm_vcpu_kick(&vmx->vcpu); return HRTIMER_NORESTART; }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
112,102,104,949,869,760,000,000,000,000,000,000,000
11
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
static void build_completion_hash(bool rehash, bool write_info) { COMMANDS *cmd=commands; MYSQL_RES *databases=0,*tables=0; MYSQL_RES *fields; static char ***field_names= 0; MYSQL_ROW database_row,table_row; MYSQL_FIELD *sql_field; char buf[NAME_LEN*2+2]; // table name plus field name plus 2 int i,j,n...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
43,301,831,012,114,750,000,000,000,000,000,000,000
120
WL#9072: Backport WL#8785 to 5.5
string_buffer_getsegcount(PyStringObject *self, Py_ssize_t *lenp) { if ( lenp ) *lenp = Py_SIZE(self); return 1; }
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
82,289,776,330,043,300,000,000,000,000,000,000,000
6
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
static int unimac_mdio_remove(struct platform_device *pdev) { struct unimac_mdio_priv *priv = platform_get_drvdata(pdev); mdiobus_unregister(priv->mii_bus); mdiobus_free(priv->mii_bus); return 0; }
0
[ "CWE-476" ]
linux
297a6961ffb8ff4dc66c9fbf53b924bd1dda05d5
62,863,195,086,971,510,000,000,000,000,000,000,000
9
net: phy: mdio-bcm-unimac: fix potential NULL dereference in unimac_mdio_probe() platform_get_resource() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, ...
gs_manager_set_lock_active (GSManager *manager, gboolean lock_active) { g_return_if_fail (GS_IS_MANAGER (manager)); gs_debug ("Setting lock active: %d", lock_active); if (manager->priv->lock_active != lock_active) { GSList *l; mana...
0
[]
gnome-screensaver
2f597ea9f1f363277fd4dfc109fa41bbc6225aca
14,911,655,010,899,753,000,000,000,000,000,000,000
16
Fix adding monitors Make sure to show windows that are added. And fix an off by one bug.
do_restrict( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt, int op ) { char * datap; struct conf_restrict cr; u_short items; size_t item_sz; sockaddr_u matchaddr; sockaddr_u matchmask; int bad; /* * Do a check of the flags to make sure that only * the NTPPORT flag is set, if any. ...
1
[ "CWE-190" ]
ntp
c04c3d3d940dfe1a53132925c4f51aef017d2e0f
217,985,993,798,238,940,000,000,000,000,000,000,000
84
[TALOS-CAN-0052] crash by loop counter underrun.
bool entries(JSContext *cx, unsigned argc, Value *vp) { HEADERS_ITERATION_METHOD(0) return JS::MapEntries(cx, backing_map, args.rval()); }
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
132,605,809,135,424,940,000,000,000,000,000,000,000
4
use rangom_get instead of arc4random as arc4random does not work correctly with wizer wizer causes the seed in arc4random to be the same between executions which is not random
void kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu, int vector, int trigger_mode) { struct kvm_ioapic *ioapic = vcpu->kvm->arch.vioapic; spin_lock(&ioapic->lock); __kvm_ioapic_update_eoi(vcpu, ioapic, vector, trigger_mode); spin_unlock(&ioapic->lock); }
0
[ "CWE-20" ]
kvm
5678de3f15010b9022ee45673f33bcfc71d47b60
275,030,562,259,204,250,000,000,000,000,000,000,000
8
KVM: ioapic: fix assignment of ioapic->rtc_status.pending_eoi (CVE-2014-0155) QE reported that they got the BUG_ON in ioapic_service to trigger. I cannot reproduce it, but there are two reasons why this could happen. The less likely but also easiest one, is when kvm_irq_delivery_to_apic does not deliver to any APIC a...
void PackLinuxElf32mipsel::defineSymbols(Filter const *ft) { PackLinuxElf32::defineSymbols(ft); unsigned const hlen = sz_elf_hdrs + sizeof(l_info) + sizeof(p_info); // We want to know if compressed data, plus stub, plus a couple pages, // will fit below the uncompressed program in memory. But we don'...
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
203,616,915,112,643,640,000,000,000,000,000,000,000
65
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
getreg_wrap_one_line(char_u *s, int flags) { if (flags & GREG_LIST) { list_T *list = list_alloc(); if (list != NULL) { if (list_append_string(list, NULL, -1) == FAIL) { list_free(list); return NULL; } list->lv_first->li_tv.vval.v_string = s; } return (char_u *)list; } retur...
0
[ "CWE-122", "CWE-787" ]
vim
d25f003342aca9889067f2e839963dfeccf1fe05
120,797,708,144,148,400,000,000,000,000,000,000,000
19
patch 9.0.0011: reading beyond the end of the line with put command Problem: Reading beyond the end of the line with put command. Solution: Adjust the end mark position.
static ssize_t os_desc_qw_sign_show(struct config_item *item, char *page) { struct gadget_info *gi = os_desc_item_to_gadget_info(item); int res; res = utf16s_to_utf8s((wchar_t *) gi->qw_sign, OS_STRING_QW_SIGN_LEN, UTF16_LITTLE_ENDIAN, page, PAGE_SIZE - 1); page[res++] = '\n'; return res; }
0
[ "CWE-125" ]
linux
15753588bcd4bbffae1cca33c8ced5722477fe1f
74,409,820,408,825,760,000,000,000,000,000,000,000
11
USB: gadget: fix illegal array access in binding with UDC FuzzUSB (a variant of syzkaller) found an illegal array access using an incorrect index while binding a gadget with UDC. Reference: https://www.spinics.net/lists/linux-usb/msg194331.html This bug occurs when a size variable used for a buffer is misused to acc...
lldpd_send(struct lldpd_hardware *hardware) { struct lldpd *cfg = hardware->h_cfg; struct lldpd_port *port; int i, sent; if (cfg->g_config.c_receiveonly || cfg->g_config.c_paused) return; if (hardware->h_lport.p_disable_tx) return; if ((hardware->h_flags & IFF_RUNNING) == 0) return; log_debug("send", "send P...
0
[ "CWE-617", "CWE-703" ]
lldpd
9221b5c249f9e4843f77c7f888d5705348d179c0
266,755,254,793,679,700,000,000,000,000,000,000,000
60
protocols: don't use assert on paths that can be reached Malformed packets should not make lldpd crash. Ensure we can handle them by not using assert() in this part.
void HtmlOutputDev::doProcessLink(AnnotLink* link){ double _x1,_y1,_x2,_y2; int x1,y1,x2,y2; link->getRect(&_x1,&_y1,&_x2,&_y2); cvtUserToDev(_x1,_y1,&x1,&y1); cvtUserToDev(_x2,_y2,&x2,&y2); GooString* _dest=getLinkDest(link); HtmlLink t((double) x1,(double) y2,(double) x2,(double) y1,_dest); pag...
0
[ "CWE-824" ]
poppler
30c731b487190c02afff3f036736a392eb60cd9a
99,072,333,236,059,200,000,000,000,000,000,000,000
15
Properly initialize HtmlOutputDev::page to avoid SIGSEGV upon error exit. Closes #742
Status InferenceContext::Merge(DimensionHandle d0, DimensionHandle d1, DimensionHandle* out) { if (d0.SameHandle(d1)) { *out = d0; return Status::OK(); } else if (!ValueKnown(d1)) { *out = d0; merged_dims_.emplace_back(d0, d1); return Status::OK(); } else if (!Va...
0
[ "CWE-190" ]
tensorflow
acd56b8bcb72b163c834ae4f18469047b001fadf
30,207,142,059,973,000,000,000,000,000,000,000,000
22
Fix security vulnerability with SpaceToBatchNDOp. PiperOrigin-RevId: 445527615
static void *netlink_seq_next(struct seq_file *seq, void *v, loff_t *pos) { struct sock *s; struct nl_seq_iter *iter; int i, j; ++*pos; if (v == SEQ_START_TOKEN) return netlink_seq_socket_idx(seq, 0); iter = seq->private; s = v; do { s = sk_next(s); } while (s && sock_net(s) != seq_file_net(seq)); if (...
0
[]
linux-2.6
16e5726269611b71c930054ffe9b858c1cea88eb
210,397,921,513,406,060,000,000,000,000,000,000,000
41
af_unix: dont send SCM_CREDENTIALS by default Since commit 7361c36c5224 (af_unix: Allow credentials to work across user and pid namespaces) af_unix performance dropped a lot. This is because we now take a reference on pid and cred in each write(), and release them in read(), usually done from another process, eventua...
static BSONObj stripFieldNamesAndApplyCollation(const BSONObj& obj, const CollatorInterface* collator) { BSONObjBuilder bob; for (BSONElement elt : obj) { CollationIndexKey::collationAwareIndexKeyAppend(elt, collator, &bob); } return bob.obj(); }
0
[ "CWE-755" ]
mongo
c8ced6df8f620daaa2e539f192f2eef356c63e9c
16,438,050,040,909,750,000,000,000,000,000,000,000
8
SERVER-47773 Error consistently when tailable cursors and $near are used together
negotiate_handshake_newstyle_options (struct connection *conn) { struct new_option new_option; size_t nr_options; uint64_t version; uint32_t option; uint32_t optlen; char data[MAX_OPTION_LENGTH+1]; struct new_handshake_finish handshake_finish; const char *optname; for (nr_options = 0; nr_options < MA...
0
[ "CWE-406" ]
nbdkit
b2bc6683ea3cd1f6be694e8a681dfa411b7d15f3
75,937,781,262,320,230,000,000,000,000,000,000,000
424
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
OPJ_BOOL opj_j2k_write_mct_data_group( opj_j2k_t *p_j2k, struct opj_stream_private *p_stream, struct opj_event_mgr * p_manager ) { OPJ_UINT32 i; opj_simple_mcc...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
123,118,196,655,661,730,000,000,000,000,000,000,000
47
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
show_usage(char *name) { char *s; s = strrchr(name, '/'); s = s ? s+1 : name; printf("picocom v%s\n", VERSION_STR); printf("\nCompiled-in options:\n"); printf(" TTY_Q_SZ is %d\n", TTY_Q_SZ); #ifdef USE_HIGH_BAUD printf(" HIGH_BAUD is enabled\n"); #endif #ifdef USE_FLOCK printf(" USE_FLOCK is enabled\n"); ...
0
[ "CWE-77", "CWE-125" ]
picocom
1ebc60b20fbe9a02436d5cbbf8951714e749ddb1
271,720,619,546,916,030,000,000,000,000,000,000,000
54
Do not use "/bin/sh" to run external commands. Picocom no longer uses /bin/sh to run external commands for file-transfer operations. Parsing the command line and spliting it into arguments is now performed internally by picocom, using quoting rules very similar to those of the Unix shell. Hopefully, this makes it impo...
void qemu_chr_be_write_impl(CharDriverState *s, uint8_t *buf, int len) { CharBackend *be = s->be; if (be && be->chr_read) { be->chr_read(be->opaque, buf, len); } }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
58,326,696,543,171,660,000,000,000,000,000,000,000
8
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...
PHP_METHOD(Phar, mapPhar) { char *alias = NULL, *error; size_t alias_len = 0; zend_long dataoffset = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!l", &alias, &alias_len, &dataoffset) == FAILURE) { return; } phar_request_initialize(); RETVAL_BOOL(phar_open_executed_filename(alias, alias_len, &error) == ...
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
246,679,577,610,882,030,000,000,000,000,000,000,000
19
Fix bug #71860: Require valid paths for phar filenames
QPDFFormFieldObjectHelper::setCheckBoxValue(bool value) { // Set /AS to /Yes or /Off in addition to setting /V. QPDFObjectHandle name = QPDFObjectHandle::newName(value ? "/Yes" : "/Off"); setFieldAttribute("/V", name); QPDFObjectHandle AP = this->oh.getKey("/AP"); QPDFObjectHandle annot; ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
189,590,075,958,329,560,000,000,000,000,000,000,000
43
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 ...
static zval *spl_array_read_property(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC) /* {{{ */ { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 && !std_object_handlers.has_property(object, ...
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
97,260,693,507,846,780,000,000,000,000,000,000,000
10
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
void udp_destroy_sock(struct sock *sk) { struct udp_sock *up = udp_sk(sk); bool slow = lock_sock_fast(sk); udp_flush_pending_frames(sk); unlock_sock_fast(sk, slow); if (static_key_false(&udp_encap_needed) && up->encap_type) { void (*encap_destroy)(struct sock *sk); encap_destroy = ACCESS_ONCE(up->encap_destroy...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
38,679,743,811,314,074,000,000,000,000,000,000,000
13
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
httpWriteResponse(http_t *http, /* I - HTTP connection */ http_status_t status) /* I - Status code */ { http_encoding_t old_encoding; /* Old data_encoding value */ off_t old_remaining; /* Old data_remaining value */ /* * Range check input... */ DEBUG_printf(("httpWriteResponse(http=%p, status...
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
157,959,150,867,113,680,000,000,000,000,000,000,000
215
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
static inline int get_v4l2_input32(struct v4l2_input __user *kp, struct v4l2_input32 __user *up) { if (copy_in_user(kp, up, sizeof(*up))) return -EFAULT; return 0; }
0
[ "CWE-787" ]
linux
a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a
211,353,894,392,839,060,000,000,000,000,000,000,000
7
media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit ioctl in user space memory which is commonly allocated using compat...
format_ENCAP(const struct ofpact_encap *a, const struct ofpact_format_params *fp) { ds_put_format(fp->s, "%sencap(%s", colors.paren, colors.end); ds_put_format(fp->s, "%s", format_encap_pkt_type(a->new_pkt_type)); if (a->n_props > 0) { ds_put_format(fp->s, "%s(%s", colors.paren, colors....
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
166,659,140,956,503,110,000,000,000,000,000,000,000
12
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...
MONGO_EXPORT const char *bson_iterator_code( const bson_iterator *i ) { switch ( bson_iterator_type( i ) ) { case BSON_STRING: case BSON_CODE: return bson_iterator_value( i ) + 4; case BSON_CODEWSCOPE: return bson_iterator_value( i ) + 8; default: return NULL; } }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
298,044,360,002,893,330,000,000,000,000,000,000,000
11
don't mix up int and size_t (first pass to fix that)
int nfc_dev_down(struct nfc_dev *dev) { int rc = 0; pr_debug("dev_name=%s\n", dev_name(&dev->dev)); device_lock(&dev->dev); if (dev->shutting_down) { rc = -ENODEV; goto error; } if (!dev->dev_up) { rc = -EALREADY; goto error; } if (dev->polling || dev->active_target) { rc = -EBUSY; goto error; ...
0
[ "CWE-416" ]
linux
da5c0f119203ad9728920456a0f52a6d850c01cd
75,538,941,644,222,900,000,000,000,000,000,000,000
32
nfc: replace improper check device_is_registered() in netlink related functions The device_is_registered() in nfc core is used to check whether nfc device is registered in netlink related functions such as nfc_fw_download(), nfc_dev_up() and so on. Although device_is_registered() is protected by device_lock, there is ...
legal_identifier (name) char *name; { register char *s; unsigned char c; if (!name || !(c = *name) || (legal_variable_starter (c) == 0)) return (0); for (s = name + 1; (c = *s) != 0; s++) { if (legal_variable_char (c) == 0) return (0); } return (1); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
46,848,437,235,025,690,000,000,000,000,000,000,000
16
bash-4.4-rc2 release
GF_Node *gf_sg_find_node(GF_SceneGraph *sg, u32 nodeID) { NodeIDedItem *reg_node = sg->id_node; while (reg_node) { if (reg_node->NodeID == nodeID) return reg_node->node; reg_node = reg_node->next; } return NULL; }
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
293,439,619,205,631,220,000,000,000,000,000,000,000
9
fixed #2109
R_API void r_str_range_foreach(const char *r, RStrRangeCallback cb, void *u) { const char *p = r; for (; *r; r++) { if (*r == ',') { cb (u, atoi (p)); p = r + 1; } if (*r == '-') { if (p != r) { int from = atoi (p); int to = atoi (r + 1); for (; from <= to; from++) { cb (u, from); ...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
300,503,519,299,825,500,000,000,000,000,000,000,000
27
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
GF_Err fpar_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 i; FilePartitionBox *ptr = (FilePartitionBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_int(bs, ptr->itemID, ptr->version ? 32 : 16); gf_bs_write_u16(bs, ptr->packet_payload_size); gf_bs_writ...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
149,851,458,087,225,900,000,000,000,000,000,000,000
31
fixed 2 possible heap overflows (inc. #1088)
static int piv_general_mutual_authenticate(sc_card_t *card, unsigned int key_ref, unsigned int alg_id) { int r; #ifdef ENABLE_OPENSSL int N; int locked = 0; u8 rbuf[4096]; u8 *nonce = NULL; size_t nonce_len; u8 *p; u8 *key = NULL; size_t keylen; u8 *plain_text = NULL; size_t plain_text_len = 0; u8 *tmp; s...
0
[]
OpenSC
456ac566938a1da774db06126a2fa6c0cba514b3
192,311,429,686,044,480,000,000,000,000,000,000,000
298
PIV Improved parsing of data from the card Based on Fuzz testing, many of the calls to sc_asn1_find_tag were replaced with sc_asn1_read_tag. The input is also tested that the expected tag is the first byte. Additional tests are also add. sc_asn1_find_tag will skip 0X00 or 0Xff if found. NIST sp800-73-x specs do not ...
static ssize_t ossl_send(struct Curl_easy *data, int sockindex, const void *mem, size_t len, CURLcode *curlcode) { /* SSL_write() is said to return 'int' while write() and send() returns 'size_t' */ int err; c...
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
151,135,756,171,861,760,000,000,000,000,000,000,000
81
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
expand_sfile(char_u *arg) { char *errormsg; int len; char_u *result; char_u *newres; char_u *repl; int srclen; char_u *p; result = vim_strsave(arg); if (result == NULL) return NULL; for (p = result; *p; ) { if (STRNCMP(p, "<sfile>", 7) != 0) ++p; else { // r...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
129,964,539,036,046,660,000,000,000,000,000,000,000
55
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.
PHP_MINIT_FUNCTION(dns) { REGISTER_LONG_CONSTANT("DNS_A", PHP_DNS_A, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("DNS_NS", PHP_DNS_NS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("DNS_CNAME", PHP_DNS_CNAME, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("DNS_SOA", PHP_DNS_SOA...
0
[ "CWE-125" ]
php-src
8d3dfabef459fe7815e8ea2fd68753fd17859d7b
181,241,214,419,830,430,000,000,000,000,000,000,000
18
Fix #77369 - memcpy with negative length via crafted DNS response
int addopt(char *optstr, int maxlen, const char *s) { size_t n; size_t m; n = strlen(optstr); m = n + strlen(s) + 1; if (m > JAS_CAST(size_t, maxlen)) { return 1; } if (n > 0) { strcat(optstr, "\n"); } strcat(optstr, s); return 0; }
0
[ "CWE-703", "CWE-401" ]
jasper
d99636fad60629785efd1ef72da772a8ef68f54c
112,935,746,294,207,900,000,000,000,000,000,000,000
16
fix memory leaks in function cmdopts_parse
closezlog (struct zlog *zl) { closelog(); fclose (zl->fp); XFREE (MTYPE_ZLOG, zl); }
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
50,564,565,893,085,350,000,000,000,000,000,000,000
7
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static void mlx5_fpga_conn_cq_complete(struct mlx5_core_cq *mcq, struct mlx5_eqe *eqe) { struct mlx5_fpga_conn *conn; conn = container_of(mcq, struct mlx5_fpga_conn, cq.mcq); if (unlikely(!conn->qp.active)) return; mlx5_fpga_conn_cqes(conn, MLX5_FPGA_CQ_BUDGET); }
0
[ "CWE-400", "CWE-401" ]
linux
c8c2a057fdc7de1cd16f4baa51425b932a42eb39
67,753,351,447,604,580,000,000,000,000,000,000,000
10
net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq In mlx5_fpga_conn_create_cq if mlx5_vector2eqn fails the allocated memory should be released. Fixes: 537a50574175 ("net/mlx5: FPGA, Add high-speed connection routines") Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Saeed Mahameed <s...
BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile) { int i; im->tile = tile; if ((!im->trueColor) && (!im->tile->trueColor)) { for (i = 0; (i < gdImageColorsTotal (tile)); i++) { int index; index = gdImageColorResolveAlpha (im, gdImageRed (tile, i), gdImageGreen (...
0
[ "CWE-190" ]
libgd
cfee163a5e848fc3e3fb1d05a30d7557cdd36457
30,573,556,366,714,480,000,000,000,000,000,000,000
18
- #18, Removed invalid gdFree call when overflow2 fails - #17, Free im->pixels as well on error
ElectronBrowserClient::CreateDevToolsManagerDelegate() { return std::make_unique<DevToolsManagerDelegate>(); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
231,190,993,503,621,930,000,000,000,000,000,000,000
3
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
struct list_head *seq_list_start_head(struct list_head *head, loff_t pos) { if (!pos) return head; return seq_list_start(head, pos - 1); }
0
[ "CWE-120", "CWE-787" ]
linux
8cae8cd89f05f6de223d63e6d15e31c8ba9cf53b
38,810,598,778,700,850,000,000,000,000,000,000,000
7
seq_file: disallow extremely large seq buffer allocations There is no reasonable need for a buffer larger than this, and it avoids int overflow pitfalls. Fixes: 058504edd026 ("fs/seq_file: fallback to vmalloc allocation") Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Reported-by: Qualys Security Advisory <qsa@qualy...
xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem) { xmlNodePtr parent; if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlAddSibling : cur == NULL\n"); #endif return(NULL); } if ((elem == NULL) || (elem->type == XML_NAMESPACE...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
59,898,267,578,963,910,000,000,000,000,000,000,000
64
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
static inline int complete_emulated_io(struct kvm_vcpu *vcpu) { int r; vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); r = kvm_emulate_instruction(vcpu, EMULTYPE_NO_DECODE); srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); return r; }
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
263,653,122,718,621,160,000,000,000,000,000,000,000
9
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
int modbus_read_bits(modbus_t *ctx, int addr, int nb, uint8_t *dest) { int rc; if (ctx == NULL) { errno = EINVAL; return -1; } if (nb > MODBUS_MAX_READ_BITS) { if (ctx->debug) { fprintf(stderr, "ERROR Too many bits requested (%d > %d)\n", ...
0
[ "CWE-125" ]
libmodbus
5ccdf5ef79d742640355d1132fa9e2abc7fbaefc
81,257,213,205,658,210,000,000,000,000,000,000,000
26
Fix VD-1301 and VD-1302 vulnerabilities This patch was contributed by Maor Vermucht and Or Peles from VDOO Connected Trust.
elg_get_nbits (gcry_sexp_t parms) { gcry_sexp_t l1; gcry_mpi_t p; unsigned int nbits; l1 = sexp_find_token (parms, "p", 1); if (!l1) return 0; /* Parameter P not found. */ p= sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG); sexp_release (l1); nbits = p? mpi_get_nbits (p) : 0; _gcry_mpi_release (p); ret...
0
[ "CWE-200" ]
libgcrypt
410d70bad9a650e3837055e36f157894ae49a57d
159,290,170,964,574,870,000,000,000,000,000,000,000
16
cipher: Use ciphertext blinding for Elgamal decryption. * cipher/elgamal.c (USE_BLINDING): New. (decrypt): Rewrite to use ciphertext blinding. -- CVE-id: CVE-2014-3591 As a countermeasure to a new side-channel attacks on sliding windows exponentiation we blind the ciphertext for Elgamal decryption. This is similar ...
conntrack_execute(struct conntrack *ct, struct dp_packet_batch *pkt_batch, ovs_be16 dl_type, bool force, bool commit, uint16_t zone, const uint32_t *setmark, const struct ovs_key_ct_labels *setlabel, ovs_be16 tp_src, ovs_be16 tp_dst, const char *he...
0
[ "CWE-400" ]
ovs
53c1b8b166f3dd217bc391d707885f789e9ecc49
35,917,016,509,997,643,000,000,000,000,000,000,000
29
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...
MONGO_EXPORT int bson_append_string_n( bson *b, const char *name, const char *value, size_t len ) { return bson_append_string_base( b, name, value, len, BSON_STRING ); }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
55,156,706,060,756,810,000,000,000,000,000,000,000
3
don't mix up int and size_t (first pass to fix that)
struct mm_struct *get_task_mm(struct task_struct *task) { struct mm_struct *mm; task_lock(task); mm = task->mm; if (mm) { if (task->flags & PF_KTHREAD) mm = NULL; else mmget(mm); } task_unlock(task); return mm; }
0
[ "CWE-416", "CWE-703" ]
linux
2b7e8665b4ff51c034c55df3cff76518d1a9ee3a
102,159,551,139,269,080,000,000,000,000,000,000,000
15
fork: fix incorrect fput of ->exe_file causing use-after-free Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new erro...
rrinternal_parse_unknown(sldns_buffer* strbuf, char* token, size_t token_len, uint8_t* rr, size_t* rr_len, size_t* rr_cur_len, size_t pre_data_pos) { const char* delim = "\n\t "; size_t hex_data_size, cur_hex_data_size; /* go back to before \# * and skip it while setting delimiters better */ sldns_buffe...
0
[]
unbound
3f3cadd416d6efa92ff2d548ac090f42cd79fee9
334,728,133,658,043,060,000,000,000,000,000,000,000
44
- Fix Out of Bounds Write in sldns_str2wire_str_buf(), reported by X41 D-Sec.
init_dynamic_array_var (name, getfunc, setfunc, attrs) char *name; sh_var_value_func_t *getfunc; sh_var_assign_func_t *setfunc; int attrs; { SHELL_VAR *v; v = find_variable (name); if (v) return (v); INIT_DYNAMIC_ARRAY_VAR (name, getfunc, setfunc); if (attrs) VSETATTR (v, attrs); ...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
336,797,069,506,277,700,000,000,000,000,000,000,000
16
commit bash-20120224 snapshot
tagstack_push_item( win_T *wp, char_u *tagname, int cur_fnum, int cur_match, pos_T mark, int fnum, char_u *user_data) { taggy_T *tagstack = wp->w_tagstack; int idx = wp->w_tagstacklen; // top of the stack // if the tagstack is full: remove the oldest entry if (idx >= TAGSTACKSIZE) { tagst...
0
[ "CWE-416" ]
vim
adce965162dd89bf29ee0e5baf53652e7515762c
325,879,186,116,516,220,000,000,000,000,000,000,000
29
patch 9.0.0246: using freed memory when 'tagfunc' deletes the buffer Problem: Using freed memory when 'tagfunc' deletes the buffer. Solution: Make a copy of the tag name.
static void io_prep_async_link(struct io_kiocb *req) { struct io_kiocb *cur; if (req->flags & REQ_F_LINK_TIMEOUT) { struct io_ring_ctx *ctx = req->ctx; spin_lock_irq(&ctx->timeout_lock); io_for_each_link(cur, req) io_prep_async_work(cur); spin_unlock_irq(&ctx->timeout_lock); } else { io_for_each_link(...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
45,418,690,039,108,530,000,000,000,000,000,000,000
16
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
void Field_string::sql_type(String &res) const { THD *thd= table->in_use; CHARSET_INFO *cs=res.charset(); size_t length; length= cs->cset->snprintf(cs,(char*) res.ptr(), res.alloced_length(), "%s(%d)", (type() == MYSQL_TYPE_VAR_STRING ? ...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
184,274,419,485,132,980,000,000,000,000,000,000,000
17
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
ListenerImpl::~ListenerImpl() { if (!workers_started_) { // We need to remove the listener_init_target_ handle from parent's initManager(), to unblock // parent's initManager to get ready(). listener_init_target_.ready(); } }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
221,157,262,845,149,430,000,000,000,000,000,000,000
7
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static int do_x509_check(X509 *x, const unsigned char *chk, size_t chklen, unsigned int flags, int check_type) { GENERAL_NAMES *gens = NULL; X509_NAME *name = NULL; int i; int cnid; if (check_type == GEN_EMAIL) cnid = NID_pkcs9_emailAddress; else if (check_type == GEN_DNS) cnid = NID_commonName; else ...
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
74,863,916,312,738,150,000,000,000,000,000,000,000
64
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
parse_gnu_debugaltlink (struct dwarf_section * section, void * data) { const char * name; bfd_size_type namelen; bfd_size_type id_len; Build_id_data * build_id_data; /* The name is first. The build-id follows immediately, with no padding, up to the section's end. */ name = (const char *) ...
0
[ "CWE-703" ]
binutils-gdb
695c6dfe7e85006b98c8b746f3fd5f913c94ebff
73,844,291,400,736,850,000,000,000,000,000,000,000
27
PR29370, infinite loop in display_debug_abbrev The PR29370 testcase is a fuzzed object file with multiple .trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev sections are not a violation of the DWARF standard. The DWARF5 standard even gives an example of multiple .debug_abbrev sections contained in group...
void Compute(OpKernelContext* ctx) override { const Tensor& indices_tensor = ctx->input(0); OP_REQUIRES(ctx, TensorShapeUtils::IsVector(indices_tensor.shape()) || TensorShapeUtils::IsScalar(indices_tensor.shape()), errors::InvalidArgument( ...
1
[ "CWE-369" ]
tensorflow
a776040a5e7ebf76eeb7eb923bf1ae417dd4d233
264,158,770,569,740,600,000,000,000,000,000,000,000
87
Disallow dims input of 0 in tf.raw_ops.UnravelIndex PiperOrigin-RevId: 384284198 Change-Id: Ia1804ef1aec57b4d857ea507e6891bcccde18e9b
langmap_set_entry(int from, int to) { langmap_entry_T *entries = (langmap_entry_T *)(langmap_mapga.ga_data); int a = 0; int b = langmap_mapga.ga_len; /* Do a binary search for an existing entry. */ while (a != b) { int i = (a + b) / 2; int d = entries[i].from - from; if (d == 0) ...
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
171,651,080,901,975,100,000,000,000,000,000,000,000
34
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t ulen, const char *code, const char *type, int text) { unsigned char *utf8_buf = NULL, *utf8_end; size_t mlen, i; int rv = -1; int mime = ms->flags & MAGIC_MIME; const char *subtype = NULL; con...
0
[]
php-src
89f864c547014646e71862df3664e3ff33d7143d
290,100,495,950,043,000,000,000,000,000,000,000,000
204
Fixed Bug #66731 file: infinite recursion Upstream commit (available in file-5.17) https://github.com/glensc/file/commit/3c081560c23f20b2985c285338b52c7aae9fdb0f https://github.com/glensc/file/commit/cc9e74dfeca5265ad725acc926ef0b8d2a18ee70
xmlNodeGetContent(const xmlNode *cur) { if (cur == NULL) return (NULL); switch (cur->type) { case XML_DOCUMENT_FRAG_NODE: case XML_ELEMENT_NODE:{ xmlBufPtr buf; xmlChar *ret; buf = xmlBufCreateSize(64); if (buf == NULL) ...
0
[ "CWE-190" ]
libxml2
6c283d83eccd940bcde15634ac8c7f100e3caefd
133,186,537,205,255,600,000,000,000,000,000,000,000
93
[CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer In several places, the code handling string buffers didn't check for integer overflow or used wrong types for buffer sizes. This could result in out-of-bounds writes or other memory errors when working on large, multi-gigabyte buffers. Thanks to Felix Wil...
ldns_rdf_new_frm_data(ldns_rdf_type type, size_t size, const void *data) { ldns_rdf *rdf; /* if the size is too big, fail */ if (size > LDNS_MAX_RDFLEN) { return NULL; } /* allocate space */ rdf = LDNS_MALLOC(ldns_rdf); if (!rdf) { return NULL; } rdf->_data = LDNS_XMALLOC(uint8_t, size); if (!rdf->_data...
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
263,853,702,334,629,700,000,000,000,000,000,000,000
27
CAA and URI
static void test_view_insert_fields() { MYSQL_STMT *stmt; char parm[11][1000]; ulong l[11]; int rc, i; MYSQL_BIND my_bind[11]; const char *query= "INSERT INTO `v1` ( `K1C4` ,`K2C4` ,`K3C4` ,`K4N4` ,`F1C4` ,`F2I4` ,`F3N5` ,`F7F8` ,`F6N4` ,`F5C8` ,`F9D8` ) VALUES( ? , ? , ? , ? , ? , ? , ? , ? , ...
0
[ "CWE-416" ]
mysql-server
4797ea0b772d5f4c5889bc552424132806f46e93
101,711,378,147,351,690,000,000,000,000,000,000,000
74
BUG#17512527: LIST HANDLING INCORRECT IN MYSQL_PRUNE_STMT_LIST() Analysis: --------- Invalid memory access maybe observed when using prepared statements if: a) The mysql client connection is lost after statement preparation is complete and b) There is at least one statement which is in initialized state but not ...
void KrecipesView::renameCurrentElement() { QWidget * vis_panel = rightPanel->visiblePanel(); if ( vis_panel == ingredientsPanel ) { ingredientsPanel->getActionsHandler()->rename(); } else if ( vis_panel == propertiesPanel ) { propertiesPanel->getActionsHandler()->rename(); } else if ( vis_panel == unitsPanel )...
0
[]
krecipes
cd1490fb5fe82cbe9172a43be13298001b446ecd
322,223,431,896,783,330,000,000,000,000,000,000,000
18
Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and #2960140. svn path=/trunk/extragear/utils/krecipes/; revision=1137824
struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, const char *owner, enum winsdb_handle_caller caller) { const struct loadparm_substitution *lp_sub = lpcfg_noop_substitution(); struct winsdb_handle *h = NULL...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
49,956,246,230,003,070,000,000,000,000,000,000,000
45
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 void add_prefix(smart_str* loc_name, char* key_name) { if( strncmp(key_name , LOC_PRIVATE_TAG , 7) == 0 ){ smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); smart_str_appendl(loc_name, PRIVATE_PREFIX , sizeof(PRIVATE_PREFIX)-1); } }
0
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
101,279,246,757,688,610,000,000,000,000,000,000,000
7
Fix bug #72241: get_icu_value_internal out-of-bounds read
MagickExport MagickOffsetType SeekBlob(Image *image, const MagickOffsetType offset,const int whence) { BlobInfo *magick_restrict blob_info; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModu...
0
[ "CWE-416", "CWE-399" ]
ImageMagick
c5d012a46ae22be9444326aa37969a3f75daa3ba
150,795,673,412,906,580,000,000,000,000,000,000,000
95
https://github.com/ImageMagick/ImageMagick6/issues/43
static int opfsubrp(RAsm *a, ut8 *data, const Opcode *op) { int l = 0; switch (op->operands_count) { case 0: data[l++] = 0xde; data[l++] = 0xe1; break; case 2: if ( op->operands[0].type & OT_FPUREG & ~OT_REGALL && op->operands[1].type & OT_FPUREG & ~OT_REGALL && op->operands[1].reg == 0 ) { data[l...
0
[ "CWE-119", "CWE-125", "CWE-787" ]
radare2
9b46d38dd3c4de6048a488b655c7319f845af185
114,860,800,898,794,430,000,000,000,000,000,000,000
21
Fix #12372 and #12373 - Crash in x86 assembler (#12380) 0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL- leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
static int sftp_read_and_dispatch(sftp_session sftp) { sftp_packet packet = NULL; sftp_message msg = NULL; sftp_enter_function(); packet = sftp_packet_read(sftp); if (packet == NULL) { sftp_leave_function(); return -1; /* something nasty happened reading the packet */ } msg = sftp_get_message(p...
0
[]
libssh
4d8420f3282ed07fc99fc5e930c17df27ef1e9b2
262,167,372,689,385,140,000,000,000,000,000,000,000
28
sftp: Fix bug in sftp_mkdir not returning on error. resolves: #84 (cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44)
int load_pkcs11_module(const char *module, pkcs11_handle_t **hp) { int rv; struct stat module_stat; CK_C_GetFunctionList C_GetFunctionList_ptr; pkcs11_handle_t *h; DBG1("PKCS #11 module = [%s]", module); /* reset pkcs #11 handle */ h = (pkcs11_handle_t *)calloc(sizeof(pkcs11_handle_t), 1); if (h == NU...
0
[]
pam_pkcs11
cc51b3e2720ea862d500cab2ea517518ff39a497
309,942,537,834,527,200,000,000,000,000,000,000,000
57
verify using a nonce from the system, not the card Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problem.
double64_init (SF_PRIVATE *psf) { static int double64_caps ; if (psf->sf.channels < 1) { psf_log_printf (psf, "double64_init : internal error : channels = %d\n", psf->sf.channels) ; return SFE_INTERNAL ; } ; double64_caps = double64_get_capability (psf) ; psf->blockwidth = sizeof (double) * psf->sf.channels ...
1
[ "CWE-369" ]
libsndfile
85c877d5072866aadbe8ed0c3e0590fbb5e16788
143,602,712,851,712,040,000,000,000,000,000,000,000
165
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...
static int bond_neigh_init(struct neighbour *n) { struct bonding *bond = netdev_priv(n->dev); const struct net_device_ops *slave_ops; struct neigh_parms parms; struct slave *slave; int ret = 0; rcu_read_lock(); slave = bond_first_slave_rcu(bond); if (!slave) goto out; slave_ops = slave->dev->netdev_ops; if...
0
[ "CWE-476", "CWE-703" ]
linux
105cd17a866017b45f3c45901b394c711c97bf40
132,386,349,848,711,420,000,000,000,000,000,000,000
36
bonding: fix null dereference in bond_ipsec_add_sa() If bond doesn't have real device, bond->curr_active_slave is null. But bond_ipsec_add_sa() dereferences bond->curr_active_slave without null checking. So, null-ptr-deref would occur. Test commands: ip link add bond0 type bond ip link set bond0 up ip x s...
static void Ins_SPVTL( INS_ARG ) { if ( INS_SxVTL( args[1], args[0], CUR.opcode, &CUR.GS.projVector) == FAILURE ) return; CUR.GS.dualVector = CUR.GS.projVector; COMPUTE_Funcs(); }
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
276,904,921,037,003,200,000,000,000,000,000,000,000
11
Bug 698024: bounds check zone pointer in Ins_MIRP()
GList *ga_command_blacklist_init(GList *blacklist) { #if !defined(__linux__) { const char *list[] = { "guest-suspend-disk", "guest-suspend-ram", "guest-suspend-hybrid", "guest-network-get-interfaces", "guest-get-vcpus", "guest-set-vcpus", "guest-get-memory-blo...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
220,774,388,068,527,180,000,000,000,000,000,000,000
38
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
psg_json_value_set_with_autodetected_data_type(PsgJsonValue *doc, const char *name, size_t name_len, const char *val, size_t val_len, char **error) { PsgJsonValue *j_val, *result; j_val = psg_autocast_value_to_json(val, val_len, error); if (j_val == NULL) { return NULL; } resul...
0
[ "CWE-362" ]
passenger
207870f5b7f5cc240587ab0977d6046782ae1d86
151,307,729,097,941,040,000,000,000,000,000,000,000
17
Fix privilege escalation in the Nginx module The vulnerability is exploitable with a non-standard passenger_instance_registry_dir, via a race condition where after a file was created, it was chowned via the path not the file descriptor. The chown entered the code in 2010, so Passenger 4 + 5 all affected.
void Greeter::insertEnvironmentList(QStringList names, QProcessEnvironment sourceEnv, QProcessEnvironment &targetEnv) { for (QStringList::const_iterator it = names.constBegin(); it != names.constEnd(); ++it) if (sourceEnv.contains(*it)) targetEnv.insert(*it, sourceEnv.value(*it))...
0
[ "CWE-284", "CWE-264" ]
sddm
4cfed6b0a625593fb43876f04badc4dd99799d86
109,699,256,564,084,350,000,000,000,000,000,000,000
5
Disable greeters from loading KDE's debug hander Some themes may use KDE components which will automatically load KDE's crash handler. If the greeter were to then somehow crash, that would leave a crash handler allowing other actions, albeit as the locked down SDDM user. Only SDDM users using the breeze theme from p...
static void des3_decrypt(struct ssh_cipher_struct *cipher, void *in, void *out, unsigned long len) { DES_ede3_cbc_encrypt(in, out, len, cipher->key, (void*)((uint8_t*)cipher->key + sizeof(DES_key_schedule)), (void*)((uint8_t*)cipher->key + 2 * sizeof(DES_key_schedule)), cipher->IV, 0); }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
40,050,709,942,085,160,000,000,000,000,000,000,000
7
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
static inline void context_set_fault_enable(struct context_entry *context) { context->lo &= (((u64)-1) << 2) | 1; }
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
250,390,063,803,896,680,000,000,000,000,000,000,000
4
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...
static xmlChar * xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) { xmlChar buf[XML_MAX_NAMELEN + 5]; int len = 0, l; int c; /* * Handler for more complex cases */ c = CUR_CHAR(l); if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */ (c == '[...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
279,406,362,229,273,350,000,000,000,000,000,000,000
64
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
static void check_firejail_credentials(ProcessHandle process) { // open /proc/pid/status FILE *fp = process_fopen(process, "status"); uid_t ruid = -1; uid_t suid = -1; char buf[4096]; while (fgets(buf, sizeof(buf), fp)) { if (sscanf(buf, "Uid: %u %*u %u", &ruid, &suid) == 2) break; } fclose(fp); // targ...
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
306,446,072,669,520,000,000,000,000,000,000,000,000
26
fixing CVE-2022-31214
static inline int bitmap_uptodate(struct buffer_head *bh) { return (buffer_uptodate(bh) && test_bit(BH_BITMAP_UPTODATE, &(bh)->b_state));
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
4,729,884,304,884,004,500,000,000,000,000,000,000
5
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
static inline int wm_toupper(int c) { return ((wm_islower(c)) ? (c & ~('a' - 'A')) : c); }
0
[ "CWE-200", "CWE-119" ]
wildmidi
814f31d8eceda8401eb812fc2e94ed143fdad0ab
161,064,808,053,195,270,000,000,000,000,000,000,000
3
wildmidi_lib.c (WildMidi_Open, WildMidi_OpenBuffer): refuse to proceed if less then 18 bytes of input Fixes bug #178.
static int sas_find_sub_addr(struct domain_device *dev, u8 *sub_addr) { struct expander_device *ex = &dev->ex_dev; int i; for (i = 0; i < ex->num_phys; i++) { struct ex_phy *phy = &ex->ex_phy[i]; if (phy->phy_state == PHY_VACANT || phy->phy_state == PHY_NOT_PRESENT) continue; if ((phy->attached_dev...
0
[ "CWE-399", "CWE-772" ]
linux
4a491b1ab11ca0556d2fda1ff1301e862a2d44c4
332,912,481,354,940,280,000,000,000,000,000,000,000
23
scsi: libsas: fix memory leak in sas_smp_get_phy_events() We've got a memory leak with the following producer: while true; do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null; done The buffer req is allocated and not freed after we return. Fix it. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") S...
DEFUN (clear_ip_bgp_peer_group_ipv4_soft_in, clear_ip_bgp_peer_group_ipv4_soft_in_cmd, "clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft in", CLEAR_STR IP_STR BGP_STR "Clear all members of peer-group\n" "BGP peer-group name\n" "Address family\n" "...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
59,514,588,802,503,920,000,000,000,000,000,000,000
21
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
TEST(IndexBoundsBuilderTest, TranslateGteObject) { auto testIndex = buildSimpleIndexEntry(); BSONObj obj = fromjson("{a: {$gte: {b: 1}}}"); auto expr = parseMatchExpression(obj); BSONElement elt = obj.firstElement(); OrderedIntervalList oil; IndexBoundsBuilder::BoundsTightness tightness; Ind...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
88,451,494,449,906,790,000,000,000,000,000,000,000
15
SERVER-44377 generate correct plan for indexed inequalities to null
fd_cache_open (const char *fname, const char *mode) { close_cache_t cc; assert (fname); for (cc = close_cache; cc; cc = cc->next) { if (cc->fp != GNUPG_INVALID_FD && !fd_cache_strcmp (cc->fname, fname)) { gnupg_fd_t fp = cc->fp; cc->fp = GNUPG_INVALID_FD; if (DBG_IOBUF) log_debug ("fd_ca...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
112,649,968,664,375,240,000,000,000,000,000,000,000
34
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static void cma_cancel_operation(struct rdma_id_private *id_priv, enum rdma_cm_state state) { switch (state) { case RDMA_CM_ADDR_QUERY: rdma_addr_cancel(&id_priv->id.route.addr.dev_addr); break; case RDMA_CM_ROUTE_QUERY: cma_cancel_route(id_priv); break; case RDMA_CM_LISTEN: if (cma_any_addr(cma_src_...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
325,869,988,394,877,450,000,000,000,000,000,000,000
18
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
static int do_recv_NPWindowData(rpc_message_t *message, void *p_value) { NPWindow *window = (NPWindow *)p_value; NPSetWindowCallbackStruct *ws_info; uint32_t window_id; int32_t window_type; int error; if (window == NULL) return RPC_ERROR_MESSAGE_ARGUMENT_INVALID; if ((error = rpc_message_recv_uint32(me...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
212,172,296,144,320,800,000,000,000,000,000,000,000
33
Support all the new variables added
static void SFDParseMathValueRecord(FILE *sfd,int16 *value,DeviceTable **devtab) { getsint(sfd,value); *devtab = SFDReadDeviceTable(sfd,NULL); }
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
209,799,158,226,151,530,000,000,000,000,000,000,000
4
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 (...