func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void init(READ_RECORD *info) { bound_tracker.init(); cursor.init(info); peer_tracker.init(); }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
210,290,705,318,588,630,000,000,000,000,000,000,000
7
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
void DcmSCP::setHostLookupEnabled(const OFBool mode) { m_cfg->setHostLookupEnabled(mode); }
0
[ "CWE-264" ]
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
49,616,480,396,763,770,000,000,000,000,000,000,000
4
Make sure to handle setuid() return code properly. In some tools the return value of setuid() is not checked. In the worst case this could lead to privilege escalation since the process does not give up its root privileges and continue as root.
rb_wakeups(struct ring_buffer *buffer, struct ring_buffer_per_cpu *cpu_buffer) { bool pagebusy; if (buffer->irq_work.waiters_pending) { buffer->irq_work.waiters_pending = false; /* irq_work_queue() supplies it's own memory barriers */ irq_work_queue(&buffer->irq_work.work); } if (cpu_buffer->irq_work.waiter...
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
192,202,770,970,543,900,000,000,000,000,000,000,000
25
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
static void tcp_try_to_open(struct sock *sk, int flag, const int prior_unsacked) { struct tcp_sock *tp = tcp_sk(sk); tcp_verify_left_out(tp); if (!tcp_any_retrans_done(sk)) tp->retrans_stamp = 0; if (flag & FLAG_ECE) tcp_enter_cwr(sk); if (inet_csk(sk)->icsk_ca_state != TCP_CA_CWR) { tcp_try_keep_open(sk...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
72,021,659,409,629,920,000,000,000,000,000,000,000
18
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
apdu_prepare_exit (void) { static int sentinel; int slot; if (!sentinel) { sentinel = 1; for (slot = 0; slot < MAX_READER; slot++) if (reader_table[slot].used) { apdu_disconnect (slot); if (reader_table[slot].close_reader) reader_table[slot]...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
119,585,542,881,957,360,000,000,000,000,000,000,000
19
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
GF_Err void_Size(GF_Box *s) { s->size = 4; return GF_OK;
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
138,064,379,790,209,570,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static int prism2_open(struct net_device *dev) { struct hostap_interface *iface; local_info_t *local; PDEBUG(DEBUG_FLOW, "%s: prism2_open\n", dev->name); iface = netdev_priv(dev); local = iface->local; if (local->no_pri) { printk(KERN_DEBUG "%s: could not set interface UP - no PRI " "f/w\n", dev->na...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
267,215,433,525,230,220,000,000,000,000,000,000,000
46
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static double mp_set_Ixyz_s(_cimg_math_parser& mp) { CImg<T> &img = mp.imgout; const int x = (int)_mp_arg(2), y = (int)_mp_arg(3), z = (int)_mp_arg(4); const T val = (T)_mp_arg(1); if (x>=0 && x<img.width() && y>=0 && y<img.height() && z>=0 && z<img.de...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
336,802,835,309,053,050,000,000,000,000,000,000,000
14
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
str2specialbuf(char_u *sp, char_u *buf, int len) { char_u *s; *buf = NUL; while (*sp) { s = str2special(&sp, FALSE); if ((int)(STRLEN(s) + STRLEN(buf)) < len) STRCAT(buf, s); } }
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
38,167,060,679,988,950,000,000,000,000,000,000,000
12
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
get_bytes_from_buf(char_u *buf, char_u *bytes, int num_bytes) { int len = 0; int i; char_u c; for (i = 0; i < num_bytes; i++) { if ((c = buf[len++]) == NUL) return -1; if (c == K_SPECIAL) { if (buf[len] == NUL || buf[len + 1] == NUL) // cannot happen? return -1; if ...
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
269,994,290,855,440,580,000,000,000,000,000,000,000
30
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
double json_number_value(const json_t *json) { if(json_is_integer(json)) return (double)json_integer_value(json); else if(json_is_real(json)) return json_real_value(json); else return 0.0; }
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
261,317,941,715,473,340,000,000,000,000,000,000,000
9
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
static int asf_read_metadata(AVFormatContext *s, const char *title, uint16_t len, unsigned char *ch, uint16_t buflen) { AVIOContext *pb = s->pb; avio_get_str16le(pb, len, ch, buflen); if (ch[0]) { if (av_dict_set(&s->metadata, title, ch, 0) < 0) av_log(s, AV...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
2b46ebdbff1d8dec7a3d8ea280a612b91a582869
148,249,515,731,219,100,000,000,000,000,000,000,000
13
avformat/asfdec_o: Check size_bmp more fully Fixes: integer overflow and out of array access Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
mono_gc_parse_environment_string_extract_number (const char *str, glong *out) { char *endptr; int len = strlen (str), shift = 0; glong val; gboolean is_suffix = FALSE; char suffix; switch (str [len - 1]) { case 'g': case 'G': shift += 10; case 'm': case 'M': shift += 10; case 'k': case 'K': ...
0
[ "CWE-399", "CWE-264" ]
mono
8eb1189099e02372fd45ca1c67230eccf1edddc0
290,339,537,708,489,870,000,000,000,000,000,000,000
39
Implement a reference queue API. * gc.c: A reference queue allows one to queue callbcks for when objects are collected. It allows for safe cleanup of objects that can only be done when it is effectively collected. The major difference with regular finalization is that the collector makes sure the object was col...
void TestBufferMove(uint64_t buffer1_length, uint64_t buffer2_length, uint64_t expected_slice_count) { Buffer::OwnedImpl buffer1; buffer1.add(std::string(buffer1_length, 'a')); EXPECT_EQ(1, buffer1.getRawSlices().size()); Buffer::OwnedImpl buffer2; buffer2.add(std::string(buffer2_length, ...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
99,005,532,678,554,150,000,000,000,000,000,000,000
16
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
static void line6_toneport_disconnect(struct usb_line6 *line6) { struct usb_line6_toneport *toneport = (struct usb_line6_toneport *)line6; if (toneport_has_led(toneport)) toneport_remove_leds(toneport); }
0
[ "CWE-476" ]
linux
0b074ab7fc0d575247b9cc9f93bb7e007ca38840
37,179,051,839,944,255,000,000,000,000,000,000,000
8
ALSA: line6: Assure canceling delayed work at disconnection The current code performs the cancel of a delayed work at the late stage of disconnection procedure, which may lead to the access to the already cleared state. This patch assures to call cancel_delayed_work_sync() at the beginning of the disconnection proced...
static int gfs2_fsync(struct file *file, loff_t start, loff_t end, int datasync) { struct address_space *mapping = file->f_mapping; struct inode *inode = mapping->host; int sync_state = inode->i_state & (I_DIRTY_SYNC|I_DIRTY_DATASYNC); struct gfs2_inode *ip = GFS2_I(inode); int ret, ret1 = 0; if (mapping...
0
[ "CWE-119", "CWE-787" ]
linux
64dd153c83743af81f20924c6343652d731eeecb
44,811,616,765,834,700,000,000,000,000,000,000,000
32
GFS2: rewrite fallocate code to write blocks directly GFS2's fallocate code currently goes through the page cache. Since it's only writing to the end of the file or to holes in it, it doesn't need to, and it was causing issues on low memory environments. This patch pulls in some of Steve's block allocation work, and u...
json_t *json_string(const char *value) { if(!value || !utf8_check_string(value, -1)) return NULL; return json_string_nocheck(value); }
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
314,792,619,358,377,280,000,000,000,000,000,000,000
7
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
SPICE_GNUC_VISIBLE int spice_server_set_agent_file_xfer(SpiceServer *reds, int enable) { reds->config->agent_file_xfer = enable; reds_update_agent_properties(reds); return 0; }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
293,747,381,522,879,860,000,000,000,000,000,000,000
6
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static void js_fileio_gc_mark(JSRuntime *rt, JSValueConst this_val, JS_MarkFunc *mark_func) { JSFileIOCtx *ioctx = JS_GetOpaque(this_val, fileio_class_id); if (!ioctx) return; if (ioctx->factory->root == ioctx) { JSFileIOFactoryCtx *iofac = ioctx->factory; JS_MarkValue(rt, iofac->open, mark_func); JS_MarkValu...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
194,051,300,862,721,470,000,000,000,000,000,000,000
18
fixed #2138
static int perf_ftrace_function_unregister(struct perf_event *event) { struct ftrace_ops *ops = &event->ftrace_ops; return unregister_ftrace_function(ops); }
0
[]
linux
ced39002f5ea736b716ae233fb68b26d59783912
72,704,447,696,647,970,000,000,000,000,000,000,000
5
ftrace, perf: Add support to use function tracepoint in perf Adding perf registration support for the ftrace function event, so it is now possible to register it via perf interface. The perf_event struct statically contains ftrace_ops as a handle for function tracer. The function tracer is registered/unregistered in ...
dp_packet_ip_checksum_valid(struct dp_packet *p) { return (p->mbuf.ol_flags & PKT_RX_IP_CKSUM_MASK) == PKT_RX_IP_CKSUM_GOOD; }
0
[ "CWE-400" ]
ovs
abd7a457652e6734902720fe6a5dddb3fc0d1e3b
303,057,465,315,066,100,000,000,000,000,000,000,000
5
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static __u8 *mr_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { if (*rsize >= 31 && rdesc[29] == 0x05 && rdesc[30] == 0x09) { hid_info(hdev, "fixing up button/consumer in HID report descriptor\n"); rdesc[30] = 0x0c; } return rdesc; }
0
[ "CWE-119", "CWE-787" ]
linux
4ab25786c87eb20857bbb715c3ae34ec8fd6a214
311,825,551,572,093,600,000,000,000,000,000,000,000
9
HID: fix a couple of off-by-ones There are a few very theoretical off-by-one bugs in report descriptor size checking when performing a pre-parsing fixup. Fix those. Cc: stable@vger.kernel.org Reported-by: Ben Hawkes <hawkes@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jir...
copy_bytes_3 (BITCODE_RC *dst, const BITCODE_RC *src) { dst[0] = src[2]; dst[1] = src[1]; dst[2] = src[0]; return dst + 3; }
0
[ "CWE-787" ]
libredwg
45d2a290c65ed691be0901ba2b2ef51044e07a16
34,026,918,012,901,204,000,000,000,000,000,000,000
7
decode_r2007: fix for invalid section size See GH #350. With fuzzing section->data_size might not fit section_page->uncomp_size.
plpython_validator(PG_FUNCTION_ARGS) { Oid funcoid = PG_GETARG_OID(0); HeapTuple tuple; Form_pg_proc procStruct; bool is_trigger; if (!CheckFunctionValidatorAccess(fcinfo->flinfo->fn_oid, funcoid)) PG_RETURN_VOID(); if (!check_function_bodies) { PG_RETURN_VOID(); } /* Get the new function's pg_proc e...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
145,875,060,208,461,400,000,000,000,000,000,000,000
30
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
psf_fsync (SF_PRIVATE *psf) { #if HAVE_FSYNC if (psf->file.mode == SFM_WRITE || psf->file.mode == SFM_RDWR) fsync (psf->file.filedes) ; #else psf = NULL ; #endif } /* psf_fsync */
0
[ "CWE-369", "CWE-189" ]
libsndfile
725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6
40,457,469,833,458,000,000,000,000,000,000,000,000
9
src/file_io.c : Prevent potential divide-by-zero. Closes: https://github.com/erikd/libsndfile/issues/92
Controller::sendBodyToApp(Client *client, Request *req) { TRACE_POINT(); assert(req->appSink.acceptingInput()); #ifdef DEBUG_CC_EVENT_LOOP_BLOCKING req->timeOnRequestHeaderSent = ev_now(getLoop()); reportLargeTimeDiff(client, "ApplicationPool get until headers sent", req->timeBeforeAccessingApplicationPool...
0
[ "CWE-20", "CWE-476" ]
passenger
ddb8ecc4ebf260e4967f57f271d4f5761abeac3e
30,789,743,420,414,226,000,000,000,000,000,000,000
25
Fix CVE-2015-7519 header collision vulnerability
static void skb_set_err_queue(struct sk_buff *skb) { /* pkt_type of skbs received on local sockets is never PACKET_OUTGOING. * So, it is safe to (mis)use it to mark skbs on the error queue. */ skb->pkt_type = PACKET_OUTGOING; BUILD_BUG_ON(PACKET_OUTGOING == 0);
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
178,498,032,540,833,560,000,000,000,000,000,000,000
8
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
void UnsetAndDestroy() { FrameSetSpellChecker set_spell_checker(nullptr, render_frame()); delete this; }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
178,379,740,081,894,150,000,000,000,000,000,000,000
4
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static void decode_help_display(void) { fprintf(stdout, "\nThis is the opj_decompress utility from the OpenJPEG project.\n" "It decompresses JPEG 2000 codestreams to various image formats.\n" "It has been compiled against openjp2 library v%s.\n\n", opj_version()); fprintf(st...
0
[ "CWE-824" ]
openjpeg
0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d
34,577,312,423,443,320,000,000,000,000,000,000,000
85
Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369)
static int pipe_to_user(struct pipe_inode_info *pipe, struct pipe_buffer *buf, struct splice_desc *sd) { char *src; int ret; ret = buf->ops->confirm(pipe, buf); if (unlikely(ret)) return ret; /* * See if we can use the atomic maps, by prefaulting in the * pages and doing an atomic copy */ if (!fault_...
0
[ "CWE-94" ]
linux-2.6
8811930dc74a503415b35c4a79d14fb0b408a361
188,145,931,691,368,000,000,000,000,000,000,000,000
40
splice: missing user pointer access verification vmsplice_to_user() must always check the user pointer and length with access_ok() before copying. Likewise, for the slow path of copy_from_user_mmap_sem() we need to check that we may read from the user region. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Cc: Wojc...
PHP_LIBXML_API void php_libxml_shutdown(void) { if (_php_libxml_initialized) { #if defined(LIBXML_SCHEMAS_ENABLED) xmlRelaxNGCleanupTypes(); #endif xmlCleanupParser(); zend_hash_destroy(&php_libxml_exports); _php_libxml_initialized = 0; } }
0
[ "CWE-200" ]
php-src
8e76d0404b7f664ee6719fd98f0483f0ac4669d6
284,709,023,019,726,250,000,000,000,000,000,000,000
11
Fixed external entity loading
static int assign_ctxt(struct hfi1_filedata *fd, unsigned long arg, u32 len) { int ret; unsigned int swmajor; struct hfi1_ctxtdata *uctxt = NULL; struct hfi1_user_info uinfo; if (fd->uctxt) return -EINVAL; if (sizeof(uinfo) != len) return -EINVAL; if (copy_from_user(&uinfo, (void __user *)arg, sizeof(uinf...
0
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
18,262,032,273,055,677,000,000,000,000,000,000,000
59
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash, word32 hashlen, int* res, ecc_key* key) #if defined(WOLFSSL_STM32_PKA) { return stm32_ecc_verify_hash_ex(r, s, hash, hashlen, res, key); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
232,654,066,463,948,100,000,000,000,000,000,000,000
6
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
int oidc_check_user_id(request_rec *r) { oidc_cfg *c = ap_get_module_config(r->server->module_config, &auth_openidc_module); /* log some stuff about the incoming HTTP request */ oidc_debug(r, "incoming request: \"%s?%s\", ap_is_initial_req(r)=%d", r->parsed_uri.path, r->args, ap_is_initial_req(r)); /* see ...
0
[ "CWE-601" ]
mod_auth_openidc
5c15dfb08106c2451c2c44ce7ace6813c216ba75
337,231,173,099,956,200,000,000,000,000,000,000,000
31
improve validation of the post-logout URL; closes #449 - to avoid an open redirect; thanks AIMOTO Norihito - release 2.4.0.1 Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
static int check_newline(const char *progname, const char *name) { char *s; for (s = "\n"; *s; s++) { if (strchr(name, *s)) { fprintf(stderr, "%s: illegal character 0x%02x in mount entry\n", progname, *s); return EX_USAGE; } } return 0; }
0
[ "CWE-59" ]
samba
a065c177dfc8f968775593ba00dffafeebb2e054
244,748,140,468,825,260,000,000,000,000,000,000,000
12
mount.cifs: check for invalid characters in device name and mountpoint It's apparently possible to corrupt the mtab if you pass embedded newlines to addmntent. Apparently tabs are also a problem with certain earlier glibc versions. Backslashes are also a minor issue apparently, but we can't reasonably filter those. M...
void PDFDoc::writeRawStream (Stream* str, OutStream* outStr) { Object obj1 = str->getDict()->lookup("Length"); if (!obj1.isInt() && !obj1.isInt64()) { error (errSyntaxError, -1, "PDFDoc::writeRawStream, no Length in stream dict"); return; } Goffset length; if (obj1.isInt()) length = obj1.getInt()...
0
[ "CWE-20" ]
poppler
9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f
187,641,026,544,728,640,000,000,000,000,000,000,000
27
PDFDoc::setup: Fix return value At that point xref can have gone wrong since extractPDFSubtype() can have caused a reconstruct that broke stuff so instead of unconditionally returning true, return xref->isOk() Fixes #706
static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) { struct gfn_to_hva_cache *ghc = &vcpu->arch.st.cache; struct kvm_steal_time __user *st; struct kvm_memslots *slots; static const u8 preempted = KVM_VCPU_PREEMPTED; if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) return; if (vcpu->arch.st.preempt...
1
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
223,634,608,185,323,900,000,000,000,000,000,000,000
31
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
static void scalar_min_max_sub(struct bpf_reg_state *dst_reg, struct bpf_reg_state *src_reg) { s64 smin_val = src_reg->smin_value; s64 smax_val = src_reg->smax_value; u64 umin_val = src_reg->umin_value; u64 umax_val = src_reg->umax_value; if (signed_sub_overflows(dst_reg->smin_value, smax_val) || s...
0
[]
linux
294f2fc6da27620a506e6c050241655459ccd6bd
100,744,745,507,828,490,000,000,000,000,000,000,000
28
bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds() Currently, for all op verification we call __red_deduce_bounds() and __red_bound_offset() but we only call __update_reg_bounds() in bitwise ops. However, we could benefit from calling __update_reg_bounds() in BPF_ADD, BPF_SUB, and BPF_MUL case...
static int common_perm_create(int op, struct path *dir, struct dentry *dentry, u32 mask, umode_t mode) { struct path_cond cond = { current_fsuid(), mode }; if (!dir->mnt || !mediated_filesystem(dir->dentry->d_inode)) return 0; return common_perm_dir_dentry(op, dir, dentry, mask, &cond); }
0
[ "CWE-20" ]
linux
a5b2c5b2ad5853591a6cac6134cd0f599a720865
99,732,452,508,081,040,000,000,000,000,000,000,000
10
AppArmor: fix oops in apparmor_setprocattr When invalid parameters are passed to apparmor_setprocattr a NULL deref oops occurs when it tries to record an audit message. This is because it is passing NULL for the profile parameter for aa_audit. But aa_audit now requires that the profile passed is not NULL. Fix this by...
get_gimp_image_type (const GimpImageBaseType image_base_type, const gboolean alpha) { GimpImageType image_type; switch (image_base_type) { case GIMP_GRAY: image_type = (alpha) ? GIMP_GRAYA_IMAGE : GIMP_GRAY_IMAGE; break; case GIMP_INDEXED: imag...
0
[ "CWE-190" ]
gimp
88eccea84aa375197cc04a2a0e2e29debb56bfa5
197,684,270,780,044,800,000,000,000,000,000,000,000
26
Harden the PSD plugin against integer overflows. Issues discovered by Stefan Cornelius, Secunia Research, advisory SA37232 and CVE identifier CVE-2009-3909. Fixes bug #600741. (cherry picked from commit 9cc8d78ff33b7a36852b74e64b427489cad44d0e)
PHP_FUNCTION(iconv_get_encoding) { char *type = "all"; int type_len = sizeof("all")-1; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &type, &type_len) == FAILURE) return; if (!strcasecmp("all", type)) { array_init(return_value); add_assoc_string(return_value, "input_encoding", get_input_enco...
0
[ "CWE-835" ]
php-src
06d309fd7a917575d65c7a6f4f57b0e6bb0f9711
44,287,904,942,799,720,000,000,000,000,000,000,000
24
Fix bug #76249 - fail on invalid sequences
xmlXPathLeadingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) { if (xmlXPathNodeSetIsEmpty(nodes2)) return(nodes1); return(xmlXPathNodeLeadingSorted(nodes1, xmlXPathNodeSetItem(nodes2, 1))); }
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
115,696,370,693,984,570,000,000,000,000,000,000,000
6
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
DEFINE_TEST(test_read_format_rar5_different_winsize_on_merge) { char buf[4096]; PROLOGUE("test_read_format_rar5_different_winsize_on_merge.rar"); /* Return codes of those calls are ignored, because this sample file * is invalid. However, the unpacker shouldn't produce any SIGSEGV * errors during processing. */ ...
0
[ "CWE-20", "CWE-125" ]
libarchive
94821008d6eea81e315c5881cdf739202961040a
239,454,803,842,874,200,000,000,000,000,000,000,000
14
RAR5 reader: reject files that declare invalid header flags One of the fields in RAR5's base block structure is the size of the header. Some invalid files declare a 0 header size setting, which can confuse the unpacker. Minimum header size for RAR5 base blocks is 7 bytes (4 bytes for CRC, and 3 bytes for the rest), so...
static void write_protect_slot(struct kvm *kvm, struct kvm_memory_slot *memslot, unsigned long *dirty_bitmap, unsigned long nr_dirty_pages) { /* Not many dirty pages compared to # of shadow pages. */ if (nr_dirty_pages < kvm->arch.n_used_mmu_pages) { unsigned long gfn_offset; for_ea...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
193,857,355,770,805,330,000,000,000,000,000,000,000
23
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
Defrag(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, PacketQueue *pq) { uint16_t frag_offset; uint8_t more_frags; DefragTracker *tracker; int af; if (PKT_IS_IPV4(p)) { af = AF_INET; more_frags = IPV4_GET_MF(p); frag_offset = IPV4_GET_IPOFFSET(p); } else if (PKT_I...
0
[ "CWE-358" ]
suricata
4a04f814b15762eb446a5ead4d69d021512df6f8
273,947,098,202,702,570,000,000,000,000,000,000,000
44
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
static mz_bool mz_zip_writer_add_to_central_dir( mz_zip_archive *pZip, const char *pFilename, mz_uint16 filename_size, const void *pExtra, mz_uint16 extra_size, const void *pComment, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 b...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
199,401,130,424,762,970,000,000,000,000,000,000,000
43
Make line_no with too large value(2**20) invalid. Fixes #124
template<typename t> CImg<T>& rol(const CImg<t>& img) { const ulongT siz = size(), isiz = img.size(); if (siz && isiz) { if (is_overlapped(img)) return rol(+img); T *ptrd = _data, *const ptre = _data + siz; if (siz>isiz) for (ulongT n = siz/isiz; n; --n) for (const ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
303,640,024,094,980,970,000,000,000,000,000,000,000
12
Fix other issues in 'CImg<T>::load_bmp()'.
isdn_net_rebuild_header(struct sk_buff *skb) { struct net_device *dev = skb->dev; isdn_net_local *lp = dev->priv; int ret = 0; if (lp->p_encap == ISDN_NET_ENCAP_ETHER) { struct ethhdr *eth = (struct ethhdr *) skb->data; /* * Only ARP/IP is currently supported */ if (eth->h_proto != htons(ETH_P_I...
0
[ "CWE-119" ]
linux-2.6
0f13864e5b24d9cbe18d125d41bfa4b726a82e40
134,122,947,778,261,920,000,000,000,000,000,000,000
29
isdn: avoid copying overly-long strings Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9416 Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
static int test_iffile_section(cmd_parms *cmd, const char *arg) { const char *relative; apr_finfo_t sb; relative = ap_server_root_relative(cmd->temp_pool, arg); return (apr_stat(&sb, relative, 0, cmd->pool) == APR_SUCCESS); }
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
43,659,514,579,853,910,000,000,000,000,000,000,000
8
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
static void __fw_load_abort(struct fw_priv *fw_priv) { /* * There is a small window in which user can write to 'loading' * between loading done and disappearance of 'loading' */ if (fw_sysfs_done(fw_priv)) return; list_del_init(&fw_priv->pending_list); fw_state_aborted(fw_priv); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
158,346,912,342,085,670,000,000,000,000,000,000,000
12
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
int propagate_mount_busy(struct mount *mnt, int refcnt) { struct mount *m, *child; struct mount *parent = mnt->mnt_parent; int ret = 0; if (mnt == parent) return do_refcount_check(mnt, refcnt); /* * quickly check if the current mount can be unmounted. * If not, we don't have to go checking for all other ...
0
[ "CWE-703" ]
linux
5ec0811d30378ae104f250bfc9b3640242d81e3f
19,422,745,493,771,495,000,000,000,000,000,000,000
26
propogate_mnt: Handle the first propogated copy being a slave When the first propgated copy was a slave the following oops would result: > BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 > IP: [<ffffffff811fba4e>] propagate_one+0xbe/0x1c0 > PGD bacd4067 PUD bac66067 PMD 0 > Oops: 0000 [#1] SM...
lyd_unlink_hash(struct lyd_node *node, struct lyd_node *orig_parent) { _lyd_unlink_hash(node, orig_parent, 1); }
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
120,980,819,247,974,790,000,000,000,000,000,000,000
4
schema tree BUGFIX do not check features while still resolving schema Fixes #723
zdeletefile(i_ctx_t *i_ctx_p) { os_ptr op = osp; gs_parsed_file_name_t pname; int code = parse_real_file_name(op, &pname, imemory, "deletefile"); if (code < 0) return code; if (pname.iodev == iodev_default(imemory)) { if ((code = check_file_permissions(i_ctx_p, pname.fname, pname.le...
0
[]
ghostpdl
0d3901189f245232f0161addf215d7268c4d05a3
280,453,032,943,561,900,000,000,000,000,000,000,000
22
Bug 699657: properly apply file permissions to .tempfile
void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy) { rfbClientIteratorPtr iterator; rfbClientPtr cl; iterator=rfbGetClientIterator(rfbScreen); while((cl=rfbClientIteratorNext(iterator))) { LOCK(cl->updateMutex); if(cl->useCopyRect) { sraRegionPtr...
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
89,680,695,467,996,160,000,000,000,000,000,000,000
88
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
ex_bnext(exarg_T *eap) { goto_buffer(eap, DOBUF_CURRENT, FORWARD, (int)eap->line2); if (eap->do_ecmd_cmd != NULL) do_cmdline_cmd(eap->do_ecmd_cmd); }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
218,842,014,171,563,340,000,000,000,000,000,000,000
6
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt) { struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt); char instruction[3]; unsigned long rip = kvm_rip_read(vcpu); /* * Blow out the MMU to ensure that no other VCPU has an active mapping * to ensure that the updated hypercall appears atomically across a...
0
[ "CWE-119" ]
kvm
c300aa64ddf57d9c5d9c898a64b36877345dd4a9
112,401,104,330,292,300,000,000,000,000,000,000,000
17
KVM: x86: fix for buffer overflow in handling of MSR_KVM_SYSTEM_TIME (CVE-2013-1796) If the guest sets the GPA of the time_page so that the request to update the time straddles a page then KVM will write onto an incorrect page. The write is done byusing kmap atomic to get a pointer to the page for the time structure ...
int myisam_panic(handlerton *hton, ha_panic_function flag) { return mi_panic(flag); }
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
138,958,073,030,080,240,000,000,000,000,000,000,000
4
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
static void tsc_bad(void *info) { __get_cpu_var(cpu_tsc_khz) = 0; }
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
246,603,673,762,859,170,000,000,000,000,000,000,000
4
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...
PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx) { STACK_OF(PKCS7_RECIP_INFO) *rsk; PKCS7_RECIP_INFO *ri; int i; i = OBJ_obj2nid(p7->type); if (i != NID_pkcs7_signedAndEnveloped) return NULL; if (p7->d.signed_and_enveloped == NULL) return NULL; rsk = ...
0
[]
openssl
c0334c2c92dd1bc3ad8138ba6e74006c3631b0f9
237,845,000,086,322,700,000,000,000,000,000,000,000
20
PKCS#7: avoid NULL pointer dereferences with missing content In PKCS#7, the ASN.1 content component is optional. This typically applies to inner content (detached signatures), however we must also handle unexpected missing outer content correctly. This patch only addresses functions reachable from parsing, decryption...
void Jp2Image::encodeJp2Header(const DataBuf& boxBuf,DataBuf& outBuf) { DataBuf output(boxBuf.size_ + iccProfile_.size_ + 100); // allocate sufficient space long outlen = sizeof(Jp2BoxHeader) ; // now many bytes have we written to output? long inlen = sizeof(Jp2BoxHeader) ; // how ...
1
[ "CWE-125" ]
exiv2
f6ee71526eef5649a529ac6da3f2843e3b63e227
298,218,945,273,770,700,000,000,000,000,000,000,000
72
Add more bounds checks in Jp2Image::encodeJp2Header
uint decimal_precision() const { return (uint) (max_length - MY_TEST(value < 0)); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
264,937,971,318,007,560,000,000,000,000,000,000,000
2
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
PJ_DEF(pj_status_t) pjmedia_wav_player_set_eof_cb( pjmedia_port *port, void *user_data, pj_status_t (*cb)(pjmedia_port *port, void *usr_data)) { struct file_reader_port *fport; /* Sanity check */ PJ_ASSERT_RETURN(port, -PJ_EINVAL); /* Check that this is really a player port ...
0
[ "CWE-703", "CWE-835" ]
pjproject
947bc1ee6d05be10204b918df75a503415fd3213
28,220,516,495,711,203,000,000,000,000,000,000,000
23
Merge pull request from GHSA-rwgw-vwxg-q799 * Prevent potential infinite loop when parsing WAV format file * Check if subchunk is negative. * Fix and add checks * Change data type from pj_ssize_t to long. * Modify check * Fix leak file descriptor and modify check on wav_playlist * Move overflow/underflow check t...
Pipe::Pipe(SimpleMessenger *r, int st, PipeConnection *con) : RefCountedObject(r->cct), reader_thread(this), writer_thread(this), delay_thread(NULL), msgr(r), conn_id(r->dispatch_queue.get_id()), recv_ofs(0), recv_len(0), sd(-1), port(0), peer_type(-1), pipe_lock("SimpleMesseng...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
188,571,204,038,347,350,000,000,000,000,000,000,000
46
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 ...
ssize_t slabinfo_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { char kbuf[MAX_SLABINFO_WRITE + 1], *tmp; int limit, batchcount, shared, res; struct kmem_cache *cachep; if (count > MAX_SLABINFO_WRITE) return -EINVAL; if (copy_from_user(&kbuf, buffer, count)) return -...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
277,540,445,788,831,700,000,000,000,000,000,000,000
42
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
void json_append_escaped_ucs4(string_t *dest, unichar_t chr) { unichar_t high,low; if (chr < 0x80) json_append_escaped_char(dest, (unsigned char)chr); else if (chr >= UTF16_SURROGATE_BASE) { uni_split_surrogate(chr, &high, &low); str_printfa(dest, "\\u%04x\\u%04x", high, low); } else { str_printfa(dest, "\\...
0
[]
core
973769d74433de3c56c4ffdf4f343cb35d98e4f7
228,437,686,492,152,670,000,000,000,000,000,000,000
12
lib: json - Escape invalid UTF-8 as unicode bytes This prevents dovecot from crashing if invalid UTF-8 input is given.
static void kvm_ioapic_reset(struct kvm_ioapic *ioapic) { int i; for (i = 0; i < IOAPIC_NUM_PINS; i++) ioapic->redirtbl[i].fields.mask = 1; ioapic->base_address = IOAPIC_DEFAULT_BASE_ADDRESS; ioapic->ioregsel = 0; ioapic->irr = 0; ioapic->id = 0; rtc_irq_eoi_tracking_reset(ioapic); update_handled_vectors(ioa...
0
[ "CWE-20" ]
kvm
5678de3f15010b9022ee45673f33bcfc71d47b60
148,214,036,706,840,230,000,000,000,000,000,000,000
13
KVM: ioapic: fix assignment of ioapic->rtc_status.pending_eoi (CVE-2014-0155) QE reported that they got the BUG_ON in ioapic_service to trigger. I cannot reproduce it, but there are two reasons why this could happen. The less likely but also easiest one, is when kvm_irq_delivery_to_apic does not deliver to any APIC a...
const void *mdesc_get_property(struct mdesc_handle *hp, u64 node, const char *name, int *lenp) { const char *names = name_block(&hp->mdesc); u64 last_node = hp->mdesc.node_sz / 16; void *data = data_block(&hp->mdesc); struct mdesc_elem *ep; if (node == MDESC_NODE_NULL || node >= last_node) return NULL...
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
270,824,222,050,005,330,000,000,000,000,000,000,000
44
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
inter_lb(PG_FUNCTION_ARGS) { LINE *line = PG_GETARG_LINE_P(0); BOX *box = PG_GETARG_BOX_P(1); LSEG bseg; Point p1, p2; /* pairwise check lseg intersections */ p1.x = box->low.x; p1.y = box->low.y; p2.x = box->low.x; p2.y = box->high.y; statlseg_construct(&bseg, &p1, &p2); if (has_interpt_sl(&bs...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
69,940,106,198,399,670,000,000,000,000,000,000,000
35
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...
voluntary_active_balance(struct lb_env *env) { struct sched_domain *sd = env->sd; if (asym_active_balance(env)) return 1; /* * The dst_cpu is idle and the src_cpu CPU has only 1 CFS task. * It's worth migrating the task if the src_cpu's capacity is reduced * because of other sched_class or IRQs if more cap...
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
190,801,038,185,162,770,000,000,000,000,000,000,000
25
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
void oidc_strip_cookies(request_rec *r) { char *cookie, *ctx, *result = NULL; const char *name = NULL; int i; apr_array_header_t *strip = oidc_dir_cfg_strip_cookies(r); char *cookies = apr_pstrdup(r->pool, oidc_util_hdr_in_cookie_get(r)); if ((cookies != NULL) && (strip != NULL)) { oidc_debug(r, "looki...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
51,963,733,914,420,950,000,000,000,000,000,000,000
43
Add a function to escape Javascript characters
static void hwsim_mcast_del_radio(int id, const char *hwname, struct genl_info *info) { struct sk_buff *skb; void *data; int ret; skb = genlmsg_new(GENLMSG_DEFAULT_SIZE, GFP_KERNEL); if (!skb) return; data = genlmsg_put(skb, 0, 0, &hwsim_genl_family, 0, HWSIM_CMD_DEL_RADIO); if (!data) goto err...
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
113,095,594,004,617,540,000,000,000,000,000,000,000
34
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
static bool mac_table_doesnt_fit(void *opaque, int version_id) { return !mac_table_fits(opaque, version_id); }
0
[ "CWE-703" ]
qemu
abe300d9d894f7138e1af7c8e9c88c04bfe98b37
36,017,891,391,835,970,000,000,000,000,000,000,000
4
virtio-net: fix map leaking on error during receive Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") tries to fix the use after free of the sg by caching the virtqueue elements in an array and unmap them at once after receiving the packets, But it forgot to unmap the cached elements on error which ...
**/ CImgDisplay& show() { return assign();
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
165,300,442,255,025,540,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
rename_buffer(char_u *new_fname) { char_u *fname, *sfname, *xfname; buf_T *buf; buf = curbuf; apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf); // buffer changed, don't change name now if (buf != curbuf) return FAIL; #ifdef FEAT_EVAL if (aborting()) // autocmds may abort scr...
0
[ "CWE-416" ]
vim
37f47958b8a2a44abc60614271d9537e7f14e51a
183,075,702,607,563,780,000,000,000,000,000,000,000
47
patch 8.2.4253: using freed memory when substitute with function call Problem: Using freed memory when substitute uses a recursive function call. Solution: Make a copy of the substitute text.
static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags) { struct dentry *dir; int dir_has_key, cached_with_key; if (flags & LOOKUP_RCU) return -ECHILD; dir = dget_parent(dentry); if (!d_inode(dir)->i_sb->s_cop->is_encrypted(d_inode(dir))) { dput(dir); return 0; } /* this should eventu...
0
[ "CWE-416", "CWE-476" ]
linux
1b53cf9815bb4744958d41f3795d5d5a1d365e2d
44,932,062,378,649,870,000,000,000,000,000,000,000
37
fscrypt: remove broken support for detecting keyring key revocation Filesystem encryption ostensibly supported revoking a keyring key that had been used to "unlock" encrypted files, causing those files to become "locked" again. This was, however, buggy for several reasons, the most severe of which was that when key r...
compute_kafka_api_names(void) { guint i; guint len = array_length(kafka_apis); for (i = 0; i < len; ++i) { kafka_api_names[i].value = kafka_apis[i].api_key; kafka_api_names[i].strptr = kafka_apis[i].name; } kafka_api_names[len].value = 0; kafka_api_names[len].strptr = NULL; }
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
234,339,924,432,022,900,000,000,000,000,000,000,000
13
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
int snd_seq_queue_use(int queueid, int client, int use) { struct snd_seq_queue *queue; queue = queueptr(queueid); if (queue == NULL) return -EINVAL; mutex_lock(&queue->timer_mutex); if (use) { if (!test_and_set_bit(client, queue->clients_bitmap)) queue->clients++; } else { if (test_and_clear_bit(client,...
0
[ "CWE-362" ]
linux
3567eb6af614dac436c4b16a8d426f9faed639b3
166,687,294,410,319,720,000,000,000,000,000,000
26
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...
static void opj_pi_update_decode_poc (opj_pi_iterator_t * p_pi, opj_tcp_t * p_tcp, OPJ_UINT32 p_max_precision, OPJ_UINT32 p_max_res) { /* loop*/ OPJ_UINT32 pino; /* encoding prameters to set*/ OPJ_UINT32 l_bound; opj_pi_...
0
[ "CWE-190", "CWE-125", "CWE-787" ]
openjpeg
c16bc057ba3f125051c9966cf1f5b68a05681de4
272,149,050,017,467,550,000,000,000,000,000,000,000
41
Fix an integer overflow issue (#809) Prevent an integer overflow issue in function opj_pi_create_decode of pi.c.
Http::Stream::canPackMoreRanges() const { /** first update iterator "i" if needed */ if (!http->range_iter.debt()) { debugs(33, 5, "At end of current range spec for " << clientConnection); if (http->range_iter.pos != http->range_iter.end) ++http->range_iter.pos; http->range...
0
[ "CWE-20" ]
squid
6c9c44d0e9cf7b72bb233360c5308aa063af3d69
8,275,393,559,468,267,000,000,000,000,000,000,000
19
Handle more partial responses (#791)
static void opj_j2k_dump_tile_info(opj_tcp_t * l_default_tile, OPJ_INT32 numcomps, FILE* out_stream) { if (l_default_tile) { OPJ_INT32 compno; fprintf(out_stream, "\t default tile {\n"); fprintf(out_stream, "\t\t csty=%#x\n", l_default_tile->csty); ...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
51,607,478,772,090,800,000,000,000,000,000,000,000
52
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
bzrtpPacket_t *bzrtp_packetCheck(const uint8_t * input, uint16_t inputLength, uint16_t lastValidSequenceNumber, int *exitCode) { bzrtpPacket_t *zrtpPacket; uint16_t sequenceNumber; uint32_t packetCRC; uint16_t messageLength; uint32_t messageType; /* first check that the packet is a ZRTP one */ /* is the length ...
0
[ "CWE-254", "CWE-787" ]
bzrtp
bbb1e6e2f467ee4bd7b9a8c800e4f07343d7d99b
229,046,120,535,445,520,000,000,000,000,000,000,000
91
Add ZRTP Commit packet hvi check on DHPart2 packet reception
static int mcba_usb_start(struct mcba_priv *priv) { struct net_device *netdev = priv->netdev; int err, i; mcba_init_ctx(priv); for (i = 0; i < MCBA_MAX_RX_URBS; i++) { struct urb *urb = NULL; u8 *buf; dma_addr_t buf_dma; /* create a URB, and a buffer for it */ urb = usb_alloc_urb(0, GFP_KERNEL); if (...
0
[ "CWE-415" ]
linux
04c9b00ba83594a29813d6b1fb8fdc93a3915174
6,622,456,622,695,492,000,000,000,000,000,000,000
68
can: mcba_usb: mcba_usb_start_xmit(): fix double dev_kfree_skb in error path There is no need to call dev_kfree_skb() when usb_submit_urb() fails because can_put_echo_skb() deletes original skb and can_free_echo_skb() deletes the cloned skb. Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analy...
static ssize_t __disk_events_show(unsigned int events, char *buf) { const char *delim = ""; ssize_t pos = 0; int i; for (i = 0; i < ARRAY_SIZE(disk_events_strs); i++) if (events & (1 << i)) { pos += sprintf(buf + pos, "%s%s", delim, disk_events_strs[i]); delim = " "; } if (pos) pos += sprin...
0
[ "CWE-416" ]
linux-stable
77da160530dd1dc94f6ae15a981f24e5f0021e84
206,934,686,115,359,480,000,000,000,000,000,000,000
16
block: fix use-after-free in seq file I got a KASAN report of use-after-free: ================================================================== BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508 Read of size 8 by task trinity-c1/315 ======================================...
GF_Err sgpd_box_size(GF_Box *s) { u32 i, nb_descs; Bool use_def_size = GF_TRUE; GF_SampleGroupDescriptionBox *p = (GF_SampleGroupDescriptionBox *)s; p->size += 8; //we force all sample groups to version 1, v0 being deprecated if (!p->version) p->version = 1; p->size += 4; if (p->version>=2) p->size += 4;...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
304,339,718,958,230,100,000,000,000,000,000,000,000
34
fixed #2255
WORD_LIST * expand_words_shellexp (list) WORD_LIST *list; { return (expand_word_list_internal (list, WEXP_SHELLEXP));
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
91,846,024,204,203,800,000,000,000,000,000,000,000
5
Bash-4.4 patch 7
QPDFObjectHandle::getName() { if (isName()) { return dynamic_cast<QPDF_Name*>(m->obj.getPointer())->getName(); } else { typeWarning("name", "returning dummy name"); QTC::TC("qpdf", "QPDFObjectHandle name returning dummy name"); return "/QPDFFakeName"; } }
0
[ "CWE-399", "CWE-674" ]
qpdf
b4d6cf6836ce025ba1811b7bbec52680c7204223
4,160,027,597,136,770,000,000,000,000,000,000,000
13
Limit depth of nesting in direct objects (fixes #202) This fixes CVE-2018-9918.
static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, Image *image,ExceptionInfo *exception) { const char *mode, *option; CompressionType compression; EndianType endian_type; MagickBooleanType adjoin, debug, status; MagickOffsetType scene; QuantumInfo ...
0
[ "CWE-770" ]
ImageMagick
5c0e1a31bc44829b1024ce599097f43285a05a42
276,477,088,937,408,460,000,000,000,000,000,000,000
845
https://github.com/ImageMagick/ImageMagick/issues/999
static void __user *u64_to_uptr(u64 value) { if (is_compat_task()) return compat_ptr(value); else return (void __user *)(unsigned long)value; }
0
[ "CWE-362" ]
linux
532c34b5fbf1687df63b3fcd5b2846312ac943c6
322,765,730,320,772,960,000,000,000,000,000,000,000
7
s390/sclp_ctl: fix potential information leak with /dev/sclp The sclp_ctl_ioctl_sccb function uses two copy_from_user calls to retrieve the sclp request from user space. The first copy_from_user fetches the length of the request which is stored in the first two bytes of the request. The second copy_from_user gets the ...
static void add_family_to_write_order(struct object_entry **wo, unsigned int *endp, struct object_entry *e) { struct object_entry *root; for (root = e; root->delta; root = root->delta) ; /* nothing */ add_descendants_to_write_order(wo, endp, root); }
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
232,535,385,728,048,940,000,000,000,000,000,000,000
10
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
flatpak_dir_search_for_dependency (FlatpakDir *self, const char *runtime_ref, GCancellable *cancellable, GError **error) { g_autoptr(GPtrArray) found = g_ptr_array_new_with_free_func (g_free); g_auto(GS...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
23,045,650,190,218,203,000,000,000,000,000,000,000
28
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5) { switch (option) { case KEYCTL_GET_KEYRING_ID: return keyctl_get_keyring_ID((key_serial_t) arg2, (int) arg3); case KEYCTL_JOIN_SESSION_KEYRING: return keyctl_join_session_keyring...
0
[ "CWE-476" ]
linux-2.6
9d1ac65a9698513d00e5608d93fca0c53f536c14
277,667,312,556,509,200,000,000,000,000,000,000,000
89
KEYS: Fix RCU no-lock warning in keyctl_session_to_parent() There's an protected access to the parent process's credentials in the middle of keyctl_session_to_parent(). This results in the following RCU warning: =================================================== [ INFO: suspicious rcu_dereference_check() usage....
static void exif_thumbnail_extract(image_info_type *ImageInfo, char *offset, size_t length) { if (ImageInfo->Thumbnail.data) { exif_error_docref("exif_read_data#error_mult_thumb" EXIFERR_CC, ImageInfo, E_WARNING, "Multiple possible thumbnails"); return; /* Should not happen */ } if (!ImageInfo->read_thumbnail) {...
0
[ "CWE-416" ]
php-src
3fdde65617e9f954e2c964768aac8831005497e5
103,248,867,250,853,570,000,000,000,000,000,000,000
24
Fix #76409: heap use after free in _php_stream_free We must not close the stream in exif_read_from_impl(), since it is the responsibility of the (caller's) caller to do so, if it actually opened the stream. We simplify the reproduce script, which is actually about supplying a path to a directory (opposed to a regular...
ConnectionHandlerImpl::ActiveConnections::ActiveConnections( ConnectionHandlerImpl::ActiveTcpListener& listener, const Network::FilterChain& filter_chain) : listener_(listener), filter_chain_(filter_chain) {}
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
69,382,227,561,885,820,000,000,000,000,000,000,000
3
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
Item *Item_sum_count::copy_or_same(THD* thd) { return new (thd->mem_root) Item_sum_count(thd, this); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
148,297,250,372,600,650,000,000,000,000,000,000,000
4
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
TEST_F(QueryPlannerTest, MaxMinSortEqualityFirstSortSecond) { addIndex(BSON("a" << 1 << "b" << 1)); // Run an empty query, sort {b: 1}, max/min arguments. runQueryFull(BSONObj(), fromjson("{b: 1}"), BSONObj(), 0, 0, BSONOb...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
21,219,611,244,008,280,000,000,000,000,000,000,000
17
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception) { #define SkipLinesOp 0x01 #define SetColorOp 0x02 #define SkipPixelsOp 0x03 #define ByteDataOp 0x05 #define RunDataOp 0x06 #define EOFOp 0x07 #define ThrowRLEException(exception,message) \ { \ if (colormap != (unsigned char *) NUL...
0
[ "CWE-834" ]
ImageMagick
078e9692a257e7a8aa36ccc750927f9617923061
151,222,410,989,003,720,000,000,000,000,000,000,000
583
https://github.com/ImageMagick/ImageMagick/issues/518
static pj_status_t decode_xored_sockaddr_attr(pj_pool_t *pool, const pj_uint8_t *buf, const pj_stun_msg_hdr *msghdr, void **p_attr) { pj_stun_sockaddr_attr *attr; pj_status_t status; status = decode_sockaddr_attr(pool, buf, msghdr, p_attr); if (status != PJ_SUCCESS) ...
0
[ "CWE-191" ]
pjproject
15663e3f37091069b8c98a7fce680dc04bc8e865
217,296,224,660,464,160,000,000,000,000,000,000,000
49
Merge pull request from GHSA-2qpg-f6wf-w984
static void parseCurrencyAmount(const UnicodeString& str, const NumberFormat& fmt, UChar delim, Formattable& result, UErrorCode& ec) { UnicodeString num, cur; int32_t i = str.indexOf(d...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
139,114,137,389,109,100,000,000,000,000,000,000,000
13
ICU-20246 Fixing another integer overflow in number parsing.
static void qxl_reset_state(PCIQXLDevice *d) { QXLRam *ram = d->ram; QXLRom *rom = d->rom; assert(!d->ssd.running || SPICE_RING_IS_EMPTY(&ram->cmd_ring)); assert(!d->ssd.running || SPICE_RING_IS_EMPTY(&ram->cursor_ring)); d->shadow_rom.update_id = cpu_to_le32(0); *rom = d->shadow_rom; qxl_r...
0
[]
qemu-kvm
5ff4e36c804157bd84af43c139f8cd3a59722db9
240,220,701,668,695,800,000,000,000,000,000,000,000
15
qxl: async io support using new spice api Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async comm...
fr_window_pop_message (FrWindow *window) { if (! gtk_widget_get_mapped (GTK_WIDGET (window))) return; gtk_statusbar_pop (GTK_STATUSBAR (window->priv->statusbar), window->priv->progress_cid); if (window->priv->progress_dialog != NULL) gtk_label_set_text (GTK_LABEL (window->priv->pd_message), _("Operation complet...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
118,986,601,156,627,990,000,000,000,000,000,000,000
9
libarchive: sanitize filenames before extracting