func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
xfs_attr_leaf_addname(xfs_da_args_t *args) { xfs_inode_t *dp; struct xfs_buf *bp; int retval, error, committed, forkoff; trace_xfs_attr_leaf_addname(args); /* * Read the (only) block in the attribute list in. */ dp = args->dp; args->blkno = 0; error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno...
0
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
159,404,131,818,770,100,000,000,000,000,000,000,000
199
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
void CalendarRegressionTest::test4035301() { UErrorCode status = U_ZERO_ERROR; GregorianCalendar *c = new GregorianCalendar(98, 8, 7,status); GregorianCalendar *d = new GregorianCalendar(98, 8, 7,status); if (c->after(*d,status) || c->after(*c,status) || c->before(*d,status) || c...
0
[ "CWE-190" ]
icu
71dd84d4ffd6600a70e5bca56a22b957e6642bd4
313,035,345,759,953,960,000,000,000,000,000,000,000
15
ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J X-SVN-Rev: 40654
static xmlNodePtr guess_array_map(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC) { encodePtr enc = NULL; if (data && Z_TYPE_P(data) == IS_ARRAY) { if (is_map(data)) { enc = get_conversion(APACHE_MAP); } else { enc = get_conversion(SOAP_ENC_ARRAY); } } if (!enc) { enc = get_co...
0
[ "CWE-19" ]
php-src
c8eaca013a3922e8383def6158ece2b63f6ec483
249,215,165,626,074,970,000,000,000,000,000,000,000
17
Added type checks
START_TEST(virgl_test_transfer_to_staging_with_iov_succeeds) { static const unsigned bufsize = 50; struct virgl_context ctx = {0}; struct virgl_resource res = {0}; struct pipe_box box = {.width = bufsize, .height = 1, .depth = 1}; int ret; ret = testvirgl_init_ctx_cmdbuf(&ctx); ck_assert_int_eq(ret, 0); ...
0
[ "CWE-909" ]
virglrenderer
b05bb61f454eeb8a85164c8a31510aeb9d79129c
330,089,740,769,447,200,000,000,000,000,000,000,000
25
vrend: clear memory when allocating a host-backed memory resource Closes: #249 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
int lgff_init(struct hid_device* hid) { struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); struct input_dev *dev = hidinput->input; const signed short *ff_bits = ff_joystick; int error; int i; /* Check that the report looks ok */ if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0...
1
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
154,267,941,060,945,360,000,000,000,000,000,000,000
34
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
static int cipso_v4_cache_init(void) { u32 iter; cipso_v4_cache = kcalloc(CIPSO_V4_CACHE_BUCKETS, sizeof(struct cipso_v4_map_cache_bkt), GFP_KERNEL); if (cipso_v4_cache == NULL) return -ENOMEM; for (iter = 0; iter < CIPSO_V4_CACHE_BUCKETS; iter++) { spin_lock_init(&cipso_v4_cache[iter].lock); cips...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
54,929,704,826,221,530,000,000,000,000,000,000,000
18
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static int obj_trust(int id, X509 *x, int flags) { X509_CERT_AUX *ax = x->aux; int i; if (!ax) return X509_TRUST_UNTRUSTED; if (ax->reject) { for (i = 0; i < sk_ASN1_OBJECT_num(ax->reject); i++) { ASN1_OBJECT *obj = sk_ASN1_OBJECT_value(ax->reject, i); int nid = ...
1
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
330,659,957,301,291,160,000,000,000,000,000,000,000
42
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
authzPretty( Syntax *syntax, struct berval *val, struct berval *out, void *ctx) { int rc; Debug( LDAP_DEBUG_TRACE, ">>> authzPretty: <%s>\n", val->bv_val, 0, 0 ); rc = authzPrettyNormal( val, out, ctx, 0 ); Debug( LDAP_DEBUG_TRACE, "<<< authzPretty: <%s> (%d)\n", out->bv_val ? out->bv_val : "(null)" , r...
0
[ "CWE-617" ]
openldap
02dfc32d658fadc25e4040f78e36592f6e1e1ca0
95,270,106,901,840,400,000,000,000,000,000,000,000
18
ITS#9406 fix debug msg
static int ath6kl_wmi_ready_event_rx(struct wmi *wmi, u8 *datap, int len) { struct wmi_ready_event_2 *ev = (struct wmi_ready_event_2 *) datap; if (len < sizeof(struct wmi_ready_event_2)) return -EINVAL; ath6kl_ready_event(wmi->parent_dev, ev->mac_addr, le32_to_cpu(ev->sw_version), le32_to_cpu(ev->abi...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
221,210,390,347,381,180,000,000,000,000,000,000,000
13
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
store_two(int c, char *s) { s[0] = (char)((c >> 8) & 255); s[1] = (char)(c & 255); }
0
[ "CWE-119", "CWE-787" ]
t1utils
6b9d1aafcb61a3663c883663eb19ccdbfcde8d33
317,746,582,784,733,800,000,000,000,000,000,000,000
5
Security fixes. - Don't overflow the small cs_start buffer (reported by Niels Thykier via the debian tracker (Jakub Wilk), found with a fuzzer ("American fuzzy lop")). - Cast arguments to <ctype.h> functions to unsigned char.
lou_setDataPath (char *path) { dataPathPtr = NULL; if (path == NULL) return NULL; strcpy (dataPath, path); dataPathPtr = dataPath; return dataPathPtr; }
0
[]
liblouis
dc97ef791a4fae9da11592c79f9f79e010596e0c
69,509,947,786,985,300,000,000,000,000,000,000,000
9
Merge branch 'table_resolver'
int my_wc_mb_utf8_escape_double_quote_and_backslash(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end) { return my_wc_mb_utf8_escape(cs, wc, str, end, '"', '\\'); }
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
73,827,947,712,842,940,000,000,000,000,000,000,000
6
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { memcpy(&ualg->cru_name, &alg->cra_name, sizeof(ualg->cru_name)); memcpy(&ualg->cru_driver_name, &alg->cra_driver_name, sizeof(ualg->cru_driver_name)); memcpy(&ualg->cru_module_name, module_name(a...
1
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
164,974,576,304,277,160,000,000,000,000,000,000,000
51
crypto: user - fix info leaks in report API Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of th...
void comps_rtree_values_walk(COMPS_RTree * rt, void* udata, void (*walk_f)(void*, void*)) { COMPS_HSList *tmplist, *tmp_subnodes; COMPS_HSListItem *it; tmplist = comps_hslist_create(); comps_hslist_init(tmplist, NULL, NULL, NULL); comps_hslist_append(tmplist, rt->subnod...
0
[ "CWE-416", "CWE-862" ]
libcomps
e3a5d056633677959ad924a51758876d415e7046
182,680,194,217,803,800,000,000,000,000,000,000,000
23
Fix UAF in comps_objmrtree_unite function The added field is not used at all in many places and it is probably the left-over of some copy-paste.
void set_seek_pre_roll(uint64_t seek_pre_roll) { seek_pre_roll_ = seek_pre_roll; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
86,462,849,020,995,020,000,000,000,000,000,000,000
3
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
cupsdSendError(cupsd_client_t *con, /* I - Connection */ http_status_t code, /* I - Error code */ int auth_type)/* I - Authentication type */ { char location[HTTP_MAX_VALUE]; /* Location field */ cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cupsdSendError code=%d, auth_type=%d", code,...
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
197,949,406,139,255,100,000,000,000,000,000,000,000
144
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)
**/ CImg<T>& operator--() { if (is_empty()) return *this; cimg_pragma_openmp(parallel for cimg_openmp_if(size()>=524288)) cimg_rof(*this,ptrd,T) *ptrd = *ptrd - (T)1; return *this;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
309,476,662,199,022,200,000,000,000,000,000,000,000
6
Fix other issues in 'CImg<T>::load_bmp()'.
static int pb0100_probe(struct sd *sd) { u16 sensor; int err; err = stv06xx_read_sensor(sd, PB_IDENT, &sensor); if (err < 0) return -ENODEV; if ((sensor >> 8) != 0x64) return -ENODEV; pr_info("Photobit pb0100 sensor detected\n"); sd->gspca_dev.cam.cam_mode = pb0100_mode; sd->gspca_dev.cam.nmodes = ARRAY...
0
[ "CWE-476" ]
linux
485b06aadb933190f4bc44e006076bc27a23f205
188,531,083,005,782,580,000,000,000,000,000,000,000
19
media: stv06xx: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not...
virtual Status checkAuthForCommand(Client* client, const std::string& dbname, const BSONObj& cmdObj) const { return auth::checkAuthForUsersInfoCommand(client, dbname, cmdObj); }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
69,509,678,923,186,810,000,000,000,000,000,000,000
5
SERVER-38984 Validate unique User ID on UserCache hit
maybe_update (GifContext *context, gint x, gint y, gint width, gint height) { if (clip_frame (context, &x, &y, &width, &height)) (*context->update_func) (context->frame->pixbuf, ...
0
[]
gdk-pixbuf
f8569bb13e2aa1584dde61ca545144750f7a7c98
319,166,093,026,649,480,000,000,000,000,000,000,000
11
GIF: Don't return a partially initialized pixbuf structure It was found that gdk-pixbuf GIF image loader gdk_pixbuf__gif_image_load() routine did not properly handle certain return values from their subroutines. A remote attacker could provide a specially-crafted GIF image, which once opened in an application, linked ...
void buildHeader(SSL& ssl, RecordLayerHeader& rlHeader, const Message& msg) { ProtocolVersion pv = ssl.getSecurity().get_connection().version_; rlHeader.type_ = msg.get_type(); rlHeader.version_.major_ = pv.major_; rlHeader.version_.minor_ = pv.minor_; rlHeader.length_ = msg.get_length(); }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
197,915,201,589,692,000,000,000,000,000,000,000,000
8
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
inline void set_killed(killed_state killed_arg, int killed_errno_arg= 0, const char *killed_err_msg_arg= 0) { mysql_mutex_lock(&LOCK_thd_kill); set_killed_no_mutex(killed_arg, killed_errno_arg, killed_err_msg_arg); mysql_mutex_unlock(&LOCK_thd_kill); }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
147,819,916,342,922,100,000,000,000,000,000,000,000
8
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
agoo_ws_expand(agooText t) { uint8_t buf[16]; uint8_t *b = buf; uint8_t opcode = t->bin ? AGOO_WS_OP_BIN : AGOO_WS_OP_TEXT; *b++ = 0x80 | (uint8_t)opcode; // send unmasked if (125 >= t->len) { *b++ = (uint8_t)t->len; } else if (0xFFFF >= t->len) { *b++ = (uint8_t)0x7E; *b++ = (uint8_t)((...
0
[ "CWE-444", "CWE-61" ]
agoo
23d03535cf7b50d679a60a953a0cae9519a4a130
227,956,035,486,365,540,000,000,000,000,000,000,000
23
Remote addr (#99) * REMOTE_ADDR added * Ready for merge
static int tls1_prf( unsigned char *secret, size_t slen, char *label, unsigned char *random, size_t rlen, unsigned char *dstbuf, size_t dlen ) { size_t nb, hs; size_t i, j, k; unsigned char *S1, *S2; unsigned char tmp[128]; unsigned char h_i[20]; if( si...
0
[ "CWE-310" ]
polarssl
4582999be608c9794d4518ae336b265084db9f93
203,158,634,350,645,260,000,000,000,000,000,000,000
59
Fixed timing difference resulting from badly formatted padding.
ec_verify(krb5_context context, krb5_data *req_pkt, krb5_kdc_req *request, krb5_enc_tkt_part *enc_tkt_reply, krb5_pa_data *data, krb5_kdcpreauth_callbacks cb, krb5_kdcpreauth_rock rock, krb5_kdcpreauth_moddata moddata, krb5_kdcpreauth_verify_respond_fn respond, void *arg) { k...
0
[ "CWE-476" ]
krb5
fc98f520caefff2e5ee9a0026fdf5109944b3562
229,187,359,353,437,430,000,000,000,000,000,000,000
103
Fix KDC null deref on bad encrypted challenge The function ec_verify() in src/kdc/kdc_preauth_ec.c contains a check to avoid further processing if the armor key is NULL. However, this check is bypassed by a call to k5memdup0() which overwrites retval with 0 if the allocation succeeds. If the armor key is NULL, a cal...
void lftp_ssl_gnutls::global_init() { if(!instance) instance=new lftp_ssl_gnutls_instance(); }
0
[ "CWE-310" ]
lftp
6357bed2583171b7515af6bb6585cf56d2117e3f
107,121,702,308,312,470,000,000,000,000,000,000,000
5
use hostmatch function from latest curl (addresses CVE-2014-0139)
onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end) { int len; hash_data_type ctype; UChar buf[PROPERTY_NAME_MAX_SIZE]; UChar *p; OnigCodePoint code; p = name; len = 0; while (p < end) { code = ONIGENC_MBC_TO_CODE(enc, p, end); if (code >= 0x80) return ONIGER...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
234,063,347,778,842,150,000,000,000,000,000,000,000
32
onig-5.9.2
dump_raw_buffer_be(const gs_memory_t *mem, int num_rows, int width, int n_chan, int plane_stride, int rowstride, char filename[],const byte *Buffer, bool deep) { do_dump_raw_buffer(mem, num_rows, width, n_chan, plane_stride, rowstride, filename, Buffer, d...
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
27,843,413,684,076,200,000,000,000,000,000,000,000
7
Bug 701795: Segv due to image mask issue
static char *get_pid_environ_val(pid_t pid,char *val){ int temp_size = 500; char *temp = malloc(temp_size); int i=0; int foundit=0; FILE *fp; sprintf(temp,"/proc/%d/environ",pid); fp=fopen(temp,"r"); if(fp==NULL) return NULL; for(;;){ if (i >= temp_size) { temp_size *= 2; ...
0
[ "CWE-119", "CWE-787" ]
das_watchdog
bd20bb02e75e2c0483832b52f2577253febfb690
266,256,142,573,941,520,000,000,000,000,000,000,000
52
Fix memory overflow if the name of an environment is larger than 500 characters. Bug found by Adam Sampson.
static int netlink_bind(struct socket *sock, struct sockaddr *addr, int addr_len) { struct sock *sk = sock->sk; struct net *net = sock_net(sk); struct netlink_sock *nlk = nlk_sk(sk); struct sockaddr_nl *nladdr = (struct sockaddr_nl *)addr; int err; if (nladdr->nl_family != AF_NETLINK) return -EINVAL; /* O...
0
[ "CWE-287", "CWE-284" ]
linux
e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea
175,522,984,883,955,870,000,000,000,000,000,000,000
54
af_netlink: force credentials passing [CVE-2012-3520] Pablo Neira Ayuso discovered that avahi and potentially NetworkManager accept spoofed Netlink messages because of a kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data to the receiver if the sender did not provide such data, instead of not includ...
local_exported_variables () { return (vapply (local_and_exported)); }
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
332,120,196,097,731,800,000,000,000,000,000,000,000
4
commit bash-20120224 snapshot
int __sched cond_resched_softirq(void) { BUG_ON(!in_softirq()); if (need_resched() && system_state == SYSTEM_RUNNING) { local_bh_enable(); __cond_resched(); local_bh_disable(); return 1; } return 0; }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
214,123,582,902,181,770,000,000,000,000,000,000,000
12
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
void preempt_notifier_unregister(struct preempt_notifier *notifier) { hlist_del(&notifier->link); }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
201,496,596,542,458,040,000,000,000,000,000,000,000
4
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
inline char *strdup(const char *str) { return strdup_root(mem_root,str); }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
320,502,890,347,947,830,000,000,000,000,000,000,000
2
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
void ssix_del(GF_Box *s) { u32 i; GF_SubsegmentIndexBox *ptr = (GF_SubsegmentIndexBox *)s; if (ptr == NULL) return; if (ptr->subsegments) { for (i = 0; i < ptr->subsegment_count; i++) { GF_Subsegment *subsegment = &ptr->subsegments[i]; if (subsegment->levels) gf_free(subsegment->levels); if (subsegment->...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
108,433,709,539,055,720,000,000,000,000,000,000,000
15
fixed 2 possible heap overflows (inc. #1088)
static int sse4_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h) { int s, i; uint32_t *sq = ff_squareTbl + 256; s = 0; for (i = 0; i < h; i++) { s += sq[pix1[0] - pix2[0]]; s += sq[pix1[1] - pix2[1]]; s += sq[pix1[2] - pix2[2]]; s += sq[pix1[3] - pix2[3]]...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
158,006,189,390,508,340,000,000,000,000,000,000,000
16
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
email_compare (EContact *contact1, EContact *contact2) { const gchar *email1, *email2; gint i; /* if (e_contact_get (contact1, E_CONTACT_IS_LIST)) return TRUE; */ for (i = 0; i < 4; i++) { gboolean equal; email1 = e_contact_get_const (contact1, email_ids[i]); email2 = e_contact_get_const (...
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
60,125,416,251,316,560,000,000,000,000,000,000,000
26
Bug 796174 - strcat() considered unsafe for buffer overflow
static void put_buffer(QEMUFile *f, void *pv, size_t size) { uint8_t *v = pv; qemu_put_buffer(f, v, size); }
0
[ "CWE-119" ]
qemu
d2ef4b61fe6d33d2a5dcf100a9b9440de341ad62
171,085,521,149,850,900,000,000,000,000,000,000,000
5
vmstate: fix buffer overflow in target-arm/machine.c CVE-2013-4531 cpreg_vmstate_indexes is a VARRAY_INT32. A negative value for cpreg_vmstate_array_len will cause a buffer overflow. VMSTATE_INT32_LE was supposed to protect against this but doesn't because it doesn't validate that input is non-negative. Fix this ma...
static int ldb_match_message(struct ldb_context *ldb, const struct ldb_message *msg, const struct ldb_parse_tree *tree, enum ldb_scope scope, bool *matched) { unsigned int i; int ret; *matched = false; if (scope != LDB_SCOPE_BASE && ldb_dn_is_special(msg->dn)) { /* don't match special r...
0
[ "CWE-189" ]
samba
ec504dbf69636a554add1f3d5703dd6c3ad450b8
251,419,080,054,077,470,000,000,000,000,000,000,000
64
CVE-2015-3223: lib: ldb: Cope with canonicalise_fn returning string "", length 0. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11325 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
TLabel * __fastcall TCustomDialog::CreateLabel(UnicodeString Label) { TLabel * Result = new TLabel(this); Result->Caption = Label; return Result; }
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
50,186,331,323,588,140,000,000,000,000,000,000,000
6
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
rfbProcessClientMessage(rfbClientPtr cl) { switch (cl->state) { case RFB_PROTOCOL_VERSION: rfbProcessClientProtocolVersion(cl); return; case RFB_SECURITY_TYPE: rfbAuthProcessSecurityTypeMessage(cl); return; #ifdef VINO_HAVE_GNUTLS case RFB_TLS_HANDSHAKE: rfbAuthProcessTLSHandshake(cl)...
0
[ "CWE-20" ]
vino
860337231eaccfeed4f857afd0579546a260c23f
36,230,913,661,126,873,000,000,000,000,000,000,000
32
Reject new clients if in the deferred state As mentioned in bug 641811, Vino can get stuck trying to process the same data in an infinite loop if an authentication request is received from a client while that client is in the deferred state. Avoid this situation by closing new connections from the same client when it...
int tls1_save_sigalgs(SSL *s, const unsigned char *data, int dsize) { CERT *c = s->cert; /* Extension ignored for inappropriate versions */ if (!SSL_USE_SIGALGS(s)) return 1; /* Should never happen */ if (!c) return 0; OPENSSL_free(s->s3->tmp.peer_sigalgs); s->s3->tmp.peer_s...
0
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
89,663,039,547,468,710,000,000,000,000,000,000,000
18
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
int unit_name_mangle_with_suffix(const char *name, const char *operation, UnitNameMangle flags, const char *suffix, char **ret) { _cleanup_free_ char *s = NULL; bool mangled, suggest_escape = true; int r; assert(name); assert(suffix); assert(ret); if (isempty(na...
0
[ "CWE-703" ]
systemd-stable
b00674347337b7531c92fdb65590ab253bb57538
283,603,495,163,723,930,000,000,000,000,000,000,000
77
basic/unit-name: do not use strdupa() on a path The path may have unbounded length, for example through a fuse mount. CVE-2021-33910: attacked controlled alloca() leads to crash in systemd and ultimately a kernel panic. Systemd parses the content of /proc/self/mountinfo and each mountpoint is passed to mount_setup_un...
isis_print_is_reach_subtlv(netdissect_options *ndo, const uint8_t *tptr, u_int subt, u_int subl, const char *ident) { u_int te_class,priority_level,gmpls_switch_cap; union { /* int to float conversion buffer for several subTLVs */ float f...
0
[ "CWE-125", "CWE-787" ]
tcpdump
5d0d76e88ee2d3236d7e032589d6f1d4ec5f7b1e
242,488,695,567,581,100,000,000,000,000,000,000,000
155
CVE-2017-13055/IS-IS: fix an Extended IS Reachability sub-TLV In isis_print_is_reach_subtlv() one of the case blocks did not check that the sub-TLV "V" is actually present and could over-read the input buffer. Add a length check to fix that and remove a useless boundary check from a loop because the boundary is tested...
virtual void clearSoftMask(GfxState * /*state*/) {}
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
337,298,870,340,196,700,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
TEST_F(QuotedString_ExtractFrom_Tests, EscapedFormfeed) { whenInputIs("\"hello \\fworld\\f\""); resultMustBe("hello \fworld\f"); }
0
[ "CWE-415", "CWE-119" ]
ArduinoJson
5e7b9ec688d79e7b16ec7064e1d37e8481a31e72
228,763,270,060,616,970,000,000,000,000,000,000,000
4
Fix buffer overflow (pull request #81)
_ppdCacheCreateWithFile( const char *filename, /* I - File to read */ ipp_t **attrs) /* IO - IPP attributes, if any */ { cups_file_t *fp; /* File */ _ppd_cache_t *pc; /* PWG mapping data */ pwg_size_t *size; /* Current size */ pwg_map_t *map; /* Current map */ _pwg_finishings_t *finis...
0
[ "CWE-93" ]
cups
07428f6a640ff93aa0b4cc69ca372e2cf8490e41
245,151,996,283,461,600,000,000,000,000,000,000,000
602
Only list supported PDLs (Issue #4923)
cmsToneCurve* CMSEXPORT cmsJoinToneCurve(cmsContext ContextID, const cmsToneCurve* X, const cmsToneCurve* Y, cmsUInt32Number nResultingPoints) { cmsToneCurve* out = NULL; cmsToneCurve* Yreversed = NULL; cmsFloat32Number t, x; cm...
0
[]
Little-CMS
9cf2d61867375f867e6e80906a571d222bc2cbf3
234,598,155,013,167,420,000,000,000,000,000,000,000
38
Memory squeezing fix: LCMS2: AllocateToneCurveStruct Simply add an extra check on the last allocation to avoid returning a partially built struct.
static void mod_wstunnel_patch_config(request_st * const r, plugin_data * const p) { memcpy(&p->conf, &p->defaults, sizeof(plugin_config)); for (int i = 1, used = p->nconfig; i < used; ++i) { if (config_check_cond(r, (uint32_t)p->cvlist[i].k_id)) mod_wstunnel_merge_config(&p->conf, p->cvlist...
0
[ "CWE-476" ]
lighttpd1.4
971773f1fae600074b46ef64f3ca1f76c227985f
306,561,465,553,595,000,000,000,000,000,000,000,000
7
[mod_wstunnel] fix crash with bad hybivers (fixes #3165) (thx Michał Dardas) x-ref: "mod_wstunnel null pointer dereference" https://redmine.lighttpd.net/issues/3165
static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) { struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr; struct inet_sock *inet = inet_sk(sk); struct inet_connection_sock *icsk = inet_csk(sk); struct ipv6_pinfo *np = inet6_sk(sk); struct tcp_sock *tp = tcp_sk(sk); struct ...
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
316,595,168,958,497,300,000,000,000,000,000,000,000
189
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
switch (yych) { case 'a': goto yy8; default: goto yy5; }
1
[ "CWE-787" ]
re2c
039c18949190c5de5397eba504d2c75dad2ea9ca
126,089,511,431,492,390,000,000,000,000,000,000,000
4
Emit an error when repetition lower bound exceeds upper bound. Historically this was allowed and re2c swapped the bounds. However, it most likely indicates an error in user code and there is only a single occurrence in the tests (and the test in an artificial one), so although the change is backwards incompatible ther...
TEST(MatchHeadersTest, MustMatchAllHeaderData) { TestRequestHeaderMapImpl matching_headers_1{{"match-header-A", "1"}, {"match-header-B", "2"}}; TestRequestHeaderMapImpl matching_headers_2{ {"match-header-A", "3"}, {"match-header-B", "4"}, {"match-header-C", "5"}}; TestRequestHeaderMapImpl unmatching_headers...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
116,969,746,691,909,880,000,000,000,000,000,000,000
29
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
int hidp_get_conninfo(struct hidp_conninfo *ci) { struct hidp_session *session; int err = 0; down_read(&hidp_session_sem); session = __hidp_get_session(&ci->bdaddr); if (session) __hidp_copy_session(session, ci); else err = -ENOENT; up_read(&hidp_session_sem); return err; }
0
[ "CWE-200" ]
linux
0a9ab9bdb3e891762553f667066190c1d22ad62b
299,984,440,454,305,620,000,000,000,000,000,000,000
16
Bluetooth: Fix incorrect strncpy() in hidp_setup_hid() The length parameter should be sizeof(req->name) - 1 because there is no guarantee that string provided by userspace will contain the trailing '\0'. Can be easily reproduced by manually setting req->name to 128 non-zero bytes prior to ioctl(HIDPCONNADD) and check...
virtual void updateStrokeOpacity(GfxState *state) { }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
181,855,561,312,021,200,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
accountingReportStats(XML_Parser originParser, const char *epilog) { const XML_Parser rootParser = getRootParserOf(originParser, NULL); assert(! rootParser->m_parentParser); if (rootParser->m_accounting.debugLevel < 1) { return; } const float amplificationFactor = accountingGetCurrentAmplification...
0
[ "CWE-400", "CWE-703" ]
libexpat
9b4ce651b26557f16103c3a366c91934ecd439ab
260,247,334,999,923,460,000,000,000,000,000,000,000
17
Prevent stack exhaustion in build_model It is possible to trigger stack exhaustion in build_model function if depth of nested children in DTD element is large enough. This happens because build_node is a recursively called function within build_model. The code has been adjusted to run iteratively. It uses the already...
static int php_array_element_export(zval **zv TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { int level; smart_str *buf; level = va_arg(args, int); buf = va_arg(args, smart_str *); if (hash_key->nKeyLength == 0) { /* numeric key */ buffer_append_spaces(buf, level+1); smart_str_app...
1
[]
php-src
e8429400d40e3c3aa4b22ba701991d698a2f3b2f
237,272,823,571,784,070,000,000,000,000,000,000,000
35
Fix bug #70172 - Use After Free Vulnerability in unserialize()
GF_Err Media_GetESD(GF_MediaBox *mdia, u32 sampleDescIndex, GF_ESD **out_esd, Bool true_desc_only) { u32 type; GF_ESD *esd; GF_MPEGSampleEntryBox *entry = NULL; GF_ESDBox *ESDa; GF_ProtectionSchemeInfoBox *sinf; GF_SampleDescriptionBox *stsd = mdia->information->sampleTable->SampleDescription; *out_esd = NULL; ...
1
[ "CWE-476", "CWE-401" ]
gpac
328c6d682698fdb9878dbb4f282963d42c538c01
269,376,206,003,932,060,000,000,000,000,000,000,000
271
fixed #1756
static int replmd_process_la_group(struct ldb_module *module, struct replmd_private *replmd_private, struct la_group *la_group) { struct la_entry *la = NULL; struct la_entry *prev = NULL; int ret; TALLOC_CTX *tmp_ctx = NULL; struct la_entry *first_la = DLIST_TAIL(la_group->la_entries); struct ldb_me...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
243,534,986,210,832,750,000,000,000,000,000,000,000
193
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...
complete_job (GVfsJob *job, GError *error) { if (error != NULL) { g_vfs_job_failed_from_error (job, error); g_error_free (error); return; } g_vfs_job_succeeded (job); }
0
[]
gvfs
d7d362995aa0cb8905c8d5c2a2a4c305d2ffff80
159,578,131,451,250,380,000,000,000,000,000,000,000
12
admin: Use fsuid to ensure correct file ownership Files created over admin backend should be owned by root, but they are owned by the user itself. This is because the daemon drops the uid to make dbus connection work. Use fsuid and euid to fix this issue. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/21
static int process_backtrace(int argc, char *argv[]) { char *context[_CONTEXT_MAX] = {}; _cleanup_free_ char *message = NULL; _cleanup_free_ struct iovec *iovec = NULL; size_t n_iovec, n_allocated, n_to_free = 0, i; int r; JournalImporter importer = { .fd ...
0
[ "CWE-770" ]
systemd
084eeb865ca63887098e0945fb4e93c852b91b0f
176,483,612,419,241,000,000,000,000,000,000,000,000
93
journald: do not store the iovec entry for process commandline on stack This fixes a crash where we would read the commandline, whose length is under control of the sending program, and then crash when trying to create a stack allocation for it. CVE-2018-16864 https://bugzilla.redhat.com/show_bug.cgi?id=1653855 The ...
static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) { handle_t *handle = NULL; struct ext4_renament old = { .dir = old_dir, .dentry = old_dentry, .inode = d_inode(old_dentry), }; struct ext4_renament new = { .dir = new_dir,...
0
[ "CWE-125" ]
linux
5872331b3d91820e14716632ebb56b1399b34fe1
220,851,723,496,720,350,000,000,000,000,000,000,000
143
ext4: fix potential negative array index in do_split() If for any reason a directory passed to do_split() does not have enough active entries to exceed half the size of the block, we can end up iterating over all "count" entries without finding a split point. In this case, count == move, and split will be zero, and w...
static void nfs4_opendata_free(struct kref *kref) { struct nfs4_opendata *p = container_of(kref, struct nfs4_opendata, kref); nfs_free_seqid(p->o_arg.seqid); if (p->state != NULL) nfs4_put_open_state(p->state); nfs4_put_state_owner(p->owner); dput(p->dir); path_put(&p->path); kfree(p); }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
161,449,160,720,260,840,000,000,000,000,000,000,000
13
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static int fat_readdir(struct file *filp, void *dirent, filldir_t filldir) { struct inode *inode = filp->f_dentry->d_inode; return __fat_readdir(inode, filp, dirent, filldir, 0, 0); }
0
[]
linux-2.6
188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7
169,818,358,877,457,570,000,000,000,000,000,000,000
5
[PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6] Move the msdos device ioctl compat stuff from fs/compat_ioctl.c to the msdos driver so that the msdos header file doesn't need to be included. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel...
static CURLcode imap_perform_fetch(struct connectdata *conn) { CURLcode result = CURLE_OK; struct IMAP *imap = conn->data->req.protop; /* Check we have a UID */ if(!imap->uid) { failf(conn->data, "Cannot FETCH without a UID."); return CURLE_URL_MALFORMAT; } /* Send the FETCH command */ if(imap->...
0
[ "CWE-119" ]
curl
13c9a9ded3ae744a1e11cbc14e9146d9fa427040
143,445,259,068,131,790,000,000,000,000,000,000,000
27
imap: if a FETCH response has no size, don't call write callback CVE-2017-1000257 Reported-by: Brian Carpenter and 0xd34db347 Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586
static void rsm_set_desc_flags(struct desc_struct *desc, u32 flags) { desc->g = (flags >> 23) & 1; desc->d = (flags >> 22) & 1; desc->l = (flags >> 21) & 1; desc->avl = (flags >> 20) & 1; desc->p = (flags >> 15) & 1; desc->dpl = (flags >> 13) & 3; desc->s = (flags >> 12) & 1; desc->type = (flag...
0
[ "CWE-284" ]
linux
33ab91103b3415e12457e3104f0e4517ce12d0f3
269,896,266,522,338,400,000,000,000,000,000,000,000
11
KVM: x86: fix emulation of "MOV SS, null selector" This is CVE-2017-2583. On Intel this causes a failed vmentry because SS's type is neither 3 nor 7 (even though the manual says this check is only done for usable SS, and the dmesg splat says that SS is unusable!). On AMD it's worse: svm.c is confused and sets CPL to ...
int uwsgi_build_cap(char *what, cap_value_t ** cap) { int cap_id; char *caps = uwsgi_str(what); int pos = 0; int count = 0; char *p, *ctx = NULL; uwsgi_foreach_token(caps, ",", p, ctx) { if (is_a_number(p)) { count++; } else { cap_id = uwsgi_get_cap_id(p); if (cap_id != -1) { count++; } ...
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
197,711,871,651,465,500,000,000,000,000,000,000,000
48
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) { struct page *page = vmf->page; struct inode *inode = vma->vm_file->f_path.dentry->d_inode; struct gfs2_inode *ip = GFS2_I(inode); struct gfs2_sbd *sdp = GFS2_SB(inode); unsigned long last_index; u64 pos = page->index << PAGE_CACHE_SH...
0
[ "CWE-119", "CWE-787" ]
linux
64dd153c83743af81f20924c6343652d731eeecb
79,520,893,353,447,100,000,000,000,000,000,000,000
110
GFS2: rewrite fallocate code to write blocks directly GFS2's fallocate code currently goes through the page cache. Since it's only writing to the end of the file or to holes in it, it doesn't need to, and it was causing issues on low memory environments. This patch pulls in some of Steve's block allocation work, and u...
gx_default_fill_rectangle_hl_color(gx_device *pdev, const gs_fixed_rect *rect, const gs_gstate *pgs, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath) { return_error(gs_error_rangecheck); }
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
23,044,792,503,989,180,000,000,000,000,000,000,000
7
Bug 699670: disallow copying of the epo device The erasepage optimisation (epo) subclass device shouldn't be allowed to be copied because the subclass private data, child and parent pointers end up being shared between the original device and the copy. Add an epo_finish_copydevice which NULLs the three offending poin...
ins_left(void) { pos_T tpos; int end_change = dont_sync_undo == FALSE; // end undoable change #ifdef FEAT_FOLDING if ((fdo_flags & FDO_HOR) && KeyTyped) foldOpenCursor(); #endif undisplay_dollar(); tpos = curwin->w_cursor; if (oneleft() == OK) { #if defined(FEAT_XIM) && defined(FEAT_GUI_G...
0
[]
vim
98a336dd497d3422e7efeef9f24cc9e25aeb8a49
18,084,795,655,761,365,000,000,000,000,000,000,000
47
patch 8.2.0133: invalid memory access with search command Problem: Invalid memory access with search command. Solution: When :normal runs out of characters in bracketed paste mode break out of the loop.(closes #5511)
read_2007_section_objfreespace (Bit_Chain *restrict dat, Dwg_Data *restrict dwg, r2007_section *restrict sections_map, r2007_page *restrict pages_map) { Bit_Chain old_dat, sec_dat = { 0 }; //Bit_Chain *str_dat; Dwg_ObjFreeSpace *_obj = &dwg->objfrees...
0
[ "CWE-787" ]
libredwg
45d2a290c65ed691be0901ba2b2ef51044e07a16
82,627,825,608,867,110,000,000,000,000,000,000,000
37
decode_r2007: fix for invalid section size See GH #350. With fuzzing section->data_size might not fit section_page->uncomp_size.
static void ExecNative(GGadget *g, GEvent *e) { struct sd_data *sd = GDrawGetUserData(GGadgetGetWindow(g)); Context c; Val args[1]; jmp_buf env; memset( &c,0,sizeof(c)); memset( args,0,sizeof(args)); running_script = true; c.a.argc = 1; c.a.vals = args; c.filename = args[0].u.sv...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
87,597,859,574,253,080,000,000,000,000,000,000,000
43
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
DWORD FileIo::Impl::winNumberOfLinks() const { DWORD nlink = 1; HANDLE hFd = (HANDLE)_get_osfhandle(fileno(fp_)); if (hFd != INVALID_HANDLE_VALUE) { typedef BOOL (WINAPI * GetFileInformationByHandle_t)(HANDLE, LPBY_HANDLE_FILE_INFORMATION); HMODULE hKernel = ::Ge...
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
105,191,246,800,927,800,000,000,000,000,000,000,000
33
Fix https://github.com/Exiv2/exiv2/issues/55
static inline void fallback_on_nodma_alloc(char **addr, size_t l) { #ifdef FLOPPY_CAN_FALLBACK_ON_NODMA if (*addr) return; /* we have the memory */ if (can_use_virtual_dma != 2) return; /* no fallback allowed */ pr_info("DMA memory shortage. Temporarily falling back on virtual DMA\n"); *addr = (char *)nodma_m...
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
323,277,031,523,228,170,000,000,000,000,000,000,000
13
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...
static GF_Filter *locate_alias_sink(GF_Filter *filter, const char *url, const char *mime_type) { u32 i; for (i=0; i<filter->num_output_pids; i++) { u32 j; GF_FilterPid *pid = gf_list_get(filter->output_pids, i); for (j=0; j<pid->num_destinations; j++) { GF_Filter *f; GF_FilterPidInst *pidi = gf_list_get(p...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
74,031,167,641,275,860,000,000,000,000,000,000,000
22
fixed crashes for very long path - cf #1908
ByteVectorPrivate(TagLib::uint len, char value) : RefCounter(), data(len, value), size(len) {}
0
[ "CWE-189" ]
taglib
dcdf4fd954e3213c355746fa15b7480461972308
135,871,179,654,744,960,000,000,000,000,000,000,000
1
Avoid uint overflow in case the length + index is over UINT_MAX
Config::Config() : mime_types_file("/etc/mime.types"), stream_read_timeout(1_min), stream_write_timeout(1_min), data_ptr(nullptr), padding(0), num_worker(1), max_concurrent_streams(100), header_table_size(-1), encoder_header_table_size(-1), window_bits(-1), ...
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
36,817,048,895,633,865,000,000,000,000,000,000,000
22
Don't read too greedily
static int dwc3_gadget_ep_set_halt(struct usb_ep *ep, int value) { struct dwc3_ep *dep = to_dwc3_ep(ep); struct dwc3 *dwc = dep->dwc; unsigned long flags; int ret; spin_lock_irqsave(&dwc->lock, flags); ret = __dwc3_gadget_ep_set_halt(dep, value, false); spin_unlock_irqrestore(&dwc->lock, flags); re...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
298,414,699,781,248,930,000,000,000,000,000,000,000
15
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
do_uncompress( compress_filter_context_t *zfx, z_stream *zs, IOBUF a, size_t *ret_len ) { int zrc; int rc=0; size_t n; int nread, count; int refill = !zs->avail_in; if( DBG_FILTER ) log_debug("begin inflate: avail_in=%u, avail_out=%u, inbuf=%u\n", (unsigned)zs->avail_in, (unsigned)zs...
1
[ "CWE-20" ]
gnupg
014b2103fcb12f261135e3954f26e9e07b39e342
335,397,701,699,140,800,000,000,000,000,000,000,000
56
gpg: Avoid infinite loop in uncompressing garbled packets. * g10/compress.c (do_uncompress): Limit the number of extra FF bytes. -- A packet like (a3 01 5b ff) leads to an infinite loop. Using --max-output won't help if it is a partial packet. This patch actually fixes a regression introduced on 1999-05-31 (c34c676...
TEST_P(ProxyProtocolTest, V1Minimal) { connect(); write("PROXY UNKNOWN\r\nmore data"); expectData("more data"); if (GetParam() == Envoy::Network::Address::IpVersion::v4) { EXPECT_EQ(server_connection_->remoteAddress()->ip()->addressAsString(), "127.0.0.1"); } else { EXPECT_EQ(server_connection_->rem...
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
75,234,057,132,852,860,000,000,000,000,000,000,000
15
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 unsigned long cpu_avg_load_per_task(int cpu) { struct rq *rq = cpu_rq(cpu); unsigned long nr_running = READ_ONCE(rq->cfs.h_nr_running); unsigned long load_avg = weighted_cpuload(rq); if (nr_running) return load_avg / nr_running; return 0; }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
299,738,900,454,987,180,000,000,000,000,000,000,000
11
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
static int __init init (void) { int status; status = register_filesystem (&gadgetfs_type); if (status == 0) pr_info ("%s: %s, version " DRIVER_VERSION "\n", shortname, driver_desc); return status; }
0
[ "CWE-763" ]
linux
501e38a5531efbd77d5c73c0ba838a889bfc1d74
334,068,865,038,708,270,000,000,000,000,000,000,000
10
usb: gadget: clear related members when goto fail dev->config and dev->hs_config and dev->dev need to be cleaned if dev_config fails to avoid UAF. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Link: https://lore.kernel.org/r/20211231172138.7993-3-hbh25y@gmail.com Signed...
int kvm_fast_pio_out(struct kvm_vcpu *vcpu, int size, unsigned short port) { unsigned long val = kvm_register_read(vcpu, VCPU_REGS_RAX); int ret = emulator_pio_out_emulated(&vcpu->arch.emulate_ctxt, size, port, &val, 1); /* do not return to emulator after return from userspace */ vcpu->arch.pio.count = 0; ...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
291,980,631,111,206,500,000,000,000,000,000,000,000
9
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
struct ssh_iterator *ssh_list_get_iterator(const struct ssh_list *list){ if(!list) return NULL; return list->root; }
0
[]
libssh
2ba1dea5493fb2f5a5be2dd263ce46ccb5f8ec76
300,701,374,571,100,060,000,000,000,000,000,000,000
5
CVE-2019-14889: misc: Add function to quote file names The added function quote file names strings to be used in a shell. Special cases are treated for the charactes '\'' and '!'. Fixes T181 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry pic...
static int wsgi_hook_handler(request_rec *r) { int status; apr_off_t limit = 0; WSGIRequestConfig *config = NULL; const char *value = NULL; /* Filter out the obvious case of no handler defined. */ if (!r->handler) return DECLINED; /* * Construct request configuration and ca...
0
[ "CWE-254" ]
mod_wsgi
545354a80b9cc20d8b6916ca30542eab36c3b8bd
122,847,111,896,564,960,000,000,000,000,000,000,000
218
When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state.
dname_lab_startswith(uint8_t* label, char* prefix, char** endptr) { size_t plen = strlen(prefix); size_t orig_plen = plen; size_t lablen = (size_t)*label; if(plen > lablen) return 0; label++; while(plen--) { if(*prefix != tolower((unsigned char)*label)) { return 0; } prefix++; label++; } if(orig_plen...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
89,425,709,260,460,420,000,000,000,000,000,000,000
21
- 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 void megasas_complete_outstanding_ioctls(struct megasas_instance *instance) { int i; struct megasas_cmd *cmd_mfi; struct megasas_cmd_fusion *cmd_fusion; struct fusion_context *fusion = instance->ctrl_context; /* Find all outstanding ioctls */ if (fusion) { for (i = 0; i < instance->max_fw_cmds; i++) { ...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
314,534,837,537,943,550,000,000,000,000,000,000,000
31
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
inline void DepthToSpace(const T* input_data, const Dims<4>& input_dims, int block_size, T* output_data, const Dims<4>& output_dims) { tflite::DepthToSpaceParams op_params; op_params.block_size = block_size; DepthToSpace(op_params, DimsToShape(input_dims), input_...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
6,247,818,787,428,127,000,000,000,000,000,000,000
9
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
InitializeTLS(void) { int i; if (rfbTLSInitialized) return TRUE; mutex_buf = malloc(CRYPTO_num_locks() * sizeof(MUTEX_TYPE)); if (mutex_buf == NULL) { rfbClientLog("Failed to initialized OpenSSL: memory.\n"); return (-1); } for (i = 0; i < CRYPTO_num_locks(); i++) MUTEX_INIT(mutex_buf[i]); ...
0
[ "CWE-476" ]
libvncserver
33441d90a506d5f3ae9388f2752901227e430553
56,806,464,912,239,020,000,000,000,000,000,000,000
28
libvncclient/tls_openssl: do not deref a NULL pointer Happens in anonTLS mode where cred is NULL. re #347
void exec_context_free_log_extra_fields(ExecContext *c) { size_t l; assert(c); for (l = 0; l < c->n_log_extra_fields; l++) free(c->log_extra_fields[l].iov_base); c->log_extra_fields = mfree(c->log_extra_fields); c->n_log_extra_fields = 0; }
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
161,078,097,886,285,270,000,000,000,000,000,000,000
10
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
_PUBLIC_ int strncasecmp_m_handle(struct smb_iconv_handle *iconv_handle, const char *s1, const char *s2, size_t n) { codepoint_t c1=0, c2=0; size_t size1, size2; /* handle null ptr comparisons to simplify the use in qsort */ if (s1 == s2) return 0; if (s1 == NULL) return -1; if (s2 == NULL) return 1; whi...
0
[ "CWE-200" ]
samba
ba5dbda6d0174a59d221c45cca52ecd232820d48
13,207,678,468,404,492,000,000,000,000,000,000,000
55
CVE-2015-5330: Fix handling of unicode near string endings Until now next_codepoint_ext() and next_codepoint_handle_ext() were using strnlen(str, 5) to determine how much string they should try to decode. This ended up looking past the end of the string when it was not null terminated and the final character looked li...
bool MemIo::isopen() const { return true; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
273,764,008,988,257,040,000,000,000,000,000,000,000
4
Fix https://github.com/Exiv2/exiv2/issues/55
find_inlist_lock_noload(struct list_head *head, const char *name, int *error, struct mutex *mutex) { struct { struct list_head list; char name[EBT_FUNCTION_MAXNAMELEN]; } *e; *error = mutex_lock_interruptible(mutex); if (*error != 0) return NULL; list_for_each_entry(e, head, list) { if (strcmp(e->name...
0
[ "CWE-20" ]
linux
d846f71195d57b0bbb143382647c2c6638b04c5a
299,245,988,959,410,600,000,000,000,000,000,000,000
20
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 struct dentry *proc_lookupfd(struct inode *dir, struct dentry *dentry, struct nameidata *nd) { return proc_lookupfd_common(dir, dentry, proc_fd_instantiate); }
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
91,788,375,767,981,670,000,000,000,000,000,000,000
5
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
static void commitReservation(Buffer::RawSlice* iovecs, uint64_t num_iovecs, OwnedImpl& buffer) { buffer.commit(iovecs, num_iovecs); }
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
199,708,279,729,785,100,000,000,000,000,000,000,000
3
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
void InstanceKlass::set_shared_class_loader_type(s2 loader_type) { switch (loader_type) { case ClassLoader::BOOT_LOADER: _misc_flags |= _misc_is_shared_boot_class; break; case ClassLoader::PLATFORM_LOADER: _misc_flags |= _misc_is_shared_platform_class; break; case ClassLoader::APP_LOADER: _m...
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
261,645,216,873,159,650,000,000,000,000,000,000,000
16
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
opfunc_construct (vm_frame_ctx_t *frame_ctx_p) /**< frame context */ { const uint8_t *byte_code_p = frame_ctx_p->byte_code_p + 1; uint8_t opcode = byte_code_p[-1]; unsigned int arguments_list_len; if (opcode >= CBC_NEW0) { arguments_list_len = (unsigned int) (opcode - CBC_NEW0); } else { argume...
0
[ "CWE-416" ]
jerryscript
3ad76f932c8d2e3b9ba2d95e64848698ec7d7290
205,902,916,601,218,180,000,000,000,000,000,000,000
56
Fix for-in collection cleanup on abrupt 'has' result (#4807) This patch fixes #4747 JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
tables_term_destination(j_compress_ptr cinfo) { JPEGState* sp = (JPEGState*) cinfo; /* set tables length to number of bytes actually emitted */ sp->jpegtables_length -= (uint32) sp->dest.free_in_buffer; }
0
[ "CWE-369" ]
libtiff
47f2fb61a3a64667bce1a8398a8fcb1b348ff122
153,500,438,587,748,740,000,000,000,000,000,000,000
7
* libtiff/tif_jpeg.c: avoid integer division by zero in JPEGSetupEncode() when horizontal or vertical sampling is set to 0. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653
theme_adium_focus_toggled (EmpathyChatView *view, gboolean has_focus) { EmpathyThemeAdiumPriv *priv = GET_PRIV (view); priv->has_focus = has_focus; if (!priv->has_focus) { /* We've lost focus, so let's make sure all the acked * messages have lost their unread marker. */ g_queue_foreach (&priv->...
0
[ "CWE-79" ]
empathy
739aca418457de752be13721218aaebc74bd9d36
229,261,083,927,365,350,000,000,000,000,000,000,000
17
theme_adium_append_message: escape alias before displaying it Not doing so can lead to nasty HTML injection from hostile users. https://bugzilla.gnome.org/show_bug.cgi?id=662035
PackLinuxElf64::generateElfHdr( OutputFile *fo, void const *proto, unsigned const brka ) { cprElfHdr2 *const h2 = (cprElfHdr2 *)(void *)&elfout; cprElfHdr3 *const h3 = (cprElfHdr3 *)(void *)&elfout; memcpy(h3, proto, sizeof(*h3)); // reads beyond, but OK h3->ehdr.e_type = ehdri.e_type; // ...
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
259,161,205,340,723,300,000,000,000,000,000,000,000
92
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
~Generation() { if (owner) { removeDirTree(path); } }
0
[ "CWE-59", "CWE-61" ]
passenger
5483b3292cc2af1c83033eaaadec20dba4dcfd9b
156,995,830,128,883,940,000,000,000,000,000,000,000
5
If the server instance directory already exists, it is now removed first in order get correct directory permissions. If the directory still exists after removal, Phusion Passenger aborts to avoid writing to a directory with unexpected permissions. Fixes issue #910.