func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void perf_event_exit_task_context(struct task_struct *child, int ctxn) { struct perf_event *child_event, *next; struct perf_event_context *child_ctx, *clone_ctx = NULL; unsigned long flags; if (likely(!child->perf_event_ctxp[ctxn])) return; local_irq_save(flags); /* * We can't reschedule here because...
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
192,115,892,856,857,200,000,000,000,000,000,000,000
65
perf: Fix race in swevent hash There's a race on CPU unplug where we free the swevent hash array while it can still have events on. This will result in a use-after-free which is BAD. Simply do not free the hash array on unplug. This leaves the thing around and no use-after-free takes place. When the last swevent die...
static int vlv_search(struct ldb_module *module, struct ldb_request *req) { struct ldb_context *ldb; struct ldb_control *control; struct ldb_control *sort_control; struct private_data *priv; struct ldb_vlv_req_control *vlv_ctrl; struct ldb_server_sort_control **sort_ctrl; struct ldb_request *search_req; struct ...
0
[ "CWE-416" ]
samba
32c333def9ad5a1c67abee320cf5f3c4f2cb1e5c
93,244,001,466,575,120,000,000,000,000,000,000,000
138
CVE-2020-10760 dsdb: Ensure a proper talloc tree for saved controls Otherwise a paged search on the GC port will fail as the ->data was not kept around for the second page of searches. An example command to produce this is bin/ldbsearch --paged -H ldap://$SERVER:3268 -U$USERNAME%$PASSWORD This shows up later in the...
long SSL_get_default_timeout(const SSL *s) { return (s->method->get_timeout()); }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
298,032,807,316,241,300,000,000,000,000,000,000,000
4
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
bridge_get_advertised_bandwidth_bounded(routerinfo_t *router) { uint32_t result = router->bandwidthcapacity; if (result > router->bandwidthrate) result = router->bandwidthrate; if (result > BRIDGE_MAX_BELIEVABLE_BANDWIDTH) result = BRIDGE_MAX_BELIEVABLE_BANDWIDTH; else if (result < BRIDGE_MIN_BELIEVABLE...
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
139,224,816,605,911,180,000,000,000,000,000,000,000
11
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
int SplashOutputDev::getBitmapWidth() { return bitmap->getWidth(); }
0
[ "CWE-369" ]
poppler
b224e2f5739fe61de9fa69955d016725b2a4b78d
295,815,081,217,538,230,000,000,000,000,000,000,000
3
SplashOutputDev::tilingPatternFill: Fix crash on broken file Issue #802
static bool ParseIntegerProperty(int *ret, std::string *err, const json &o, const std::string &property, const bool required, const std::string &parent_node = "") { json_const_iterator it; if (!FindMember(o, property....
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
219,377,056,867,774,080,000,000,000,000,000,000,000
35
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_t pte) { unsigned long pfn = pte_pfn(pte); if (HAVE_PTE_SPECIAL) { if (likely(!pte_special(pte))) goto check_pfn; if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP)) return NULL; if (!is_zero_pfn(pfn)) print_bad_pte(vma, ad...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
61,635,388,906,759,670,000,000,000,000,000,000,000
47
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
void SSL_set_accept_state(SSL *s) { s->server=1; s->shutdown=0; s->state=SSL_ST_ACCEPT|SSL_ST_BEFORE; s->handshake_func=s->method->ssl_accept; /* clear the current cipher */ ssl_clear_cipher_ctx(s); }
0
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
201,041,724,246,975,000,000,000,000,000,000,000,000
9
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static struct bsg_device *bsg_add_device(struct inode *inode, struct request_queue *rq, struct file *file) { struct bsg_device *bd; #ifdef BSG_DEBUG unsigned char buf[32]; #endif if (!blk_get_queue(rq)) return ERR_PTR(-ENXIO); bd = bsg_alloc_device(); if (!bd) { blk_put_queue(rq); return ERR_PTR...
0
[ "CWE-416", "CWE-787" ]
linux
128394eff343fc6d2f32172f03e24829539c5835
165,671,828,776,354,240,000,000,000,000,000,000,000
32
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 diskutil_ddzero(const char *path, const long long sectors, boolean zero_fill) { char *output = NULL; long long count = 1; long long seek = sectors - 1; if (path) { if (zero_fill) { count = sectors; seek = 0; } char of_str[MAX_PATH]; snprintf(of_str, ...
0
[]
eucalyptus
c252889a46f41b4c396b89e005ec89836f2524be
253,171,534,895,429,300,000,000,000,000,000,000,000
28
Input validation, shellout hardening on back-end - validating bucketName and bucketPath in BundleInstance - validating device name in Attach and DetachVolume - removed some uses of system() and popen() Fixes EUCA-7572, EUCA-7520
static void write_exception(struct pstore *ps, uint32_t index, struct core_exception *e) { struct disk_exception *de = get_exception(ps, index); /* copy it */ de->old_chunk = cpu_to_le64(e->old_chunk); de->new_chunk = cpu_to_le64(e->new_chunk); }
0
[ "CWE-200", "CWE-264" ]
linux
e9c6a182649f4259db704ae15a91ac820e63b0ca
15,693,476,381,151,988,000,000,000,000,000,000,000
9
dm snapshot: fix data corruption This patch fixes a particular type of data corruption that has been encountered when loading a snapshot's metadata from disk. When we allocate a new chunk in persistent_prepare, we increment ps->next_free and we make sure that it doesn't point to a metadata area by further incrementin...
Field *find_field_in_table_sef(TABLE *table, const char *name) { Field **field_ptr; if (table->s->name_hash.records) { field_ptr= (Field**)my_hash_search(&table->s->name_hash,(uchar*) name, strlen(name)); if (field_ptr) { /* field_ptr points to fiel...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
315,518,539,381,917,100,000,000,000,000,000,000,000
30
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.
static void btrfs_set_bit_hook(struct inode *inode, struct extent_state *state, unsigned *bits) { if ((*bits & EXTENT_DEFRAG) && !(*bits & EXTENT_DELALLOC)) WARN_ON(1); /* * set_bit and clear bit hooks normally require _irqsave/restore * but in this case, we are only testing for the DELALLOC * bit,...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
162,015,152,160,039,210,000,000,000,000,000,000,000
40
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
static MagickBooleanType GetOneVirtualPixelFromStream(const Image *image, const VirtualPixelMethod virtual_pixel_method,const ssize_t x,const ssize_t y, Quantum *pixel,ExceptionInfo *exception) { const Quantum *p; register ssize_t i; assert(image != (Image *) NULL); assert(image->signature == Magi...
0
[ "CWE-119" ]
ImageMagick
4e8c2ed53fcb54a34b3a6185b2584f26cf6874a3
41,719,033,110,328,140,000,000,000,000,000,000,000
30
https://github.com/ImageMagick/ImageMagick/issues/312
glue(cirrus_bitblt_rop_bkwd_, ROP_NAME)(CirrusVGAState *s, uint32_t dstaddr, const uint8_t *src, int dstpitch, int srcpitch, int bltwidth, int bltheight) { ...
1
[ "CWE-119" ]
qemu
ffaf857778286ca54e3804432a2369a279e73aa7
235,434,423,323,267,000,000,000,000,000,000,000,000
19
cirrus: stop passing around src pointers in the blitter Does basically the same as "cirrus: stop passing around dst pointers in the blitter", just for the src pointer instead of the dst pointer. For the src we have to care about cputovideo blits though and fetch the data from s->cirrus_bltbuf instead of vga memory. ...
*/ static int ing_filter(struct sk_buff *skb, struct netdev_queue *rxq) { struct net_device *dev = skb->dev; u32 ttl = G_TC_RTTL(skb->tc_verd); int result = TC_ACT_OK; struct Qdisc *q; if (unlikely(MAX_RED_LOOP < ttl++)) { net_warn_ratelimited("Redir loop detected Dropping packet (%d->%d)\n", skb->skb...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
55,851,376,698,364,260,000,000,000,000,000,000,000
26
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...
u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running) { struct perf_event *child; u64 total = 0; *enabled = 0; *running = 0; mutex_lock(&event->child_mutex); (void)perf_event_read(event, false); total += perf_event_count(event); *enabled += event->total_time_enabled + atomic64_r...
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
85,349,361,573,108,050,000,000,000,000,000,000,000
28
perf: Fix race in swevent hash There's a race on CPU unplug where we free the swevent hash array while it can still have events on. This will result in a use-after-free which is BAD. Simply do not free the hash array on unplug. This leaves the thing around and no use-after-free takes place. When the last swevent die...
ObjectIsStorage( TPMI_DH_OBJECT handle // IN: object handle ) { OBJECT *object = HandleToObject(handle); TPMT_PUBLIC *publicArea = ((object != NULL) ? &object->publicArea : NULL); // return (publicArea != NULL && IS_ATTRIBUTE(publicArea->objectAttributes, TPMA_OBJECT, r...
0
[ "CWE-119" ]
libtpms
ea62fd9679f8c6fc5e79471b33cfbd8227bfed72
275,217,025,920,852,820,000,000,000,000,000,000,000
14
tpm2: Initialize a whole OBJECT before using it Initialize a whole OBJECT before using it. This is necessary since an OBJECT may also be used as a HASH_OBJECT via the ANY_OBJECT union and that HASH_OBJECT can leave bad size inidicators in TPM2B buffer in the OBJECT. To get rid of this problem we reset the whole OBJECT...
static void lsi_add_msg_byte(LSIState *s, uint8_t data) { if (s->msg_len >= LSI_MAX_MSGIN_LEN) { trace_lsi_add_msg_byte_error(); } else { trace_lsi_add_msg_byte(data); s->msg[s->msg_len++] = data; } }
0
[ "CWE-835" ]
qemu
de594e47659029316bbf9391efb79da0a1a08e08
6,654,103,385,046,208,000,000,000,000,000,000,000
9
scsi: lsi: exit infinite loop while executing script (CVE-2019-12068) When executing script in lsi_execute_script(), the LSI scsi adapter emulator advances 's->dsp' index to read next opcode. This can lead to an infinite loop if the next opcode is empty. Move the existing loop exit after 10k iterations so that it cove...
static void update_sysctl(void) { unsigned int factor = get_update_sysctl_factor(); #define SET_SYSCTL(name) \ (sysctl_##name = (factor) * normalized_sysctl_##name) SET_SYSCTL(sched_min_granularity); SET_SYSCTL(sched_latency); SET_SYSCTL(sched_wakeup_granularity); SET_SYSCTL(sched_shares_ratelimit); #undef SET_S...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
83,974,628,358,819,220,000,000,000,000,000,000,000
12
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *prev, struct sk_buff *skb, struct tcp_sacktag_state *state, unsigned int pcount, int shifted, int mss, bool dup_sack) { struct tcp_sock *tp = tcp_sk(sk); u32 start_seq = TCP_SKB_CB(skb)->seq; /* start of newly-SACKed */ u32 end_...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
70,799,616,994,427,610,000,000,000,000,000,000,000
81
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
int vrend_transfer_inline_write(struct vrend_context *ctx, uint32_t dst_handle, const struct vrend_transfer_info *info) { struct vrend_resource *res; res = vrend_renderer_ctx_res_lookup(ctx, dst_handle); if (!res) { vrend_report_context_err...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
327,631,760,588,632,900,000,000,000,000,000,000,000
36
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
static int elf_idx(struct user_ta_ctx *utc, vaddr_t r_va, size_t r_size) { struct user_ta_elf *elf; int idx = 0; TAILQ_FOREACH(elf, &utc->elfs, link) { size_t n; for (n = 0; n < elf->num_segs; n++) if (elf->segs[n].va == r_va && elf->segs[n].size == r_size) return idx; idx++; } return -1; }
0
[ "CWE-703", "CWE-189" ]
optee_os
7e768f8a473409215fe3fff8f6e31f8a3a0103c6
212,886,027,351,012,600,000,000,000,000,000,000,000
16
core: clear the entire TA area Previously we cleared (memset to zero) the size corresponding to code and data segments, however the allocation for the TA is made on the granularity of the memory pool, meaning that we did not clear all memory and because of that we could potentially leak code and data of a previous loa...
//! Load a list from a file. /** \param filename Filename to read data from. **/ CImgList<T>& load(const char *const filename) { if (!filename) throw CImgArgumentException(_cimglist_instance "load(): Specified filename is (null).", ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
125,420,426,235,400,690,000,000,000,000,000,000,000
118
Fix other issues in 'CImg<T>::load_bmp()'.
void CLASS parse_phase_one(int base) { unsigned entries, tag, type, len, data, save, i, c; float romm_cam[3][3]; char *cp; memset(&ph1, 0, sizeof ph1); fseek(ifp, base, SEEK_SET); order = get4() & 0xffff; if (get4() >> 8 != 0x526177) return; /* "Raw" */ fseek(ifp, get4() + base, SEEK_SET); entrie...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
156,367,461,874,034,370,000,000,000,000,000,000,000
245
Secunia SA75000 advisory: several buffer overruns
void RGWCORSConfiguration::erase_host_name_rule(string& origin) { bool rule_empty; unsigned loop = 0; /*Erase the host name from that rule*/ dout(10) << "Num of rules : " << rules.size() << dendl; for(list<RGWCORSRule>::iterator it_r = rules.begin(); it_r != rules.end(); ++it_r, loop++) { RGWCORSRu...
0
[ "CWE-113" ]
ceph
46817f30cee60bc5df8354ab326762e7c783fe2c
139,957,754,060,085,040,000,000,000,000,000,000,000
17
rgw: sanitize newlines in s3 CORSConfiguration's ExposeHeader the values in the <ExposeHeader> element are sent back to clients in a Access-Control-Expose-Headers response header. if the values are allowed to have newlines in them, they can be used to inject arbitrary response headers this issue only affects s3, whic...
static void *softnet_seq_next(struct seq_file *seq, void *v, loff_t *pos) { ++*pos; return softnet_get_online(pos); }
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
164,199,430,502,590,800,000,000,000,000,000,000,000
5
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data) { switch (msr) { case MSR_EFER: set_efer(vcpu, data); break; case MSR_IA32_MC0_STATUS: pr_unimpl(vcpu, "%s: MSR_IA32_MC0_STATUS 0x%llx, nop\n", __func__, data); break; case MSR_IA32_MCG_STATUS: pr_unimpl(vcpu, "%s: MSR_IA32_MCG_STAT...
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
162,361,240,264,060,800,000,000,000,000,000,000,000
78
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
static void check_start_timer_thread(struct smi_info *smi_info) { if (smi_info->si_state == SI_NORMAL && smi_info->curr_msg == NULL) { smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_JIFFIES); if (smi_info->thread) wake_up_process(smi_info->thread); start_next_msg(smi_info); smi_event_handler(smi_info, 0); ...
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
140,162,021,292,912,070,000,000,000,000,000,000,000
12
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
static int md_congested(void *data, int bits) { struct mddev *mddev = data; return mddev_congested(mddev, bits); }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
338,431,496,694,050,960,000,000,000,000,000,000,000
5
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
void sha1_update(SHACTX c, const void *data, unsigned long len) { EVP_DigestUpdate(c, data, len); }
0
[ "CWE-476" ]
libssh
b36272eac1b36982598c10de7af0a501582de07a
67,852,042,178,973,330,000,000,000,000,000,000,000
4
CVE-2020-1730: Fix a possible segfault when zeroing AES-CTR key Fixes T213 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
CImg<T>& shift(const int delta_x, const int delta_y=0, const int delta_z=0, const int delta_c=0, const unsigned int boundary_conditions=0) { if (is_empty()) return *this; if (boundary_conditions==3) return get_crop(-delta_x,-delta_y,-delta_z,-delta_c, w...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
145,993,783,984,959,500,000,000,000,000,000,000,000
200
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
template<typename t> CImg<T>& solve_tridiagonal(const CImg<t>& A) { const unsigned int siz = (unsigned int)size(); if (A._width!=3 || A._height!=siz) throw CImgArgumentException(_cimg_instance "solve_tridiagonal(): Instance and tridiagonal matrix " ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
261,200,792,740,437,070,000,000,000,000,000,000,000
20
Fix other issues in 'CImg<T>::load_bmp()'.
static void cdc_ncm_status(struct usbnet *dev, struct urb *urb) { struct cdc_ncm_ctx *ctx; struct usb_cdc_notification *event; ctx = (struct cdc_ncm_ctx *)dev->data[0]; if (urb->actual_length < sizeof(*event)) return; /* test for split data in 8-byte chunks */ if (test_and_clear_bit(EVENT_STS_SPLIT, &dev->fl...
0
[ "CWE-703" ]
linux
4d06dd537f95683aba3651098ae288b7cbff8274
187,461,221,386,916,680,000,000,000,000,000,000,000
48
cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind usbnet_link_change will call schedule_work and should be avoided if bind is failing. Otherwise we will end up with scheduled work referring to a netdev which has gone away. Instead of making the call conditional, we can just defer it to usbnet_probe, using the...
static size_t ion_debug_heap_total(struct ion_client *client, unsigned int id) { size_t size = 0; struct rb_node *n; mutex_lock(&client->lock); for (n = rb_first(&client->handles); n; n = rb_next(n)) { struct ion_handle *handle = rb_entry(n, struct ion_handle, node); if (handle->bu...
0
[ "CWE-416", "CWE-284" ]
linux
9590232bb4f4cc824f3425a6e1349afbe6d6d2b7
329,809,642,955,415,230,000,000,000,000,000,000,000
17
staging/android/ion : fix a race condition in the ion driver There is a use-after-free problem in the ion driver. This is caused by a race condition in the ion_ioctl() function. A handle has ref count of 1 and two tasks on different cpus calls ION_IOC_FREE simultaneously. cpu 0 cpu ...
char _q_x2c(char hex_up, char hex_low) { char digit; digit = 16 * (hex_up >= 'A' ? ((hex_up & 0xdf) - 'A') + 10 : (hex_up - '0')); digit += (hex_low >= 'A' ? ((hex_low & 0xdf) - 'A') + 10 : (hex_low - '0')); return digit; }
0
[ "CWE-94" ]
qdecoder
ce7c8a7ac450a823a11b06508ef1eb7441241f81
17,264,165,326,318,653,000,000,000,000,000,000,000
9
security update: add check on improperly encoded input
int rndis_set_param_dev(struct rndis_params *params, struct net_device *dev, u16 *cdc_filter) { pr_debug("%s:\n", __func__); if (!dev) return -EINVAL; if (!params) return -1; params->dev = dev; params->filter = cdc_filter; return 0; }
0
[ "CWE-200", "CWE-668" ]
linux
38ea1eac7d88072bbffb630e2b3db83ca649b826
285,858,436,510,750,360,000,000,000,000,000,000,000
14
usb: gadget: rndis: check size of RNDIS_MSG_SET command Check the size of the RNDIS_MSG_SET command given to us before attempting to respond to an invalid message size. Reported-by: Szymon Heidrich <szymon.heidrich@gmail.com> Cc: stable@kernel.org Tested-by: Szymon Heidrich <szymon.heidrich@gmail.com> Signed-off-by: ...
int af_alg_register_type(const struct af_alg_type *type) { struct alg_type_list *node; int err = -EEXIST; down_write(&alg_types_sem); list_for_each_entry(node, &alg_types, list) { if (!strcmp(node->type->name, type->name)) goto unlock; } node = kmalloc(sizeof(*node), GFP_KERNEL); err = -ENOMEM; if (!node...
0
[ "CWE-416" ]
linux
9060cb719e61b685ec0102574e10337fa5f445ea
335,576,285,104,482,150,000,000,000,000,000,000,000
28
net: crypto set sk to NULL when af_alg_release. KASAN has found use-after-free in sockfs_setattr. The existed commit 6d8c50dcb029 ("socket: close race condition between sock_close() and sockfs_setattr()") is to fix this simillar issue, but it seems to ignore that crypto module forgets to set the sk to NULL after af_al...
static int palm_os_3_probe(struct usb_serial *serial, const struct usb_device_id *id) { struct device *dev = &serial->dev->dev; struct visor_connection_info *connection_info; unsigned char *transfer_buffer; char *string; int retval = 0; int i; int num_ports = 0; transfer_buffer = kmalloc(sizeof(*connecti...
0
[ "CWE-703" ]
linux
cb3232138e37129e88240a98a1d2aba2187ff57c
54,435,818,428,517,180,000,000,000,000,000,000,000
94
USB: serial: visor: fix crash on detecting device without write_urbs The visor driver crashes in clie_5_attach() when a specially crafted USB device without bulk-out endpoint is detected. This fix adds a check that the device has proper configuration expected by the driver. Reported-by: Ralf Spenneberg <ralf@spennebe...
smb2_wait_mtu_credits(struct TCP_Server_Info *server, unsigned int size, unsigned int *num, struct cifs_credits *credits) { int rc = 0; unsigned int scredits, in_flight; spin_lock(&server->req_lock); while (1) { if (server->credits <= 0) { spin_unlock(&server->req_lock); cifs_num_waiters_inc(server...
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
184,442,951,750,500,300,000,000,000,000,000,000,000
62
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
static int aes_ccm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len) { EVP_AES_CCM_CTX *cctx = EVP_C_DATA(EVP_AES_CCM_CTX,ctx); CCM128_CONTEXT *ccm = &cctx->ccm; /* Encrypt/decrypt must be performed in place */ if (out != in || len < (...
0
[ "CWE-125" ]
openssl
2198b3a55de681e1f3c23edb0586afe13f438051
89,077,843,639,717,390,000,000,000,000,000,000,000
47
crypto/evp: harden AEAD ciphers. Originally a crash in 32-bit build was reported CHACHA20-POLY1305 cipher. The crash is triggered by truncated packet and is result of excessive hashing to the edge of accessible memory. Since hash operation is read-only it is not considered to be exploitable beyond a DoS condition. Oth...
void bnx2x_set_rx_ts(struct bnx2x *bp, struct sk_buff *skb) { int port = BP_PORT(bp); u64 timestamp, ns; timestamp = REG_RD(bp, port ? NIG_REG_P1_LLH_PTP_HOST_BUF_TS_MSB : NIG_REG_P0_LLH_PTP_HOST_BUF_TS_MSB); timestamp <<= 32; timestamp |= REG_RD(bp, port ? NIG_REG_P1_LLH_PTP_HOST_BUF_TS_LSB : NIG_R...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
226,076,982,060,675,530,000,000,000,000,000,000,000
22
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
pdf_dsc_process(gx_device_pdf * pdev, const gs_param_string_array * pma) { /* * The Adobe "Distiller Parameters" documentation says that Distiller * looks at DSC comments, but it doesn't say which ones. We look at * the ones that we see how to map directly to obvious PDF constructs. */ int ...
0
[]
ghostpdl
c3476dde7743761a4e1d39a631716199b696b880
322,699,694,711,287,570,000,000,000,000,000,000,000
122
Bug 699656: Handle LockDistillerParams not being a boolean This caused a function call commented as "Can't fail" to fail, and resulted in memory correuption and a segfault.
putsum(uint8_t *data, uint32_t n, uint32_t sloc, uint32_t css, uint32_t cse) { uint32_t sum; if (cse && cse < n) n = cse + 1; if (sloc < n-1) { sum = net_checksum_add(n-css, data+css); stw_be_p(data + sloc, net_checksum_finish_nozero(sum)); } }
0
[ "CWE-835" ]
qemu
1caff0340f49c93d535c6558a5138d20d475315c
95,952,794,428,813,120,000,000,000,000,000,000,000
11
e1000: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>...
xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len) { unsigned int needSize; if ((buf == NULL) || (buf->error)) return(-1); CHECK_COMPAT(buf) if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1; if (str == NULL) { #ifdef DEBUG_BUFFER xmlGenericError(xmlGenericErrorContext,...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
111,874,105,201,520,450,000,000,000,000,000,000,000
67
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
soup_auth_ntlm_free_connection_state (SoupConnectionAuth *auth, gpointer state) { SoupNTLMConnectionState *conn = state; g_free (conn->nonce); g_free (conn->response_header); g_slice_free (SoupNTLMConnectionState, conn); }
0
[ "CWE-125" ]
libsoup
0e7b2c1466434a992b6a387497432e1c97b6125c
120,653,056,588,597,570,000,000,000,000,000,000,000
9
NTLMv2 responses support
void SSL_set_tmp_ecdh_callback(SSL *ssl, EC_KEY *(*ecdh) (SSL *ssl, int is_export, int keylength)) { SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_ECDH_CB, (void (*)(void))ecdh); }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
48,182,108,314,936,860,000,000,000,000,000,000,000
6
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
int mongo_env_sock_init( void ) { return 0; }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
904,955,218,016,345,700,000,000,000,000,000,000
3
don't mix up int and size_t (first pass to fix that)
_XimAttributeToValue( Xic ic, XIMResourceList res, CARD16 *data, INT16 data_len, XPointer value, BITMASK32 mode) { switch (res->resource_size) { case XimType_SeparatorOfNestedList: case XimType_NEST: break; case XimType_CARD8: case XimType_CARD16: case ...
1
[ "CWE-190" ]
libx11
2fcfcc49f3b1be854bb9085993a01d17c62acf60
309,142,002,846,890,740,000,000,000,000,000,000,000
200
Fix more unchecked lengths Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
_vte_table_arginfo_alloc(struct _vte_table_arginfo_head *head) { struct _vte_table_arginfo *info; if (G_LIKELY (head->stack_allocated < G_N_ELEMENTS(head->stack))) { info = &head->stack[head->stack_allocated++]; } else { info = g_slice_new (struct _vte_table_arginfo); } info->next = head->list; head->list = i...
0
[ "CWE-119" ]
vte
feeee4b5832b17641e505b7083e0d299fdae318e
283,685,102,371,772,670,000,000,000,000,000,000,000
12
emulation: Limit integer arguments to 65535 To guard against malicious sequences containing excessively big numbers, limit all parsed numbers to 16 bit range. Doing this here in the parsing routine is a catch-all guard; this doesn't preclude enforcing more stringent limits in the handlers themselves. https://bugzilla...
MONGO_EXPORT int mongo_write_concern_finish( mongo_write_concern *write_concern ) { bson *command; /* Destory any existing serialized write concern object and reuse it. */ if( write_concern->cmd ) { bson_destroy( write_concern->cmd ); command = write_concern->cmd; } else com...
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
39,891,057,522,540,890,000,000,000,000,000,000,000
47
don't mix up int and size_t (first pass to fix that)
static int dalvik_disassemble (RAsm *a, RAsmOp *op, const ut8 *buf, int len) { int vA, vB, vC, payload = 0, i = (int) buf[0]; int size = dalvik_opcodes[i].len; char str[1024], *strasm; ut64 offset; const char *flag_str; op->buf_asm[0] = 0; if (buf[0] == 0x00) { /* nop */ switch (buf[1]) { case 0x01: /* pac...
1
[ "CWE-119", "CWE-787" ]
radare2
f41e941341e44aa86edd4483c4487ec09a074257
279,257,647,715,766,200,000,000,000,000,000,000,000
429
Fix #6885 - oob write in dalvik_disassemble
int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions, struct tcf_result *res) { const struct tc_action *a; int ret = -1; if (skb->tc_verd & TC_NCLS) { skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); ret = TC_ACT_OK; goto exec_done; } list_for_each_entry(a, actions, list) { repeat: ret ...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
192,427,863,655,764,630,000,000,000,000,000,000,000
27
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. ...
static void Direct_Move_X( EXEC_OPS PGlyph_Zone zone, Int point, TT_F26Dot6 distance ) { (void)exc; zone->cur_x[point] += distance; zone->touch[point] |= TT_Flag_Touched_X; }
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
228,382,224,785,489,130,000,000,000,000,000,000,000
7
Bug 698024: bounds check zone pointer in Ins_MIRP()
static void sig_cont(int p) { got_sigcont = TRUE; }
0
[ "CWE-476" ]
irssi
6c6c42e3d1b49d90aacc0b67f8540471cae02a1d
27,480,681,278,995,724,000,000,000,000,000,000,000
4
Merge branch 'security' into 'master' See merge request !7
send_msg(struct sshbuf *m) { int r; if ((r = sshbuf_put_stringb(oqueue, m)) != 0) fatal("%s: buffer error: %s", __func__, ssh_err(r)); sshbuf_reset(m); }
0
[ "CWE-732", "CWE-703", "CWE-269" ]
src
a6981567e8e215acc1ef690c8dbb30f2d9b00a19
112,098,654,867,674,700,000,000,000,000,000,000,000
8
disallow creation (of empty files) in read-only mode; reported by Michal Zalewski, feedback & ok deraadt@
sph_bswap64(sph_u64 x) { x = SPH_T64((x << 32) | (x >> 32)); x = ((x & SPH_C64(0xFFFF0000FFFF0000)) >> 16) | ((x & SPH_C64(0x0000FFFF0000FFFF)) << 16); x = ((x & SPH_C64(0xFF00FF00FF00FF00)) >> 8) | ((x & SPH_C64(0x00FF00FF00FF00FF)) << 8); return x; }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
305,019,731,886,185,540,000,000,000,000,000,000,000
9
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 ...
stl_record_neighbors(stl_file *stl, stl_hash_edge *edge_a, stl_hash_edge *edge_b) { int i; int j; if (stl->error) return; /* Facet a's neighbor is facet b */ stl->neighbors_start[edge_a->facet_number].neighbor[edge_a->which_edge % 3] = edge_b->facet_number; /* sets the .neighbor par...
0
[ "CWE-125" ]
admesh
e84d8353f1347e1f26f0a95770d92ba14e6ede38
192,277,422,063,074,420,000,000,000,000,000,000,000
59
Fix heap buffer overflow in stl_update_connects_remove_1 - Add argument value check to the stl_update_connects_remove_1 - Add neighbor value check in stl_remove_degenerate Fixes https://github.com/admesh/admesh/issues/28 Merges https://github.com/admesh/admesh/pull/55
bool Item_ref::send(Protocol *prot, st_value *buffer) { if (result_field) return prot->store(result_field); return (*ref)->send(prot, buffer); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
169,013,761,158,760,570,000,000,000,000,000,000,000
6
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.
static void pxa2xx_rtc_sysbus_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); k->init = pxa2xx_rtc_init; dc->desc = "PXA2xx RTC Controller"; dc->vmsd = &vmstate_pxa2xx_rtc_regs; }
0
[ "CWE-119" ]
qemu
caa881abe0e01f9931125a0977ec33c5343e4aa7
250,770,507,399,949,760,000,000,000,000,000,000,000
9
pxa2xx: avoid buffer overrun on incoming migration CVE-2013-4533 s->rx_level is read from the wire and used to determine how many bytes to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the length of s->rx_fifo[] the buffer can be overrun with arbitrary data from the wire. Fix this by validating rx_leve...
static int compat_do_replace(struct net *net, void __user *user, unsigned int len) { int ret; struct compat_arpt_replace tmp; struct xt_table_info *newinfo; void *loc_cpu_entry; struct arpt_entry *iter; if (copy_from_user(&tmp, user, sizeof(tmp)) != 0) return -EFAULT; /* overflow check */ if (tmp.nu...
0
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
58,073,215,226,614,650,000,000,000,000,000,000,000
47
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp, struct nfsd4_secinfo *secinfo) { DECODE_HEAD; READ_BUF(4); secinfo->si_namelen = be32_to_cpup(p++); READ_BUF(secinfo->si_namelen); SAVEMEM(secinfo->si_name, secinfo->si_namelen); status = check_filename(secinfo->si_name, secinfo->si_namelen); if (stat...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
151,093,474,680,851,800,000,000,000,000,000,000,000
14
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
bool TABLE::update_const_key_parts(COND *conds) { bzero((char*) const_key_parts, sizeof(key_part_map) * s->keys); if (conds == NULL) return FALSE; for (uint index= 0; index < s->keys; index++) { KEY_PART_INFO *keyinfo= key_info[index].key_part; KEY_PART_INFO *keyinfo_end= keyinfo + key_info[index]...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
15,602,493,177,981,983,000,000,000,000,000,000,000
22
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.
static struct io_wq_work *io_wq_free_work(struct io_wq_work *work) { struct io_kiocb *req = container_of(work, struct io_kiocb, work); req = io_put_req_find_next(req); return req ? &req->work : NULL;
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
212,927,005,854,958,900,000,000,000,000,000,000,000
7
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...
i915_gem_execbuffer_relocate(struct drm_device *dev, struct eb_objects *eb, struct list_head *objects) { struct drm_i915_gem_object *obj; int ret = 0; /* This is the fast path and we cannot handle a pagefault whilst * holding the struct mutex lest the user pass in the relocations * contained wit...
0
[ "CWE-189" ]
linux-2.6
ed8cd3b2cd61004cab85380c52b1817aca1ca49b
291,686,762,275,687,740,000,000,000,000,000,000,000
24
drm/i915: fix integer overflow in i915_gem_execbuffer2() On 32-bit systems, a large args->buffer_count from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access. This vulnerability was introduced in commit 8408c282 ("drm/i915: First try a normal large kmalloc for the temporary exec bu...
rsvg_set_default_dpi_x_y (double dpi_x, double dpi_y) { if (dpi_x <= 0.) rsvg_internal_dpi_x = RSVG_DEFAULT_DPI_X; else rsvg_internal_dpi_x = dpi_x; if (dpi_y <= 0.) rsvg_internal_dpi_y = RSVG_DEFAULT_DPI_Y; else rsvg_internal_dpi_y = dpi_y; }
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
226,533,443,624,689,400,000,000,000,000,000,000,000
12
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
static void parse_url(const char *src_url, struct host_info *h) { char *url, *p, *sp; free(h->allocated); h->allocated = url = xstrdup(src_url); h->protocol = P_FTP; p = strstr(url, "://"); if (p) { *p = '\0'; h->host = p + 3; if (strcmp(url, P_FTP) == 0) { h->port = bb_lookup_port(P_FTP, "tcp", 21); ...
0
[ "CWE-120" ]
busybox
8e2174e9bd836e53c8b9c6e00d1bc6e2a718686e
333,686,641,777,475,170,000,000,000,000,000,000,000
87
wget: check chunk length for overflowing off_t function old new delta retrieve_file_data 428 465 +37 wget_main 2386 2389 +3 -----------------------------------------------------...
void iwl_fw_error_print_fseq_regs(struct iwl_fw_runtime *fwrt) { struct iwl_trans *trans = fwrt->trans; unsigned long flags; int i; struct { u32 addr; const char *str; } fseq_regs[] = { FSEQ_REG(FSEQ_ERROR_CODE), FSEQ_REG(FSEQ_TOP_INIT_VERSION), FSEQ_REG(FSEQ_CNVIO_INIT_VERSION), FSEQ_REG(FSEQ_OTP_VERS...
0
[ "CWE-400", "CWE-401" ]
linux
b4b814fec1a5a849383f7b3886b654a13abbda7d
239,453,067,041,488,870,000,000,000,000,000,000,000
35
iwlwifi: dbg_ini: fix memory leak in alloc_sgtable In alloc_sgtable if alloc_page fails, the alocated table should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
void swiotlb_tbl_unmap_single(struct device *dev, phys_addr_t tlb_addr, size_t mapping_size, enum dma_data_direction dir, unsigned long attrs) { /* * First, sync the memory before unmapping the entry */ if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) && (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTI...
0
[ "CWE-200", "CWE-401" ]
linux
aa6f8dcbab473f3a3c7454b74caa46d36cdc5d13
222,122,729,194,676,150,000,000,000,000,000,000,000
13
swiotlb: rework "fix info leak with DMA_FROM_DEVICE" Unfortunately, we ended up merging an old version of the patch "fix info leak with DMA_FROM_DEVICE" instead of merging the latest one. Christoph (the swiotlb maintainer), he asked me to create an incremental fix (after I have pointed this out the mix up, and asked h...
static int fat_add_new_entries(struct inode *dir, void *slots, int nr_slots, int *nr_cluster, struct msdos_dir_entry **de, struct buffer_head **bh, loff_t *i_pos) { struct super_block *sb = dir->i_sb; struct msdos_sb_info *sbi = MSDOS_SB(sb); struct buffer_head *bhs[MAX_BUF_PER_PAGE]; sector_t b...
0
[]
linux-2.6
c483bab099cb89e92b7cad94a52fcdaf37e56657
25,647,884,511,691,234,000,000,000,000,000,000,000
79
fat: fix VFAT compat ioctls on 64-bit systems If you compile and run the below test case in an msdos or vfat directory on an x86-64 system with -m32 you'll get garbage in the kernel_dirent struct followed by a SIGSEGV. The patch fixes this. Reported and initial fix by Bart Oldeman #include <sys/types.h> #include <s...
warn_junk_bytes (long bytes_skipped) { error (0, 0, ngettext ("warning: skipped %ld byte of junk", "warning: skipped %ld bytes of junk", bytes_skipped), bytes_skipped); }
0
[]
cpio
746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
230,487,801,434,126,550,000,000,000,000,000,000,000
6
Fix memory overrun on reading improperly created link records. See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html * src/copyin.c (get_link_name): New function. (list_file, copyin_link): use get_link_name * tests/symlink-bad-length.at: New file. * tests/symlink-long.at: New file. * tests/Makefile.am...
static void io_submit_flush_completions(struct io_ring_ctx *ctx) { struct io_comp_state *cs = &ctx->submit_state.comp; int i, nr = cs->nr; struct req_batch rb; spin_lock_irq(&ctx->completion_lock); for (i = 0; i < nr; i++) { struct io_kiocb *req = cs->reqs[i]; __io_cqring_fill_event(ctx, req->user_data, req-...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
17,791,648,641,186,402,000,000,000,000,000,000,000
29
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val) { address_space_stl_notdirty(as, addr, val, MEMTXATTRS_UNSPECIFIED, NULL); }
0
[]
qemu
e4a511f8cc6f4a46d409fb5c9f72c38ba45f8d83
193,244,384,689,351,450,000,000,000,000,000,000,000
4
exec: clamp accesses against the MemoryRegionSection Because the clamping was done against the MemoryRegion, address_space_rw was effectively broken if a write spanned multiple sections that are not linear in underlying memory (with the memory not being under an IOMMU). This is visible with the MIPS rc4030 IOMMU, whi...
uipbuf_get_next_header(uint8_t *buffer, uint16_t size, uint8_t *protocol, bool start) { int curr_hdr_len = 0; int next_hdr_len = 0; uint8_t *next_header = NULL; struct uip_ip_hdr *ipbuf = NULL; struct uip_ext_hdr *curr_ext = NULL; struct uip_ext_hdr *next_ext = NULL; if(start) { /* protocol in the IP...
0
[ "CWE-787" ]
contiki-ng
9cdec6e19865d7b0d8caf61f1a34001f64d565b0
150,266,309,123,968,390,000,000,000,000,000,000,000
52
Prevent a possible read out of bounds in the processing of IPv6 extension headers.
BGD_DECLARE(void) gdImageGetClip (gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P) { *x1P = im->cx1; *y1P = im->cy1; *x2P = im->cx2; *y2P = im->cy2; }
0
[ "CWE-190" ]
libgd
cfee163a5e848fc3e3fb1d05a30d7557cdd36457
73,174,401,514,105,460,000,000,000,000,000,000,000
7
- #18, Removed invalid gdFree call when overflow2 fails - #17, Free im->pixels as well on error
void wmi_event_worker(struct work_struct *work) { struct wil6210_priv *wil = container_of(work, struct wil6210_priv, wmi_event_worker); struct pending_wmi_event *evt; struct list_head *lh; wil_dbg_wmi(wil, "event_worker: Start\n"); while ((lh = next_wmi_ev(wil)) != NULL) { evt = list_entry(lh, struct pen...
0
[ "CWE-119" ]
linux
b5a8ffcae4103a9d823ea3aa3a761f65779fbe2a
32,186,086,374,205,077,000,000,000,000,000,000,000
15
wil6210: missing length check in wmi_set_ie Add a length check in wmi_set_ie to detect unsigned integer overflow. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
GetDefaultOpClass(Oid type_id, Oid am_id) { Oid result = InvalidOid; int nexact = 0; int ncompatible = 0; int ncompatiblepreferred = 0; Relation rel; ScanKeyData skey[1]; SysScanDesc scan; HeapTuple tup; TYPCATEGORY tcategory; /* If it's a domain, look at the base type instead */ type_id = getBaseTy...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
53,754,143,847,243,485,000,000,000,000,000,000,000
85
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
void LinkResolver::linktime_resolve_special_method(methodHandle& resolved_method, KlassHandle resolved_klass, Symbol* method_name, Symbol* method_signature, KlassHandle current_klass, bool check_access, TRAPS) { // ...
0
[]
jdk8u
f14e35d20e1a4d0f507f05838844152f2242c6d3
284,715,169,442,949,040,000,000,000,000,000,000,000
92
8281866: Enhance MethodHandle invocations Reviewed-by: andrew Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
xsltCopyTreeList(xsltTransformContextPtr ctxt, xmlNodePtr invocNode, xmlNodePtr list, xmlNodePtr insert, int isLRE, int topElemVisited) { xmlNodePtr copy, ret = NULL; while (list != NULL) { copy = xsltCopyTreeInternal(ctxt, invocNode, list, insert, isLRE, topElemVisited); if (copy != NULL) { ...
0
[]
libxslt
937ba2a3eb42d288f53c8adc211bd1122869f0bf
52,222,231,350,786,170,000,000,000,000,000,000,000
18
Fix default template processing on namespace nodes
string expectedResult() { return str(); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
48,560,526,390,638,720,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static BIGNUM * cf2bn(const u8 *buf, size_t bufsize, BIGNUM *num) { u8 tmp[512]; invert_buf(tmp, buf, bufsize); return BN_bin2bn(tmp, bufsize, num); }
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
235,022,430,423,680,440,000,000,000,000,000,000,000
8
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
srs_forward(srs_t *srs, char *buf, unsigned buflen, const char *sender, const char *alias) { char *senduser; char *sendhost; char *tmp; unsigned len; if (srs->noforward) return SRS_ENOTREWRITTEN; /* This is allowed to be a plain domain */ while ((tmp = strchr(alias, '@')) != NULL) alias = tmp + 1; ...
0
[ "CWE-400", "CWE-703", "CWE-834" ]
postsrsd
4733fb11f6bec6524bb8518c5e1a699288c26bac
20,494,630,932,285,894,000,000,000,000,000,000,000
41
SECURITY: Fix potential denial of service attack against PostSRSd I discovered that PostSRSd could be tricked into consuming a lot of CPU time with an SRS address that has an excessively long time stamp tag, e.g. SRS0=HHHH=TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT=0@example.com
read_addr_restrictions( struct recvbuf * rbufp ) { u_int idx; idx = 0; send_restrict_list(restrictlist4, FALSE, &idx); send_restrict_list(restrictlist6, TRUE, &idx); ctl_flushpkt(0); }
0
[ "CWE-22" ]
ntp
184516e143ce4448ddb5b9876dd372008cc779f6
34,806,256,501,605,420,000,000,000,000,000,000,000
11
[TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command.
char *AllocString(cmsIT8* it8, const char* str) { cmsUInt32Number Size = (cmsUInt32Number) strlen(str)+1; char *ptr; ptr = (char *) AllocChunk(it8, Size); if (ptr) strncpy (ptr, str, Size-1); return ptr; }
0
[]
Little-CMS
65e2f1df3495edc984f7e0d7b7b24e29d851e240
111,303,963,220,362,230,000,000,000,000,000,000,000
11
Fix some warnings from static analysis
ofputil_pull_phy_port(enum ofp_version ofp_version, struct ofpbuf *b, struct ofputil_phy_port *pp) { memset(pp, 0, sizeof *pp); switch (ofp_version) { case OFP10_VERSION: { const struct ofp10_phy_port *opp = ofpbuf_try_pull(b, sizeof *opp); return opp ? ofputil_decode_...
0
[ "CWE-617", "CWE-703" ]
ovs
4af6da3b275b764b1afe194df6499b33d2bf4cde
256,243,545,355,289,470,000,000,000,000,000,000,000
24
ofp-group: Don't assert-fail decoding bad OF1.5 group mod type or command. When decoding a group mod, the current code validates the group type and command after the whole group mod has been decoded. The OF1.5 decoder, however, tries to use the type and command earlier, when it might still be invalid. This caused an...
void decode_decrypt_enc_bl(CephContext *cct, T& t, CryptoKey key, bufferlist& bl_enc, std::string &error) { uint64_t magic; bufferlist bl; if (key.decrypt(cct, bl_enc, bl, &error) < 0) return; bufferlist::iterator iter2 = bl.begin(); __u8 struct_v; ::decode(struct_v, iter2); ::decode(magic, i...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
147,671,429,327,169,860,000,000,000,000,000,000,000
22
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_TMP(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2, free_op_data2, free_op_data1; zval **var_ptr; zval *value; switch (opline->extended_value) { case...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
121,090,226,384,636,420,000,000,000,000,000,000,000
80
- 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 MagickBooleanType GetICCProperty(const Image *image,const char *property) { const StringInfo *profile; magick_unreferenced(property); profile=GetImageProfile(image,"icc"); if (profile == (StringInfo *) NULL) profile=GetImageProfile(image,"icm"); if (profile == (StringInfo *) NULL) return(...
0
[ "CWE-476" ]
ImageMagick6
5bf7ff59c8ada957d6a681a0a2cc29f3813ad4bc
114,724,997,214,884,680,000,000,000,000,000,000,000
77
https://github.com/ImageMagick/ImageMagick/issues/1225
virtual bool prefetch_data() { return false; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
2,406,231,842,739,021,000,000,000,000,000,000,000
1
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 <...
static uint16_t nvme_map_sgl(NvmeCtrl *n, NvmeSg *sg, NvmeSglDescriptor sgl, size_t len, NvmeCmd *cmd) { /* * Read the segment in chunks of 256 descriptors (one 4k page) to avoid * dynamically allocating a potentially huge SGL. The spec allows the SGL * to be larger (as i...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
251,449,264,529,581,100,000,000,000,000,000,000,000
142
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
static ssize_t qeth_core_driver_group_store(struct device_driver *ddrv, const char *buf, size_t count) { int err; err = ccwgroup_create_dev(qeth_core_root_dev, &qeth_core_ccwgroup_driver, 3, buf); return err ? err : count; }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
314,016,329,871,318,000,000,000,000,000,000,000,000
10
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
void SetRemoteIP(const CString& s) { m_sRemoteIP = s; }
0
[ "CWE-399" ]
znc
11508aa72efab4fad0dbd8292b9614d9371b20a9
288,121,709,209,251,040,000,000,000,000,000,000,000
1
Fix crash in bouncedcc module. It happens when DCC RESUME is received. Affected ZNC versions: 0.200, 0.202. Thanks to howeyc for reporting this and providing the patch.
void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { if (sr->fd_is_fdt == MK_TRUE) { mk_vhost_close(sr); } else { close(sr->fd_file); } } if (sr->headers.location) { mk_mem_free(sr->headers.location); } if (sr->ur...
0
[ "CWE-20" ]
monkey
b2d0e6f92310bb14a15aa2f8e96e1fb5379776dd
99,981,912,361,018,360,000,000,000,000,000,000,000
23
Request: new request session flag to mark those files opened by FDT This patch aims to fix a potential DDoS problem that can be caused in the server quering repetitive non-existent resources. When serving a static file, the core use Vhost FDT mechanism, but if it sends a static error page it does a direct open(2). Wh...
ModuleExport size_t RegisterINLINEImage(void) { MagickInfo *entry; entry=AcquireMagickInfo("DATA","INLINE","Base64-encoded inline images"); entry->decoder=(DecodeImageHandler *) ReadINLINEImage; entry->encoder=(EncodeImageHandler *) WriteINLINEImage; entry->format_type=ImplicitFormatType; (void) Regist...
0
[ "CWE-772", "CWE-401" ]
ImageMagick
d5559407ce29f4371e5df9c1cbde65455fe5854c
76,862,687,416,906,660,000,000,000,000,000,000,000
17
https://github.com/ImageMagick/ImageMagick/issues/572
static int init_usb_class(void) { int result = 0; if (usb_class != NULL) { kref_get(&usb_class->kref); goto exit; } usb_class = kmalloc(sizeof(*usb_class), GFP_KERNEL); if (!usb_class) { result = -ENOMEM; goto exit; } kref_init(&usb_class->kref); usb_class->class = class_create(THIS_MODULE, "usbmisc"...
0
[ "CWE-362" ]
linux
303911cfc5b95d33687d9046133ff184cf5043ff
266,257,887,937,432,700,000,000,000,000,000,000,000
29
USB: core: Fix races in character device registration and deregistraion The syzbot fuzzer has found two (!) races in the USB character device registration and deregistration routines. This patch fixes the races. The first race results from the fact that usb_deregister_dev() sets usb_minors[intf->minor] to NULL befor...
static int send_information_req(GDHCPClient *dhcp_client) { return send_dhcpv6_msg(dhcp_client, DHCPV6_INFORMATION_REQ, "information-req"); }
0
[]
connman
a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1
150,640,054,920,579,190,000,000,000,000,000,000,000
5
gdhcp: Avoid leaking stack data via unitiialized variable Fixes: CVE-2021-26676
static BOOL update_send_line_to(rdpContext* context, const LINE_TO_ORDER* line_to) { wStream* s; int offset; int headerLength; ORDER_INFO orderInfo; int inf; rdpUpdate* update = context->update; headerLength = update_prepare_order_info(context, &orderInfo, ORDER_TYPE_LINE_TO); inf = update_approximate_line_to_o...
0
[ "CWE-125" ]
FreeRDP
f8890a645c221823ac133dbf991f8a65ae50d637
46,756,666,496,663,800,000,000,000,000,000,000,000
27
Fixed #6005: Bounds checks in update_read_bitmap_data
window_map_cb (GSWindow *window, GSManager *manager) { gs_debug ("Handling window map event"); }
0
[]
gnome-screensaver
2f597ea9f1f363277fd4dfc109fa41bbc6225aca
6,171,010,778,612,216,000,000,000,000,000,000,000
5
Fix adding monitors Make sure to show windows that are added. And fix an off by one bug.
static void __exit cbq_module_exit(void) { unregister_qdisc(&cbq_qdisc_ops); }
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
264,686,090,733,915,250,000,000,000,000,000,000,000
4
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
ex_recover(exarg_T *eap) { // Set recoverymode right away to avoid the ATTENTION prompt. recoverymode = TRUE; if (!check_changed(curbuf, (p_awa ? CCGD_AW : 0) | CCGD_MULTWIN | (eap->forceit ? CCGD_FORCEIT : 0) | CCGD_EXCMD) && (*eap->arg == NUL || setfname(curbuf, eap->...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
330,702,220,264,595,260,000,000,000,000,000,000,000
14
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.