func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
bool HeaderMapImpl::operator==(const HeaderMapImpl& rhs) const { if (size() != rhs.size()) { return false; } for (auto i = headers_.begin(), j = rhs.headers_.begin(); i != headers_.end(); ++i, ++j) { if (i->key() != j->key().getStringView() || i->value() != j->value().getStringView()) { return fals...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
326,393,149,736,214,730,000,000,000,000,000,000,000
13
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static int read_next_command(void) { static int stdin_eof = 0; if (stdin_eof) { unread_command_buf = 0; return EOF; } for (;;) { const char *p; if (unread_command_buf) { unread_command_buf = 0; } else { struct recent_command *rc; strbuf_detach(&command_buf, NULL); stdin_eof = strbuf_getlin...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
272,512,472,013,987,930,000,000,000,000,000,000,000
57
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...
evbuffer_set_parent(struct evbuffer *buf, struct bufferevent *bev) { EVBUFFER_LOCK(buf); buf->parent = bev; EVBUFFER_UNLOCK(buf); }
0
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
225,685,700,869,578,600,000,000,000,000,000,000,000
6
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
Discovered_table_list::Discovered_table_list(THD *thd_arg, Dynamic_array<LEX_CSTRING*> *tables_arg, const LEX_CSTRING *wild_arg) : thd(thd_arg), with_temps(false), tables(tables_arg) { if (wild_arg->str && wild_arg->str[0]) { wild= wild_arg->str; wend= wild + wild_arg->le...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
52,647,209,355,936,910,000,000,000,000,000,000,000
13
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
static ZIPARCHIVE_METHOD(extractTo) { struct zip *intern; zval *self = getThis(); zval *zval_files = NULL; zval *zval_file = NULL; php_stream_statbuf ssb; char *pathto; size_t pathto_len; int ret, i; int nelems; if (!self) { RETURN_FALSE; } if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|z", &pathto, &p...
0
[ "CWE-190" ]
php-src
3b8d4de300854b3517c7acb239b84f7726c1353c
47,247,376,167,792,425,000,000,000,000,000,000,000
83
Fix bug #71923 - integer overflow in ZipArchive::getFrom*
int mp_montgomery_calc_normalization(mp_int *a, mp_int *b) { fp_montgomery_calc_normalization(a, b); return MP_OKAY; }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
300,868,012,475,258,140,000,000,000,000,000,000,000
5
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.
static void vhost_net_busy_poll(struct vhost_net *net, struct vhost_virtqueue *rvq, struct vhost_virtqueue *tvq, bool *busyloop_intr, bool poll_rx) { unsigned long busyloop_timeout; unsigned long endtime; struct socket *sock; struct vhost_virtqueue *vq = poll_rx ? tvq : rvq; /* Try to hold the vq ...
0
[ "CWE-787" ]
linux
42d84c8490f9f0931786f1623191fcab397c3d64
260,664,298,696,531,180,000,000,000,000,000,000,000
50
vhost: Check docket sk_family instead of call getname Doing so, we save one call to get data we already have in the struct. Also, since there is no guarantee that getname use sockaddr_ll parameter beyond its size, we add a little bit of security here. It should do not do beyond MAX_ADDR_LEN, but syzbot found that ax2...
int n_ssl3_mac(SSL *ssl, unsigned char *md, int send) { SSL3_RECORD *rec; unsigned char *mac_sec,*seq; EVP_MD_CTX md_ctx; const EVP_MD_CTX *hash; unsigned char *p,rec_char; size_t md_size; int npad; int t; if (send) { rec= &(ssl->s3->wrec); mac_sec= &(ssl->s3->write_mac_secret[0]); seq= &(ssl->s3->wr...
0
[ "CWE-310" ]
openssl
e5420be6cd09af2550b128575a675490cfba0483
128,722,472,772,765,070,000,000,000,000,000,000,000
98
Make CBC decoding constant time. This patch makes the decoding of SSLv3 and TLS CBC records constant time. Without this, a timing side-channel can be used to build a padding oracle and mount Vaudenay's attack. This patch also disables the stitched AESNI+SHA mode pending a similar fix to that code. In order to be eas...
static void vhost_vdpa_iotlb_free(struct vhost_vdpa *v) { struct vhost_dev *dev = &v->vdev; vhost_vdpa_iotlb_unmap(v, 0ULL, 0ULL - 1); kfree(dev->iotlb); dev->iotlb = NULL; }
0
[ "CWE-416" ]
linux
f6bbf0010ba004f5e90c7aefdebc0ee4bd3283b9
323,974,736,029,287,980,000,000,000,000,000,000,000
8
vhost-vdpa: fix use-after-free of v->config_ctx When the 'v->config_ctx' eventfd_ctx reference is released we didn't set it to NULL. So if the same character device (e.g. /dev/vhost-vdpa-0) is re-opened, the 'v->config_ctx' is invalid and calling again vhost_vdpa_config_put() causes use-after-free issues like the foll...
bool ms_can_fast_dispatch(const Message *m) const override { switch (m->get_type()) { case CEPH_MSG_OSD_OP: case CEPH_MSG_OSD_BACKOFF: case MSG_OSD_SUBOP: case MSG_OSD_REPOP: case MSG_OSD_SUBOPREPLY: case MSG_OSD_REPOPREPLY: case MSG_OSD_PG_PUSH: case MSG_OSD_PG_PULL: case MSG_...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
62,387,647,309,762,970,000,000,000,000,000,000,000
30
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 ...
string t_cpp_generator::local_reflection_name(const char* prefix, t_type* ttype, bool external) { ttype = get_true_type(ttype); // We have to use the program name as part of the identifier because // if two thrift "programs" are compiled into one actual program // you would get a symbol collision if they both ...
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
213,514,037,625,477,900,000,000,000,000,000,000,000
37
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMP(FILE *inFile) { gdImagePtr im; gdIOCtx *in = gdNewFileCtx(inFile); if (in == NULL) return NULL; im = gdImageCreateFromWBMPCtx(in); in->gd_free(in); return im; }
0
[ "CWE-415" ]
libgd
553702980ae89c83f2d6e254d62cf82e204956d0
259,573,925,859,434,000,000,000,000,000,000,000,000
9
Fix #492: Potential double-free in gdImage*Ptr() Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we must not call `gdDPExtractData()`; otherwise a double-free would happen. Since `gdImage*Ctx()` are void functions, and we can't change that for BC reasons, we're introducing static helpers which ar...
coderange_scan(const char *p, long len, rb_encoding *enc) { const char *e = p + len; if (rb_enc_to_index(enc) == 0) { /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */ p = search_nonascii(p, e); return p ? ENC_CODERANGE_VALID : ENC_CODERANGE_7BIT; } if (rb_enc_asciic...
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
149,995,418,371,283,700,000,000,000,000,000,000,000
47
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
void *arpt_alloc_initial_table(const struct xt_table *info) { return xt_alloc_initial_table(arpt, ARPT); }
0
[ "CWE-200" ]
linux-2.6
42eab94fff18cb1091d3501cd284d6bd6cc9c143
133,724,299,329,120,470,000,000,000,000,000,000,000
4
netfilter: arp_tables: fix infoleak to userspace Structures ipt_replace, compat_ipt_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sensitive i...
test_empty (void) { g_autoptr(FlatpakBwrap) bwrap = flatpak_bwrap_new (NULL); g_autoptr(FlatpakExports) exports = flatpak_exports_new (); gsize i; g_assert_false (flatpak_exports_path_is_visible (exports, "/run")); g_assert_cmpint (flatpak_exports_path_get_mode (exports, "/tmp"), ==, FLATP...
0
[ "CWE-74" ]
flatpak
4108e022452303093d8b90c838695a0476cb09c7
217,246,563,691,179,500,000,000,000,000,000,000,000
25
context: Add --unset-env option and a corresponding override This follows up from GHSA-4ppf-fxf6-vxg2 to fix missing functionality that I noticed while resolving that vulnerability, but is not required for fixing the vulnerability. Signed-off-by: Simon McVittie <smcv@collabora.com>
int X509V3_add_value_bool(const char *name, int asn1_bool, STACK_OF(CONF_VALUE) **extlist) { if(asn1_bool) return X509V3_add_value(name, "TRUE", extlist); return X509V3_add_value(name, "FALSE", extlist); }
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
322,481,417,326,249,670,000,000,000,000,000,000,000
6
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
parser_parse_unary_expression (parser_context_t *context_p, /**< context */ size_t *grouping_level_p) /**< grouping level */ { bool new_was_seen = false; /* Collect unary operators. */ while (true) { /* Convert plus and minus binary operators to unary operators. */ switch...
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
32,347,926,419,598,707,000,000,000,000,000,000,000
456
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
Formattable::~Formattable() { dispose(); }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
135,861,320,188,060,630,000,000,000,000,000,000,000
4
ICU-20246 Fixing another integer overflow in number parsing.
void hstrlenCommand(client *c) { robj *o; if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL || checkType(c,o,OBJ_HASH)) return; addReplyLongLong(c,hashTypeGetValueLength(o,c->argv[2]->ptr)); }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
256,120,571,656,443,440,000,000,000,000,000,000,000
7
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
TIFFWriteDirectoryTagLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value) { if (dir==NULL) { (*ndir)++; return(1); } return(TIFFWriteDirectoryTagCheckedLong8Array(tif,ndir,dir,tag,count,value)); }
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
26,974,338,801,450,537,000,000,000,000,000,000,000
9
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
static void free_recv_msg_list(struct list_head *q) { struct ipmi_recv_msg *msg, *msg2; list_for_each_entry_safe(msg, msg2, q, link) { list_del(&msg->link); ipmi_free_recv_msg(msg); } }
0
[ "CWE-416", "CWE-284" ]
linux
77f8269606bf95fcb232ee86f6da80886f1dfae8
171,961,343,521,113,000,000,000,000,000,000,000,000
9
ipmi: fix use-after-free of user->release_barrier.rda When we do the following test, we got oops in ipmi_msghandler driver while((1)) do service ipmievd restart & service ipmievd restart done --------------------------------------------------------------- [ 294.230186] Unable to handle kernel paging request at virt...
asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode) { struct nameidata nd; int old_fsuid, old_fsgid; kernel_cap_t old_cap; int res; if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ return -EINVAL; old_fsuid = current->fsuid; old_fsgid = current->fsgid; old_cap = current->...
0
[ "CWE-264" ]
linux-2.6
7b82dc0e64e93f430182f36b46b79fcee87d3532
113,272,852,082,053,620,000,000,000,000,000,000,000
52
Remove suid/sgid bits on [f]truncate() .. to match what we do on write(). This way, people who write to files by using [f]truncate + writable mmap have the same semantics as if they were using the write() family of system calls. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
static int do_end_io(struct multipath *m, struct request *clone, int error, struct dm_mpath_io *mpio) { /* * We don't queue any clone request inside the multipath target * during end I/O handling, since those clone requests don't have * bio clones. If we queue them inside the multipath target, * we nee...
0
[ "CWE-284", "CWE-264" ]
linux
ec8013beddd717d1740cfefb1a9b900deef85462
178,674,022,076,269,000,000,000,000,000,000,000,000
40
dm: do not forward ioctls from logical volumes to the underlying device A logical volume can map to just part of underlying physical volume. In this case, it must be treated like a partition. Based on a patch from Alasdair G Kergon. Cc: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Paolo ...
Set or fetch imap timeout */ PHP_FUNCTION(imap_timeout) { zend_long ttype, timeout=-1; int timeout_type; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &ttype, &timeout) == FAILURE) { RETURN_FALSE; } if (timeout == -1) { switch (ttype) { case 1: timeout_type = GET_OPENTIMEOUT; break; case...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
13,513,265,289,644,548,000,000,000,000,000,000,000
55
Disable rsh/ssh functionality in imap by default (bug #77153)
static char *ask_new_field(struct chfn_control *ctl, const char *question, char *def_val) { int len; char *buf = NULL; /* leave initialized to NULL or getline segfaults */ size_t dummy = 0; if (!def_val) def_val = ""; while (true) { printf("%s [%s]:", question, def_val); __fpurge(stdin); putchar('...
0
[ "CWE-209" ]
util-linux
faa5a3a83ad0cb5e2c303edbfd8cd823c9d94c17
116,951,210,502,340,210,000,000,000,000,000,000,000
38
chsh, chfn: remove readline support [CVE-2022-0563] The readline library uses INPUTRC= environment variable to get a path to the library config file. When the library cannot parse the specified file, it prints an error message containing data from the file. Unfortunately, the library does not use secure_getenv() (or ...
static enum hrtimer_restart napi_watchdog(struct hrtimer *timer) { struct napi_struct *napi; napi = container_of(timer, struct napi_struct, timer); if (napi->gro_list) napi_schedule(napi); return HRTIMER_NORESTART;
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
260,367,093,010,787,550,000,000,000,000,000,000,000
10
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
static bool is_domain_in_set( const uint32_t domain_id, const Domains& domains) { bool returned_value = false; for (auto range : domains.ranges) { if (range.second == 0) { if (domain_id == range.first) { returned_value = true; ...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
199,377,171,246,473,500,000,000,000,000,000,000,000
29
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static bool ok_jpg_read_sos(ok_jpg_decoder *decoder) { // JPEG spec: Table B.3 ok_jpg *jpg = decoder->jpg; uint8_t buffer[16]; const size_t header_size = 3; if (!ok_read(decoder, buffer, header_size)) { return false; } uint16_t length = readBE16(buffer); decoder->num_scan_compone...
0
[ "CWE-787" ]
ok-file-formats
a9cc1711dd4ed6a215038f1c5c03af0ef52c3211
65,771,290,652,425,700,000,000,000,000,000,000,000
103
ok_jpg: Fix invalid DHT (#11)
int __hnbad(const char *dotted) { unsigned char c, n, *cp; unsigned char buf[NS_MAXCDNAME]; cp = (unsigned char *)dotted; while ((c = *cp++)) if (c < 0x21 || c > 0x7E) return (1); if (ns_name_pton(dotted, buf, sizeof(buf)) < 0) return (2); if (buf[0] > 0 && buf[1] == '-') return (3); cp = buf; while (...
0
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
177,572,401,761,957,170,000,000,000,000,000,000,000
30
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
static int cmd_match(const char *cmd, const char *str) { /* See if cmd, written into a sysfs file, matches * str. They must either be the same, or cmd can * have a trailing newline */ while (*cmd && *str && *cmd == *str) { cmd++; str++; } if (*cmd == '\n') cmd++; if (*str || *cmd) return 0; return ...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
298,990,157,567,172,940,000,000,000,000,000,000,000
16
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
static inline s16 fixp_mult(s16 a, s16 b) { a = ((s32)a * 0x100) / 0x7fff; return ((s32)(a * b)) >> FRAC_N; }
0
[ "CWE-416" ]
linux
fa3a5a1880c91bb92594ad42dfe9eedad7996b86
219,189,792,942,650,700,000,000,000,000,000,000,000
5
Input: ff-memless - kill timer in destroy() No timer must be left running when the device goes away. Signed-off-by: Oliver Neukum <oneukum@suse.com> Reported-and-tested-by: syzbot+b6c55daa701fc389e286@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1573726121.17351.3.camel@suse.co...
DestroyJNG(unsigned char *chunk,Image **color_image, ImageInfo **color_image_info,Image **alpha_image,ImageInfo **alpha_image_info) { (void) RelinquishMagickMemory(chunk); if (color_image_info && *color_image_info) { DestroyImageInfo(*color_image_info); *color_image_info = (ImageInfo *)NULL; } if (a...
0
[ "CWE-835" ]
ImageMagick6
9eda4b36a8695e4a0cd27bea28b9c173c68a01ec
62,280,414,334,980,750,000,000,000,000,000,000,000
25
Fixed infinite loop (#1095).
SdMmcHcPowerControl ( IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT8 Slot, IN UINT8 PowerCtrl ) { EFI_STATUS Status; // // Clr SD Bus Power // PowerCtrl &= (UINT8)~BIT0; Status = SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_POWER_CTRL, FALSE, sizeof...
0
[]
edk2
e36d5ac7d10a6ff5becb0f52fdfd69a1752b0d14
212,440,923,779,137,930,000,000,000,000,000,000,000
25
MdeModulePkg/SdMmcPciHcDxe: Fix double PciIo Unmap in TRB creation (CVE-2019-14587) REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1989 The commit will avoid unmapping the same resource in error handling logic for function BuildAdmaDescTable() and SdMmcCreateTrb(). For the error handling in BuildAdmaDescTable():...
static int validate_slab(struct kmem_cache *s, struct page *page, unsigned long *map) { void *p; void *addr = page_address(page); if (!check_slab(s, page) || !on_freelist(s, page, NULL)) return 0; /* Now we know that a valid freelist exists */ bitmap_zero(map, page->objects); for_each_free_object(p,...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
222,784,563,880,556,800,000,000,000,000,000,000,000
25
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static inline struct i915_priolist *to_priolist(struct rb_node *rb) { return rb_entry(rb, struct i915_priolist, node); }
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
159,521,327,316,952,270,000,000,000,000,000,000,000
4
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
ldns_rr2buffer_str(ldns_buffer *output, const ldns_rr *rr) { return ldns_rr2buffer_str_fmt(output, ldns_output_format_default, rr); }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
110,657,315,804,234,810,000,000,000,000,000,000,000
4
CAA and URI
struct regulator *regulator_get_exclusive(struct device *dev, const char *id) { return _regulator_get(dev, id, true, false); }
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
8,011,957,973,666,654,000,000,000,000,000,000,000
4
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
static int vp7_fade_frame(VP8Context *s, VP56RangeCoder *c) { int alpha = (int8_t) vp8_rac_get_uint(c, 8); int beta = (int8_t) vp8_rac_get_uint(c, 8); int ret; if (!s->keyframe && (alpha || beta)) { int width = s->mb_width * 16; int height = s->mb_height * 16; AVFrame *src, *d...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
68,950,931,675,687,430,000,000,000,000,000,000,000
38
avcodec/webp: Always set pix_fmt Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbult...
static int get_malloc_block_total_size(void *ptr) { mbed_heap_overhead_t *c = (mbed_heap_overhead_t *)((char *)ptr - offsetof(mbed_heap_overhead, next)); // Skip the padding area if (c->size < 0) { c = (mbed_heap_overhead_t *)((char *)c + c->size); } // Mask LSB as it is used for usage fla...
0
[ "CWE-190" ]
mbed-os
4450464fc87fb104a45190a2334b82b3bb2b13fb
256,021,059,601,632,560,000,000,000,000,000,000,000
11
Add integer overflow check to the malloc wrappers Add a check that the combined size of the buffer to allocate and alloc_info_t does not exceed the maximum integer value representable by size_t.
SpaceToBatchNDContext(TfLiteContext* context, TfLiteNode* node) { input = GetInput(context, node, 0); block_shape = GetInput(context, node, 1); paddings = GetInput(context, node, 2); output = GetOutput(context, node, 0); }
0
[ "CWE-369" ]
tensorflow
6d36ba65577006affb272335b7c1abd829010708
220,714,602,661,280,300,000,000,000,000,000,000,000
6
Prevent division by 0 PiperOrigin-RevId: 370984990 Change-Id: Ib324955bbeb1cbd97c82fd5d61a00a2697c9a2de
const SubFramework* Binary::sub_framework() const { return command<SubFramework>(); }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
283,508,667,057,539,600,000,000,000,000,000,000,000
3
Resolve #764
int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 pid, unsigned int group, int report, gfp_t flags) { int err = 0; if (group) { int exclude_pid = 0; if (report) { atomic_inc(&skb->users); exclude_pid = pid; } /* errors reported via destination sk->sk_err, but propagate * delivery error...
0
[]
linux-2.6
16e5726269611b71c930054ffe9b858c1cea88eb
322,124,535,911,354,570,000,000,000,000,000,000,000
28
af_unix: dont send SCM_CREDENTIALS by default Since commit 7361c36c5224 (af_unix: Allow credentials to work across user and pid namespaces) af_unix performance dropped a lot. This is because we now take a reference on pid and cred in each write(), and release them in read(), usually done from another process, eventua...
static void autoname_imp_trampoline(RzCore *core, RzAnalysisFunction *fcn) { if (rz_list_length(fcn->bbs) == 1 && ((RzAnalysisBlock *)rz_list_first(fcn->bbs))->ninstr == 1) { RzList *xrefs = rz_analysis_function_get_xrefs_from(fcn); if (xrefs && rz_list_length(xrefs) == 1) { RzAnalysisXRef *xref = rz_list_first...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
160,723,993,652,495,910,000,000,000,000,000,000,000
16
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
copy64 (uint32x * M, uschar *in) { int i; for (i = 0; i < 16; i++) M[i] = (in[i * 4 + 3] << 24) | (in[i * 4 + 2] << 16) | (in[i * 4 + 1] << 8) | (in[i * 4 + 0] << 0); }
0
[ "CWE-125" ]
exim
57aa14b216432be381b6295c312065b2fd034f86
212,882,461,621,303,370,000,000,000,000,000,000,000
8
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
shell_gtk_embed_get_preferred_height (ClutterActor *actor, float for_width, float *min_height_p, float *natural_height_p) { ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor); ShellGtk...
0
[]
gnome-shell
90c55e1977fde252b79bcfd9d0ef41144fb21fe2
301,832,194,646,989,780,000,000,000,000,000,000,000
20
gtk-embed: ensure we only listen for window-created events once If a tray icon gets a mapped and unmapped and the mapped again in quick succession, we can end up with multiple handlers listening for window creation events. This commit tries to guard against that by only listening for window-created events when we don...
dev_t blk_lookup_devt(const char *name, int partno) { dev_t devt = MKDEV(0, 0); struct class_dev_iter iter; struct device *dev; class_dev_iter_init(&iter, &block_class, NULL, &disk_type); while ((dev = class_dev_iter_next(&iter))) { struct gendisk *disk = dev_to_disk(dev); struct hd_struct *part; if (strcm...
0
[ "CWE-416" ]
linux-stable
77da160530dd1dc94f6ae15a981f24e5f0021e84
200,024,962,496,274,640,000,000,000,000,000,000,000
33
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 ======================================...
int rdbSaveKeyValuePair(rio *rdb, robj *key, robj *val, long long expiretime) { int savelru = server.maxmemory_policy & MAXMEMORY_FLAG_LRU; int savelfu = server.maxmemory_policy & MAXMEMORY_FLAG_LFU; /* Save the expire time */ if (expiretime != -1) { if (rdbSaveType(rdb,RDB_OPCODE_EXPIRETIME_MS...
0
[ "CWE-190" ]
redis
a30d367a71b7017581cf1ca104242a3c644dec0f
283,956,936,436,676,320,000,000,000,000,000,000,000
41
Fix Integer overflow issue with intsets (CVE-2021-32687) The vulnerability involves changing the default set-max-intset-entries configuration parameter to a very large value and constructing specially crafted commands to manipulate sets
void htc_sta_drain(struct htc_target *target, u8 idx) { target->hif->sta_drain(target->hif_dev, idx); }
0
[ "CWE-400", "CWE-401" ]
linux
853acf7caf10b828102d92d05b5c101666a6142b
325,081,162,889,324,300,000,000,000,000,000,000,000
4
ath9k_htc: release allocated buffer if timed out In htc_config_pipe_credits, htc_setup_complete, and htc_connect_service if time out happens, the allocated buffer needs to be released. Otherwise there will be memory leak. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@code...
void opj_j2k_read_int16_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem) { OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data; OPJ_INT32 * l_dest_data = (OPJ_INT32 *) p_dest_data; OPJ_UINT32 i; OPJ_UINT32 l_temp; for (i=0;i<p_nb_elem;++i) { ...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
107,410,554,193,336,700,000,000,000,000,000,000,000
15
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags) { int busy = 0; int err; nodemask_t tmp; err = migrate_prep(); if (err) return err; down_read(&mm->mmap_sem); err = migrate_vmas(mm, from_nodes, to_nodes, flags); if (err) goto out; /* * F...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
109,543,330,188,792,730,000,000,000,000,000,000,000
83
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static ssize_t lbs_highsnr_read(struct file *file, char __user *userbuf, size_t count, loff_t *ppos) { return lbs_threshold_read(TLV_TYPE_SNR_HIGH, CMD_SUBSCRIBE_SNR_HIGH, file, userbuf, count, ppos); }
0
[ "CWE-703", "CWE-189" ]
linux
a497e47d4aec37aaf8f13509f3ef3d1f6a717d88
164,366,150,994,953,160,000,000,000,000,000,000,000
6
libertas: potential oops in debugfs If we do a zero size allocation then it will oops. Also we can't be sure the user passes us a NUL terminated string so I've added a terminator. This code can only be triggered by root. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-...
virSecuritySELinuxSetSysinfoLabel(virSecurityManager *mgr, virSysinfoDef *def, virSecuritySELinuxData *data) { size_t i; for (i = 0; i < def->nfw_cfgs; i++) { virSysinfoFWCfgDef *f = &def->fw_cfgs[i]; if (f->file && ...
0
[ "CWE-732" ]
libvirt
15073504dbb624d3f6c911e85557019d3620fdb2
71,359,510,963,710,550,000,000,000,000,000,000,000
17
security: fix SELinux label generation logic A process can access a file if the set of MCS categories for the file is equal-to *or* a subset-of, the set of MCS categories for the process. If there are two VMs: a) svirt_t:s0:c117 b) svirt_t:s0:c117,c720 Then VM (b) is able to access files labelled for VM (a). I...
static void smtp_to_smtps(struct connectdata *conn) { /* Change the connection handler */ conn->handler = &Curl_handler_smtps; /* Set the connection's upgraded to TLS flag */ conn->tls_upgraded = TRUE; }
0
[ "CWE-200", "CWE-119", "CWE-787" ]
curl
ba1dbd78e5f1ed67c1b8d37ac89d90e5e330b628
189,178,256,426,818,600,000,000,000,000,000,000,000
8
smtp: use the upload buffer size for scratch buffer malloc ... not the read buffer size, as that can be set smaller and thus cause a buffer overflow! CVE-2018-0500 Reported-by: Peter Wu Bug: https://curl.haxx.se/docs/adv_2018-70a2.html
static void set_indicator_in_key_fields(KEY *key_info) { KEY_PART_INFO *key_part; uint key_parts= key_info->user_defined_key_parts, i; for (i= 0, key_part=key_info->key_part; i < key_parts; i++, key_part++) key_part->field->flags|= GET_FIXED_FIELDS_FLAG; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
332,297,276,704,973,150,000,000,000,000,000,000,000
7
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
int vb2_ioctl_create_bufs(struct file *file, void *priv, struct v4l2_create_buffers *p) { struct video_device *vdev = video_devdata(file); int res = vb2_verify_memory_type(vdev->queue, p->memory, p->format.type); p->index = vdev->queue->num_buffers; /* * If count == 0, then just check if memory and type ...
0
[ "CWE-119", "CWE-787" ]
linux
2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab
38,736,212,793,785,110,000,000,000,000,000,000,000
24
[media] videobuf2-v4l2: Verify planes array in buffer dequeueing When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer which will be dequeued is not known until the buffer has been removed from the queue. The number of planes is specific to a buffer, not to the queue. This does lead to the situat...
static void __ept_release(struct kref *kref) { struct rpmsg_endpoint *ept = container_of(kref, struct rpmsg_endpoint, refcount); /* * At this point no one holds a reference to ept anymore, * so we can directly free it */ kfree(ept); }
0
[ "CWE-415" ]
linux
1680939e9ecf7764fba8689cfb3429c2fe2bb23c
82,018,438,313,957,210,000,000,000,000,000,000,000
10
rpmsg: virtio: Fix possible double free in rpmsg_virtio_add_ctrl_dev() vch will be free in virtio_rpmsg_release_device() when rpmsg_ctrldev_register_device() fails. There is no need to call kfree() again. Fixes: c486682ae1e2 ("rpmsg: virtio: Register the rpmsg_char device") Signed-off-by: Hangyu Hua <hbh25y@gmail.com...
static void tcp_update_pacing_rate(struct sock *sk) { const struct tcp_sock *tp = tcp_sk(sk); u64 rate; /* set sk_pacing_rate to 200 % of current rate (mss * cwnd / srtt) */ rate = (u64)tp->mss_cache * ((USEC_PER_SEC / 100) << 3); /* current rate is (cwnd * mss) / srtt * In Slow Start [1], set sk_pacing_rate t...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
149,832,201,615,945,360,000,000,000,000,000,000,000
33
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...
doZipFinish(ptcpsess_t *pSess) { int zRet; /* zlib return state */ DEFiRet; unsigned outavail; struct syslogTime stTime; uchar zipBuf[32*1024]; // TODO: use "global" one from pSess if(!pSess->bzInitDone) goto done; pSess->zstrm.avail_in = 0; /* run inflate() on buffer until everything has been compressed */...
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
14,727,604,906,510,768,000,000,000,000,000,000,000
37
net bugfix: potential buffer overrun
static int x509parse_key_pkcs8_unencrypted_der( rsa_context *rsa, const unsigned char *key, size_t keylen ) { int ret; size_t len; unsigned char *p, *end; x509_buf pk_alg_oid; p = (unsigned c...
0
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
261,867,338,478,095,680,000,000,000,000,000,000,000
80
RSA blinding on CRT operations to counter timing attacks
static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus, DeviceState *dev) { PCIDevice *pci; IDEBus *ide_bus; IDEState *ide_s; int bus_id; if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) { pci = PCI_DEVICE(dev); if (PCI_FUNC(pci->...
0
[ "CWE-476" ]
qemu
ad280559c68360c9f1cd7be063857853759e6a73
304,438,319,139,161,170,000,000,000,000,000,000,000
45
sun4u: add power_mem_read routine Define skeleton 'power_mem_read' routine. Avoid NULL dereference. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Item_func_sp::Item_func_sp(THD *thd, Name_resolution_context *context_arg, sp_name *name_arg, List<Item> &list): Item_func(thd, list), context(context_arg), m_name(name_arg), m_sp(NULL), sp_result_field(NULL) { maybe_null= 1; m_name->init_qname(thd); dummy_table= (TABLE*) thd->callo...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
99,536,955,070,535,200,000,000,000,000,000,000,000
10
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_P(RedirectIntegrationTest, UpstreamRedirectPreservesURIFragmentInLocation) { // Use base class initialize. HttpProtocolIntegrationTest::initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); Http::TestResponseHeaderMapImpl redirect_response{ {":status", "302"}, {"content-length"...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
328,269,257,837,297,300,000,000,000,000,000,000,000
15
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static sqlite3_index_info *allocateIndexInfo( WhereInfo *pWInfo, /* The WHERE clause */ WhereClause *pWC, /* The WHERE clause being analyzed */ Bitmask mUnusable, /* Ignore terms with these prereqs */ SrcItem *pSrc, /* The FROM clause term that is the vta...
0
[ "CWE-129" ]
sqlite
effc07ec9c6e08d3bd17665f8800054770f8c643
118,036,693,794,038,910,000,000,000,000,000,000,000
204
Fix the whereKeyStats() routine (part of STAT4 processing only) so that it is able to cope with row-value comparisons against the primary key index of a WITHOUT ROWID table. [forum:/forumpost/3607259d3c|Forum post 3607259d3c]. FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb
static int ieee80211_auth(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_auth_request *req) { return ieee80211_mgd_auth(IEEE80211_DEV_TO_SUB_IF(dev), req); }
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
63,233,719,577,003,790,000,000,000,000,000,000,000
5
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
xsltNewStylesheet(void) { xsltStylesheetPtr ret = NULL; ret = (xsltStylesheetPtr) xmlMalloc(sizeof(xsltStylesheet)); if (ret == NULL) { xsltTransformError(NULL, NULL, NULL, "xsltNewStylesheet : malloc failed\n"); goto internal_err; } memset(ret, 0, sizeof(xsltStylesheet)); ret->omitXmlDecl...
0
[]
libxslt
e03553605b45c88f0b4b2980adfbbb8f6fca2fd6
322,111,322,932,583,300,000,000,000,000,000,000,000
40
Fix security framework bypass xsltCheckRead and xsltCheckWrite return -1 in case of error but callers don't check for this condition and allow access. With a specially crafted URL, xsltCheckRead could be tricked into returning an error because of a supposedly invalid URL that would still be loaded succesfully later on...
enum ndr_err_code ndr_push_dns_string_list(struct ndr_push *ndr, struct ndr_token_list *string_list, int ndr_flags, const char *s, bool is_nbt) { const char *start = s; bool use_compression; size_t max_length; if (is_nbt) { use_compression = true; /* * Max length is longer in ...
0
[ "CWE-400" ]
samba
cc3a67760cf9faaad3af73b1eed9e2ef85276633
24,399,994,098,302,414,000,000,000,000,000,000,000
126
CVE-2020-10745: ndr/dns-utils: prepare for NBT compatibility NBT has a funny thing where it sometimes needs to send a trailing dot as part of the last component, because the string representation is a user name. In DNS, "example.com", and "example.com." are the same, both having three components ("example", "com", "")...
static int lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, union futex_key *key, struct futex_pi_state **ps) { struct futex_q *match = futex_top_waiter(hb, key); /* * If there is a waiter on that futex, validate it and * attach to the pi_state when the validation succeeds. */ if (match) return...
0
[ "CWE-416" ]
linux
65d8fc777f6dcfee12785c057a6b57f679641c90
141,163,270,191,176,640,000,000,000,000,000,000,000
18
futex: Remove requirement for lock_page() in get_futex_key() When dealing with key handling for shared futexes, we can drastically reduce the usage/need of the page lock. 1) For anonymous pages, the associated futex object is the mm_struct which does not require the page lock. 2) For inode based, keys, we can check un...
static int bpf_enable_stats(union bpf_attr *attr) { if (CHECK_ATTR(BPF_ENABLE_STATS)) return -EINVAL; if (!capable(CAP_SYS_ADMIN)) return -EPERM; switch (attr->enable_stats.type) { case BPF_STATS_RUN_TIME: return bpf_enable_runtime_stats(); default: break; } return -EINVAL; }
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
259,898,901,841,837,300,000,000,000,000,000,000,000
17
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
struct bio *bio_clone_fast(struct bio *bio, gfp_t gfp_mask, struct bio_set *bs) { struct bio *b; b = bio_alloc_bioset(gfp_mask, 0, bs); if (!b) return NULL; __bio_clone_fast(b, bio); if (bio_integrity(bio)) { int ret; ret = bio_integrity_clone(b, bio, gfp_mask); if (ret < 0) { bio_put(b); return...
0
[ "CWE-772", "CWE-787" ]
linux
95d78c28b5a85bacbc29b8dba7c04babb9b0d467
188,235,148,987,863,300,000,000,000,000,000,000,000
23
fix unbalanced page refcounting in bio_map_user_iov bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if IO vector has small consecutive buffers belonging to the same page. bio_add_pc_page merges them into one, but the page reference is never dropped. Cc: stable@vger.kernel.org Signed-off-by: Vitaly...
static ssize_t rbd_pool_ns_show(struct device *dev, struct device_attribute *attr, char *buf) { struct rbd_device *rbd_dev = dev_to_rbd_dev(dev); return sprintf(buf, "%s\n", rbd_dev->spec->pool_ns ?: ""); }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
163,874,904,864,670,180,000,000,000,000,000,000,000
7
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
ext4_mb_new_group_pa(struct ext4_allocation_context *ac) { struct super_block *sb = ac->ac_sb; struct ext4_locality_group *lg; struct ext4_prealloc_space *pa; struct ext4_group_info *grp; /* preallocate only when found space is larger then requested */ BUG_ON(ac->ac_o_ex.fe_len >= ac->ac_b_ex.fe_len); BUG_ON(ac...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
246,234,617,249,052,160,000,000,000,000,000,000,000
50
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
qemuProcessHandleAcpiOstInfo(qemuMonitorPtr mon G_GNUC_UNUSED, virDomainObjPtr vm, const char *alias, const char *slotType, const char *slot, unsigned int source, ...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
16,095,016,604,055,110,000,000,000,000,000,000,000
37
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
gst_matroska_demux_reset (GstElement * element) { GstMatroskaDemux *demux = GST_MATROSKA_DEMUX (element); GST_DEBUG_OBJECT (demux, "Resetting state"); gst_matroska_read_common_reset (GST_ELEMENT (demux), &demux->common); demux->num_a_streams = 0; demux->num_t_streams = 0; demux->num_v_streams = 0; demu...
0
[]
gst-plugins-good
9181191511f9c0be6a89c98b311f49d66bd46dc3
201,311,898,078,402,730,000,000,000,000,000,000,000
72
matroskademux: Fix extraction of multichannel WavPack The old code had a couple of issues that all lead to potential memory safety bugs. - Use a constant for the Wavpack4Header size instead of using sizeof. It's written out into the data and not from the struct and who knows what special alignment/padding r...
static int mp_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear) { struct sb_uart_state *state = tty->driver_data; struct sb_uart_port *port = state->port; int ret = -EIO; MP_STATE_LOCK(state); if (!(tty->flags & (1 << TTY_IO_ERROR))) { mp_update_mctrl(port, set, clear); ret = 0; } MP_S...
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
286,306,717,046,627,860,000,000,000,000,000,000,000
16
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
static void print_primaries(WriterContext *w, enum AVColorPrimaries color_primaries) { const char *val = av_color_primaries_name(color_primaries); if (!val || color_primaries == AVCOL_PRI_UNSPECIFIED) { print_str_opt("color_primaries", "unknown"); } else { print_str("color_primaries", val); ...
0
[ "CWE-476" ]
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
2,816,641,362,508,964,000,000,000,000,000,000,000
9
ffprobe: Fix null pointer dereference with color primaries Found-by: AD-lab of venustech Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int tg_nop(struct task_group *tg, void *data) { return 0; }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
115,056,988,974,000,880,000,000,000,000,000,000,000
4
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
proc_file_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) { struct inode * inode = file->f_dentry->d_inode; char *page; ssize_t retval=0; int eof=0; ssize_t n, count; char *start; struct proc_dir_entry * dp; unsigned long long pos; /* * Gaah, please just use "seq_file" instea...
0
[]
linux-2.6
8b90db0df7187a01fb7177f1f812123138f562cf
77,848,453,600,422,560,000,000,000,000,000,000,000
149
Insanity avoidance in /proc The old /proc interfaces were never updated to use loff_t, and are just generally broken. Now, we should be using the seq_file interface for all of the proc files, but converting the legacy functions is more work than most people care for and has little upside.. But at least we can make t...
int git_pkt_buffer_wants( const git_remote_head * const *refs, size_t count, transport_smart_caps *caps, git_buf *buf) { size_t i = 0; const git_remote_head *head; if (caps->common) { for (; i < count; ++i) { head = refs[i]; if (!head->local) break; } if (buffer_want_with_caps(refs[i], caps, bu...
0
[ "CWE-119", "CWE-787" ]
libgit2
66e3774d279672ee51c3b54545a79d20d1ada834
337,357,655,590,456,850,000,000,000,000,000,000,000
39
smart_pkt: verify packet length exceeds PKT_LEN_SIZE Each packet line in the Git protocol is prefixed by a four-byte length of how much data will follow, which we parse in `git_pkt_parse_line`. The transmitted length can either be equal to zero in case of a flush packet or has to be at least of length four, as it also...
DISOpticalFlowImpl::DISOpticalFlowImpl() { finest_scale = 2; patch_size = 8; patch_stride = 4; grad_descent_iter = 16; variational_refinement_iter = 5; variational_refinement_alpha = 20.f; variational_refinement_gamma = 10.f; variational_refinement_delta = 5.f; border_size = 16; ...
0
[ "CWE-125", "CWE-369" ]
opencv
d1615ba11a93062b1429fce9f0f638d1572d3418
292,067,150,545,361,300,000,000,000,000,000,000,000
22
video:fixed DISOpticalFlow segfault from small img
GF_Err pdin_box_dump(GF_Box *a, FILE * trace) { u32 i; GF_ProgressiveDownloadBox *p = (GF_ProgressiveDownloadBox *)a; gf_isom_box_dump_start(a, "ProgressiveDownloadBox", trace); gf_fprintf(trace, ">\n"); if (p->size) { for (i=0; i<p->count; i++) { gf_fprintf(trace, "<DownloadInfo rate=\"%d\" estimatedTime=\"...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
124,917,698,168,124,190,000,000,000,000,000,000,000
17
fixed #2138
need_nsec_chain(dns_db_t *db, dns_dbversion_t *ver, const dns_rdata_nsec3param_t *param, bool *answer) { dns_dbnode_t *node = NULL; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_nsec3param_t myparam; dns_rdataset_t rdataset; isc_result_t result; *answer = false; result = dns_db_getoriginnode(db, &node); R...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
118,275,139,742,095,900,000,000,000,000,000,000,000
76
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
com_use(String *buffer __attribute__((unused)), char *line) { char *tmp, buff[FN_REFLEN + 1]; int select_db; bzero(buff, sizeof(buff)); strmake_buf(buff, line); tmp= get_arg(buff, 0); if (!tmp || !*tmp) { put_info("USE must be followed by a database name", INFO_ERROR); return 0; } /* We n...
1
[]
server
383007c75d6ef5043fa5781956a6a02b24e2b79e
251,334,105,837,671,270,000,000,000,000,000,000,000
72
mysql cli: fix USE command quoting * use proper sql quoting rules for USE, while preserving as much of historical behavior as possible * short commands (\u) behave as before
int CLASS ljpeg_start (struct jhead *jh, int info_only) { int c, tag; ushort len; uchar data[0x10000]; const uchar *dp; memset (jh, 0, sizeof *jh); jh->restart = INT_MAX; fread (data, 2, 1, ifp); if (data[1] != 0xd8) return 0; do { fread (data, 2, 2, ifp); tag = data[0] << 8 | data[1]; l...
0
[ "CWE-189" ]
LibRaw
4606c28f494a750892c5c1ac7903e62dd1c6fdb5
195,744,538,282,138,660,000,000,000,000,000,000,000
51
0.16.1: fix for dcraw ljpeg_start() vulnerability
const TfLiteTensor* GetOptionalInputTensor(const TfLiteContext* context, const TfLiteNode* node, int index) { const bool use_tensor = index < node->inputs->size && node->inputs->data[index] != kTfLiteOptionalTensor; if (use_tensor) { return Ge...
1
[ "CWE-125", "CWE-787" ]
tensorflow
00302787b788c5ff04cb6f62aed5a74d936e86c0
268,531,922,670,221,250,000,000,000,000,000,000,000
9
[tflite] Make `GetOptionalInputTensor` the same as `GetInput`. With the previous change, there is no more need for two separate APIs. We would deprecate `GetOptionalInputTensor` in the future. PiperOrigin-RevId: 332513386 Change-Id: Id7110271c25ebd6126ad8c82a493e37e0e0756b3
static int opfisttp(RAsm *a, ut8 *data, const Opcode *op) { int l = 0; switch (op->operands_count) { case 1: if ( op->operands[0].type & OT_MEMORY ) { if ( op->operands[0].type & OT_WORD ) { data[l++] = 0xdf; data[l++] = 0x08 | op->operands[0].regs[0]; } else if ( op->operands[0].type & OT_DWORD ) { ...
0
[ "CWE-119", "CWE-125", "CWE-787" ]
radare2
9b46d38dd3c4de6048a488b655c7319f845af185
92,685,606,558,464,250,000,000,000,000,000,000,000
26
Fix #12372 and #12373 - Crash in x86 assembler (#12380) 0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL- leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
void my_net_local_init(NET *net) { net->max_packet= (uint) net_buffer_length; my_net_set_read_timeout(net, CLIENT_NET_READ_TIMEOUT); my_net_set_write_timeout(net, CLIENT_NET_WRITE_TIMEOUT); net->retry_count= 1; net->max_packet_size= max(net_buffer_length, max_allowed_packet); }
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
297,861,009,903,168,140,000,000,000,000,000,000,000
8
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
double Field_enum::val_real(void) { return (double) Field_enum::val_int(); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
207,272,654,954,712,500,000,000,000,000,000,000,000
4
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static void kvm_register_steal_time(void) { int cpu = smp_processor_id(); struct kvm_steal_time *st = &per_cpu(steal_time, cpu); if (!has_steal_clock) return; memset(st, 0, sizeof(*st)); wrmsrl(MSR_KVM_STEAL_TIME, (slow_virt_to_phys(st) | KVM_MSR_ENABLED)); pr_info("kvm-stealtime: cpu %d, msr %llx\n", cpu,...
0
[]
kvm
29fa6825463c97e5157284db80107d1bfac5d77b
166,772,444,996,711,000,000,000,000,000,000,000,000
14
x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit paravirt_enabled has the following effects: - Disables the F00F bug workaround warning. There is no F00F bug workaround any more because Linux's standard IDT handling already works around the F00F bug, but the warning still exists. This ...
xmlBufCreate(void) { xmlBufPtr ret; ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf)); if (ret == NULL) { xmlBufMemoryError(NULL, "creating buffer"); return(NULL); } ret->compat_use = 0; ret->use = 0; ret->error = 0; ret->buffer = NULL; ret->size = xmlDefaultBufferSize; ret->...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
118,356,951,086,759,700,000,000,000,000,000,000,000
25
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
HuffmanDecoder * operator()() const { unsigned int codeLengths[32]; std::fill(codeLengths + 0, codeLengths + 32, 5); member_ptr<HuffmanDecoder> pDecoder(new HuffmanDecoder); pDecoder->Initialize(codeLengths, 32); return pDecoder.release(); }
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
27,835,650,915,753,803,000,000,000,000,000,000,000
8
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
const boost::optional<std::string>& TopologyDescription::getSetName() const { return _setName; }
0
[ "CWE-755" ]
mongo
75f7184eafa78006a698cda4c4adfb57f1290047
99,665,677,411,901,960,000,000,000,000,000,000,000
3
SERVER-50170 fix max staleness read preference parameter for server selection
cached_NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers) { /* XXX: could be optimized further */ invoke_NPN_GetStringIdentifiers(names, nameCount, identifiers); #if USE_NPIDENTIFIER_CACHE if (use_npidentifier_cache()) { for (int i = 0; i < nameCount; i++) { NPIdenti...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
80,448,270,142,590,870,000,000,000,000,000,000,000
17
Support all the new variables added
nfnl_cthelper_update(const struct nlattr * const tb[], struct nf_conntrack_helper *helper) { int ret; if (tb[NFCTH_PRIV_DATA_LEN]) return -EBUSY; if (tb[NFCTH_POLICY]) { ret = nfnl_cthelper_update_policy(helper, tb[NFCTH_POLICY]); if (ret < 0) return ret; } if (tb[NFCTH_QUEUE_NUM]) helper->queu...
0
[ "CWE-862" ]
linux
4b380c42f7d00a395feede754f0bc2292eebe6e5
164,898,436,274,996,720,000,000,000,000,000,000,000
30
netfilter: nfnetlink_cthelper: Add missing permission checks The capability check in nfnetlink_rcv() verifies that the caller has CAP_NET_ADMIN in the namespace that "owns" the netlink socket. However, nfnl_cthelper_list is shared by all net namespaces on the system. An unprivileged user can create user and net names...
static GtkBuilder *make_builder() { GError *error = NULL; GtkBuilder *builder = gtk_builder_new(); if (!g_glade_file) { /* load additional widgets from glade */ gtk_builder_add_objects_from_string(builder, WIZARD_GLADE_CONTENTS, sizeof(WIZARD_GLADE_CONTENTS) - 1, ...
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
28,766,785,502,210,860,000,000,000,000,000,000,000
35
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms, unsigned int *nbytes, struct kvec *iov, int n_vec) { int rc = 0; struct smb2_write_req *req = NULL; struct smb2_write_rsp *rsp = NULL; int resp_buftype; *nbytes = 0; if (n_vec < 1) return rc; rc = small_smb2_init(SMB2_WRITE, io_parms->tco...
0
[ "CWE-399" ]
linux
18f39e7be0121317550d03e267e3ebd4dbfbb3ce
50,489,718,958,481,430,000,000,000,000,000,000,000
53
[CIFS] Possible null ptr deref in SMB2_tcon As Raphael Geissert pointed out, tcon_error_exit can dereference tcon and there is one path in which tcon can be null. Signed-off-by: Steve French <smfrench@gmail.com> CC: Stable <stable@vger.kernel.org> # v3.7+ Reported-by: Raphael Geissert <geissert@debian.org>
void LibRaw::process_Sony_0x0116(uchar *buf, ushort len, unsigned long long id) { int i = 0; if (((id == SonyID_DSLR_A900) || (id == SonyID_DSLR_A900_APSC) || (id == SonyID_DSLR_A850) || (id == SonyID_DSLR_A850_APSC)) && (len >= 2)) i = 1; else if ((id >= SonyID_DSLR_A550...
0
[ "CWE-125" ]
LibRaw
c243f4539233053466c1309bde606815351bee81
11,669,846,482,309,768,000,000,000,000,000,000,000
17
additional checks in parseSonySRF parseSonySR2: buffer size check
ffi_closure_free (void *ptr) { void *codeseg, *dataseg; size_t rounded_size; dataseg = ADD_TO_POINTER(ptr, -overhead); memcpy(&rounded_size, dataseg, sizeof(rounded_size)); memcpy(&codeseg, ADD_TO_POINTER(dataseg, sizeof(size_t)), sizeof(void *)); munmap(dataseg, rounded_size); munmap(codeseg, rounded_si...
0
[ "CWE-787" ]
libffi
44a6c28545186d78642487927952844156fc7ab5
89,380,002,484,716,500,000,000,000,000,000,000,000
11
aarch64: Flush code mapping in addition to data mapping (#471) This needs a new function, ffi_data_to_code_pointer, to translate from data pointers to code pointers. Fixes issue #470.
static int ff_layout_async_handle_error_v3(struct rpc_task *task, struct pnfs_layout_segment *lseg, u32 idx) { struct nfs4_deviceid_node *devid = FF_LAYOUT_DEVID_NODE(lseg, idx); switch (task->tk_status) { /* File access problems. Don't mark the device as unavailable */ case -EACCES: case -ESTALE:...
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
50,022,064,211,193,575,000,000,000,000,000,000,000
32
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
T _cubic_atX_pc(const float fx, const int y, const int z, const int c) const { return cimg::type<T>::cut(_cubic_atX_p(fx,y,z,c)); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
116,817,289,603,728,600,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static NOINLINE void ReleaseFreeInCache(nedpool *p, threadcache *tc, int mymspace) THROWSPEC { unsigned int age=THREADCACHEMAXFREESPACE/8192; /*ACQUIRE_LOCK(&p->m[mymspace]->mutex);*/ while(age && tc->freeInCache>=THREADCACHEMAXFREESPACE) { RemoveCacheEntries(p, tc, age); /*printf("*** Removing cache entries ol...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
274,167,393,305,576,900,000,000,000,000,000,000,000
12
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...