func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int session_end_stream_headers_received(nghttp2_session *session, nghttp2_frame *frame, nghttp2_stream *stream) { int rv; if ((frame->hd.flags & NGHTTP2_FLAG_END_STREAM) == 0) { return 0; } nghttp2_stream_s...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
13,604,211,667,893,726,000,000,000,000,000,000,000
16
Add nghttp2_option_set_max_outbound_ack
int ssl3_send_next_proto(SSL *s) { unsigned int len, padding_len; unsigned char *d; if (s->state == SSL3_ST_CW_NEXT_PROTO_A) { len = s->next_proto_negotiated_len; padding_len = 32 - ((len + 2) % 32); d = (unsigned char *)s->init_buf->data; d[4] = len; memcpy(d + 5, s->next_proto_negotiated, len); d[5...
0
[ "CWE-310" ]
openssl
37580f43b5a39f5f4e920d17273fab9713d3a744
184,261,365,222,104,550,000,000,000,000,000,000,000
23
Only allow ephemeral RSA keys in export ciphersuites. OpenSSL clients would tolerate temporary RSA keys in non-export ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which enabled this server side. Remove both options as they are a protocol violation. Thanks to Karthikeyan Bhargavan for reporting this issue....
PJ_DEF(void) pj_dns_init_a_rr( pj_dns_parsed_rr *rec, const pj_str_t *res_name, unsigned dnsclass, unsigned ttl, const pj_in_addr *ip_addr) { pj_bzero(rec, sizeof(*rec)); rec->name = *res_name; rec->type = PJ_DNS_TYPE_A; rec->dnsclass = (pj_uint16_t) dnsclass; ...
0
[ "CWE-120", "CWE-787" ]
pjproject
9fae8f43accef8ea65d4a8ae9cdf297c46cfe29a
235,227,011,606,128,060,000,000,000,000,000,000,000
13
Merge pull request from GHSA-p6g5-v97c-w5q4 * Prevent heap buffer overflow when parsing DNS packets * Make sure packet parsing doesn't advance beyond max/end * Update checks * Remove check Co-authored-by: sauwming <ming@teluu.com>
create_sconv_object(const char *fc, const char *tc, unsigned current_codepage, int flag) { struct archive_string_conv *sc; sc = calloc(1, sizeof(*sc)); if (sc == NULL) return (NULL); sc->next = NULL; sc->from_charset = strdup(fc); if (sc->from_charset == NULL) { free(sc); return (NULL); } sc->to_cha...
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
2,777,716,316,181,340,000,000,000,000,000,000,000
180
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
static int ffm_write_write_index(int fd, int64_t pos) { uint8_t buf[8]; int i; for(i=0;i<8;i++) buf[i] = (pos >> (56 - i * 8)) & 0xff; if (lseek(fd, 8, SEEK_SET) < 0) goto bail_eio; if (write(fd, buf, 8) != 8) goto bail_eio; return 8; bail_eio: return AVERROR(EIO);...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156
166,822,098,014,675,030,000,000,000,000,000,000,000
17
ffserver: Check chunk size Fixes out of array access Fixes: poc_ffserver.py Found-by: Paul Cher <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void FVMenuVKernFromHKern(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); FVVKernFromHKern(&fv->b); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
168,367,838,143,970,720,000,000,000,000,000,000,000
5
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
WebPImage::WebPImage(BasicIo::UniquePtr io) : Image(ImageType::webp, mdNone, std::move(io)) { } // WebPImage::WebPImage
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
185,907,058,187,741,100,000,000,000,000,000,000,000
4
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *userdata) { DnsStream *s = userdata; int r; assert(s); #if ENABLE_DNS_OVER_TLS if (s->encrypted) { r = dnstls_stream_on_io(s, revents); if (r == DNSTLS_STREAM_CLOSED) ...
1
[ "CWE-416", "CWE-703" ]
systemd
d973d94dec349fb676fdd844f6fe2ada3538f27c
223,326,031,509,501,250,000,000,000,000,000,000,000
147
resolved: pin stream while calling callbacks for it These callbacks might unref the stream, but we still have to access it, let's hence ref it explicitly. Maybe fixes: #10725
int SELECT_LEX::period_setup_conds(THD *thd, TABLE_LIST *tables) { DBUG_ENTER("SELECT_LEX::period_setup_conds"); const bool update_conds= !skip_setup_conds(thd); Query_arena backup; Query_arena *arena= thd->activate_stmt_arena_if_needed(&backup); DBUG_ASSERT(!tables->next_local && tables->table); Item *r...
0
[]
server
8c34eab9688b4face54f15f89f5d62bdfd93b8a7
230,306,615,573,361,970,000,000,000,000,000,000,000
39
MDEV-28094 Window function in expression in ORDER BY call item->split_sum_func() in setup_order() just as it's done in setup_fields()
_dbus_open_socket (int *fd_p, int domain, int type, int protocol, DBusError *error) { #ifdef SOCK_CLOEXEC dbus_bool_t cloexec_done; *fd_p = socket (domain, type | SOCK_CLOEXEC, ...
0
[ "CWE-404" ]
dbus
872b085f12f56da25a2dbd9bd0b2dff31d5aea63
174,059,251,725,830,600,000,000,000,000,000,000,000
40
sysdeps-unix: On MSG_CTRUNC, close the fds we did receive MSG_CTRUNC indicates that we have received fewer fds that we should have done because the buffer was too small, but we were treating it as though it indicated that we received *no* fds. If we received any, we still have to make sure we close them, otherwise the...
static int query_raw_packet_qp_sq_state(struct mlx5_ib_dev *dev, struct mlx5_ib_sq *sq, u8 *sq_state) { int err; err = mlx5_core_query_sq_state(dev->mdev, sq->base.mqp.qpn, sq_state); if (err) goto out; sq->state = *sq_state; out: return err; }
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
306,214,506,473,721,640,000,000,000,000,000,000,000
14
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
vgr_get_auname(cmdidx_T cmdidx) { switch (cmdidx) { case CMD_vimgrep: return (char_u *)"vimgrep"; case CMD_lvimgrep: return (char_u *)"lvimgrep"; case CMD_vimgrepadd: return (char_u *)"vimgrepadd"; case CMD_lvimgrepadd: return (char_u *)"lvimgrepadd"; case CMD_grep: return (char_u *)"grep"; ...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
327,949,159,045,208,740,000,000,000,000,000,000,000
15
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
static void *etm_setup_aux(int event_cpu, void **pages, int nr_pages, bool overwrite) { int cpu; cpumask_t *mask; struct coresight_device *sink; struct etm_event_data *event_data = NULL; event_data = alloc_event_data(event_cpu); if (!event_data) return NULL; /* * In theory nothing prevent tracers in ...
0
[ "CWE-20", "CWE-476" ]
linux
f09444639099584bc4784dfcd85ada67c6f33e0f
142,687,314,200,012,320,000,000,000,000,000,000,000
68
coresight: fix kernel panic caused by invalid CPU Commit d52c9750f150 ("coresight: reset "enable_sink" flag when need be") caused a kernel panic because of the using of an invalid value: after 'for_each_cpu(cpu, mask)', value of local variable 'cpu' become invalid, causes following 'cpu_to_node' access invalid memory ...
SPL_METHOD(SplObjectStorage, unserialize) { spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); char *buf; int buf_len; const unsigned char *p, *s; php_unserialize_data_t var_hash; zval *pentry, *pmembers, *pcount = NULL, *pinf; long count; if (zend_parse_...
1
[ "CWE-416" ]
php-src
c2e197e4efc663ca55f393bf0e799848842286f3
263,106,354,654,996,170,000,000,000,000,000,000,000
128
Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
static void set_x11_file(pid_t pid, int display) { char *fname; if (asprintf(&fname, "%s/%d", RUN_FIREJAIL_X11_DIR, pid) == -1) errExit("asprintf"); // the file is deleted first FILE *fp = fopen(fname, "w"); if (!fp) { fprintf(stderr, "Error: cannot create %s\n", fname); exit(1); } fprintf(fp, "%d\n", dis...
0
[ "CWE-703" ]
firejail
6b8dba29d73257311564ee7f27b9b14758cc693e
288,710,942,688,841,750,000,000,000,000,000,000,000
17
security fix
parse_tlv_tnl_enc_lim(struct sk_buff *skb, __u8 * raw) { struct ipv6hdr *ipv6h = (struct ipv6hdr *) raw; __u8 nexthdr = ipv6h->nexthdr; __u16 off = sizeof (*ipv6h); while (ipv6_ext_hdr(nexthdr) && nexthdr != NEXTHDR_NONE) { __u16 optlen = 0; struct ipv6_opt_hdr *hdr; if (raw + off + sizeof (*hdr) > skb->data...
0
[]
linux-2.6
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
160,384,927,135,482,120,000,000,000,000,000,000,000
50
tunnels: fix netns vs proto registration ordering Same stuff as in ip_gre patch: receive hook can be called before netns setup is done, oopsing in net_generic(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
inline float uint2float(const unsigned int u) { if (u<(1U<<19)) return (float)u; // Consider safe storage of unsigned int as floats until 19bits (i.e 524287). float f; const unsigned int v = u|(1U<<(8*sizeof(unsigned int)-1)); // set sign bit to 1. // use memcpy instead of simple assignmen...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
45,181,601,628,303,190,000,000,000,000,000,000,000
8
Fix other issues in 'CImg<T>::load_bmp()'.
print_indent_tree(FILE* f, Node* node, int indent) { int i; NodeType type; UChar* p; int add = 3; Indent(f, indent); if (IS_NULL(node)) { fprintf(f, "ERROR: null node!!!\n"); exit(0); } type = NODE_TYPE(node); switch (type) { case NODE_LIST: case NODE_ALT: if (type == NODE_LIST) ...
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
2,730,181,118,605,986,000,000,000,000,000,000,000
269
#207: Out-of-bounds write
process_fn(buf, len, data) char *buf; int len; char *data; /* dummy */ { struct plop *pp = plop_tab + (int)(unsigned char)*buf; if (len) { *buf = 0; return; } if (pp->buf) { ProcessInput(pp->buf, pp->len); return; } Msg(0, "Empty register."); }
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
4,215,822,868,640,108,000,000,000,000,000,000,000
19
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
static ut64 addr_to_offset(struct MACH0_(obj_t) *bin, ut64 addr) { if (bin->segs) { size_t i; for (i = 0; i < bin->nsegs; i++) { const ut64 segment_base = (ut64)bin->segs[i].vmaddr; const ut64 segment_size = (ut64)bin->segs[i].vmsize; if (addr >= segment_base && addr < segment_base + segment_size) { r...
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
257,517,615,274,529,800,000,000,000,000,000,000,000
13
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
static void fuse_send_readpages(struct fuse_io_args *ia, struct file *file) { struct fuse_file *ff = file->private_data; struct fuse_mount *fm = ff->fm; struct fuse_args_pages *ap = &ia->ap; loff_t pos = page_offset(ap->pages[0]); size_t count = ap->num_pages << PAGE_SHIFT; ssize_t res; int err; ap->args.out_p...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
193,642,258,636,002,630,000,000,000,000,000,000,000
35
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
static void hidp_copy_session(struct hidp_session *session, struct hidp_conninfo *ci) { u32 valid_flags = 0; memset(ci, 0, sizeof(*ci)); bacpy(&ci->bdaddr, &session->bdaddr); ci->flags = session->flags & valid_flags; ci->state = BT_CONNECTED; if (session->input) { ci->vendor = session->input->id.vendor; ci...
0
[ "CWE-787" ]
linux
7992c18810e568b95c869b227137a2215702a805
19,010,031,805,152,158,000,000,000,000,000,000,000
24
Bluetooth: hidp: buffer overflow in hidp_process_report CVE-2018-9363 The buffer length is unsigned at all layers, but gets cast to int and checked in hidp_process_report and can lead to a buffer overflow. Switch len parameter to unsigned int to resolve issue. This affects 3.18 and newer kernels. Signed-off-by: Mar...
static ssize_t extent_cache_hits_show(struct ext4_attr *a, struct ext4_sb_info *sbi, char *buf) { return snprintf(buf, PAGE_SIZE, "%lu\n", sbi->extent_cache_hits); }
0
[ "CWE-703", "CWE-189" ]
linux
d50f2ab6f050311dbf7b8f5501b25f0bf64a439b
322,274,037,308,136,330,000,000,000,000,000,000,000
5
ext4: fix undefined behavior in ext4_fill_flex_info() Commit 503358ae01b70ce6909d19dd01287093f6b6271c ("ext4: avoid divide by zero when trying to mount a corrupted file system") fixes CVE-2009-4307 by performing a sanity check on s_log_groups_per_flex, since it can be set to a bogus value by an attacker. sbi->s_log_...
int fit_config_verify(const void *fit, int conf_noffset) { return fit_config_verify_required_sigs(fit, conf_noffset, gd_fdt_blob()); }
0
[]
u-boot
79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4
260,408,972,776,184,420,000,000,000,000,000,000,000
5
fit: Don't allow verification of images with @ nodes When searching for a node called 'fred', any unit address appended to the name is ignored by libfdt, meaning that 'fred' can match 'fred@1'. This means that we cannot be sure that the node originally intended is the one that is used. Disallow use of nodes with unit...
int nci_recv_frame(struct nci_dev *ndev, struct sk_buff *skb) { pr_debug("len %d\n", skb->len); if (!ndev || (!test_bit(NCI_UP, &ndev->flags) && !test_bit(NCI_INIT, &ndev->flags))) { kfree_skb(skb); return -ENXIO; } /* Queue frame for rx worker thread */ skb_queue_tail(&ndev->rx_q, skb); queue_work(nde...
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
270,434,669,449,419,500,000,000,000,000,000,000,000
16
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
void CLASS blend_highlights() { int clip=INT_MAX, row, col, c, i, j; static const float trans[2][4][4] = { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; static const float itrans[2][4][4] = { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-...
0
[]
LibRaw
c4e374ea6c979a7d1d968f5082b7d0ea8cd27202
152,828,525,084,513,170,000,000,000,000,000,000,000
44
additional data checks backported from 0.15.4
void CLASS parseSonySR2 (uchar *cbuf_SR2, unsigned SR2SubIFDOffset, unsigned SR2SubIFDLength, unsigned dng_writer) { unsigned c; unsigned entries, tag, type, len; unsigned icbuf_SR2; int ival; int TagProcessed; float num; int i; entries = sget2(cbuf_SR2); if (entries > 1000) return; icbuf_SR2 = 2; ...
0
[ "CWE-400" ]
LibRaw
e67a9862d10ebaa97712f532eca1eb5e2e410a22
177,538,469,698,685,230,000,000,000,000,000,000,000
184
Fixed Secunia Advisory SA86384 - possible infinite loop in unpacked_load_raw() - possible infinite loop in parse_rollei() - possible infinite loop in parse_sinar_ia() Credits: Laurent Delosieres, Secunia Research at Flexera
int socket_connect(const char *addr, uint16_t port) { int sfd = -1; int yes = 1; struct hostent *hp; struct sockaddr_in saddr; #ifdef WIN32 WSADATA wsa_data; if (!wsa_init) { if (WSAStartup(MAKEWORD(2,2), &wsa_data) != ERROR_SUCCESS) { fprintf(stderr, "WSAStartup failed!\n"); ExitProcess(-1); } wsa_in...
0
[ "CWE-284", "CWE-703" ]
libusbmuxd
4397b3376dc4e4cb1c991d0aed61ce6482614196
322,594,025,769,497,520,000,000,000,000,000,000,000
67
common: [security fix] Make sure sockets only listen locally
const Address *HttpDownstreamConnection::get_raddr() const { return raddr_; }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
138,775,158,793,835,210,000,000,000,000,000,000,000
1
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
MYSQL_STMT *open_cursor(const char *query) { int rc; const ulong type= (ulong)CURSOR_TYPE_READ_ONLY; MYSQL_STMT *stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, query, strlen(query)); check_execute(stmt, rc); mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void*) &type); return stmt; }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
131,479,950,689,073,000,000,000,000,000,000,000,000
12
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
err_free(perrdetail *err) { Py_CLEAR(err->filename); }
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
175,327,294,633,040,230,000,000,000,000,000,000,000
4
bpo-35766: Merge typed_ast back into CPython (GH-11645)
int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) { return load_vdso32(); }
0
[]
linux
394f56fe480140877304d342dec46d50dc823d46
53,343,786,834,108,700,000,000,000,000,000,000,000
4
x86_64, vdso: Fix the vdso address randomization algorithm The theory behind vdso randomization is that it's mapped at a random offset above the top of the stack. To avoid wasting a page of memory for an extra page table, the vdso isn't supposed to extend past the lowest PMD into which it can fit. Other than that, t...
static void vt_console_print(struct console *co, const char *b, unsigned count) { struct vc_data *vc = vc_cons[fg_console].d; unsigned char c; static DEFINE_SPINLOCK(printing_lock); const ushort *start; ushort start_x, cnt; int kmsg_console; /* console busy or not yet initialized */ if (!printable) return; ...
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
43,418,446,496,957,340,000,000,000,000,000,000,000
74
vt: Disable KD_FONT_OP_COPY It's buggy: On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote: > We recently discovered a slab-out-of-bounds read in fbcon in the latest > kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that > "fbcon_do_set_font" did not handle "vc->vc_font.data" and > "vc->...
static GF_Err isom_create_init_from_mem(const char *fileName, GF_ISOFile *file) { u32 sample_rate=0; u32 nb_channels=0; u32 bps=0; //u32 atag=0; u32 nal_len=4; u32 width = 0; u32 height = 0; u32 timescale = 10000000; u64 tfdt = 0; char sz4cc[5]; char CodecParams[2048]; u32 CodecParamLen=0; char *sep, *val;...
0
[ "CWE-787" ]
gpac
f0a41d178a2dc5ac185506d9fa0b0a58356b16f7
302,076,872,625,462,330,000,000,000,000,000,000,000
213
fixed #2120
static ssize_t ipmi_type_show(struct device *dev, struct device_attribute *attr, char *buf) { struct smi_info *smi_info = dev_get_drvdata(dev); return snprintf(buf, 10, "%s\n", si_to_str[smi_info->io.si_type]); }
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
232,406,326,519,498,800,000,000,000,000,000,000,000
8
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
bool userfaultfd_remove(struct vm_area_struct *vma, unsigned long start, unsigned long end) { struct mm_struct *mm = vma->vm_mm; struct userfaultfd_ctx *ctx; struct userfaultfd_wait_queue ewq; ctx = vma->vm_userfaultfd_ctx.ctx; if (!ctx || !(ctx->features & UFFD_FEATURE_EVENT_REMOVE)) return true; userfaul...
0
[ "CWE-416" ]
linux
384632e67e0829deb8015ee6ad916b180049d252
325,838,241,726,593,500,000,000,000,000,000,000,000
24
userfaultfd: non-cooperative: fix fork use after free When reading the event from the uffd, we put it on a temporary fork_event list to detect if we can still access it after releasing and retaking the event_wqh.lock. If fork aborts and removes the event from the fork_event all is fine as long as we're still in the u...
sp_name *LEX::make_sp_name_package_routine(THD *thd, const LEX_CSTRING *name) { sp_name *res= make_sp_name(thd, name); if (likely(res) && unlikely(strchr(res->m_name.str, '.'))) { my_error(ER_SP_WRONG_NAME, MYF(0), res->m_name.str); res= NULL; } return res; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
203,874,842,816,000,280,000,000,000,000,000,000,000
10
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev) { if (dev->addr_len != IEEE802154_ADDR_LEN) return -1; memcpy(eui, dev->dev_addr, 8); eui[0] ^= 2; return 0; }
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
309,653,564,925,621,760,000,000,000,000,000,000,000
8
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
struct sctp_chunk *sctp_make_ifwdtsn(const struct sctp_association *asoc, __u32 new_cum_tsn, size_t nstreams, struct sctp_ifwdtsn_skip *skiplist) { struct sctp_chunk *retval = NULL; struct sctp_ifwdtsn_hdr ftsn_hdr; size_t hint; hint = (nstreams + 1) * sizeof(__u32); retval = sctp_make_control(...
0
[ "CWE-20" ]
linux
07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c
252,154,605,942,984,400,000,000,000,000,000,000,000
23
sctp: verify size of a new chunk in _sctp_make_chunk() When SCTP makes INIT or INIT_ACK packet the total chunk length can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when transmitting these packets, e.g. the crash on sending INIT_ACK: [ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168 ...
process_cmd_clients(char *line) { CMD_Request request; CMD_Reply reply; SubnetToDo *head, *todo, *tail, *p, *next_node, *new_node; int i, j, nets_looked_up, clients_looked_up; int word; unsigned long mask; unsigned long ip, bits; unsigned long client_hits; unsigned long peer_hits; unsigned long cmd_...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
166,704,704,772,175,920,000,000,000,000,000,000,000
89
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
GF_Box *csgp_box_new() { ISOM_DECL_BOX_ALLOC(GF_CompactSampleGroupBox, GF_ISOM_BOX_TYPE_CSGP); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
335,278,014,472,036,900,000,000,000,000,000,000,000
5
fixed #2255
int gnutls_x509_ext_import_subject_alt_names(const gnutls_datum_t * ext, gnutls_subject_alt_names_t sans, unsigned int flags) { ASN1_TYPE c2 = ASN1_TYPE_EMPTY; int result, ret; unsigned int i; gnutls_datum_t san, othername_oid; unsigned type; result = asn1_create_element(_gnutls_get_pkix(), "P...
0
[]
gnutls
d6972be33264ecc49a86cd0958209cd7363af1e9
79,008,202,124,744,110,000,000,000,000,000,000,000
69
eliminated double-free in the parsing of dist points Reported by Robert Święcki.
static int selinux_task_setpgid(struct task_struct *p, pid_t pgid) { return avc_has_perm(&selinux_state, current_sid(), task_sid_obj(p), SECCLASS_PROCESS, PROCESS__SETPGID, NULL); }
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
269,178,266,086,537,500,000,000,000,000,000,000,000
6
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
pthread_equal(pthread_t t1, pthread_t t2) { return t1 == t2; }
0
[ "CWE-703", "CWE-125" ]
portable
17c88164016df821df2dff4b2b1291291ec4f28a
254,569,499,115,488,000,000,000,000,000,000,000,000
4
Make pthread_mutex static initialisation work on Windows. This takes the dynamic initialisation code added to CRYPTO_lock() in e5081719 and applies it to the Window's pthread_mutex implementation. This allows for PTHREAD_MUTEX_INITIALIZER to be used on Windows. bcook has agreed to place this code in the public domain...
static void checkpoint(void) { checkpoint_requested = 0; if (object_count) { cycle_packfile(); dump_branches(); dump_tags(); dump_marks(); } }
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
269,936,201,565,932,700,000,000,000,000,000,000,000
10
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
static int on_transaction_timeout(sd_event_source *s, usec_t usec, void *userdata) { DnsTransaction *t = userdata; assert(s); assert(t); if (!t->initial_jitter_scheduled || t->initial_jitter_elapsed) { /* Timeout reached? Increase the timeout for the server used */ ...
0
[ "CWE-416" ]
systemd
904dcaf9d4933499f8334859f52ea8497f2d24ff
239,041,175,558,732,300,000,000,000,000,000,000,000
33
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...
sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *chunk = arg; struct sctp_fwdtsn_hdr *fwdtsn_hdr; struct sctp_fwdtsn_skip *skip; ...
0
[ "CWE-119" ]
linux-2.6
9fcb95a105758b81ef0131cd18e2db5149f13e95
150,774,253,065,721,530,000,000,000,000,000,000,000
65
sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID If FWD-TSN chunk is received with bad stream ID, the sctp will not do the validity check, this may cause memory overflow when overwrite the TSN of the stream ID. The FORWARD-TSN chunk is like this: FORWARD-TSN chunk Type ...
void WebContents::OnAudioStateChanged(bool audible) { Emit("-audio-state-changed", audible); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
189,330,150,827,729,730,000,000,000,000,000,000,000
3
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 int __init io_uring_init(void) { #define __BUILD_BUG_VERIFY_ELEMENT(stype, eoffset, etype, ename) do { \ BUILD_BUG_ON(offsetof(stype, ename) != eoffset); \ BUILD_BUG_ON(sizeof(etype) != sizeof_field(stype, ename)); \ } while (0) #define BUILD_BUG_SQE_ELEM(eoffset, etype, ename) \ __BUILD_BUG_VERIFY_ELEMENT(...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
241,242,823,615,809,160,000,000,000,000,000,000,000
54
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
SWFRect SWFShape_getEdgeBounds(SWFShape shape) { if(shape->useVersion == SWF_SHAPE4) return shape->edgeBounds; else return NULL; }
0
[ "CWE-20", "CWE-476" ]
libming
6e76e8c71cb51c8ba0aa9737a636b9ac3029887f
197,057,307,676,050,500,000,000,000,000,000,000,000
7
SWFShape_setLeftFillStyle: prevent fill overflow
static void iwl_trans_pcie_write_prph(struct iwl_trans *trans, u32 addr, u32 val) { u32 mask = iwl_trans_pcie_prph_msk(trans); iwl_trans_pcie_write32(trans, HBUS_TARG_PRPH_WADDR, ((addr & mask) | (3 << 24))); iwl_trans_pcie_write32(trans, HBUS_TARG_PRPH_WDAT, val); }
0
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
187,270,383,216,974,260,000,000,000,000,000,000,000
9
iwlwifi: pcie: fix rb_allocator workqueue allocation We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Sig...
static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, struct dj_report *dj_report) { struct hid_device *hdev = djrcv_dev->hdev; struct hid_report *report; struct hid_report_enum *output_report_enum; u8 *data = (u8 *)(&dj_report->device_index); unsigned int i; output_report_enum = &hdev->...
0
[ "CWE-119", "CWE-787" ]
linux
ad3e14d7c5268c2e24477c6ef54bbdf88add5d36
199,117,568,682,795,700,000,000,000,000,000,000,000
24
HID: logitech: perform bounds checking on device_id early enough device_index is a char type and the size of paired_dj_deivces is 7 elements, therefore proper bounds checking has to be applied to device_index before it is used. We are currently performing the bounds checking in logi_dj_recv_add_djhid_device(), which ...
static const char *parse_scheme(struct parse_state *state) { size_t mb; const char *tmp = state->ptr; do { switch (*state->ptr) { case ':': /* scheme delimiter */ state->url.scheme = &state->buffer[0]; state->buffer[state->offset++] = 0; return ++state->ptr; case '0': case '1': case '2': case '3'...
0
[ "CWE-119" ]
ext-http
3724cd76a28be1d6049b5537232e97ac567ae1f5
195,802,959,808,883,330,000,000,000,000,000,000,000
44
fix bug #71719 (Buffer overflow in HTTP url parsing functions) The parser's offset was not reset when we softfail in scheme parsing and continue to parse a path. Thanks to hlt99 at blinkenshell dot org for the report.
**/ const CImg<T>& save_yuv(const char *const filename, const unsigned int chroma_subsampling=444, const bool is_rgb=true) const { CImgList<T>(*this,true).save_yuv(filename,chroma_subsampling,is_rgb); return *this;
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
183,344,144,465,074,770,000,000,000,000,000,000,000
6
.
static int evm_calc_hmac_or_hash(struct dentry *dentry, const char *req_xattr_name, const char *req_xattr_value, size_t req_xattr_value_len, char type, char *digest) { struct inode *inode = dentry->d_inode; struct shash_desc *desc; char **xattrname; size_t xattr_size = 0; char *xattr_value = NULL; ...
0
[ "CWE-703" ]
linux
a67adb997419fb53540d4a4f79c6471c60bc69b6
334,137,913,834,150,500,000,000,000,000,000,000,000
49
evm: checking if removexattr is not a NULL The following lines of code produce a kernel oops. fd = socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0); fchmod(fd, 0666); [ 139.922364] BUG: unable to handle kernel NULL pointer dereference at (null) [ 139.924982] IP: [< (null)>] (null) [ 139.924982] *pd...
ClientHttpRequest::calloutsError(const err_type error, const ErrorDetail::Pointer &errDetail) { // The original author of the code also wanted to pass an errno to // setReplyToError, but it seems unlikely that the errno reflects the // true cause of the error at this point, so I did not pass it. if (cal...
0
[ "CWE-116" ]
squid
6bf66733c122804fada7f5839ef5f3b57e57591c
162,549,488,202,081,880,000,000,000,000,000,000,000
26
Handle more Range requests (#790) Also removed some effectively unused code.
void LinkResolver::runtime_resolve_special_method(CallInfo& result, const LinkInfo& link_info, const methodHandle& resolved_method, Handle recv, TRAPS) { Klass* resolv...
0
[]
jdk11u
132745902a4601dc64b2c8ca112ca30292feccb4
292,401,825,167,469,300,000,000,000,000,000,000,000
98
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
spell_suggest(int count) { char_u *line; pos_T prev_cursor = curwin->w_cursor; char_u wcopy[MAXWLEN + 2]; char_u *p; int i; int c; suginfo_T sug; suggest_T *stp; int mouse_used; int need_cap; int limit; int selected = count; int badlen = 0; int msg_scroll_...
0
[ "CWE-125", "CWE-787" ]
vim
156d3911952d73b03d7420dc3540215247db0fe8
127,374,864,930,300,680,000,000,000,000,000,000,000
253
patch 8.2.5123: using invalid index when looking for spell suggestions Problem: Using invalid index when looking for spell suggestions. Solution: Do not decrement the index when it is zero.
virDomainMemoryPeek(virDomainPtr dom, unsigned long long start /* really 64 bits */, size_t size, void *buffer, unsigned int flags) { virConnectPtr conn; VIR_DOMAIN_DEBUG(dom, "start=%lld, size=%zi, buffer=%p, flags=%x", ...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
21,320,029,214,039,310,000,000,000,000,000,000,000
62
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
static void write_pack_file(void) { uint32_t i = 0, j; struct sha1file *f; off_t offset; uint32_t nr_remaining = nr_result; time_t last_mtime = 0; struct object_entry **write_order; if (progress > pack_to_stdout) progress_state = start_progress(_("Writing objects"), nr_result); written_list = xmalloc(to_pack...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
108,523,838,592,350,740,000,000,000,000,000,000,000
126
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 ...
static MagickBooleanType IsPSD(const unsigned char *magick,const size_t length) { if (length < 4) return(MagickFalse); if (LocaleNCompare((const char *) magick,"8BPS",4) == 0) return(MagickTrue); return(MagickFalse); }
0
[]
ImageMagick
bd9f1e7d1bd2c8e2cf7895d133c5c5b5cd3526b6
284,169,726,245,893,400,000,000,000,000,000,000,000
8
Fixed memory leak when reading incorrect PSD files
TEST(GatherNdOpTest, Int8Int32) { GatherNdOpModel m({TensorType_INT8, {3, 2, 3}}, {TensorType_INT32, {2, 2}}); m.SetInput<int8_t>({1, -1, 1, -2, 2, 2, // 3, 3, -3, -4, -4, 4, // 5, -5, 5, 6, -6, 6}); m.SetPositions<int32_t>({0, 1, 1, 0}); ASSERT_EQ(m.Invoke(), kTfL...
0
[ "CWE-125" ]
tensorflow
595a65a3e224a0362d7e68c2213acfc2b499a196
127,779,622,227,810,110,000,000,000,000,000,000,000
10
Return a TFLite error if gather_nd will result in reading invalid memory PiperOrigin-RevId: 463054033
zrestore(i_ctx_t *i_ctx_p) { os_ptr op = osp; alloc_save_t *asave; bool last; vm_save_t *vmsave; int code = restore_check_operand(op, &asave, idmemory); if (code < 0) return code; if_debug2m('u', imemory, "[u]vmrestore 0x%lx, id = %lu\n", (ulong) alloc_save_client_dat...
1
[]
ghostpdl
5516c614dc33662a2afdc377159f70218e67bde5
16,957,655,121,206,395,000,000,000,000,000,000,000
73
Improve restore robustness Prompted by looking at Bug 699654: There are two variants of the restore operator in Ghostscript: one is Level 1 (restoring VM), the other is Level 2+ (adding page device restoring to the Level operator). This was implemented by the Level 2+ version restoring the device in the graphics sta...
CERT *ssl_cert_new(void) { CERT *ret = OPENSSL_zalloc(sizeof(*ret)); if (ret == NULL) { ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE); return NULL; } ret->key = &(ret->pkeys[SSL_PKEY_RSA]); ret->references = 1; ret->sec_cb = ssl_security_default_callback; ret->sec_level = OP...
0
[ "CWE-835" ]
openssl
758754966791c537ea95241438454aa86f91f256
165,074,655,627,951,340,000,000,000,000,000,000,000
23
Fix invalid handling of verify errors in libssl In the event that X509_verify() returned an internal error result then libssl would mishandle this and set rwstate to SSL_RETRY_VERIFY. This subsequently causes SSL_get_error() to return SSL_ERROR_WANT_RETRY_VERIFY. That return code is supposed to only ever be returned i...
static int inet6_fill_ifmcaddr(struct sk_buff *skb, struct ifmcaddr6 *ifmca, u32 portid, u32 seq, int event, u16 flags) { struct nlmsghdr *nlh; u8 scope = RT_SCOPE_UNIVERSE; int ifindex = ifmca->idev->dev->ifindex; if (ipv6_addr_scope(&ifmca->mca_addr) & IFA_SITE) scope = RT_SCOPE_SITE; nlh = nlmsg_put(sk...
0
[ "CWE-20" ]
linux
77751427a1ff25b27d47a4c36b12c3c8667855ac
140,314,237,689,519,570,000,000,000,000,000,000,000
25
ipv6: addrconf: validate new MTU before applying it Currently we don't check if the new MTU is valid or not and this allows one to configure a smaller than minimum allowed by RFCs or even bigger than interface own MTU, which is a problem as it may lead to packet drops. If you have a daemon like NetworkManager running...
CImg<floatT> get_object3dtoCImg3d(const CImgList<tp>& primitives, const CImgList<tc>& colors, const to& opacities, const bool full_check=true) const { CImg<charT> error_message(1024); if (!i...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
292,198,373,068,379,680,000,000,000,000,000,000,000
67
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
Item_case_expr::Item_case_expr(uint case_expr_id) :Item_sp_variable( C_STRING_WITH_LEN("case_expr")), m_case_expr_id(case_expr_id) { }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
221,036,146,155,277,240,000,000,000,000,000,000,000
5
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
ar6000_acl_data_tx(struct sk_buff *skb, struct net_device *dev) { struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); struct ar_cookie *cookie; HTC_ENDPOINT_ID eid = ENDPOINT_UNUSED; cookie = NULL; AR6000_SPIN_LOCK(&ar->arLock, 0); /* For now we send ACL on BE endpoint: We...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
165,022,616,002,884,460,000,000,000,000,000,000,000
44
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...
cpio_to_stat (struct stat *st, struct cpio_file_stat *hdr) { memset (st, 0, sizeof (*st)); st->st_dev = makedev (hdr->c_dev_maj, hdr->c_dev_min); st->st_ino = hdr->c_ino; st->st_mode = hdr->c_mode & 0777; if (hdr->c_mode & CP_IFREG) st->st_mode |= S_IFREG; else if (hdr->c_mode & CP_IFDIR) st->st_mod...
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
283,901,625,305,889,230,000,000,000,000,000,000,000
41
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
virDomainObjBroadcast(virDomainObjPtr vm) { virCondBroadcast(&vm->cond); }
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
33,036,797,966,825,390,000,000,000,000,000,000,000
4
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
de265_error video_usability_information::read(error_queue* errqueue, bitreader* br, const seq_parameter_set* sps) { int vlc; // --- sample aspect ratio (SAR) --- aspect_ratio_info_present_flag = get_bits(br, 1); if (aspect_ratio_info_present_flag) { int aspec...
0
[ "CWE-787" ]
libde265
8e89fe0e175d2870c39486fdd09250b230ec10b8
309,108,094,246,615,670,000,000,000,000,000,000,000
195
error on out-of-range cpb_cnt_minus1 (oss-fuzz issue 27590)
new_msg_sync_lsdb (u_int32_t seqnum, struct lsa_filter_type *filter) { u_char buf[OSPF_API_MAX_MSG_SIZE]; struct msg_sync_lsdb *smsg; int len; smsg = (struct msg_sync_lsdb *) buf; len = sizeof (struct msg_sync_lsdb) + filter->num_areas * sizeof (struct in_addr); smsg->filter.typemask = htons (filter->t...
1
[ "CWE-119" ]
quagga
3f872fe60463a931c5c766dbf8c36870c0023e88
211,126,696,673,716,740,000,000,000,000,000,000,000
14
ospfd: CVE-2013-2236, stack overrun in apiserver the OSPF API-server (exporting the LSDB and allowing announcement of Opaque-LSAs) writes past the end of fixed on-stack buffers. This leads to an exploitable stack overflow. For this condition to occur, the following two conditions must be true: - Quagga is configured...
yang_read_common(struct lys_module *module, char *value, enum yytokentype type) { int ret = 0; switch (type) { case MODULE_KEYWORD: module->name = lydict_insert_zc(module->ctx, value); break; case NAMESPACE_KEYWORD: ret = yang_check_string(module, &module->ns, "namespace", "modu...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
113,782,913,471,873,260,000,000,000,000,000,000,000
26
yang parser BUGFIX double free Fixes #742
QPDFWriter::getOriginalID1() { QPDFObjectHandle trailer = this->m->pdf.getTrailer(); if (trailer.hasKey("/ID")) { return trailer.getKey("/ID").getArrayItem(0).getStringValue(); } else { return ""; } }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
247,644,762,125,305,160,000,000,000,000,000,000,000
12
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
R_API RCore *r_core_new() { RCore *c = R_NEW0 (RCore); if (c) { r_core_init (c); } return c; }
0
[ "CWE-415", "CWE-703" ]
radare2
cb8b683758edddae2d2f62e8e63a738c39f92683
76,186,090,628,107,870,000,000,000,000,000,000,000
7
Fix #16303 - c->table_query double free (#16318)
void format_read_arglist(va_list va, FORMAT_REC *format, char **arglist, int arglist_size, char *buffer, int buffer_size) { int num, len, bufpos; g_return_if_fail(format->params < arglist_size); bufpos = 0; arglist[format->params] = NULL; for (num = 0; num < format->params; num++) { switch (format->par...
0
[ "CWE-476" ]
irssi
6c6c42e3d1b49d90aacc0b67f8540471cae02a1d
162,540,103,011,465,860,000,000,000,000,000,000,000
62
Merge branch 'security' into 'master' See merge request !7
static inline const unsigned char *PushShortPixel(const EndianType endian, const unsigned char *pixels,unsigned short *pixel) { register unsigned int quantum; if (endian == LSBEndian) { quantum=(unsigned int) *pixels++; quantum|=(unsigned int) (*pixels++ << 8); *pixel=(unsigned short) (...
0
[ "CWE-190" ]
ImageMagick
f60d59cc3a7e3402d403361e0985ffa56f746a82
156,037,517,530,183,700,000,000,000,000,000,000,000
18
https://github.com/ImageMagick/ImageMagick/issues/1727
LogicalResult matchAndRewrite(TFL::FullyConnectedOp fully_connected_op, PatternRewriter &) const override { auto input = fully_connected_op.input(); auto input_ty = input.getType().dyn_cast<ShapedType>(); auto output_ty = fully_connected_op.output()[0] ...
0
[ "CWE-476", "CWE-125" ]
tensorflow
d6b57f461b39fd1aa8c1b870f1b974aac3554955
107,497,612,681,191,020,000,000,000,000,000,000,000
31
Prevent nullptr dereference in MLIR TFLite dialect/optimizer. PiperOrigin-RevId: 387220762 Change-Id: Id136ef04bb3d36123b4685d316ae81a9ec924d6b
process_colour_pointer_common(STREAM s, int bpp) { uint16 width, height, cache_idx, masklen, datalen; uint16 x, y; uint8 *mask; uint8 *data; RD_HCURSOR cursor; in_uint16_le(s, cache_idx); in_uint16_le(s, x); in_uint16_le(s, y); in_uint16_le(s, width); in_uint16_le(s, height); in_uint16_le(s, masklen); in_u...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
277,610,795,918,580,400,000,000,000,000,000,000,000
29
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static JSValue js_print_ex(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, u32 ltool, u32 error_type) { int i=0; Bool first=GF_TRUE; s32 logl = GF_LOG_INFO; JSValue v, g; const char *c_logname=NULL; const char *log_name = "JS"; if ((argc>1) && JS_IsNumber(argv[0])) { ...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
262,681,323,173,767,940,000,000,000,000,000,000,000
75
fixed #2138
static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr) { struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; struct net_device *dev = ifa->ifa_dev->dev; struct net *net = dev_net(dev); switch (event) { case NETDEV_UP: fib_add_ifaddr(ifa); #ifdef CONFIG_IP_ROUTE_MULTIPATH fib_s...
0
[ "CWE-399" ]
net-next
fbd40ea0180a2d328c5adc61414dc8bab9335ce2
48,078,173,263,667,770,000,000,000,000,000,000,000
30
ipv4: Don't do expensive useless work during inetdev destroy. When an inetdev is destroyed, every address assigned to the interface is removed. And in this scenerio we do two pointless things which can be very expensive if the number of assigned interfaces is large: 1) Address promotion. We are deleting all address...
static void coroutine_fn mirror_write_complete(MirrorOp *op, int ret) { MirrorBlockJob *s = op->s; if (ret < 0) { BlockErrorAction action; bdrv_set_dirty_bitmap(s->dirty_bitmap, op->offset, op->bytes); action = mirror_error_action(s, false, -ret); if (action == BLOCK_ERROR_ACTI...
0
[ "CWE-476" ]
qemu
66fed30c9cd11854fc878a4eceb507e915d7c9cd
285,629,753,710,033,200,000,000,000,000,000,000,000
16
block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts() In mirror_iteration() we call mirror_wait_on_conflicts() with `self` parameter set to NULL. Starting from commit d44dae1a7c we dereference `self` pointer in mirror_wait_on_conflicts() without checks if it is not NULL. Backtrace: Program termi...
static coroutine_fn int vpc_co_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { int ret; BDRVVPCState *s = bs->opaque; qemu_co_mutex_lock(&s->lock); ret = vpc_read(bs, sector_num, buf, nb_sectors); qemu_co_mutex_unlock(&s->lock); ...
0
[ "CWE-20" ]
qemu
97f1c45c6f456572e5b504b8614e4a69e23b8e3a
182,068,551,945,010,400,000,000,000,000,000,000,000
10
vpc/vhd: add bounds check for max_table_entries and block_size (CVE-2014-0144) This adds checks to make sure that max_table_entries and block_size are in sane ranges. Memory is allocated based on max_table_entries, and block_size is used to calculate indices into that allocated memory, so if these values are incorrec...
static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offset, int section_index TSRMLS_DC) { int i, sn, num_entries, sub_section_index = 0; unsigned char *dir_entry; char tagname[64]; size_t ifd_size, dir_size, entry_offset, next_offset, entry_length, entry_value=0, fgot; int entry_tag , entry...
1
[ "CWE-200" ]
php-src
6dbb1ee46b5f4725cc6519abf91e512a2a10dfed
50,702,194,199,841,100,000,000,000,000,000,000,000
228
Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF
MagickExport int LocaleLowercase(const int c) { #if defined(MAGICKCORE_LOCALE_SUPPORT) if (c_locale != (locale_t) NULL) return(tolower_l((int) ((unsigned char) c),c_locale)); #endif return(tolower((int) ((unsigned char) c))); }
1
[ "CWE-399", "CWE-125" ]
ImageMagick
edc7d3035883ddca8413e4fe7689aa2e579ef04a
316,133,956,972,304,400,000,000,000,000,000,000,000
8
...
static int init_vqs(struct virtnet_info *vi) { int ret; /* Allocate send & receive queues */ ret = virtnet_alloc_queues(vi); if (ret) goto err; ret = virtnet_find_vqs(vi); if (ret) goto err_free; get_online_cpus(); virtnet_set_affinity(vi); put_online_cpus(); return 0; err_free: virtnet_free_queues(...
0
[ "CWE-119", "CWE-787" ]
linux
48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
175,019,911,736,976,600,000,000,000,000,000,000,000
24
virtio-net: drop NETIF_F_FRAGLIST virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRA...
void test_nghttp2_session_change_stream_priority(void) { nghttp2_session *session; nghttp2_session_callbacks callbacks; nghttp2_stream *stream1, *stream2, *stream3, *stream5; nghttp2_priority_spec pri_spec; int rv; memset(&callbacks, 0, sizeof(callbacks)); nghttp2_session_server_new(&session, &callbacks...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
195,290,065,442,086,460,000,000,000,000,000,000,000
73
Add nghttp2_option_set_max_outbound_ack
static int ct_play(struct media_player *mp, void *user_data) { struct avrcp_player *player = user_data; return ct_press(player, AVC_PLAY); }
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
107,178,833,425,342,060,000,000,000,000,000,000,000
6
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
my_bool STDCALL mysql_ssl_set(MYSQL *mysql MY_ATTRIBUTE((unused)) , const char *key MY_ATTRIBUTE((unused)), const char *cert MY_ATTRIBUTE((unused)), const char *ca MY_ATTRIBUTE((unused)), const char *capath MY_ATTRIBUTE((unused)), const char *cipher MY_ATTRIBUTE((unused))) { my_bool...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
158,311,243,398,466,220,000,000,000,000,000,000,000
20
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) { struct drm_i915_private *i915 = __uc_fw_to_gt(uc_fw)->i915; struct device *dev = i915->drm.dev; struct drm_i915_gem_object *obj; const struct firmware *fw = NULL; struct uc_css_header *css; size_t size; int err; GEM_BUG_ON(!i915->wopcm.size); GEM_BUG_ON(!inte...
0
[ "CWE-20", "CWE-190" ]
linux
c784e5249e773689e38d2bc1749f08b986621a26
180,683,099,285,407,440,000,000,000,000,000,000,000
127
drm/i915/guc: Update to use firmware v49.0.1 The latest GuC firmware includes a number of interface changes that require driver updates to match. * Starting from Gen11, the ID to be provided to GuC needs to contain the engine class in bits [0..2] and the instance in bits [3..6]. NOTE: this patch breaks pointer d...
BuildVersion* Binary::build_version() { return command<BuildVersion>(); }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
182,860,969,605,686,470,000,000,000,000,000,000,000
3
Resolve #764
long pin_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas, int *locked) { /* FOLL_GET and FOLL_PIN are mutually exclusive. */ if (WARN_ON_ONCE(gup_flags & FOLL_GET))...
0
[ "CWE-362" ]
linux
17839856fd588f4ab6b789f482ed3ffd7c403e1f
43,302,032,949,414,170,000,000,000,000,000,000,000
13
gup: document and work around "COW can break either way" issue Doing a "get_user_pages()" on a copy-on-write page for reading can be ambiguous: the page can be COW'ed at any time afterwards, and the direction of a COW event isn't defined. Yes, whoever writes to it will generally do the COW, but if the thread that did...
ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) { int err = 0; struct ip_tunnel_parm p; struct ip_tunnel *t; struct net *net = dev_net(dev); struct ipip_net *ipn = net_generic(net, ipip_net_id); switch (cmd) { case SIOCGETTUNNEL: t = NULL; if (dev == ipn->fb_tunnel_dev) { if (copy_...
0
[]
linux-2.6
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
337,395,392,452,217,150,000,000,000,000,000,000,000
113
tunnels: fix netns vs proto registration ordering Same stuff as in ip_gre patch: receive hook can be called before netns setup is done, oopsing in net_generic(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bool CIRCSock::OnTopicMessage(CTopicMessage& Message) { const CNick& Nick = Message.GetNick(); CChan* pChan = m_pNetwork->FindChan(Message.GetParam(0)); if (pChan) { Message.SetChan(pChan); bool bReturn = false; IRCSOCKMODULECALL(OnTopicMessage(Message), &bReturn); if (bRetu...
0
[ "CWE-20", "CWE-284" ]
znc
d22fef8620cdd87490754f607e7153979731c69d
233,212,751,375,484,100,000,000,000,000,000,000,000
17
Better cleanup lines coming from network. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
static int floppy_alloc_disk(unsigned int drive, unsigned int type) { struct gendisk *disk; disk = blk_mq_alloc_disk(&tag_sets[drive], NULL); if (IS_ERR(disk)) return PTR_ERR(disk); blk_queue_max_hw_sectors(disk->queue, 64); disk->major = FLOPPY_MAJOR; disk->first_minor = TOMINOR(drive) | (type << 2); disk->...
0
[ "CWE-416" ]
linux
233087ca063686964a53c829d547c7571e3f67bf
53,094,459,308,919,530,000,000,000,000,000,000,000
26
floppy: disable FDRAWCMD by default Minh Yuan reported a concurrency use-after-free issue in the floppy code between raw_cmd_ioctl and seek_interrupt. [ It turns out this has been around, and that others have reported the KASAN splats over the years, but Minh Yuan had a reproducer for it and so gets primary credi...
static int generic_print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple) { return 0; }
0
[ "CWE-20", "CWE-254", "CWE-787" ]
linux
db29a9508a9246e77087c5531e45b2c88ec6988b
244,187,044,637,609,730,000,000,000,000,000,000,000
5
netfilter: conntrack: disable generic tracking for known protocols Given following iptables ruleset: -P FORWARD DROP -A FORWARD -m sctp --dport 9 -j ACCEPT -A FORWARD -p tcp --dport 80 -j ACCEPT -A FORWARD -p tcp -m conntrack -m state ESTABLISHED,RELATED -j ACCEPT One would assume that this allows SCTP on port 9 and...
__releases(seq->private->l->lock) { struct bt_seq_state *s = seq->private; struct bt_sock_list *l = s->l; read_unlock(&l->lock); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
79,695,482,564,521,430,000,000,000,000,000,000,000
7
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
asmlinkage void do_notify_resume(__u32 thread_info_flags) { /* pending single-step? */ if (thread_info_flags & _TIF_SINGLESTEP) clear_thread_flag(TIF_SINGLESTEP); /* deal with pending signal delivery */ if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) do_signal(); /* deal with notification o...
1
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
235,324,972,032,490,840,000,000,000,000,000,000,000
17
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
var_check_permission(dictitem_T *di, char_u *name) { if (var_check_ro(di->di_flags, name, FALSE) || value_check_lock(di->di_tv.v_lock, name, FALSE) || var_check_lock(di->di_flags, name, FALSE)) return FAIL; return OK; }
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
17,004,695,814,355,672,000,000,000,000,000,000,000
8
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
**/ const CImg<T>& save_analyze(const char *const filename, const float *const voxel_size=0) const { if (!filename) throw CImgArgumentException(_cimg_instance "save_analyze(): Specified filename is (null).", cimg_instance); ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
131,823,012,444,305,100,000,000,000,000,000,000,000
75
Fix other issues in 'CImg<T>::load_bmp()'.