func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void ext2_clear_super_error(struct super_block *sb) { struct buffer_head *sbh = EXT2_SB(sb)->s_sbh; if (buffer_write_io_error(sbh)) { /* * Oh, dear. A previous attempt to write the * superblock failed. This could happen because the * USB device was yanked out. Or it could happen to * be a tra...
0
[ "CWE-241", "CWE-19" ]
linux
be0726d33cb8f411945884664924bed3cb8c70ee
177,815,421,624,206,600,000,000,000,000,000,000,000
19
ext2: convert to mbcache2 The conversion is generally straightforward. We convert filesystem from a global cache to per-fs one. Similarly to ext4 the tricky part is that xattr block corresponding to found mbcache entry can get freed before we get buffer lock for that block. So we have to check whether the entry is sti...
encode_SET_FIELD(const struct ofpact_set_field *sf, enum ofp_version ofp_version, struct ofpbuf *out) { if (ofp_version >= OFP15_VERSION) { /* OF1.5+ only has Set-Field (reg_load is redundant so we drop it * entirely). */ set_field_to_set_field(sf, ofp_version, out); } ...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
63,471,877,592,412,055,000,000,000,000,000,000,000
25
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>
static int fill_autodev(const struct lxc_rootfs *rootfs) { int ret; char path[MAXPATHLEN]; int i; mode_t cmask; INFO("Creating initial consoles under container /dev"); ret = snprintf(path, MAXPATHLEN, "%s/dev", rootfs->path ? rootfs->mount : ""); if (ret < 0 || ret >= MAXPATHLEN) { ERROR("Error calculating c...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
97,864,157,001,926,310,000,000,000,000,000,000,000
54
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
} EXPORT_SYMBOL_GPL(iscsi_destroy_flashnode_sess); static int iscsi_iter_destroy_flashnode_fn(struct device *dev, void *data) { if (!iscsi_flashnode_bus_match(dev, NULL)) return 0;
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
213,304,416,262,044,730,000,000,000,000,000,000,000
8
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
intrusive_ptr<Expression> ExpressionPow::create(ExpressionContext* const expCtx, Value base, Value exp) { intrusive_ptr<ExpressionPow> expr(new ExpressionPow(expCtx)); expr->_children.push_back( ExpressionCon...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
136,977,038,714,084,250,000,000,000,000,000,000,000
10
SERVER-49404 Enforce additional checks in $arrayToObject
bool subselect_union_engine::no_tables() { for (SELECT_LEX *sl= unit->first_select(); sl; sl= sl->next_select()) { if (sl->table_list.elements) return FALSE; } return TRUE; }
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
332,371,065,322,920,270,000,000,000,000,000,000,000
9
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
GF_Err chpl_box_read(GF_Box *s,GF_BitStream *bs) { GF_ChapterEntry *ce; u32 nb_chaps, len, i, count; GF_ChapterListBox *ptr = (GF_ChapterListBox *)s; ISOM_DECREASE_SIZE(ptr, 5) /*reserved or ???*/ gf_bs_read_u32(bs); nb_chaps = gf_bs_read_u8(bs); count = 0; while (nb_chaps) { GF_SAFEALLOC(ce, GF_ChapterEnt...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
228,783,664,275,366,440,000,000,000,000,000,000,000
43
fixed #1587
static int fd_getgeo(struct block_device *bdev, struct hd_geometry *geo) { int drive = (long)bdev->bd_disk->private_data; int type = ITYPE(drive_state[drive].fd_device); struct floppy_struct *g; int ret; ret = get_floppy_geometry(drive, type, &g); if (ret) return ret; geo->heads = g->head; geo->sectors = g-...
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
162,699,299,921,501,300,000,000,000,000,000,000,000
16
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
GF_Box *ssix_New() { ISOM_DECL_BOX_ALLOC(GF_SubsegmentIndexBox, GF_ISOM_BOX_TYPE_SSIX); return (GF_Box *)tmp; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
260,474,488,908,581,300,000,000,000,000,000,000,000
5
fixed 2 possible heap overflows (inc. #1088)
libxlDomainDeathThread(void *opaque) { struct libxlEventHandlerThreadInfo *death_info = opaque; virDomainObj *vm = death_info->vm; libxl_event *ev = death_info->event; libxlDriverPrivate *driver = death_info->driver; virObjectEvent *dom_event = NULL; g_autoptr(libxlDriverConfig) cfg = libxlDrive...
1
[ "CWE-703", "CWE-667" ]
libvirt
5c5df5310f72be4878a71ace47074c54e0d1a27d
124,877,622,666,858,410,000,000,000,000,000,000,000
27
libxl: Search for virDomainObj in event handler threads libxl can deliver events and invoke callbacks on any application thread calling into libxl. This can cause deadlock in the libvirt libxl driver Thread 19 (Thread 0x7f31411ec700 (LWP 14068) "libvirtd"): #0 0x00007f318520cc7d in __lll_lock_wait () from /lib64/lib...
static int register_ftrace_profiler(void) { return register_ftrace_function(&ftrace_profile_ops); }
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
135,179,814,413,215,660,000,000,000,000,000,000,000
4
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
int json_object_update_existing(json_t *object, json_t *other) { const char *key; json_t *value; if(!json_is_object(object) || !json_is_object(other)) return -1; json_object_foreach(other, key, value) { if(json_object_get(object, key)) json_object_set_nocheck(object, key, v...
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
31,368,211,587,624,557,000,000,000,000,000,000,000
15
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
void EC_ec_pre_comp_free(EC_PRE_COMP *pre) { int i; if (pre == NULL) return; CRYPTO_atomic_add(&pre->references, -1, &i, pre->lock); REF_PRINT_COUNT("EC_ec", pre); if (i > 0) return; REF_ASSERT_ISNT(i < 0); if (pre->points != NULL) { EC_POINT **pts; for (p...
0
[ "CWE-327", "CWE-320" ]
openssl
56fb454d281a023b3f950d969693553d3f3ceea1
298,192,943,797,289,100,000,000,000,000,000,000,000
23
Timing vulnerability in ECDSA signature generation (CVE-2018-0735) Preallocate an extra limb for some of the big numbers to avoid a reallocation that can potentially provide a side channel. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/7486) (cherry pick...
void mlx5_start_health_poll(struct mlx5_core_dev *dev) { struct mlx5_core_health *health = &dev->priv.health; timer_setup(&health->timer, poll_health, 0); health->fatal_error = MLX5_SENSOR_NO_ERR; clear_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags); health->health = &dev->iseg->health; health->health_counter = ...
0
[ "CWE-400", "CWE-401" ]
linux
c7ed6d0183d5ea9bc31bcaeeba4070bd62546471
62,991,992,188,939,195,000,000,000,000,000,000,000
13
net/mlx5: fix memory leak in mlx5_fw_fatal_reporter_dump In mlx5_fw_fatal_reporter_dump if mlx5_crdump_collect fails the allocated memory for cr_data must be released otherwise there will be memory leak. To fix this, this commit changes the return instruction into goto error handling. Fixes: 9b1f29823605 ("net/mlx5: ...
static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags) { struct io_ring_ctx *ctx = req->ctx; const bool needs_lock = issue_flags & IO_URING_F_UNLOCKED; /* workqueue context doesn't hold uring_lock, grab it now */ if (unlikely(needs_lock)) mutex_lock(&ctx->uring_lock); /* * Track whe...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
24,639,365,734,402,500,000,000,000,000,000,000,000
48
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
static int sctp_get_port(struct sock *sk, unsigned short snum) { union sctp_addr addr; struct sctp_af *af = sctp_sk(sk)->pf->af; /* Set up a dummy address struct from the sk. */ af->from_sk(&addr, sk); addr.v4.sin_port = htons(snum); /* Note: sk->sk_num gets filled in if ephemeral port request. */ return !!sct...
0
[ "CWE-617", "CWE-362" ]
linux
2dcab598484185dea7ec22219c76dcdd59e3cb90
16,145,824,197,966,757,000,000,000,000,000,000,000
12
sctp: avoid BUG_ON on sctp_wait_for_sndbuf Alexander Popov reported that an application may trigger a BUG_ON in sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is waiting on it to queue more data and meanwhile another thread peels off the association being used by the first thread. This patch replaces ...
static struct kioctx *lookup_ioctx(unsigned long ctx_id) { struct mm_struct *mm = current->mm; struct kioctx *ctx, *ret = NULL; struct hlist_node *n; rcu_read_lock(); hlist_for_each_entry_rcu(ctx, n, &mm->ioctx_list, list) { if (ctx->user_id == ctx_id && !ctx->dead) { get_ioctx(ctx); ret = ctx; break;...
0
[ "CWE-190" ]
linux-2.6
75e1c70fc31490ef8a373ea2a4bea2524099b478
22,495,729,309,784,287,000,000,000,000,000,000,000
19
aio: check for multiplication overflow in do_io_submit Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                retu...
virDomainDefGetVcpus(const virDomainDef *def) { size_t i; unsigned int ret = 0; for (i = 0; i < def->maxvcpus; i++) { if (def->vcpus[i]->online) ret++; } return ret; }
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
10,780,420,961,110,604,000,000,000,000,000,000,000
12
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
okPosition(TScreen *screen, LineData **ld, CELL *cell) { Boolean result = True; if (cell->row > screen->max_row) { result = False; TRACE(("okPosition cell row %d > screen max %d\n", cell->row, screen->max_row)); } else if (cell->col > (LastTextCol(screen, *ld, cell->row) + 1)) { TRACE(("okPositi...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
145,940,005,916,512,920,000,000,000,000,000,000,000
21
snapshot of project "xterm", label xterm-365d
void CLASS adobe_copy_pixel(unsigned row, unsigned col, ushort **rp) { int c; if (tiff_samples == 2 && shot_select) (*rp)++; if (raw_image) { if (row < raw_height && col < raw_width) RAW(row, col) = curve[**rp]; *rp += tiff_samples; } else { #ifdef LIBRAW_LIBRARY_BUILD if (row < raw...
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
145,181,964,579,069,290,000,000,000,000,000,000,000
29
parse_qt: possible integer overflow
void operator()(bool v) const { out << (v ? "true" : "false"); }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
134,243,435,387,123,030,000,000,000,000,000,000,000
3
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
handle_null(CMD_Request *rx_message, CMD_Reply *tx_message) { tx_message->status = htons(STT_SUCCESS); }
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
11,991,638,016,053,936,000,000,000,000,000,000,000
4
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
static OPJ_BOOL opj_tcd_code_block_enc_allocate(opj_tcd_cblk_enc_t * p_code_block) { if (! p_code_block->layers) { /* no memset since data */ p_code_block->layers = (opj_tcd_layer_t*) opj_calloc(100, sizeof(opj_tcd_layer_t)); if (! p_code_block->layers)...
0
[ "CWE-119", "CWE-787" ]
openjpeg
397f62c0a838e15d667ef50e27d5d011d2c79c04
230,856,815,831,030,900,000,000,000,000,000,000,000
20
Fix write heap buffer overflow in opj_mqc_byteout(). Discovered by Ke Liu of Tencent's Xuanwu LAB (#835)
SYSCALL_DEFINE1(unlink, const char __user *, pathname) { return do_unlinkat(AT_FDCWD, pathname); }
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
181,954,242,541,300,400,000,000,000,000,000,000,000
4
fix autofs/afs/etc. magic mountpoint breakage We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make...
sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd ) { struct net_local *nl = (struct net_local *) dev->priv; struct sbni_flags flags; int error = 0; #ifdef CONFIG_SBNI_MULTILINE struct net_device *slave_dev; char slave_name[ 8 ]; #endif switch( cmd ) { case SIOCDEVGETINSTATS : if (...
1
[ "CWE-264" ]
linux-2.6
f2455eb176ac87081bbfc9a44b21c7cd2bc1967e
334,362,285,214,514,800,000,000,000,000,000,000,000
85
wan: Missing capability checks in sbni_ioctl() There are missing capability checks in the following code: 1300 static int 1301 sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd) 1302 { [...] 1319 case SIOCDEVRESINSTATS : 1320 if( current->euid != 0 ) /* root only */ 1321 ...
static int rds_ib_laddr_check(__be32 addr) { int ret; struct rdma_cm_id *cm_id; struct sockaddr_in sin; /* Create a CMA ID and try to bind it. This catches both * IB and iWARP capable NICs. */ cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP, IB_QPT_RC); if (IS_ERR(cm_id)) return PTR_ERR(cm_id); memset(&si...
0
[ "CWE-399", "CWE-476" ]
linux
c2349758acf1874e4c2b93fe41d072336f1a31d0
128,822,839,478,534,400,000,000,000,000,000,000,000
33
rds: prevent dereference of a NULL device Binding might result in a NULL device, which is dereferenced causing this BUG: [ 1317.260548] BUG: unable to handle kernel NULL pointer dereference at 000000000000097 4 [ 1317.261847] IP: [<ffffffff84225f52>] rds_ib_laddr_check+0x82/0x110 [ 1317.263315] PGD 418bcb067 PUD 3ceb...
GF_Box *elst_New() { ISOM_DECL_BOX_ALLOC(GF_EditListBox, GF_ISOM_BOX_TYPE_ELST); tmp->entryList = gf_list_new(); if (!tmp->entryList) { gf_free(tmp); return NULL; } return (GF_Box *)tmp; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
215,129,623,350,547,870,000,000,000,000,000,000,000
10
prevent dref memleak on invalid input (#1183)
static int caif_seqpkt_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len, int flags) { struct sock *sk = sock->sk; struct sk_buff *skb; int ret; int copylen; ret = -EOPNOTSUPP; if (m->msg_flags&MSG_OOB) goto read_error; skb = skb_recv_datagram(sk, flags, 0 , &ret); if ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
247,936,853,247,363,480,000,000,000,000,000,000,000
35
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
mbfl_strlen(mbfl_string *string) { int len, n, m, k; unsigned char *p; const unsigned char *mbtab; const mbfl_encoding *encoding; encoding = mbfl_no2encoding(string->no_encoding); if (encoding == NULL || string == NULL) { return -1; } len = 0; if (encoding->flag & MBFL_ENCTYPE_SBCS) { len = string->len; ...
1
[ "CWE-119" ]
php-src
64f42c73efc58e88671ad76b6b6bc8e2b62713e1
39,715,137,855,146,440,000,000,000,000,000,000,000
56
Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
_equalPlaceHolderVar(const PlaceHolderVar *a, const PlaceHolderVar *b) { /* * We intentionally do not compare phexpr. Two PlaceHolderVars with the * same ID and levelsup should be considered equal even if the contained * expressions have managed to mutate to different states. This will * happen during final pl...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
123,050,612,146,409,190,000,000,000,000,000,000,000
23
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...
std::unique_ptr<folly::IOBuf> finalize() { return encoder_.finalize(); }
0
[ "CWE-703", "CWE-770" ]
fbthrift
3f156207e8a6583d88999487e954320dc18955e6
68,397,715,097,027,180,000,000,000,000,000,000,000
3
Better handling of truncated data when reading containers Summary: Currently we read the container size and blindly pre-allocate the container of that size. This allows malicious attacker to send few bytes message and cause server to allocate GBs of memory. This diff changes the logic to check if we have at least 1b/...
template<typename t, typename to> CImg<T>& distance_dijkstra(const T& value, const CImg<t>& metric, const bool is_high_connectivity, CImg<to>& return_path) { return get_distance_dijkstra(value,metric,is_high_connectivity,return_path).move_to(*this);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
105,748,020,247,332,520,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
void hiddev_disconnect(struct hid_device *hid) { struct hiddev *hiddev = hid->hiddev; struct usbhid_device *usbhid = hid->driver_data; usb_deregister_dev(usbhid->intf, &hiddev_class); mutex_lock(&hiddev->existancelock); hiddev->exist = 0; if (hiddev->open) { mutex_unlock(&hiddev->existancelock); usbhid_clo...
0
[ "CWE-119", "CWE-787" ]
linux
93a2001bdfd5376c3dc2158653034c20392d15c5
267,496,496,446,630,030,000,000,000,000,000,000,000
19
HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands This patch validates the num_values parameter from userland during the HIDIOCGUSAGES and HIDIOCSUSAGES commands. Previously, if the report id was set to HID_REPORT_ID_UNKNOWN, we would fail to validate the num_values parameter leading to a heap...
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_CV == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_CV != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMP_HANDLER(ZEND_O...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
185,606,556,358,895,600,000,000,000,000,000,000,000
13
- 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
static int adapter_authorize(struct btd_adapter *adapter, const bdaddr_t *dst, const char *uuid, adapter_authorize_type check_for_connection, service_auth_cb cb, void *user_data) { struct service_auth *auth; struct btd_device *device; static guint id = 0; device = btd_adapter_find_device(adapter, ds...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
187,312,953,212,099,200,000,000,000,000,000,000,000
44
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
qemuProcessBuildDestroyMemoryPathsImpl(virQEMUDriverPtr driver, virDomainObjPtr vm, const char *path, bool build) { if (build) { if (virFileExists(path)) return 0; if (vi...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
5,622,588,797,418,124,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...
unique_ptr<IOBuf> IOBuf::cloneCoalescedWithHeadroomTailroom( std::size_t newHeadroom, std::size_t newTailroom) const { return std::make_unique<IOBuf>( cloneCoalescedAsValueWithHeadroomTailroom(newHeadroom, newTailroom)); }
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
212,765,557,860,176,640,000,000,000,000,000,000,000
5
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
char *msPostGISBuildSQL(layerObj *layer, rectObj *rect, long *uid) { msPostGISLayerInfo *layerinfo = 0; char *strFrom = 0; char *strItems = 0; char *strWhere = 0; char *strSQL = 0; static char *strSQLTemplate0 = "select %s from %s where %s"; static char *strSQLTemplate1 = "select %s from %s%s"; char *s...
0
[ "CWE-89" ]
mapserver
3a10f6b829297dae63492a8c63385044bc6953ed
75,953,691,674,233,150,000,000,000,000,000,000,000
57
Fix potential SQL Injection with postgis TIME filters (#4834)
xfs_attr_list( xfs_inode_t *dp, char *buffer, int bufsize, int flags, attrlist_cursor_kern_t *cursor) { xfs_attr_list_context_t context; struct attrlist *alist; int error; /* * Validate the cursor. */ if (cursor->pad1 || cursor->pad2) return(XFS_ERROR(EINVAL)); if ((cursor->initted == 0) && (c...
0
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
109,412,562,238,957,080,000,000,000,000,000,000,000
50
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
static bool ieee80211_tx_8023(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, int led_len, struct sta_info *sta, bool txpending) { struct ieee80211_local *local = sdata->local; struct ieee80211_tx_control control = {}; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); stru...
0
[ "CWE-476" ]
linux
bddc0c411a45d3718ac535a070f349be8eca8d48
232,340,145,099,920,260,000,000,000,000,000,000,000
43
mac80211: Fix NULL ptr deref for injected rate info The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") moved the code to validate the radiotap header from ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is possible to share more code with the new Tx queue selecti...
int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index) { struct extent_info ei; struct inode *inode = dn->inode; if (f2fs_lookup_extent_cache(inode, index, &ei)) { dn->data_blkaddr = ei.blk + index - ei.fofs; return 0; } return f2fs_reserve_block(dn, index); }
0
[ "CWE-190" ]
linux
b86e33075ed1909d8002745b56ecf73b833db143
231,412,164,329,501,100,000,000,000,000,000,000,000
12
f2fs: fix a dead loop in f2fs_fiemap() A dead loop can be triggered in f2fs_fiemap() using the test case as below: ... fd = open(); fallocate(fd, 0, 0, 4294967296); ioctl(fd, FS_IOC_FIEMAP, fiemap_buf); ... It's caused by an overflow in __get_data_block(): ... bh->b_size = map.m_len << inode->i_blkbits; ... ...
static pyc_object *get_short_ascii_interned_object(RBuffer *buffer) { bool error = false; ut8 n = get_ut8 (buffer, &error); return error? NULL: get_ascii_object_generic (buffer, n, true); }
0
[ "CWE-416" ]
radare2
8525ad0b9fd596f4b251bb3d7b114e6dc7ce1ee8
303,991,960,550,285,630,000,000,000,000,000,000,000
5
Fix bins/*/rep8 - UAF crash in pyc parser ##crash * Reported by Cen Zhang via huntr.dev
static int calipso_doi_add(struct calipso_doi *doi_def, struct netlbl_audit *audit_info) { int ret_val = -EINVAL; u32 doi; u32 doi_type; struct audit_buffer *audit_buf; doi = doi_def->doi; doi_type = doi_def->type; if (doi_def->doi == CALIPSO_DOI_UNKNOWN) goto doi_add_return; refcount_set(&doi_def->r...
0
[ "CWE-416" ]
linux
ad5d07f4a9cd671233ae20983848874731102c08
24,688,099,648,910,430,000,000,000,000,000,000,000
46
cipso,calipso: resolve a number of problems with the DOI refcounts The current CIPSO and CALIPSO refcounting scheme for the DOI definitions is a bit flawed in that we: 1. Don't correctly match gets/puts in netlbl_cipsov4_list(). 2. Decrement the refcount on each attempt to remove the DOI from the DOI list, only re...
static MagickBooleanType IsTXT(const unsigned char *magick,const size_t length) { #define MagickID "# ImageMagick pixel enumeration:" char colorspace[MaxTextExtent]; ssize_t count; unsigned long columns, depth, rows; if (length < 40) return(MagickFalse); if (LocaleNCompare((const ...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
114,385,235,772,623,770,000,000,000,000,000,000,000
25
Fix ultra rare but potential memory-leak
const CImg<T>& _display(CImgDisplay &disp, const char *const title, const bool display_info, unsigned int *const XYZ, const bool exit_on_anykey, const bool exit_on_singleclick) const { unsigned int oldw = 0, oldh = 0, _XYZ[3] = { 0 }, key = 0; int ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
11,273,346,310,077,575,000,000,000,000,000,000,000
242
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
pixSetLowContrast(PIX *pixs1, PIX *pixs2, l_int32 mindiff) { l_int32 i, j, w, h, d, wpl, val1, val2, found; l_uint32 *data1, *data2, *line1, *line2; PROCNAME("pixSetLowContrast"); if (!pixs1 || !pixs2) return ERROR_INT("pixs1 and pixs2 not both defined"...
0
[ "CWE-125" ]
leptonica
3c18c43b6a3f753f0dfff99610d46ad46b8bfac4
274,549,613,577,443,300,000,000,000,000,000,000,000
57
Fixing oss-fuzz issue 22512: Heap-buffer-overflow in rasteropGeneralLow() * Simplified the hole-filling function `
int ssl_cert_set0_chain(SSL *s, SSL_CTX *ctx, STACK_OF(X509) *chain) { int i, r; CERT_PKEY *cpk = s != NULL ? s->cert->key : ctx->cert->key; if (!cpk) return 0; for (i = 0; i < sk_X509_num(chain); i++) { X509 *x = sk_X509_value(chain, i); r = ssl_security_cert(s, ctx, x, 0, 0);...
0
[ "CWE-835" ]
openssl
758754966791c537ea95241438454aa86f91f256
93,108,592,400,074,830,000,000,000,000,000,000,000
20
Fix invalid handling of verify errors in libssl In the event that X509_verify() returned an internal error result then libssl would mishandle this and set rwstate to SSL_RETRY_VERIFY. This subsequently causes SSL_get_error() to return SSL_ERROR_WANT_RETRY_VERIFY. That return code is supposed to only ever be returned i...
void rds_rdma_unuse(struct rds_sock *rs, u32 r_key, int force) { struct rds_mr *mr; unsigned long flags; int zot_me = 0; spin_lock_irqsave(&rs->rs_rdma_lock, flags); mr = rds_mr_tree_walk(&rs->rs_rdma_keys, r_key, NULL); if (!mr) { pr_debug("rds: trying to unuse MR with unknown r_key %u!\n", r_key); spin...
0
[ "CWE-476" ]
linux
f3069c6d33f6ae63a1668737bc78aaaa51bff7ca
230,444,531,343,228,860,000,000,000,000,000,000,000
35
rds: Fix NULL pointer dereference in __rds_rdma_map This is a fix for syzkaller719569, where memory registration was attempted without any underlying transport being loaded. Analysis of the case reveals that it is the setsockopt() RDS_GET_MR (2) and RDS_GET_MR_FOR_DEST (7) that are vulnerable. Here is an example sta...
static int __dequeue_signal(struct sigpending *pending, sigset_t *mask, siginfo_t *info, bool *resched_timer) { int sig = next_signal(pending, mask); if (sig) collect_signal(sig, pending, info, resched_timer); return sig; }
0
[ "CWE-119", "CWE-787" ]
linux
4ea77014af0d6205b05503d1c7aac6eace11d473
175,305,391,590,957,400,000,000,000,000,000,000,000
9
kernel/signal.c: avoid undefined behaviour in kill_something_info When running kill(72057458746458112, 0) in userspace I hit the following issue. UBSAN: Undefined behaviour in kernel/signal.c:1462:11 negation of -2147483648 cannot be represented in type 'int': CPU: 226 PID: 9849 Comm: test Tainted: G B ...
static void vmxnet3_reset(VMXNET3State *s) { VMW_CBPRN("Resetting vmxnet3..."); vmxnet3_deactivate_device(s); vmxnet3_reset_interrupt_states(s); s->drv_shmem = 0; s->tx_sop = true; s->skip_current_tx_pkt = false; }
0
[ "CWE-416" ]
qemu
6c352ca9b4ee3e1e286ea9e8434bd8e69ac7d0d8
309,250,499,134,178,140,000,000,000,000,000,000,000
10
net: vmxnet3: check for device_active before write Vmxnet3 device emulator does not check if the device is active, before using it for write. It leads to a use after free issue, if the vmxnet3_io_bar0_write routine is called after the device is deactivated. Add check to avoid it. Reported-by: Li Qiang <liqiang6-s@360...
respip_operate(struct module_qstate* qstate, enum module_ev event, int id, struct outbound_entry* outbound) { struct respip_qstate* rq = (struct respip_qstate*)qstate->minfo[id]; log_query_info(VERB_QUERY, "respip operate: query", &qstate->qinfo); (void)outbound; if(event == module_event_new || event == module_e...
0
[ "CWE-190" ]
unbound
02080f6b180232f43b77f403d0c038e9360a460f
19,156,283,595,504,810,000,000,000,000,000,000,000
81
- Fix Integer Overflows in Size Calculations, reported by X41 D-Sec.
static void StreamTcp3whsSynAckUpdate(TcpSession *ssn, Packet *p, TcpStateQueue *q) { TcpStateQueue update; if (likely(q == NULL)) { StreamTcp3whsSynAckToStateQueue(p, &update); q = &update; } if (ssn->state != TCP_SYN_RECV) { /* update state */ StreamTcpPacketSetState(p...
0
[]
suricata
50e2b973eeec7172991bf8f544ab06fb782b97df
101,632,680,753,595,190,000,000,000,000,000,000,000
82
stream/tcp: handle RST with MD5 or AO header Special handling for RST packets if they have an TCP MD5 or AO header option. The options hash can't be validated. The end host might be able to validate it, as it can have a key/password that was communicated out of band. The sender could use this to move the TCP state to...
void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __le64 rand, __u8 ltk[16], __u8 key_size) { struct hci_dev *hdev = conn->hdev; struct hci_cp_le_start_enc cp; BT_DBG("hcon %p", conn); memset(&cp, 0, sizeof(cp)); cp.handle = cpu_to_le16(conn->handle); cp.rand = rand; cp.ediv = ediv; memcpy(cp...
0
[ "CWE-327" ]
linux
d5bb334a8e171b262e48f378bd2096c0ea458265
238,496,621,756,452,420,000,000,000,000,000,000,000
17
Bluetooth: Align minimum encryption key size for LE and BR/EDR connections The minimum encryption key size for LE connections is 56 bits and to align LE with BR/EDR, enforce 56 bits of minimum encryption key size for BR/EDR connections as well. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan...
R_API int r_sys_getpid() { #if __UNIX__ return getpid (); #elif __WINDOWS__ return GetCurrentProcessId(); #else #warning r_sys_getpid not implemented for this platform return -1; #endif }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
77,566,649,574,019,960,000,000,000,000,000,000,000
10
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
void Scan::ParseMarker(class ByteStream *io,ScanType type) { LONG len = io->GetWord(); LONG data; int i,j; if (len < 8) JPG_THROW(MALFORMED_STREAM,"Scan::ParseMarker","marker length of the SOS marker invalid, must be at least 8 bytes long"); data = io->Get(); if (data < 1 || data > 4) JPG_THROW(MA...
0
[ "CWE-476" ]
libjpeg
ea6315164b1649ff932a396b7600eac4bffcfaba
300,868,163,574,901,170,000,000,000,000,000,000,000
153
Added a check whether all components in a scan are actually present.
abytereader::abytereader( unsigned char* array, int size ) { cbyte = 0; eof = false; data = array; lbyte = size; if ( ( data == NULL ) || ( lbyte == 0 ) ) eof = true; }
0
[ "CWE-1187" ]
lepton
82167c144a322cc956da45407f6dce8d4303d346
26,414,443,666,845,840,000,000,000,000,000,000,000
11
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
/* kexinit * Send SSH_MSG_KEXINIT packet */ static int kexinit(LIBSSH2_SESSION * session) { /* 62 = packet_type(1) + cookie(16) + first_packet_follows(1) + reserved(4) + length longs(40) */ size_t data_len = 62; size_t kex_len, hostkey_len = 0; size_t crypt_cs_len, crypt_sc_len; size_t comp...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
244,854,001,076,266,800,000,000,000,000,000,000,000
154
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
static int ctnetlink_dump_helpinfo(struct sk_buff *skb, const struct nf_conn *ct) { struct nlattr *nest_helper; const struct nf_conn_help *help = nfct_help(ct); struct nf_conntrack_helper *helper; if (!help) return 0; helper = rcu_dereference(help->helper); if (!helper) goto out; nest_helper = nla_...
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
330,720,418,630,447,600,000,000,000,000,000,000,000
30
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
camel_imapx_server_init (CamelIMAPXServer *is) { is->priv = camel_imapx_server_get_instance_private (is); is->priv->untagged_handlers = create_initial_untagged_handler_table (); g_mutex_init (&is->priv->stream_lock); g_mutex_init (&is->priv->inactivity_timeout_lock); g_mutex_init (&is->priv->select_lock); g_mut...
0
[ "CWE-476" ]
evolution-data-server
2cc39592b532cf0dc994fd3694b8e6bf924c9ab5
79,663,747,162,715,600,000,000,000,000,000,000,000
40
I#189 - Crash on malformed server response with minimal capabilities Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189
rsvg_mask_parse (const RsvgDefs * defs, const char *str) { char *name; name = rsvg_get_url_string (str); if (name) { RsvgNode *val; val = rsvg_defs_lookup (defs, name); g_free (name); if (val && RSVG_NODE_TYPE (val) == RSVG_NODE_TYPE_MASK) return val; } ...
1
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
148,114,678,989,473,180,000,000,000,000,000,000,000
15
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
MagickExport MagickBooleanType SetImageGray(Image *image, ExceptionInfo *exception) { const char *value; ImageType type; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",im...
0
[ "CWE-369" ]
ImageMagick
75f6f5032690077cae3eaeda3c0165cc765eaeb5
239,474,758,314,606,900,000,000,000,000,000,000,000
29
https://github.com/ImageMagick/ImageMagick/issues/3295
void rds_conn_exit(void) { rds_loop_net_exit(); /* unregister pernet callback */ rds_loop_exit(); WARN_ON(!hlist_empty(rds_conn_hash)); kmem_cache_destroy(rds_conn_slab); rds_info_deregister_func(RDS_INFO_CONNECTIONS, rds_conn_info); rds_info_deregister_func(RDS_INFO_SEND_MESSAGES, rds_conn_message_info_s...
0
[ "CWE-401" ]
linux
5f9562ebe710c307adc5f666bf1a2162ee7977c0
268,257,407,475,770,200,000,000,000,000,000,000,000
22
rds: memory leak in __rds_conn_create() __rds_conn_create() did not release conn->c_path when loop_trans != 0 and trans->t_prefer_loopback != 0 and is_outgoing == 0. Fixes: aced3ce57cd3 ("RDS tcp loopback connection can hang") Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Reviewed-by: Sharath Srinivasan <sharath.srini...
static inline int xhci_running(XHCIState *xhci) { return !(xhci->usbsts & USBSTS_HCH) && !xhci->intr[0].er_full; }
0
[ "CWE-835" ]
qemu
96d87bdda3919bb16f754b3d3fd1227e1f38f13c
317,701,687,337,221,640,000,000,000,000,000,000,000
4
xhci: guard xhci_kick_epctx against recursive calls Track xhci_kick_epctx processing being active in a variable. Check the variable before calling xhci_kick_epctx from xhci_kick_ep. Add an assert to make sure we don't call recursively into xhci_kick_epctx. Cc: 1653384@bugs.launchpad.net Fixes: 94b037f2a451b3dc855f9...
box_fill(BOX *result, double x1, double x2, double y1, double y2) { if (x1 > x2) { result->high.x = x1; result->low.x = x2; } else { result->high.x = x2; result->low.x = x1; } if (y1 > y2) { result->high.y = y1; result->low.y = y2; } else { result->high.y = y2; result->low.y = y1; } return...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
122,613,527,826,876,820,000,000,000,000,000,000,000
25
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static void hdr_dump_tokens(struct crypt_device *cd, json_object *hdr_jobj) { char token[16]; json_object *tokens_jobj, *jobj2, *jobj3, *val; const char *tmps; int i, j; log_std(cd, "Tokens:\n"); json_object_object_get_ex(hdr_jobj, "tokens", &tokens_jobj); for (j = 0; j < LUKS2_TOKENS_MAX; j++) { (void) snpr...
0
[ "CWE-787" ]
cryptsetup
52f5cb8cedf22fb3e14c744814ec8af7614146c7
90,920,099,516,960,450,000,000,000,000,000,000,000
29
Check segment gaps regardless of heap space. Segments are validated in hdr_validate_segments. Gaps in segment keys are detected when collecting offsets. But if an invalid segment is very large, larger than count, it could happen that cryptsetup is unable to allocate enough memory, not giving a clue about what actually...
transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) { IndexStmt *index; List *notnullcmds = NIL; ListCell *lc; index = makeNode(IndexStmt); index->unique = (constraint->contype != CONSTR_EXCLUSION); index->primary = (constraint->contype == CONSTR_PRIMARY); if (index->primary) { if...
0
[ "CWE-94" ]
postgres
5579726bd60a6e7afb04a3548bced348cd5ffd89
339,270,859,308,786,960,000,000,000,000,000,000,000
515
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
term_windgoto(int row, int col) { OUT_STR(tgoto((char *)T_CM, col, row)); }
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
196,166,542,437,448,600,000,000,000,000,000,000,000
4
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.
eval7t( char_u **arg, typval_T *rettv, evalarg_T *evalarg, int want_string) // after "." operator { type_T *want_type = NULL; garray_T type_list; // list of pointers to allocated types int res; int evaluate = evalarg == NULL ? 0 : (evalarg->eval_flags & EVAL_EVALUATE); ...
0
[ "CWE-786", "CWE-119", "CWE-787" ]
vim
fe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d
60,380,356,899,097,740,000,000,000,000,000,000,000
73
patch 8.2.4206: condition with many "(" causes a crash Problem: Condition with many "(" causes a crash. Solution: Limit recursion to 1000.
static int idprime_select_index(sc_card_t *card) { int r; sc_file_t *file = NULL; sc_path_t index_path; /* First, we need to make sure the IDPrime AID is selected */ r = idprime_select_idprime(card); if (r != SC_SUCCESS) { LOG_FUNC_RETURN(card->ctx, r); } /* Returns FCI with expected length of data */ sc_f...
0
[]
OpenSC
f015746d22d249642c19674298a18ad824db0ed7
267,875,000,401,251,200,000,000,000,000,000,000,000
25
idprime: Use temporary variable instead of messing up the passed one Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28185
LEX_CSTRING *Field_iterator_table::name() { return &(*ptr)->field_name; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
38,781,654,217,925,315,000,000,000,000,000,000,000
4
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.
TEST_F(RouterTest, NoHost) { EXPECT_CALL(cm_.thread_local_cluster_, httpConnPool(_, _, _)).WillOnce(Return(absl::nullopt)); Http::TestResponseHeaderMapImpl response_headers{ {":status", "503"}, {"content-length", "19"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualR...
0
[ "CWE-703" ]
envoy
f0bb2219112d8cdb4c4e8b346834f962925362ca
162,978,912,220,365,500,000,000,000,000,000,000,000
21
[1.20] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
qf_buf_add_line( buf_T *buf, // quickfix window buffer linenr_T lnum, qfline_T *qfp, char_u *dirname, int first_bufline, char_u *qftf_str) { int len; buf_T *errbuf; // If the 'quickfixtextfunc' function returned a non-empty custom string // for this entry, then use it. if (qftf_str != N...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
293,575,758,602,108,780,000,000,000,000,000,000,000
83
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) { struct sock *rsk; #ifdef CONFIG_TCP_MD5SIG /* * We really want to reject the packet as early as possible * if: * o We're expecting an MD5'd packet and this is no MD5 tcp option * o There is an MD5 option and we're not expecting one */ if (tcp_v4_i...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
31,118,394,879,738,560,000,000,000,000,000,000,000
70
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...
ves_icall_System_GCHandle_GetTargetHandle (MonoObject *obj, guint32 handle, gint32 type) { if (type == -1) { mono_gchandle_set_target (handle, obj); /* the handle doesn't change */ return handle; } switch (type) { case HANDLE_WEAK: return mono_gchandle_new_weakref (obj, FALSE); case HANDLE_WEAK_TRACK: re...
0
[ "CWE-399", "CWE-264" ]
mono
8eb1189099e02372fd45ca1c67230eccf1edddc0
19,802,510,233,537,136,000,000,000,000,000,000,000
21
Implement a reference queue API. * gc.c: A reference queue allows one to queue callbcks for when objects are collected. It allows for safe cleanup of objects that can only be done when it is effectively collected. The major difference with regular finalization is that the collector makes sure the object was col...
int usb_reset_configuration(struct usb_device *dev) { int i, retval; struct usb_host_config *config; struct usb_hcd *hcd = bus_to_hcd(dev->bus); if (dev->state == USB_STATE_SUSPENDED) return -EHOSTUNREACH; /* caller must have locked the device and must own * the usb bus readlock (so driver bindings are sta...
0
[ "CWE-416" ]
linux
056ad39ee9253873522f6469c3364964a322912b
154,545,033,988,545,570,000,000,000,000,000,000,000
100
USB: core: Fix free-while-in-use bug in the USB S-Glibrary FuzzUSB (a variant of syzkaller) found a free-while-still-in-use bug in the USB scatter-gather library: BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:26 [inline] BUG: KASAN: use-after-free in usb_hcd_unlink_urb+0x5f/0x170...
int elv_register_queue(struct request_queue *q) { struct elevator_queue *e = q->elevator; int error; lockdep_assert_held(&q->sysfs_lock); error = kobject_add(&e->kobj, &q->kobj, "%s", "iosched"); if (!error) { struct elv_fs_entry *attr = e->type->elevator_attrs; if (attr) { while (attr->attr.name) { i...
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
68,063,351,114,675,800,000,000,000,000,000,000,000
22
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
static void sdma_set_state(struct sdma_engine *sde, enum sdma_states next_state) { struct sdma_state *ss = &sde->state; const struct sdma_set_state_action *action = sdma_action_table; unsigned op = 0; trace_hfi1_sdma_state( sde, sdma_state_names[ss->current_state], sdma_state_names[next_state]); /* d...
0
[ "CWE-400", "CWE-401" ]
linux
34b3be18a04ecdc610aae4c48e5d1b799d8689f6
271,708,105,758,293,450,000,000,000,000,000,000,000
42
RDMA/hfi1: Prevent memory leak in sdma_init In sdma_init if rhashtable_init fails the allocated memory for tmp_sdma_rht should be released. Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable") Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com Signed-off-by: ...
static int put_v4l2_edid32(struct v4l2_edid *kp, struct v4l2_edid32 __user *up) { u32 tmp = (u32)((unsigned long)kp->edid); if (!access_ok(VERIFY_WRITE, up, sizeof(*up)) || put_user(kp->pad, &up->pad) || put_user(kp->start_block, &up->start_block) || put_user(kp->blocks, &up->blocks) || put_user(...
1
[ "CWE-787" ]
linux
a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a
36,453,307,361,117,840,000,000,000,000,000,000,000
13
media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit ioctl in user space memory which is commonly allocated using compat...
void kvm_mmu_uninit_vm(struct kvm *kvm) { struct kvm_page_track_notifier_node *node = &kvm->arch.mmu_sp_tracker; kvm_page_track_unregister_notifier(kvm, node); kvm_mmu_uninit_tdp_mmu(kvm); }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
104,267,860,106,068,730,000,000,000,000,000,000,000
8
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
Cluster::Cluster(Segment* pSegment, long idx, long long element_start /* long long element_size */) : m_pSegment(pSegment), m_element_start(element_start), m_index(idx), m_pos(element_start), m_element_size(-1 /* element_size */), m_timecode(-1), m_entries(NULL),...
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
236,760,750,946,468,670,000,000,000,000,000,000,000
12
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
e_ews_config_lookup_result_init (EEwsConfigLookupResult *ews_result) { }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
147,295,311,056,358,950,000,000,000,000,000,000,000
3
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
static unsigned int selinux_ip_postroute_compat(struct sk_buff *skb, int ifindex, u16 family) { struct sock *sk = skb_to_full_sk(skb); struct sk_security_struct *sksec; struct common_audit_data ad; struct lsm_network_audit net = {0,}; char *addrp; u8 proto; if (sk == NULL) return NF_ACCEPT; sksec...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
144,398,370,469,481,490,000,000,000,000,000,000,000
33
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
_functor4d_streamline_expr(const char *const expr):mp(0) { mp = new _cimg_math_parser(expr,"streamline",CImg<T>::const_empty(),0); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
255,808,253,808,108,420,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static inline int chkmask(u128_t v) { /* this is sort of specialized */ int i; u128_t m = u128_lit(~0ULL, ~0ULL); for(i = 0; i < 129; i++) { if(u128_cmp(v, m) == 0) return 1; m = u128_lsh(m, 1); } return 0; }
0
[]
netmask
29a9c239bd1008363f5b34ffd6c2cef906f3660c
131,765,480,860,154,460,000,000,000,000,000,000,000
12
bump version to 2.4.4 * remove checks for negative unsigned ints, fixes #2 * harden error logging functions, fixes #3
static inline struct file *io_file_from_index(struct io_ring_ctx *ctx, int index) { struct fixed_rsrc_table *table; table = &ctx->file_data->table[index >> IORING_FILE_TABLE_SHIFT]; return table->files[index & IORING_FILE_TABLE_MASK];
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
105,249,636,896,554,870,000,000,000,000,000,000,000
8
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
MagickExport MagickBooleanType FileToImage(Image *image,const char *filename, ExceptionInfo *exception) { int file; MagickBooleanType status; size_t length, quantum; ssize_t count; struct stat file_stats; unsigned char *blob; assert(image != (const Image *) NULL); ass...
0
[ "CWE-416", "CWE-399" ]
ImageMagick
c5d012a46ae22be9444326aa37969a3f75daa3ba
180,129,729,115,116,500,000,000,000,000,000,000,000
76
https://github.com/ImageMagick/ImageMagick6/issues/43
static int parse_source (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) { char path[_POSIX_PATH_MAX]; if (mutt_extract_token (tmp, s, 0) != 0) { snprintf (err->data, err->dsize, _("source: error at %s"), s->dptr); return (-1); } if (MoreArgs (s)) { strfcpy (err->data, _("source: too m...
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
203,494,858,034,451,280,000,000,000,000,000,000,000
18
use a 64-bit random value in temporary filenames. closes #3158
void RateTransposer::setChannels(int nChannels) { if (!verifyNumberOfChannels(nChannels) || (pTransposer->numChannels == nChannels)) return; pTransposer->setChannels(nChannels); inputBuffer.setChannels(nChannels); midBuffer.setChannels(nChannels); outputBuffer.setChannels(nChannels)...
0
[ "CWE-617" ]
soundtouch
107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260
213,132,112,961,356,320,000,000,000,000,000,000,000
10
Replaced illegal-number-of-channel assertions with run-time exception
eval_clear(void) { evalvars_clear(); free_scriptnames(); // must come after evalvars_clear(). free_locales(); // autoloaded script names free_autoload_scriptnames(); // unreferenced lists and dicts (void)garbage_collect(FALSE); // functions not garbage collected free_all_function...
0
[ "CWE-122", "CWE-787" ]
vim
605ec91e5a7330d61be313637e495fa02a6dc264
311,053,023,373,936,280,000,000,000,000,000,000,000
15
patch 8.2.3847: illegal memory access when using a lambda with an error Problem: Illegal memory access when using a lambda with an error. Solution: Avoid skipping over the NUL after a string.
buffer_append_asn1_length(buffer_t *buf, unsigned int length) { if (length < 0x80) { buffer_append_c(buf, length); } else if (length < 0x100) { buffer_append_c(buf, 0x81); buffer_append_c(buf, length); } else { buffer_append_c(buf, 0x82); buffer_append_c(buf, length >> 8); buffer_append_c(buf, length & 0...
0
[ "CWE-125" ]
core
69ad3c902ea4bbf9f21ab1857d8923f975dc6145
33,549,457,946,871,884,000,000,000,000,000,000,000
13
auth: mech-rpa - Fail on zero len buffer
static apr_status_t modsecurity_process_phase_logging(modsec_rec *msr) { apr_time_t time_before, time_after; if (msr->txcfg->debuglog_level >= 4) { msr_log(msr, 4, "Starting phase LOGGING."); } time_before = apr_time_now(); if (msr->txcfg->ruleset != NULL) { msre_ruleset_p...
0
[ "CWE-703", "CWE-264" ]
ModSecurity
f8d441cd25172fdfe5b613442fedfc0da3cc333d
306,386,848,110,656,750,000,000,000,000,000,000,000
80
Fix Chunked string case sensitive issue - CVE-2013-5705
static void ttusb_dec_exit_rc(struct ttusb_dec *dec) { dprintk("%s\n", __func__); if (dec->rc_input_dev) { input_unregister_device(dec->rc_input_dev); dec->rc_input_dev = NULL; } }
0
[ "CWE-772" ]
linux
a10feaf8c464c3f9cfdd3a8a7ce17e1c0d498da1
194,486,789,501,117,400,000,000,000,000,000,000,000
9
media: ttusb-dec: Fix info-leak in ttusb_dec_send_command() The function at issue does not always initialize each byte allocated for 'b' and can therefore leak uninitialized memory to a USB device in the call to usb_bulk_msg() Use kzalloc() instead of kmalloc() Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com> R...
set_last_error (GSocketClientAsyncConnectData *data, GError *error) { g_clear_error (&data->last_error); data->last_error = error; }
0
[ "CWE-754" ]
glib
d553d92d6e9f53cbe5a34166fcb919ba652c6a8e
115,765,238,603,183,000,000,000,000,000,000,000,000
6
gsocketclient: Fix criticals This ensures the parent GTask is kept alive as long as an enumeration is running and trying to connect. Closes #1646 Closes #1649
void clear_locked() { locked = false; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
25,291,851,287,541,666,000,000,000,000,000,000,000
3
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
char *realpath_as_user(const char *fname) { assert(fname); int called_as_root = 0; if (geteuid() == 0) called_as_root = 1; if (called_as_root) EUID_USER(); char *rv = realpath(fname, NULL); if (called_as_root) EUID_ROOT(); return rv; }
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
24,336,355,471,692,670,000,000,000,000,000,000,000
17
fixing CVE-2022-31214
wkbConvCollectionToShape(wkbObj *w, shapeObj *shape) { int i, ncomponents; int failures = 0; /*endian = */wkbReadChar(w); /*type = */wkbTypeMap(w,wkbReadInt(w)); ncomponents = wkbReadInt(w); /* * If we can draw any portion of the collection, we will, * but if all the components fail, we will draw noth...
0
[ "CWE-89" ]
mapserver
3a10f6b829297dae63492a8c63385044bc6953ed
335,835,745,069,825,700,000,000,000,000,000,000,000
24
Fix potential SQL Injection with postgis TIME filters (#4834)
PrincipalSet::NameIterator AuthorizationSession::getAuthenticatedPrincipalNames() { return _authenticatedPrincipals.getNames(); }
0
[ "CWE-264" ]
mongo
c5ad04549e40b1069029026081d9324e9e06156c
259,180,849,502,912,660,000,000,000,000,000,000,000
3
SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user. Uncorrected, this can cause replica set heartbeats to stall behind operations that hold the read lock for a long time.
evbuffer_search_eol(struct evbuffer *buffer, struct evbuffer_ptr *start, size_t *eol_len_out, enum evbuffer_eol_style eol_style) { struct evbuffer_ptr it, it2; size_t extra_drain = 0; int ok = 0; /* Avoid locking in trivial edge cases */ if (start && start->internal_.chain == NULL) { PTR_NOT_FOUND(&it);...
0
[ "CWE-189" ]
libevent
841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4
25,823,348,141,275,484,000,000,000,000,000,000,000
88
Fix CVE-2014-6272 in Libevent 2.1 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
remove_const(JOIN *join,ORDER *first_order, COND *cond, bool change_list, bool *simple_order) { *simple_order= join->rollup.state == ROLLUP::STATE_NONE; if (join->only_const_tables()) return change_list ? 0 : first_order; // No need to sort ORDER *order,**prev_ptr, *tmp_order; table_map UNINI...
0
[]
server
8c34eab9688b4face54f15f89f5d62bdfd93b8a7
191,967,684,480,033,200,000,000,000,000,000,000,000
219
MDEV-28094 Window function in expression in ORDER BY call item->split_sum_func() in setup_order() just as it's done in setup_fields()
static inline struct deferred_split *get_deferred_split_queue(struct page *page) { struct pglist_data *pgdat = NODE_DATA(page_to_nid(page)); return &pgdat->deferred_split_queue; }
0
[ "CWE-362" ]
linux
c444eb564fb16645c172d550359cb3d75fe8a040
38,811,051,973,311,140,000,000,000,000,000,000,000
6
mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked() Write protect anon page faults require an accurate mapcount to decide if to break the COW or not. This is implemented in the THP path with reuse_swap_page() -> page_trans_huge_map_swapcount()/page_trans_huge_mapcount(). If the COW triggers while ...