func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void doexit() { exit(0); /* "good" exit, only during child-creation */ }
0
[ "CWE-119" ]
rsyslog
1ca6cc236d1dabf1633238b873fb1c057e52f95e
184,632,268,566,546,100,000,000,000,000,000,000,000
4
bugfix: off-by-one(two) bug in legacy syslog parser
static void virtio_gpu_set_scanout(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd) { struct virtio_gpu_simple_resource *res; struct virtio_gpu_scanout *scanout; pixman_format_code_t format; uint32_t offset; int bpp; struct virtio_gpu_set_scanout ss; VIR...
0
[ "CWE-772", "CWE-401" ]
qemu
dd248ed7e204ee8a1873914e02b8b526e8f1b80d
19,308,354,380,231,460,000,000,000,000,000,000,000
100
virtio-gpu: fix memory leak in set scanout In virtio_gpu_set_scanout function, when creating the 'rect' its refcount is set to 2, by pixman_image_create_bits and qemu_create_displaysurface_pixman function. This can lead a memory leak issues. This patch avoid this issue. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Rev...
static i40e_status i40e_del_macvlan_filter(struct i40e_hw *hw, u16 seid, const u8 *macaddr, int *aq_err) { struct i40e_aqc_remove_macvlan_element_data element; i40e_status status; memset(&element, 0, sizeof(element)); ether_addr_copy(element.mac_addr, macaddr); element.vlan_tag = 0; element.flags = I40E_...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
84,295,750,614,378,920,000,000,000,000,000,000,000
15
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
vbf_stp_retry(struct worker *wrk, struct busyobj *bo) { struct vfp_ctx *vfc; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC); vfc = bo->vfc; CHECK_OBJ_NOTNULL(vfc, VFP_CTX_MAGIC); assert(bo->fetch_objcore->boc->state <= BOS_REQ_DONE); VSLb_ts_busyobj(bo, "Retry", W_TIM_real(wrk)); ...
0
[ "CWE-119", "CWE-787" ]
varnish-cache
176f8a075a963ffbfa56f1c460c15f6a1a6af5a7
172,186,429,674,281,470,000,000,000,000,000,000,000
32
Avoid buffer read overflow on vcl_error and -sfile The file stevedore may return a buffer larger than asked for when requesting storage. Due to lack of check for this condition, the code to copy the synthetic error memory buffer from vcl_error would overrun the buffer. Patch by @shamger Fixes: #2429
mrb_gc_unregister(mrb_state *mrb, mrb_value obj) { mrb_sym root = mrb_intern_lit(mrb, GC_ROOT_NAME); mrb_value table = mrb_gv_get(mrb, root); struct RArray *a; mrb_int i; if (mrb_nil_p(table)) return; if (mrb_type(table) != MRB_TT_ARRAY) { mrb_gv_set(mrb, root, mrb_nil_value()); return; } a = m...
0
[ "CWE-416" ]
mruby
5c114c91d4ff31859fcd84cf8bf349b737b90d99
294,169,466,129,306,600,000,000,000,000,000,000,000
22
Clear unused stack region that may refer freed objects; fix #3596
static void blowfish_encrypt(struct ssh_cipher_struct *cipher, void *in, void *out, unsigned long len) { BF_cbc_encrypt(in, out, len, cipher->key, cipher->IV, BF_ENCRYPT); }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
68,126,389,224,540,170,000,000,000,000,000,000,000
4
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
static void compat_release_entry(struct compat_ipt_entry *e) { struct xt_entry_target *t; struct xt_entry_match *ematch; /* Cleanup all matches */ xt_ematch_foreach(ematch, e) module_put(ematch->u.kernel.match->me); t = compat_ipt_get_target(e); module_put(t->u.kernel.target->me); }
0
[ "CWE-200" ]
linux-2.6
78b79876761b86653df89c48a7010b5cbd41a84a
194,121,584,171,580,440,000,000,000,000,000,000,000
11
netfilter: ip_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 in...
GF_Box *tsro_New() { ISOM_DECL_BOX_ALLOC(GF_TimeOffHintEntryBox, GF_ISOM_BOX_TYPE_TSRO); return (GF_Box *)tmp;
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
31,902,052,221,429,050,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
UnicodeString::extractBetween(int32_t start, int32_t limit, UnicodeString& target) const { pinIndex(start); pinIndex(limit); doExtract(start, limit - start, target); }
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
169,076,525,813,854,750,000,000,000,000,000,000,000
7
ICU-20958 Prevent SEGV_MAPERR in append See #971
TEST_F(ConnectionManagerUtilityTest, PreserveForwardedProtoWhenInternal) { TestScopedRuntime scoped_runtime; ON_CALL(config_, useRemoteAddress()).WillByDefault(Return(true)); ON_CALL(config_, xffNumTrustedHops()).WillByDefault(Return(1)); EXPECT_CALL(config_, skipXffAppend()).WillOnce(Return(true)); connecti...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
63,851,502,354,544,630,000,000,000,000,000,000,000
20
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
subexp_recursive_check_trav(Node* node, ScanEnv* env) { #define FOUND_CALLED_NODE 1 int type; int r = 0; type = NTYPE(node); switch (type) { case NT_LIST: case NT_ALT: { int ret; do { ret = subexp_recursive_check_trav(NCAR(node), env); if (ret == FOUND_CALLED_NODE) r = FOUND_CALLED_NO...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
142,424,221,249,226,450,000,000,000,000,000,000,000
67
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
static void start_rt_bandwidth(struct rt_bandwidth *rt_b) { ktime_t now; if (rt_b->rt_runtime == RUNTIME_INF) return; if (hrtimer_active(&rt_b->rt_period_timer)) return; spin_lock(&rt_b->rt_runtime_lock); for (;;) { if (hrtimer_active(&rt_b->rt_period_timer)) break; now = hrtimer_cb_get_time(&rt_b->...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
68,781,875,298,801,190,000,000,000,000,000,000,000
23
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
void SSL_set_verify(SSL *s, int mode, int (*callback) (int ok, X509_STORE_CTX *ctx)) { s->verify_mode = mode; if (callback != NULL) s->verify_callback = callback; }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
225,980,924,767,341,400,000,000,000,000,000,000,000
7
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
int main(int argc, char **argv) { int opt, timeout = 1800, family = AF_UNSPEC, hashlength = 0, hashmin = 0; int daemonize = FALSE, always_rewrite = FALSE; char *listen_addr = NULL, *forward_service = NULL, *reverse_service = NULL, *user = NULL, *domain = NULL, *chroot_dir = NULL; char separator...
0
[ "CWE-703" ]
postsrsd
077be98d8c8a9847e4ae0c7dc09e7474cbe27db2
313,011,772,699,003,350,000,000,000,000,000,000,000
420
SECURITY: Fix DoS on overly long input from Postfix Thanks to Mateusz Jończyk who reported this issue and gave valuable feedback for its resolution. PostSRSd would hang on an overly long GET request, because the fread()/fwrite() logic in the subprocess would get confused by the remaining input line in its buffer. Th...
static int DecodeBasicOcspResponse(byte* source, word32* ioIndex, OcspResponse* resp, word32 size, void* cm, void* heap, int noVerify) { int length; word32 idx = *ioIndex; word32 end_index; int ret; int sigLength; WOLFSSL_ENTER("DecodeBasicOcspResponse"); (void)heap; ...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
56,020,090,262,227,190,000,000,000,000,000,000,000
120
OCSP: improve handling of OCSP no check extension
static int ISO8859_5ToUTF8 (unsigned char* out, int *outlen, const unsigned char* in, int *inlen) { return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_5); }
0
[ "CWE-189" ]
libxml2
69f04562f75212bfcabecd190ea8b06ace28ece2
330,398,808,276,825,200,000,000,000,000,000,000,000
4
Fix an off by one error in encoding this off by one error doesn't seems to reproduce on linux but the error is real.
static void FontViewRefreshAll(SplineFont *sf) { FontView *fv; for ( fv = (FontView *) (sf->fv); fv!=NULL; fv = (FontView *) (fv->b.nextsame) ) if ( fv->v!=NULL ) GDrawRequestExpose(fv->v,NULL,false); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
78,485,956,677,323,560,000,000,000,000,000,000,000
6
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static void linefeed(VTermState *state) { if(state->pos.row == SCROLLREGION_BOTTOM(state) - 1) { VTermRect rect; rect.start_row = state->scrollregion_top; rect.end_row = SCROLLREGION_BOTTOM(state); rect.start_col = SCROLLREGION_LEFT(state); rect.end_col = SCROLLREGION_RIGHT(state); scroll...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
292,319,115,981,797,370,000,000,000,000,000,000,000
14
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static void udp4_hwcsum_outgoing(struct sock *sk, struct sk_buff *skb, __be32 src, __be32 dst, int len) { unsigned int offset; struct udphdr *uh = udp_hdr(skb); __wsum csum = 0; if (skb_queue_len(&sk->sk_write_queue) == 1) { /* * Only one fragment on the socket. */ skb->csum_start = skb_transport_he...
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
235,260,249,277,190,930,000,000,000,000,000,000,000
34
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
vhost_user_get_queue_num(struct virtio_net **pdev, struct VhostUserMsg *msg, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; uint32_t queue_num = 0; rte_vhost_driver_get_queue_num(dev->ifname, &queue_num); msg->payload.u64 = (uint64_t)queue_num; msg->size = sizeof(msg->payload.u64); msg->fd_num =...
1
[]
dpdk
bf472259dde6d9c4dd3ebad2c2b477a168c6e021
123,909,074,730,779,470,000,000,000,000,000,000,000
14
vhost: fix possible denial of service by leaking FDs A malicious Vhost-user master could send in loop hand-crafted vhost-user messages containing more file descriptors the vhost-user slave expects. Doing so causes the application using the vhost-user library to run out of FDs. This issue has been assigned CVE-2019-14...
static struct h2s *h2c_frt_stream_new(struct h2c *h2c, int id) { struct session *sess = h2c->conn->owner; struct conn_stream *cs; struct h2s *h2s; if (h2c->nb_streams >= h2_settings_max_concurrent_streams) goto out; h2s = h2s_new(h2c, id); if (!h2s) goto out; cs = cs_new(h2c->conn); if (!cs) goto out_c...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
237,316,256,778,025,930,000,000,000,000,000,000,000
48
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
xmlTextReaderPrefix(xmlTextReaderPtr reader) { xmlNodePtr node; if ((reader == NULL) || (reader->node == NULL)) return(NULL); if (reader->curnode != NULL) node = reader->curnode; else node = reader->node; if (node->type == XML_NAMESPACE_DECL) { xmlNsPtr ns = (xmlNsPtr) node; if (ns->prefix == N...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
249,623,295,890,926,000,000,000,000,000,000,000,000
21
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.
static bool send_plugin_request_packet(MPVIO_EXT *mpvio, const uchar *data, uint data_len) { DBUG_ASSERT(mpvio->packets_written == 1); DBUG_ASSERT(mpvio->packets_read == 1); NET *net= mpvio->net; static uchar switch_plugin_request_buf[]= { 254 }; DBUG_ENTER("send_plugin...
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
72,669,311,980,889,400,000,000,000,000,000,000,000
75
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
pixReadFromTiffStream(TIFF *tif) { char *text; l_uint8 *linebuf, *data, *rowptr; l_uint16 spp, bps, photometry, tiffcomp, orientation, sample_fmt; l_uint16 *redmap, *greenmap, *bluemap; l_int32 d, wpl, bpl, comptype, i, j, k, ncolors, rval, gval, bval, aval; l_int32 xres, yres, tiffbpl, packedbpl, half...
1
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
132,046,392,038,694,900,000,000,000,000,000,000,000
264
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
ns_client_dumprecursing(FILE *f, ns_clientmgr_t *manager) { ns_client_t *client; char namebuf[DNS_NAME_FORMATSIZE]; char original[DNS_NAME_FORMATSIZE]; char peerbuf[ISC_SOCKADDR_FORMATSIZE]; char typebuf[DNS_RDATATYPE_FORMATSIZE]; char classbuf[DNS_RDATACLASS_FORMATSIZE]; const char *name; const char *sep; con...
0
[ "CWE-617" ]
bind9
15996f0cb15631b95a801e3e88928494a69ad6ee
298,194,242,756,689,200,000,000,000,000,000,000,000
68
ns_client_error() could assert if rcode was overridden to NOERROR The client->rcode_override was originally created to force the server to send SERVFAIL in some cases when it would normally have sent FORMERR. More recently, it was used in a3ba95116ed04594ea59a8124bf781b30367a7a2 commit (part of GL #2790) to force the...
static int hso_resume(struct usb_interface *iface) { int i, result = 0; struct hso_net *hso_net; /* Start all serial ports */ for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) { if (serial_table[i] && (serial_table[i]->interface == iface)) { if (dev2ser(serial_table[i])->port.count) { result = hso_start...
0
[ "CWE-125" ]
linux
5146f95df782b0ac61abde36567e718692725c89
265,377,860,096,188,450,000,000,000,000,000,000,000
44
USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data The function hso_probe reads if_num from the USB device (as an u8) and uses it without a length check to index an array, resulting in an OOB memory read in hso_probe or hso_get_config_data. Add a length check for both locations and updated hso_probe to ...
xmlReplaceNode(xmlNodePtr old, xmlNodePtr cur) { if (old == cur) return(NULL); if ((old == NULL) || (old->type == XML_NAMESPACE_DECL) || (old->parent == NULL)) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlReplaceNode : old == NULL or without parent\n"); #endif return(NULL);...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
323,388,168,833,269,330,000,000,000,000,000,000,000
55
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
~Colour() { delete mastering_metadata_; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
177,145,790,884,816,700,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
bool hasPositionalOperator(StringData path) { return path.endsWith(".$"); }
0
[ "CWE-732" ]
mongo
cd583b6c4d8aa2364f255992708b9bb54e110cf4
115,214,777,705,829,850,000,000,000,000,000,000,000
3
SERVER-53929 Add stricter parser checks around positional projection
void luaD_shrinkstack (lua_State *L) { int inuse = stackinuse(L); int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK; if (goodsize > LUAI_MAXSTACK) goodsize = LUAI_MAXSTACK; /* respect stack limit */ /* if thread is currently not handling a stack overflow and its good size is smaller than current size...
1
[ "CWE-416", "CWE-125", "CWE-787" ]
lua
6298903e35217ab69c279056f925fb72900ce0b7
308,332,381,123,845,820,000,000,000,000,000,000,000
14
Keep minimum size when shrinking a stack When shrinking a stack (during GC), do not make it smaller than the initial stack size.
vxlan_fdb_offloaded_set(struct net_device *dev, struct switchdev_notifier_vxlan_fdb_info *fdb_info) { struct vxlan_dev *vxlan = netdev_priv(dev); struct vxlan_rdst *rdst; struct vxlan_fdb *f; u32 hash_index; hash_index = fdb_head_index(vxlan, fdb_info->eth_addr, fdb_info->vni); spin_lock_bh(&vxlan->hash_lock...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
267,191,046,291,916,500,000,000,000,000,000,000,000
28
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
void gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h, int pct) { int c, dc; int x, y; int tox, toy; int ncR, ncG, ncB; float g; toy = dstY; for (y = srcY; (y < (srcY + h)); y++) { tox = dstX; for (x = srcX; (x < (srcX + w)); x++) { int nc; c =...
0
[ "CWE-119" ]
php-src
e7f2356665c2569191a946b6fc35b437f0ae1384
50,499,315,330,315,230,000,000,000,000,000,000,000
53
Fix #66387: Stack overflow with imagefilltoborder The stack overflow is caused by the recursive algorithm in combination with a very large negative coordinate passed to gdImageFillToBorder(). As there is already a clipping for large positive coordinates to the width and height of the image, it seems to be consequent t...
process_one(struct conntrack *ct, struct dp_packet *pkt, struct conn_lookup_ctx *ctx, uint16_t zone, bool force, bool commit, long long now, const uint32_t *setmark, const struct ovs_key_ct_labels *setlabel, const struct nat_action_info_t *nat_action_info, ovs...
0
[ "CWE-400" ]
ovs
59b588604b89e85b463984ba08a99badb4fcba15
105,003,010,646,387,360,000,000,000,000,000,000,000
109
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 int ext4_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata) { struct inode *inode = mapping->host; int ret, needed_blocks; handle_t *handle; int retries = 0; struct page *page; pgoff_t index; unsigned fr...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
100,312,793,637,934,150,000,000,000,000,000,000,000
86
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
moreLeft(T D) : T(D) {}
0
[ "CWE-125" ]
cgal
5a1ab45058112f8647c14c02f58905ecc597ec76
298,825,511,448,330,130,000,000,000,000,000,000,000
1
Fix Nef_3
resource_tree_create (MonoArray *win32_resources) { ResTreeNode *tree, *res_node, *type_node, *lang_node; GSList *l; int i; tree = g_new0 (ResTreeNode, 1); for (i = 0; i < mono_array_length (win32_resources); ++i) { MonoReflectionWin32Resource *win32_res = (MonoReflectionWin32Resource*)mono_array_addr (win...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
154,096,752,214,672,860,000,000,000,000,000,000,000
58
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 uint32_t cirrus_linear_bitblt_readw(void *opaque, target_phys_addr_t addr) { uint32_t v; #ifdef TARGET_WORDS_BIGENDIAN v = cirrus_linear_bitblt_readb(opaque, addr) << 8; v |= cirrus_linear_bitblt_readb(opaque, addr + 1); #else v = cirrus_linear_bitblt_readb(opaque, addr); v |= cirrus_linear_b...
0
[ "CWE-787" ]
qemu
b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef
261,681,411,323,759,930,000,000,000,000,000,000,000
12
CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow I have just noticed that patch for CVE-2007-1320 has never been applied to the QEMU CVS. Please find it below. | Multiple heap-based buffer overflows in the cirrus_invalidate_region | function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and | possib...
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { OpContext op_context(context, node); // When the 'size_splits' and the 'axis' tensor is non-const we can't resize // output tensors in Prepare(), and we have to do it now. if (!IsConstantTensor(op_context.axis) || !IsConstantTensor(op_context....
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
233,105,916,289,931,670,000,000,000,000,000,000,000
57
[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...
static int is_mmnoask (const char *buf) { char tmp[LONG_STRING], *p, *q; int lng; if ((p = getenv ("MM_NOASK")) != NULL && *p) { if (mutt_strcmp (p, "1") == 0) return (1); strfcpy (tmp, p, sizeof (tmp)); p = tmp; while ((p = strtok (p, ",")) != NULL) { if ((q = strrchr (p, '/'...
0
[ "CWE-120" ]
mutt
e5ed080c00e59701ca62ef9b2a6d2612ebf765a5
45,698,469,542,276,910,000,000,000,000,000,000,000
41
Fix uudecode buffer overflow. mutt_decode_uuencoded() used each line's initial "length character" without any validation. It would happily read past the end of the input line, and with a suitable value even past the length of the input buffer. As I noted in ticket 404, there are several other changes that could be a...
wrap_concat3(const char *name, const char *eqls, const char *value) { int nlen = (int) strlen(name); int elen = (int) strlen(eqls); int vlen = (int) strlen(value); wrap_concat(name, nlen + elen + vlen, w1ST); wrap_concat(eqls, elen + vlen, w2ND); wrap_concat(value, vlen, wEND); }
0
[ "CWE-125" ]
ncurses
b025434573f466efe27862656a6a9d41dd2bd609
335,484,048,111,573,660,000,000,000,000,000,000,000
10
ncurses 6.1 - patch 20191012 + amend recent changes to ncurses*-config and pc-files to filter out Debian linker-flags (report by Sven Joachim, cf: 20150516). + clarify relationship between tic, infocmp and captoinfo in manpage. + check for invalid hashcode in _nc_find_type_entry and _nc_find_name_entry. > fix seve...
int States::SetMessageRecvd(HandShakeType hst) { switch (hst) { case hello_request: break; // could send more than one case client_hello: if (recvdMessages_.gotClientHello_) return -1; recvdMessages_.gotClientHello_ = 1; break; ...
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
337,834,009,038,749,100,000,000,000,000,000,000,000
68
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
DEFUN (ipv6_nd_prefix, ipv6_nd_prefix_cmd, "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " "(<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Prefix information\n" "IPv6 prefix\n" ...
0
[ "CWE-119", "CWE-787" ]
quagga
cfb1fae25f8c092e0d17073eaf7bd428ce1cd546
197,434,267,783,540,200,000,000,000,000,000,000,000
81
zebra: stack overrun in IPv6 RA receive code (CVE-2016-1245) The IPv6 RA code also receives ICMPv6 RS and RA messages. Unfortunately, by bad coding practice, the buffer size specified on receiving such messages mixed up 2 constants that in fact have different values. The code itself has: #define RTADV_MSG_SIZE 4096 ...
Status QuantizedAvgPoolShape(InferenceContext* c) { TF_RETURN_IF_ERROR(shape_inference::AvgPoolShape(c)); ShapeHandle unused; TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 0, &unused)); TF_RETURN_IF_ERROR(c->WithRank(c->input(2), 0, &unused)); c->set_output(1, c->Scalar()); c->set_output(2, c->Scalar()); re...
0
[ "CWE-369" ]
tensorflow
8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
180,222,442,905,166,280,000,000,000,000,000,000,000
9
Prevent division by 0 in common shape functions. PiperOrigin-RevId: 387712197 Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149
void __user *compat_alloc_user_space(unsigned long len) { void __user *ptr; /* If len would occupy more than half of the entire compat space... */ if (unlikely(len > (((compat_uptr_t)~0) >> 1))) return NULL; ptr = arch_compat_alloc_user_space(len); if (unlikely(!access_ok(ptr, len))) return NULL; return p...
0
[ "CWE-20" ]
linux
594cc251fdd0d231d342d88b2fdff4bc42fb0690
224,477,860,570,927,300,000,000,000,000,000,000,000
15
make 'user_access_begin()' do 'access_ok()' Originally, the rule used to be that you'd have to do access_ok() separately, and then user_access_begin() before actually doing the direct (optimized) user access. But experience has shown that people then decide not to do access_ok() at all, and instead rely on it being i...
vim_strsize(char_u *s) { return vim_strnsize(s, (int)MAXCOL); }
0
[ "CWE-125", "CWE-787" ]
vim
94f3192b03ed27474db80b4d3a409e107140738b
207,914,481,559,302,860,000,000,000,000,000,000,000
4
patch 8.2.3950: going beyond the end of the line with /\%V Problem: Going beyond the end of the line with /\%V. Solution: Check for valid column in getvcol().
static void writer_register_all(void) { static int initialized; if (initialized) return; initialized = 1; writer_register(&default_writer); writer_register(&compact_writer); writer_register(&csv_writer); writer_register(&flat_writer); writer_register(&ini_writer); writer_re...
0
[ "CWE-476" ]
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
17,384,223,122,113,530,000,000,000,000,000,000,000
16
ffprobe: Fix null pointer dereference with color primaries Found-by: AD-lab of venustech Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void populate_with_generic_attrs(const req_state * const s, map<string, bufferlist>& out_attrs) { for (const auto& kv : s->generic_attrs) { bufferlist& attrbl = out_attrs[kv.first]; const string& val = kv.second; attrbl.clear(); attrbl.append(val.c_str(),...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
217,290,940,106,428,800,000,000,000,000,000,000,000
10
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static void slice_print_mask(const char *label, struct slice_mask mask) {}
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
338,327,346,609,105,060,000,000,000,000,000,000,000
1
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
int zmalloc_get_allocator_info(size_t *allocated, size_t *active, size_t *resident) { *allocated = *resident = *active = 0; return 1; }
0
[ "CWE-190" ]
redis
d32f2e9999ce003bad0bd2c3bca29f64dcce4433
20,379,845,927,955,853,000,000,000,000,000,000,000
6
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. A...
fmgr_oldstyle(PG_FUNCTION_ARGS) { Oldstyle_fnextra *fnextra; int n_arguments = fcinfo->nargs; int i; bool isnull; func_ptr user_fn; char *returnValue; if (fcinfo->flinfo == NULL || fcinfo->flinfo->fn_extra == NULL) elog(ERROR, "fmgr_oldstyle received NULL pointer"); fnextra = (Oldstyle_fnextra *) fci...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
50,295,978,099,861,740,000,000,000,000,000,000,000
233
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
static NTSTATUS dcesrv_lsa_RemovePrivilegesFromAccount(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct lsa_RemovePrivilegesFromAccount *r) { struct lsa_RightSet *rights; struct dcesrv_handle *h; struct lsa_account_state *astate; uint32_t i; DCESRV_PULL_HANDLE(h, r->in.handle, LSA_HANDLE_ACCO...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
119,919,627,870,851,300,000,000,000,000,000,000,000
57
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
isdn_net_unbind_channel(isdn_net_local * lp) { skb_queue_purge(&lp->super_tx_queue); if (!lp->master) { /* reset only master device */ /* Moral equivalent of dev_purge_queues(): BEWARE! This chunk of code cannot be called from hardware interrupt handler. I hope it is true. --ANK */ qdisc_reset(lp->n...
0
[ "CWE-119" ]
linux-2.6
0f13864e5b24d9cbe18d125d41bfa4b726a82e40
177,104,893,008,368,280,000,000,000,000,000,000,000
19
isdn: avoid copying overly-long strings Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9416 Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
proxy_C_FindObjects (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_OBJECT_HANDLE_PTR objects, CK_ULONG max_count, CK_ULONG_PTR count) { State *state = (State *)self; Mapping map; CK_RV rv; rv = map_session_to_real (state->...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
138,252,598,311,246,160,000,000,000,000,000,000,000
15
Check for arithmetic overflows before allocating
static struct descriptor *context_get_descriptors(struct context *ctx, int z, dma_addr_t *d_bus) { struct descriptor *d = NULL; struct descriptor_buffer *desc = ctx->buffer_tail; if (z * sizeof(*d) > desc->buffer_size) return NULL; if (z * sizeof(*d) > desc->buffer_size - desc->used) { /* No room for ...
0
[ "CWE-399" ]
linux-2.6
8c0c0cc2d9f4c523fde04bdfe41e4380dec8ee54
318,708,001,051,655,400,000,000,000,000,000,000,000
30
firewire: ohci: handle receive packets with a data length of zero Queueing to receive an ISO packet with a payload length of zero silently does nothing in dualbuffer mode, and crashes the kernel in packet-per-buffer mode. Return an error in dualbuffer mode, because the DMA controller won't let us do what we want, and...
static __init int rb_test(void *arg) { struct rb_test_data *data = arg; while (!kthread_should_stop()) { rb_write_something(data, false); data->cnt++; set_current_state(TASK_INTERRUPTIBLE); /* Now sleep between a min of 100-300us and a max of 1ms */ usleep_range(((data->cnt % 3) + 1) * 100, 1000); } re...
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
286,972,961,875,825,960,000,000,000,000,000,000,000
15
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
static int init_wvx_bitstream (WavpackStream *wps, WavpackMetadata *wpmd) { unsigned char *cp = (unsigned char *)wpmd->data; if (wpmd->byte_length <= 4 || (wpmd->byte_length & 1)) return FALSE; wps->crc_wvx = *cp++; wps->crc_wvx |= (uint32_t) *cp++ << 8; wps->crc_wvx |= (uint32_t) *cp++ <<...
0
[ "CWE-476", "CWE-703" ]
WavPack
25b4a2725d8568212e7cf89ca05ca29d128af7ac
272,911,790,209,702,100,000,000,000,000,000,000,000
15
issue #121: NULL pointer dereference in wvunpack.c * check for NULL pointer before dereferencing in wvunpack.c * sanitize custom extensions to be alphanumeric only
static int mov_write_ctts_tag(AVIOContext *pb, MOVTrack *track) { MOVStts *ctts_entries; uint32_t entries = 0; uint32_t atom_size; int i; ctts_entries = av_malloc_array((track->entry + 1), sizeof(*ctts_entries)); /* worst case */ if (!ctts_entries) return AVERROR(ENOMEM); ctts_entri...
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
137,133,243,402,763,070,000,000,000,000,000,000,000
34
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
int save_abrt_conf_file(const char *file, map_string_t *settings) { char *path = concat_path_file(CONF_DIR, file); int retval = save_conf_file(path, settings); free(path); return retval; }
0
[ "CWE-200" ]
abrt
8939398b82006ba1fec4ed491339fc075f43fc7c
261,772,694,659,067,100,000,000,000,000,000,000,000
7
make the dump directories owned by root by default It was discovered that the abrt event scripts create a user-readable copy of a sosreport file in abrt problem directories, and include excerpts of /var/log/messages selected by the user-controlled process name, leading to an information disclosure. This issue was dis...
static inline bool cpu_has_vmx_invept_global(void) { return vmx_capability.ept & VMX_EPT_EXTENT_GLOBAL_BIT; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
301,429,666,600,006,600,000,000,000,000,000,000,000
4
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
static int local_LZ4_compressHC_limitedOutput_withStateHC(const char* in, char* out, int inSize) { return LZ4_compressHC_limitedOutput_withStateHC(stateLZ4HC, in, out, inSize, LZ4_compressBound(inSize)); }
0
[ "CWE-20" ]
lz4
da5373197e84ee49d75b8334d4510689731d6e90
195,803,923,128,211,240,000,000,000,000,000,000,000
4
Fixed : issue 52 (reported by Ludwig Strigeus)
directory_command_should_use_begindir(or_options_t *options, const tor_addr_t *addr, int or_port, uint8_t router_purpose, int anonymized_connection) { if (!or_port) return 0; /* We don't know an ORPor...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
71,010,859,254,190,440,000,000,000,000,000,000,000
16
Fix assertion failure in tor_timegm. Fixes bug 6811.
parse_NOTE(const char *arg, struct ofpbuf *ofpacts, enum ofputil_protocol *usable_protocols OVS_UNUSED) { size_t start_ofs = ofpacts->size; ofpact_put_NOTE(ofpacts); arg = ofpbuf_put_hex(ofpacts, arg, NULL); if (arg[0]) { return xstrdup("bad hex digit in `note' argument"); } s...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
12,982,068,893,511,016,000,000,000,000,000,000,000
15
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static int airspy_free_urbs(struct airspy *s) { int i; airspy_kill_urbs(s); for (i = s->urbs_initialized - 1; i >= 0; i--) { if (s->urb_list[i]) { dev_dbg(s->dev, "free urb=%d\n", i); /* free the URBs */ usb_free_urb(s->urb_list[i]); } } s->urbs_initialized = 0; return 0; }
0
[ "CWE-119" ]
media_tree
aa93d1fee85c890a34f2510a310e55ee76a27848
107,171,871,594,530,750,000,000,000,000,000,000,000
17
media: fix airspy usb probe error path Fix a memory leak on probe error of the airspy usb device driver. The problem is triggered when more than 64 usb devices register with v4l2 of type VFL_TYPE_SDR or VFL_TYPE_SUBDEV. The memory leak is caused by the probe function of the airspy driver mishandeling errors and not ...
static char* is_text_file(const char *name, ssize_t *sz) { /* We were using magic.h API to check for file being text, but it thinks * that file containing just "0" is not text (!!) * So, we do it ourself. */ int fd = open(name, O_RDONLY); if (fd < 0) return NULL; /* it's not text (be...
1
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
245,788,478,151,285,300,000,000,000,000,000,000,000
97
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
find_field_in_table(THD *thd, TABLE *table, const char *name, size_t length, bool allow_rowid, uint *cached_field_index_ptr) { Field *field; uint cached_field_index= *cached_field_index_ptr; DBUG_ENTER("find_field_in_table"); DBUG_PRINT("enter", ("table: '%s', field name: '%s'", table->alias...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
274,796,512,877,368,570,000,000,000,000,000,000,000
45
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.
png_image_set_PLTE(png_image_write_control *display) { const png_imagep image = display->image; const void *cmap = display->colormap; const int entries = image->colormap_entries > 256 ? 256 : (int)image->colormap_entries; /* NOTE: the caller must check for cmap != NULL and entries != 0 */ const p...
0
[ "CWE-120" ]
libpng
81f44665cce4cb1373f049a76f3904e981b7a766
58,431,920,257,298,190,000,000,000,000,000,000,000
144
[libpng16] Reject attempt to write over-length PLTE chunk
__u32 secure_ip_id(__be32 daddr) { u32 hash[MD5_DIGEST_WORDS]; hash[0] = (__force __u32) daddr; hash[1] = net_secret[13]; hash[2] = net_secret[14]; hash[3] = net_secret[15]; md5_transform(hash, net_secret); return hash[0]; }
0
[ "CWE-703" ]
linux
6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
267,009,044,192,632,760,000,000,000,000,000,000,000
13
net: Compute protocol sequence numbers and fragment IDs using MD5. Computers have become a lot faster since we compromised on the partial MD4 hash which we use currently for performance reasons. MD5 is a much safer choice, and is inline with both RFC1948 and other ISS generators (OpenBSD, Solaris, etc.) Furthermore,...
template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8> CImgList(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4, const CImg<t5>& img5, const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8, ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
172,509,528,679,027,200,000,000,000,000,000,000,000
9
Fix other issues in 'CImg<T>::load_bmp()'.
static GF_AUContext *gf_seng_create_new_au(GF_StreamContext *sc, u32 time) { GF_AUContext *new_au, *last_au; if (!sc) return NULL; last_au = gf_list_last(sc->AUs); if (last_au && last_au->timing == time) { GF_LOG(GF_LOG_DEBUG, GF_LOG_SCENE, ("[SceneEngine] Forcing new AU\n")); time++; } new_au = gf_sm_stream_...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
226,243,888,651,677,740,000,000,000,000,000,000,000
12
fixed #2138
static DetectEngineThreadCtx *GetTenantById(HashTable *h, uint32_t id) { /* technically we need to pass a DetectEngineThreadCtx struct with the * tentant_id member. But as that member is the first in the struct, we * can use the id directly. */ return HashTableLookup(h, &id, 0); }
0
[ "CWE-347" ]
suricata
d8634daf74c882356659addb65fb142b738a186b
168,304,814,278,460,560,000,000,000,000,000,000,000
7
stream: fix false negative on bad RST If a bad RST was received the stream inspection would not happen for that packet, but it would still move the 'raw progress' tracker forward. Following good packets would then fail to detect anything before the 'raw progress' position. Bug #2770 Reported-by: Alexey Vishnyakov
ofputil_switch_features_has_ports(struct ofpbuf *b) { struct ofp_header *oh = b->data; size_t phy_port_size; if (oh->version >= OFP13_VERSION) { /* OpenFlow 1.3+ never has ports in the feature reply. */ return false; } phy_port_size = (oh->version == OFP10_VERSION ...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
288,708,748,679,121,200,000,000,000,000,000,000,000
26
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>
static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) /* {{{ */ { BG(rand_is_seeded) = 0; BG(mt_rand_is_seeded) = 0; BG(umask) = -1; BG(next) = NULL; BG(left) = -1; BG(user_tick_functions) = NULL; BG(user_filter_map) = NULL; BG(serialize_lock) = 0; memset(&BG(serialize), 0, sizeof(BG(se...
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
306,671,754,713,745,150,000,000,000,000,000,000,000
24
Fixed bug #69418 - more s->p fixes for filenames
static void safe_fd_set(const int fd, fd_set * const fds) { if (fd == -1) { return; } FD_SET(fd, fds); }
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
283,530,930,321,828,730,000,000,000,000,000,000,000
7
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
static inline struct usb_function_instance *to_usb_function_instance( struct config_item *item) { return container_of(to_config_group(item), struct usb_function_instance, group); }
0
[ "CWE-125" ]
linux
15753588bcd4bbffae1cca33c8ced5722477fe1f
151,300,229,797,736,160,000,000,000,000,000,000,000
6
USB: gadget: fix illegal array access in binding with UDC FuzzUSB (a variant of syzkaller) found an illegal array access using an incorrect index while binding a gadget with UDC. Reference: https://www.spinics.net/lists/linux-usb/msg194331.html This bug occurs when a size variable used for a buffer is misused to acc...
gstring_grow(gstring * g, int p, int count) { assert(FALSE); }
0
[]
exim
2600301ba6dbac5c9d640c87007a07ee6dcea1f4
169,281,666,616,853,640,000,000,000,000,000,000,000
4
string.c: do not interpret '\\' before '\0' (CVE-2019-15846) Add documents about CVE-2019-15846 Add testcase for CVE-2019-15846 Update Changelog Add Announcements
void OSD::handle_pg_log(OpRequestRef op) { MOSDPGLog *m = static_cast<MOSDPGLog*>(op->get_nonconst_req()); assert(m->get_type() == MSG_OSD_PG_LOG); dout(7) << "handle_pg_log " << *m << " from " << m->get_source() << dendl; if (!require_osd_peer(op->get_req())) return; int from = m->get_source().num(); ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
331,303,693,926,631,430,000,000,000,000,000,000,000
28
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 ...
rb_str_index(VALUE str, VALUE sub, long offset) { long pos; char *s, *sptr, *e; long len, slen; rb_encoding *enc; enc = rb_enc_check(str, sub); if (is_broken_string(sub)) { return -1; } len = str_strlen(str, enc); slen = str_strlen(sub, enc); if (offset < 0) { offset += len; ...
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
160,878,289,386,568,670,000,000,000,000,000,000,000
41
* 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
static int tg3_nvram_write_block_buffered(struct tg3 *tp, u32 offset, u32 len, u8 *buf) { int i, ret = 0; for (i = 0; i < len; i += 4, offset += 4) { u32 page_off, phy_addr, nvram_cmd; __be32 data; memcpy(&data, buf + i, 4); tw32(NVRAM_WRDATA, be32_to_cpu(data)); page_off = offset % tp->nvram_pagesize;...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
153,391,041,978,448,190,000,000,000,000,000,000,000
53
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
ieee80211_sta_abort_chanswitch(struct ieee80211_sub_if_data *sdata) { struct ieee80211_local *local = sdata->local; if (!local->ops->abort_channel_switch) return; mutex_lock(&local->mtx); mutex_lock(&local->chanctx_mtx); ieee80211_vif_unreserve_chanctx(sdata); mutex_unlock(&local->chanctx_mtx); if (sdata->...
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
277,786,305,612,931,680,000,000,000,000,000,000,000
24
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
static int udf_sync_fs(struct super_block *sb, int wait) { struct udf_sb_info *sbi = UDF_SB(sb); mutex_lock(&sbi->s_alloc_mutex); if (sbi->s_lvid_dirty) { /* * Blockdevice will be synced later so we don't have to submit * the buffer for IO */ mark_buffer_dirty(sbi->s_lvid_bh); sbi->s_lvid_dirty = 0; ...
0
[]
linux-2.6
57b9655d01ef057a523e810d29c37ac09b80eead
69,430,699,150,960,150,000,000,000,000,000,000,000
17
udf: Improve table length check to avoid possible overflow When a partition table length is corrupted to be close to 1 << 32, the check for its length may overflow on 32-bit systems and we will think the length is valid. Later on the kernel can crash trying to read beyond end of buffer. Fix the check to avoid possible...
static void vc_setGx(struct vc_data *vc, unsigned int which, int c) { unsigned char *charset = &vc->state.Gx_charset[which]; switch (c) { case '0': *charset = GRAF_MAP; break; case 'B': *charset = LAT1_MAP; break; case 'U': *charset = IBMPC_MAP; break; case 'K': *charset = USER_MAP; break; } i...
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
148,422,393,342,597,280,000,000,000,000,000,000,000
22
vt: Disable KD_FONT_OP_COPY It's buggy: On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote: > We recently discovered a slab-out-of-bounds read in fbcon in the latest > kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that > "fbcon_do_set_font" did not handle "vc->vc_font.data" and > "vc->...
dissect_tcpopt_exp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *item; proto_tree *exp_tree; guint16 magic; int offset = 0, optlen = tvb_reported_length(tvb); item = proto_tree_add_item(tree, proto_tcp_option_exp, tvb, offset, -1, ENC_NA); exp_tree = proto_i...
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
182,212,560,169,616,340,000,000,000,000,000,000,000
31
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
static void igmp_stop_timer(struct ip_mc_list *im) { spin_lock_bh(&im->lock); if (del_timer(&im->timer)) refcount_dec(&im->refcnt); im->tm_running = 0; im->reporter = 0; im->unsolicit_count = 0; spin_unlock_bh(&im->lock); }
0
[ "CWE-362" ]
linux
23d2b94043ca8835bd1e67749020e839f396a1c2
199,011,697,042,043,700,000,000,000,000,000,000,000
10
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...
static int regulator_check_voltage(struct regulator_dev *rdev, int *min_uV, int *max_uV) { BUG_ON(*min_uV > *max_uV); if (!rdev->constraints) { rdev_err(rdev, "no constraints\n"); return -ENODEV; } if (!(rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE)) { rdev_err(rdev, "operation not all...
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
141,615,759,163,502,750,000,000,000,000,000,000,000
27
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 *task_stopped_code(struct task_struct *p, bool ptrace) { if (ptrace) { if (task_is_traced(p) && !(p->jobctl & JOBCTL_LISTENING)) return &p->exit_code; } else { if (p->signal->flags & SIGNAL_STOP_STOPPED) return &p->signal->group_exit_code; } return NULL; }
0
[ "CWE-200", "CWE-284" ]
linux
6c85501f2fabcfc4fc6ed976543d252c4eaf4be9
81,945,502,173,615,505,000,000,000,000,000,000,000
11
fix infoleak in waitid(2) kernel_waitid() can return a PID, an error or 0. rusage is filled in the first case and waitid(2) rusage should've been copied out exactly in that case, *not* whenever kernel_waitid() has not returned an error. Compat variant shares that braino; none of kernel_wait4() callers do, so the bel...
size_t HTTPSession::sendPing() { const size_t bytes = codec_->generatePingRequest(writeBuf_); if (bytes) { scheduleWrite(); } return bytes; }
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
190,528,312,375,789,000,000,000,000,000,000,000,000
7
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
void next_row() { /* Do nothing, UNBOUNDED PRECEDING frame end doesn't move. */ }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
80,192,207,772,747,265,000,000,000,000,000,000,000
4
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc, const EVP_MD **md, int *mac_pkey_type, int *mac_secret_size,SSL_COMP **comp) { int i; const SSL_CIPHER *c; c=s->cipher; if (c == NULL) return(0); if (comp != NULL) { SSL_COMP ctmp; #ifndef OPENSSL_NO_COMP load_builtin_compressions()...
0
[]
openssl
0ffa49970b9f8ea66b43ce2eb7f8fd523b65bc2c
236,539,298,781,382,900,000,000,000,000,000,000,000
154
Backport support for fixed DH ciphersuites (from HEAD)
xz_decomp(xz_statep state) { int ret; unsigned had; unsigned long crc, len; lzma_stream *strm = &(state->strm); lzma_action action = LZMA_RUN; /* fill output buffer up to end of deflate stream */ had = strm->avail_out; do { /* get more input for inflate() */ if (strm->a...
0
[ "CWE-835" ]
libxml2
2240fbf5912054af025fb6e01e26375100275e74
335,104,047,240,934,250,000,000,000,000,000,000,000
111
Fix infinite loop in LZMA decompression Check the liblzma error code more thoroughly to avoid infinite loops. Closes: https://gitlab.gnome.org/GNOME/libxml2/issues/13 Closes: https://bugzilla.gnome.org/show_bug.cgi?id=794914 This is CVE-2018-9251 and CVE-2018-14567. Thanks to Dongliang Mu and Simon Wörner for the r...
TEE_Result syscall_cryp_derive_key(unsigned long state, const struct utee_attribute *usr_params, unsigned long param_count, unsigned long derived_key) { TEE_Result res = TEE_ERROR_NOT_SUPPORTED; struct tee_ta_session *sess; struct tee_obj *ko; struct tee_obj *so; struct tee_cryp_state *cs; struct tee_cryp_o...
0
[ "CWE-327" ]
optee_os
34a08bec755670ea0490cb53bbc68058cafc69b6
16,800,432,383,789,300,000,000,000,000,000,000,000
246
cryp: prevent direct calls to update and final functions With inconsistent or malformed data it has been possible to call "update" and "final" crypto functions directly. Using a fuzzer tool [1] we have seen that this results in asserts, i.e., a crash that potentially could leak sensitive information. By setting the s...
mon_getlist( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt ) { req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); }
0
[ "CWE-190" ]
ntp
c04c3d3d940dfe1a53132925c4f51aef017d2e0f
28,802,382,889,019,433,000,000,000,000,000,000,000
8
[TALOS-CAN-0052] crash by loop counter underrun.
static bool IsLiteralCompareNil(HValue* left, Token::Value op, HValue* right, Handle<Object> nil, HValue** expr) { return MatchLiteralCompareNil(left, op, right, nil, expr) || MatchLit...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
264,874,358,920,861,700,000,000,000,000,000,000,000
8
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
irc_ctcp_get_default_reply (const char *ctcp) { int i; for (i = 0; irc_ctcp_default_reply[i].name; i++) { if (weechat_strcasecmp (irc_ctcp_default_reply[i].name, ctcp) == 0) return irc_ctcp_default_reply[i].reply; } /* unknown CTCP */ return NULL; }
0
[ "CWE-119", "CWE-787" ]
weechat
2fb346f25f79e412cf0ed314fdf791763c19b70b
220,081,542,554,556,300,000,000,000,000,000,000,000
13
irc: fix parsing of DCC filename
static int syslog_skip_timestamp(const char **buf) { enum { LETTER, SPACE, NUMBER, SPACE_OR_NUMBER, COLON } sequence[] = { LETTER, LETTER, LETTER, SPACE, SPACE_OR_NUMBER, NUMBE...
0
[ "CWE-125" ]
systemd
a6aadf4ae0bae185dc4c414d492a4a781c80ffe5
41,748,574,659,643,896,000,000,000,000,000,000,000
67
journal: fix syslog_parse_identifier() Fixes #9829.
compose_group16_nonknockout_nonblend_nonisolated_mask_common(uint16_t *tos_ptr, bool tos_isolated, int tos_planestride, int tos_rowstride, uint16_t alpha, uint16_t shape, gs_blend_mode_t blend_mode, bool tos_has_shape, int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag, ...
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
249,430,758,233,551,580,000,000,000,000,000,000,000
15
Bug 701795: Segv due to image mask issue
static ssize_t stream_request_data(nghttp2_session *ngh2, int32_t stream_id, uint8_t *buf, size_t length, uint32_t *data_flags, nghttp2_data_source *source, void *user_data) { h2_proxy_stream *stream; apr_...
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
272,493,365,079,410,330,000,000,000,000,000,000,000
97
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
base::WeakPtr<ElectronBrowserHandlerImpl> GetWeakPtr() { return weak_factory_.GetWeakPtr(); }
1
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
283,273,770,000,963,660,000,000,000,000,000,000,000
3
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
ofputil_group_stats_to_ofp13(const struct ofputil_group_stats *gs, struct ofp13_group_stats *gs13, size_t length, struct ofp11_bucket_counter bucket_cnts[]) { ofputil_group_stats_to_ofp11(gs, &gs13->gs, length, bucket_cnts); gs13->duration_sec = htonl(gs...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
173,960,671,093,979,480,000,000,000,000,000,000,000
9
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>
long keyctl_keyring_unlink(key_serial_t id, key_serial_t ringid) { key_ref_t keyring_ref, key_ref; long ret; keyring_ref = lookup_user_key(ringid, 0, 0, KEY_WRITE); if (IS_ERR(keyring_ref)) { ret = PTR_ERR(keyring_ref); goto error; } key_ref = lookup_user_key(id, 0, 0, 0); if (IS_ERR(key_ref)) { ret = PT...
0
[ "CWE-399" ]
linux-2.6
0d54ee1c7850a954026deec4cd4885f331da35cc
133,886,997,645,468,910,000,000,000,000,000,000,000
26
security: introduce missing kfree Plug this leak. Acked-by: David Howells <dhowells@redhat.com> Cc: James Morris <jmorris@namei.org> Cc: <stable@kernel.org> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
SCTP_STATIC void sctp_close(struct sock *sk, long timeout) { struct net *net = sock_net(sk); struct sctp_endpoint *ep; struct sctp_association *asoc; struct list_head *pos, *temp; unsigned int data_was_unread; SCTP_DEBUG_PRINTK("sctp_close(sk: 0x%p, timeout:%ld)\n", sk, timeout); sctp_lock_sock(sk); sk->sk_sh...
0
[ "CWE-20" ]
linux
726bc6b092da4c093eb74d13c07184b18c1af0f1
124,026,289,004,417,740,000,000,000,000,000,000,000
75
net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS Building sctp may fail with: In function ‘copy_from_user’, inlined from ‘sctp_getsockopt_assoc_stats’ at net/sctp/socket.c:5656:20: arch/x86/include/asm/uaccess_32.h:211:26: error: call to ‘copy_from_user_overflow’ declared with attribute error: c...