func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static zend_never_inline void ZEND_FASTCALL _zend_hash_iterators_remove(HashTable *ht) { HashTableIterator *iter = EG(ht_iterators); HashTableIterator *end = iter + EG(ht_iterators_used); while (iter != end) { if (iter->ht == ht) { iter->ht = HT_POISONED_PTR; } iter++; } }
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
36,122,030,635,507,343,000,000,000,000,000,000,000
12
Fix #73832 - leave the table in a safe state if the size is too big.
static struct snd_seq_queue *queue_list_remove(int id, int client) { struct snd_seq_queue *q; unsigned long flags; spin_lock_irqsave(&queue_list_lock, flags); q = queue_list[id]; if (q) { spin_lock(&q->owner_lock); if (q->owner == client) { /* found */ q->klocked = 1; spin_unlock(&q->owner_lock); ...
0
[ "CWE-362" ]
linux
3567eb6af614dac436c4b16a8d426f9faed639b3
101,038,602,837,664,010,000,000,000,000,000,000,000
23
ALSA: seq: Fix race at timer setup and close ALSA sequencer code has an open race between the timer setup ioctl and the close of the client. This was triggered by syzkaller fuzzer, and a use-after-free was caught there as a result. This patch papers over it by adding a proper queue->timer_mutex lock around the timer...
BaseType_t xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken ) { StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; configASSERT( ...
0
[ "CWE-190" ]
FreeRTOS-Kernel
d05b9c123f2bf9090bce386a244fc934ae44db5b
74,654,353,282,095,520,000,000,000,000,000,000,000
29
Add addition overflow check for stream buffer (#226)
int SN_Client_Unsubscribe(MqttClient *client, SN_Unsubscribe *unsubscribe) { int rc, len; /* Validate required arguments */ if (client == NULL || unsubscribe == NULL) { return MQTT_CODE_ERROR_BAD_ARG; } if (unsubscribe->stat == MQTT_MSG_BEGIN) { #ifdef WOLFMQTT_MULTITHREAD /* L...
0
[ "CWE-787" ]
wolfMQTT
84d4b53122e0fa0280c7872350b89d5777dabbb2
39,558,803,972,797,633,000,000,000,000,000,000,000
85
Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free
char *ndpi_get_proto_name(struct ndpi_detection_module_struct *ndpi_str, u_int16_t proto_id) { if((proto_id >= ndpi_str->ndpi_num_supported_protocols) || (proto_id >= (NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS)) || (ndpi_str->proto_defaults[proto_id].protoName == NULL)) proto_id ...
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
8,907,373,266,710,657,000,000,000,000,000,000,000
9
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
winlink_clear_flags(struct winlink *wl) { struct winlink *loop; wl->window->flags &= ~WINDOW_ALERTFLAGS; TAILQ_FOREACH(loop, &wl->window->winlinks, wentry) { if ((loop->flags & WINLINK_ALERTFLAGS) != 0) { loop->flags &= ~WINLINK_ALERTFLAGS; server_status_session(loop->session); } } }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
273,128,156,973,462,000,000,000,000,000,000,000,000
12
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
*/ private int mconvert(struct magic_set *ms, struct magic *m, int flip) { union VALUETYPE *p = &ms->ms_value; uint8_t type; switch (type = cvt_flip(m->type, flip)) { case FILE_BYTE: cvt_8(p, m); return 1; case FILE_SHORT: cvt_16(p, m); return 1; case FILE_LONG: case FILE_DATE: case FILE_LDATE: cvt_...
1
[ "CWE-119", "CWE-787" ]
file
27a14bc7ba285a0a5ebfdb55e54001aa11932b08
63,127,382,122,265,860,000,000,000,000,000,000,000
138
Correctly compute the truncated pascal string size (Francisco Alonso and Jan Kaluza at RedHat)
void HttpRequestEntry::resetHttpHeaderProcessor() { proc_ = make_unique<HttpHeaderProcessor>(HttpHeaderProcessor::CLIENT_PARSER); }
0
[ "CWE-532" ]
aria2
37368130ca7de5491a75fd18a20c5c5cc641824a
68,102,335,698,546,590,000,000,000,000,000,000,000
4
Mask headers
static void clean_dir(const char *name, int *pidarr, int start_pid, int max_pids) { DIR *dir; if (!(dir = opendir(name))) { fwarning("cannot clean %s directory\n", name); return; // we live to fight another day! } // clean leftover files struct dirent *entry; char *end; while ((entry = readdir(dir)) != NULL...
0
[ "CWE-284", "CWE-732" ]
firejail
eecf35c2f8249489a1d3e512bb07f0d427183134
189,733,277,119,609,200,000,000,000,000,000,000,000
23
mount runtime seccomp files read-only (#2602) avoid creating locations in the file system that are both writable and executable (in this case for processes with euid of the user). for the same reason also remove user owned libfiles when it is not needed any more
int iwl_fw_dbg_collect(struct iwl_fw_runtime *fwrt, enum iwl_fw_dbg_trigger trig, const char *str, size_t len, struct iwl_fw_dbg_trigger_tlv *trigger) { struct iwl_fw_dump_desc *desc; unsigned int delay = 0; bool monitor_only = false; if (trigger) { u16 occurrences = le16_to_cpu(trigge...
0
[ "CWE-400", "CWE-401" ]
linux
b4b814fec1a5a849383f7b3886b654a13abbda7d
185,875,951,263,182,930,000,000,000,000,000,000,000
40
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>
UnregisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg) { ExprContext_CB **prev_callback; ExprContext_CB *ecxt_callback; prev_callback = &econtext->ecxt_callbacks; while ((ecxt_callback = *prev_callback) != NULL) { if (ecxt_callback->function == f...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
211,025,534,246,208,900,000,000,000,000,000,000,000
20
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
virtual Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item) { return const_item; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
46,070,298,289,268,710,000,000,000,000,000,000,000
5
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int ctrl_fill_mcgrp_info(const struct genl_family *family, const struct genl_multicast_group *grp, int grp_id, u32 portid, u32 seq, u32 flags, struct sk_buff *skb, u8 cmd) { void *hdr; struct nlattr *nla_grps; struct nlattr *nest; hdr = genlmsg_put(skb, portid, seq, &genl_ctrl, flags, cmd); if ...
0
[ "CWE-399", "CWE-401" ]
linux
ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2
277,365,859,039,728,870,000,000,000,000,000,000,000
40
genetlink: Fix a memory leak on error path In genl_register_family(), when idr_alloc() fails, we forget to free the memory we possibly allocate for family->attrbuf. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: 2ae0f17df1cd ("genetlink: use idr to track families") Signed-off-by: YueHaibing <yuehaibing@huawei.com...
static int __uac_clock_find_source(struct snd_usb_audio *chip, int entity_id, unsigned long *visited, bool validate) { struct uac_clock_source_descriptor *source; struct uac_clock_selector_descriptor *selector; struct uac_clock_multiplier_descriptor *multiplier; entity_id &= 0xff; if (test_and_set_...
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
181,084,047,437,838,550,000,000,000,000,000,000,000
89
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...
static int diffie_hellman_sha1(LIBSSH2_SESSION *session, _libssh2_bn *g, _libssh2_bn *p, int group_order, unsigned char packet_type_init, unsigned char packet_type_r...
0
[ "CWE-200" ]
libssh2
ca5222ea819cc5ed797860070b4c6c1aeeb28420
309,445,912,498,133,860,000,000,000,000,000,000,000
613
diffie_hellman_sha256: convert bytes to bits As otherwise we get far too small numbers. Reported-by: Andreas Schneider CVE-2016-0787
xmlDOMWrapNSNormDeclareNsForced(xmlDocPtr doc, xmlNodePtr elem, const xmlChar *nsName, const xmlChar *prefix, int checkShadow) { xmlNsPtr ret; char buf[50]; const xmlChar *pref; int counter = 0; if ((doc == NULL) || (elem == NULL) || (elem->type != XML_ELEMENT_NODE)) return...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
295,693,437,405,918,640,000,000,000,000,000,000,000
58
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
dtls1_process_record(SSL *s) { int al; int clear=0; int enc_err; SSL_SESSION *sess; SSL3_RECORD *rr; unsigned int mac_size; unsigned char md[EVP_MAX_MD_SIZE]; int decryption_failed_or_bad_record_mac = 0; unsigned char *mac = NULL; rr= &(s->s3->rrec); sess = s->session; /* At this point, s->pa...
1
[ "CWE-310" ]
openssl
2928cb4c82d6516d9e65ede4901a5957d8c39c32
26,858,544,350,272,930,000,000,000,000,000,000,000
143
Fixups.
void sctp_ootb_pkt_free(struct sctp_packet *packet) { sctp_transport_free(packet->transport); }
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
46,040,856,499,317,340,000,000,000,000,000,000,000
4
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
GF_FilterPid *gf_filter_get_opid(GF_Filter *filter, u32 idx) { return gf_list_get(filter->output_pids, idx); }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
4,863,285,797,849,462,000,000,000,000,000,000,000
4
fixed crashes for very long path - cf #1908
static ssize_t oom_adjust_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct task_struct *task; char buffer[PROC_NUMBUF]; int oom_adjust; unsigned long flags; int err; memset(buffer, 0, sizeof(buffer)); if (count > sizeof(buffer) - 1) count = sizeof(buffer) - 1; if (cop...
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
314,916,748,429,160,900,000,000,000,000,000,000,000
74
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
smtp_tx_rcpt_to(struct smtp_tx *tx, const char *line) { char *opt, *p; char *copy; char tmp[SMTP_LINE_MAX]; (void)strlcpy(tmp, line, sizeof tmp); copy = tmp; if (tx->rcptcount >= env->sc_session_max_rcpt) { smtp_reply(tx->session, "451 %s %s: Too many recipients", esc_code(ESC_STATUS_TEMPFAIL, ESC_TOO_...
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
199,461,024,994,857,200,000,000,000,000,000,000,000
69
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
delete_all_jobs (running_only) int running_only; { register int i; sigset_t set, oset; BLOCK_CHILD (set, oset); /* XXX - need to set j_lastj, j_firstj appropriately if running_only != 0. */ if (js.j_jobslots) { js.j_current = js.j_previous = NO_JOB; /* XXX could use js.j_firstj here */...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
60,778,616,869,904,040,000,000,000,000,000,000,000
43
bash-4.4-rc2 release
static int _ffs_name_dev(struct ffs_dev *dev, const char *name) { struct ffs_dev *existing; existing = _ffs_do_find_dev(name); if (existing) return -EBUSY; dev->name = name; return 0; }
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
63,401,033,153,227,150,000,000,000,000,000,000,000
12
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
ldns_rr_list2buffer_str_fmt(ldns_buffer *output, const ldns_output_format *fmt, const ldns_rr_list *list) { uint16_t i; for(i = 0; i < ldns_rr_list_rr_count(list); i++) { (void) ldns_rr2buffer_str_fmt(output, fmt, ldns_rr_list_rr(list, i)); } return ldns_buffer_status(output); }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
107,111,136,846,202,300,000,000,000,000,000,000,000
11
CAA and URI
static int setup_req (struct usb_ep *ep, struct usb_request *req, u16 len) { struct dev_data *dev = ep->driver_data; if (dev->setup_out_ready) { DBG (dev, "ep0 request busy!\n"); return -EBUSY; } if (len > sizeof (dev->rbuf)) req->buf = kmalloc(len, GFP_ATOMIC); if (req->buf == NULL) { req->buf = dev->rbu...
0
[ "CWE-763" ]
linux
501e38a5531efbd77d5c73c0ba838a889bfc1d74
168,074,889,734,849,990,000,000,000,000,000,000,000
19
usb: gadget: clear related members when goto fail dev->config and dev->hs_config and dev->dev need to be cleaned if dev_config fails to avoid UAF. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Link: https://lore.kernel.org/r/20211231172138.7993-3-hbh25y@gmail.com Signed...
static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_sr_msg *sr = &req->sr_msg; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; sr->umsg = u64_to_user_ptr(READ_ONCE(sqe->addr)); sr->len = READ_ONCE(sqe->len); sr->msg_flags = READ_ONCE(sqe->msg_flags)...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
306,634,143,777,475,120,000,000,000,000,000,000,000
19
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
static void ext4_da_update_reserve_space(struct inode *inode, int used) { struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); int total, mdb, mdb_free; spin_lock(&EXT4_I(inode)->i_block_reservation_lock); /* recalculate the number of metablocks still need to be reserved */ total = EXT4_I(inode)->i_reserved_data_bloc...
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
303,019,751,156,189,950,000,000,000,000,000,000,000
30
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
sf_error_number (int errnum) { static const char *bad_errnum = "No error defined for this error number. This is a bug in libsndfile." ; int k ; if (errnum == SFE_MAX_ERROR) return SndfileErrors [0].str ; if (errnum < 0 || errnum > SFE_MAX_ERROR) { /* This really shouldn't happen in release versions. */ prin...
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
54,607,940,370,796,050,000,000,000,000,000,000,000
20
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
static void find_compressor(char * compressor_name, int len, MOVTrack *track) { AVDictionaryEntry *encoder; int xdcam_res = (track->par->width == 1280 && track->par->height == 720) || (track->par->width == 1440 && track->par->height == 1080) || (track->par->width == 1920 && ...
0
[ "CWE-125" ]
FFmpeg
95556e27e2c1d56d9e18f5db34d6f756f3011148
29,327,538,710,397,003,000,000,000,000,000,000,000
27
avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample Fixes: out of array read Fixes: ffmpeg_crash_8.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end, ScanEnv* env) { int r, neg, len, fetched, and_start; OnigCodePoint v, vs; UChar *p; Node* node; CClassNode *cc, *prev_cc; CClassNode work_cc; enum CCSTATE state; enum CCVALTYPE val_type, in_type; int val_israw, in_israw; prev_...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
71,030,220,576,810,230,000,000,000,000,000,000,000
325
onig-5.9.2
txid_snapshot_send(PG_FUNCTION_ARGS) { TxidSnapshot *snap = (TxidSnapshot *) PG_GETARG_VARLENA_P(0); StringInfoData buf; uint32 i; pq_begintypsend(&buf); pq_sendint(&buf, snap->nxip, 4); pq_sendint64(&buf, snap->xmin); pq_sendint64(&buf, snap->xmax); for (i = 0; i < snap->nxip; i++) pq_sendint64(&buf, snap-...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
149,909,729,717,829,080,000,000,000,000,000,000,000
14
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static void gprinter_cleanup(void) { if (major) { unregister_chrdev_region(MKDEV(major, 0), minors); major = minors = 0; } class_destroy(usb_gadget_class); usb_gadget_class = NULL; }
0
[ "CWE-416" ]
linux
e8d5f92b8d30bb4ade76494490c3c065e12411b1
154,299,547,391,631,790,000,000,000,000,000,000,000
9
usb: gadget: function: printer: fix use-after-free in __lock_acquire Fix this by increase object reference count. BUG: KASAN: use-after-free in __lock_acquire+0x3fd4/0x4180 kernel/locking/lockdep.c:3831 Read of size 8 at addr ffff8880683b0018 by task syz-executor.0/3377 CPU: 1 PID: 3377 Comm: syz-executor.0 Not tain...
print_emulators(const gs_main_instance *minst) { outprintf(minst->heap, "%s", help_emulators); { const byte *s; for (s = gs_emulators; s[0] != 0; s += strlen((const char *)s) + 1) outprintf(minst->heap, " %s", s); } outprintf(minst->heap, "\n"); }
0
[]
ghostpdl
407cc61e87b0fd9d44d72ca740af7d3c85dee78d
297,002,064,081,782,130,000,000,000,000,000,000,000
11
"starting_arg_file" should only apply once. The "starting_arg_file == true" setting should apply to the *first* call to lib_file_open() in the context of a given call to runarg(). Previously, it remained set for the entire duration of the runarg() call, resulting in the current directory being searched for any resourc...
static void xdr_buf_try_expand(struct xdr_buf *buf, unsigned int len) { struct kvec *head = buf->head; struct kvec *tail = buf->tail; unsigned int sum = head->iov_len + buf->page_len + tail->iov_len; unsigned int free_space, newlen; if (sum > buf->len) { free_space = min_t(unsigned int, sum - buf->len, len); ...
0
[ "CWE-119", "CWE-787" ]
linux
6d1c0f3d28f98ea2736128ed3e46821496dc3a8c
24,509,649,115,672,070,000,000,000,000,000,000,000
25
sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base() This seems to happen fairly easily during READ_PLUS testing on NFS v4.2. I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr greater than the number of pages in the array. So let's just return early if we're setting base to a poin...
void mobi_free_opf_manifest(OPFmanifest *manifest) { if (manifest) { mobi_free_opf_struct_3el(manifest->item, id, href, media_type); free(manifest); } }
0
[ "CWE-476" ]
libmobi
c0699c8693c47f14a2e57dec7292e862ac7adf9c
136,106,440,643,417,330,000,000,000,000,000,000,000
6
Fix undefined behavior when passing null to strdup
static __be16 ipx_map_frame_type(unsigned char type) { __be16 rc = 0; switch (type) { case IPX_FRAME_ETHERII: rc = htons(ETH_P_IPX); break; case IPX_FRAME_8022: rc = htons(ETH_P_802_2); break; case IPX_FRAME_SNAP: rc = htons(ETH_P_SNAP); break; case IPX_FRAME_8023: rc = htons(ETH_P_802_3); break; } return r...
0
[ "CWE-416" ]
linux
ee0d8d8482345ff97a75a7d747efc309f13b0d80
196,981,260,989,645,240,000,000,000,000,000,000,000
13
ipx: call ipxitf_put() in ioctl error path We should call ipxitf_put() if the copy_to_user() fails. Reported-by: 李强 <liqiang6-s@360.cn> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int cert_self_signed(X509 *x) { /* * FIXME: x509v3_cache_extensions() needs to detect more failures and not * set EXFLAG_SET when that happens. Especially, if the failures are * parse errors, rather than memory pressure! */ X509_check_purpose(x, -1, 0); if (x->ex_flags & EXFLAG_S...
0
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
139,581,969,949,389,090,000,000,000,000,000,000,000
13
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
#define stat_inc_node_blk_count(sbi, blks, gc_type) do { } while (0)
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
95,595,523,993,300,890,000,000,000,000,000,000,000
1
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
int kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) { if (__kvm_set_xcr(vcpu, index, xcr)) { kvm_inject_gp(vcpu, 0); return 1; } return 0; }
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
187,513,307,244,600,700,000,000,000,000,000,000,000
8
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
static int hls_slice_header(HEVCContext *s) { GetBitContext *gb = &s->HEVClc->gb; SliceHeader *sh = &s->sh; int i, ret; // Coded parameters sh->first_slice_in_pic_flag = get_bits1(gb); if (s->ref && sh->first_slice_in_pic_flag) { av_log(s->avctx, AV_LOG_ERROR, "Two slices reporting be...
0
[ "CWE-476" ]
FFmpeg
9ccc633068c6fe76989f487c8932bd11886ad65b
329,455,107,854,606,400,000,000,000,000,000,000,000
425
avcodec/hevcdec: Avoid only partly skiping duplicate first slices Fixes: NULL pointer dereference and out of array access Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432 Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304 This also fi...
static void nfs4_proc_rename_setup(struct rpc_message *msg, struct inode *dir) { struct nfs_server *server = NFS_SERVER(dir); struct nfs_renameargs *arg = msg->rpc_argp; struct nfs_renameres *res = msg->rpc_resp; msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENAME]; arg->bitmask = server->attr_bitmask; res->se...
0
[ "CWE-703", "CWE-189" ]
linux
20e0fa98b751facf9a1101edaefbc19c82616a68
185,109,178,259,754,940,000,000,000,000,000,000,000
11
Fix length of buffer copied in __nfs4_get_acl_uncached _copy_from_pages() used to copy data from the temporary buffer to the user passed buffer is passed the wrong size parameter when copying data. res.acl_len contains both the bitmap and acl lenghts while acl_len contains the acl length after adjusting for the bitmap...
static void tight_pack24(VncState *vs, uint8_t *buf, size_t count, size_t *ret) { uint8_t *buf8; uint32_t pix; int rshift, gshift, bshift; buf8 = buf; if (1 /* FIXME */) { rshift = vs->client_pf.rshift; gshift = vs->client_pf.gshift; bshift = vs->client_pf.bshift; } els...
0
[ "CWE-401" ]
qemu
6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0
84,359,316,032,238,930,000,000,000,000,000,000,000
30
vnc: fix memory leak when vnc disconnect Currently when qemu receives a vnc connect, it creates a 'VncState' to represent this connection. In 'vnc_worker_thread_loop' it creates a local 'VncState'. The connection 'VcnState' and local 'VncState' exchange data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'. ...
static int auth_context_match( git_http_auth_context **out, http_subtransport *t, bool (*scheme_match)(git_http_auth_scheme *scheme, void *data), void *data) { git_http_auth_scheme *scheme = NULL; git_http_auth_context *context = NULL, *c; size_t i; *out = NULL; for (i = 0; i < ARRAY_SIZE(auth_schemes); i++)...
0
[ "CWE-284" ]
libgit2
b5c6a1b407b7f8b952bded2789593b68b1876211
85,238,215,445,673,490,000,000,000,000,000,000,000
43
http: check certificate validity before clobbering the error variable
time_t base64totime_t(char* s, database* db, const char* field_name){ if(strcmp(s,"0")==0){ return 0; } byte* b=decode_base64(s,strlen(s),NULL); char* endp; if (b==NULL) { /* Should we print error here? */ return 0; } else { time_t t = strtol((char *)b,&endp,10); i...
0
[ "CWE-787" ]
aide
175d1f2626f4500b4fc5ecb7167bba9956b174bc
92,383,623,962,279,880,000,000,000,000,000,000,000
28
Precalculate buffer size in base64 functions Aide uses a fixed size (16k bytes) for the return buffer in encode_base64/decode_base64 functions. This results in a segfault if aide processes a file with too large extended attribute value or ACL. Fix this issue by precalculating the size of the return buffer depending o...
MagickExport int LocaleUppercase(const int c) { if (c == EOF) return(c); #if defined(MAGICKCORE_LOCALE_SUPPORT) if (c_locale != (locale_t) NULL) return(toupper_l((int) ((unsigned char) c),c_locale)); #endif return(toupper((int) ((unsigned char) c))); }
0
[ "CWE-125" ]
ImageMagick
58d9c46929ca0828edde34d263700c3a5fe8dc3c
295,579,304,606,533,900,000,000,000,000,000,000,000
10
...
static void collect_procs_anon(struct page *page, struct list_head *to_kill, struct to_kill **tkc, int force_early) { struct vm_area_struct *vma; struct task_struct *tsk; struct anon_vma *av; pgoff_t pgoff; av = page_lock_anon_vma_read(page); if (av == NULL) /* Not actually mapped anymore */ return; ...
0
[]
linux
46612b751c4941c5c0472ddf04027e877ae5990f
55,963,580,416,884,240,000,000,000,000,000,000,000
32
mm: hwpoison: fix thp split handing in soft_offline_in_use_page() When soft_offline_in_use_page() runs on a thp tail page after pmd is split, we trigger the following VM_BUG_ON_PAGE(): Memory failure: 0x3755ff: non anonymous thp __get_any_page: 0x3755ff: unknown zero refcount page type 2fffff80000000 Soft offli...
libssh2_channel_window_read_ex(LIBSSH2_CHANNEL *channel, unsigned long *read_avail, unsigned long *window_size_initial) { if(!channel) return 0; /* no channel, no window! */ if(window_size_initial) { *window_size_initial = channel->r...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
328,853,801,401,399,900,000,000,000,000,000,000,000
45
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
void qib_cdev_cleanup(struct cdev **cdevp, struct device **devp) { struct device *device = *devp; if (device) { device_unregister(device); *devp = NULL; } if (*cdevp) { cdev_del(*cdevp); *cdevp = NULL; } }
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
254,383,787,128,188,100,000,000,000,000,000,000,000
14
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
static void list_slab_objects(struct kmem_cache *s, struct page *page, const char *text) { #ifdef CONFIG_SLUB_DEBUG void *addr = page_address(page); void *p; unsigned long *map; slab_err(s, page, text, s->name); slab_lock(page); map = get_map(s, page); for_each_object(p, s, addr, page->objects) { if ...
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
98,894,920,109,244,960,000,000,000,000,000,000,000
24
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
evbuffer_drain(struct evbuffer *buf, size_t len) { struct evbuffer_chain *chain, *next; size_t remaining, old_len; int result = 0; EVBUFFER_LOCK(buf); old_len = buf->total_len; if (old_len == 0) goto done; if (buf->freeze_start) { result = -1; goto done; } if (len >= old_len && !HAS_PINNED_R(buf)) { ...
0
[ "CWE-189" ]
libevent
841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4
252,913,564,695,345,800,000,000,000,000,000,000,000
66
Fix CVE-2014-6272 in Libevent 2.1 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
d_lite_hash(VALUE self) { st_index_t v, h[4]; get_d1(self); h[0] = m_nth(dat); h[1] = m_jd(dat); h[2] = m_df(dat); h[3] = m_sf(dat); v = rb_memhash(h, sizeof(h)); return ST2FIX(v); }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
250,168,188,193,732,460,000,000,000,000,000,000,000
12
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
int tls_choose_sigalg(SSL *s, int fatalerrs) { const SIGALG_LOOKUP *lu = NULL; int sig_idx = -1; s->s3.tmp.cert = NULL; s->s3.tmp.sigalg = NULL; if (SSL_IS_TLS13(s)) { lu = find_sig_alg(s, NULL, NULL); if (lu == NULL) { if (!fatalerrs) return 1; ...
0
[ "CWE-476" ]
openssl
a87f3fe01a5a894aa27ccd6a239155fd129988e4
309,168,679,855,519,580,000,000,000,000,000,000,000
145
Fix NULL dereference in SSL_check_chain() for TLS 1.3 In the tls1_check_sig_alg() helper function, we loop through the list of "signature_algorithms_cert" values received from the client and attempt to look up each one in turn in our internal table that maps wire codepoint to string-form name, digest and/or signature ...
hfs_attr_walk_zlib_rsrc(const TSK_FS_ATTR * fs_attr, int flags, TSK_FS_FILE_WALK_CB a_action, void *ptr) { return hfs_attr_walk_compressed_rsrc( fs_attr, flags, a_action, ptr, hfs_read_zlib_block_table, hfs_decompress_zlib_block ); }
0
[ "CWE-190", "CWE-284" ]
sleuthkit
114cd3d0aac8bd1aeaf4b33840feb0163d342d5b
240,279,933,617,576,380,000,000,000,000,000,000,000
9
hfs: fix keylen check in hfs_cat_traverse() If key->key_len is 65535, calculating "uint16_t keylen' would cause an overflow: uint16_t keylen; ... keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len) so the code bypasses the sanity check "if (keylen > nodesize)" which results in crash later: ./too...
struct nfs_server *nfs_create_server(const struct nfs_mount_data *data, struct nfs_fh *mntfh) { struct nfs_server *server; struct nfs_fattr fattr; int error; server = nfs_alloc_server(); if (!server) return ERR_PTR(-ENOMEM); /* Get a client representation */ error = nfs_init_server(server, data); i...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
63,561,232,934,435,280,000,000,000,000,000,000,000
63
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
struct key *request_key_and_link(struct key_type *type, const char *description, const void *callout_info, size_t callout_len, void *aux, struct key *dest_keyring, unsigned long flags) { struct keyring_search_context ctx = { .index_key.type = type, .index_key.description = descriptio...
1
[ "CWE-476" ]
linux
c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81
249,866,975,523,117,800,000,000,000,000,000,000,000
67
KEYS: Remove key_type::match in favour of overriding default by match_preparse A previous patch added a ->match_preparse() method to the key type. This is allowed to override the function called by the iteration algorithm. Therefore, we can just set a default that simply checks for an exact match of the key descripti...
skiptowhite(char_u *p) { while (*p != ' ' && *p != '\t' && *p != NUL) ++p; return p; }
0
[ "CWE-125", "CWE-787" ]
vim
94f3192b03ed27474db80b4d3a409e107140738b
249,203,400,305,464,900,000,000,000,000,000,000,000
6
patch 8.2.3950: going beyond the end of the line with /\%V Problem: Going beyond the end of the line with /\%V. Solution: Check for valid column in getvcol().
static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear, wStream* s, UINT32 bandsByteCount, UINT32 nWidth, UINT32 nHeight, BYTE* pDstData, UINT32 DstFormat, UINT32 nDstStep, UINT32 nXDst, UINT32 ...
0
[ "CWE-125" ]
FreeRDP
363d7046dfec4003b91aecf7867e3b05905f3843
87,336,701,581,291,980,000,000,000,000,000,000,000
308
Fixed oob read in clear_decompress_subcode_rlex Fixed length checks before stream read. Thanks to hac425 CVE-2020-11040
static void oprintf(struct out *op, const char *fmt, ...) { va_list ap; char buf[256]; int d, l; va_start(ap, fmt); l = vsprintf(buf, fmt, ap); while((d = op->ptr - op->buf) + l >= op->len-1) { op->buf = (char *) realloc(op->buf, op->len += 100); op->ptr = op->buf + d; } ...
0
[ "CWE-20", "CWE-476" ]
libming
6e76e8c71cb51c8ba0aa9737a636b9ac3029887f
237,497,496,296,382,230,000,000,000,000,000,000,000
16
SWFShape_setLeftFillStyle: prevent fill overflow
static int parse_sockaddr_pair(struct sockaddr *sa, int ext_len, xfrm_address_t *saddr, xfrm_address_t *daddr, u16 *family) { int af, socklen; if (ext_len < pfkey_sockaddr_pair_size(sa->sa_family)) return -EINVAL; af = pfkey_sockaddr_extract(sa, saddr); if (!af) return -EINVAL; socklen =...
1
[]
linux
096f41d3a8fcbb8dde7f71379b1ca85fe213eded
226,262,108,183,392,660,000,000,000,000,000,000,000
21
af_key: Fix sadb_x_ipsecrequest parsing The parsing of sadb_x_ipsecrequest is broken in a number of ways. First of all we're not verifying sadb_x_ipsecrequest_len. This is needed when the structure carries addresses at the end. Worse we don't even look at the length when we parse those optional addresses. The migra...
static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, my_option *options) { const char *plugin_name= tmp->plugin->name; const LEX_STRING plugin_dash = { C_STRING_WITH_LEN("plugin-") }; uint plugin_name_len= strlen(plugin_name); uint optnamelen; const int max_...
0
[ "CWE-416" ]
server
c05fd700970ad45735caed3a6f9930d4ce19a3bd
274,583,830,769,818,520,000,000,000,000,000,000,000
248
MDEV-26323 use-after-poison issue of MariaDB server
static double mp_abs(_cimg_math_parser& mp) { return cimg::abs(_mp_arg(2));
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
219,297,154,860,003,060,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
MagickExport Image *PingImages(ImageInfo *image_info,const char *filename, ExceptionInfo *exception) { char ping_filename[MagickPathExtent]; Image *image, *images; ImageInfo *read_info; /* Ping image list from a file. */ assert(image_info != (ImageInfo *) NULL); assert(image_info-...
1
[ "CWE-119" ]
ImageMagick
4e8c2ed53fcb54a34b3a6185b2584f26cf6874a3
23,046,549,141,861,670,000,000,000,000,000,000,000
64
https://github.com/ImageMagick/ImageMagick/issues/312
static void credit_entropy_bits(struct entropy_store *r, int nbits) { unsigned long flags; int entropy_count; if (!nbits) return; spin_lock_irqsave(&r->lock, flags); DEBUG_ENT("added %d entropy credits to %s\n", nbits, r->name); entropy_count = r->entropy_count; entropy_count += nbits; if (entropy_count < ...
0
[ "CWE-310" ]
linux-2.6
8a0a9bd4db63bc45e3017bedeafbd88d0eb84d02
89,481,756,772,189,570,000,000,000,000,000,000,000
27
random: make get_random_int() more random It's a really simple patch that basically just open-codes the current "secure_ip_id()" call, but when open-coding it we now use a _static_ hashing area, so that it gets updated every time. And to make sure somebody can't just start from the same original seed of all-zeroes, a...
static OPJ_BOOL opj_j2k_write_mcc_record( opj_j2k_t *p_j2k, struct opj_simple_mcc_decorrelation_data * p_mcc_record, struct opj_stream_private *p_stream, ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
99,949,458,325,677,170,000,000,000,000,000,000,000
102
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
find_start_of_next_microdesc(const char *s, const char *eos) { int started_with_annotations; s = eat_whitespace_eos(s, eos); if (!s) return NULL; #define CHECK_LENGTH() STMT_BEGIN \ if (s+32 > eos) \ return NULL; \ STMT_END #define NEXT_LINE() STMT_BEGIN \...
0
[ "CWE-399" ]
tor
57e35ad3d91724882c345ac709666a551a977f0f
149,360,157,063,014,080,000,000,000,000,000,000,000
48
Avoid possible segfault when handling networkstatus vote with bad flavor Fix for 6530; fix on 0.2.2.6-alpha.
wait_queue_func_t wake_func) __acquires(&ctx->completion_lock) { struct io_ring_ctx *ctx = req->ctx; bool cancel = false; INIT_HLIST_NODE(&req->hash_node); io_init_poll_iocb(poll, mask, wake_func); poll->file = req->file; poll->wait.private = req; ipt->pt._key = mask; ipt->req = req; ipt->error = ...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
140,973,401,967,068,050,000,000,000,000,000,000,000
36
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
struct vm_area_struct *vma_merge(struct mm_struct *mm, struct vm_area_struct *prev, unsigned long addr, unsigned long end, unsigned long vm_flags, struct anon_vma *anon_vma, struct file *file, pgoff_t pgoff, struct mempolicy *policy, struct vm_userfaultfd_ctx vm_userfaultfd_ctx) { pgoff_t pglen = (end -...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
174,083,822,566,470,470,000,000,000,000,000,000,000
92
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static struct cm_id_private * cm_acquire_rejected_id(struct cm_rej_msg *rej_msg) { struct cm_timewait_info *timewait_info; struct cm_id_private *cm_id_priv; __be32 remote_id; remote_id = rej_msg->local_comm_id; if (__be16_to_cpu(rej_msg->reason) == IB_CM_REJ_TIMEOUT) { spin_lock_irq(&cm.lock); timewait_info ...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
11,682,584,982,264,021,000,000,000,000,000,000,000
33
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
static inline uint8_t *csrhci_out_packet_event(struct csrhci_s *s, int evt, int len) { uint8_t *ret = csrhci_out_packetz(s, len + 1 + sizeof(struct hci_event_hdr)); *ret ++ = H4_EVT_PKT; ((struct hci_event_hdr *) ret)->evt = evt; ((struct hci_event_hdr *) ret)->plen ...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
186,320,282,555,937,700,000,000,000,000,000,000,000
12
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 void csrhci_in_packet(struct csrhci_s *s, uint8_t *pkt) { uint8_t *rpkt; int opc; switch (*pkt ++) { case H4_CMD_PKT: opc = le16_to_cpu(((struct hci_command_hdr *) pkt)->opcode); if (cmd_opcode_ogf(opc) == OGF_VENDOR_CMD) { csrhci_in_packet_vendor(s, cmd_opcode_ocf(op...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
183,150,233,727,716,600,000,000,000,000,000,000,000
72
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...
ipf_expiry_list_clean(struct hmap *frag_lists, struct ipf_list *ipf_list) /* OVS_REQUIRES(ipf_lock) */ { ipf_list_clean(frag_lists, ipf_list); }
0
[ "CWE-401" ]
ovs
803ed12e31b0377c37d7aa8c94b3b92f2081e349
213,952,372,373,197,800,000,000,000,000,000,000,000
6
ipf: release unhandled packets from the batch Since 640d4db788ed ("ipf: Fix a use-after-free error, ...") the ipf framework unconditionally allocates a new dp_packet to track individual fragments. This prevents a use-after-free. However, an additional issue was present - even when the packet buffer is cloned, if the...
static void quantsmooth_block(JCOEFPTR coef, UINT16 *quantval, JSAMPLE *image, JSAMPLE *image2, int stride, int flags, float **tables, int luma) { int k, n = DCTSIZE, x, y, need_refresh = 1; JSAMPLE ALIGN(32) buf[DCTSIZE2 + DCTSIZE * 6], *border = buf + n * n; #ifndef NO_SIMD int16_t ALIGN(32) temp[DCTSIZE2 * 4 + ...
0
[]
jpeg-quantsmooth
3ab3838e610d361b71d937738edf156505c59c58
206,505,863,500,643,800,000,000,000,000,000,000,000
823
avoid divide-by-zero on damaged JPEG files Also fixed misleading indentation warnings from GCC.
Status ComputeConv2DDimension(const Conv2DParameters& params, const Tensor& input, const Tensor& filter, Conv2DDimensions* dimensions) { // Check that 2D convolution input and filter have exactly 4 dimensions. TF_REQUIRES(input.dims() == 4, e...
0
[ "CWE-369" ]
tensorflow
b12aa1d44352de21d1a6faaf04172d8c2508b42b
161,405,276,803,893,140,000,000,000,000,000,000,000
106
Fix one more FPE. PiperOrigin-RevId: 369346568 Change-Id: I840fd575962adc879713a4c9cc59e6da3331caa7
static loff_t get_size(loff_t offset, loff_t sizelimit, struct file *file) { loff_t loopsize; /* Compute loopsize in bytes */ loopsize = i_size_read(file->f_mapping->host); if (offset > 0) loopsize -= offset; /* offset is beyond i_size, weird but possible */ if (loopsize < 0) return 0; if (sizelimit > 0 &&...
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
10,107,777,578,245,203,000,000,000,000,000,000,000
20
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
diff_fold_update(diff_T *dp, int skip_idx) { int i; win_T *wp; FOR_ALL_WINDOWS(wp) for (i = 0; i < DB_COUNT; ++i) if (curtab->tp_diffbuf[i] == wp->w_buffer && i != skip_idx) foldUpdate(wp, dp->df_lnum[i], dp->df_lnum[i] + dp->df_count[i]); }
0
[ "CWE-787" ]
vim
c101abff4c6756db4f5e740fde289decb9452efa
324,795,390,470,704,650,000,000,000,000,000,000,000
11
patch 8.2.5164: invalid memory access after diff buffer manipulations Problem: Invalid memory access after diff buffer manipulations. Solution: Use zero offset when change removes all lines in a diff block.
textw_text_release(gs_text_enum_t *pte, client_name_t cname) { textw_text_enum_t *const penum = (textw_text_enum_t *)pte; gx_device_txtwrite_t *const tdev = (gx_device_txtwrite_t *) pte->dev; /* Free the working buffer where the Unicode was assembled from the enumerated text */ if (penum->TextBuffer) ...
0
[ "CWE-476" ]
ghostpdl
407c98a38c3a6ac1681144ed45cc2f4fc374c91f
24,869,455,362,180,790,000,000,000,000,000,000,000
19
txtwrite - guard against using GS_NO_GLYPH to retrieve Unicode values Bug 701822 "Segmentation fault at psi/iname.c:296 in names_index_ref" Avoid using a glyph with the value GS_NO_GLYPH to retrieve a glyph name or Unicode code point from the glyph ID, as this is not a valid ID.
static int nfs4_do_reclaim(struct nfs_client *clp, const struct nfs4_state_recovery_ops *ops) { struct rb_node *pos; int status = 0; restart: spin_lock(&clp->cl_lock); for (pos = rb_first(&clp->cl_state_owners); pos != NULL; pos = rb_next(pos)) { struct nfs4_state_owner *sp = rb_entry(pos, struct nfs4_state_owne...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
127,303,402,935,524,220,000,000,000,000,000,000,000
26
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
trace_ok_for_array(struct tracer *t, struct trace_array *tr) { return (tr->flags & TRACE_ARRAY_FL_GLOBAL) || t->allow_instances; }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
117,589,548,596,063,600,000,000,000,000,000,000,000
4
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
static int netbk_count_requests(struct xenvif *vif, struct xen_netif_tx_request *first, struct xen_netif_tx_request *txp, int work_to_do) { RING_IDX cons = vif->tx.req_cons; int frags = 0; if (!(first->flags & XEN_NETTXF_more_data)) return 0; do { if (frags >= work_to_do) { netdev_err(vif->dev,...
0
[ "CWE-399" ]
linux
7d5145d8eb2b9791533ffe4dc003b129b9696c48
308,599,153,963,290,140,000,000,000,000,000,000,000
44
xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop. Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
int dns_server_ifindex(const DnsServer *s) { assert(s); /* The link ifindex always takes precedence */ if (s->link) return s->link->ifindex; if (s->ifindex > 0) return s->ifindex; return 0; }
0
[ "CWE-416" ]
systemd
904dcaf9d4933499f8334859f52ea8497f2d24ff
149,373,525,069,830,300,000,000,000,000,000,000,000
12
resolved: take particular care when detaching DnsServer from its default stream DnsStream and DnsServer have a symbiotic relationship: one DnsStream is the current "default" stream of the server (and thus reffed by it), but each stream also refs the server it is connected to. This cyclic dependency can result in weird...
static void _invoke_callback(pmixp_coll_ring_ctx_t *coll_ctx) { pmixp_coll_ring_cbdata_t *cbdata; char *data; size_t data_sz; pmixp_coll_t *coll = _ctx_get_coll(coll_ctx); if (!coll->cbfunc) return; data = get_buf_data(coll_ctx->ring_buf); data_sz = get_buf_offset(coll_ctx->ring_buf); cbdata = xmalloc(sizeo...
0
[ "CWE-120" ]
slurm
c3142dd87e06621ff148791c3d2f298b5c0b3a81
139,884,576,600,355,390,000,000,000,000,000,000,000
27
PMIx - fix potential buffer overflows from use of unpackmem(). CVE-2020-27745.
static int ql_adapter_down(struct ql3_adapter *qdev, int do_reset) { struct net_device *ndev = qdev->ndev; int retval = 0; netif_stop_queue(ndev); netif_carrier_off(ndev); clear_bit(QL_ADAPTER_UP, &qdev->flags); clear_bit(QL_LINK_MASTER, &qdev->flags); ql_disable_interrupts(qdev); free_irq(qdev->pdev->irq,...
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
195,331,966,282,106,180,000,000,000,000,000,000,000
48
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
MagickExport ExceptionInfo *CloneExceptionInfo(ExceptionInfo *exception) { ExceptionInfo *clone_exception; clone_exception=(ExceptionInfo *) AcquireMagickMemory(sizeof(*exception)); if (clone_exception == (ExceptionInfo *) NULL) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); Ini...
0
[ "CWE-120", "CWE-787" ]
ImageMagick
e45e48b881038487d0bc94d92a16c1537616cc0a
20,408,637,291,731,429,000,000,000,000,000,000,000
13
Suspend exception processing if too many exceptions
entering_window(win_T *win) { // Only matters for a prompt window. if (!bt_prompt(win->w_buffer)) return; // When switching to a prompt buffer that was in Insert mode, don't stop // Insert mode, it may have been set in leaving_window(). if (win->w_buffer->b_prompt_insert != NUL) stop_insert_mode ...
0
[ "CWE-416" ]
vim
ec66c41d84e574baf8009dbc0bd088d2bc5b2421
156,364,539,151,514,690,000,000,000,000,000,000,000
15
patch 8.1.2136: using freed memory with autocmd from fuzzer Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra, Dominique Pelle) Solution: Avoid using "wp" after autocommands. (closes #5041)
static av_always_inline void paint_raw(uint8_t *dst, int w, int h, GetByteContext *gb, int bpp, int be, int stride) { int i, j, p; for (j = 0; j < h; j++) { for (i = 0; i < w; i++) { p = vmnc_get_pixel(gb, bpp, be)...
0
[ "CWE-703" ]
FFmpeg
6ba02602aa7fc7d38db582e75b8b093fb3c1608d
1,918,198,033,236,253,000,000,000,000,000,000,000
23
avcodec/vmnc: Check that rectangles are within the picture Prevents out of array accesses with CODEC_FLAG_EMU_EDGE Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
_binder_inner_proc_unlock(struct binder_proc *proc, int line) { binder_debug(BINDER_DEBUG_SPINLOCKS, "%s: line=%d\n", __func__, line); spin_unlock(&proc->inner_lock); }
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
326,170,400,138,977,700,000,000,000,000,000,000,000
6
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
file_is_read_only (struct rw *rw) { /* Permissions are hard, and this is only used as an early check * before the copy. Proceed with the copy and fail if it fails. */ return false; }
0
[ "CWE-252" ]
libnbd
8d444b41d09a700c7ee6f9182a649f3f2d325abb
67,114,405,887,146,770,000,000,000,000,000,000,000
7
copy: CVE-2022-0485: Fail nbdcopy if NBD read or write fails nbdcopy has a nasty bug when performing multi-threaded copies using asynchronous nbd calls - it was blindly treating the completion of an asynchronous command as successful, rather than checking the *error parameter. This can result in the silent creation o...
static double mp_sort(_cimg_math_parser& mp) { double *const ptrd = &_mp_arg(1) + 1; const double *const ptrs = &_mp_arg(2) + 1; const bool is_increasing = (bool)_mp_arg(4); const unsigned int siz = (unsigned int)mp.opcode[3], nb_elts = mp.opcode[5]==~0U?siz:(un...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
130,993,761,580,095,480,000,000,000,000,000,000,000
19
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
RZ_API ut64 rz_dyldcache_get_slide(RzDyldCache *cache) { rz_return_val_if_fail(cache, 0); if (!cache->rebase_infos || !cache->rebase_infos->length) { return 0; } size_t i; for (i = 0; i < cache->rebase_infos->length; i++) { if (cache->rebase_infos->entries[i].info) { return cache->rebase_infos->entries[i]....
0
[ "CWE-787" ]
rizin
556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810
115,080,141,797,487,360,000,000,000,000,000,000,000
15
Fix oob write in dyldcache When the individual n_slide_infos were too high, the sum would overflow and too few entries would be allocated.
u32 gf_m4a_get_channel_cfg(u32 nb_chan) { u32 i, count = sizeof(GF_M4ANumChannels) / sizeof(u32); for (i = 0; i < count; i++) { if (GF_M4ANumChannels[i] == nb_chan) return i + 1; } return 0; }
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
197,190,371,119,679,000,000,000,000,000,000,000,000
8
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
MagickExport MagickBooleanType CloseBlob(Image *image) { BlobInfo *magick_restrict blob_info; int status; /* Close image file. */ assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickM...
0
[ "CWE-416", "CWE-399" ]
ImageMagick
c5d012a46ae22be9444326aa37969a3f75daa3ba
228,407,969,497,317,680,000,000,000,000,000,000,000
119
https://github.com/ImageMagick/ImageMagick6/issues/43
static int usbhid_restart_out_queue(struct usbhid_device *usbhid) { struct hid_device *hid = usb_get_intfdata(usbhid->intf); int kicked; int r; if (!hid || test_bit(HID_RESET_PENDING, &usbhid->iofl) || test_bit(HID_SUSPENDED, &usbhid->iofl)) return 0; if ((kicked = (usbhid->outhead != usbhid->outtail))) { ...
0
[ "CWE-125", "CWE-787" ]
linux
f043bfc98c193c284e2cd768fefabe18ac2fed9b
176,185,815,598,401,300,000,000,000,000,000,000,000
37
HID: usbhid: fix out-of-bounds bug The hid descriptor identifies the length and type of subordinate descriptors for a device. If the received hid descriptor is smaller than the size of the struct hid_descriptor, it is possible to cause out-of-bounds. In addition, if bNumDescriptors of the hid descriptor have an incor...
int64_t Cluster::GetRelativeTimecode(int64_t abs_timecode) const { const int64_t cluster_timecode = this->Cluster::timecode(); const int64_t rel_timecode = static_cast<int64_t>(abs_timecode) - cluster_timecode; if (rel_timecode < 0 || rel_timecode > kMaxBlockTimecode) return -1; return rel_timecode;...
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
218,393,743,200,336,800,000,000,000,000,000,000,000
10
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static SECURITY_STATUS SEC_ENTRY kerberos_InitializeSecurityContextW( PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR* pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG* pfContext...
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
315,570,565,896,676,900,000,000,000,000,000,000,000
20
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
static void nested_svm_init(struct vcpu_svm *svm) { svm->vmcb->control.exit_code = SVM_EXIT_INIT; svm->vmcb->control.exit_info_1 = 0; svm->vmcb->control.exit_info_2 = 0; nested_svm_vmexit(svm); }
0
[ "CWE-416" ]
linux
a58d9166a756a0f4a6618e4f593232593d6df134
272,907,512,767,528,800,000,000,000,000,000,000,000
8
KVM: SVM: load control fields from VMCB12 before checking them Avoid races between check and use of the nested VMCB controls. This for example ensures that the VMRUN intercept is always reflected to the nested hypervisor, instead of being processed by the host. Without this patch, it is possible to end up with svm->...
int find_free_dev_extent(struct btrfs_device *device, u64 num_bytes, u64 *start, u64 *len) { /* FIXME use last free of some kind */ return find_free_dev_extent_start(device, num_bytes, 0, start, len); }
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
189,640,390,335,846,430,000,000,000,000,000,000,000
6
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
static void pcnet_update_irq(PCNetState *s) { int isr = 0; s->csr[0] &= ~0x0080; #if 1 if (((s->csr[0] & ~s->csr[3]) & 0x5f00) || (((s->csr[4]>>1) & ~s->csr[4]) & 0x0115) || (((s->csr[5]>>1) & s->csr[5]) & 0x0048)) #else if ((!(s->csr[3] & 0x4000) && !!(s->csr[0] & 0x4000)) /* BABL */ |...
0
[]
qemu
837f21aacf5a714c23ddaadbbc5212f9b661e3f7
335,577,439,739,022,930,000,000,000,000,000,000,000
54
net: pcnet: add check to validate receive data size(CVE-2015-7504) In loopback mode, pcnet_receive routine appends CRC code to the receive buffer. If the data size given is same as the buffer size, the appended CRC code overwrites 4 bytes after s->buffer. Added a check to avoid that. Reported by: Qinghao Tang <luodal...
static struct tcf_block *sfq_tcf_block(struct Qdisc *sch, unsigned long cl, struct netlink_ext_ack *extack) { struct sfq_sched_data *q = qdisc_priv(sch); if (cl) return NULL; return q->block; }
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
234,873,644,251,025,740,000,000,000,000,000,000,000
9
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
static unsigned next_desc(struct vring_desc *desc) { unsigned int next; /* If this descriptor says it doesn't chain, we're done. */ if (!(desc->flags & VRING_DESC_F_NEXT)) return -1U; /* Check they're not leading us off end of descriptors. */ next = desc->next; /* Make sure compiler knows to grab that: we don...
0
[]
linux-2.6
bd97120fc3d1a11f3124c7c9ba1d91f51829eb85
231,118,965,444,733,900,000,000,000,000,000,000,000
17
vhost: fix length for cross region descriptor If a single descriptor crosses a region, the second chunk length should be decremented by size translated so far, instead it includes the full descriptor length. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: D...
lookup_custom_attr (MonoImage *image, gpointer member) { MonoCustomAttrInfo* res; res = mono_image_property_lookup (image, member, MONO_PROP_DYNAMIC_CATTR); if (!res) return NULL; res = g_memdup (res, MONO_SIZEOF_CUSTOM_ATTR_INFO + sizeof (MonoCustomAttrEntry) * res->num_attrs); res->cached = 0; return res; ...
0
[ "CWE-399", "CWE-264" ]
mono
89d1455a80ef13cddee5d79ec00c06055da3085c
259,685,638,649,788,950,000,000,000,000,000,000,000
13
Don't use finalization to cleanup dynamic methods. * reflection.c: Use a reference queue to cleanup dynamic methods instead of finalization. * runtime.c: Shutdown the dynamic method queue before runtime cleanup begins. * DynamicMethod.cs: No longer finalizable. * icall-def.h: Remove unused dynamic method ical...