func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int manager_setup_time_change(Manager *m) { int r; /* We only care for the cancellation event, hence we set the * timeout to the latest possible value. */ struct itimerspec its = { .it_value.tv_sec = TIME_T_MAX, }; assert(m); assert_cc(si...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
118,623,872,480,510,490,000,000,000,000,000,000,000
38
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
static void php_image_filter_contrast(INTERNAL_FUNCTION_PARAMETERS) { zval *SIM; gdImagePtr im_src; zend_long contrast, tmp; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll", &SIM, &tmp, &contrast) == FAILURE) { RETURN_FALSE; } if ((im_src = (gdImagePtr)zend_fetch_resource(Z_RES_P(SIM), "Image", le_gd)) == NU...
0
[ "CWE-787" ]
php-src
28022c9b1fd937436ab67bb3d61f652c108baf96
160,380,090,084,028,990,000,000,000,000,000,000,000
24
Fix bug#72697 - select_colors write out-of-bounds (cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4) Conflicts: ext/gd/gd.c
qemuProcessRefreshBalloonState(virQEMUDriverPtr driver, virDomainObjPtr vm, int asyncJob) { unsigned long long balloon; int rc; /* if no ballooning is available, the current size equals to the current * full memory size */ if (!virDomai...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
182,204,621,837,185,930,000,000,000,000,000,000,000
25
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
smpl_t aubio_onset_get_awhitening (aubio_onset_t *o) { return o->apply_awhitening; }
0
[]
aubio
e4e0861cffbc8d3a53dcd18f9ae85797690d67c7
327,117,582,794,719,370,000,000,000,000,000,000,000
4
[onset] safer deletion method
bool OSD::scrub_time_permit(utime_t now) { struct tm bdt; time_t tt = now.sec(); localtime_r(&tt, &bdt); bool day_permit = false; if (cct->_conf->osd_scrub_begin_week_day < cct->_conf->osd_scrub_end_week_day) { if (bdt.tm_wday >= cct->_conf->osd_scrub_begin_week_day && bdt.tm_wday < cct->_conf->osd_scrub...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
213,168,991,346,461,100,000,000,000,000,000,000,000
45
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
put_negResult(unsigned char **buf_out, OM_uint32 negResult, unsigned int buflen) { if (buflen < 3) return (-1); *(*buf_out)++ = ENUMERATED; *(*buf_out)++ = ENUMERATION_LENGTH; *(*buf_out)++ = (unsigned char) negResult; return (0); }
0
[ "CWE-415" ]
krb5
f18ddf5d82de0ab7591a36e465bc24225776940f
44,427,101,673,486,870,000,000,000,000,000,000,000
10
Fix double-free in SPNEGO [CVE-2014-4343] In commit cd7d6b08 ("Verify acceptor's mech in SPNEGO initiator") the pointer sc->internal_mech became an alias into sc->mech_set->elements, which should be considered constant for the duration of the SPNEGO context. So don't free it. CVE-2014-4343: In MIT krb5 releases 1.1...
static int sctp_setsockopt_maxburst(struct sock *sk, char __user *optval, unsigned int optlen) { struct sctp_assoc_value params; struct sctp_sock *sp; struct sctp_association *asoc; int val; int assoc_id = 0; if (optlen == sizeof(int)) { printk(KERN_WARNING "SCTP: Use of int in max_burst s...
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
263,285,761,874,009,530,000,000,000,000,000,000,000
37
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
int is_submodule_populated_gently(const char *path, int *return_error_code) { int ret = 0; char *gitdir = xstrfmt("%s/.git", path); if (resolve_gitdir_gently(gitdir, return_error_code)) ret = 1; free(gitdir); return ret; }
0
[]
git
a8dee3ca610f5a1d403634492136c887f83b59d2
243,058,106,194,982,700,000,000,000,000,000,000,000
11
Disallow dubiously-nested submodule git directories Currently it is technically possible to let a submodule's git directory point right into the git dir of a sibling submodule. Example: the git directories of two submodules with the names `hippo` and `hippo/hooks` would be `.git/modules/hippo/` and `.git/modules/hipp...
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *lst) { xmlParserCtxtPtr ctxt; xmlDocPtr newDoc; xmlNodePtr newRoot; xmlSAXHandlerPtr oldsax = NULL; int ret = 0; xmlChar start[4]; xmlCharEncoding enc; if (ctx == NULL) re...
0
[ "CWE-189" ]
libxml2
459eeb9dc752d5185f57ff6b135027f11981a626
178,183,805,345,396,740,000,000,000,000,000,000,000
186
Fix parser local buffers size problems
local block_state deflate_rle(s, flush) deflate_state *s; int flush; { int bflush; /* set if current block must be flushed */ uInt prev; /* byte at distance one to match */ Bytef *scan, *strend; /* scan goes up to strend for length of run */ for (;;) { /* Make...
1
[ "CWE-284", "CWE-787" ]
zlib
5c44459c3b28a9bd3283aaceab7c615f8020c531
275,248,417,518,139,550,000,000,000,000,000,000,000
68
Fix a bug that can crash deflate on some input when using Z_FIXED. This bug was reported by Danilo Ramos of Eideticom, Inc. It has lain in wait 13 years before being found! The bug was introduced in zlib 1.2.2.2, with the addition of the Z_FIXED option. That option forces the use of fixed Huffman codes. For rare input...
static void coroutine_fn mirror_wait_for_all_io(MirrorBlockJob *s) { while (s->in_flight > 0) { mirror_wait_for_free_in_flight_slot(s); } }
0
[ "CWE-476" ]
qemu
66fed30c9cd11854fc878a4eceb507e915d7c9cd
280,384,952,366,231,400,000,000,000,000,000,000,000
6
block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts() In mirror_iteration() we call mirror_wait_on_conflicts() with `self` parameter set to NULL. Starting from commit d44dae1a7c we dereference `self` pointer in mirror_wait_on_conflicts() without checks if it is not NULL. Backtrace: Program termi...
#ifndef GPAC_DISABLE_ISOM_WRITE GF_Err prft_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_ProducerReferenceTimeBox *ptr = (GF_ProducerReferenceTimeBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->refTrackID); gf_bs_write_u64(bs, ptr->ntp); ...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
288,487,768,962,610,500,000,000,000,000,000,000,000
18
prevent dref memleak on invalid input (#1183)
int ext4_try_add_inline_entry(handle_t *handle, struct ext4_filename *fname, struct inode *dir, struct inode *inode) { int ret, inline_size, no_expand; void *inline_start; struct ext4_iloc iloc; ret = ext4_get_inode_loc(dir, &iloc); if (ret) return ret; ext4_write_lock_xattr(dir, &no_expand); if (!e...
0
[ "CWE-416" ]
linux
117166efb1ee8f13c38f9e96b258f16d4923f888
184,905,248,320,328,700,000,000,000,000,000,000,000
61
ext4: do not allow external inodes for inline data The inline data feature was implemented before we added support for external inodes for xattrs. It makes no sense to support that combination, but the problem is that there are a number of extended attribute checks that are skipped if e_value_inum is non-zero. Unfor...
apply_configuration_from_filename (GsdXrandrManager *manager, const char *filename, gboolean no_matching_config_is_an_error, guint32 timestamp, GError ...
0
[]
gnome-settings-daemon
be513b3c7d80d0b7013d79ce46d7eeca929705cc
107,915,454,001,224,020,000,000,000,000,000,000,000
35
Implement autoconfiguration of the outputs This is similar in spirit to 'xrandr --auto', but we disfavor selecting clone modes. Instead, we lay out the outputs left-to-right. Signed-off-by: Federico Mena Quintero <federico@novell.com>
start_keepalived(void) { bool have_child = false; #ifdef _WITH_BFD_ /* must be opened before vrrp and bfd start */ open_bfd_pipes(); #endif #ifdef _WITH_LVS_ /* start healthchecker child */ if (running_checker()) { start_check_child(); have_child = true; } #endif #ifdef _WITH_VRRP_ /* start vrrp child */ ...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
169,018,158,859,607,070,000,000,000,000,000,000,000
33
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
void TR_table::warn_schema_incorrect(const char *reason) { if (MYSQL_VERSION_ID == table->s->mysql_version) { sql_print_error("%`s.%`s schema is incorrect: %s.", db.str, table_name.str, reason); } else { sql_print_error("%`s.%`s schema is incorrect: %s. Created with MariaDB %d, " ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
177,515,029,295,113,700,000,000,000,000,000,000,000
15
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
Create_field(THD *thd, Field *old_field, Field *orig_field): Column_definition(thd, old_field, orig_field), change(old_field->field_name), field(old_field), option_struct(old_field->option_struct), create_if_not_exists(false) { after= null_clex_str; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
97,200,705,060,654,280,000,000,000,000,000,000,000
8
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...
static inline int audit_dupe_lsm_field(struct audit_field *df, struct audit_field *sf) { int ret = 0; char *lsm_str; /* our own copy of lsm_str */ lsm_str = kstrdup(sf->lsm_str, GFP_KERNEL); if (unlikely(!lsm_str)) return -ENOMEM; df->lsm_str = lsm_str; /* our own (refreshed) copy of lsm_rule */ ret...
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
324,321,152,343,489,500,000,000,000,000,000,000,000
25
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
rsvg_filter_primitive_specular_lighting_render (RsvgNode *node, RsvgFilterPrimitive *primitive, RsvgFilterContext *ctx) { RsvgFilterPrimitiveSpecularLighting *specular_lighting = (RsvgFilterPrimitiveSpecularLighting *) primitive; gint x, y; gdouble z, surfaceScale; gint rowstride, height, width; gd...
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
289,610,699,050,640,520,000,000,000,000,000,000,000
99
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
__enqueue_entry(struct nfqnl_instance *queue, struct nf_queue_entry *entry) { list_add_tail(&entry->list, &queue->queue_list); queue->queue_total++; }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
163,370,338,586,514,420,000,000,000,000,000,000,000
5
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
gst_matroska_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) { GstMatroskaDemux *demux = GST_MATROSKA_DEMUX (parent); guint available; GstFlowReturn ret = GST_FLOW_OK; guint needed = 0; guint32 id; guint64 length; if (G_UNLIKELY (GST_BUFFER_IS_DISCONT (buffer))) { GST_DEBUG_OBJECT ...
0
[]
gst-plugins-good
9181191511f9c0be6a89c98b311f49d66bd46dc3
203,365,468,466,202,650,000,000,000,000,000,000,000
70
matroskademux: Fix extraction of multichannel WavPack The old code had a couple of issues that all lead to potential memory safety bugs. - Use a constant for the Wavpack4Header size instead of using sizeof. It's written out into the data and not from the struct and who knows what special alignment/padding r...
static int pf_command(struct pf_unit *pf, char *cmd, int dlen, char *fun) { pi_connect(pf->pi); write_reg(pf, 6, 0xa0+0x10*pf->drive); if (pf_wait(pf, STAT_BUSY | STAT_DRQ, 0, fun, "before command")) { pi_disconnect(pf->pi); return -1; } write_reg(pf, 4, dlen % 256); write_reg(pf, 5, dlen / 256); write_re...
0
[ "CWE-476", "CWE-125" ]
linux
58ccd2d31e502c37e108b285bf3d343eb00c235b
326,012,187,579,205,440,000,000,000,000,000,000,000
30
paride/pf: Fix potential NULL pointer dereference Syzkaller report this: pf: pf version 1.04, major 47, cluster 64, nice 0 pf: No ATAPI disk detected kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 0 PID: 9887...
static int do_add_mount(struct mount *newmnt, struct mountpoint *mp, struct path *path, int mnt_flags) { struct mount *parent = real_mount(path->mnt); mnt_flags &= ~MNT_INTERNAL_FLAGS; if (unlikely(!check_mnt(parent))) { /* that's acceptable only for automounts done in private ns */ if (!(mnt_flags & MNT_SH...
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
191,231,476,068,322,500,000,000,000,000,000,000,000
27
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
int lsm_set_label_at(int procfd, int on_exec, char* lsm_label) { int labelfd = -1; int ret = 0; const char* name; char* command = NULL; name = lsm_name(); if (strcmp(name, "nop") == 0) goto out; if (strcmp(name, "none") == 0) goto out; /* We don't support on-exec with AppArmor */ if (strcmp(name, "AppA...
1
[ "CWE-284", "CWE-264" ]
lxc
81f466d05f2a89cb4f122ef7f593ff3f279b165c
174,068,822,381,402,450,000,000,000,000,000,000,000
75
attach: do not send procfd to attached process So far, we opened a file descriptor refering to proc on the host inside the host namespace and handed that fd to the attached process in attach_child_main(). This was done to ensure that LSM labels were correctly setup. However, by exploiting a potential kernel bug, ptrac...
int crypto_rsa_public_encrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) { return crypto_rsa_public(input, length, key_length, modulus, exponent, output); }
0
[ "CWE-787" ]
FreeRDP
8305349a943c68b1bc8c158f431dc607655aadea
149,708,577,062,435,300,000,000,000,000,000,000,000
5
Fixed GHSL-2020-102 heap overflow (cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581)
static int ath6kl_config_btcoex_params(struct ar6_softc *ar) { int r; WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD sbcb_cmd; WMI_SET_BTCOEX_FE_ANT_CMD sbfa_cmd; /* Configure the type of BT collocated with WLAN */ memset(&sbcb_cmd, 0, sizeof(WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD)); sbcb_cmd.btcoexCoLocatedBTdev = ATH6KL_BT_...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
234,333,340,152,066,780,000,000,000,000,000,000,000
32
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
int compute_peer_confirm (pwd_session_t *session, uint8_t *out, BN_CTX *bnctx) { BIGNUM *x = NULL, *y = NULL; HMAC_CTX *ctx = NULL; uint8_t *cruft = NULL; int offset, req = -1; ctx = HMAC_CTX_new(); if (ctx == NULL) { DEBUG2("pwd: unable to allocate HMAC context!"); goto finish; } /* * Each component of...
0
[ "CWE-345" ]
freeradius-server
85497b5ff37ccb656895b826b88585898c209586
131,849,333,348,668,150,000,000,000,000,000,000,000
105
When processing an EAP-pwd Commit frame, the peer's scalar and elliptic curve point were not validated. This allowed an adversary to bypass authentication, and impersonate any user. Fix this vulnerability by assuring the received scalar lies within the valid range, and by checking that the received element is not the ...
int filp_close(struct file *filp, fl_owner_t id) { int retval = 0; if (!file_count(filp)) { printk(KERN_ERR "VFS: Close: file count is 0\n"); return 0; } if (filp->f_op && filp->f_op->flush) retval = filp->f_op->flush(filp, id); dnotify_flush(filp, id); locks_remove_posix(filp, id); fput(filp); return ...
0
[ "CWE-264" ]
linux-2.6
7b82dc0e64e93f430182f36b46b79fcee87d3532
12,746,644,050,157,790,000,000,000,000,000,000,000
17
Remove suid/sgid bits on [f]truncate() .. to match what we do on write(). This way, people who write to files by using [f]truncate + writable mmap have the same semantics as if they were using the write() family of system calls. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
void setSegNum(unsigned int segNumA) { segNum = segNumA; }
0
[ "CWE-476", "CWE-190" ]
poppler
27354e9d9696ee2bc063910a6c9a6b27c5184a52
105,444,232,080,586,700,000,000,000,000,000,000,000
1
JBIG2Stream: Fix crash on broken file https://github.com/jeffssh/CVE-2021-30860 Thanks to David Warren for the heads up
PJ_DEF(pj_status_t) pjsua_transport_lis_start(pjsua_transport_id id, const pjsua_transport_config *cfg) { pj_status_t status = PJ_SUCCESS; pjsip_transport_type_e tp_type; /* Make sure id is in range. */ PJ_ASSERT_RETURN(id>=0 && id<(int)PJ_ARRAY_SIZE(pjsua_var.tpdata), PJ_EINVAL); ...
0
[ "CWE-120", "CWE-787" ]
pjproject
d27f79da11df7bc8bb56c2f291d71e54df8d2c47
182,768,952,162,600,740,000,000,000,000,000,000,000
58
Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009) * Use PJ_ASSERT_RETURN on pjsip_auth_create_digest * Use PJ_ASSERT_RETURN on pjsua_init_tpselector() * Fix incorrect check. * Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256() * Modifi...
GF_Err kind_box_read(GF_Box *s,GF_BitStream *bs) { GF_KindBox *ptr = (GF_KindBox *)s; if (ptr->size) { u32 bytesToRead = (u32) ptr->size; char *data; u32 schemeURIlen; data = (char*)gf_malloc(bytesToRead * sizeof(char)); if (!data) return GF_OUT_OF_MEM; gf_bs_read_data(bs, data, bytesToRead); /*safety ...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
7,763,204,377,913,852,000,000,000,000,000,000,000
31
fixed #1587
static bool mysql_drop_partitions(ALTER_PARTITION_PARAM_TYPE *lpt) { char path[FN_REFLEN+1]; partition_info *part_info= lpt->table->part_info; List_iterator<partition_element> part_it(part_info->partitions); uint i= 0; uint remove_count= 0; int error; DBUG_ENTER("mysql_drop_partitions"); DBUG_ASSERT(lp...
1
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
21,972,379,313,124,107,000,000,000,000,000,000,000
33
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
build_session_credentials (CockpitAuth *self, GIOStream *connection, GHashTable *headers, const char *application, const char *type, const char *authorization) { CockpitCreds *creds; ...
0
[ "CWE-1021" ]
cockpit
46f6839d1af4e662648a85f3e54bba2d57f39f0e
52,644,087,329,400,610,000,000,000,000,000,000,000
60
ws: Restrict our cookie to the login host only Mark our cookie as `SameSite: Strict` [1]. The current `None` default will soon be moved to `Lax` by Firefox and Chromium, and recent versions started to throw a warning about it. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite https://...
bool WebContents::IsCurrentlyAudible() { return web_contents()->IsCurrentlyAudible(); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
310,554,207,091,544,540,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 ...
static void pmac_ide_writew (void *opaque, hwaddr addr, uint32_t val) { MACIOIDEState *d = opaque; addr = (addr & 0xFFF) >> 4; val = bswap16(val); if (addr == 0) { ide_data_writew(&d->bus, 0, val); } }
0
[ "CWE-399" ]
qemu
3251bdcf1c67427d964517053c3d185b46e618e8
204,804,948,713,460,000,000,000,000,000,000,000,000
11
ide: Correct handling of malformed/short PRDTs This impacts both BMDMA and AHCI HBA interfaces for IDE. Currently, we confuse the difference between a PRDT having "0 bytes" and a PRDT having "0 complete sectors." When we receive an incomplete sector, inconsistent error checking leads to an infinite loop wherein the c...
*/ static zend_string* _php_rfc822_write_address(ADDRESS *addresslist) { char address[SENDBUFLEN]; if (_php_imap_address_size(addresslist) >= SENDBUFLEN) { zend_throw_error(NULL, "Address buffer overflow"); return NULL; } address[0] = 0; rfc822_write_address(address, addresslist); return zend_string_init(ad...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
303,676,544,594,710,630,000,000,000,000,000,000,000
12
Disable rsh/ssh functionality in imap by default (bug #77153)
static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) { return ALIGN(memslot->npages, BITS_PER_LONG) / 8; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
333,158,663,452,903,600,000,000,000,000,000,000,000
4
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
struct MACH0_(mach_header) * MACH0_(get_hdr_from_bytes)(RBuffer *buf) { ut8 magicbytes[sizeof (ut32)] = {0}; ut8 machohdrbytes[sizeof (struct MACH0_(mach_header))] = {0}; int len; struct MACH0_(mach_header) *macho_hdr = R_NEW0 (struct MACH0_(mach_header)); bool big_endian = false; if (!macho_hdr) { return NULL;...
0
[ "CWE-415", "CWE-125" ]
radare2
60208765887f5f008b3b9a883f3addc8bdb9c134
199,756,290,317,121,600,000,000,000,000,000,000,000
50
Fix #9970 - heap oobread in mach0 parser (#10026)
static void wait_process_with_flush(pid_t pid, int *exit_code_ptr) { pid_t waited_pid; int status; while ((waited_pid = wait_process(pid, &status, WNOHANG)) == 0) { msleep(20); io_flush(FULL_FLUSH); } /* TODO: If the child exited on a signal, then log an * appropriate error message. Perhaps we should also...
0
[ "CWE-59" ]
rsync
962f8b90045ab331fc04c9e65f80f1a53e68243b
106,954,259,485,528,600,000,000,000,000,000,000,000
30
Complain if an inc-recursive path is not right for its dir. This ensures that a malicious sender can't use a just-sent symlink as a trasnfer path.
bool RawNumber(const char* str, SizeType length, bool copy) { if (s.empty()) { return false; } return s.back().number(str, length); }
0
[ "CWE-617" ]
ceph
b3118cabb8060a8cc6a01c4e8264cb18e7b1745a
251,960,257,456,614,500,000,000,000,000,000,000,000
7
rgw: Remove assertions in IAM Policy A couple of them could be triggered by user input. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n, int *al) { unsigned short length; unsigned short type; unsigned short size; unsigned char *data = *p; int tlsext_servername = 0; int renegotiate_seen = 0; #ifndef OPENSSL_NO_NEXTPROTONEG s->s3->next_proto_neg_seen = 0; #endif ...
0
[ "CWE-20" ]
openssl
2b0532f3984324ebe1236a63d15893792384328d
75,288,371,622,695,450,000,000,000,000,000,000,000
266
Fix for SRTP Memory Leak CVE-2014-3513 This issue was reported to OpenSSL on 26th September 2014, based on an origi issue and patch developed by the LibreSSL project. Further analysis of the i was performed by the OpenSSL team. The fix was developed by the OpenSSL team. Reviewed-by: Tim Hudson <tjh@openssl.org>
ParseSSDPPacket(int s, const char * p, ssize_t n, const struct sockaddr * addr, const char * searched_device) { const char * linestart; const char * lineend; const char * nameend; const char * valuestart; struct header headers[3]; int i, r = 0; int methodlen; int nts = -1; int m...
0
[ "CWE-416" ]
miniupnp
cd506a67e174a45c6a202eff182a712955ed6d6f
258,576,448,661,087,430,000,000,000,000,000,000,000
190
updateDevice() remove element from the list when realloc fails
static void vnc_dpy_switch(DisplayChangeListener *dcl, DisplaySurface *surface) { static const char placeholder_msg[] = "Display output is not active."; static DisplaySurface *placeholder; VncDisplay *vd = container_of(dcl, VncDisplay, dcl); bool pageflip = vnc_check_p...
0
[ "CWE-401" ]
qemu
6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0
303,606,486,881,074,050,000,000,000,000,000,000,000
48
vnc: fix memory leak when vnc disconnect Currently when qemu receives a vnc connect, it creates a 'VncState' to represent this connection. In 'vnc_worker_thread_loop' it creates a local 'VncState'. The connection 'VcnState' and local 'VncState' exchange data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'. ...
void georadiusbymemberCommand(client *c) { georadiusGeneric(c, RADIUS_MEMBER); }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
198,295,200,733,054,100,000,000,000,000,000,000,000
3
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
cvt_whole_image( TIFF *in, TIFF *out ) { uint32* raster; /* retrieve RGBA image */ uint32 width, height; /* image width & height */ uint32 row; size_t pixel_count; TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); pixel_count = width...
0
[ "CWE-119" ]
libtiff
98a254f5b92cea22f5436555ff7fceb12afee84d
303,056,806,555,543,700,000,000,000,000,000,000,000
107
enforce (configurable) memory limit in tiff2rgba fixes #207 fixes #209
_nc_mvcur_init(void) { NCURSES_SP_NAME(_nc_mvcur_init) (CURRENT_SCREEN); }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
221,055,702,066,596,040,000,000,000,000,000,000,000
4
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
StreamDoUnlink(int code, Datum arg) { ListCell *l; /* Loop through all created sockets... */ foreach(l, sock_paths) { char *sock_path = (char *) lfirst(l); unlink(sock_path); } /* Since we're about to exit, no need to reclaim storage */ sock_paths = NIL; }
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
266,415,461,030,738,140,000,000,000,000,000,000,000
14
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
static int tcp_match_skb_to_sack(struct sock *sk, struct sk_buff *skb, u32 start_seq, u32 end_seq) { int err; bool in_sack; unsigned int pkt_len; unsigned int mss; in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) && !before(end_seq, TCP_SKB_CB(skb)->end_seq); if (tcp_skb_pcount(skb) > 1 && !in_sack &...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
332,732,544,783,616,100,000,000,000,000,000,000,000
45
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
mlx5_rxq_initialize(struct mlx5_rxq_data *rxq) { const unsigned int wqe_n = 1 << rxq->elts_n; unsigned int i; for (i = 0; (i != wqe_n); ++i) { volatile struct mlx5_wqe_data_seg *scat; uintptr_t addr; uint32_t byte_count; uint32_t lkey; if (mlx5_rxq_mprq_enabled(rxq)) { struct mlx5_mprq_buf *buf = (*rx...
0
[]
dpdk
60b254e3923d007bcadbb8d410f95ad89a2f13fa
267,326,910,033,300,570,000,000,000,000,000,000,000
51
net/mlx5: fix Rx queue recovery mechanism The local variables are getting inconsistent in data receiving routines after queue error recovery. Receive queue consumer index is getting wrong, need to reset one to the size of the queue (as RQ was fully replenished in recovery procedure). In MPRQ case, also the local cons...
check_terminal_behavior(void) { int did_send = FALSE; if (!can_get_termresponse() || starting != 0 || *T_U7 == NUL) return; if (u7_status.tr_progress == STATUS_GET && !option_was_set((char_u *)"ambiwidth")) { char_u buf[16]; // Ambiguous width check. // Check how the terminal treats ambi...
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
64,113,026,451,782,840,000,000,000,000,000,000,000
85
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
eap_init(unit) int unit; { eap_state *esp = &eap_states[unit]; BZERO(esp, sizeof (*esp)); esp->es_unit = unit; esp->es_server.ea_timeout = EAP_DEFTIMEOUT; esp->es_server.ea_maxrequests = EAP_DEFTRANSMITS; esp->es_server.ea_id = (u_char)(drand48() * 0x100); esp->es_client.ea_timeout = EAP_DEFREQTIME; esp->es_cl...
0
[ "CWE-120", "CWE-787" ]
ppp
8d7970b8f3db727fe798b65f3377fe6787575426
152,072,649,308,638,880,000,000,000,000,000,000,000
13
pppd: Fix bounds check in EAP code Given that we have just checked vallen < len, it can never be the case that vallen >= len + sizeof(rhostname). This fixes the check so we actually avoid overflowing the rhostname array. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Paul Mackerras <paulus...
static void init_vmcb(struct vcpu_svm *svm) { struct vmcb_control_area *control = &svm->vmcb->control; struct vmcb_save_area *save = &svm->vmcb->save; svm->vcpu.fpu_active = 1; svm->vcpu.arch.hflags = 0; set_cr_intercept(svm, INTERCEPT_CR0_READ); set_cr_intercept(svm, INTERCEPT_CR3_READ); set_cr_intercept(svm,...
1
[ "CWE-399" ]
linux
54a20552e1eae07aa240fa370a0293e006b5faed
121,455,386,251,267,220,000,000,000,000,000,000,000
112
KVM: x86: work around infinite loop in microcode when #AC is delivered It was found that a guest can DoS a host by triggering an infinite stream of "alignment check" (#AC) exceptions. This causes the microcode to enter an infinite loop where the core never receives another interrupt. The host kernel panics pretty qu...
int http_header_match2(const char *hdr, const char *end, const char *name, int len) { const char *val; if (hdr + len >= end) return 0; if (hdr[len] != ':') return 0; if (strncasecmp(hdr, name, len) != 0) return 0; val = hdr + len + 1; while (val < end && HTTP_IS_SPHT(*val)) val++; if ((val >= e...
0
[]
haproxy-1.4
dc80672211e085c211f1fc47e15cfe57ab587d38
317,031,275,795,514,200,000,000,000,000,000,000,000
18
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
bool run(OperationContext* txn, const string& dbname, BSONObj& cmdObj, int options, string& errmsg, BSONObjBuilder& result) { auth::UsersInfoArgs args; Status status = auth::parseUsersInfoCommand(cmdObj, dbname, &args); if (!st...
0
[ "CWE-613" ]
mongo
64d8e9e1b12d16b54d6a592bae8110226c491b4e
220,345,501,026,060,070,000,000,000,000,000,000,000
86
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static void *ddgenlocaldata(void *_gt,int32 *len) { void *temp = genlocaldata(_gt,len); GTextField *gt = _gt; _GTextFieldReplace(gt,nullstr); _ggadget_redraw(&gt->g); return( temp ); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
190,391,048,549,153,500,000,000,000,000,000,000,000
7
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static long __get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas, int *locked) { /* * Parts of FOLL_LONGTERM behavior are incompatible with * FAUL...
0
[ "CWE-362" ]
linux
17839856fd588f4ab6b789f482ed3ffd7c403e1f
162,237,528,093,194,020,000,000,000,000,000,000,000
29
gup: document and work around "COW can break either way" issue Doing a "get_user_pages()" on a copy-on-write page for reading can be ambiguous: the page can be COW'ed at any time afterwards, and the direction of a COW event isn't defined. Yes, whoever writes to it will generally do the COW, but if the thread that did...
int ssl3_final_finish_mac(SSL *s, const char *sender, int len, unsigned char *p) { int ret, sha1len; ret=ssl3_handshake_mac(s,NID_md5,sender,len,p); if(ret == 0) return 0; p+=ret; sha1len=ssl3_handshake_mac(s,NID_sha1,sender,len,p); if(sha1len == 0) return 0; ret+=sha1len; return(ret); }
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
248,297,835,110,143,870,000,000,000,000,000,000,000
17
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static int __allocate_data_block(struct dnode_of_data *dn, int seg_type) { struct f2fs_sb_info *sbi = F2FS_I_SB(dn->inode); struct f2fs_summary sum; struct node_info ni; block_t old_blkaddr; blkcnt_t count = 1; int err; if (unlikely(is_inode_flag_set(dn->inode, FI_NO_ALLOC))) return -EPERM; err = f2fs_get_n...
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
112,374,999,935,506,110,000,000,000,000,000,000,000
40
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) { if (pte) free_page((unsigned long)pte); }
0
[]
linux
1d18c47c735e8adfe531fc41fae31e98f86b68fe
219,921,683,288,938,530,000,000,000,000,000,000,000
5
arm64: MMU fault handling and page table management This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch) and page table management. The user translation table is pointed to by TTBR0 and the kernel one (swapper_pg_dir) by TTBR1. There is no translation inform...
static int ttusbdecfe_dvbs_diseqc_send_master_cmd(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd *cmd) { struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; u8 b[] = { 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; if (cmd->msg_len > sizeof(b) - 4) ret...
0
[ "CWE-119", "CWE-787" ]
linux
f2e323ec96077642d397bb1c355def536d489d16
133,506,056,604,712,340,000,000,000,000,000,000,000
18
[media] ttusb-dec: buffer overflow in ioctl We need to add a limit check here so we don't overflow the buffer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
void avahi_s_host_name_resolver_start(AvahiSHostNameResolver *r) { assert(r); if(r->record_browser_a) avahi_s_record_browser_start_query(r->record_browser_a); if(r->record_browser_aaaa) avahi_s_record_browser_start_query(r->record_browser_aaaa); }
0
[]
avahi
9d31939e55280a733d930b15ac9e4dda4497680c
143,947,218,326,865,100,000,000,000,000,000,000,000
9
Fix NULL pointer crashes from #175 avahi-daemon is crashing when running "ping .local". The crash is due to failing assertion from NULL pointer. Add missing NULL pointer checks to fix it. Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd
static inline struct saved_msr *save_msr(int index, struct saved_msr *entry) { msr_t msr; msr = rdmsr(index); entry->index = index; entry->lo = msr.lo; entry->hi = msr.hi; /* Return the next entry. */ entry++; return entry; }
0
[ "CWE-269" ]
coreboot
afb7a814783cda12f5b72167163b9109ee1d15a7
163,218,721,032,261,700,000,000,000,000,000,000,000
13
cpu/x86/smm: Introduce SMM module loader version 2 Xeon-SP Skylake Scalable Processor can have 36 CPU threads (18 cores). Current coreboot SMM is unable to handle more than ~32 CPU threads. This patch introduces a version 2 of the SMM module loader which addresses this problem. Having two versions of the SMM module lo...
static int dump_all_tablespaces() { return dump_tablespaces(NULL); }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
121,428,728,973,061,240,000,000,000,000,000,000,000
4
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) { kvm_x86_ops->sched_in(vcpu, cpu); }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
324,351,168,178,133,760,000,000,000,000,000,000,000
4
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
static int srp_Verify_N_and_g(const BIGNUM *N, const BIGNUM *g) { BN_CTX *bn_ctx = BN_CTX_new(); BIGNUM *p = BN_new(); BIGNUM *r = BN_new(); int ret = g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) && BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) && p != NULL && BN_rshift1(p, N) ...
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
214,668,480,506,945,900,000,000,000,000,000,000,000
27
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.
MagickExport ModuleInfo *GetModuleInfo(const char *tag,ExceptionInfo *exception) { ModuleInfo *module_info; if (IsModuleTreeInstantiated() == MagickFalse) return((ModuleInfo *) NULL); LockSemaphoreInfo(module_semaphore); ResetSplayTreeIterator(module_list); if ((tag == (const char *) NULL) || (Locale...
0
[ "CWE-200", "CWE-362" ]
ImageMagick
01faddbe2711a4156180c4a92837e2f23683cc68
215,363,116,023,877,700,000,000,000,000,000,000,000
23
Use the correct rights.
void decode(bufferlist::iterator& bl) { __u8 struct_v; ::decode(struct_v, bl); ::decode(keys, bl); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
95,500,371,175,689,250,000,000,000,000,000,000,000
5
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static unsigned long __fget_light(unsigned int fd, fmode_t mask) { struct files_struct *files = current->files; struct file *file; if (atomic_read(&files->count) == 1) { file = files_lookup_fd_raw(files, fd); if (!file || unlikely(file->f_mode & mask)) return 0; return (unsigned long)file; } else { file...
0
[]
linux
054aa8d439b9185d4f5eb9a90282d1ce74772969
253,144,315,915,027,900,000,000,000,000,000,000,000
17
fget: check that the fd still exists after getting a ref to it Jann Horn points out that there is another possible race wrt Unix domain socket garbage collection, somewhat reminiscent of the one fixed in commit cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK"). See the extended comment about the garbage colle...
makeUnderflowError(const char *pdu, unsigned long minuend, unsigned long subtrahend) { OFStringStream stream; stream << "DUL Illegal " << pdu << ". Got " << minuend << " bytes of data and told to subtract " << subtrahend << " bytes of data"; stream << "." << OFStringStream_ends; OFCondition ret; OFST...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
45,527,372,173,309,570,000,000,000,000,000,000,000
13
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
static void *_prolog_timer(void *x) { int delay_time, rc = SLURM_SUCCESS; struct timespec ts; struct timeval now; slurm_msg_t msg; job_notify_msg_t notify_req; char srun_msg[128]; timer_struct_t *timer_struct = (timer_struct_t *) x; delay_time = MAX(2, (timer_struct->msg_timeout - 2)); gettimeofday(&now, NULL...
0
[ "CWE-284" ]
slurm
92362a92fffe60187df61f99ab11c249d44120ee
77,026,370,377,901,840,000,000,000,000,000,000,000
36
Fix security issue in _prolog_error(). Fix security issue caused by insecure file path handling triggered by the failure of a Prolog script. To exploit this a user needs to anticipate or cause the Prolog to fail for their job. (This commit is slightly different from the fix to the 15.08 branch.) CVE-2016-10030.
static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) { struct net *net = sock_net(sk); int err = 0; struct sadb_lifetime *lifetime; struct sadb_address *sa; struct sadb_x_policy *pol; struct xfrm_policy *xp; struct km_event c; struct sadb_x_sec_ctx *s...
0
[ "CWE-119", "CWE-787" ]
linux
a5cc68f3d63306d0d288f31edfc2ae6ef8ecd887
244,991,096,737,112,200,000,000,000,000,000,000,000
120
af_key: fix info leaks in notify messages key_notify_sa_flush() and key_notify_policy_flush() miss to initialize the sadb_msg_reserved member of the broadcasted message and thereby leak 2 bytes of heap memory to listeners. Fix that. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Steffen Klassert <steffen....
JsVar *jspeAssignmentExpression() { return __jspeAssignmentExpression(jspeConditionalExpression()); }
0
[ "CWE-787" ]
Espruino
e069be2ecc5060ef47391716e4de94999595b260
17,796,965,505,014,305,000,000,000,000,000,000,000
3
Fix potential corruption issue caused by `delete [].__proto__` (fix #2142)
static inline int xdigit2bin(char c, int delim) { int val; if (c == delim || c == '\0') return IN6PTON_DELIM; if (c == ':') return IN6PTON_COLON_MASK; if (c == '.') return IN6PTON_DOT; val = hex_to_bin(c); if (val >= 0) return val | IN6PTON_XDIGIT | (val < 10 ? IN6PTON_DIGIT : 0); if (delim == -1) r...
0
[ "CWE-200" ]
linux
3d4405226d27b3a215e4d03cfa51f536244e5de7
163,562,894,961,774,090,000,000,000,000,000,000,000
19
net: avoid dependency of net_get_random_once on nop patching net_get_random_once depends on the static keys infrastructure to patch up the branch to the slow path during boot. This was realized by abusing the static keys api and defining a new initializer to not enable the call site while still indicating that the bra...
static int toneport_setup(struct usb_line6_toneport *toneport) { u32 *ticks; struct usb_line6 *line6 = &toneport->line6; struct usb_device *usbdev = line6->usbdev; ticks = kmalloc(sizeof(*ticks), GFP_KERNEL); if (!ticks) return -ENOMEM; /* sync time on device with host: */ /* note: 32-bit timestamps overflow...
0
[ "CWE-476" ]
linux
0b074ab7fc0d575247b9cc9f93bb7e007ca38840
99,503,221,844,586,300,000,000,000,000,000,000,000
32
ALSA: line6: Assure canceling delayed work at disconnection The current code performs the cancel of a delayed work at the late stage of disconnection procedure, which may lead to the access to the already cleared state. This patch assures to call cancel_delayed_work_sync() at the beginning of the disconnection proced...
EXPORTED const char *mailbox_meta_fname(const struct mailbox *mailbox, int metafile) { static char fnamebuf[MAX_MAILBOX_PATH]; uint32_t legacy_dirs = (mailbox_mbtype(mailbox) & MBTYPE_LEGACY_DIRS); const char *src; src = mboxname_metapath(mailbox_partition(mailbox), mailbox_name(mailbox), ...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
156,717,279,163,725,460,000,000,000,000,000,000,000
14
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
int ssl3_dispatch_alert(SSL *s) { int i, j; void (*cb) (const SSL *ssl, int type, int val) = NULL; s->s3->alert_dispatch = 0; i = do_ssl3_write(s, SSL3_RT_ALERT, &s->s3->send_alert[0], 2, 0); if (i <= 0) { s->s3->alert_dispatch = 1; } else { /* * Alert sent to BIO. If ...
0
[ "CWE-17" ]
openssl
77c77f0a1b9f15b869ca3342186dfbedd1119d0e
97,426,391,669,287,170,000,000,000,000,000,000,000
34
Multiblock corrupted pointer fix OpenSSL 1.0.2 introduced the "multiblock" performance improvement. This feature only applies on 64 bit x86 architecture platforms that support AES NI instructions. A defect in the implementation of "multiblock" can cause OpenSSL's internal write buffer to become incorrectly set to NULL...
void __init proc_caches_init(void) { sighand_cachep = kmem_cache_create("sighand_cache", sizeof(struct sighand_struct), 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_DESTROY_BY_RCU| SLAB_NOTRACK, sighand_ctor); signal_cachep = kmem_cache_create("signal_cache", sizeof(struct signal_struct), 0, SLAB_HWCACHE_ALIG...
0
[ "CWE-284", "CWE-264" ]
linux
e66eded8309ebf679d3d3c1f5820d1f2ca332c71
192,620,242,252,934,700,000,000,000,000,000,000,000
29
userns: Don't allow CLONE_NEWUSER | CLONE_FS Don't allowing sharing the root directory with processes in a different user namespace. There doesn't seem to be any point, and to allow it would require the overhead of putting a user namespace reference in fs_struct (for permission checks) and incrementing that reference...
enum_field_types field_type() const { return MYSQL_TYPE_TIME; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
199,003,567,717,387,820,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
void ipadb_free_pwd_policy(krb5_context kcontext, osa_policy_ent_t val) { if (val) { free(val->name); free(val->allowed_keysalts); free(val); } }
0
[ "CWE-255" ]
freeipa
73f33569c8893610e246b2f44a7aeaec872b37e6
76,371,623,779,811,810,000,000,000,000,000,000,000
8
ipa-kdb: search for password policies globally With the CoS templates now used to create additional password policies per object type that are placed under the object subtrees, DAL driver needs to search for the policies in the whole tree. Individual policies referenced by the krbPwdPolicyReference attribute are alwa...
int Field_num::store_time_dec(MYSQL_TIME *ltime, uint dec_arg) { longlong v= TIME_to_ulonglong(ltime); if (ltime->neg == 0) return store(v, true); return store(-v, false); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
74,843,800,501,824,410,000,000,000,000,000,000,000
7
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
Item *in_subq_field_transformer_for_where(THD *thd, uchar *arg) { return convert_to_basic_const_item(thd); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
111,592,681,036,787,900,000,000,000,000,000,000,000
2
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
server_client_check_resize(struct window_pane *wp) { struct timeval tv = { .tv_usec = 250000 }; if (!(wp->flags & PANE_RESIZE)) return; log_debug("%s: %%%u resize to %u,%u", __func__, wp->id, wp->sx, wp->sy); if (!event_initialized(&wp->resize_timer)) evtimer_set(&wp->resize_timer, server_client_resize_event...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
40,423,053,603,179,443,000,000,000,000,000,000,000
28
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
Lookahead Parser::lookahead_for_include(const char* start) { // we actually just lookahead for a selector Lookahead rv = lookahead_for_selector(start); // but the "found" rules are different if (const char* p = rv.position) { // check for additional abort condition if (peek < exactly<';'...
0
[ "CWE-125" ]
libsass
eb15533b07773c30dc03c9d742865604f47120ef
213,753,796,951,974,180,000,000,000,000,000,000,000
13
Fix memory leak in `parse_ie_keyword_arg` `kwd_arg` would never get freed when there was a parse error in `parse_ie_keyword_arg`. Closes #2656
pkinit_server_plugin_init_realm(krb5_context context, const char *realmname, pkinit_kdc_context *pplgctx) { krb5_error_code retval = ENOMEM; pkinit_kdc_context plgctx = NULL; *pplgctx = NULL; plgctx = calloc(1, sizeof(*plgctx)); if (plgctx == NULL) goto erro...
0
[ "CWE-476" ]
krb5
db64ca25d661a47b996b4e2645998b5d7f0eb52c
151,263,501,930,044,700,000,000,000,000,000,000,000
58
PKINIT (draft9) null ptr deref [CVE-2012-1016] Don't check for an agility KDF identifier in the non-draft9 reply structure when we're building a draft9 reply, because it'll be NULL. The KDC plugin for PKINIT can dereference a null pointer when handling a draft9 request, leading to a crash of the KDC process. An atta...
xfs_ifree( xfs_trans_t *tp, xfs_inode_t *ip, xfs_bmap_free_t *flist) { int error; struct xfs_icluster xic = { 0 }; ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); ASSERT(ip->i_d.di_nlink == 0); ASSERT(ip->i_d.di_nextents == 0); ASSERT(ip->i_d.di_anextents == 0); ASSERT(ip->i_d.di_size == 0 || !S_ISREG(ip->i_d.d...
0
[ "CWE-19" ]
linux
fc0561cefc04e7803c0f6501ca4f310a502f65b8
72,373,886,275,127,240,000,000,000,000,000,000,000
44
xfs: optimise away log forces on timestamp updates for fdatasync xfs: timestamp updates cause excessive fdatasync log traffic Sage Weil reported that a ceph test workload was writing to the log on every fdatasync during an overwrite workload. Event tracing showed that the only metadata modification being made was the...
http_set_verbose (int verbose, int debug) { opt_verbose = verbose; opt_debug = debug; }
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
60,578,695,809,682,720,000,000,000,000,000,000,000
5
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
static void rds_iw_add_one(struct ib_device *device) { struct rds_iw_device *rds_iwdev; struct ib_device_attr *dev_attr; /* Only handle iwarp devices */ if (device->node_type != RDMA_NODE_RNIC) return; dev_attr = kmalloc(sizeof *dev_attr, GFP_KERNEL); if (!dev_attr) return; if (ib_query_device(device, dev...
0
[ "CWE-476" ]
net-next
bf39b4247b8799935ea91d90db250ab608a58e50
124,031,273,514,222,770,000,000,000,000,000,000,000
67
rds: prevent dereference of a NULL device in rds_iw_laddr_check Binding might result in a NULL device which is later dereferenced without checking. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static void _php_curl_set_default_options(php_curl *ch) { char *cainfo; curl_easy_setopt(ch->cp, CURLOPT_NOPROGRESS, 1); curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0); curl_easy_setopt(ch->cp, CURLOPT_ERRORBUFFER, ch->err.str); curl_easy_setopt(ch->cp, CURLOPT_WRITEFUNCTION, curl_write);...
0
[]
php-src
5fdfab743d964bb13602effc9efcd6f747e2f58c
322,819,783,407,915,030,000,000,000,000,000,000,000
29
Fixed bug #71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_multi_exec)
int sock_cmsg_send(struct sock *sk, struct msghdr *msg, struct sockcm_cookie *sockc) { struct cmsghdr *cmsg; int ret; for_each_cmsghdr(cmsg, msg) { if (!CMSG_OK(msg, cmsg)) return -EINVAL; if (cmsg->cmsg_level != SOL_SOCKET) continue; ret = __sock_cmsg_send(sk, msg, cmsg, sockc); if (ret) retu...
0
[ "CWE-119", "CWE-787" ]
linux
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
31,145,602,864,768,214,000,000,000,000,000,000,000
17
net: avoid signed overflows for SO_{SND|RCV}BUFFORCE CAP_NET_ADMIN users should not be allowed to set negative sk_sndbuf or sk_rcvbuf values, as it can lead to various memory corruptions, crashes, OOM... Note that before commit 82981930125a ("net: cleanups in sock_setsockopt()"), the bug was even more serious, since ...
static int snd_compress_dev_register(struct snd_device *device) { int ret = -EINVAL; char str[16]; struct snd_compr *compr; if (snd_BUG_ON(!device || !device->device_data)) return -EBADFD; compr = device->device_data; sprintf(str, "comprC%iD%i", compr->card->number, compr->device); pr_debug("reg %s for devic...
0
[ "CWE-703" ]
linux
6217e5ede23285ddfee10d2e4ba0cc2d4c046205
327,187,918,799,934,500,000,000,000,000,000,000,000
23
ALSA: compress: fix an integer overflow check I previously added an integer overflow check here but looking at it now, it's still buggy. The bug happens in snd_compr_allocate_buffer(). We multiply ".fragments" and ".fragment_size" and that doesn't overflow but then we save it in an unsigned int so it truncates the h...
mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super) { return mrb_define_class_under_id(mrb, outer, mrb_intern_cstr(mrb, name), super); }
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
333,130,413,442,521,800,000,000,000,000,000,000,000
4
class.c: clear method cache after `remove_method`.
void Compute(OpKernelContext* context) override { const Tensor& contents = context->input(0); OP_REQUIRES(context, TensorShapeUtils::IsScalar(contents.shape()), errors::InvalidArgument("contents must be scalar, got shape ", contents.shape().DebugString()...
1
[ "CWE-20", "CWE-125" ]
tensorflow
49f73c55d56edffebde4bca4a407ad69c1cae433
44,160,662,751,781,150,000,000,000,000,000,000,000
75
Fix integer overflow in BMP decoder by making the checks in DecodeBmp more stringent. Add fuzzer to improve the robustness of the decoder in the future. PiperOrigin-RevId: 185780111
static void kvm_uevent_notify_change(unsigned int type, struct kvm *kvm) { struct kobj_uevent_env *env; unsigned long long created, active; if (!kvm_dev.this_device || !kvm) return; mutex_lock(&kvm_lock); if (type == KVM_EVENT_CREATE_VM) { kvm_createvm_count++; kvm_active_vms++; } else if (type == KVM_EV...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
303,834,046,194,266,900,000,000,000,000,000,000,000
49
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
void set_unit(SELECT_LEX_UNIT *unit_arg) { unit= unit_arg; }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
29,921,600,731,947,447,000,000,000,000,000,000,000
1
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 __exit iwch_cm_term(void) { flush_workqueue(workq); destroy_workqueue(workq); }
0
[ "CWE-703" ]
linux
67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3
141,230,532,833,100,160,000,000,000,000,000,000,000
5
iw_cxgb3: Fix incorrectly returning error on success The cxgb3_*_send() functions return NET_XMIT_ values, which are positive integers values. So don't treat positive return values as an error. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off...
inline void BroadcastMul(const uint8* input1_data, const Dims<4>& input1_dims, int32 input1_offset, const uint8* input2_data, const Dims<4>& input2_dims, int32 input2_offset, int32 output_offset, int32 output_multiplier, ...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
281,462,504,386,570,950,000,000,000,000,000,000,000
12
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
inline char *priv_host_name() { return (*priv_host ? priv_host : (char *)"%"); }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
221,890,300,651,279,750,000,000,000,000,000,000,000
4
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...
static int nf_ct_net_init(struct net *net) { net->nf_frag.frags.high_thresh = IPV6_FRAG_HIGH_THRESH; net->nf_frag.frags.low_thresh = IPV6_FRAG_LOW_THRESH; net->nf_frag.frags.timeout = IPV6_FRAG_TIMEOUT; inet_frags_init_net(&net->nf_frag.frags); return nf_ct_frag6_sysctl_register(net); }
0
[]
linux
3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
180,089,718,472,075,280,000,000,000,000,000,000,000
9
net: frag, move LRU list maintenance outside of rwlock Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it. Original-idea-by: Florian Westphal <fw@strlen.de> Signed-off-by: Je...
long btrfs_ioctl_trans_end(struct file *file) { struct inode *inode = file_inode(file); struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_trans_handle *trans; trans = file->private_data; if (!trans) return -EINVAL; file->private_data = NULL; btrfs_end_transaction(trans, root); atomic_dec(&root->...
0
[ "CWE-200" ]
linux
8039d87d9e473aeb740d4fdbd59b9d2f89b2ced9
207,585,984,894,353,720,000,000,000,000,000,000,000
18
Btrfs: fix file corruption and data loss after cloning inline extents Currently the clone ioctl allows to clone an inline extent from one file to another that already has other (non-inlined) extents. This is a problem because btrfs is not designed to deal with files having inline and regular extents, if a file has an ...
static stf_status ikev2_parent_inI1outR1_tail( struct pluto_crypto_req_cont *pcrc, struct pluto_crypto_req *r) { struct ke_continuation *ke = (struct ke_continuation *)pcrc; struct msg_digest *md = ke->md; struct payload_digest *const sa_pd = md->chain[ISAKMP_NEXT_v2SA]; struct state *const st = md->st; struct c...
0
[ "CWE-20" ]
libreswan
2899351224fe2940aec37d7656e1e392c0fe07f0
320,514,998,822,798,800,000,000,000,000,000,000,000
141
SECURITY: Properly handle IKEv2 I1 notification packet without KE payload