func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt, xmlSAXHandlerPtr sax, void *user_data, int depth, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *list) { xmlParserCtxtPtr ctxt; xmlDocPtr newDoc; xmlNodePtr newRoot; xmlSAXHandlerPtr oldsax = NULL; ...
0
[ "CWE-119" ]
libxml2
6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d
191,609,625,230,844,000,000,000,000,000,000,000,000
187
Fix potential out of bound access
static inline int pi_test_sn(struct pi_desc *pi_desc) { return test_bit(POSTED_INTR_SN, (unsigned long *)&pi_desc->control); }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
309,063,377,730,402,020,000,000,000,000,000,000,000
5
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
static int rsi_mac80211_start(struct ieee80211_hw *hw) { struct rsi_hw *adapter = hw->priv; struct rsi_common *common = adapter->priv; rsi_dbg(ERR_ZONE, "===> Interface UP <===\n"); mutex_lock(&common->mutex); if (common->hibernate_resume) { common->reinit_hw = true; adapter->host_intf_ops->reinit_device(adap...
0
[ "CWE-416" ]
linux
abd39c6ded9db53aa44c2540092bdd5fb6590fa8
279,781,368,071,047,750,000,000,000,000,000,000,000
19
rsi: add fix for crash during assertions Observed crash in some scenarios when assertion has occurred, this is because hw structure is freed and is tried to get accessed in some functions where null check is already present. So, avoided the crash by making the hw to NULL after freeing. Signed-off-by: Sanjay Konduri <...
Error HeifContext::decode_full_grid_image(heif_item_id ID, std::shared_ptr<HeifPixelImage>& img, const std::vector<uint8_t>& grid_data) const { ImageGrid grid; Error err = grid.parse(grid_data); if (err) { return err; } //...
0
[ "CWE-125" ]
libheif
f7399b62d7fbc596f1b2871578c1d2053bedf1dd
233,847,878,654,524,200,000,000,000,000,000,000,000
192
Handle case where referenced "iref" box doesn't exist (fixes #138).
static int dwc3_alloc_trb_pool(struct dwc3_ep *dep) { struct dwc3 *dwc = dep->dwc; if (dep->trb_pool) return 0; dep->trb_pool = dma_alloc_coherent(dwc->sysdev, sizeof(struct dwc3_trb) * DWC3_TRB_NUM, &dep->trb_pool_dma, GFP_KERNEL); if (!dep->trb_pool) { dev_err(dep->dwc->dev, "failed to allocate trb p...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
84,587,602,195,140,900,000,000,000,000,000,000,000
18
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
safi2str (safi_t safi) { if (safi == SAFI_UNICAST) return "SAFI_UNICAST"; else if (safi == SAFI_MULTICAST) return "SAFI_MULTICAST"; else if (safi == SAFI_MPLS_VPN || safi == BGP_SAFI_VPNV4) return "SAFI_MPLS_VPN"; else return "Unknown SAFI"; }
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
104,242,059,008,842,130,000,000,000,000,000,000,000
11
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
DEFUN_DEPRECATED (neighbor_capability_route_refresh, neighbor_capability_route_refresh_cmd, NEIGHBOR_CMD2 "capability route-refresh", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Advertise capability to the peer\n" "Advertise route-refresh capability to this neighbor\n") { return CMD_SUCCESS; }
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
47,390,995,618,443,100,000,000,000,000,000,000,000
10
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static CharDriverState *qemu_chr_open_pty(const char *id, ChardevBackend *backend, ChardevReturn *ret, Error **errp) { CharDriverState *chr; PtyCharDriver *s; int master_fd, slave_fd...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
40,064,737,607,453,042,000,000,000,000,000,000,000
46
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static int io_poll_add_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_poll_iocb *poll = &req->poll; u32 events; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; if (sqe->addr || sqe->ioprio || sqe->off || sqe->len || sqe->buf_index) return -EINVAL; if (!poll->file) ...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
159,099,909,586,755,400,000,000,000,000,000,000,000
20
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static int burl_normalize_2F_to_slash_fix (buffer *b, int qs, int i) { char * const s = b->ptr; const int blen = (int)buffer_string_length(b); const int used = qs < 0 ? blen : qs; int j = i; for (; i < used; ++i, ++j) { s[j] = s[i]; if (s[i] == '%' && s[i+1] == '2' && s[i+2] == 'F') ...
0
[ "CWE-190" ]
lighttpd1.4
32120d5b8b3203fc21ccb9eafb0eaf824bb59354
187,686,011,361,100,100,000,000,000,000,000,000,000
22
[core] fix abort in http-parseopts (fixes #2945) fix abort in server.http-parseopts with url-path-2f-decode enabled (thx stze) x-ref: "Security - SIGABRT during GET request handling with url-path-2f-decode enabled" https://redmine.lighttpd.net/issues/2945
GF_Err mhap_box_dump(GF_Box *a, FILE * trace) { u32 i; GF_MHACompatibleProfilesBox *p = (GF_MHACompatibleProfilesBox *) a; gf_isom_box_dump_start(a, "MHACompatibleProfilesBox", trace); gf_fprintf(trace, "compatible_profiles=\""); for (i=0; i<p->num_profiles; i++) { if (i) gf_fprintf(trace, " ", p->compat_pro...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
323,288,444,694,698,840,000,000,000,000,000,000,000
16
fixed #2138
static bool kvm_msr_ignored_check(u32 msr, u64 data, bool write) { const char *op = write ? "wrmsr" : "rdmsr"; if (ignore_msrs) { if (report_ignored_msrs) kvm_pr_unimpl("ignored %s: 0x%x data 0x%llx\n", op, msr, data); /* Mask the error */ return true; } else { kvm_debug_ratelimited("unhandled ...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
240,601,197,518,494,350,000,000,000,000,000,000,000
16
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct bsg_device *bd = file->private_data; int __user *uarg = (int __user *) arg; int ret; switch (cmd) { /* * our own ioctls */ case SG_GET_COMMAND_Q: return put_user(bd->max_queue, uarg); case SG_SET_COMMAND_Q: { int q...
0
[ "CWE-416", "CWE-787" ]
linux
128394eff343fc6d2f32172f03e24829539c5835
294,588,277,350,646,500,000,000,000,000,000,000,000
79
sg_write()/bsg_write() is not fit to be called under KERNEL_DS Both damn things interpret userland pointers embedded into the payload; worse, they are actually traversing those. Leaving aside the bad API design, this is very much _not_ safe to call with KERNEL_DS. Bail out early if that happens. Cc: stable@vger.kern...
int TS_RESP_CTX_set_status_info_cond(TS_RESP_CTX *ctx, int status, const char *text) { int ret = 1; TS_STATUS_INFO *si = TS_RESP_get_status_info(ctx->response); if (ASN1_INTEGER_get(si->status) == TS_STATUS_GRANTED) { /* Status has not been set, set it now. */ ret = TS_RESP_CTX_set_status_info(ctx,...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
172,962,992,517,063,700,000,000,000,000,000,000,000
13
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
static int check_memory_region_flags(const struct kvm_userspace_memory_region *mem) { u32 valid_flags = KVM_MEM_LOG_DIRTY_PAGES; #ifdef __KVM_HAVE_READONLY_MEM valid_flags |= KVM_MEM_READONLY; #endif if (mem->flags & ~valid_flags) return -EINVAL; return 0;
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
227,079,651,034,811,560,000,000,000,000,000,000,000
13
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
ecma_compare_ecma_non_direct_strings (const ecma_string_t *string1_p, /**< ecma-string */ const ecma_string_t *string2_p) /**< ecma-string */ { JERRY_ASSERT (string1_p != NULL && string2_p != NULL); JERRY_ASSERT (!ECMA_IS_DIRECT_STRING (string1_p) && !ECMA_IS_DIRECT_STRING (str...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
4,171,566,490,898,957,600,000,000,000,000,000,000
24
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 int append_key_value(smart_str* loc_name, HashTable* hash_arr, char* key_name) { zval** ele_value = NULL; if(zend_hash_find(hash_arr , key_name , strlen(key_name) + 1 ,(void **)&ele_value ) == SUCCESS ) { if(Z_TYPE_PP(ele_value)!= IS_STRING ){ /* element value is not a string */ return FAILURE; } ...
0
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
68,428,022,208,103,480,000,000,000,000,000,000,000
20
Fix bug #72241: get_icu_value_internal out-of-bounds read
poppler_index_iter_free (PopplerIndexIter *iter) { if (G_UNLIKELY (iter == nullptr)) return; g_object_unref (iter->document); g_slice_free (PopplerIndexIter, iter); }
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
203,831,131,922,725,870,000,000,000,000,000,000,000
8
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
usm_malloc_usmStateReference(void) { struct usmStateReference *retval = (struct usmStateReference *) calloc(1, sizeof(struct usmStateReference)); return retval; } /* end usm_malloc_usmStateReference() */
1
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
252,456,726,548,685,700,000,000,000,000,000,000,000
7
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
void ip6_input(struct mbuf *m) { struct ip6 *ip6; Slirp *slirp = m->slirp; if (!slirp->in6_enabled) { goto bad; } DEBUG_CALL("ip6_input"); DEBUG_ARG("m = %p", m); DEBUG_ARG("m_len = %d", m->m_len); if (m->m_len < sizeof(struct ip6)) { goto bad; } ip6 = mtod(m,...
0
[ "CWE-125" ]
libslirp
c7ede54cbd2e2b25385325600958ba0124e31cc0
293,630,383,757,747,000,000,000,000,000,000,000,000
62
Drop bogus IPv6 messages Drop IPv6 message shorter than what's mentioned in the payload length header (+ the size of the IPv6 header). They're invalid an could lead to data leakage in icmp6_send_echoreply().
static void start_interleave_scan(struct hci_dev *hdev) { hdev->interleave_scan_state = INTERLEAVE_SCAN_NO_FILTER; queue_delayed_work(hdev->req_workqueue, &hdev->interleave_scan, 0); }
0
[ "CWE-362" ]
linux
e2cb6b891ad2b8caa9131e3be70f45243df82a80
177,960,447,555,542,870,000,000,000,000,000,000,000
6
bluetooth: eliminate the potential race condition when removing the HCI controller There is a possible race condition vulnerability between issuing a HCI command and removing the cont. Specifically, functions hci_req_sync() and hci_dev_do_close() can race each other like below: thread-A in hci_req_sync() | th...
bool Field::validate_value_in_record_with_warn(THD *thd, const uchar *record) { MY_BITMAP *old_map= dbug_tmp_use_all_columns(table, &table->read_set); bool rc; if ((rc= validate_value_in_record(thd, record))) { // Get and report val_str() for the DEFAULT value StringBuffer<MAX_FIELD_WIDTH> tmp; va...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
181,234,500,178,763,250,000,000,000,000,000,000,000
17
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...
static int slim_tx_mixer_put(struct snd_kcontrol *kc, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_widget(kc); struct wcd9335_codec *wcd = dev_get_drvdata(widget->dapm->dev); struct snd_soc_dapm_update *update = NULL; struct soc_mixer_control *mixer = ...
0
[]
sound
a54988113985ca22e414e132054f234fc8a92604
292,276,125,266,255,140,000,000,000,000,000,000,000
36
wcd9335: fix a incorrect use of kstrndup() In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup(). However, according to doc: "Note: Use kmemdup_nul() instead if the size is known exactly." So we should use kmemdup_nul() here instead of kstrndup(). Signed-off-by: Gen Zhang <blackgod016574@gmail.com> ...
bool HaarEvaluator::Feature::read(const FileNode& node, const Size& origWinSize) { FileNode rnode = node[CC_RECTS]; FileNodeIterator it = rnode.begin(), it_end = rnode.end(); int ri; for( ri = 0; ri < RECT_NUM; ri++ ) { rect[ri].r = Rect(); rect[ri].weight = 0.f; } const in...
0
[ "CWE-125" ]
opencv
321c74ccd6077bdea1d47450ca4fe955cb5b6330
337,116,207,986,759,150,000,000,000,000,000,000,000
34
objdetect: validate feature rectangle on reading
CURLcode smtp_regular_transfer(struct connectdata *conn, bool *dophase_done) { CURLcode result = CURLE_OK; bool connected = FALSE; struct SessionHandle *data = conn->data; data->req.size = -1; /* make sure this is unknown at this point */ Curl_pgrsSetUploadCounter(data, 0); C...
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
212,028,820,872,341,000,000,000,000,000,000,000,000
30
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
CImg<T>& operator|=(const CImg<t>& img) { const ulongT siz = size(), isiz = img.size(); if (siz && isiz) { if (is_overlapped(img)) return *this|=+img; T *ptrd = _data, *const ptre = _data + siz; if (siz>isiz) for (ulongT n = siz/isiz; n; --n) for (const t *ptrs = img._d...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
276,871,334,336,246,400,000,000,000,000,000,000,000
12
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
u32 gf_opus_check_frame(GF_OpusParser *op, u8 *data, u32 data_length) { u32 block_size; if (!memcmp(data, "OpusHead", sizeof(char)*8)) return 0; if (!memcmp(data, "OpusTags", sizeof(char)*8)) return 0; /*consider the whole packet as Ogg packets and ISOBMFF samples for Opus are framed similarly*/ static const...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
41,644,507,985,059,810,000,000,000,000,000,000,000
28
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
virtual GBool useTilingPatternFill() { return gTrue; }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
8,776,801,547,643,856,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static void call_trans2findnext(connection_struct *conn, struct smb_request *req, char **pparams, int total_params, char **ppdata, int total_data, unsigned int max_data_bytes) { /* We must be careful here that we don't return more than the allowed number of data bytes. If this means returning fewer t...
0
[ "CWE-787" ]
samba
22b4091924977f6437b59627f33a8e6f02b41011
231,181,105,897,295,200,000,000,000,000,000,000,000
354
CVE-2021-44142: smbd: add Netatalk xattr used by vfs_fruit to the list of private Samba xattrs This is an internal xattr that should not be user visible. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
int __dev_change_flags(struct net_device *dev, unsigned int flags) { unsigned int old_flags = dev->flags; int ret; ASSERT_RTNL(); /* * Set the flags on our device. */ dev->flags = (flags & (IFF_DEBUG | IFF_NOTRAILERS | IFF_NOARP | IFF_DYNAMIC | IFF_MULTICAST | IFF_PORTSEL | IFF_AUTOMEDI...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
66,658,542,023,240,270,000,000,000,000,000,000,000
64
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) { unsigned int i; png_debug(1, "in png_handle_eXIf"); if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) png_chunk_error(png_ptr, "missing IHDR"); else if (info_ptr == NULL || (info_ptr->valid & PNG_INFO_eXIf) != 0) { pn...
0
[ "CWE-369" ]
libpng
2dca15686fadb1b8951cb29b02bad4cae73448da
318,152,680,639,409,800,000,000,000,000,000,000,000
42
[libpng16] Moved chunk-length check into a png_check_chunk_length() private function (Suggested by Max Stepin).
void Monitor::do_admin_command(string command, cmdmap_t& cmdmap, string format, ostream& ss) { Mutex::Locker l(lock); boost::scoped_ptr<Formatter> f(Formatter::create(format)); string args; for (cmdmap_t::iterator p = cmdmap.begin(); p != cmdmap.end(); ++p) { if (p->first == "prefix") ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
261,454,673,732,902,870,000,000,000,000,000,000,000
88
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
XML_ParserCreate_MM(const XML_Char *encodingName, const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep) { return parserCreate(encodingName, memsuite, nameSep, NULL); }
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
269,064,608,934,770,960,000,000,000,000,000,000,000
5
xmlparse.c: Deny internal entities closing the doctype
ctnetlink_parse_expect_nat(const struct nlattr *attr, struct nf_conntrack_expect *exp, u_int8_t u3) { #if IS_ENABLED(CONFIG_NF_NAT) struct nlattr *tb[CTA_EXPECT_NAT_MAX+1]; struct nf_conntrack_tuple nat_tuple = {}; int err; err = nla_parse_nested_deprecated(tb, CTA_EXPECT_NAT_MAX, attr, exp_nat_...
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
208,197,333,207,879,140,000,000,000,000,000,000,000
32
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 ...
static ULONG ntlm_av_pair_list_size(ULONG AvPairsCount, ULONG AvPairsValueLength) { /* size of headers + value lengths + terminating MsvAvEOL AV_PAIR */ return ((AvPairsCount + 1) * 4) + AvPairsValueLength; }
0
[ "CWE-190", "CWE-125" ]
FreeRDP
58a3122250d54de3a944c487776bcd4d1da4721e
262,581,147,792,643,500,000,000,000,000,000,000,000
5
Fixed OOB read in ntlm_av_pair_get CVE-2020-11097 thanks to @antonio-morales for finding this.
long do_fork(unsigned long clone_flags, unsigned long stack_start, unsigned long stack_size, int __user *parent_tidptr, int __user *child_tidptr) { struct task_struct *p; int trace = 0; long nr; /* * Do some preliminary argument and permissions checking before we * actually start al...
0
[ "CWE-284", "CWE-264" ]
linux
e66eded8309ebf679d3d3c1f5820d1f2ca332c71
322,507,167,297,333,950,000,000,000,000,000,000,000
74
userns: Don't allow CLONE_NEWUSER | CLONE_FS Don't allowing sharing the root directory with processes in a different user namespace. There doesn't seem to be any point, and to allow it would require the overhead of putting a user namespace reference in fs_struct (for permission checks) and incrementing that reference...
static void php_mysqlnd_rset_header_free_mem(void * _packet) { MYSQLND_PACKET_RSET_HEADER *p= (MYSQLND_PACKET_RSET_HEADER *) _packet; DBG_ENTER("php_mysqlnd_rset_header_free_mem"); if (p->info_or_local_file.s) { mnd_efree(p->info_or_local_file.s); p->info_or_local_file.s = NULL; } DBG_VOID_RETURN;
0
[ "CWE-120" ]
php-src
58006537fc5f133ae8549efe5118cde418b3ace9
339,135,215,298,109,670,000,000,000,000,000,000,000
10
Fix bug #81719: mysqlnd/pdo password buffer overflow
do_mount_all (char *types, char *options, char *test_opts) { struct mntentchn *mc, *mc0, *mtmp; int status = 0; struct stat statbuf; struct child { pid_t pid; char *group; struct mntentchn *mec; struct mntentchn *meclast; struct child *nxt; } childhead, *childtail, *cp; char major[22]; char *g, *colon;...
0
[ "CWE-200" ]
util-linux
0377ef91270d06592a0d4dd009c29e7b1ff9c9b8
312,025,757,331,734,340,000,000,000,000,000,000,000
117
mount: (deprecated) drop --guess-fstype The option is undocumented and unnecessary. Signed-off-by: Karel Zak <kzak@redhat.com>
int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { int ret; ret = EVP_DecryptFinal_ex(ctx, out, outl); return ret; }
0
[ "CWE-189" ]
openssl
3f3582139fbb259a1c3cbb0a25236500a409bf26
54,251,663,051,169,000,000,000,000,000,000,000,000
6
Fix encrypt overflow An overflow can occur in the EVP_EncryptUpdate function. If an attacker is able to supply very large amounts of input data after a previous call to EVP_EncryptUpdate with a partial block then a length check can overflow resulting in a heap corruption. Following an analysis of all OpenSSL internal...
ZEND_VM_COLD_CONSTCONST_HANDLER(81, ZEND_FETCH_DIM_R, CONST|TMPVAR|CV, CONST|TMPVAR|CV) { USE_OPLINE zend_free_op free_op1, free_op2; zval *container, *dim, *value; SAVE_OPLINE(); container = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); dim = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); if (OP1_TYPE != IS_CONST) { if (EXPECTED(Z_T...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
280,576,918,036,223,130,000,000,000,000,000,000,000
35
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
archive_string_ensure(struct archive_string *as, size_t s) { char *p; size_t new_length; /* If buffer is already big enough, don't reallocate. */ if (as->s && (s <= as->buffer_length)) return (as); /* * Growing the buffer at least exponentially ensures that * append operations are always linear in the numb...
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
337,736,966,831,619,700,000,000,000,000,000,000,000
53
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
QPDF_Array::QPDF_Array(std::vector<QPDFObjectHandle> const& items) : items(items) { }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
154,715,597,691,774,010,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
iso9660_free(struct archive_write *a) { struct iso9660 *iso9660; int i, ret; iso9660 = a->format_data; /* Close the temporary file. */ if (iso9660->temp_fd >= 0) close(iso9660->temp_fd); /* Free some stuff for zisofs operations. */ ret = zisofs_free(a); /* Remove directory entries in tree which includes f...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
28,140,132,206,765,184,000,000,000,000,000,000,000
50
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
e_book_backend_ews_dispose (GObject *object) { EBookBackendEws *bbews = E_BOOK_BACKEND_EWS (object); g_rec_mutex_lock (&bbews->priv->cnc_lock); g_clear_object (&bbews->priv->cnc); g_rec_mutex_unlock (&bbews->priv->cnc_lock); /* Chain up to parent's method. */ G_OBJECT_CLASS (e_book_backend_ews_parent_class)->...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
38,458,780,330,065,350,000,000,000,000,000,000,000
13
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
inline double rand(const double val_max=1) { cimg::mutex(4); const double res = cimg::rand(val_max,&cimg::rng()); cimg::mutex(4,0); return res;
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
29,912,625,700,481,400,000,000,000,000,000,000,000
6
.
static int write_locked_table_maps(THD *thd) { DBUG_ENTER("write_locked_table_maps"); DBUG_PRINT("enter", ("thd:%p thd->lock:%p " "thd->extra_lock: %p", thd, thd->lock, thd->extra_lock)); DBUG_PRINT("debug", ("get_binlog_table_maps(): %d", thd->get_binlog_table_maps...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
79,961,203,262,571,760,000,000,000,000,000,000,000
61
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
icmp6_rrenum_print(netdissect_options *ndo, const u_char *bp, const u_char *ep) { const struct icmp6_router_renum *rr6; const char *cp; const struct rr_pco_match *match; const struct rr_pco_use *use; char hbuf[NI_MAXHOST]; int n; if (ep < bp) return; rr6 = (const struct icmp6_router_renum *)bp; cp = (const ...
1
[ "CWE-125" ]
tcpdump
d7505276842e85bfd067fa21cdb32b8a2dc3c5e4
80,939,754,022,813,290,000,000,000,000,000,000,000
133
(for 4.9.3) CVE-2018-14882/ICMP6 RPL: Add a missing bounds check Moreover: Add and use *_tstr[] strings. Update four tests outputs accordingly. Fix a space. Wang Junjie of 360 ESG Codesafe Team had independently identified this vulnerability in 2018 by means of fuzzing and provided the packet capture file for the tes...
int ip_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, struct ipcm_cookie *ipc, struct rtable **rtp, unsigned int flags) { struct inet_sock *inet = inet_sk(sk); int err; if (flag...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
100,168,039,369,563,180,000,000,000,000,000,000,000
24
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
utf32le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end) { const UChar* p = *pp; (*pp) += 4; if (*(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) { int c, v; if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { return TRUE; } c = *p; v = ONIGE...
0
[ "CWE-125" ]
php-src
9d6c59eeea88a3e9d7039cb4fed5126ef704593a
190,736,733,577,470,700,000,000,000,000,000,000,000
28
Fix bug #77418 - Heap overflow in utf32be_mbc_to_code
template<typename t> CImg<T>& operator|=(const t value) { if (is_empty()) return *this; cimg_pragma_openmp(parallel for cimg_openmp_if(size()>=32768)) cimg_rof(*this,ptrd,T) *ptrd = (T)((ulongT)*ptrd | (ulongT)value); return *this;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
10,760,881,830,571,807,000,000,000,000,000,000,000
6
Fix other issues in 'CImg<T>::load_bmp()'.
MagickExport char *StringToken(const char *delimiters,char **string) { char *q; register char *p; register const char *r; register int c, d; p=(*string); if (p == (char *) NULL) return((char *) NULL); q=p; for ( ; ; ) { c=(*p++); r=delimiters; do { d=(...
0
[ "CWE-190" ]
ImageMagick
be90a5395695f0d19479a5d46b06c678be7f7927
96,585,986,915,902,680,000,000,000,000,000,000,000
38
https://github.com/ImageMagick/ImageMagick/issues/1721
MagickExport StringInfo *BlobToStringInfo(const void *blob,const size_t length) { StringInfo *string_info; if (~length < MagickPathExtent) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); string_info=AcquireStringInfoContainer(); string_info->length=length; string_info->datum=(u...
0
[ "CWE-190" ]
ImageMagick
be90a5395695f0d19479a5d46b06c678be7f7927
39,017,286,638,444,106,000,000,000,000,000,000,000
24
https://github.com/ImageMagick/ImageMagick/issues/1721
ippNextAttribute(ipp_t *ipp) /* I - IPP message */ { /* * Range check input... */ if (!ipp || !ipp->current) return (NULL); /* * Return the next attribute... */ return (ipp->current = ipp->current->next); }
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
291,514,596,707,779,960,000,000,000,000,000,000,000
15
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
static unsigned long xol_get_insn_slot(struct uprobe *uprobe) { struct xol_area *area; unsigned long xol_vaddr; area = get_xol_area(); if (!area) return 0; xol_vaddr = xol_take_insn_slot(area); if (unlikely(!xol_vaddr)) return 0; arch_uprobe_copy_ixol(area->pages[0], xol_vaddr, &uprobe->arch.ixol...
0
[ "CWE-416" ]
linux
355627f518978b5167256d27492fe0b343aaf2f2
305,773,228,827,665,860,000,000,000,000,000,000,000
18
mm, uprobes: fix multiple free of ->uprobes_state.xol_area Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new error p...
size_t get_default_max_mem_usage(void) { size_t total_mem_size = jas_get_total_mem_size(); size_t max_mem; if (total_mem_size) { max_mem = 0.90 * total_mem_size; } else { max_mem = JAS_DEFAULT_MAX_MEM_USAGE; } return max_mem; }
0
[ "CWE-703", "CWE-401" ]
jasper
d99636fad60629785efd1ef72da772a8ef68f54c
186,136,307,673,417,900,000,000,000,000,000,000,000
11
fix memory leaks in function cmdopts_parse
void dtls1_clear(SSL *s) { pqueue unprocessed_rcds; pqueue processed_rcds; pqueue buffered_messages; pqueue sent_messages; pqueue buffered_app_data; unsigned int mtu; if (s->d1) { unprocessed_rcds = s->d1->unprocessed_rcds.q; processed_rcds = s->d1->processed_rcds.q; buffered_messages = s->d1-...
0
[]
openssl
4817504d069b4c5082161b02a22116ad75f822b1
120,201,117,284,431,800,000,000,000,000,000,000,000
45
PR: 2658 Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Support for TLS/DTLS heartbeats.
Status AuthorizationManager::checkAuthForInsert(const std::string& ns) { NamespaceString namespaceString(ns); if (!checkAuthorization(ns, ActionType::insert)) { return Status(ErrorCodes::Unauthorized, mongoutils::str::stream() << "not authorized for insert on " ...
0
[ "CWE-264" ]
mongo
23344f8b7506df694f66999693ee3c00dfd6afae
9,245,983,054,802,356,000,000,000,000,000,000,000
9
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.
int StreamTcpPacket (ThreadVars *tv, Packet *p, StreamTcpThread *stt, PacketQueue *pq) { SCEnter(); DEBUG_ASSERT_FLOW_LOCKED(p->flow); SCLogDebug("p->pcap_cnt %"PRIu64, p->pcap_cnt); /* assign the thread id to the flow */ if (unlikely(p->flow->thread_id == 0)) { p->fl...
1
[ "CWE-94" ]
suricata
1c63d3905852f746ccde7e2585600b2199cefb4b
164,447,386,329,944,440,000,000,000,000,000,000,000
229
stream: reject broken ACK packets Fix evasion posibility by rejecting packets with a broken ACK field. These packets have a non-0 ACK field, but do not have a ACK flag set. Bug #3324. Reported-by: Nicolas Adba (cherry picked from commit fa692df37a796c3330c81988d15ef1a219afc006)
static NTSTATUS smb_set_file_basic_info(connection_struct *conn, const char *pdata, int total_data, files_struct *fsp, struct smb_filename *smb_fname) { /* Patch to do this correctly from Paul Eggert <eggert@twinsun.com>. */ struct smb_file_time ft; uint32_t dosmode = 0; NTSTATUS status = NT_STA...
0
[ "CWE-787" ]
samba
22b4091924977f6437b59627f33a8e6f02b41011
116,120,001,698,186,870,000,000,000,000,000,000,000
58
CVE-2021-44142: smbd: add Netatalk xattr used by vfs_fruit to the list of private Samba xattrs This is an internal xattr that should not be user visible. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static void do_compute_shiftstate(void) { unsigned int k, sym, val; shift_state = 0; memset(shift_down, 0, sizeof(shift_down)); for_each_set_bit(k, key_down, min(NR_KEYS, KEY_CNT)) { sym = U(key_maps[0][k]); if (KTYP(sym) != KT_SHIFT && KTYP(sym) != KT_SLOCK) continue; val = KVAL(sym); if (val == KVAL...
0
[ "CWE-416" ]
linux
6ca03f90527e499dd5e32d6522909e2ad390896b
241,520,770,411,575,160,000,000,000,000,000,000,000
20
vt: keyboard, simplify vt_kdgkbsent Use 'strlen' of the string, add one for NUL terminator and simply do 'copy_to_user' instead of the explicit 'for' loop. This makes the KDGKBSENT case more compact. The only thing we need to take care about is NULL 'func_table[i]'. Use an empty string in that case. The original che...
Status CreateTempFile(Env* env, float value, uint64 size, string* filename) { const string dir = testing::TmpDir(); *filename = io::JoinPath(dir, strings::StrCat("file_", value)); std::unique_ptr<WritableFile> file; TF_RETURN_IF_ERROR(env->NewWritableFile(*filename, &file)); for (uint64 i = 0; i < size; ++i) ...
1
[ "CWE-125" ]
tensorflow
1cb6bb6c2a6019417c9adaf9e6843ba75ee2580b
155,261,443,077,255,740,000,000,000,000,000,000,000
13
Add error checking to ImmutableConst OP that strings are not yet supported. PiperOrigin-RevId: 401065359 Change-Id: I9dd2bd2a2c36f22f4a05153daf6ebdc4613469d2
int digest_generic_verify(struct digest *d, const unsigned char *md) { int ret; int len = digest_length(d); unsigned char *tmp; tmp = xmalloc(len); ret = digest_final(d, tmp); if (ret) goto end; ret = memcmp(md, tmp, len); ret = ret ? -EINVAL : 0; end: free(tmp); return ret; }
1
[ "CWE-200" ]
barebox
0a9f9a7410681e55362f8311537ebc7be9ad0fbe
78,392,329,714,916,790,000,000,000,000,000,000,000
18
crypto: digest: use crypto_memneq() When verifying a digest it is important not to leak timing information through memcmp(). Use crypto_memneq() instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
makedirs (char const *name) { char *filename = xstrdup (name); char *f; char *flim = replace_slashes (filename); /* FIXME: Now with the pathname lookup cache, there is no reason for deferring the creation of directories. Callers should be updated. */ if (flim) { /* Create any missing director...
0
[ "CWE-59" ]
patch
dce4683cbbe107a95f1f0d45fabc304acfb5d71a
167,848,962,112,158,920,000,000,000,000,000,000,000
28
Don't follow symlinks unless --follow-symlinks is given * src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, append_to_file): Unless the --follow-symlinks option is given, open files with the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing that consistently for input files. * src/u...
static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) { switch (ctrl) { case PR_SPEC_ENABLE: if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) return 0; /* * Indirect branch speculation is always disabled in strict * mode. It can neit...
0
[]
linux
4d8df8cbb9156b0a0ab3f802b80cb5db57acc0bf
11,919,961,636,460,427,000,000,000,000,000,000,000
44
x86/speculation: PR_SPEC_FORCE_DISABLE enforcement for indirect branches. Currently, it is possible to enable indirect branch speculation even after it was force-disabled using the PR_SPEC_FORCE_DISABLE option. Moreover, the PR_GET_SPECULATION_CTRL command gives afterwards an incorrect result (force-disabled when it i...
static int ssl_parse_ecjpake_kkpp( mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len ) { int ret; if( mbedtls_ecjpake_check( &ssl->handshake->ecjpake_ctx ) != 0 ) { MBEDTLS_SSL_DEBUG_MSG( 3, ( "skip ecjpake kkpp exte...
0
[ "CWE-20", "CWE-190" ]
mbedtls
83c9f495ffe70c7dd280b41fdfd4881485a3bc28
5,199,367,779,705,028,400,000,000,000,000,000,000
26
Prevent bounds check bypass through overflow in PSK identity parsing The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is unsafe because `*p + n` might overflow, thus bypassing the check. As `n` is a user-specified value up to 65K, this is relevant if the library happens to be located in the last 65K o...
static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len) { struct ath6kl_wmi_regdomain *ev; struct country_code_to_enum_rd *country = NULL; struct reg_dmn_pair_mapping *regpair = NULL; char alpha2[2]; u32 reg_code; ev = (struct ath6kl_wmi_regdomain *) datap; reg_code = le32_to_cpu(ev->reg_cod...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
265,590,335,303,099,860,000,000,000,000,000,000,000
34
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
int Monitor::get_mon_metadata(int mon, Formatter *f, ostream& err) { assert(f); if (!mon_metadata.count(mon)) { err << "mon." << mon << " not found"; return -EINVAL; } const Metadata& m = mon_metadata[mon]; for (Metadata::const_iterator p = m.begin(); p != m.end(); ++p) { f->dump_string(p->first.c...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
134,509,484,635,612,400,000,000,000,000,000,000,000
13
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
top_left_stop (NautilusDirectory *directory) { NautilusFile *file; if (directory->details->top_left_read_state != NULL) { file = directory->details->top_left_read_state->file; if (file != NULL) { g_assert (NAUTILUS_IS_FILE (file)); g_assert (file->details->directory == directory); if (is_needy (file, ...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
123,872,097,081,951,420,000,000,000,000,000,000,000
23
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-...
ip_is_safe_p(self) VALUE self; { struct tcltkip *ptr = get_ip(self); /* ip is deleted? */ if (deleted_ip(ptr)) { rb_raise(rb_eRuntimeError, "interpreter is deleted"); } if (Tcl_IsSafe(ptr->ip)) { return Qtrue; } else { return Qfalse; } }
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
304,776,752,811,149,000,000,000,000,000,000,000,000
16
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static int em_lldt(struct x86_emulate_ctxt *ctxt) { u16 sel = ctxt->src.val; /* Disable writeback. */ ctxt->dst.type = OP_NONE; return load_segment_descriptor(ctxt, sel, VCPU_SREG_LDTR); }
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
52,546,797,996,491,600,000,000,000,000,000,000,000
8
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
static void pit_reset(DeviceState *dev) { PITCommonState *pit = PIT_COMMON(dev); PITChannelState *s; pit_reset_common(pit); s = &pit->channels[0]; if (!s->irq_disabled) { timer_mod(s->irq_timer, s->next_transition_time); } }
0
[ "CWE-119" ]
qemu
d4862a87e31a51de9eb260f25c9e99a75efe3235
7,245,022,717,456,768,000,000,000,000,000,000,000
12
i8254: fix out-of-bounds memory access in pit_ioport_read() Due converting PIO to the new memory read/write api we no longer provide separate I/O region lenghts for read and write operations. As a result, reading from PIT Mode/Command register will end with accessing pit->channels with invalid index. Fix this by igno...
bool LEX::add_create_view(THD *thd, DDL_options_st ddl, uint16 algorithm, enum_view_suid suid, Table_ident *table_ident) { if (unlikely(set_create_options_with_check(ddl))) return true; if (unlikely(!(create_view= new (thd->mem_root) Create_vi...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
152,894,195,175,361,040,000,000,000,000,000,000,000
14
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...
void sds_free(void *ptr) { s_free(ptr); }
0
[ "CWE-190" ]
redis
d32f2e9999ce003bad0bd2c3bca29f64dcce4433
267,312,921,338,163,520,000,000,000,000,000,000,000
1
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. A...
e_ews_connection_class_init (EEwsConnectionClass *class) { GObjectClass *object_class; g_type_class_add_private (class, sizeof (EEwsConnectionPrivate)); object_class = G_OBJECT_CLASS (class); object_class->set_property = ews_connection_set_property; object_class->get_property = ews_connection_get_property; obje...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
149,359,883,807,814,280,000,000,000,000,000,000,000
78
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 int rtnl_group_changelink(const struct sk_buff *skb, struct net *net, int group, struct ifinfomsg *ifm, struct nlattr **tb) { struct net_device *dev; int err; for_each_netdev(net, dev) { if (dev->group == group) { err = do_setlink(skb, dev, ifm, tb, NULL, 0); if (err < 0) return err; } }...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
99,774,572,364,891,020,000,000,000,000,000,000,000
18
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
PHP_FUNCTION(symlink) { char *topath, *frompath; int topath_len, frompath_len; int ret; char source_p[MAXPATHLEN]; char dest_p[MAXPATHLEN]; char dirname[MAXPATHLEN]; size_t len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &topath, &topath_len, &frompath, &frompath_len) == FAILURE) { return; }...
1
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
73,273,308,586,070,590,000,000,000,000,000,000,000
62
- 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 size_t handle_returned_header (void *ptr, size_t size, size_t nmemb, void *stream) { auth_client *auth_user = stream; size_t bytes = size * nmemb; client_t *client = auth_user->client; if (client) { auth_t *auth = client->auth; auth_url *url = auth->state; if (strncas...
1
[ "CWE-119" ]
icecast-server
03ea74c04a5966114c2fe66e4e6892d11a68181e
244,473,335,174,490,860,000,000,000,000,000,000,000
32
Fix: Worked around buffer overflows in URL auth's cURL interface This is only a workaround that keeps compatibility with 2.4.x mainline. A real fix has been implemented in 2.5.x (master).
static void cmd_parse_status(struct ImapData *idata, char *s) { char *value = NULL; struct Buffy *inc = NULL; struct ImapMbox mx; struct ImapStatus *status = NULL; unsigned int olduv, oldun; unsigned int litlen; short new = 0; short new_msg_count = 0; char *mailbox = imap_next_word(s); /* We need ...
1
[ "CWE-20" ]
neomutt
3c49c44be9b459d9c616bcaef6eb5d51298c1741
64,285,311,271,964,110,000,000,000,000,000,000,000
162
Ensure litlen isn't larger than our mailbox
static int fts3SegReaderCursorAddZero( Fts3Table *p, /* FTS virtual table handle */ int iLangid, const char *zTerm, /* Term to scan doclist of */ int nTerm, /* Number of bytes in zTerm */ Fts3MultiSegReader *pCsr /* Fts3MultiSegReader to modify */ ){ ...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
119,880,234,108,916,400,000,000,000,000,000,000,000
11
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
static void cmd_parse_fetch(struct ImapAccountData *adata, char *s) { unsigned int msn, uid; struct Email *e = NULL; char *flags = NULL; int uid_checked = 0; bool server_changes = false; struct ImapMboxData *mdata = imap_mdata_get(adata->mailbox); mutt_debug(LL_DEBUG3, "Handling FETCH\n"); if (mutt_s...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
332,839,651,251,883,340,000,000,000,000,000,000,000
132
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
if (sz + idx > maxSz || sz > WOLFSSH_MAX_HANDLE) { WLOG(WS_LOG_SFTP, "Error with file handle size"); res = err; type = WOLFSSH_FTP_FAILURE; ret = WS_BAD_FILE_E; }
1
[ "CWE-190" ]
wolfssh
edb272e35ee57e7b89f3e127222c6981b6a1e730
24,451,018,161,307,450,000,000,000,000,000,000,000
6
ASAN SFTP Fixes When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766)
void CL_NextDownload(void) { char *s; char *remoteName, *localName; qboolean useCURL = qfalse; // A download has finished, check whether this matches a referenced checksum if(*clc.downloadName) { char *zippath = FS_BuildOSPath(Cvar_VariableString("fs_homepath"), clc.downloadName, ""); zippath[strlen(zippath)...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
35,812,739,498,304,390,000,000,000,000,000,000,000
93
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static struct mon_event_text *mon_text_read_wait(struct mon_reader_text *rp, struct file *file) { struct mon_bus *mbus = rp->r.m_bus; DECLARE_WAITQUEUE(waita, current); struct mon_event_text *ep; add_wait_queue(&rp->wait, &waita); set_current_state(TASK_INTERRUPTIBLE); while ((ep = mon_text_fetch(rp, mbus)) ...
0
[ "CWE-787" ]
linux
a5f596830e27e15f7a0ecd6be55e433d776986d8
7,730,555,635,185,565,000,000,000,000,000,000,000
30
usb: usbmon: Read text within supplied buffer size This change fixes buffer overflows and silent data corruption with the usbmon device driver text file read operations. Signed-off-by: Fredrik Noring <noring@nocrew.org> Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by...
static int device_context_mapped(struct intel_iommu *iommu, u8 bus, u8 devfn) { struct context_entry *context; int ret = 0; unsigned long flags; spin_lock_irqsave(&iommu->lock, flags); context = iommu_context_addr(iommu, bus, devfn, 0); if (context) ret = context_present(context); spin_unlock_irqrestore(&iomm...
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
241,281,955,739,686,700,000,000,000,000,000,000,000
13
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...
void hugepage_put_subpool(struct hugepage_subpool *spool) { unsigned long flags; spin_lock_irqsave(&spool->lock, flags); BUG_ON(!spool->count); spool->count--; unlock_or_release_subpool(spool, flags); }
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
152,013,442,261,547,040,000,000,000,000,000,000,000
9
hugetlbfs: flush TLBs correctly after huge_pmd_unshare When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB flush is missing. This TLB flush must be performed before releasing the i_mmap_rwsem, in order to prevent an unshared PMDs page from being released and reused before the TLB flush took place...
_krb5_pk_set_user_id(krb5_context context, krb5_principal principal, krb5_pk_init_ctx ctx, struct hx509_certs_data *certs) { hx509_certs c = hx509_certs_ref(certs); hx509_query *q = NULL; int ret; if (ctx->id->certs) hx509_certs_free(&ctx->id->certs); if (ctx->id->cert) { hx5...
0
[ "CWE-320" ]
heimdal
2f7f3d9960aa6ea21358bdf3687cee5149aa35cf
302,624,228,164,462,170,000,000,000,000,000,000,000
71
CVE-2019-12098: krb5: always confirm PA-PKINIT-KX for anon PKINIT RFC8062 Section 7 requires verification of the PA-PKINIT-KX key excahnge when anonymous PKINIT is used. Failure to do so can permit an active attacker to become a man-in-the-middle. Introduced by a1ef548600c5bb51cf52a9a9ea12676506ede19f. First tagged...
void ext4_exit_mballoc(void) { /* * Wait for completion of call_rcu()'s on ext4_pspace_cachep * before destroying the slab cache. */ rcu_barrier(); kmem_cache_destroy(ext4_pspace_cachep); kmem_cache_destroy(ext4_ac_cachep); kmem_cache_destroy(ext4_free_data_cachep); ext4_groupinfo_destroy_slabs(); }
0
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
21,631,536,931,321,400,000,000,000,000,000,000,000
12
ext4: only look at the bg_flags field if it is valid The bg_flags field in the block group descripts is only valid if the uninit_bg or metadata_csum feature is enabled. We were not consistently looking at this field; fix this. Also block group #0 must never have uninitialized allocation bitmaps, or need to be zeroed...
const char *js_ref(js_State *J) { js_Value *v = stackidx(J, -1); const char *s; char buf[32]; switch (v->type) { case JS_TUNDEFINED: s = "_Undefined"; break; case JS_TNULL: s = "_Null"; break; case JS_TBOOLEAN: s = v->u.boolean ? "_True" : "_False"; break; case JS_TOBJECT: sprintf(buf, "%p", (void*)v->u.o...
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
153,399,992,101,224,320,000,000,000,000,000,000,000
23
Fix 697401: Error when dropping extra arguments to lightweight functions.
TEST(ExpressionPowTest, ThrowsWhenBaseZeroAndExpNegative) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); VariablesParseState vps = expCtx->variablesParseState; const auto expr = Expression::parseExpression(expCtx, BSON("$pow" << BSON_ARRAY(0 << -5)), vps); ASSERT_THRO...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
340,275,547,160,663,500,000,000,000,000,000,000,000
11
SERVER-38070 fix infinite loop in agg expression
static void snd_pcm_post_prepare(struct snd_pcm_substream *substream, snd_pcm_state_t state) { struct snd_pcm_runtime *runtime = substream->runtime; runtime->control->appl_ptr = runtime->status->hw_ptr; snd_pcm_set_state(substream, SNDRV_PCM_STATE_PREPARED); }
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
109,806,869,545,138,570,000,000,000,000,000,000,000
7
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
TfLiteStatus EvalHybrid(TfLiteContext* context, TfLiteNode* node, const TfLiteTensor* lookup, const TfLiteTensor* value, TfLiteTensor* output) { const int row_size = SizeOfDimension(value, 0); const double scaling_factor = value->params.scale; // col_size after we ...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
200,626,343,921,602,050,000,000,000,000,000,000,000
37
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static void skip_result_with_length(MYSQL_BIND *param __attribute__((unused)), MYSQL_FIELD *field __attribute__((unused)), uchar **row) { ulong length= net_field_length(row); (*row)+= length; }
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
51,782,795,167,226,260,000,000,000,000,000,000,000
8
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
int __init efi_config_parse_tables(void *config_tables, int count, int sz, efi_config_table_type_t *arch_tables) { void *tablep; int i; tablep = config_tables; pr_info(""); for (i = 0; i < count; i++) { efi_guid_t guid; unsigned long table; if (efi_enabled(EFI_64BIT)) { u64 table64; guid = ((e...
0
[]
linux
1957a85b0032a81e6482ca4aab883643b8dae06e
50,219,148,728,953,940,000,000,000,000,000,000,000
120
efi: Restrict efivar_ssdt_load when the kernel is locked down efivar_ssdt_load allows the kernel to import arbitrary ACPI code from an EFI variable, which gives arbitrary code execution in ring 0. Prevent that when the kernel is locked down. Signed-off-by: Matthew Garrett <mjg59@google.com> Acked-by: Ard Biesheuvel <...
static __latent_entropy struct task_struct *copy_process( struct pid *pid, int trace, int node, struct kernel_clone_args *args) { int pidfd = -1, retval; struct task_struct *p; struct multiprocess_signals delayed; struct file *pidfile = NULL; u64 clone_flags = args->flags; struct nsproxy *nsp ...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
87,763,691,252,100,890,000,000,000,000,000,000,000
531
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static int bin_source(RCore *r, int mode) { RList *final_list = r_list_new (); RBinFile * binfile = r->bin->cur; if (!binfile) { bprintf ("[Error bin file]\n"); r_list_free (final_list); return false; } SdbListIter *iter; RListIter *iter2; char* srcline; SdbKv *kv; SdbList *ls = sdb_foreach_list (binfi...
0
[ "CWE-78" ]
radare2
5411543a310a470b1257fb93273cdd6e8dfcb3af
173,126,725,630,809,780,000,000,000,000,000,000,000
35
More fixes for the CVE-2019-14745
SPICE_GNUC_VISIBLE int spice_server_get_sock_info(SpiceServer *reds, struct sockaddr *sa, socklen_t *salen) { return -1; }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
271,549,648,869,829,630,000,000,000,000,000,000,000
4
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
PHP_FUNCTION(dom_document_create_attribute) { zval *id; xmlAttrPtr node; xmlDocPtr docp; int ret, name_len; dom_object *intern; char *name; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) { return; } DOM_GET_OBJ(docp,...
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
247,988,596,592,260,600,000,000,000,000,000,000,000
28
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name, char __user *, type, unsigned long, flags, void __user *, data) { int ret; char *kernel_type; struct filename *kernel_dir; char *kernel_dev; unsigned long data_page; ret = copy_mount_string(type, &kernel_type); if (ret < 0) goto out_ty...
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
201,859,708,638,101,800,000,000,000,000,000,000,000
40
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
dp_packet_l4_size(const struct dp_packet *b) { return b->l4_ofs != UINT16_MAX ? (const char *)dp_packet_tail(b) - (const char *)dp_packet_l4(b) - dp_packet_l2_pad_size(b) : 0; }
0
[ "CWE-400" ]
ovs
354e7d860e444fd1472541b0fdc3b8678aa74828
212,598,725,005,145,430,000,000,000,000,000,000,000
7
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static inline unsigned int genl_family_hash(unsigned int id) { return id & GENL_FAM_TAB_MASK; }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
186,580,311,471,251,750,000,000,000,000,000,000,000
4
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...