func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
exif_mnote_data_canon_get_title (ExifMnoteData *note, unsigned int i) { ExifMnoteDataCanon *dc = (ExifMnoteDataCanon *) note; unsigned int m, s; if (!dc) return NULL; exif_mnote_data_canon_get_tags (dc, i, &m, &s); if (m >= dc->count) return NULL; return mnote_canon_tag_get_title_sub (dc->entries[m].tag, s, dc->...
0
[ "CWE-125" ]
libexif
435e21f05001fb03f9f186fa7cbc69454afd00d1
262,405,964,206,306,430,000,000,000,000,000,000,000
10
Fix MakerNote tag size overflow issues at read time. Check for a size overflow while reading tags, which ensures that the size is always consistent for the given components and type of the entry, making checking further down superfluous. This provides an alternate fix for https://sourceforge.net/p/libexif/bugs/125/ C...
uint Field_blob::packed_col_length(const uchar *data_ptr, uint length) { if (length > 255) return uint2korr(data_ptr)+2; return (uint) *data_ptr + 1; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
337,889,161,763,544,070,000,000,000,000,000,000,000
6
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 int kill_ok_by_cred(struct task_struct *t) { const struct cred *cred = current_cred(); const struct cred *tcred = __task_cred(t); if (cred->user->user_ns == tcred->user->user_ns && (cred->euid == tcred->suid || cred->euid == tcred->uid || cred->uid == tcred->suid || cred->uid == tcre...
0
[]
linux-2.6
243b422af9ea9af4ead07a8ad54c90d4f9b6081a
224,913,114,738,777,050,000,000,000,000,000,000,000
17
Relax si_code check in rt_sigqueueinfo and rt_tgsigqueueinfo Commit da48524eb206 ("Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code") made the check on si_code too strict. There are several legitimate places where glibc wants to queue a negative si_code different from SI_QUEUE: - This was ...
tr_variant* tr_variantListAddRaw(tr_variant* list, void const* val, size_t len) { tr_variant* child = tr_variantListAdd(list); tr_variantInitRaw(child, val, len); return child; }
0
[ "CWE-416", "CWE-284" ]
transmission
2123adf8e5e1c2b48791f9d22fc8c747e974180e
275,608,144,616,899,360,000,000,000,000,000,000,000
6
CVE-2018-10756: Fix heap-use-after-free in tr_variantWalk In libtransmission/variant.c, function tr_variantWalk, when the variant stack is reallocated, a pointer to the previously allocated memory region is kept. This address is later accessed (heap use-after-free) while walking back down the stack, causing the applic...
static void BuildAndStoreBlockSwitchEntropyCodes(BlockEncoder* self, HuffmanTree* tree, size_t* storage_ix, uint8_t* storage) { BuildAndStoreBlockSplitCode(self->block_types_, self->block_lengths_, self->num_blocks_, self->num_block_types_, tree, &self->block_split_code_, storage_ix, storage); }
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
165,631,419,958,904,250,000,000,000,000,000,000,000
6
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
int nfs_wb_page(struct inode *inode, struct page *page) { loff_t range_start = page_file_offset(page); loff_t range_end = range_start + (loff_t)(PAGE_CACHE_SIZE - 1); struct writeback_control wbc = { .sync_mode = WB_SYNC_ALL, .nr_to_write = 0, .range_start = range_start, .range_end = range_end, }; int ret;...
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
63,253,157,179,746,580,000,000,000,000,000,000,000
30
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
static int __videobuf_mmap_free(struct videobuf_queue *q) { unsigned int i; for (i = 0; i < VIDEO_MAX_FRAME; i++) { if (q->bufs[i]) { if (q->bufs[i]->map) return -EBUSY; } } return 0; }
0
[ "CWE-119", "CWE-787" ]
linux
0b29669c065f60501e7289e1950fa2a618962358
229,008,678,380,850,270,000,000,000,000,000,000,000
13
V4L/DVB (6751): V4L: Memory leak! Fix count in videobuf-vmalloc mmap This is pretty serious bug. map->count is never initialized after the call to kmalloc making the count start at some random trash value. The end result is leaking videobufs. Also, fix up the debug statements to print unsigned values. Pushed to h...
int lh_table_delete(struct lh_table *t, const void *k) { struct lh_entry *e = lh_table_lookup_entry(t, k); if(!e) return -1; return lh_table_delete_entry(t, e); }
0
[ "CWE-119", "CWE-310" ]
json-c
64e36901a0614bf64a19bc3396469c66dcd0b015
188,045,759,613,260,280,000,000,000,000,000,000,000
6
Patch to address the following issues: * CVE-2013-6371: hash collision denial of service * CVE-2013-6370: buffer overflow if size_t is larger than int
static void n_tty_packet_mode_flush(struct tty_struct *tty) { unsigned long flags; if (tty->link->packet) { spin_lock_irqsave(&tty->ctrl_lock, flags); tty->ctrl_status |= TIOCPKT_FLUSHREAD; spin_unlock_irqrestore(&tty->ctrl_lock, flags); wake_up_interruptible(&tty->link->read_wait); } }
0
[ "CWE-704" ]
linux
966031f340185eddd05affcf72b740549f056348
308,764,393,204,040,800,000,000,000,000,000,000,000
11
n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD) We added support for EXTPROC back in 2010 in commit 26df6d13406d ("tty: Add EXTPROC support for LINEMODE") and the intent was to allow it to override some (all?) ICANON behavior. Quoting from that original commit message: There is a new bi...
static inline uint32_t cirrus_src32(CirrusVGAState *s, uint32_t srcaddr) { uint32_t *src; if (s->cirrus_srccounter) { /* cputovideo */ src = (void *)&s->cirrus_bltbuf[srcaddr & (CIRRUS_BLTBUFSIZE - 1) & ~3]; } else { /* videotovideo */ src = (void *)&s->vga.vram_ptr[srcaddr ...
0
[ "CWE-119" ]
qemu
ffaf857778286ca54e3804432a2369a279e73aa7
164,491,324,546,499,060,000,000,000,000,000,000,000
13
cirrus: stop passing around src pointers in the blitter Does basically the same as "cirrus: stop passing around dst pointers in the blitter", just for the src pointer instead of the dst pointer. For the src we have to care about cputovideo blits though and fetch the data from s->cirrus_bltbuf instead of vga memory. ...
static void rtreeCheckCount(RtreeCheck *pCheck, const char *zTbl, i64 nExpect){ if( pCheck->rc==SQLITE_OK ){ sqlite3_stmt *pCount; pCount = rtreeCheckPrepare(pCheck, "SELECT count(*) FROM %Q.'%q%s'", pCheck->zDb, pCheck->zTab, zTbl ); if( pCount ){ if( sqlite3_step(pCount)==SQLITE_ROW ){...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
72,388,263,553,001,570,000,000,000,000,000,000,000
19
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
iperf_new_test() { struct iperf_test *test; test = (struct iperf_test *) malloc(sizeof(struct iperf_test)); if (!test) { i_errno = IENEWTEST; return NULL; } /* initialize everything to zero */ memset(test, 0, sizeof(struct iperf_test)); test->settings = (struct iperf_settin...
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
44,541,549,211,565,470,000,000,000,000,000,000,000
22
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
struct dentry *d_alloc_cursor(struct dentry * parent) { struct dentry *dentry = __d_alloc(parent->d_sb, NULL); if (dentry) { dentry->d_flags |= DCACHE_RCUACCESS | DCACHE_DENTRY_CURSOR; dentry->d_parent = dget(parent); } return dentry; }
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
129,794,812,754,490,470,000,000,000,000,000,000,000
9
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
Value ExpressionSwitch::evaluate(const Document& root, Variables* variables) const { for (auto&& branch : _branches) { Value caseExpression(branch.first->evaluate(root, variables)); if (caseExpression.coerceToBool()) { return branch.second->evaluate(root, variables); } } ...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
73,629,967,137,453,130,000,000,000,000,000,000,000
15
SERVER-49404 Enforce additional checks in $arrayToObject
static int orinoco_ioctl_get_encodeext(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct orinoco_private *priv = ndev_priv(dev); struct iw_point *encoding = &wrqu->encoding; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; ...
0
[]
linux
0a54917c3fc295cb61f3fb52373c173fd3b69f48
238,225,557,273,334,400,000,000,000,000,000,000,000
57
orinoco: fix TKIP countermeasure behaviour Enable the port when disabling countermeasures, and disable it on enabling countermeasures. This bug causes the response of the system to certain attacks to be ineffective. It also prevents wpa_supplicant from getting scan results, as wpa_supplicant disables countermeasures...
static int ref_module(struct module *a, struct module *b) { int err; if (b == NULL || already_uses(a, b)) return 0; /* If module isn't available, we fail. */ err = strong_try_module_get(b); if (err) return err; err = add_module_usage(a, b); if (err) { module_put(b); return err; } return 0; }
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
122,327,729,927,737,470,000,000,000,000,000,000,000
19
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
static Bool on_crypt_event(void *_udta, GF_Event *evt) { Double progress; u32 *prev_progress = (u32 *)_udta; if (!_udta) return GF_FALSE; if (evt->type != GF_EVENT_PROGRESS) return GF_FALSE; if (!evt->progress.total) return GF_FALSE; progress = (Double) (100*evt->progress.done) / evt->progress.total; if ((u32) ...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
57,828,990,984,066,380,000,000,000,000,000,000,000
20
fixed #2138
iperf_reporter_callback(struct iperf_test *test) { switch (test->state) { case TEST_RUNNING: case STREAM_RUNNING: /* print interval results for each stream */ iperf_print_intermediate(test); break; case TEST_END: case DISPLAY_RESULTS: i...
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
260,077,864,289,979,830,000,000,000,000,000,000,000
16
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
ModuleExport size_t RegisterFLIFImage(void) { char version[MaxTextExtent]; MagickInfo *entry; *version='\0'; entry=SetMagickInfo("FLIF"); #if defined(MAGICKCORE_FLIF_DELEGATE) entry->decoder=(DecodeImageHandler *) ReadFLIFImage; entry->encoder=(EncodeImageHandler *) WriteFLIFImage; (void) Format...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
46,893,813,634,193,850,000,000,000,000,000,000,000
28
Fix ultra rare but potential memory-leak
bool derive_edgeFlags_CTBRow(de265_image* img, int ctby) { const seq_parameter_set& sps = img->get_sps(); const pic_parameter_set& pps = img->get_pps(); const int minCbSize = sps.MinCbSizeY; bool deblocking_enabled=false; // whether deblocking is enabled in some part of the image int ctb_mask = (1<<sps.Log2...
0
[ "CWE-703" ]
libde265
45904e5667c5bf59c67fcdc586dfba110832894c
86,608,240,226,398,510,000,000,000,000,000,000,000
96
fix reading invalid images where shdr references are NULL in part of the image (#302)
loop_break(codegen_scope *s, node *tree) { if (!s->loop) { codegen(s, tree, NOVAL); raise_error(s, "unexpected break"); } else { struct loopinfo *loop; loop = s->loop; if (tree) { if (loop->reg < 0) { codegen(s, tree, NOVAL); } else { gen_retval(s, tree); ...
0
[ "CWE-415", "CWE-122" ]
mruby
38b164ace7d6ae1c367883a3d67d7f559783faad
251,272,784,016,464,700,000,000,000,000,000,000,000
57
codegen.c: fix a bug in `gen_values()`. - Fix limit handling that fails 15 arguments method calls. - Fix too early argument packing in arrays.
static int cx24116_writeregN(struct cx24116_state *state, int reg, const u8 *data, u16 len) { int ret = -EREMOTEIO; struct i2c_msg msg; u8 *buf; buf = kmalloc(len + 1, GFP_KERNEL); if (buf == NULL) { printk("Unable to kmalloc\n"); ret = -ENOMEM; goto error; } *(buf) = reg; memcpy(buf + 1, data, ...
0
[ "CWE-476", "CWE-119", "CWE-125" ]
linux
1fa2337a315a2448c5434f41e00d56b01a22283c
252,477,692,205,497,070,000,000,000,000,000,000,000
38
[media] cx24116: fix a buffer overflow when checking userspace params The maximum size for a DiSEqC command is 6, according to the userspace API. However, the code allows to write up much more values: drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23 Cc: stab...
istr_set_destroy (GHashTable *table) { g_hash_table_destroy (table); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
73,818,849,245,066,790,000,000,000,000,000,000,000
4
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static WORD_DESC * parameter_brace_expand_rhs (name, value, c, quoted, pflags, qdollaratp, hasdollarat) char *name, *value; int c, quoted, pflags, *qdollaratp, *hasdollarat; { WORD_DESC *w; WORD_LIST *l; char *t, *t1, *temp, *vname; int l_hasdollat, sindex; /*itrace("parameter_brace_expand_rhs: %s:%s...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
134,184,726,679,493,770,000,000,000,000,000,000,000
147
Bash-4.4 patch 7
rsvg_node_path_free (RsvgNode * self) { RsvgNodePath *path = (RsvgNodePath *) self; if (path->path) rsvg_cairo_path_destroy (path->path); _rsvg_node_finalize (&path->super); g_free (path); }
0
[ "CWE-20", "CWE-119" ]
librsvg
40af93e6eb1c94b90c3b9a0b87e0840e126bb8df
16,242,869,613,128,898,000,000,000,000,000,000,000
8
bgo#738050 - Handle the case where a list of coordinate pairs has an odd number of elements Lists of points come in coordinate pairs, but we didn't have any checking for that. It was possible to try to fetch the 'last' coordinate in a list, i.e. the y coordinate of an x,y pair, that was in fact missing, leading to an ...
SupportsServer2Client(rfbClient* client, int messageType) { return (client->supportedMessages.server2client[((messageType & 0xFF)/8)] & (1<<(messageType % 8)) ? TRUE : FALSE); }
0
[ "CWE-20" ]
libvncserver
85a778c0e45e87e35ee7199f1f25020648e8b812
124,836,584,149,616,990,000,000,000,000,000,000,000
4
Check for MallocFrameBuffer() return value If MallocFrameBuffer() returns FALSE, frame buffer pointer is left to NULL. Subsequent writes into that buffer could lead to memory corruption, or even arbitrary code execution.
static int snd_msnd_write_cfg_io0(int cfg, int num, u16 io) { if (snd_msnd_write_cfg(cfg, IREG_LOGDEVICE, num)) return -EIO; if (snd_msnd_write_cfg(cfg, IREG_IO0_BASEHI, HIBYTE(io))) return -EIO; if (snd_msnd_write_cfg(cfg, IREG_IO0_BASELO, LOBYTE(io))) return -EIO; return 0; }
0
[ "CWE-125", "CWE-401" ]
linux
20e2b791796bd68816fa115f12be5320de2b8021
168,287,629,667,549,150,000,000,000,000,000,000,000
10
ALSA: msnd: Optimize / harden DSP and MIDI loops The ISA msnd drivers have loops fetching the ring-buffer head, tail and size values inside the loops. Such codes are inefficient and fragile. This patch optimizes it, and also adds the sanity check to avoid the endless loops. Bugzilla: https://bugzilla.kernel.org/sho...
xmlRelaxNGComputeInterleaves(xmlRelaxNGDefinePtr def, xmlRelaxNGParserCtxtPtr ctxt, xmlChar * name ATTRIBUTE_UNUSED) { xmlRelaxNGDefinePtr cur, *tmp; xmlRelaxNGPartitionPtr partitions = NULL; xmlRelaxNGInterleaveGroupPtr *groups = NULL; xmlRelax...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
77,996,619,218,654,530,000,000,000,000,000,000,000
158
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
f_gettagstack(typval_T *argvars, typval_T *rettv) { win_T *wp = curwin; // default is current window if (rettv_dict_alloc(rettv) != OK) return; if (argvars[0].v_type != VAR_UNKNOWN) { wp = find_win_by_nr_or_id(&argvars[0]); if (wp == NULL) return; } get_tagstack(wp, rettv->vval.v_di...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
294,843,310,956,329,820,000,000,000,000,000,000,000
16
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
int SSL_get_wfd(const SSL *s) { int ret = -1; BIO *b, *r; b = SSL_get_wbio(s); r = BIO_find_type(b, BIO_TYPE_DESCRIPTOR); if (r != NULL) BIO_get_fd(r, &ret); return (ret); }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
232,894,790,856,220,300,000,000,000,000,000,000,000
11
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
Bcj2_Decode(struct _7zip *zip, uint8_t *outBuf, size_t outSize) { size_t inPos = 0, outPos = 0; const uint8_t *buf0, *buf1, *buf2, *buf3; size_t size0, size1, size2, size3; const uint8_t *buffer, *bufferLim; unsigned int i, j; size0 = zip->tmp_stream_bytes_remaining; buf0 = zip->tmp_stream_buff + zip->tmp_strea...
0
[ "CWE-190", "CWE-125" ]
libarchive
e79ef306afe332faf22e9b442a2c6b59cb175573
246,326,971,032,270,500,000,000,000,000,000,000,000
138
Issue #718: Fix TALOS-CAN-152 If a 7-Zip archive declares a rediculously large number of substreams, it can overflow an internal counter, leading a subsequent memory allocation to be too small for the substream data. Thanks to the Open Source and Threat Intelligence project at Cisco for reporting this issue.
filter_data_internal(struct filter_session *fs, uint64_t token, uint64_t reqid, const char *line) { struct filter_chain *filter_chain; struct filter_entry *filter_entry; struct filter *filter; if (!token) fs->phase = FILTER_DATA_LINE; if (fs->phase != FILTER_DATA_LINE) fatalx("misbehaving filter"); /* base...
0
[ "CWE-476" ]
src
6c3220444ed06b5796dedfd53a0f4becd903c0d1
263,812,017,969,014,870,000,000,000,000,000,000,000
33
smtpd's filter state machine can prematurely release resources leading to a crash. From gilles@
CDCCBounce::~CDCCBounce() { if (m_pPeer) { m_pPeer->Shutdown(); m_pPeer = NULL; } }
0
[ "CWE-399" ]
znc
11508aa72efab4fad0dbd8292b9614d9371b20a9
145,151,904,058,627,460,000,000,000,000,000,000,000
6
Fix crash in bouncedcc module. It happens when DCC RESUME is received. Affected ZNC versions: 0.200, 0.202. Thanks to howeyc for reporting this and providing the patch.
TEST(HttpStatusChecker, ExpectedRanges_204_304) { const std::string yaml = R"EOF( timeout: 1s interval: 1s unhealthy_threshold: 2 healthy_threshold: 2 http_health_check: service_name_matcher: prefix: locations path: /healthcheck expected_statuses: - start: 204 end: 205 ...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
118,107,288,818,957,030,000,000,000,000,000,000,000
31
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static void rbd_queue_workfn(struct work_struct *work) { struct rbd_img_request *img_request = container_of(work, struct rbd_img_request, work); struct rbd_device *rbd_dev = img_request->rbd_dev; enum obj_operation_type op_type = img_request->op_type; struct request *rq = blk_mq_rq_from_pdu(img_request); u64 ...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
218,703,085,823,225,320,000,000,000,000,000,000,000
54
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
internal_format( int textwidth, int second_indent, int flags, int format_only, int c) // character to be inserted (can be NUL) { int cc; int save_char = NUL; int haveto_redraw = FALSE; int fo_ins_blank = has_format_option(FO_INS_BLANK); int fo_multibyte = has_format_opt...
0
[]
vim
98a336dd497d3422e7efeef9f24cc9e25aeb8a49
177,879,941,465,865,170,000,000,000,000,000,000,000
362
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)
**/ CImg<T>& histogram(const unsigned int nb_levels, const T& min_value, const T& max_value) { return get_histogram(nb_levels,min_value,max_value).move_to(*this);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
126,455,314,518,990,240,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
void write(bool value) { const char *str_value = value ? "true" : "false"; Arg::StringValue<char> str = { str_value, std::strlen(str_value) }; writer_.write_str(str, spec_); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
133,322,658,425,893,760,000,000,000,000,000,000,000
5
Fix segfault on complex pointer formatting (#642)
static int rtnetlink_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, int type, u32 pid, u32 seq, u32 change, unsigned int flags) { struct ifinfomsg *r; struct nlmsghdr *nlh; unsigned char *b = skb->tail; nlh = NLMSG_NEW(skb, pid, seq, type, sizeof(*r), flags); r = NLMSG_DATA(nlh); r->ifi_fa...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
76,898,825,001,424,210,000,000,000,000,000,000,000
88
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
*/ void netdev_upper_dev_unlink(struct net_device *dev, struct net_device *upper_dev) { struct netdev_adjacent *i, *j; ASSERT_RTNL(); __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); /* Here is the tricky part. We must remove all dev's lower * devices from all upper_dev's upper devices and vice ...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
132,559,626,469,409,760,000,000,000,000,000,000,000
27
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...
static void mark_reg_not_init(struct bpf_verifier_env *env, struct bpf_reg_state *regs, u32 regno) { if (WARN_ON(regno >= MAX_BPF_REG)) { verbose(env, "mark_reg_not_init(regs, %u)\n", regno); /* Something bad happened, let's kill all regs except FP */ for (regno = 0; regno < BPF_REG_FP; regno++) __ma...
0
[ "CWE-125" ]
linux
b799207e1e1816b09e7a5920fbb2d5fcf6edd681
265,345,743,841,757,170,000,000,000,000,000,000,000
12
bpf: 32-bit RSH verification must truncate input before the ALU op When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it is sufficient to just truncate the output to 32 bits; and so I just moved the register size coercion t...
encode_fh(__be32 *p, struct svc_fh *fhp) { unsigned int size = fhp->fh_handle.fh_size; *p++ = htonl(size); if (size) p[XDR_QUADLEN(size)-1]=0; memcpy(p, &fhp->fh_handle.fh_base, size); return p + XDR_QUADLEN(size); }
0
[ "CWE-119", "CWE-703" ]
linux
13bf9fbff0e5e099e2b6f003a0ab8ae145436309
46,086,312,843,279,960,000,000,000,000,000,000,000
8
nfsd: stricter decoding of write-like NFSv2/v3 ops The NFSv2/v3 code does not systematically check whether we decode past the end of the buffer. This generally appears to be harmless, but there are a few places where we do arithmetic on the pointers involved and don't account for the possibility that a length could b...
void FullyConnectedInt8(const OpData* data, const TfLiteTensor* input, const TfLiteTensor* filter, const TfLiteTensor* bias, TfLiteTensor* output, CpuBackendContext* cpu_backend_context) { FullyConnectedParams op_params; op_params.input_offset ...
0
[ "CWE-369" ]
tensorflow
718721986aa137691ee23f03638867151f74935f
268,830,527,183,794,170,000,000,000,000,000,000,000
29
Prevent division by 0 in `fully_connected.cc` PiperOrigin-RevId: 385137282 Change-Id: If201e69b6e0048f0be001330b4b977e2b46db2cb
st_select_lex::build_pushable_cond_for_having_pushdown(THD *thd, Item *cond) { List<Item> equalities; /* Condition can't be pushed */ if (cond->get_extraction_flag() == NO_EXTRACTION_FL) return false; /** Condition can be pushed entirely. Transform its multiple equalities and add to attach_to_cond...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
153,522,529,134,576,430,000,000,000,000,000,000,000
101
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static int ceph_x_should_authenticate(struct ceph_auth_client *ac) { struct ceph_x_info *xi = ac->private; int need; ceph_x_validate_tickets(ac, &need); dout("ceph_x_should_authenticate want=%d need=%d have=%d\n", ac->want_keys, need, xi->have_keys); return need != 0; }
0
[ "CWE-399", "CWE-119" ]
linux
c27a3e4d667fdcad3db7b104f75659478e0c68d8
194,102,474,297,710,330,000,000,000,000,000,000,000
10
libceph: do not hard code max auth ticket len We hard code cephx auth ticket buffer size to 256 bytes. This isn't enough for any moderate setups and, in case tickets themselves are not encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but ceph_decode_copy() doesn't - it's just a memcpy() wrapper). S...
static int xfrm_notify_sa(struct xfrm_state *x, const struct km_event *c) { struct net *net = xs_net(x); struct xfrm_usersa_info *p; struct xfrm_usersa_id *id; struct nlmsghdr *nlh; struct sk_buff *skb; unsigned int len = xfrm_sa_len(x); unsigned int headlen; int err; headlen = sizeof(*p); if (c->event == XF...
0
[ "CWE-125" ]
linux
b805d78d300bcf2c83d6df7da0c818b0fee41427
284,836,879,061,359,750,000,000,000,000,000,000,000
58
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard PC (i440FX + P...
static void megasas_setup_reply_map(struct megasas_instance *instance) { const struct cpumask *mask; unsigned int queue, cpu; for (queue = 0; queue < instance->msix_vectors; queue++) { mask = pci_irq_get_affinity(instance->pdev, queue); if (!mask) goto fallback; for_each_cpu(cpu, mask) instance->reply_...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
108,963,655,921,073,600,000,000,000,000,000,000,000
19
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...
matches_filtered_tree(const authz_user_rules_t *authz, const char *repos_name, const char *user) { /* Does the user match? */ if (user) { if (authz->user == NULL || strcmp(user, authz->user)) return FALSE; } else if (authz->user != NULL) return...
0
[ "CWE-703" ]
subversion
e1b615840932fb46aefe1cd90d2115720af4600e
232,593,646,226,544,030,000,000,000,000,000,000,000
16
Fix issue #4880 "Use-after-free of object-pools when used as httpd module" Ensure that we initialize authz again if the pool which our authz caches depend on is cleared. Apache HTTPD may run pre/post config hooks multiple times and clear its global configuration pool which our authz caching pools depend on. Reported-...
ipmi_sdr_print_sensor_mc_locator(struct sdr_record_mc_locator *mc) { char desc[17]; if (!mc) return -1; memset(desc, 0, sizeof (desc)); snprintf(desc, (mc->id_code & 0x1f) + 1, "%s", mc->id_string); if (verbose == 0) { if (csv_output) printf("%s,00h,ok,%d.%d\n", mc->id_code ? desc : "", ...
1
[ "CWE-120" ]
ipmitool
7ccea283dd62a05a320c1921e3d8d71a87772637
242,788,972,258,774,980,000,000,000,000,000,000,000
85
fru, sdr: Fix id_string buffer overflows Final part of the fixes for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp 9 variants of stack buffer overflow when parsing `id_string` field of SDR records returned from `CMD_GET_SDR` command. SDR record structs have an `id_co...
static void dns_connect(struct PgSocket *server) { struct sockaddr_un sa_un; struct sockaddr_in sa_in; struct sockaddr_in6 sa_in6; struct sockaddr *sa; struct PgDatabase *db = server->pool->db; const char *host = db->host; const char *unix_dir; int sa_len; if (!host || host[0] == '/') { slog_noise(server, "...
0
[]
pgbouncer
4b92112b820830b30cd7bc91bef3dd8f35305525
188,229,234,415,311,850,000,000,000,000,000,000,000
53
add_database: fail gracefully if too long db name Truncating & adding can lead to fatal() later. It was not an issue before, but with audodb (* in [databases] section) the database name can some from network, thus allowing remote shutdown..
rtadv_prefix_free (struct rtadv_prefix *rtadv_prefix) { XFREE (MTYPE_RTADV_PREFIX, rtadv_prefix); }
0
[ "CWE-119", "CWE-787" ]
quagga
cfb1fae25f8c092e0d17073eaf7bd428ce1cd546
125,904,159,864,228,960,000,000,000,000,000,000,000
4
zebra: stack overrun in IPv6 RA receive code (CVE-2016-1245) The IPv6 RA code also receives ICMPv6 RS and RA messages. Unfortunately, by bad coding practice, the buffer size specified on receiving such messages mixed up 2 constants that in fact have different values. The code itself has: #define RTADV_MSG_SIZE 4096 ...
static inline php_stream *phar_get_entrypufp(phar_entry_info *entry TSRMLS_DC) { if (!entry->is_persistent) { return entry->phar->ufp; } return PHAR_GLOBALS->cached_fp[entry->phar->phar_pos].ufp; }
0
[ "CWE-119" ]
php-src
f59b67ae50064560d7bfcdb0d6a8ab284179053c
2,728,845,202,211,094,000,000,000,000,000,000,000
7
Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode)
GF_Err HintFile(GF_ISOFile *file, u32 MTUSize, u32 max_ptime, u32 rtp_rate, u32 base_flags, Bool copy_data, Bool interleave, Bool regular_iod, Bool single_group, Bool hint_no_offset) { GF_ESD *esd; GF_InitialObjectDescriptor *iod; u32 i, val, res, streamType; u32 sl_mode, prev_ocr, single_ocr, nb_done, tot_bw, bw, ...
0
[ "CWE-476" ]
gpac
87afe070cd6866df7fe80f11b26ef75161de85e0
121,056,228,896,289,260,000,000,000,000,000,000,000
174
fixed #1734
void security_skb_classify_flow(struct sk_buff *skb, struct flowi *fl) { int rc = security_ops->xfrm_decode_session(skb, &fl->secid, 0); BUG_ON(rc); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
193,894,811,207,207,130,000,000,000,000,000,000,000
6
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static gpointer test_helper_server(gpointer opaque) { struct GVncTest *data = opaque; GSocketListener *server; GSocketConnection *client; GIOStream *ios; GInputStream *is; GOutputStream *os; server = g_socket_listener_new(); data->port = g_socket_listener_add_any_inet_port(server, NULL...
0
[]
gtk-vnc
c8583fd3783c5b811590fcb7bae4ce6e7344963e
175,789,001,298,240,320,000,000,000,000,000,000,000
51
Correctly validate color map range indexes The color map index could wrap around to zero causing negative array index accesses. https://bugzilla.gnome.org/show_bug.cgi?id=778050 CVE-2017-5885 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
spnego_gss_import_cred(OM_uint32 *minor_status, gss_buffer_t token, gss_cred_id_t *cred_handle) { OM_uint32 ret; spnego_gss_cred_id_t spcred; gss_cred_id_t mcred; ret = gss_import_cred(minor_status, token, &mcred); if (GSS_ERROR(ret)) return (ret); spcred = malloc(sizeof(*spcred)); if (spcre...
0
[ "CWE-415" ]
krb5
f18ddf5d82de0ab7591a36e465bc24225776940f
179,237,302,705,491,350,000,000,000,000,000,000,000
22
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 nf_tables_newsetelem(struct sock *nlsk, struct sk_buff *skb, const struct nlmsghdr *nlh, const struct nlattr * const nla[]) { struct net *net = sock_net(skb->sk); const struct nlattr *attr; struct nft_set *set; struct nft_ctx ctx; int rem, err = 0; if (nla[NFTA_SET_ELEM_LIST_ELEMENTS] == NULL)...
0
[ "CWE-19" ]
nf
a2f18db0c68fec96631c10cad9384c196e9008ac
128,691,927,410,360,300,000,000,000,000,000,000,000
39
netfilter: nf_tables: fix flush ruleset chain dependencies Jumping between chains doesn't mix well with flush ruleset. Rules from a different chain and set elements may still refer to us. [ 353.373791] ------------[ cut here ]------------ [ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159! [ 353.373896...
Fatal( const char* message ) { FTDemo_Display_Done( display ); FTDemo_Done( handle ); PanicZ( message ); }
0
[ "CWE-120" ]
freetype2-demos
b995299b73ba4cd259f221f500d4e63095508bec
96,488,732,701,253,000,000,000,000,000,000,000,000
6
Fix Savannah bug #30054. * src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c, src/ftview.c: Use precision for `%s' where appropriate to avoid buffer overflows.
static void retrigger_next_event(void *arg) { struct hrtimer_cpu_base *base = this_cpu_ptr(&hrtimer_bases); if (!base->hres_active) return; raw_spin_lock(&base->lock); hrtimer_update_base(base); hrtimer_force_reprogram(base, 0); raw_spin_unlock(&base->lock); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
138,693,115,599,089,000,000,000,000,000,000,000,000
12
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root, struct btrfs_path *path, const char *name, int name_len) { struct btrfs_dir_item *dir_item; unsigned long name_ptr; u32 total_len; u32 cur = 0; u32 this_len; struct extent_buffer *leaf; leaf = path->nodes[0]; dir_item =...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
293,087,545,145,225,950,000,000,000,000,000,000,000
33
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
static int sisusb_get_free_outbuf(struct sisusb_usb_data *sisusb) { int i, timeout = 5 * HZ; wait_event_timeout(sisusb->wait_q, ((i = sisusb_outurb_available(sisusb)) >= 0), timeout); return i; }
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
63,569,416,364,594,590,000,000,000,000,000,000,000
9
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
R_API RList *r_bin_file_set_hashes(RBin *bin, RList/*<RBinFileHash*/ *new_hashes) { r_return_val_if_fail (bin && bin->cur && bin->cur->o && bin->cur->o->info, NULL); RBinFile *bf = bin->cur; RBinInfo *info = bf->o->info; RList *prev_hashes = info->file_hashes; info->file_hashes = new_hashes; return prev_hashes;...
0
[ "CWE-125" ]
radare2
193f4fe01d7f626e2ea937450f2e0c4604420e9d
277,858,495,516,454,300,000,000,000,000,000,000,000
10
Fix integer overflow in string search causing oobread ##crash * Reported by @greatergoodest via huntrdev * BountyID: 8a3dc5cb-08b3-4807-82b2-77f08c137a04 * Reproducer bfileovf
static int reenc_keyslot_validate(struct crypt_device *cd, json_object *jobj_keyslot) { json_object *jobj_mode, *jobj_area, *jobj_type, *jobj_shift_size, *jobj_hash, *jobj_sector_size, *jobj_direction; const char *mode, *type, *direction; uint32_t sector_size; uint64_t shift_size; /* mode (string: encrypt,reencry...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
322,911,939,862,140,730,000,000,000,000,000,000,000
71
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static URI_INLINE const URI_CHAR * URI_FUNC(ParseHierPart)( URI_TYPE(ParserState) * state, const URI_CHAR * first, const URI_CHAR * afterLast, UriMemoryManager * memory) { if (first >= afterLast) { return afterLast; } switch (*first) { case _UT('!'): case _UT('$'): case _UT('%'): case _UT('&'): case _UT(...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
157,896,385,322,453,740,000,000,000,000,000,000,000
37
Fix uriParse*Ex* out-of-bounds read
static struct GuidPropertySet *GuidPropertySet_find_guid(const e_guid_t *guid) { unsigned i; for (i=0; i<array_length(GuidPropertySet); i++) { if (guid_cmp(&GuidPropertySet[i].guid, guid) == 0) { return &GuidPropertySet[i]; } } return NULL; }
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
139,206,405,274,506,520,000,000,000,000,000,000,000
10
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
static int ldb_parse_hex2char(const char *x) { if (isxdigit(x[0]) && isxdigit(x[1])) { const char h1 = x[0], h2 = x[1]; int c = 0; if (h1 >= 'a') c = h1 - (int)'a' + 10; else if (h1 >= 'A') c = h1 - (int)'A' + 10; else if (h1 >= '0') c = h1 - (int)'0'; c = c << 4; if (h2 >= 'a') c += h2 - (int)'a' + 10;...
0
[ "CWE-125" ]
samba
8d34d172092f71baad0d777567e49aebfa07313d
322,649,153,361,507,860,000,000,000,000,000,000,000
19
CVE-2019-3824 ldb: ldb_parse_tree use talloc_zero Initialise the created ldb_parse_tree with talloc_zero, this ensures that it is correctly initialised if inadvertently passed to a function expecting a different operation type. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13773 Signed-off-by: Gary Lockyer <gary@c...
set_field_split_str(char *arg, char **key, char **value, char **delim) { char *value_end; *value = arg; value_end = strstr(arg, "->"); *key = value_end + strlen("->"); if (delim) { *delim = value_end; } if (!value_end) { return xasprintf("%s: missing `->'", arg); } ...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
233,658,526,205,301,700,000,000,000,000,000,000,000
20
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
ecma_date_to_string_format (ecma_number_t datetime_number, /**< datetime */ const char *format_p) /**< format buffer */ { const uint32_t date_buffer_length = 37; JERRY_VLA (lit_utf8_byte_t, date_buffer, date_buffer_length); lit_utf8_byte_t *dest_p = date_buffer; while (*format_p !=...
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
286,316,023,783,816,980,000,000,000,000,000,000,000
188
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static void csi_P(struct vc_data *vc, unsigned int nr) { if (nr > vc->vc_cols - vc->vc_x) nr = vc->vc_cols - vc->vc_x; else if (!nr) nr = 1; delete_char(vc, nr); }
0
[ "CWE-416", "CWE-362" ]
linux
ca4463bf8438b403596edd0ec961ca0d4fbe0220
165,869,720,873,793,340,000,000,000,000,000,000,000
8
vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console The VT_DISALLOCATE ioctl can free a virtual console while tty_release() is still running, causing a use-after-free in con_shutdown(). This occurs because VT_DISALLOCATE considers a virtual console's 'struct vc_data' to be unused as soon as the correspond...
static void find_refs(RCore *core, const char *glob) { char cmd[128]; ut64 curseek = core->offset; while (*glob == ' ') glob++; if (!*glob) { glob = "str."; } if (*glob == '?') { eprintf ("Usage: arf [flag-str-filter]\n"); return; } eprintf ("Finding references of flags matching '%s'...\n", glob); snprin...
0
[ "CWE-416", "CWE-908" ]
radare2
9d348bcc2c4bbd3805e7eec97b594be9febbdf9a
77,348,910,691,040,310,000,000,000,000,000,000,000
18
Fix #9943 - Invalid free on RAnal.avr
static void mark_proc_ids(struct mdesc_handle *hp, u64 mp, int proc_id) { u64 a; mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_BACK) { u64 t = mdesc_arc_target(hp, a); const char *name; const u64 *id; name = mdesc_node_name(hp, t); if (strcmp(name, "cpu")) continue; id = mdesc_get_property(hp, t, "id...
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
32,343,267,578,420,933,000,000,000,000,000,000,000
18
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
void init_cdrom_command(struct packet_command *cgc, void *buf, int len, int type) { memset(cgc, 0, sizeof(struct packet_command)); if (buf) memset(buf, 0, len); cgc->buffer = (char *) buf; cgc->buflen = len; cgc->data_direction = type; cgc->timeout = CDROM_DEF_TIMEOUT; }
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
189,958,884,464,440,800,000,000,000,000,000,000,000
11
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
uint32 get_partition_id_range_for_endpoint(partition_info *part_info, bool left_endpoint, bool include_endpoint) { longlong *range_array= part_info->range_int_array; longlong part_end_val; uint max_partition= part_info->num_part...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
287,762,524,742,778,130,000,000,000,000,000,000,000
99
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.
uint gis_field_options_image(uchar *buff, List<Create_field> &create_fields) { uint image_size= 0; List_iterator<Create_field> it(create_fields); Create_field *field; while ((field= it++)) { if (field->sql_type != MYSQL_TYPE_GEOMETRY) continue; if (buff) { uchar *cbuf= buff + image_size; ...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
94,074,377,598,555,980,000,000,000,000,000,000,000
32
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...
gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy, struct iri *iri, int count) { struct request *req = NULL; char *type = NULL; char *user, *passwd; char *proxyauth; int statcode; int write_error; wgint contlen, contrange; struct url *conn; FILE *fp; int err; uerr_...
1
[ "CWE-200" ]
wget
a933bdd31eee9c956a3b5cc142f004ef1fa94cb3
68,129,138,605,861,870,000,000,000,000,000,000,000
887
Keep fetched URLs in POSIX extended attributes * configure.ac: Check for xattr availability * src/Makefile.am: Add xattr.c * src/ftp.c: Include xattr.h. (getftp): Set attributes if enabled. * src/http.c: Include xattr.h. (gethttp): Add parameter 'original_url', set attributes if enabled. (http_loop): Add 'orig...
int commit_creds(struct cred *new) { struct task_struct *task = current; const struct cred *old = task->real_cred; kdebug("commit_creds(%p{%d,%d})", new, atomic_read(&new->usage), read_cred_subscribers(new)); BUG_ON(task->cred != old); #ifdef CONFIG_DEBUG_CREDENTIALS BUG_ON(read_cred_subscribers(...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
94,552,586,457,730,940,000,000,000,000,000,000,000
74
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
art_pdf_knockoutisolated_group_8(byte *gs_restrict dst, const byte *gs_restrict src, int n_chan) { byte src_alpha; src_alpha = src[n_chan]; if (src_alpha == 0) return; memcpy (dst, src, n_chan + 1); }
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
5,597,657,638,731,474,000,000,000,000,000,000,000
10
Bug 701795: Segv due to image mask issue
TryReuseIndex(Oid oldId, IndexStmt *stmt) { if (CheckIndexCompatible(oldId, stmt->accessMethod, stmt->indexParams, stmt->excludeOpNames)) { Relation irel = index_open(oldId, NoLock); stmt->oldNode = irel->rd_node.relNode; index_close(irel, NoLock); } }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
122,370,646,311,058,860,000,000,000,000,000,000,000
13
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
void WebContents::ShowDefinitionForSelection() { #if defined(OS_MAC) auto* const view = web_contents()->GetRenderWidgetHostView(); if (view) view->ShowDefinitionForSelection(); #endif }
0
[ "CWE-200", "CWE-668" ]
electron
07a1c2a3e5845901f7e2eda9506695be58edc73c
2,576,438,849,047,207,000,000,000,000,000,000,000
7
fix: restrict sendToFrame to same-process frames by default (#26875)
static int authorizer(void *autharg, int access_type, const char *arg3, const char *arg4, const char *arg5, const char *arg6) { char *filename; switch (access_type) { case SQLITE_COPY: { TSRMLS_FETCH(); filename = make_filename_safe(arg4 TSRMLS_CC); if (!filename) { return SQLITE_DENY; } efree(...
0
[ "CWE-264" ]
php-src
055ecbc62878e86287d742c7246c21606cee8183
303,763,357,347,626,400,000,000,000,000,000,000,000
30
Improve check for :memory: pseudo-filename in SQlite
void ide_atapi_cmd(IDEState *s) { uint8_t *buf = s->io_buffer; const struct AtapiCmd *cmd = &atapi_cmd_table[s->io_buffer[0]]; trace_ide_atapi_cmd(s, s->io_buffer[0]); if (trace_event_get_state_backends(TRACE_IDE_ATAPI_CMD_PACKET)) { /* Each pretty-printed byte needs two bytes and a space; */ ...
0
[ "CWE-125" ]
qemu
813212288970c39b1800f63e83ac6e96588095c6
19,928,936,687,698,074,000,000,000,000,000,000,000
75
ide: atapi: assert that the buffer pointer is in range A case was reported where s->io_buffer_index can be out of range. The report skimped on the details but it seems to be triggered by s->lba == -1 on the READ/READ CD paths (e.g. by sending an ATAPI command with LBA = 0xFFFFFFFF). For now paper over it with asserti...
move_folder_response_cb (ESoapResponse *response, GSimpleAsyncResult *simple) { ESoapParameter *param; ESoapParameter *subparam; GError *error = NULL; param = e_soap_response_get_first_parameter_by_name ( response, "ResponseMessages", &error); /* Sanity check */ g_return_if_fail ( (...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
282,156,061,151,960,160,000,000,000,000,000,000,000
31
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu, struct kvm_translation *tr) { return -EINVAL; }
0
[ "CWE-20" ]
linux
d26c25a9d19b5976b319af528886f89cf455692d
190,544,590,983,721,320,000,000,000,000,000,000,000
5
arm64: KVM: Tighten guest core register access from userspace We currently allow userspace to access the core register file in about any possible way, including straddling multiple registers and doing unaligned accesses. This is not the expected use of the ABI, and nobody is actually using it that way. Let's tighten ...
static void php_openssl_pkey_free(zend_resource *rsrc) { EVP_PKEY *pkey = (EVP_PKEY *)rsrc->ptr; assert(pkey != NULL); EVP_PKEY_free(pkey); }
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
318,374,811,098,167,560,000,000,000,000,000,000,000
8
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
static int php_skip_variable(php_stream * stream TSRMLS_DC) { off_t length = ((unsigned int)php_read2(stream TSRMLS_CC)); if (length < 2) { return 0; } length = length - 2; php_stream_seek(stream, (long)length, SEEK_CUR); return 1; }
0
[]
php-src
87829c09a1d9e39bee994460d7ccf19dd20eda14
197,036,113,786,177,900,000,000,000,000,000,000,000
11
Fix #70052: getimagesize() fails for very large and very small WBMP Very large WBMP (width or height greater than 2**31-1) cause an overflow and circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12 bytes) cause a read error and are not recognized. This patch fixes both bugs.
Fty make_adaptor(F fn, R (F::*)(SemanticValues &sv, any &dt) const) { return TypeAdaptor_sv_dt<R>(fn); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
227,718,920,543,560,900,000,000,000,000,000,000,000
3
Fix #122
TEST_F(Http1ServerConnectionImplTest, HeaderMutateEmbeddedNul) { const std::string example_input = "GET / HTTP/1.1\r\nHOST: h.com\r\nfoo: barbaz\r\n"; for (size_t n = 1; n < example_input.size(); ++n) { initialize(); InSequence sequence; MockRequestDecoder decoder; EXPECT_CALL(callbacks_, newStre...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
190,795,993,405,011,960,000,000,000,000,000,000,000
20
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
optional<Service> to_service(const smatch::value_type& s, bool wildcards) { static const unordered_map<string, Service> services = { { "acm", Service::acm }, { "apigateway", Service::apigateway }, { "appstream", Service::appstream }, { "artifact", Service::artifact }, { "autoscaling", Serv...
0
[ "CWE-617" ]
ceph
b3118cabb8060a8cc6a01c4e8264cb18e7b1745a
88,664,768,133,609,850,000,000,000,000,000,000,000
95
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>
void WebPImage::printStructure(std::ostream& out, PrintStructureOption option,int depth) { if (io_->open() != 0) { throw Error(kerDataSourceOpenFailed, io_->path(), strError()); } // Ensure this is the correct image type if (!isWebPType(*io_, true)) { if (...
0
[ "CWE-190" ]
exiv2
caa4e6745a76a23bb80127cf54c0d65096ae684c
225,271,384,535,611,030,000,000,000,000,000,000,000
63
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
static void insert_to_mm_slots_hash(struct mm_struct *mm, struct mm_slot *mm_slot) { struct hlist_head *bucket; bucket = &mm_slots_hash[((unsigned long)mm / sizeof(struct mm_struct)) % MM_SLOTS_HASH_HEADS]; mm_slot->mm = mm; hlist_add_head(&mm_slot->hash, bucket); }
0
[ "CWE-399" ]
linux
78f11a255749d09025f54d4e2df4fbcb031530e2
274,860,300,204,544,500,000,000,000,000,000,000,000
10
mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups The huge_memory.c THP page fault was allowed to run if vm_ops was null (which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't setup a special vma->vm_ops and it would fallback to regular anonymous memory) but other THP logics weren't fully ac...
static void ldapsrv_terminate_connection(struct ldapsrv_connection *conn, const char *reason) { struct tevent_req *subreq; if (conn->limits.reason) { return; } DLIST_REMOVE(conn->service->connections, conn); conn->limits.endtime = timeval_current_ofs(0, 500); tevent_queue_stop(conn->sockets.send_queue...
0
[ "CWE-703" ]
samba
f9b2267c6eb8138fc94df7a138ad5d87526f1d79
89,896,492,431,690,800,000,000,000,000,000,000,000
45
CVE-2021-3670 ldap_server: Ensure value of MaxQueryDuration is greater than zero BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> (cherry picked from commit e1ab0c43629686d1d2c0b0b2bcdc90057...
static void nfc_check_pres_work(struct work_struct *work) { struct nfc_dev *dev = container_of(work, struct nfc_dev, check_pres_work); int rc; device_lock(&dev->dev); if (dev->active_target && timer_pending(&dev->check_pres_timer) == 0) { rc = dev->ops->check_presence(dev, dev->active_target); if (rc ...
0
[]
linux
3e3b5dfcd16a3e254aab61bd1e8c417dd4503102
251,705,337,139,588,530,000,000,000,000,000,000,000
27
NFC: reorder the logic in nfc_{un,}register_device There is a potential UAF between the unregistration routine and the NFC netlink operations. The race that cause that UAF can be shown as below: (FREE) | (USE) nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | nci...
jd_utc_to_local(int jd, int df, int of) { df += of; if (df < 0) jd -= 1; else if (df >= DAY_IN_SECONDS) jd += 1; return jd; }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
269,473,654,386,084,650,000,000,000,000,000,000,000
9
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static double mp_list_Joff(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listin.width()), boundary_conditions = (unsigned int)_mp_arg(4), vsiz = (unsigned int)mp.opcode[5]; const i...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
267,801,381,430,732,260,000,000,000,000,000,000,000
40
Fix other issues in 'CImg<T>::load_bmp()'.
static int ZEND_FASTCALL ZEND_SL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; shift_left_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_o...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
219,759,921,821,275,500,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
copyFromFrameBuffer (char *& writePtr, const char *& readPtr, const char * endPtr, size_t xStride, Compressor::Format format, PixelType type) { char * localWritePtr = writePtr; const char * localReadPtr = readPtr; // // Copy a horizontal row...
0
[ "CWE-190" ]
openexr
5db6f7aee79e3e75e8c3780b18b28699614dd08e
257,332,699,971,040,970,000,000,000,000,000,000,000
104
prevent overflow in bytesPerDeepLineTable (#1152) * prevent overflow in bytesPerDeepLineTable Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> * restore zapped 'const' from ImfMisc Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
optimize_utf8 (re_dfa_t *dfa) { Idx node; int i; bool mb_chars = false; bool has_period = false; for (node = 0; node < dfa->nodes_len; ++node) switch (dfa->nodes[node].type) { case CHARACTER: if (dfa->nodes[node].opr.c >= ASCII_CHARS) mb_chars = true; break; case ANCHOR: switch (d...
0
[ "CWE-19" ]
gnulib
5513b40999149090987a0341c018d05d3eea1272
292,279,800,397,329,470,000,000,000,000,000,000,000
74
Diagnose ERE '()|\1' Problem reported by Hanno Böck in: http://bugs.gnu.org/21513 * lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep track of the set of previously-completed subexpressions available before the first alternative, and restore this set just before parsing each subsequent alternative. This...
komeda_wb_init_data_flow(struct komeda_layer *wb_layer, struct drm_connector_state *conn_st, struct komeda_crtc_state *kcrtc_st, struct komeda_data_flow_cfg *dflow) { struct drm_framebuffer *fb = conn_st->writeback_job->fb; memset(dflow, 0, sizeof(*dflow)); dflow->out_w = fb->width; dflow->out_h = fb-...
0
[ "CWE-401" ]
linux
a0ecd6fdbf5d648123a7315c695fb6850d702835
213,637,532,498,926,400,000,000,000,000,000,000,000
23
drm/komeda: prevent memory leak in komeda_wb_connector_add In komeda_wb_connector_add if drm_writeback_connector_init fails the allocated memory for kwb_conn should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com> Sig...
TEST_F(AccessControlTest, validate_partition_access_fail_on_not_subpartition) { topic_name = "HelloWorldTopic_multiple_partition"; partitions.push_back("Partition1"); partitions.push_back("Partition5"); RTPSParticipantAttributes subscriber_participant_attr; fill_subscriber_participant_security_attr...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
204,694,366,065,051,900,000,000,000,000,000,000,000
16
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static int unit_add_mount_dependencies(Unit *u) { UnitDependencyInfo di; const char *path; Iterator i; int r; assert(u); HASHMAP_FOREACH_KEY(di.data, path, u->requires_mounts_for, i) { char prefix[strlen(path) + 1]; PATH_FOREACH_PREFIX_M...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
259,724,286,036,519,800,000,000,000,000,000,000,000
49
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...