func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
RGWPutMetadataObject() : dlo_manifest(NULL) {}
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
221,353,235,869,951,200,000,000,000,000,000,000,000
3
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 <...
multi_add_iroutes(struct multi_context *m, struct multi_instance *mi) { struct gc_arena gc = gc_new(); const struct iroute *ir; const struct iroute_ipv6 *ir6; if (TUNNEL_TYPE(mi->context.c1.tuntap) == DEV_TYPE_TUN) { mi->did_iroutes = true; for (ir = mi->context.opt...
0
[ "CWE-362", "CWE-476" ]
openvpn
37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab
232,309,432,847,536,350,000,000,000,000,000,000,000
43
Fix illegal client float (CVE-2020-11810) There is a time frame between allocating peer-id and initializing data channel key (which is performed on receiving push request or on async push-reply) in which the existing peer-id float checks do not work right. If a "rogue" data channel packet arrives during that time fra...
static int atl2_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) { struct atl2_adapter *adapter = netdev_priv(netdev); if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE)) return -EOPNOTSUPP; if (wol->wolopts & (WAKE_UCAST | WAKE_BCAST | WAKE_MCAST)) return -EOPNOTSUPP; /* these settings will alw...
0
[ "CWE-200" ]
linux
f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
221,506,581,521,826,670,000,000,000,000,000,000,000
20
atl2: Disable unimplemented scatter/gather feature atl2 includes NETIF_F_SG in hw_features even though it has no support for non-linear skbs. This bug was originally harmless since the driver does not claim to implement checksum offload and that used to be a requirement for SG. Now that SG and checksum offload are i...
static int oz_usb_submit_elt(struct oz_elt_buf *eb, struct oz_elt_info *ei, struct oz_usb_ctx *usb_ctx, u8 strid, u8 isoc) { int ret; struct oz_elt *elt = (struct oz_elt *)ei->data; struct oz_app_hdr *app_hdr = (struct oz_app_hdr *)(elt+1); elt->type = OZ_ELT_APP_DATA; ei->app_id = OZ_APPID_USB; ei->length = el...
0
[ "CWE-200", "CWE-189" ]
linux
04bf464a5dfd9ade0dda918e44366c2c61fce80b
263,820,791,991,807,570,000,000,000,000,000,000,000
23
ozwpan: divide-by-zero leading to panic A network supplied parameter was not checked before division, leading to a divide-by-zero. Since this happens in the softirq path, it leads to a crash. A PoC follows below, which requires the ozprotocol.h file from this module. =-=-=-=-=-= #include <arpa/inet.h> #include <li...
size_t iov_iter_copy_from_user(struct page *page, struct iov_iter *i, unsigned long offset, size_t bytes) { char *kaddr; size_t copied; kaddr = kmap(page); if (likely(i->nr_segs == 1)) { int left; char __user *buf = i->iov->iov_base + i->iov_offset; left = __copy_from_user_nocache(kaddr + offset, buf, byte...
0
[ "CWE-193" ]
linux-2.6
94ad374a0751f40d25e22e036c37f7263569d24c
35,361,213,265,738,226,000,000,000,000,000,000,000
19
Fix off-by-one error in iov_iter_advance() The iov_iter_advance() function would look at the iov->iov_len entry even though it might have iterated over the whole array, and iov was pointing past the end. This would cause DEBUG_PAGEALLOC to trigger a kernel page fault if the allocation was at the end of a page, and th...
static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) { u32 mbx_size = IXGBE_VFMAILBOX_SIZE; u32 msgbuf[IXGBE_VFMAILBOX_SIZE]; struct ixgbe_hw *hw = &adapter->hw; s32 retval; retval = ixgbe_read_mbx(hw, msgbuf, mbx_size, vf); if (retval) { pr_err("Error receiving message from VF\n"); retur...
0
[ "CWE-20" ]
linux
63e39d29b3da02e901349f6cd71159818a4737a6
262,705,902,133,441,830,000,000,000,000,000,000,000
89
ixgbe: fix large MTU request from VF Check that the MTU value requested by the VF is in the supported range of MTUs before attempting to set the VF large packet enable, otherwise reject the request. This also avoids unnecessary register updates in the case of the 82599 controller. Fixes: 872844ddb9e4 ("ixgbe: Enable ...
X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length) { const unsigned char *q; X509 *ret; int freeret = 0; /* Save start position */ q = *pp; if(!a || *a == NULL) { freeret = 1; } ret = d2i_X509(a, pp, length); /* If certificate unreadable then forget it */ ...
0
[]
openssl
18029a3d0739284cadb309ea0fd498379b0bcfdb
84,141,675,754,048,580,000,000,000,000,000,000,000
31
Fix a failure to NULL a pointer freed on error. Reported by the LibreSSL project as a follow on to CVE-2015-0209 Reviewed-by: Richard Levitte <levitte@openssl.org>
VncJob *vnc_job_new(VncState *vs) { VncJob *job = g_malloc0(sizeof(VncJob)); job->vs = vs; vnc_lock_queue(queue); QLIST_INIT(&job->rectangles); vnc_unlock_queue(queue); return job; }
0
[ "CWE-125" ]
qemu
9f64916da20eea67121d544698676295bbb105a7
308,091,253,018,595,800,000,000,000,000,000,000,000
10
pixman/vnc: use pixman images in vnc. The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content...
print_lcp_config_options(netdissect_options *ndo, const u_char *p, int length) { int len, opt; if (length < 2) return 0; ND_TCHECK2(*p, 2); len = p[1]; opt = p[0]; if (length < len) return 0; if (len < 2) { if ((opt >= LCPOPT_MIN) && (opt <= LCPOPT_MAX)) ND_PRINT((ndo, "\n\t %...
0
[ "CWE-703", "CWE-770" ]
tcpdump
32027e199368dad9508965aae8cd8de5b6ab5231
160,122,462,864,435,600,000,000,000,000,000,000,000
218
PPP: When un-escaping, don't allocate a too-large buffer. The buffer should be big enough to hold the captured data, but it doesn't need to be big enough to hold the entire on-the-network packet, if we haven't captured all of it. (backported from commit e4add0b010ed6f2180dcb05a13026242ed935334)
void warnf(struct GlobalConfig *config, const char *fmt, ...) { va_list ap; va_start(ap, fmt); voutf(config, WARN_PREFIX, fmt, ap); va_end(ap); }
0
[ "CWE-190", "CWE-125" ]
curl
d530e92f59ae9bb2d47066c3c460b25d2ffeb211
55,030,185,269,888,480,000,000,000,000,000,000,000
7
voutf: fix bad arethmetic when outputting warnings to stderr CVE-2018-16842 Reported-by: Brian Carpenter Bug: https://curl.haxx.se/docs/CVE-2018-16842.html
typename EK::Plane_3 read_plane(std::istream& in) { typename K::RT a, b, c, d; in >> a >> b >> c >> d; return typename EK::Plane_3(a, b, c, d); }
0
[ "CWE-125" ]
cgal
5a1ab45058112f8647c14c02f58905ecc597ec76
80,323,199,298,908,640,000,000,000,000,000,000,000
5
Fix Nef_3
goa_http_client_init (GoaHttpClient *client) { }
0
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
112,353,949,209,497,450,000,000,000,000,000,000,000
3
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
destroyBindings(BINDING *bindings, XML_Parser parser) { for (;;) { BINDING *b = bindings; if (!b) break; bindings = b->nextTagBinding; FREE(parser, b->uri); FREE(parser, b); } }
0
[ "CWE-611" ]
libexpat
11f8838bf99ea0a6f0b76f9760c43704d00c4ff6
274,305,254,543,867,400,000,000,000,000,000,000,000
11
xmlparse.c: Fix extraction of namespace prefix from XML name (#186)
int wc_SetDatesBuffer(Cert* cert, const byte* der, int derSz) { int ret = 0; if (cert == NULL) { ret = BAD_FUNC_ARG; } else { /* Check if decodedCert is cached */ if (cert->der != der) { /* Allocate cache for the decoded cert */ ret = wc_SetCert_LoadDer(cert...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
296,963,936,687,853,950,000,000,000,000,000,000,000
24
OCSP: improve handling of OCSP no check extension
void __skb_tstamp_tx(struct sk_buff *orig_skb, struct skb_shared_hwtstamps *hwtstamps, struct sock *sk, int tstype) { struct sk_buff *skb; bool tsonly, opt_stats = false; if (!sk) return; if (!hwtstamps && !(sk->sk_tsflags & SOF_TIMESTAMPING_OPT_TX_SWHW) && skb_shinfo(orig_skb)->tx_flags & S...
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
169,813,747,119,150,660,000,000,000,000,000,000,000
47
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
nautilus_file_get_description (NautilusFile *file) { return g_strdup (file->details->description); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
319,488,274,219,782,100,000,000,000,000,000,000,000
4
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static inline int udp4_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto) { int err; UDP_SKB_CB(skb)->partial_cov = 0; UDP_SKB_CB(skb)->cscov = skb->len; if (proto == IPPROTO_UDPLITE) { err = udplite_checksum_init(skb, uh); if (err) return err; } /* Note, we are only interested in != 0 or...
0
[]
linux
a612769774a30e4fc143c4cb6395c12573415660
136,600,082,871,318,910,000,000,000,000,000,000,000
20
udp: prevent bugcheck if filter truncates packet too much If socket filter truncates an udp packet below the length of UDP header in udpv6_queue_rcv_skb() or udp_queue_rcv_skb(), it will trigger a BUG_ON in skb_pull_rcsum(). This BUG_ON (and therefore a system crash if kernel is configured that way) can be easily enfo...
cbq_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d) { struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)arg; cl->qstats.qlen = cl->q->q.qlen; cl->xstats.avgidle = cl->avgidle; cl->xstats.undertime = 0; if (!PSCHED_IS_PASTPERFECT(cl->undertime)) ...
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
290,384,988,686,278,250,000,000,000,000,000,000,000
22
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
static int nf_tables_fill_expr_info(struct sk_buff *skb, const struct nft_expr *expr) { if (nla_put_string(skb, NFTA_EXPR_NAME, expr->ops->type->name)) goto nla_put_failure; if (expr->ops->dump) { struct nlattr *data = nla_nest_start_noflag(skb, NFTA_EXPR_DATA); if (data == NULL) goto nla...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
318,647,936,380,108,160,000,000,000,000,000,000,000
21
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
CreateForeignDataWrapper(CreateFdwStmt *stmt) { Relation rel; Datum values[Natts_pg_foreign_data_wrapper]; bool nulls[Natts_pg_foreign_data_wrapper]; HeapTuple tuple; Oid fdwId; bool handler_given; bool validator_given; Oid fdwhandler; Oid fdwvalidator; Datum fdwoptions; Oid ownerId; ObjectAddr...
0
[ "CWE-94" ]
postgres
f52d2fbd8c62f667191b61228acf9d8aa53607b9
274,264,772,469,057,960,000,000,000,000,000,000,000
107
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
void gf_node_unregister_children(GF_Node *container, GF_ChildNodeItem *child) { while (child) { GF_ChildNodeItem *cur; gf_node_unregister(child->node, container); cur = child; child = child->next; gf_free(cur); } }
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
235,335,448,772,732,700,000,000,000,000,000,000,000
10
fixed #2109
~AESGCMCipher() { clear(); }
0
[ "CWE-78" ]
ssh2
f763271f41320e71d5cbee02ea5bc6a2ded3ca21
181,687,714,859,025,560,000,000,000,000,000,000,000
3
examples,lib,test: switch to code rewrite For more information see: https://github.com/mscdex/ssh2/issues/935
CImg<T>& max(const T& value) { if (is_empty()) return *this; cimg_openmp_for(*this,std::max(*ptr,value),65536); return *this; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
282,878,981,470,195,760,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int reply_query_type(unsigned char *msg, int len) { unsigned char *c; int l; int type; /* skip the header */ c = msg + sizeof(struct domain_hdr); len -= sizeof(struct domain_hdr); if (len < 0) return 0; /* now the query, which is a name and 2 16 bit words */ l = dns_name_length(c); c += l; type =...
0
[ "CWE-119" ]
connman
5c281d182ecdd0a424b64f7698f32467f8f67b71
145,691,513,182,855,370,000,000,000,000,000,000,000
20
dnsproxy: Fix crash on malformed DNS response If the response query string is malformed, we might access memory pass the end of "name" variable in parse_response().
void bigint_cnd_swap(word cnd, word x[], word y[], size_t size) { const word mask = CT::expand_mask(cnd); for(size_t i = 0; i != size; ++i) { word a = x[i]; word b = y[i]; x[i] = CT::select(mask, b, a); y[i] = CT::select(mask, a, b); } }
0
[ "CWE-200" ]
botan
bcf13fa153a11b3e0ad54e2af6962441cea3adf1
305,378,109,775,207,660,000,000,000,000,000,000,000
12
Fixes for CVE-2015-7827 and CVE-2016-2849
void dissect_PAD(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags, const guint encoding, int octets_to_next_header, proto_tree *tree) { /* 0...2...........7...............15.............23...............31 *...
0
[ "CWE-401" ]
wireshark
33e63d19e5496c151bad69f65cdbc7cba2b4c211
226,609,948,224,252,380,000,000,000,000,000,000,000
26
RTPS: Fixup our coherent set map. coherent_set_tracking.coherent_set_registry_map uses a struct as a key, but the hash and comparison routines treat keys as a sequence of bytes. Make sure every key byte is initialized. Fixes #16994. Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead of creating ...
do_result_format_version(struct st_command *command) { long version; static DYNAMIC_STRING ds_version; const struct command_arg result_format_args[] = { {"version", ARG_STRING, TRUE, &ds_version, "Version to use"} }; DBUG_ENTER("do_result_format_version"); check_command_args(command, command->first_ar...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
330,664,826,837,314,940,000,000,000,000,000,000,000
26
WL#9072: Backport WL#8785 to 5.5
PRODUCT_INFO* license_new_product_info() { PRODUCT_INFO* productInfo; productInfo = (PRODUCT_INFO*) malloc(sizeof(PRODUCT_INFO)); productInfo->dwVersion = 0; productInfo->cbCompanyName = 0; productInfo->pbCompanyName = NULL; productInfo->cbProductId = 0; productInfo->pbProductId = NULL; return productInfo; }
0
[]
FreeRDP
f1d6afca6ae620f9855a33280bdc6f3ad9153be0
298,923,479,823,732,800,000,000,000,000,000,000,000
14
Fix CVE-2014-0791 This patch fixes CVE-2014-0791, the remaining length in the stream is checked before doing some malloc().
callbacks_update_statusbar(void) { if ((screen.statusbar.coordstr != NULL)&&(GTK_IS_LABEL(screen.win.statusMessageLeft))) { gtk_label_set_text(GTK_LABEL(screen.win.statusMessageLeft), screen.statusbar.coordstr); } if ((screen.statusbar.diststr != NULL)&&(GTK_IS_LABEL(screen.win.statusMessageRight))) { gtk_label_...
0
[ "CWE-200" ]
gerbv
319a8af890e4d0a5c38e6d08f510da8eefc42537
3,891,050,091,480,037,000,000,000,000,000,000,000
9
Remove local alias to parameter array Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402
virDomainChrSourceDefParseXML(virDomainChrSourceDefPtr def, xmlNodePtr cur, unsigned int flags, virDomainChrDefPtr chr_def, xmlXPathContextPtr ctxt) { bool logParsed = false; bool protocolParsed = false; int sourcePars...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
34,629,365,028,622,840,000,000,000,000,000,000,000
121
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
compare_clients(cupsd_client_t *a, /* I - First client */ cupsd_client_t *b, /* I - Second client */ void *data) /* I - User data (not used) */ { (void)data; if (a == b) return (0); else if (a < b) return (-1); else return (1); }
0
[ "CWE-290" ]
cups
afa80cb2b457bf8d64f775bed307588610476c41
173,248,021,470,893,280,000,000,000,000,000,000,000
13
Don't treat "localhost.localdomain" as an allowed replacement for localhost, since it isn't.
static RList *symbols(RBinFile *bf) { RList *ret = r_list_newf (free); if (!ret) { return NULL; } RKernelCacheObj *obj = (RKernelCacheObj*) bf->o->bin_obj; symbols_from_mach0 (ret, obj->mach0, bf, 0, 0); HtPP *kernel_syms_by_addr = sdb_ht_new (); if (!kernel_syms_by_addr) { r_list_free (ret); return NUL...
0
[ "CWE-476" ]
radare2
feaa4e7f7399c51ee6f52deb84dc3f795b4035d6
96,932,003,595,776,950,000,000,000,000,000,000,000
80
Fix null deref in xnu.kernelcache ##crash * Reported by @xshad3 via huntr.dev
void setnxCommand(client *c) { c->argv[2] = tryObjectEncoding(c->argv[2]); setGenericCommand(c,OBJ_SET_NX,c->argv[1],c->argv[2],NULL,0,shared.cone,shared.czero); }
0
[ "CWE-190" ]
redis
92e3b1802f72ca0c5b0bde97f01d9b57a758d85c
86,025,564,155,259,980,000,000,000,000,000,000,000
4
Fix integer overflow in STRALGO LCS (CVE-2021-29477) An integer overflow bug in Redis version 6.0 or newer could be exploited using the STRALGO LCS command to corrupt the heap and potentially result with remote code execution. (cherry picked from commit f0c5f920d0f88bd8aa376a2c05af4902789d1ef9)
finish_daemon(const char *desired_cwd) { int nullfd; char c = '.'; if (finish_daemon_called) return; if (!start_daemon_called) start_daemon(); finish_daemon_called = 1; if (!desired_cwd) desired_cwd = "/"; /* Don't hold the wrong FS mounted */ if (chdir(desired_cwd) < 0) { log_err(LD_G...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
131,969,914,208,929,900,000,000,000,000,000,000,000
41
Fix assertion failure in tor_timegm. Fixes bug 6811.
static BROTLI_INLINE uint32_t GetCopyBase(uint16_t copycode) { return kCopyBase[copycode]; }
1
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
331,178,121,296,672,170,000,000,000,000,000,000,000
3
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { /* Behave like FETCH_OBJ_W */ zend_free_op free_op1, free_op2; zval *property = _get_zval_ptr_tmp(&opline->op2, EX(T...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
331,775,793,586,573,020,000,000,000,000,000,000,000
36
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
void nfs4_release_lockowner(const struct nfs4_lock_state *lsp) { struct nfs_server *server = lsp->ls_state->owner->so_server; struct nfs_release_lockowner_args *args; struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RELEASE_LOCKOWNER], }; if (server->nfs_client->cl_mvops->minor_version != 0...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
139,156,913,735,687,910,000,000,000,000,000,000,000
19
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
static void bpf_release_orig_filter(struct bpf_prog *fp) { struct sock_fprog_kern *fprog = fp->orig_prog; if (fprog) { kfree(fprog->filter); kfree(fprog); } }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
19,609,372,432,597,191,000,000,000,000,000,000,000
9
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
int NDPI_PROTOCOL_IP_is_set(const ndpi_ip_addr_t *ip) { return(memcmp(ip, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", sizeof(ndpi_ip_addr_t)) != 0); }
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
65,392,189,731,741,270,000,000,000,000,000,000,000
3
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
static void shadow_copy2_sort_data(vfs_handle_struct *handle, struct shadow_copy_data *shadow_copy2_data) { int (*cmpfunc)(const void *, const void *); const char *sort; struct shadow_copy2_config *config; SMB_VFS_HANDLE_GET_DATA(handle, config, struct shadow_copy2_config, return); sort = config->sort...
0
[ "CWE-200" ]
samba
675fd8d771f9d43e354dba53ddd9b5483ae0a1d7
195,576,989,834,278,270,000,000,000,000,000,000,000
31
CVE-2015-5299: s3-shadow-copy2: fix missing access check on snapdir Fix originally from <partha@exablox.com> https://bugzilla.samba.org/show_bug.cgi?id=11529 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
bad_area(struct pt_regs *regs, unsigned long error_code, unsigned long address) { __bad_area(regs, error_code, address, SEGV_MAPERR); }
0
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
18,171,002,302,266,386,000,000,000,000,000,000,000
4
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
http_session_ref (http_session_t sess) { if (sess) { sess->refcount++; if (opt_debug > 1) log_debug ("http.c:session_ref: sess %p ref now %d\n", sess, sess->refcount); } return sess; }
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
109,682,261,392,277,660,000,000,000,000,000,000,000
11
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct net_device *dev = info->user_ptr[1]; struct ieee80211_channel *chan; struct cfg80211_assoc_request req = {}; const u8 *bssid, *ssid; int err, ssid_len = 0; if (dev->iee...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
110,430,785,944,763,730,000,000,000,000,000,000,000
122
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
static void smc_set_option(const struct tcp_sock *tp, struct tcp_out_options *opts, unsigned int *remaining) { #if IS_ENABLED(CONFIG_SMC) if (static_branch_unlikely(&tcp_have_smc)) { if (tp->syn_smc) { if (*remaining >= TCPOLEN_EXP_SMC_BASE_ALIGNED) { opts->options |= OPTION_SMC; *remaining -=...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
33,265,805,174,250,010,000,000,000,000,000,000,000
15
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
pdf14_cmap_rgb_alpha_direct(frac r, frac g, frac b, frac alpha, gx_device_color * pdc, const gs_gstate * pgs, gx_device * dev, gs_color_select_t select) { int i, ncomps; frac cm_comps[GX_DEVICE_COLOR_MAX_COMPONENTS]; gx_color_value cv[GX_DEVICE_COLOR_MAX_COMPONENTS]; gx_color_index color; gx_de...
0
[ "CWE-416" ]
ghostpdl
90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb
97,350,645,547,666,220,000,000,000,000,000,000,000
39
Bug 697456. Dont create new ctx when pdf14 device reenabled This bug had yet another weird case where the user created a file that pushed the pdf14 device twice. We were in that case, creating a new ctx and blowing away the original one with out proper clean up. To avoid, only create a new one when we need it.
static inline void *alloc_smp_resp(int size) { return kzalloc(size, GFP_KERNEL); }
0
[ "CWE-399", "CWE-772" ]
linux
4a491b1ab11ca0556d2fda1ff1301e862a2d44c4
205,369,109,872,357,400,000,000,000,000,000,000,000
4
scsi: libsas: fix memory leak in sas_smp_get_phy_events() We've got a memory leak with the following producer: while true; do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null; done The buffer req is allocated and not freed after we return. Fix it. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") S...
static int sony_init_ff(struct sony_sc *sc) { return 0; }
1
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
305,039,012,594,635,800,000,000,000,000,000,000,000
4
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
static inline void mcba_usb_free_ctx(struct mcba_usb_ctx *ctx) { /* Increase number of free ctxs before freeing ctx */ atomic_inc(&ctx->priv->free_ctx_cnt); ctx->ndx = MCBA_CTX_FREE; /* Wake up the queue once ctx is marked free */ netif_wake_queue(ctx->priv->netdev); }
0
[ "CWE-416" ]
linux
4d6636498c41891d0482a914dd570343a838ad79
246,424,264,661,185,400,000,000,000,000,000,000,000
10
can: mcba_usb: fix use-after-free on disconnect The driver was accessing its driver data after having freed it. Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer") Cc: stable <stable@vger.kernel.org> # 4.12 Cc: Remigiusz Kołłątaj <remigiusz.kollataj@mobica.com> Reported-by: syzbot+e2...
int RGWListBuckets_ObjStore_SWIFT::get_params() { prefix = s->info.args.get("prefix"); marker = s->info.args.get("marker"); end_marker = s->info.args.get("end_marker"); wants_reversed = s->info.args.exists("reverse"); if (wants_reversed) { std::swap(marker, end_marker); } std::string limit_str = s->...
0
[ "CWE-617" ]
ceph
f44a8ae8aa27ecef69528db9aec220f12492810e
257,606,900,933,962,800,000,000,000,000,000,000,000
43
rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name checking for empty name avoids later assertion in RGWObjectCtx::set_atomic Fixes: CVE-2021-3531 Reviewed-by: Casey Bodley <cbodley@redhat.com> Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b...
Variant f_libxml_get_last_error() { xmlErrorPtr error = xmlGetLastError(); if (error) { return create_libxmlerror(*error); } return false; }
0
[ "CWE-94" ]
hhvm
95f96e7287effe2fcdfb9a5338d1a7e4f55b083b
243,269,879,077,343,730,000,000,000,000,000,000,000
7
Fix libxml_disable_entity_loader() This wasn't calling requestInit and setting the libxml handler no null. So the first time an error came along it would reset the handler from no-op to reading again. This is a much better fix, we set our custom handler in requestInit and when libxml_disable_entity_loader we store th...
GC_API void * GC_CALL GC_memalign(size_t align, size_t lb) { size_t new_lb; size_t offset; ptr_t result; if (align <= GRANULE_BYTES) return GC_malloc(lb); if (align >= HBLKSIZE/2 || lb >= HBLKSIZE/2) { if (align > HBLKSIZE) { return (*GC_get_oom_fn())(LONG_MAX-1024); /* Fail */ ...
0
[ "CWE-189" ]
bdwgc
be9df82919960214ee4b9d3313523bff44fd99e1
258,699,837,555,478,850,000,000,000,000,000,000,000
30
Fix allocation size overflows due to rounding. * malloc.c (GC_generic_malloc): Check if the allocation size is rounded to a smaller value. * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
Tracks::Tracks() : track_entries_(NULL), track_entries_size_(0), wrote_tracks_(false) {}
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
312,716,637,245,728,170,000,000,000,000,000,000,000
2
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static int selinux_mount(const char *dev_name, const struct path *path, const char *type, unsigned long flags, void *data) { const struct cred *cred = current_cred(); if (flags & MS_REMOUNT) return superblock_has_perm(cred, path->dentry->d_sb, FILESYSTEM__REMOUNT, NULL); else return path...
0
[ "CWE-682" ]
linux-stable
0c461cb727d146c9ef2d3e86214f498b78b7d125
61,892,527,092,876,095,000,000,000,000,000,000,000
14
selinux: fix off-by-one in setprocattr SELinux tries to support setting/clearing of /proc/pid/attr attributes from the shell by ignoring terminating newlines and treating an attribute value that begins with a NUL or newline as an attempt to clear the attribute. However, the test for clearing attributes has always bee...
void free_metadata (WavpackMetadata *wpmd) { if (wpmd->data) { free (wpmd->data); wpmd->data = NULL; } }
0
[ "CWE-703", "CWE-835" ]
WavPack
070ef6f138956d9ea9612e69586152339dbefe51
200,582,070,591,608,000,000,000,000,000,000,000,000
7
issue #53: error out on zero sample rate
myFreeFunc(void *mem) { xmlMemFree(mem); }
0
[ "CWE-416" ]
libxml2
1358d157d0bd83be1dfe356a69213df9fac0b539
216,789,963,844,762,430,000,000,000,000,000,000,000
4
Fix use-after-free with `xmllint --html --push` Call htmlCtxtUseOptions to make sure that names aren't stored in dictionaries. Note that this issue only affects xmllint using the HTML push parser. Fixes #230.
static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) { /* * (tty == real_tty) is a cheap way of * testing if the tty is NOT a master pty. */ if (tty == real_tty && current->signal->tty != real_tty) return -ENOTTY; if (!real_tty->session) return -ENOTTY; return put_user(...
1
[ "CWE-416" ]
linux
c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9
239,519,629,588,296,630,000,000,000,000,000,000,000
12
tty: Fix ->session locking Currently, locking of ->session is very inconsistent; most places protect it using the legacy tty mutex, but disassociate_ctty(), __do_SAK(), tiocspgrp() and tiocgsid() don't. Two of the writers hold the ctrl_lock (because they already need it for ->pgrp), but __proc_set_tty() doesn't do tha...
static int cma_listen_on_dev(struct rdma_id_private *id_priv, struct cma_device *cma_dev, struct rdma_id_private **to_destroy) { struct rdma_id_private *dev_id_priv; struct net *net = id_priv->id.route.addr.dev_addr.net; int ret; lockdep_assert_held(&lock); *to_destroy = NULL; if (cma_family(id_...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
183,897,082,558,504,670,000,000,000,000,000,000,000
45
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...
add_points_edwards (mpi_point_t result, mpi_point_t p1, mpi_point_t p2, mpi_ec_t ctx) { #define X1 (p1->x) #define Y1 (p1->y) #define Z1 (p1->z) #define X2 (p2->x) #define Y2 (p2->y) #define Z2 (p2->z) #define X3 (result->x) #define Y3 (result->y) #define Z3 (result->z) #define A...
0
[ "CWE-203" ]
libgcrypt
b9577f7c89b4327edc09f2231bc8b31521102c79
307,681,288,084,108,640,000,000,000,000,000,000,000
92
ecc: Add mitigation against timing attack. * cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Add the order N to K. * mpi/ec.c (_gcry_mpi_ec_mul_point): Compute with NBITS of P or larger. CVE-id: CVE-2019-13627 GnuPG-bug-id: 4626 Co-authored-by: Ján Jančár <johny@neuromancer.sk> Signed-off-by: NIIBE Yutaka <gniibe@fsij.org...
static int interface_req_cmd_notification(QXLInstance *sin) { dprint(1, "%s:\n", __FUNCTION__); return 1; }
0
[]
qemu-kvm
5ff4e36c804157bd84af43c139f8cd3a59722db9
222,240,197,195,298,850,000,000,000,000,000,000,000
5
qxl: async io support using new spice api Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async comm...
static apr_status_t h2_task_process_request(h2_task *task, conn_rec *c) { const h2_request *req = task->request; conn_state_t *cs = c->cs; request_rec *r; ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, "h2_task(%s): create request_rec", task->id); r = h2_request_create_rec(req, c);...
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
27,132,021,409,466,054,000,000,000,000,000,000,000
61
* 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...
inline HuffmanDecoder::code_t HuffmanDecoder::NormalizeCode(HuffmanDecoder::code_t code, unsigned int codeBits) { return code << (MAX_CODE_BITS - codeBits); }
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
35,309,572,293,888,260,000,000,000,000,000,000,000
4
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
bool vrend_hw_switch_context(struct vrend_context *ctx, bool now) { if (!ctx) return false; if (ctx == vrend_state.current_ctx && ctx->ctx_switch_pending == false) return true; if (ctx->ctx_id != 0 && ctx->in_error) { return false; } ctx->ctx_switch_pending = true; if (now == true...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
74,165,223,016,306,320,000,000,000,000,000,000,000
19
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
static inline void setup_pegasus_II(pegasus_t *pegasus) { __u8 data = 0xa5; set_register(pegasus, Reg1d, 0); set_register(pegasus, Reg7b, 1); mdelay(100); if ((pegasus->features & HAS_HOME_PNA) && mii_mode) set_register(pegasus, Reg7b, 0); else set_register(pegasus, Reg7b, 2); set_register(pegasus, 0x83, d...
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
14,960,343,139,671,660,000,000,000,000,000,000,000
29
pegasus: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
void tcp_cleanup_rbuf(struct sock *sk, int copied) { struct tcp_sock *tp = tcp_sk(sk); int time_to_ack = 0; #if TCP_DEBUG struct sk_buff *skb = skb_peek(&sk->sk_receive_queue); WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq), KERN_INFO "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n", tp...
0
[ "CWE-400", "CWE-119", "CWE-703" ]
linux
baff42ab1494528907bf4d5870359e31711746ae
312,161,037,083,476,400,000,000,000,000,000,000,000
59
net: Fix oops from tcp_collapse() when using splice() tcp_read_sock() can have a eat skbs without immediately advancing copied_seq. This can cause a panic in tcp_collapse() if it is called as a result of the recv_actor dropping the socket lock. A userspace program that splices data from a socket to either another soc...
TEST(ExpressionObjectDependencies, LocalFilterVariablesShouldBeFilteredOutOfDependencies) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); expCtx->variablesParseState.defineVariable("var1"); auto filterSpec = BSON("$filter" << BSON("input" << BSON_ARRAY(1 << 2 << 3) << "as" ...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
297,096,594,958,844,400,000,000,000,000,000,000,000
16
SERVER-38070 fix infinite loop in agg expression
chpass_principal_2_svc(chpass_arg *arg, struct svc_req *rqstp) { static generic_ret ret; char *prime_arg; gss_buffer_desc client_name = GSS_C_EMPTY_BUFFER; gss_buffer_desc service_name = GSS_C_EMPTY_BUFFER; OM_uint32 ...
0
[ "CWE-119", "CWE-772", "CWE-401" ]
krb5
83ed75feba32e46f736fcce0d96a0445f29b96c2
45,564,054,536,038,390,000,000,000,000,000,000,000
61
Fix leaks in kadmin server stubs [CVE-2015-8631] In each kadmind server stub, initialize the client_name and server_name variables, and release them in the cleanup handler. Many of the stubs will otherwise leak the client and server name if krb5_unparse_name() fails. Also make sure to free the prime_arg variables in...
icmp6_opt_print(netdissect_options *ndo, const u_char *bp, int resid) { const struct nd_opt_hdr *op; const struct nd_opt_prefix_info *opp; const struct nd_opt_mtu *opm; const struct nd_opt_rdnss *oprd; const struct nd_opt_dnssl *opds; const struct nd_opt_advinterval *opa; const struct nd_opt_homeagent_info *oph;...
1
[ "CWE-125" ]
tcpdump
d7505276842e85bfd067fa21cdb32b8a2dc3c5e4
323,865,047,825,576,950,000,000,000,000,000,000,000
151
(for 4.9.3) CVE-2018-14882/ICMP6 RPL: Add a missing bounds check Moreover: Add and use *_tstr[] strings. Update four tests outputs accordingly. Fix a space. Wang Junjie of 360 ESG Codesafe Team had independently identified this vulnerability in 2018 by means of fuzzing and provided the packet capture file for the tes...
inline void Logistic(const LogisticParams& params, const RuntimeShape& input_shape, const uint8* input_data, const RuntimeShape& output_shape, uint8* output_data) { ruy::profiler::ScopeLabel label("Logistic/Uint8"); const int32 input_zero_point = params.input_zero_point; ...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
194,480,981,050,952,730,000,000,000,000,000,000,000
139
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
static void *rt_cpu_seq_next(struct seq_file *seq, void *v, loff_t *pos) { int cpu; for (cpu = *pos; cpu < nr_cpu_ids; ++cpu) { if (!cpu_possible(cpu)) continue; *pos = cpu+1; return &per_cpu(rt_cache_stat, cpu); } (*pos)++; return NULL; }
0
[ "CWE-327" ]
linux
aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba
24,129,275,789,180,244,000,000,000,000,000,000,000
14
inet: use bigger hash table for IP ID generation In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count") I used a very small hash table that could be abused by patient attackers to reveal sensitive information. Switch to a dynamic sizing, depending on RAM size. Typical big hosts will now use 128x more storage (2...
static socklen_t tousa(struct mg_addr *a, union usa *usa) { socklen_t len = sizeof(usa->sin); memset(usa, 0, sizeof(*usa)); usa->sin.sin_family = AF_INET; usa->sin.sin_port = a->port; *(uint32_t *) &usa->sin.sin_addr = a->ip; #if MG_ENABLE_IPV6 if (a->is_ip6) { usa->sin.sin_family = AF_INET6; usa->s...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
65,146,512,013,434,830,000,000,000,000,000,000,000
16
Protect against the directory traversal in mg_upload()
int incrementallyRehash(int dbid) { /* Keys dictionary */ if (dictIsRehashing(server.db[dbid].dict)) { dictRehashMilliseconds(server.db[dbid].dict,1); return 1; /* already used our millisecond for this loop... */ } /* Expires */ if (dictIsRehashing(server.db[dbid].expires)) { ...
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
288,507,056,612,877,640,000,000,000,000,000,000,000
13
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
dissect_crci_bits(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, fp_info *p_fp_info, int offset) { int n, num_tbs; proto_item *ti = NULL; proto_tree *crcis_tree = NULL; guint errors = 0; num_tbs = get_tb_count(p_fp_info); /* Add CRCIs subtree ...
0
[ "CWE-20" ]
wireshark
7d7190695ce2ff269fdffb04e87139995cde21f4
209,295,082,330,846,100,000,000,000,000,000,000,000
41
UMTS_FP: fix handling reserved C/T value The spec puts the reserved value at 0xf but our internal table has 'unknown' at 0; since all the other values seem to be offset-by-one, just take the modulus 0xf to avoid running off the end of the table. Bug: 12191 Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0 Reviewed...
mailimf_name_val_list_parse(const char * message, size_t length, size_t * indx, struct mailimf_name_val_list ** result) { size_t cur_token; struct mailimf_name_val_pair * pair; struct mailimf_name_val_list * name_val_list; clist* list; int res; int r; cur_token = * indx; list = NULL; r...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
54,639,474,880,988,210,000,000,000,000,000,000,000
84
Fixed crash #274
static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) { struct net *net = sock_net(skb->sk); rtnl_doit_func doit; int kind; int family; int type; int err; type = nlh->nlmsg_type; if (type > RTM_MAX) return -EOPNOTSUPP; type -= RTM_BASE; /* All the messages must have at least 1 byte leng...
0
[ "CWE-200" ]
net
5f8e44741f9f216e33736ea4ec65ca9ac03036e6
308,463,434,762,635,900,000,000,000,000,000,000,000
57
net: fix infoleak in rtnetlink The stack object “map” has a total size of 32 bytes. Its last 4 bytes are padding generated by compiler. These padding bytes are not initialized and sent out via “nla_put”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
static double mp_image_stats(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; unsigned int ind = (unsigned int)mp.opcode[2]; if (ind==~0U) CImg<doubleT>(ptrd,14,1,1,1,true) = mp.imgout.get_stats(); else { ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listin.wi...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
1,819,355,137,331,415,000,000,000,000,000,000,000
10
Fix other issues in 'CImg<T>::load_bmp()'.
static void rt_set_nexthop(struct rtable *rt, __be32 daddr, const struct fib_result *res, struct fib_nh_exception *fnhe, struct fib_info *fi, u16 type, u32 itag, const bool do_cache) { bool cached = false; if (fi) { struct fib_nh *nh = &FIB_RES_NH(*res); if (nh->nh_gw && nh->nh_scope == ...
0
[ "CWE-476" ]
linux
bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205
212,677,130,652,690,140,000,000,000,000,000,000,000
48
net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set Syzkaller hit 'general protection fault in fib_dump_info' bug on commit 4.13-rc5.. Guilty file: net/ipv4/fib_semantics.c kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked...
pdf14_begin_transparency_mask(gx_device *dev, const gx_transparency_mask_params_t *ptmp, const gs_rect *pbbox, gs_gstate *pgs, gs_memory_t *mem) { pdf14_device *pdev = (pdf14_device *)dev; byte bg_alpha = 0; /* By defaul...
0
[]
ghostpdl
c432131c3fdb2143e148e8ba88555f7f7a63b25e
183,809,649,417,553,970,000,000,000,000,000,000,000
86
Bug 699661: Avoid sharing pointers between pdf14 compositors If a copdevice is triggered when the pdf14 compositor is the device, we make a copy of the device, then throw an error because, by default we're only allowed to copy the device prototype - then freeing it calls the finalize, which frees several pointers shar...
disconnect_pcsc_card (int slot) { long err; assert (slot >= 0 && slot < MAX_READER); if (!reader_table[slot].pcsc.card) return 0; err = pcsc_disconnect (reader_table[slot].pcsc.card, PCSC_LEAVE_CARD); if (err) { log_error ("pcsc_disconnect failed: %s (0x%lx)\n", pcsc_error_st...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
38,896,449,421,412,336,000,000,000,000,000,000,000
19
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static int io_grab_files(struct io_kiocb *req) { int ret = -EBADF; struct io_ring_ctx *ctx = req->ctx; io_req_init_async(req); if (req->work.files || (req->flags & REQ_F_NO_FILE_TABLE)) return 0; if (!ctx->ring_file) return -EBADF; rcu_read_lock(); spin_lock_irq(&ctx->inflight_lock); /* * We use the f_...
1
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
220,410,895,373,288,000,000,000,000,000,000,000,000
31
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
int blk_update_nr_requests(struct request_queue *q, unsigned int nr) { struct request_list *rl; int on_thresh, off_thresh; WARN_ON_ONCE(q->mq_ops); spin_lock_irq(q->queue_lock); q->nr_requests = nr; blk_queue_congestion_threshold(q); on_thresh = queue_congestion_on_threshold(q); off_thresh = queue_congestion_...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
83,415,472,037,935,160,000,000,000,000,000,000,000
42
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
void __init early_alloc_pgt_buf(void) { unsigned long tables = INIT_PGT_BUF_SIZE; phys_addr_t base; base = __pa(extend_brk(tables, PAGE_SIZE)); pgt_buf_start = base >> PAGE_SHIFT; pgt_buf_end = pgt_buf_start; pgt_buf_top = pgt_buf_start + (tables >> PAGE_SHIFT); }
0
[ "CWE-200", "CWE-732" ]
linux
a4866aa812518ed1a37d8ea0c881dc946409de94
336,166,866,740,409,250,000,000,000,000,000,000,000
11
mm: Tighten x86 /dev/mem with zeroing reads Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is disallowed. However, on x86, the first 1MB was always allowed for BIOS and similar things, regardless of it actually being System RAM. It was possible for heap to end up getting allocated in low 1MB RAM, and ...
void DocumentSourceGraphLookUp::performSearch() { // Make sure _input is set before calling performSearch(). invariant(_input); Value startingValue = _startWith->evaluate(*_input, &pExpCtx->variables); // If _startWith evaluates to an array, treat each value as a separate starting point. if (start...
0
[ "CWE-416" ]
mongo
d6133a3a5464fac202f512b0310dfeb200c126f9
82,530,253,417,587,250,000,000,000,000,000,000,000
19
SERVER-43350 $lookup with no local default or user-specified collation should explicitly set the simple collation on the foreign expression context
pipe_command(cupsd_client_t *con, /* I - Client connection */ int infile, /* I - Standard input for command */ int *outfile, /* O - Standard output for command */ char *command, /* I - Command to run */ char *options, /* I - Options for com...
0
[ "CWE-290" ]
cups
afa80cb2b457bf8d64f775bed307588610476c41
121,518,686,506,820,170,000,000,000,000,000,000,000
386
Don't treat "localhost.localdomain" as an allowed replacement for localhost, since it isn't.
static int bin_header(RCore *r, int mode) { RBinFile *cur = r_bin_cur (r->bin); RBinPlugin *plg = r_bin_file_cur_plugin (cur); if (plg && plg->header) { plg->header (cur); return true; } return false; }
0
[ "CWE-78" ]
radare2
5411543a310a470b1257fb93273cdd6e8dfcb3af
97,730,142,851,104,060,000,000,000,000,000,000,000
9
More fixes for the CVE-2019-14745
MagickExport int XError(Display *display,XErrorEvent *error) { (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(display != (Display *) NULL); assert(error != (XErrorEvent *) NULL); (void) display; xerror_alert=MagickTrue; switch (error->request_code) { case X_GetGeometry: { ...
0
[ "CWE-401" ]
ImageMagick6
13801f5d0bd7a6fdb119682d34946636afdb2629
251,591,489,885,599,120,000,000,000,000,000,000,000
31
https://github.com/ImageMagick/ImageMagick/issues/1531
static int shmem_match(struct inode *ino, void *vfh) { __u32 *fh = vfh; __u64 inum = fh[2]; inum = (inum << 32) | fh[1]; return ino->i_ino == inum && fh[0] == ino->i_generation; }
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
256,749,370,421,204,330,000,000,000,000,000,000,000
7
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
__be32 nfsd_readv(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, loff_t offset, struct kvec *vec, int vlen, unsigned long *count, u32 *eof) { struct iov_iter iter; loff_t ppos = offset; ssize_t host_err; trace_nfsd_read_vector(rqstp, fhp, offset, *count); iov_iter_kvec(&iter, READ, vec...
0
[ "CWE-732" ]
linux
22cf8419f1319ff87ec759d0ebdff4cbafaee832
159,457,388,403,616,670,000,000,000,000,000,000,000
14
nfsd: apply umask on fs without ACL support The server is failing to apply the umask when creating new objects on filesystems without ACL support. To reproduce this, you need to use NFSv4.2 and a client and server recent enough to support umask, and you need to export a filesystem that lacks ACL support (for example,...
static UINT cliprdr_server_init(CliprdrServerContext* context) { UINT32 generalFlags; CLIPRDR_GENERAL_CAPABILITY_SET generalCapabilitySet; UINT error; CLIPRDR_MONITOR_READY monitorReady = { 0 }; CLIPRDR_CAPABILITIES capabilities = { 0 }; generalFlags = 0; monitorReady.msgType = CB_MONITOR_READY; capabilities.m...
0
[]
FreeRDP
8e1a1b407565eb0a48923c796f5b1f69167b3c48
91,480,575,753,991,980,000,000,000,000,000,000,000
48
Fixed cliprdr_server_receive_capabilities Thanks to hac425 CVE-2020-11017, CVE-2020-11018
static int ext4_fill_super(struct super_block *sb, void *data, int silent) { struct dax_device *dax_dev = fs_dax_get_by_bdev(sb->s_bdev); char *orig_data = kstrdup(data, GFP_KERNEL); struct buffer_head *bh; struct ext4_super_block *es = NULL; struct ext4_sb_info *sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); ext4_fsbl...
1
[ "CWE-787" ]
linux
c37e9e013469521d9adb932d17a1795c139b36db
277,540,375,241,577,070,000,000,000,000,000,000,000
1,031
ext4: add more inode number paranoia checks If there is a directory entry pointing to a system inode (such as a journal inode), complain and declare the file system to be corrupted. Also, if the superblock's first inode number field is too small, refuse to mount the file system. This addresses CVE-2018-10882. https...
xsltFreePrincipalStylesheetData(xsltPrincipalStylesheetDataPtr data) { if (data == NULL) return; if (data->inScopeNamespaces != NULL) { int i; xsltNsListContainerPtr nsi; xsltPointerListPtr list = (xsltPointerListPtr) data->inScopeNamespaces; for (i = 0; i < list->number; i++) { /* * REVIS...
0
[]
libxslt
e03553605b45c88f0b4b2980adfbbb8f6fca2fd6
91,217,196,223,871,730,000,000,000,000,000,000,000
56
Fix security framework bypass xsltCheckRead and xsltCheckWrite return -1 in case of error but callers don't check for this condition and allow access. With a specially crafted URL, xsltCheckRead could be tricked into returning an error because of a supposedly invalid URL that would still be loaded succesfully later on...
static int __init efisubsys_init(void) { int error; if (!efi_enabled(EFI_BOOT)) return 0; /* * Since we process only one efi_runtime_service() at a time, an * ordered workqueue (which creates only one execution context) * should suffice all our needs. */ efi_rts_wq = alloc_ordered_workqueue("efi_rts_wq"...
0
[]
linux
1957a85b0032a81e6482ca4aab883643b8dae06e
336,619,661,384,988,140,000,000,000,000,000,000,000
61
efi: Restrict efivar_ssdt_load when the kernel is locked down efivar_ssdt_load allows the kernel to import arbitrary ACPI code from an EFI variable, which gives arbitrary code execution in ring 0. Prevent that when the kernel is locked down. Signed-off-by: Matthew Garrett <mjg59@google.com> Acked-by: Ard Biesheuvel <...
static int __init setup_slub_debug(char *str) { slub_debug = DEBUG_DEFAULT_FLAGS; if (*str++ != '=' || !*str) /* * No options specified. Switch on full debugging. */ goto out; if (*str == ',') /* * No options but restriction on slabs. This means full * debugging for slabs matching a pattern. */...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
292,897,188,547,003,840,000,000,000,000,000,000,000
55
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
TORRENT_TEST(unepected_eof2) { char b[] = "l2:..0"; // expected terminating 'e' instead of '0' bdecode_node e; error_code ec; int pos; int ret = bdecode(b, b + sizeof(b)-1, e, ec, &pos); TEST_EQUAL(ret, -1); TEST_EQUAL(pos, 6); TEST_EQUAL(ec, error_code(bdecode_errors::expected_colon)); printf("%s\n", print_e...
1
[ "CWE-125" ]
libtorrent
ec30a5e9ec703afb8abefba757c6d401303b53db
154,048,296,642,540,560,000,000,000,000,000,000,000
13
fix out-of-bounds read in bdecode Fixes #2099
static NTSTATUS smb_set_file_full_ea_info(connection_struct *conn, const char *pdata, int total_data, files_struct *fsp) { struct ea_list *ea_list = NULL; NTSTATUS status; if (fsp == NULL) { return NT_STATUS_INVALID_HANDLE; } if (!lp_ea_support(SNUM(conn))) { DEBUG(10, ("smb_set_file_full_ea_info...
0
[ "CWE-787" ]
samba
22b4091924977f6437b59627f33a8e6f02b41011
325,251,605,568,889,140,000,000,000,000,000,000,000
42
CVE-2021-44142: smbd: add Netatalk xattr used by vfs_fruit to the list of private Samba xattrs This is an internal xattr that should not be user visible. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static int do_pcm_suspend(struct device *dev) { struct snd_pcm_str *pstr = container_of(dev, struct snd_pcm_str, dev); if (!pstr->pcm->no_device_suspend) snd_pcm_suspend_all(pstr->pcm); return 0; }
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
248,640,916,589,679,150,000,000,000,000,000,000,000
8
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
void swap_struct(unsigned int types_nr[], void *ps, int is64bit) { int i; uint64_t *x; uint32_t *y; x = (uint64_t *) ps; /* For each field of type long long (or double) */ for (i = 0; i < types_nr[0]; i++) { *x = __builtin_bswap64(*x); x = (uint64_t *) ((char *) x + ULL_ALIGNMENT_WIDTH); } y = (uint32_t *...
0
[ "CWE-125" ]
sysstat
fbc691eaaa10d0bcea6741d5a223dc3906106548
29,301,162,655,639,047,000,000,000,000,000,000,000
35
Fix #196 and #199: Out of bound reads security issues Check args before calling memmove() and memset() in remap_struct() function to avoid out of bound reads which would possibly lead to unknown code execution and/or sadf command crash. Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
f_sign_jump(typval_T *argvars, typval_T *rettv) { int sign_id; char_u *sign_group = NULL; buf_T *buf; int notanum = FALSE; rettv->vval.v_number = -1; // Sign identifer sign_id = (int)tv_get_number_chk(&argvars[0], &notanum); if (notanum) return; if (sign_id <= 0) { emsg(_(e...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
283,204,182,461,901,000,000,000,000,000,000,000,000
42
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
GF_Err nhmldump_config_side_stream(GF_Filter *filter, GF_NHMLDumpCtx *ctx) { char *mime=NULL, *name; char fileName[GF_MAX_PATH+1]; const GF_PropertyValue *p; GF_FileIO *gfio = NULL; if (ctx->name) { strncpy(fileName, ctx->name, GF_MAX_PATH); fileName[GF_MAX_PATH] = 0; } else { char *url = gf_filter_pid_get...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
20,027,325,269,483,870,000,000,000,000,000,000,000
113
fixed #2138
static void PushRunlengthPacket(Image *image,const unsigned char *pixels, size_t *length,PixelInfo *pixel,ExceptionInfo *exception) { const unsigned char *p; p=pixels; if (image->storage_class == PseudoClass) { pixel->index=0; switch (image->depth) { case 32: { ...
0
[ "CWE-617" ]
ImageMagick
5d95b4c24a964114e2b1ae85c2b36769251ed11d
142,926,892,366,048,400,000,000,000,000,000,000,000
176
https://github.com/ImageMagick/ImageMagick/issues/500
static int utab_lock(struct libmnt_update *upd) { char *lfile; int rc; sigset_t sigs; assert(upd); assert(upd->filename); assert(upd->userspace_only); if (asprintf(&lfile, "%s.lock", upd->filename) == -1) return -1; DBG(UPDATE, mnt_debug("%s: locking", lfile)); sigemptyset(&upd->oldsigmask); sigfillset(...
0
[ "CWE-399" ]
util-linux
28594c9d4fc8a4108408c5749b62933b967ba23b
149,373,274,376,837,070,000,000,000,000,000,000,000
43
libmount: block signals when update utab Signed-off-by: Karel Zak <kzak@redhat.com>