func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
RZ_API RZ_BORROW RzBuffer *rz_bin_dex_relocations(RZ_NONNULL RzBinDex *dex) { rz_return_val_if_fail(dex, NULL); return dex->relocs_buffer; }
0
[ "CWE-787" ]
rizin
1524f85211445e41506f98180f8f69f7bf115406
100,015,129,915,620,330,000,000,000,000,000,000,000
4
fix #2969 - oob write (1 byte) in dex.c
policy_summary_reject(smartlist_t *summary, maskbits_t maskbits, uint16_t prt_min, uint16_t prt_max) { int i = policy_summary_split(summary, prt_min, prt_max); /* XXX: ipv4 specific */ uint64_t count = (U64_LITERAL(1) << (32-maskbits)); while (i < smartlist_len(summar...
0
[ "CWE-119" ]
tor
43414eb98821d3b5c6c65181d7545ce938f82c8e
240,565,363,988,024,940,000,000,000,000,000,000,000
14
Fix bounds-checking in policy_summarize Found by piebeer.
GF_Err gf_hevc_get_sps_info_with_state(HEVCState *hevc, u8 *sps_data, u32 sps_size, u32 *sps_id, u32 *width, u32 *height, s32 *par_n, s32 *par_d) { s32 idx; idx = gf_hevc_read_sps(sps_data, sps_size, hevc); if (idx < 0) { return GF_NON_COMPLIANT_BITSTREAM; } if (sps_id) *sps_id = idx; if (width) *width = hevc-...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
142,025,442,902,057,520,000,000,000,000,000,000,000
15
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
void ssl3_cbc_copy_mac(unsigned char* out, const SSL3_RECORD *rec, unsigned md_size,unsigned orig_len) { #if defined(CBC_MAC_ROTATE_IN_PLACE) unsigned char rotated_mac_buf[64+EVP_MAX_MD_SIZE]; unsigned char *rotated_mac; #else unsigned char rotated_mac[EVP_MAX_MD_SIZE]; #endif /* mac_end is the ...
0
[ "CWE-310" ]
openssl
579f3a631ebeef5eb0135977640a835968d3ad6c
300,209,906,286,106,400,000,000,000,000,000,000,000
75
s3_cbc.c: make CBC_MAC_ROTATE_IN_PLACE universal. (cherry picked from commit f93a41877d8d7a287debb7c63d7b646abaaf269c)
int ldb_msg_find_attr_as_int(const struct ldb_message *msg, const char *attr_name, int default_value) { const struct ldb_val *v = ldb_msg_find_ldb_val(msg, attr_name); char buf[sizeof("-2147483648")]; char *end = NULL; int ret; if (!v || !v->data) { return default_value; } ZERO_STRUCT(buf); ...
0
[ "CWE-200" ]
samba
7efe8182c165fbf17d2f88c173527a7a554e214b
326,306,801,787,977,700,000,000,000,000,000,000,000
29
CVE-2022-32746 ldb: Add flag to mark message element values as shared When making a shallow copy of an ldb message, mark the message elements of the copy as sharing their values with the message elements in the original message. This flag value will be heeded in the next commit. BUG: https://bugzilla.samba.org/show_...
static void igmp_ifc_timer_expire(struct timer_list *t) { struct in_device *in_dev = from_timer(in_dev, t, mr_ifc_timer); igmpv3_send_cr(in_dev); if (in_dev->mr_ifc_count) { in_dev->mr_ifc_count--; igmp_ifc_start_timer(in_dev, unsolicited_report_interval(in_dev)); } in_dev_put(in_dev); }
0
[ "CWE-362" ]
linux
23d2b94043ca8835bd1e67749020e839f396a1c2
198,869,088,190,887,880,000,000,000,000,000,000,000
12
igmp: Add ip_mc_list lock in ip_check_mc_rcu I got below panic when doing fuzz test: Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9...
__always_inline do_set_mallopt_check (int32_t value) { return 1;
0
[ "CWE-787" ]
glibc
d6db68e66dff25d12c3bc5641b60cbd7fb6ab44f
155,045,851,740,106,970,000,000,000,000,000,000,000
4
malloc: Mitigate null-byte overflow attacks * malloc/malloc.c (_int_free): Check for corrupt prev_size vs size. (malloc_consolidate): Likewise.
void OGRKMLLayer::ResetReading() { iNextKMLId_ = 0; nLastAsked = -1; nLastCount = -1; }
0
[ "CWE-787" ]
gdal
27b9bf644bcf1208f7d6594bdd104cc8a8bb0646
258,449,861,573,828,770,000,000,000,000,000,000
6
KML: set OAMS_TRADITIONAL_GIS_ORDER for SRS returned on returned layers
int wc_EccKeyDerSize(ecc_key* key, int pub) { word32 sz = 0; int ret; ret = wc_BuildEccKeyDer(key, NULL, &sz, pub); if (ret != LENGTH_ONLY_E) { return ret; } return sz; }
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
220,261,778,332,032,840,000,000,000,000,000,000,000
12
OCSP: improve handling of OCSP no check extension
static int fill_tile_gaps(void) { int x, y, run, saw; int n, diffs = 0, ct; /* horizontal: */ for (y=0; y < ntiles_y; y++) { run = 0; saw = 0; for (x=0; x < ntiles_x; x++) { ct = gap_try(x, y, &run, &saw, 1); if (ct < 0) return ct; /* fatal */ } } /* vertical: */ for (x=0; x < ntiles_x; x++) { ...
0
[ "CWE-862", "CWE-284", "CWE-732" ]
x11vnc
69eeb9f7baa14ca03b16c9de821f9876def7a36a
108,544,214,661,372,030,000,000,000,000,000,000,000
31
scan: limit access to shared memory segments to current user
void vhost_dev_cleanup(struct vhost_dev *dev, bool locked) { int i; for (i = 0; i < dev->nvqs; ++i) { if (dev->vqs[i].kick && dev->vqs[i].handle_kick) { vhost_poll_stop(&dev->vqs[i].poll); vhost_poll_flush(&dev->vqs[i].poll); } /* Wait for all lower device DMAs done. */ if (dev->vqs[i].ubufs) vhost_...
0
[]
linux-2.6
bd97120fc3d1a11f3124c7c9ba1d91f51829eb85
141,469,166,522,323,540,000,000,000,000,000,000,000
49
vhost: fix length for cross region descriptor If a single descriptor crosses a region, the second chunk length should be decremented by size translated so far, instead it includes the full descriptor length. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: D...
int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, struct libmnt_cache *cache) { char *cn; const char *src, *t, *v; if (!fs) return 0; /* 1) native paths... */ if (mnt_fs_streq_srcpath(fs, source) == 1) return 1; if (!source || !fs->source) return 0; /* ... and tags */ if (fs->tagnam...
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
145,790,905,073,967,770,000,000,000,000,000,000,000
66
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
CtPtr ProtocolV2::throttle_message() { ldout(cct, 20) << __func__ << dendl; if (connection->policy.throttler_messages) { ldout(cct, 10) << __func__ << " wants " << 1 << " message from policy throttler " << connection->policy.throttler_messages->get_current() ...
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
280,204,584,934,248,750,000,000,000,000,000,000,000
28
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
TEST(FormatterTest, NamedArg) { EXPECT_EQ("1/a/A", format("{_1}/{a_}/{A_}", fmt::arg("a_", 'a'), fmt::arg("A_", "A"), fmt::arg("_1", 1))); char a = 'A', b = 'B', c = 'C'; EXPECT_EQ("BB/AA/CC", format("{1}{b}/{0}{a}/{2}{c}", FMT_CAPTURE(a, b, c))); EXPECT_EQ(" A", format("{a:>2}", FMT...
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
5,441,308,131,791,693,000,000,000,000,000,000,000
20
Fix segfault on complex pointer formatting (#642)
static inline unsigned int xfrm_expire_msgsize(void) { return NLMSG_ALIGN(sizeof(struct xfrm_user_expire)) + nla_total_size(sizeof(struct xfrm_mark)); }
0
[ "CWE-125" ]
linux
b805d78d300bcf2c83d6df7da0c818b0fee41427
62,728,795,278,413,430,000,000,000,000,000,000,000
5
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard PC (i440FX + P...
int yr_object_copy( YR_OBJECT* object, YR_OBJECT** object_copy) { YR_OBJECT* copy; YR_OBJECT* o; YR_STRUCTURE_MEMBER* structure_member; YR_OBJECT_FUNCTION* func; YR_OBJECT_FUNCTION* func_copy; int i; *object_copy = NULL; FAIL_ON_ERROR(yr_object_create( object->type, object->ident...
0
[ "CWE-416" ]
yara
053e67e3ec81cc9268ce30eaf0d6663d8639ed1e
71,303,071,565,797,750,000,000,000,000,000,000,000
106
Fix issue #658
filter_refs(GraphicsManager *self, const void* data, bool free_images, bool (*filter_func)(const ImageRef*, Image*, const void*, CellPixelSize), CellPixelSize cell) { for (size_t i = self->image_count; i-- > 0;) { Image *img = self->images + i; for (size_t j = img->refcnt; j-- > 0;) { Im...
0
[ "CWE-787" ]
kitty
82c137878c2b99100a3cdc1c0f0efea069313901
45,913,130,355,492,445,000,000,000,000,000,000,000
13
Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters Fixes #3128
static bool __ne_get_resources(r_bin_ne_obj_t *bin) { if (!bin->resources) { bin->resources = r_list_newf (__free_resource); } ut16 resoff = bin->ne_header->ResTableOffset + bin->header_offset; ut16 alignment = r_buf_read_le16_at (bin->buf, resoff); ut32 off = resoff + 2; while (true) { NE_image_typeinfo_entr...
0
[ "CWE-476" ]
radare2
18d1d064bf599a255d55f09fca3104776fc34a67
107,263,151,557,833,500,000,000,000,000,000,000,000
50
Fix null deref in the ne parser ##crash * Reported by @hmsec via huntr.dev * Reproducer: nepoc00 * BountyID: bfeb8fb8-644d-4587-80d4-cb704c404013
static void ndpi_int_tls_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, u_int32_t protocol) { #if DEBUG_TLS printf("[TLS] %s()\n", __FUNCTION__); #endif if((flow->packet.udp != NULL) && (protocol == NDPI_PROTOCOL_TLS)) protocol = NDPI_PROTOCOL_DTLS; if((...
0
[ "CWE-787" ]
nDPI
1ec621c85b9411cc611652fd57a892cfef478af3
328,390,623,859,708,170,000,000,000,000,000,000,000
25
Added further checks
static PCRE2_SPTR SLJIT_FUNC do_extuni_no_utf(jit_arguments *args, PCRE2_SPTR cc) { PCRE2_SPTR start_subject = args->begin; PCRE2_SPTR end_subject = args->end; int lgb, rgb, ricount; PCRE2_SPTR bptr; uint32_t c; c = *cc++; lgb = UCD_GRAPHBREAK(c); while (cc < end_subject) { c = *cc; rgb = UCD_GRAPHBREAK(c); ...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
53,992,940,305,778,060,000,000,000,000,000,000,000
52
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
destroy_username_lookup_operation (UsernameLookupOperation *operation) { g_object_unref (operation->manager); g_object_unref (operation->display); g_free (operation->username); g_free (operation); }
0
[]
gdm
ff98b2817014684ae1acec78ff06f0f461a56a9f
166,334,774,547,562,000,000,000,000,000,000,000,000
7
manager: if falling back to X11 retry autologin Right now, we get one shot to autologin. If it fails, we fall back to the greeter. We should give it another go if the reason for the failure was wayland fallback to X. https://bugzilla.gnome.org/show_bug.cgi?id=780520
op_addsub( oparg_T *oap, linenr_T Prenum1, // Amount of add/subtract int g_cmd) // was g<c-a>/g<c-x> { pos_T pos; struct block_def bd; int change_cnt = 0; linenr_T amount = Prenum1; // do_addsub() might trigger re-evaluation of 'foldexpr' halfway, when the // buffer is n...
0
[ "CWE-122" ]
vim
c249913edc35c0e666d783bfc21595cf9f7d9e0d
71,826,902,960,952,410,000,000,000,000,000,000,000
127
patch 9.0.0483: illegal memory access when replacing in virtualedit mode Problem: Illegal memory access when replacing in virtualedit mode. Solution: Check for replacing NUL after Tab.
run_pyc_file(FILE *fp, const char *filename, PyObject *globals, PyObject *locals, PyCompilerFlags *flags) { PyCodeObject *co; PyObject *v; long magic; long PyImport_GetMagicNumber(void); magic = PyMarshal_ReadLongFromFile(fp); if (magic != PyImport_GetMagicNumber()) { if (!...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
149,567,003,224,221,550,000,000,000,000,000,000,000
40
bpo-35766: Merge typed_ast back into CPython (GH-11645)
void BinaryProtocolReader::checkContainerSize(int32_t size) { if (size < 0) { TProtocolException::throwNegativeSize(); } else if (this->container_limit_ && size > this->container_limit_) { TProtocolException::throwExceededSizeLimit(); } }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
160,741,907,337,064,320,000,000,000,000,000,000,000
7
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
cockpit_session_launch (CockpitAuth *self, GIOStream *connection, GHashTable *headers, const gchar *type, const gchar *authorization, const gchar *application, GError **error) ...
0
[]
cockpit
c51f6177576d7e12614c64d316cf0b67addd17c9
327,610,702,033,880,370,000,000,000,000,000,000,000
97
ws: Fix bug parsing invalid base64 headers The len parameter to g_base64_decode_inplace() is a inout parameter, and needs to be initialized. Lets just use the simpler g_base64_decode() function. This fixes a segfault. Closes #10819
customcodecvt_do_conversion_writer(char_t_to*& _to_next, char_t_to* _to_end) : to_next(_to_next), to_end(_to_end) {}
0
[ "CWE-200" ]
wesnoth
f8914468182e8d0a1551b430c0879ba236fe4d6d
217,795,662,884,361,330,000,000,000,000,000,000,000
4
Disallow inclusion of .pbl files from WML (bug #23504) Note that this will also cause Lua wesnoth.have_file() to return false on .pbl files.
parser_pattern_process_nested_pattern (parser_context_t *context_p, /**< context */ parser_pattern_flags_t flags, /**< flags */ uint16_t rhs_opcode, /**< opcode to process the rhs value */ uint16_t liter...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
230,783,752,615,625,840,000,000,000,000,000,000,000
60
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
int sched_trace_rq_cpu(struct rq *rq) { return rq ? cpu_of(rq) : -1; }
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
130,117,345,803,633,090,000,000,000,000,000,000,000
4
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
TfLiteRegistration* Register_FLOOR_REF() { static TfLiteRegistration r = {/*init=*/nullptr, /*free=*/nullptr, floor::Prepare, floor::Eval<floor::kReference>}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
82,116,123,372,451,240,000,000,000,000,000,000,000
6
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
void CLASS setCanonBodyFeatures (unsigned id) { imgdata.lens.makernotes.CamID = id; if ( (id == 0x80000001) || // 1D (id == 0x80000174) || // 1D2 (id == 0x80000232) || // 1D2N (id == 0x80000169) || // 1D3 (id == 0x80000281) // 1D4 ) ...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
135,421,771,902,347,110,000,000,000,000,000,000,000
61
fixed two more problems found by fuzzer
static int dgram_ioctl(struct sock *sk, int cmd, unsigned long arg) { switch (cmd) { case SIOCOUTQ: { int amount = sk_wmem_alloc_get(sk); return put_user(amount, (int __user *)arg); } case SIOCINQ: { struct sk_buff *skb; unsigned long amount; amount = 0; spin_lock_bh(&sk->sk_receive_queue.lock); ...
0
[ "CWE-276" ]
linux
e69dbd4619e7674c1679cba49afd9dd9ac347eef
97,179,828,759,338,380,000,000,000,000,000,000,000
32
ieee802154: enforce CAP_NET_RAW for raw sockets When creating a raw AF_IEEE802154 socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron <orinimron123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org> Signed-off-by: David S...
int unlink_framebuffer(struct fb_info *fb_info) { int i; i = fb_info->node; if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info) return -EINVAL; if (fb_info->dev) { device_destroy(fb_class, MKDEV(FB_MAJOR, i)); fb_info->dev = NULL; } return 0; }
0
[ "CWE-703", "CWE-189" ]
linux
fc9bbca8f650e5f738af8806317c0a041a48ae4a
56,238,790,406,895,140,000,000,000,000,000,000,000
14
vm: convert fb_mmap to vm_iomap_memory() helper This is my example conversion of a few existing mmap users. The fb_mmap() case is a good example because it is a bit more complicated than some: fb_mmap() mmaps one of two different memory areas depending on the page offset of the mmap (but happily there is never any mi...
sh_single_quote (string) const char *string; { register int c; char *result, *r; const char *s; result = (char *)xmalloc (3 + (4 * strlen (string))); r = result; *r++ = '\''; for (s = string; s && (c = *s); s++) { *r++ = c; if (c == '\'') { *r++ = '\\'; /* insert escaped single...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
60,710,741,800,373,180,000,000,000,000,000,000,000
28
commit bash-20120224 snapshot
static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) { struct inet_sock *inet = inet_sk(sk); struct ipcm_cookie ipc; struct rtable *rt = NULL; int free = 0; __be32 daddr; __be32 saddr; u8 tos; int err; err = -EMSGSIZE; if (len > 0xFFFF) goto out; /* * Ch...
1
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
235,106,450,896,413,600,000,000,000,000,000,000,000
165
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
int main(int argc, char ** argv) { int c; unsigned long flags = MS_MANDLOCK; char * orgoptions = NULL; char * share_name = NULL; const char * ipaddr = NULL; char * uuid = NULL; char * mountpoint = NULL; char * options = NULL; char * optionstail; char * resolved_path = NULL; char * temp; char * dev_name; in...
1
[ "CWE-59" ]
samba
3ae5dac462c4ed0fb2cd94553583c56fce2f9d80
131,900,618,422,685,200,000,000,000,000,000,000,000
524
mount.cifs: take extra care that mountpoint isn't changed during mount It's possible to trick mount.cifs into mounting onto the wrong directory by replacing the mountpoint with a symlink to a directory. mount.cifs attempts to check the validity of the mountpoint, but there's still a possible race between those checks ...
int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) { if (sk->sk_family == AF_INET) return ip_recv_error(sk, msg, len, addr_len); #if IS_ENABLED(CONFIG_IPV6) if (sk->sk_family == AF_INET6) return pingv6_ops.ipv6_recv_error(sk, msg, len, addr_len); #endif return -EINVAL; }
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
324,776,167,458,646,160,000,000,000,000,000,000,000
10
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
static inline void l2cap_check_encryption(struct sock *sk, u8 encrypt) { if (sk->sk_type != SOCK_SEQPACKET) return; if (encrypt == 0x00) { if (l2cap_pi(sk)->sec_level == BT_SECURITY_MEDIUM) { l2cap_sock_clear_timer(sk); l2cap_sock_set_timer(sk, HZ * 5); } else if (l2cap_pi(sk)->sec_level == BT_SECURITY_H...
0
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
24,193,200,191,005,250,000,000,000,000,000,000,000
16
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
size_t fault_in_iov_iter_writeable(const struct iov_iter *i, size_t size) { if (iter_is_iovec(i)) { size_t count = min(size, iov_iter_count(i)); const struct iovec *p; size_t skip; size -= count; for (p = i->iov, skip = i->iov_offset; count; p++, skip = 0) { size_t len = min(count, p->iov_len - skip); ...
0
[ "CWE-665", "CWE-284" ]
linux
9d2231c5d74e13b2a0546fee6737ee4446017903
56,911,458,208,707,040,000,000,000,000,000,000,000
23
lib/iov_iter: initialize "flags" in new pipe_buffer The functions copy_page_to_iter_pipe() and push_pipe() can both allocate a new pipe_buffer, but the "flags" member initializer is missing. Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed") To: Alexander Viro <viro@zeniv.linux.org.uk> To: linux-fsdevel@vger.k...
format_timestamp(uint32_t timestamp) { static char buffer[32]; if ((timestamp & 0xff000000) == 0xff000000) snprintf(buffer, sizeof(buffer), "boot + %us", timestamp & 0x00ffffff); else snprintf(buffer, sizeof(buffer), "%us", timestamp); return buffer; }
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
202,208,934,037,230,240,000,000,000,000,000,000,000
11
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
_XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, char *values, Bool doswap) { XkbSrvInfoPtr xkbi; XkbDescPtr xkb; int error; int nTypes = 0, nActions; CARD8 mapWidths[XkbMaxLegalKeyCode + 1] = { 0 }; CARD16 symsPerKey[XkbMaxLegalKeyCode + 1] = { 0 }; ...
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
194,601,629,742,360,960,000,000,000,000,000,000,000
117
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
exif_data_set_data_type (ExifData *d, ExifDataType dt) { if (!d || !d->priv) return; d->priv->data_type = dt; }
0
[ "CWE-400", "CWE-703" ]
libexif
6aa11df549114ebda520dde4cdaea2f9357b2c89
257,547,921,376,382,700,000,000,000,000,000,000,000
7
Improve deep recursion detection in exif_data_load_data_content. The existing detection was still vulnerable to pathological cases causing DoS by wasting CPU. The new algorithm takes the number of tags into account to make it harder to abuse by cases using shallow recursion but with a very large number of tags. This ...
static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH, struct bmp_progressive_state *State, GError **error) { gint clrUsed; /* First check for the two first bytes content. A sane BMP file must start with bytes 0x42 0x4D. */ if (*BFH != 0x4...
1
[ "CWE-119" ]
gdk-pixbuf
b7bf6fbfb310fceba2d35d4de143b8d5ffdad990
230,198,375,811,667,530,000,000,000,000,000,000,000
251
bmp: Reject impossible palette size bmp headers contain separate fields for the number of colors, and the bit depth. Catch the impossible n_colors > 1 << depth and error early, before it causes a out-of-bounds memory access when decoding the colormap. https://bugzilla.gnome.org/show_bug.cgi?id=758991
static void vmxnet_tx_pkt_do_sw_csum(struct VmxnetTxPkt *pkt) { struct iovec *iov = &pkt->vec[VMXNET_TX_PKT_L2HDR_FRAG]; uint32_t csum_cntr; uint16_t csum = 0; /* num of iovec without vhdr */ uint32_t iov_len = pkt->payload_frags + VMXNET_TX_PKT_PL_START_FRAG - 1; uint16_t csl; struct ip_hea...
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
82,741,442,532,577,900,000,000,000,000,000,000,000
28
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
static enum led_brightness ims_pcu_backlight_get_brightness(struct led_classdev *cdev) { struct ims_pcu_backlight *backlight = container_of(cdev, struct ims_pcu_backlight, cdev); struct ims_pcu *pcu = container_of(backlight, struct ims_pcu, backlight); int brightness; int error; mutex_lock(&pcu->cmd_mutex);...
0
[ "CWE-703" ]
linux
a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff
75,858,647,199,871,440,000,000,000,000,000,000,000
27
Input: ims-pcu - sanity check against missing interfaces A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
static int add_match_callback( sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { sd_bus_slot *match_slot = userdata; bool failed = false; int r; assert(m); assert(match_slot); sd_bus_slot_ref(match_slot); ...
0
[ "CWE-416" ]
systemd
1068447e6954dc6ce52f099ed174c442cb89ed54
143,537,134,632,593,230,000,000,000,000,000,000,000
63
sd-bus: introduce API for re-enqueuing incoming messages When authorizing via PolicyKit we want to process incoming method calls twice: once to process and figure out that we need PK authentication, and a second time after we aquired PK authentication to actually execute the operation. With this new call sd_bus_enqueu...
fix_transited_encoding(krb5_context context, krb5_kdc_configuration *config, krb5_boolean check_policy, const TransitedEncoding *tr, EncTicketPart *et, const char *client_realm, const char *server_realm, const char *tgt_realm) { krb5_error_code ret = 0;...
1
[ "CWE-284", "CWE-295" ]
heimdal
b1e699103f08d6a0ca46a122193c9da65f6cf837
151,159,690,953,385,700,000,000,000,000,000,000,000
107
Fix transit path validation CVE-2017-6594 Commit f469fc6 (2010-10-02) inadvertently caused the previous hop realm to not be added to the transit path of issued tickets. This may, in some cases, enable bypass of capath policy in Heimdal versions 1.5 through 7.2. Note, this may break sites that rely on the bug. With ...
int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct intel_svm_dev *sdev) { struct device_domain_info *info; struct context_entry *context; struct dmar_domain *domain; unsigned long flags; u64 ctx_lo; int ret; domain = get_valid_domain_for_dev(sdev->dev); if (!domain) return -EINVAL; spin_lock_ir...
0
[]
linux
fb58fdcd295b914ece1d829b24df00a17a9624bc
69,790,706,395,735,320,000,000,000,000,000,000,000
83
iommu/vt-d: Do not enable ATS for untrusted devices Currently Linux automatically enables ATS (Address Translation Service) for any device that supports it (and IOMMU is turned on). ATS is used to accelerate DMA access as the device can cache translations locally so there is no need to do full translation on IOMMU sid...
int rdma_set_afonly(struct rdma_cm_id *id, int afonly) { struct rdma_id_private *id_priv; unsigned long flags; int ret; id_priv = container_of(id, struct rdma_id_private, id); spin_lock_irqsave(&id_priv->lock, flags); if (id_priv->state == RDMA_CM_IDLE || id_priv->state == RDMA_CM_ADDR_BOUND) { id_priv->option...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
32,080,033,391,311,630,000,000,000,000,000,000,000
18
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
static int build_migrate(struct sk_buff *skb, const struct xfrm_migrate *m, int num_migrate, const struct xfrm_kmaddress *k, const struct xfrm_selector *sel, u8 dir, u8 type) { const struct xfrm_migrate *mp; struct xfrm_userpolicy_id *pol_id; struct nlmsghdr *nlh; int i, err; nlh = nlmsg_put(skb, 0, 0, XF...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
58,380,896,344,694,220,000,000,000,000,000,000,000
39
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
bool IsSupported(const NodeDef* node) const override { return node->input_size() == 1 && IsIdempotent(*node) && !IsInPreserveSet(*node); }
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
293,968,305,921,970,400,000,000,000,000,000,000,000
4
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
unsigned int round_pipe_size(unsigned long size) { if (size > (1U << 31)) return 0; /* Minimum pipe size, as required by POSIX */ if (size < PAGE_SIZE) return PAGE_SIZE; return roundup_pow_of_two(size); }
0
[ "CWE-362" ]
linux
189b0ddc245139af81198d1a3637cac74f96e13a
207,039,318,708,498,160,000,000,000,000,000,000,000
11
pipe: Fix missing lock in pipe_resize_ring() pipe_resize_ring() needs to take the pipe->rd_wait.lock spinlock to prevent post_one_notification() from trying to insert into the ring whilst the ring is being replaced. The occupancy check must be done after the lock is taken, and the lock must be taken after the new rin...
verify_assemblyref_table (MonoImage *image, GSList *list, int level) { MonoTableInfo *t = &image->tables [MONO_TABLE_ASSEMBLYREF]; guint32 cols [MONO_ASSEMBLYREF_SIZE]; const char *p; int i; if (level & MONO_VERIFY_ERROR) { for (i = 0; i < t->rows; ++i) { mono_metadata_decode_row (t, i, cols, MONO_ASSEMBLYRE...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
181,797,512,878,654,200,000,000,000,000,000,000,000
34
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
int ksys_unshare(unsigned long unshare_flags) { struct fs_struct *fs, *new_fs = NULL; struct files_struct *fd, *new_fd = NULL; struct cred *new_cred = NULL; struct nsproxy *new_nsproxy = NULL; int do_sysvsem = 0; int err; /* * If unsharing a user namespace must also unshare the thread group * and unshare th...
0
[ "CWE-362" ]
linux
7b55851367136b1efd84d98fea81ba57a98304cf
238,891,115,343,844,270,000,000,000,000,000,000,000
115
fork: record start_time late This changes the fork(2) syscall to record the process start_time after initializing the basic task structure but still before making the new process visible to user-space. Technically, we could record the start_time anytime during fork(2). But this might lead to scenarios where a start_...
set<rgw_zone_id> get_zone_ids_from_names(rgw::sal::RGWRadosStore *store, const vector<string>& zone_names) const { set<rgw_zone_id> ids; for (auto& name : zone_names) { rgw_zone_id id; if (store->svc()->zone->find_zone_id_by_name(name, &id)) ...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
109,172,705,497,062,400,000,000,000,000,000,000,000
13
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
static bool nested_cr0_valid(struct kvm_vcpu *vcpu, unsigned long val) { unsigned long always_on = VMXON_CR0_ALWAYSON; struct vmcs12 *vmcs12 = get_vmcs12(vcpu); if (to_vmx(vcpu)->nested.nested_vmx_secondary_ctls_high & SECONDARY_EXEC_UNRESTRICTED_GUEST && nested_cpu_has2(vmcs12, SECONDARY_EXEC_UNRESTRICTED_G...
0
[ "CWE-284", "CWE-264" ]
linux
3ce424e45411cf5a13105e0386b6ecf6eeb4f66f
174,643,697,609,586,960,000,000,000,000,000,000,000
11
kvm:vmx: more complete state update on APICv on/off The function to update APICv on/off state (in particular, to deactivate it when enabling Hyper-V SynIC) is incomplete: it doesn't adjust APICv-related fields among secondary processor-based VM-execution controls. As a result, Windows 2012 guests get stuck when SynIC...
static int select_fallback_rq(int cpu, struct task_struct *p) { int nid = cpu_to_node(cpu); const struct cpumask *nodemask = NULL; enum { cpuset, possible, fail } state = cpuset; int dest_cpu; /* * If the node that the cpu is on has been offlined, cpu_to_node() * will return -1. There is no cpu on the node, a...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
112,457,885,552,896,510,000,000,000,000,000,000,000
71
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...
ofputil_bucket_list_front(const struct ovs_list *buckets) { static struct ofputil_bucket *bucket; ASSIGN_CONTAINER(bucket, ovs_list_front(buckets), list_node); return bucket; }
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
92,407,497,068,844,450,000,000,000,000,000,000,000
8
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
int enc_untrusted_raise(int sig) { int klinux_sig = TokLinuxSignalNumber(sig); if (klinux_sig < 0) { errno = EINVAL; return -1; } MessageWriter input; input.Push<int>(klinux_sig); MessageReader output; const auto status = NonSystemCallDispatcher(::asylo::host_call::kRaiseHandler, ...
0
[ "CWE-125" ]
asylo
b1d120a2c7d7446d2cc58d517e20a1b184b82200
127,360,613,276,124,540,000,000,000,000,000,000,000
21
Check for return size in enc_untrusted_read Check return size does not exceed requested. The returned result and content still cannot be trusted, but it's expected behavior when not using a secure file system. PiperOrigin-RevId: 333827386 Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29
xfs_attr_shortform_allfit( struct xfs_buf *bp, struct xfs_inode *dp) { struct xfs_attr_leafblock *leaf; struct xfs_attr_leaf_entry *entry; xfs_attr_leaf_name_local_t *name_loc; struct xfs_attr3_icleaf_hdr leafhdr; int bytes; int i; struct xfs_mount *mp = bp->b_target->bt_mount; leaf = bp->b_addr; xfs_a...
0
[ "CWE-476" ]
linux
bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a
68,913,033,487,623,360,000,000,000,000,000,000,000
37
xfs: don't call xfs_da_shrink_inode with NULL bp xfs_attr3_leaf_create may have errored out before instantiating a buffer, for example if the blkno is out of range. In that case there is no work to do to remove it, and in fact xfs_da_shrink_inode will lead to an oops if we try. This also seems to fix a flaw where th...
static int usb_dev_suspend(struct device *dev) { return usb_suspend(dev, PMSG_SUSPEND); }
0
[ "CWE-400", "CWE-703" ]
linux
704620afc70cf47abb9d6a1a57f3825d2bca49cf
182,848,482,986,692,720,000,000,000,000,000,000,000
4
USB: check usb_get_extra_descriptor for proper size When reading an extra descriptor, we need to properly check the minimum and maximum size allowed, to prevent from invalid data being sent by a device. Reported-by: Hui Peng <benquike@gmail.com> Reported-by: Mathias Payer <mathias.payer@nebelwelt.net> Co-developed-by...
ExtractorImpl::ExtractorImpl(const JwtProviderList& providers) { for (const auto& provider : providers) { ASSERT(provider); addProvider(*provider); } }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
119,139,368,312,515,300,000,000,000,000,000,000,000
6
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
YR_OBJECT* yr_object_array_get_item( YR_OBJECT* object, int flags, int index) { YR_OBJECT* result = NULL; YR_OBJECT_ARRAY* array; assert(object->type == OBJECT_TYPE_ARRAY); if (index < 0) return NULL; array = object_as_array(object); if (array->items != NULL && array->items->count > inde...
0
[ "CWE-119", "CWE-787" ]
yara
4a342f01e5439b9bb901aff1c6c23c536baeeb3f
230,854,779,287,397,120,000,000,000,000,000,000,000
28
Fix heap overflow (reported by Jurriaan Bremer) When setting a new array item with yr_object_array_set_item() the array size is doubled if the index for the new item is larger than the already allocated ones. No further checks were made to ensure that the index fits into the array after doubling its capacity. If the a...
static inline bool xfs_bmap_wants_extents(struct xfs_inode *ip, int whichfork) { return whichfork != XFS_COW_FORK && XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE && XFS_IFORK_NEXTENTS(ip, whichfork) <= XFS_IFORK_MAXEXT(ip, whichfork); }
0
[]
linux
2c4306f719b083d17df2963bc761777576b8ad1b
308,699,193,118,023,500,000,000,000,000,000,000,000
7
xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla...
static void __exit exit_f2fs_fs(void) { remove_proc_entry("fs/f2fs", NULL); f2fs_destroy_root_stats(); unregister_filesystem(&f2fs_fs_type); unregister_shrinker(&f2fs_shrinker_info); kset_unregister(f2fs_kset); destroy_extent_cache(); destroy_checkpoint_caches(); destroy_segment_manager_caches(); destroy_node_...
0
[ "CWE-284" ]
linux
b9dd46188edc2f0d1f37328637860bb65a771124
282,129,448,395,494,670,000,000,000,000,000,000,000
14
f2fs: sanity check segment count F2FS uses 4 bytes to represent block address. As a result, supported size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. Signed-off-by: Jin Qian <jinqian@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
extrainfo_insert(routerlist_t *rl, extrainfo_t *ei) { int r = 0; routerinfo_t *ri = rimap_get(rl->identity_map, ei->cache_info.identity_digest); signed_descriptor_t *sd = sdmap_get(rl->desc_by_eid_map, ei->cache_info.signed_descriptor_digest); extrainfo_t *ei_tmp; { /* ...
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
249,008,440,183,419,670,000,000,000,000,000,000,000
45
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
mono_get_object_from_blob (MonoDomain *domain, MonoType *type, const char *blob) { void *retval; MonoClass *klass; MonoObject *object; MonoType *basetype = type; if (!blob) return NULL; klass = mono_class_from_mono_type (type); if (klass->valuetype) { object = mono_object_new (domain, klass); retval = (...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
312,536,506,895,004,700,000,000,000,000,000,000,000
25
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static int set_ro(const char *val, struct kernel_param *kp) { return kstrtouint(val, 10, (unsigned int *)&start_readonly); }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
277,321,617,927,903,940,000,000,000,000,000,000,000
4
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 void oz_complete_buffered_urb(struct oz_port *port, struct oz_endpoint *ep, struct urb *urb) { int data_len, available_space, copy_len; data_len = ep->buffer[ep->out_ix]; if (data_len <= urb->transfer_buffer_length) available_space = data_len; else available_space = urb->transfer_buffer_length; ...
0
[ "CWE-703", "CWE-189" ]
linux
b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c
296,192,461,055,443,140,000,000,000,000,000,000,000
35
ozwpan: Use unsigned ints to prevent heap overflow Using signed integers, the subtraction between required_size and offset could wind up being negative, resulting in a memcpy into a heap buffer with a negative length, resulting in huge amounts of network-supplied data being copied into the heap, which could potentiall...
void RGWDeleteBucketTags_ObjStore_S3::send_response() { if (op_ret) set_req_state_err(s, op_ret); dump_errno(s); end_header(s, this, "application/xml"); dump_start(s); }
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
160,030,011,678,408,400,000,000,000,000,000,000,000
8
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
read_buffer (ksba_reader_t reader, unsigned char *buffer, size_t count) { gpg_error_t err; size_t nread; while (count) { err = ksba_reader_read (reader, buffer, count, &nread); if (err) return err; buffer += nread; count -= nread; } return 0; }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
274,794,760,111,340,000,000,000,000,000,000,000,000
15
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
flow_set_dl_vlan(struct flow *flow, ovs_be16 vid) { if (vid == htons(OFP10_VLAN_NONE)) { flow->vlans[0].tci = htons(0); } else { vid &= htons(VLAN_VID_MASK); flow->vlans[0].tci &= ~htons(VLAN_VID_MASK); flow->vlans[0].tci |= htons(VLAN_CFI) | vid; } }
0
[ "CWE-400" ]
ovs
79cec1a736b91548ec882d840986a11affda1068
240,563,836,255,219,100,000,000,000,000,000,000,000
10
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static void print_binder_buffer(struct seq_file *m, const char *prefix, struct binder_buffer *buffer) { seq_printf(m, "%s %d: %pK size %zd:%zd:%zd %s\n", prefix, buffer->debug_id, buffer->data, buffer->data_size, buffer->offsets_size, buffer->extra_buffers_size, buffer->transaction ? "active" :...
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
201,991,641,903,039,960,000,000,000,000,000,000,000
9
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
char *choose_init(const char *rootfs) { char *retv = NULL; const char *empty = "", *tmp; int ret, env_set = 0; if (!getenv("PATH")) { if (setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", 0)) SYSERROR("Failed to setenv"); env_set = 1; } retv = on_path("init.lxc", rootfs...
0
[ "CWE-417" ]
lxc
c1cf54ebf251fdbad1e971679614e81649f1c032
143,206,245,998,034,400,000,000,000,000,000,000,000
92
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
lexer_hex_to_code_point (const uint8_t *source_p, /**< current source position */ parser_line_counter_t length) /**< source length */ { lit_code_point_t result = 0; do { uint32_t byte = *source_p++; result <<= 4; if (byte >= LIT_CHAR_0 && byte <= LIT_CHAR_9) { res...
0
[ "CWE-288" ]
jerryscript
f3a420b672927037beb4508d7bdd68fb25d2caf6
106,822,752,510,112,290,000,000,000,000,000,000,000
31
Fix class static block opening brace parsing (#4942) The next character should not be consumed after finding the static block opening brace. This patch fixes #4916. JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu
snprint_description(char *buf, size_t buf_len, oid * objid, size_t objidlen, int width) { size_t out_len = 0; if (sprint_realloc_description((u_char **) & buf, &buf_len, &out_len, 0, objid, objidlen, width)) { return (int) out_len; } ...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
185,747,369,247,004,870,000,000,000,000,000,000,000
12
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
amqp_table_t *amqp_get_server_properties(amqp_connection_state_t state) { return &state->server_properties; }
0
[ "CWE-20", "CWE-190", "CWE-787" ]
rabbitmq-c
fc85be7123050b91b054e45b91c78d3241a5047a
194,200,412,250,876,000,000,000,000,000,000,000,000
3
lib: check frame_size is >= INT32_MAX When parsing a frame header, validate that the frame_size is less than or equal to INT32_MAX. Given frame_max is limited between 0 and INT32_MAX in amqp_login and friends, this does not change the API. This prevents a potential buffer overflow when a malicious client sends a fram...
phone_oui_to_icon_name (const char *bdaddr) { char *vendor; const char *ret = NULL; vendor = oui_to_vendor (bdaddr); if (vendor == NULL) return NULL; if (strstr (vendor, "Apple") != NULL) ret = "phone-apple-iphone"; else if (strstr (vendor, "Samsung") != NULL) ret = "phone-samsung-galaxy-s"; else if (str...
0
[]
gnome-bluetooth
6b5086d42ea64d46277f3c93b43984f331d12f89
277,539,683,036,678,400,000,000,000,000,000,000,000
19
lib: Fix Discoverable being reset when turned off Work-around race in bluetoothd which would reset the discoverable flag if a timeout change was requested before discoverable finished being set to off: See https://bugzilla.redhat.com/show_bug.cgi?id=1602985
static const char *update_rule_action(cmd_parms *cmd, directory_config *dcfg, const char *p1, const char *p2, int offset) { char *my_error_msg = NULL; msre_rule *rule = NULL; msre_actionset *new_actionset = NULL; msre_ruleset *ruleset = dcfg->ruleset; extern msc...
0
[ "CWE-20", "CWE-611" ]
ModSecurity
d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe
57,611,376,117,889,170,000,000,000,000,000,000,000
83
Added SecXmlExternalEntity
compat_copy_entries_to_user(unsigned int total_size, struct xt_table *table, void __user *userptr) { struct xt_counters *counters; const struct xt_table_info *private = table->private; void __user *pos; unsigned int size; int ret = 0; unsigned int i = 0; struct ip6t_entry *iter; counters = alloc_counter...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
33,005,755,082,972,060,000,000,000,000,000,000,000
27
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q, struct net_device *dev, struct netdev_queue *txq) { spinlock_t *root_lock = qdisc_lock(q); bool contended; int rc; qdisc_calculate_pkt_len(skb, q); /* * Heuristic to force contended enqueues to serialize on a * separate lock bef...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
7,848,436,336,150,225,000,000,000,000,000,000,000
58
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...
export_greeter_interface (GdmSession *self, GDBusConnection *connection) { GdmDBusGreeter *greeter_interface; greeter_interface = GDM_DBUS_GREETER (gdm_dbus_greeter_skeleton_new ()); g_signal_connect (greeter_interface, "handle-begin-aut...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
80,824,174,313,108,740,000,000,000,000,000,000,000
36
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
int do_echo(struct st_command *command) { DYNAMIC_STRING ds_echo; DBUG_ENTER("do_echo"); init_dynamic_string(&ds_echo, "", command->query_len, 256); do_eval(&ds_echo, command->first_argument, command->end, FALSE); dynstr_append_mem(&ds_res, ds_echo.str, ds_echo.length); dynstr_append_mem(&ds_res, "\n", 1);...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
307,972,732,508,552,220,000,000,000,000,000,000,000
13
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...
static void fuse_write_update_size(struct inode *inode, loff_t pos) { struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); spin_lock(&fc->lock); fi->attr_version = ++fc->attr_version; if (pos > inode->i_size) i_size_write(inode, pos); spin_unlock(&fc->lock); }
0
[]
linux-2.6
0bd87182d3ab18a32a8e9175d3f68754c58e3432
239,922,387,633,477,900,000,000,000,000,000,000,000
11
fuse: fix kunmap in fuse_ioctl_copy_user Looks like another victim of the confusing kmap() vs kmap_atomic() API differences. Reported-by: Todor Gyumyushev <yodor1@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Tejun Heo <tj@kernel.org> Cc: stable@kern...
QPDF::writeHSharedObject(BitWriter& w) { HSharedObject& t = this->m->shared_object_hints; w.writeBits(t.first_shared_obj, 32); // 1 w.writeBits(t.first_shared_offset, 32); // 2 w.writeBits(t.nshared_first_page, 32); // 3 w.writeBits(t.nshared_total, 32); // 4 w.writeBits(t....
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
118,894,927,439,915,020,000,000,000,000,000,000,000
36
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 ...
static int msg_parse_fetch(struct ImapHeader *h, char *s) { char tmp[SHORT_STRING]; char *ptmp = NULL; if (!s) return -1; while (*s) { SKIPWS(s); if (mutt_str_strncasecmp("FLAGS", s, 5) == 0) { s = msg_parse_flags(h, s); if (!s) return -1; } else if (mutt_str_str...
0
[ "CWE-119", "CWE-787" ]
neomutt
1b0f0d0988e6df4e32e9f4bf8780846ea95d4485
314,790,893,055,318,600,000,000,000,000,000,000,000
75
Don't overflow stack buffer in msg_parse_fetch
FindCommnr(str) const char *str; { int x, m, l = 0, r = RC_LAST; while (l <= r) { m = (l + r) / 2; x = strcmp(str, comms[m].name); if (x > 0) l = m + 1; else if (x < 0) r = m - 1; else return m; } return RC_ILLEGAL; }
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
13,530,999,628,951,460,000,000,000,000,000,000,000
17
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 ...
same_node_or_its_all_contexts_clone_p (cgraph_node *node, cgraph_node *dest) { if (node == dest) return true; class ipa_node_params *info = IPA_NODE_REF (node); return info->is_all_contexts_clone && info->ipcp_orig_node == dest; }
0
[ "CWE-20" ]
gcc
a09ccc22459c565814f79f96586fe4ad083fe4eb
84,857,524,481,407,800,000,000,000,000,000,000,000
8
Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015) 2019-12-21 Martin Jambor <mjambor@suse.cz> PR ipa/93015 * ipa-cp.c (ipcp_store_vr_results): Check that info exists testsuite/ * gcc.dg/lto/pr93015_0.c: New test. From-SVN: r279695
static int netjoin_set_nickmode(IRC_SERVER_REC *server, NETJOIN_REC *rec, const char *channel, char prefix) { GSList *pos; const char *flags; char *found_chan = NULL; for (pos = rec->now_channels; pos != NULL; pos = pos->next) { char *chan = pos->data; if (strcasecmp(chan+1, channel) == 0) { found_chan ...
0
[ "CWE-416" ]
irssi
a6cae91cecba2e8cf11ed779c5da5a229472575c
74,863,120,435,714,960,000,000,000,000,000,000,000
30
Merge pull request #812 from ailin-nemui/tape-netsplit revert netsplit print optimisation (cherry picked from commit 7de1378dab8081932d9096e19ae3d0921e560230)
UTF8StringValidate( Syntax *syntax, struct berval *in ) { int len; unsigned char *u = (unsigned char *)in->bv_val, *end = in->bv_val + in->bv_len; if( BER_BVISEMPTY( in ) && syntax == slap_schema.si_syn_directoryString ) { /* directory strings cannot be empty */ return LDAP_INVALID_SYNTAX; } for( ; u < end...
0
[ "CWE-617" ]
openldap
67670f4544e28fb09eb7319c39f404e1d3229e65
56,704,982,585,617,330,000,000,000,000,000,000,000
56
ITS#9383 remove assert in certificateListValidate
std::string normalize_path(const std::string &p1) { if (p1.empty()) return p1; std::string p2; #ifdef _WIN32 if (p1.size() >= 2 && p1[1] == ':') // Windows relative paths with explicit drive name are not handled. p2 = p1; else #endif if (!is_path_sep(p1[0])) p2 = get_cwd() + "/" + p1; else p2 = p1; #ifd...
0
[ "CWE-200" ]
wesnoth
af61f9fdd15cd439da9e2fe5fa39d174c923eaae
290,866,477,249,455,750,000,000,000,000,000,000,000
64
fs: Use game data path to resolve ./ in the absence of a current_dir Fixes a file content disclosure bug (#22042) affecting functionality relying on the get_wml_location() function and not passing a non-empty value for the current_dir parameter. See <https://gna.org/bugs/?22042> for details. This is a candidate for ...
static int mailimf_plus_parse(const char * message, size_t length, size_t * indx) { return mailimf_unstrict_char_parse(message, length, indx, '+'); }
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
226,839,340,598,659,500,000,000,000,000,000,000,000
5
Fixed crash #274
static int ipv6_gso_send_check(struct sk_buff *skb) { struct ipv6hdr *ipv6h; struct inet6_protocol *ops; int err = -EINVAL; if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) goto out; ipv6h = ipv6_hdr(skb); __skb_pull(skb, sizeof(*ipv6h)); err = -EPROTONOSUPPORT; rcu_read_lock(); ops = ipv6_gso_pull_exth...
0
[]
linux-2.6
2e761e0532a784816e7e822dbaaece8c5d4be14d
173,589,613,123,524,960,000,000,000,000,000,000,000
24
ipv6 netns: init net is used to set bindv6only for new sock The bindv6only is tuned via sysctl. It is already on a struct net and per-net sysctls allow for its modification (ipv6_sysctl_net_init). Despite this the value configured in the init net is used for the rest of them. Signed-off-by: Pavel Emelyanov <xemul@op...
int test_if_almost_full(MI_INFO *info) { if (info->s->options & HA_OPTION_COMPRESS_RECORD) return 0; return mysql_file_seek(info->s->kfile, 0L, MY_SEEK_END, MYF(MY_THREADSAFE)) / 10 * 9 > (my_off_t) info->s->base.max_key_file_length || mysql_file_seek(info->dfile, 0L, ...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
50,539,823,951,429,920,000,000,000,000,000,000,000
11
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
static int megasas_create_frame_pool(struct megasas_instance *instance) { int i; u16 max_cmd; u32 sge_sz; u32 frame_count; struct megasas_cmd *cmd; max_cmd = instance->max_mfi_cmds; /* * Size of our frame is 64 bytes for MFI frame, followed by max SG * elements and finally SCSI_SENSE_BUFFERSIZE bytes for s...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
7,547,211,850,674,665,000,000,000,000,000,000,000
92
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
unload_job(cupsd_job_t *job) /* I - Job */ { if (!job->attrs) return; cupsdLogJob(job, CUPSD_LOG_DEBUG, "Unloading..."); ippDelete(job->attrs); job->attrs = NULL; job->state = NULL; job->reasons = NULL; job->impressions = NULL; job->sheets = NULL; job->...
0
[]
cups
d47f6aec436e0e9df6554436e391471097686ecc
291,201,594,956,766,100,000,000,000,000,000,000,000
18
Fix local privilege escalation to root and sandbox bypasses in scheduler (rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581)
Header::screenWindowCenter () { return static_cast <V2fAttribute &> ((*this)["screenWindowCenter"]).value(); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
90,601,907,415,795,060,000,000,000,000,000,000,000
5
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
int octetStringIndexer( slap_mask_t use, slap_mask_t flags, Syntax *syntax, MatchingRule *mr, struct berval *prefix, BerVarray values, BerVarray *keysp, void *ctx ) { int i; size_t slen, mlen; BerVarray keys; HASH_CONTEXT HASHcontext; unsigned char HASHdigest[HASH_BYTES]; struct berval digest; digest.bv_...
0
[ "CWE-617" ]
openldap
67670f4544e28fb09eb7319c39f404e1d3229e65
190,702,379,785,254,230,000,000,000,000,000,000,000
44
ITS#9383 remove assert in certificateListValidate
PosibErr<void> Config::read_in_file(ParmStr file) { FStream in; RET_ON_ERR(in.open(file, "r")); return read_in(in, file); }
0
[ "CWE-125" ]
aspell
80fa26c74279fced8d778351cff19d1d8f44fe4e
205,394,628,028,420,640,000,000,000,000,000,000,000
5
Fix various bugs found by OSS-Fuze.
static int vhost_scsi_open(struct inode *inode, struct file *f) { struct vhost_scsi *vs; struct vhost_virtqueue **vqs; int r = -ENOMEM, i; vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) goto err_vs; } vqs = kmalloc(VHOST_SCSI_MAX_VQ * ...
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
201,191,960,484,897,360,000,000,000,000,000,000,000
43
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
void CLASS smal_v9_load_raw() { unsigned seg[256][2], offset, nseg, holes, i; fseek(ifp, 67, SEEK_SET); offset = get4(); nseg = (uchar)fgetc(ifp); fseek(ifp, offset, SEEK_SET); for (i = 0; i < nseg * 2; i++) ((unsigned *)seg)[i] = get4() + data_offset * (i & 1); fseek(ifp, 78, SEEK_SET); holes = fg...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
310,876,264,412,531,740,000,000,000,000,000,000,000
20
Secunia SA75000 advisory: several buffer overruns