func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void hclge_pfc_info_init(struct hclge_dev *hdev) { if (!(hdev->flag & HCLGE_FLAG_DCB_ENABLE)) { if (hdev->fc_mode_last_time == HCLGE_FC_PFC) dev_warn(&hdev->pdev->dev, "DCB is disable, but last mode is FC_PFC\n"); hdev->tm_info.fc_mode = hdev->fc_mode_last_time; } else if (hdev->tm_info.fc_mode !=...
0
[ "CWE-125" ]
linux
04f25edb48c441fc278ecc154c270f16966cbb90
57,359,257,663,279,010,000,000,000,000,000,000,000
17
net: hns3: add some error checking in hclge_tm module When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg with vport->vport_id as pri_id, which is used as index for hdev->tm_info.tc_info, it will cause out of bound access issue if vport_id is e...
Variant f_simplexml_load_string(const String& data, const String& class_name /* = "SimpleXMLElement" */, int64_t options /* = 0 */, const String& ns /* = "" */, bool is_prefix /* = false */) {...
0
[ "CWE-94" ]
hhvm
95f96e7287effe2fcdfb9a5338d1a7e4f55b083b
203,499,578,003,631,800,000,000,000,000,000,000,000
34
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...
void IOBuf::markExternallyShared() { IOBuf* current = this; do { current->markExternallySharedOne(); current = current->next_; } while (current != this); }
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
163,010,686,497,338,350,000,000,000,000,000,000,000
7
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
xfs_inode_buf_read_verify( struct xfs_buf *bp) { xfs_inode_buf_verify(bp, false); }
0
[]
linux
b42db0860e13067fcc7cbfba3966c9e652668bbc
201,538,810,638,330,900,000,000,000,000,000,000,000
5
xfs: enhance dinode verifier Add several more validations to xfs_dinode_verify: - For LOCAL data fork formats, di_nextents must be 0. - For LOCAL attr fork formats, di_anextents must be 0. - For inodes with no attr fork offset, - format must be XFS_DINODE_FMT_EXTENTS if set at all - di_anextents must be 0. Thank...
static void scrub_free_csums(struct scrub_ctx *sctx) { while (!list_empty(&sctx->csum_list)) { struct btrfs_ordered_sum *sum; sum = list_first_entry(&sctx->csum_list, struct btrfs_ordered_sum, list); list_del(&sum->list); kfree(sum); } }
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
122,700,574,259,766,500,000,000,000,000,000,000,000
10
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
bool Item_cache_time::cache_value() { if (!example) return false; value_cached= true; value= example->val_time_packed_result(); null_value_inside= null_value= example->null_value; return true; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
222,614,647,496,225,300,000,000,000,000,000,000,000
9
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_colorspace_check_XYZ(png_xy *xy, png_XYZ *XYZ) { int result; png_XYZ XYZtemp; result = png_XYZ_normalize(XYZ); if (result != 0) return result; result = png_xy_from_XYZ(xy, XYZ); if (result != 0) return result; XYZtemp = *XYZ; return png_colorspace_check_xy(&XYZtemp, xy); }
0
[ "CWE-476" ]
libpng
812768d7a9c973452222d454634496b25ed415eb
19,293,365,918,269,926,000,000,000,000,000,000,000
16
[libpng16] Fixed a potential null pointer dereference in png_set_text_2() (bug report and patch by Patrick Keshishian).
void set_quadoption (int opt, int flag) { int n = opt/4; int b = (opt % 4) * 2; QuadOptions[n] &= ~(0x3 << b); QuadOptions[n] |= (flag & 0x3) << b; }
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
198,624,243,501,295,730,000,000,000,000,000,000,000
8
use a 64-bit random value in temporary filenames. closes #3158
static void *netlink_seq_next(struct seq_file *seq, void *v, loff_t *pos) { ++*pos; return __netlink_seq_next(seq); }
0
[ "CWE-362", "CWE-415" ]
linux
92964c79b357efd980812c4de5c1fd2ec8bb5520
216,255,506,797,240,600,000,000,000,000,000,000,000
5
netlink: Fix dump skb leak/double free When we free cb->skb after a dump, we do it after releasing the lock. This means that a new dump could have started in the time being and we'll end up freeing their skb instead of ours. This patch saves the skb and module before we unlock so we free the right memory. Fixes: 16...
static js_Object *jsR_tofunction(js_State *J, int idx) { js_Value *v = stackidx(J, idx); if (v->type == JS_TUNDEFINED || v->type == JS_TNULL) return NULL; if (v->type == JS_TOBJECT) if (v->u.object->type == JS_CFUNCTION || v->u.object->type == JS_CCFUNCTION) return v->u.object; js_typeerror(J, "not a functio...
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
295,562,257,516,628,400,000,000,000,000,000,000,000
10
Fix 697401: Error when dropping extra arguments to lightweight functions.
struct inode *ilookup(struct super_block *sb, unsigned long ino) { struct hlist_head *head = inode_hashtable + hash(sb, ino); struct inode *inode; spin_lock(&inode_hash_lock); inode = find_inode_fast(sb, head, ino); spin_unlock(&inode_hash_lock); if (inode) wait_on_inode(inode); return inode; }
0
[ "CWE-284", "CWE-264" ]
linux
23adbe12ef7d3d4195e80800ab36b37bee28cd03
202,147,588,811,981,330,000,000,000,000,000,000,000
13
fs,userns: Change inode_capable to capable_wrt_inode_uidgid The kernel has no concept of capabilities with respect to inodes; inodes exist independently of namespaces. For example, inode_capable(inode, CAP_LINUX_IMMUTABLE) would be nonsense. This patch changes inode_capable to check for uid and gid mappings and rena...
backspace_until_column(int col) { while ((int)curwin->w_cursor.col > col) { curwin->w_cursor.col--; if (State & REPLACE_FLAG) replace_do_bs(col); else if (!del_char_after_col(col)) break; } }
0
[]
vim
98a336dd497d3422e7efeef9f24cc9e25aeb8a49
69,295,427,106,708,890,000,000,000,000,000,000,000
11
patch 8.2.0133: invalid memory access with search command Problem: Invalid memory access with search command. Solution: When :normal runs out of characters in bracketed paste mode break out of the loop.(closes #5511)
static struct ipq *ip_find(struct net *net, struct iphdr *iph, u32 user, int vif) { struct frag_v4_compare_key key = { .saddr = iph->saddr, .daddr = iph->daddr, .user = user, .vif = vif, .id = iph->id, .protocol = iph->protocol, }; struct inet_frag_queue *q; q = inet_frag_find(&net->ipv4.frags, &...
0
[ "CWE-20" ]
linux
5d407b071dc369c26a38398326ee2be53651cfe4
237,583,020,406,433,330,000,000,000,000,000,000,000
19
ip: frags: fix crash in ip_do_fragment() A kernel crash occurrs when defragmented packet is fragmented in ip_do_fragment(). In defragment routine, skb_orphan() is called and skb->ip_defrag_offset is set. but skb->sk and skb->ip_defrag_offset are same union member. so that frag->sk is not NULL. Hence crash occurrs in s...
TEST_F(QueryPlannerTest, CompoundIndexBoundsDottedNotEqualsNull) { addIndex(BSON("a.b" << 1 << "c.d" << 1)); runQuery(fromjson("{'a.b': {$gt: 'foo'}, 'c.d': {$ne: null}}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{fetch: {filter: null, node...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
333,339,174,339,465,050,000,000,000,000,000,000,000
11
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static int propagate_liveness_reg(struct bpf_verifier_env *env, struct bpf_reg_state *reg, struct bpf_reg_state *parent_reg) { u8 parent_flag = parent_reg->live & REG_LIVE_READ; u8 flag = reg->live & REG_LIVE_READ; int err; /* When comes here, read flags of PARENT_REG or REG could be any of * REG_LIV...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
101,808,686,830,205,800,000,000,000,000,000,000,000
25
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
static int sisusb_set_rank(struct sisusb_usb_data *sisusb, int *iret, int index, u8 rankno, u8 chab, const u8 dramtype[][5], int bw) { int ret = 0, ranksize; u8 tmp; *iret = 0; if ((rankno == 2) && (dramtype[index][0] == 2)) return ret; ranksize = dramtype[index][3] / 2 * bw / 32; if ((ranksize * rankno) ...
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
191,468,426,393,505,180,000,000,000,000,000,000,000
31
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
static struct nfsd4_copy *nfsd4_get_copy(struct nfs4_client *clp) { struct nfsd4_copy *copy = NULL; spin_lock(&clp->async_lock); if (!list_empty(&clp->async_copies)) { copy = list_first_entry(&clp->async_copies, struct nfsd4_copy, copies); refcount_inc(&copy->refcount); } spin_unlock(&clp->async_lock); ...
0
[ "CWE-476" ]
linux
01310bb7c9c98752cc763b36532fab028e0f8f81
198,730,111,564,036,000,000,000,000,000,000,000,000
13
nfsd: COPY and CLONE operations require the saved filehandle to be set Make sure we have a saved filehandle, otherwise we'll oops with a null pointer dereference in nfs4_preprocess_stateid_op(). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat....
static void drop_futex_key_refs(union futex_key *key) { if (!key->both.ptr) { /* If we're here then we tried to put a key we failed to get */ WARN_ON_ONCE(1); return; } if (!IS_ENABLED(CONFIG_MMU)) return; switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) { case FUT_OFF_INODE: break; case F...
0
[ "CWE-416" ]
tip
8019ad13ef7f64be44d4f892af9c840179009254
269,294,172,973,382,130,000,000,000,000,000,000,000
19
futex: Fix inode life-time issue As reported by Jann, ihold() does not in fact guarantee inode persistence. And instead of making it so, replace the usage of inode pointers with a per boot, machine wide, unique inode identifier. This sequence number is global, but shared (file backed) futexes are rare enough that thi...
int FLTGetGeosOperator(char *pszValue) { if (!pszValue) return -1; if (strcasecmp(pszValue, "Equals") == 0) return MS_GEOS_EQUALS; else if (strcasecmp(pszValue, "Intersect") == 0 || strcasecmp(pszValue, "Intersects") == 0) return MS_GEOS_INTERSECTS; else if (strcasecmp(pszValue, "Disjoin...
0
[ "CWE-200", "CWE-119" ]
mapserver
e52a436c0e1c5e9f7ef13428dba83194a800f4df
150,804,328,682,729,220,000,000,000,000,000,000,000
29
security fix (patch by EvenR)
SelectFin(buf, len, data) char *buf; int len; char *data; /* dummy */ { int n; if (!len || !display) return; if (len == 1 && *buf == '-') { SetForeWindow((struct win *)0); Activate(0); return; } if ((n = WindowByNoN(buf)) < 0) return; SwitchWindow(n); }
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
298,182,477,190,764,100,000,000,000,000,000,000,000
19
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
static ut64 get_import_addr(ELFOBJ *bin, int sym) { Elf_(Rel) *rel = NULL; Elf_(Rela) *rela = NULL; ut8 rl[sizeof (Elf_(Rel))] = {0}; ut8 rla[sizeof (Elf_(Rela))] = {0}; RBinElfSection *rel_sec = NULL; Elf_(Addr) plt_sym_addr = -1; ut64 got_addr, got_offset; ut64 plt_addr; int j, k, tsize, len, nrel; bool is_...
0
[ "CWE-125" ]
radare2
c6d0076c924891ad9948a62d89d0bcdaf965f0cd
271,546,244,005,384,850,000,000,000,000,000,000,000
285
Fix #8731 - Crash in ELF parser with negative 32bit number
static void nfs4_open_confirm_release(void *calldata) { struct nfs4_opendata *data = calldata; struct nfs4_state *state = NULL; /* If this request hasn't been cancelled, do nothing */ if (!data->cancelled) goto out_free; /* In case of error, no cleanup! */ if (!data->rpc_done) goto out_free; state = nfs4_op...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
135,419,894,292,617,760,000,000,000,000,000,000,000
17
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
void ciEnv::record_out_of_memory_failure() { // If memory is low, we stop compiling methods. record_method_not_compilable("out of memory"); }
0
[]
jdk17u
8be0fc09f0ba2dd1dbfd6627456fa929d5574b04
240,984,473,202,244,570,000,000,000,000,000,000,000
4
8281859: Improve class compilation Reviewed-by: mbaesken Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
int tipc_udp_nl_bearer_add(struct tipc_bearer *b, struct nlattr *attr) { int err; struct udp_media_addr addr = {0}; struct nlattr *opts[TIPC_NLA_UDP_MAX + 1]; struct udp_media_addr *dst; if (nla_parse_nested_deprecated(opts, TIPC_NLA_UDP_MAX, attr, tipc_nl_udp_policy, NULL)) return -EINVAL; if (!opts[TIPC_NLA...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
318,605,764,667,254,940,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 xfrm_state_fini(struct net *net) { unsigned int sz; flush_work(&net->xfrm.state_hash_work); flush_work(&xfrm_state_gc_work); xfrm_state_flush(net, IPSEC_PROTO_ANY, false, true); WARN_ON(!list_empty(&net->xfrm.state_all)); sz = (net->xfrm.state_hmask + 1) * sizeof(struct hlist_head); WARN_ON(!hlist_empty(...
1
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
325,520,317,126,978,240,000,000,000,000,000,000,000
18
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
void CLASS setSonyBodyFeatures(unsigned id) { ushort idx; static const struct { ushort scf[8]; /* scf[0] camera id scf[1] camera format scf[2] camera mount: Minolta A, Sony E, fixed, scf[3] camera type: DSLR, NEX, SLT, ILCE, ILCA, DSC scf[4] lens mount scf[5] tag 0x2010 group (0 if...
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
64,814,909,580,338,000,000,000,000,000,000,000,000
185
parse_qt: possible integer overflow
static void wait_for_proxy_id_to_expire(void *ctx) { REQUEST *request = ctx; rad_assert(request->magic == REQUEST_MAGIC); rad_assert(request->proxy != NULL); if (!fr_event_now(el, &now)) gettimeofday(&now, NULL); request->when = request->proxy_when; #ifdef WITH_COA if (((request->proxy->code == PW_COA_REQUEST)...
0
[ "CWE-399" ]
freeradius-server
ff94dd35673bba1476594299d31ce8293b8bd223
156,557,462,529,832,300,000,000,000,000,000,000,000
37
Do not delete "old" requests until they are free. If the request is in the queue for 30+ seconds, do NOT delete it. Instead, mark it as "STOP PROCESSING", and do "wait_for_child_to_die", which waits for a child thread to pick it up, and acknowledge that it's done. Once it's marked done, we can finally clean it up. T...
static inline unsigned int io_sqring_entries(struct io_ring_ctx *ctx) { struct io_rings *rings = ctx->rings; /* make sure SQ entry isn't read before tail */ return smp_load_acquire(&rings->sq.tail) - ctx->cached_sq_head; }
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
321,373,939,840,554,550,000,000,000,000,000,000,000
7
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
bgp_attr_as4_aggregator(struct bgp_attr_parser_args *args, as_t *as4_aggregator_as, struct in_addr *as4_aggregator_addr) { struct peer *const peer = args->peer; struct attr *const attr = args->attr; const bgp_size_t length = args->length; if (length != 8) { flog_err(EC_BGP_ATTR_LEN, "New Aggregator length ...
0
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
289,980,669,642,383,870,000,000,000,000,000,000,000
22
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
bgp_find_af_caps(struct bgp_caps *caps, u32 afi) { struct bgp_af_caps *ac; WALK_AF_CAPS(caps, ac) if (ac->afi == afi) return ac; return NULL; }
0
[ "CWE-787" ]
bird
8388f5a7e14108a1458fea35bfbb5a453e2c563c
317,165,361,591,554,230,000,000,000,000,000,000,000
10
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
static int ethtool_nway_reset(struct net_device *dev) { if (!dev->ethtool_ops->nway_reset) return -EOPNOTSUPP; return dev->ethtool_ops->nway_reset(dev); }
0
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
222,105,839,110,469,400,000,000,000,000,000,000,000
7
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
xfs_inode_free( struct xfs_inode *ip) { ASSERT(!xfs_isiflocked(ip)); /* * Because we use RCU freeing we need to ensure the inode always * appears to be reclaimed with an invalid inode number when in the * free state. The ip->i_flags_lock provides the barrier against lookup * races. */ spin_lock(&ip->i_fl...
0
[ "CWE-476" ]
linux
afca6c5b2595fc44383919fba740c194b0b76aff
316,260,065,230,578,340,000,000,000,000,000,000,000
18
xfs: validate cached inodes are free when allocated A recent fuzzed filesystem image cached random dcache corruption when the reproducer was run. This often showed up as panics in lookup_slow() on a null inode->i_ops pointer when doing pathwalks. BUG: unable to handle kernel NULL pointer dereference at 00000000000000...
static inline int qeth_alloc_cq(struct qeth_card *card) { int rc; if (card->options.cq == QETH_CQ_ENABLED) { int i; struct qdio_outbuf_state *outbuf_states; QETH_DBF_TEXT(SETUP, 2, "cqon"); card->qdio.c_q = kzalloc(sizeof(struct qeth_qdio_q), GFP_KERNEL); if (!card->qdio.c_q) { rc = -1; goto k...
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
303,973,866,336,984,960,000,000,000,000,000,000,000
53
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
int caca_set_dither_algorithm(caca_dither_t *d, char const *str) { if(!strcasecmp(str, "none")) { d->algo_name = "none"; d->init_dither = init_no_dither; d->get_dither = get_no_dither; d->increment_dither = increment_no_dither; } else if(!strcasecmp(str, "ordered2")) ...
0
[ "CWE-369" ]
libcaca
84bd155087b93ab2d8d7cb5b1ac94ecd4cf4f93c
236,708,982,719,153,800,000,000,000,000,000,000,000
52
dither: fix integer overflows that were causing a division by zero. Fixes: #36 (CVE-2018-20544)
dns_message_findtype(dns_name_t *name, dns_rdatatype_t type, dns_rdatatype_t covers, dns_rdataset_t **rdataset) { dns_rdataset_t *curr; REQUIRE(name != NULL); REQUIRE(rdataset == NULL || *rdataset == NULL); for (curr = ISC_LIST_TAIL(name->list); curr != NULL; curr = ISC_LIST_PREV(curr, link)) {...
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
78,269,474,703,835,690,000,000,000,000,000,000,000
20
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
my_bool STDCALL mysql_ssl_set(MYSQL *mysql __attribute__((unused)) , const char *key __attribute__((unused)), const char *cert __attribute__((unused)), const char *ca __attribute__((unused)), const char *capath __attribute__((unused)), const char *cipher __attribute__((unused))) { D...
0
[ "CWE-254" ]
mysql-server
13380bf81f6bc20d39549f531f9acebdfb5a8c37
327,929,299,510,546,230,000,000,000,000,000,000,000
17
Bug #22295186: CERTIFICATE VALIDATION BUG IN MYSQL MAY ALLOW MITM
get_seckey (PKT_public_key *pk, u32 *keyid) { gpg_error_t err; struct getkey_ctx_s ctx; kbnode_t keyblock = NULL; memset (&ctx, 0, sizeof ctx); ctx.exact = 1; /* Use the key ID exactly as given. */ ctx.not_allocated = 1; ctx.kr_handle = keydb_new (); ctx.nitems = 1; ctx.items[0].mode = KEYDB_SEARCH_...
0
[ "CWE-310" ]
gnupg
4bde12206c5bf199dc6e12a74af8da4558ba41bf
7,705,898,445,029,089,000,000,000,000,000,000,000
29
gpg: Distinguish between missing and cleared key flags. * include/cipher.h (PUBKEY_USAGE_NONE): New. * g10/getkey.c (parse_key_usage): Set new flag. -- We do not want to use the default capabilities (derived from the algorithm) if any key flags are given in a signature. Thus if key flags are used in any way, the def...
HEnvironment::HEnvironment(HEnvironment* outer, Handle<JSFunction> closure, FrameType frame_type, int arguments, Zone* zone) : closure_(closure), values_(arguments, zone), assigned_variables_(0, z...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
192,156,184,548,056,640,000,000,000,000,000,000,000
18
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...
int CLASS nikon_e995() { int i, histo[256]; const uchar often[] = {0x00, 0x55, 0xaa, 0xff}; memset(histo, 0, sizeof histo); fseek(ifp, -2000, SEEK_END); for (i = 0; i < 2000; i++) histo[fgetc(ifp)]++; for (i = 0; i < 4; i++) if (histo[often[i]] < 200) return 0; return 1; }
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
112,922,463,952,477,580,000,000,000,000,000,000,000
14
Secunia SA75000 advisory: several buffer overruns
static inline bool io_async_submit(struct io_ring_ctx *ctx) { return ctx->flags & IORING_SETUP_SQPOLL; }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
123,735,563,064,393,950,000,000,000,000,000,000,000
4
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...
_gnutls_version_get_minor (gnutls_protocol_t version) { int ret = -1; GNUTLS_VERSION_ALG_LOOP (ret = p->minor); return ret; }
0
[ "CWE-310" ]
gnutls
34d87a7c3f12794a3ec2305cd2fdbae152bf2a76
296,512,512,985,645,600,000,000,000,000,000,000,000
7
(_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the NULL OID value in the hash_algorithms array, which happens when the input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160. Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>.
ValueSetter::writeAppearance() { this->replaced = true; // This code does not take quadding into consideration because // doing so requires font metric information, which we don't // have in many cases. double tfh = 1.2 * tf; int dx = 1; // Write one or more lines, centered vertically, po...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
313,953,706,968,056,750,000,000,000,000,000,000,000
114
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
void nfs_fattr_init(struct nfs_fattr *fattr) { fattr->valid = 0; fattr->time_start = jiffies; fattr->gencount = nfs_inc_attr_generation_counter(); }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
173,700,269,492,675,660,000,000,000,000,000,000,000
6
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
int valuestrsize() const { return ConstDataView(value()).read<LittleEndian<int>>(); }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
127,095,886,289,648,100,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit
ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb); if (status->flag & RX_FLAG_DUP_VALIDATED) return RX_CONTINUE; /* * Drop duplicate 802.11 retransmissions * (IEEE 802.1...
0
[]
linux
588f7d39b3592a36fb7702ae3b8bdd9be4621e2f
230,495,983,873,026,340,000,000,000,000,000,000,000
36
mac80211: drop robust management frames from unknown TA When receiving a robust management frame, drop it if we don't have rx->sta since then we don't have a security association and thus couldn't possibly validate the frame. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
int32_t ZrtpPacketHello::getVersionInt() { uint8_t* vp = getVersion(); int32_t version = 0; if (isdigit(*vp) && isdigit(*vp+2)) { version = (*vp - '0') * 10; version += *(vp+2) - '0'; } return version; }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
21,210,779,064,337,947,000,000,000,000,000,000,000
10
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
TPM2B_NONCE_Marshal(TPM2B_NONCE *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPM2B_DIGEST_Marshal(source, buffer, size); return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
9,864,821,890,942,992,000,000,000,000,000,000,000
6
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
mono_gchandle_get_type (guint32 gchandle) { guint type = (gchandle & 7) - 1; return type; }
0
[ "CWE-399", "CWE-264" ]
mono
8eb1189099e02372fd45ca1c67230eccf1edddc0
93,320,923,085,982,780,000,000,000,000,000,000,000
6
Implement a reference queue API. * gc.c: A reference queue allows one to queue callbcks for when objects are collected. It allows for safe cleanup of objects that can only be done when it is effectively collected. The major difference with regular finalization is that the collector makes sure the object was col...
rsvg_title_handler_free (RsvgSaxHandler * self) { g_free (self); }
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
169,900,499,317,806,380,000,000,000,000,000,000,000
4
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
h2v1_merged_upsample_565_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf) { my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample; register int y, cred, cgreen, cblue; ...
0
[ "CWE-476" ]
libjpeg-turbo
9120a247436e84c0b4eea828cb11e8f665fcde30
306,606,421,749,937,350,000,000,000,000,000,000,000
66
Fix jpeg_skip_scanlines() segfault w/merged upsamp The additional segfault mentioned in #244 was due to the fact that the merged upsamplers use a different private structure than the non-merged upsamplers. jpeg_skip_scanlines() was assuming the latter, so when merged upsampling was enabled, jpeg_skip_scanlines() clob...
static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, char *offset_base, size_t IFDlength, size_t displacement, int section_index, int ReadNextIFD, tag_table_type tag_table) { size_t length; unsigned int tag, format, components; char *value_ptr, tagname[64], cbuf[32], *outside=NULL; size_t by...
0
[ "CWE-125" ]
php-src
0c77b4307df73217283a4aaf9313e1a33a0967ff
30,063,464,756,124,680,000,000,000,000,000,000,000
337
Fixed bug #79282
const char* InstanceKlass::nest_host_error() { if (_nest_host_index == 0) { return NULL; } else { constantPoolHandle cph(Thread::current(), constants()); return SystemDictionary::find_nest_host_error(cph, (int)_nest_host_index); } }
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
124,188,244,316,231,060,000,000,000,000,000,000,000
8
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
int ha_maria::enable_indexes(uint mode) { int error; ha_rows start_rows= file->state->records; DBUG_PRINT("info", ("ha_maria::enable_indexes mode: %d", mode)); if (maria_is_all_keys_active(file->s->state.key_map, file->s->base.keys)) { /* All indexes are enabled already. */ return 0; } if (mode =...
0
[ "CWE-400" ]
server
9e39d0ae44595dbd1570805d97c9c874778a6be8
260,657,156,004,065,900,000,000,000,000,000,000,000
96
MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields fix a debug assert to account for not opened temp tables
static int check_ca(const X509 *x) { /* keyUsage if present should allow cert signing */ if(ku_reject(x, KU_KEY_CERT_SIGN)) return 0; if(x->ex_flags & EXFLAG_BCONS) { if(x->ex_flags & EXFLAG_CA) return 1; /* If basicConstraints says not a CA then say so */ else return 0; } else { /* we support V1 roots for....
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
102,669,091,269,509,090,000,000,000,000,000,000,000
20
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
void fx_TypedArray_prototype_copyWithin(txMachine* the) { mxMutableTypedArrayDeclarations; txInteger delta = dispatch->value.typedArray.dispatch->size; txInteger target = (txInteger)fxArgToIndex(the, 0, 0, length); txInteger start = (txInteger)fxArgToIndex(the, 1, 0, length); txInteger end = (txInteger)fxArgToInde...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
241,987,074,439,129,500,000,000,000,000,000,000,000
19
XS: #896
static inline bool kvm_available_flush_tlb_with_range(void) { return kvm_x86_ops.tlb_remote_flush_with_range; }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
163,901,831,680,251,700,000,000,000,000,000,000,000
4
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
void comps_objmrtree_unite(COMPS_ObjMRTree *rt1, COMPS_ObjMRTree *rt2) { COMPS_HSList *tmplist, *tmp_subnodes; COMPS_HSListItem *it; COMPS_ObjListIt *it2; struct Pair { COMPS_HSList * subnodes; char * key; } *pair, *parent_pair; pair = malloc(sizeof(struct Pair)); pair->subn...
0
[ "CWE-416", "CWE-862" ]
libcomps
e3a5d056633677959ad924a51758876d415e7046
135,108,859,979,839,560,000,000,000,000,000,000,000
73
Fix UAF in comps_objmrtree_unite function The added field is not used at all in many places and it is probably the left-over of some copy-paste.
void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){ Vdbe *v = pParse->pVdbe; int op = 0; int regFree1 = 0; int regFree2 = 0; int r1, r2; assert( jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0 ); if( NEVER(v==0) ) return; /* Existence of VDBE checked by caller */ if( NEVER...
0
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
210,342,151,705,355,470,000,000,000,000,000,000,000
131
Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
static int macsec_change_mtu(struct net_device *dev, int new_mtu) { struct macsec_dev *macsec = macsec_priv(dev); unsigned int extra = macsec->secy.icv_len + macsec_extra_len(true); if (macsec->real_dev->mtu - extra < new_mtu) return -ERANGE; dev->mtu = new_mtu; return 0; }
0
[ "CWE-119" ]
net
5294b83086cc1c35b4efeca03644cf9d12282e5b
99,429,905,535,380,350,000,000,000,000,000,000,000
12
macsec: dynamically allocate space for sglist We call skb_cow_data, which is good anyway to ensure we can actually modify the skb as such (another error from prior). Now that we have the number of fragments required, we can safely allocate exactly that amount of memory. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80...
void Locked_tables_list::reset() { free_root(&m_locked_tables_root, MYF(0)); m_locked_tables= NULL; m_locked_tables_last= &m_locked_tables; m_reopen_array= NULL; m_locked_tables_count= 0; some_table_marked_for_reopen= 0; }
0
[]
server
0168d1eda30dad4b517659422e347175eb89e923
275,074,478,461,436,830,000,000,000,000,000,000,000
9
MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list Do not assume that subquery Item always present.
GF_Err m4ds_Size(GF_Box *s) { GF_Err e; u32 descSize = 0; GF_MPEG4ExtensionDescriptorsBox *ptr = (GF_MPEG4ExtensionDescriptorsBox *)s; e = gf_odf_desc_list_size(ptr->descriptors, &descSize); ptr->size += descSize; return e; }
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
278,709,634,937,531,600,000,000,000,000,000,000,000
9
fix some exploitable overflows (#994, #997)
static int brcmf_vif_add_validate(struct brcmf_cfg80211_info *cfg, enum nl80211_iftype new_type) { int iftype_num[NUM_NL80211_IFTYPES]; struct brcmf_cfg80211_vif *pos; memset(&iftype_num[0], 0, sizeof(iftype_num)); list_for_each_entry(pos, &cfg->vif_list, list) iftype_num[pos->wdev.iftype]++; iftype_num[...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
338,157,231,252,055,040,000,000,000,000,000,000,000
13
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
static int exec_parameters_get_cgroup_path(const ExecParameters *params, char **ret) { bool using_subcgroup; char *p; assert(params); assert(ret); if (!params->cgroup_path) return -EINVAL; /* If we are called for a unit where cgroup delegation is on, an...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
300,191,800,136,233,350,000,000,000,000,000,000,000
30
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static void findHotKeys(void) { redisReply *keys, *reply; unsigned long long counters[HOTKEYS_SAMPLE] = {0}; sds hotkeys[HOTKEYS_SAMPLE] = {NULL}; unsigned long long sampled = 0, total_keys, *freqs = NULL, it = 0; unsigned int arrsize = 0, i, k; double pct; /* Total keys pre scanning */ ...
0
[ "CWE-119", "CWE-787" ]
redis
9fdcc15962f9ff4baebe6fdd947816f43f730d50
117,718,853,143,659,230,000,000,000,000,000,000,000
91
Security: fix redis-cli buffer overflow. Thanks to Fakhri Zulkifli for reporting it. The fix switched to dynamic allocation, copying the final prompt in the static buffer only at the end.
SSL_SESSION::SSL_SESSION(RandomPool& ran) : bornOn_(0), timeout_(0), random_(ran), peerX509_(0) { memset(sessionID_, 0, ID_LEN); memset(master_secret_, 0, SECRET_LEN); memset(suite_, 0, SUITE_LEN); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
209,527,947,421,862,440,000,000,000,000,000,000,000
7
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
modifiers2keycode(int modifiers, int *key, char_u *string) { int new_slen = 0; if (modifiers != 0) { // Some keys have the modifier included. Need to handle that here to // make mappings work. This may result in a special key, such as // K_S_TAB. *key = simplify_key(*key, &modifiers); if (modifiers ...
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
158,373,016,208,856,920,000,000,000,000,000,000,000
19
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
hfs_drive_compressor(struct archive_write_disk *a, const char *buff, size_t size) { unsigned char *buffer_compressed; size_t bytes_compressed; size_t bytes_used; int ret; ret = hfs_reset_compressor(a); if (ret != ARCHIVE_OK) return (ret); if (a->compressed_buffer == NULL) { size_t block_size; block_...
0
[ "CWE-59", "CWE-269" ]
libarchive
b41daecb5ccb4c8e3b2c53fd6147109fc12c3043
116,899,740,425,306,000,000,000,000,000,000,000,000
149
Do not follow symlinks when processing the fixup list Use lchmod() instead of chmod() and tell the remaining functions that the real file to be modified is a symbolic link. Fixes #1566
static int _mac_ctx_init(gnutls_mac_algorithm_t algo, struct nettle_mac_ctx *ctx) { /* Any FIPS140-2 related enforcement is performed on * gnutls_hash_init() and gnutls_hmac_init() */ ctx->set_nonce = NULL; switch (algo) { case GNUTLS_MAC_MD5: ctx->update = (update_func) hmac_md5_update; ctx->digest = (d...
0
[ "CWE-476" ]
gnutls
3db352734472d851318944db13be73da61300568
212,894,067,948,133,920,000,000,000,000,000,000,000
158
wrap_nettle_hash_fast: avoid calling _update with zero-length input As Nettle's hash update functions internally call memcpy, providing zero-length input may cause undefined behavior. Signed-off-by: Daiki Ueno <ueno@gnu.org>
static int decode_attr_space_used(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *used) { __be32 *p; *used = 0; if (unlikely(bitmap[1] & (FATTR4_WORD1_SPACE_USED - 1U))) return -EIO; if (likely(bitmap[1] & FATTR4_WORD1_SPACE_USED)) { READ_BUF(8); READ64(*used); bitmap[1] &= ~FATTR4_WORD1_SPACE_USED; }...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
158,957,573,586,535,030,000,000,000,000,000,000,000
16
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
lou_getTypeformForEmphClass(const char *tableList, const char *emphClass) { const TranslationTableHeader *table = _lou_getTranslationTable(tableList); if (!table) return 0; for (int i = 0; i < MAX_EMPH_CLASSES && table->emphClassNames[i]; i++) if (strcmp(emphClass, table->emphClassNames[i]) == 0) return italic << ...
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
168,235,037,944,977,560,000,000,000,000,000,000,000
7
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
my_decimal *val_decimal(my_decimal *to) { return has_value() ? Time(this).to_decimal(to) : NULL; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
170,050,610,427,158,960,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
int fit_image_hash_get_value(const void *fit, int noffset, uint8_t **value, int *value_len) { int len; *value = (uint8_t *)fdt_getprop(fit, noffset, FIT_VALUE_PROP, &len); if (*value == NULL) { fit_get_debug(fit, noffset, FIT_VALUE_PROP, len); *value_len = 0; return -1; } *value_len = len; return 0; }
0
[]
u-boot
6f3c2d8aa5e6cbd80b5e869bbbddecb66c329d01
85,213,505,209,227,330,000,000,000,000,000,000,000
15
image: Add an option to do a full check of the FIT Some strange modifications of the FIT can introduce security risks. Add an option to check it thoroughly, using libfdt's fdt_check_full() function. Enable this by default if signature verification is enabled. CVE-2021-27097 Signed-off-by: Simon Glass <sjg@chromium....
Node* TY_(TextToken)( Lexer *lexer ) { Node *node = TY_(NewNode)( lexer->allocator, lexer ); node->start = lexer->txtstart; node->end = lexer->txtend; return node; }
0
[ "CWE-119" ]
tidy-html5
c18f27a58792f7fbd0b30a0ff50d6b40a82f940d
333,706,531,349,455,400,000,000,000,000,000,000,000
7
Issue #217 - avoid len going negative, ever...
/* {{{ date_period_write_property */ static void date_period_write_property(zval *object, zval *member, zval *value, const zend_literal *key TSRMLS_DC) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "Writing to DatePeriod properties is unsupported");
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
271,868,790,724,026,800,000,000,000,000,000,000,000
4
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
bool isDirectory(const string &dir, struct dirent *entry) const { #ifdef DT_DIR if (entry->d_type == DT_DIR) { return true; } else if (entry->d_type != DT_UNKNOWN) { return false; } // If DT_UNKNOWN, use normal check. #endif string path = dir; path.append("/"); path.append(entry->d_name);...
0
[ "CWE-59", "CWE-61" ]
passenger
5483b3292cc2af1c83033eaaadec20dba4dcfd9b
161,153,816,163,104,520,000,000,000,000,000,000,000
14
If the server instance directory already exists, it is now removed first in order get correct directory permissions. If the directory still exists after removal, Phusion Passenger aborts to avoid writing to a directory with unexpected permissions. Fixes issue #910.
SProcShmQueryVersion(client) register ClientPtr client; { register int n; REQUEST(xShmQueryVersionReq); swaps(&stuff->length, n); return ProcShmQueryVersion(client); }
0
[ "CWE-189" ]
xserver
be6c17fcf9efebc0bbcc3d9a25f8c5a2450c2161
137,925,460,731,207,650,000,000,000,000,000,000,000
9
CVE-2007-6429: Always test for size+offset wrapping.
date_s__jisx0301(VALUE klass, VALUE str) { return date__jisx0301(str); }
1
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
26,227,353,314,955,645,000,000,000,000,000,000,000
4
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static NTSTATUS create_file_unixpath(connection_struct *conn, struct smb_request *req, struct smb_filename *smb_fname, uint32_t access_mask, uint32_t share_access, uint32_t create_disposition, uint32_t create_options, uint32_t file_attributes, uint...
1
[]
samba
60f922bf1bd8816eacbb32c24793ad1f97a1d9f2
86,756,942,410,942,810,000,000,000,000,000,000,000
351
Fix bug #10229 - No access check verification on stream files. https://bugzilla.samba.org/show_bug.cgi?id=10229 We need to check if the requested access mask could be used to open the underlying file (if it existed), as we're passing in zero for the access mask to the base filename. Signed-off-by: Jeremy Allison <jr...
static int map_delete_do_local(struct map_context *ac) { struct ldb_request *local_req; struct ldb_context *ldb; int ret; ldb = ldb_module_get_ctx(ac->module); /* No local record, continue remotely */ if (ac->local_dn == NULL) { /* Do the remote request. */ return ldb_next_remote_request(ac->module, ac->rem...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
291,953,679,071,104,200,000,000,000,000,000,000,000
27
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...
static void ehci_queues_rip_all(EHCIState *ehci, int async) { EHCIQueueHead *head = async ? &ehci->aqueues : &ehci->pqueues; const char *warn = async ? "guest stopped busy async schedule" : NULL; EHCIQueue *q, *tmp; QTAILQ_FOREACH_SAFE(q, head, next, tmp) { ehci_free_queue(q, warn); } }
0
[]
qemu
791f97758e223de3290592d169f8e6339c281714
152,084,866,110,237,670,000,000,000,000,000,000,000
10
usb: ehci: fix memory leak in ehci_init_transfer In ehci_init_transfer function, if the 'cpage' is bigger than 4, it doesn't free the 'p->sgl' once allocated previously thus leading a memory leak issue. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog...
Filter::UpstreamRequest::~UpstreamRequest() { if (span_ != nullptr) { Tracing::HttpTracerUtility::finalizeUpstreamSpan(*span_, upstream_headers_.get(), upstream_trailers_.get(), stream_info_, Tracing::EgressC...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
145,856,633,521,622,180,000,000,000,000,000,000,000
29
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static void httpd_reset(struct http_connection *conn) { int i; int bytes_in = 0; int bytes_out = 0; /* Do any namespace specific cleanup */ for (i = 0; http_namespaces[i]; i++) { if (http_namespaces[i]->enabled && http_namespaces[i]->reset) http_namespaces[i]->reset(); } ...
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
69,873,752,477,958,830,000,000,000,000,000,000,000
103
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
static int l2cap_segment_le_sdu(struct l2cap_chan *chan, struct sk_buff_head *seg_queue, struct msghdr *msg, size_t len) { struct sk_buff *skb; size_t pdu_len; u16 sdu_len; BT_DBG("chan %p, msg %p, len %zu", chan, msg, len); sdu_len = len; pdu_len = chan->remote_mps - L2CAP_SDULEN_SIZE; while (len > 0...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
37,945,408,107,424,800,000,000,000,000,000,000,000
35
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
static inline void ConvertDisplayP3ToXYZ(const double red,const double green, const double blue,double *X,double *Y,double *Z) { double b, g, r; /* Convert Display P3 to XYZ colorspace. */ assert(X != (double *) NULL); assert(Y != (double *) NULL); assert(Z != (double *) NULL); r=Quantu...
0
[]
ImageMagick
a855d3ad660f307fdb071794351822f9ce878c4e
97,725,444,522,107,230,000,000,000,000,000,000,000
21
https://github.com/ImageMagick/ImageMagick/issues/3317
static ::tensorflow::Status ValidateInputs( std::vector<ConstFlatSplits> rt_nested_splits, const Tensor& rt_dense_values_in) { for (int i = 0; i < rt_nested_splits.size(); ++i) { if (rt_nested_splits[i].size() == 0) { return InvalidArgument("ragged splits may not be empty."); } ...
1
[ "CWE-125", "CWE-824" ]
tensorflow
1071f554dbd09f7e101324d366eec5f4fe5a3ece
47,279,948,124,375,640,000,000,000,000,000,000,000
28
Add missing validation to `RaggedTensorToSparse`. There needs to be a check that the splits allow for valid ragged tensors. PiperOrigin-RevId: 387712169 Change-Id: I2499175324b82b65d159a260c7f83b98ceb5cc7d
is_exit_restart(int sig) { return (sig == SIGUSR1 || sig == SIGTERM || sig == SIGHUP || sig == SIGINT); }
0
[ "CWE-362", "CWE-476" ]
openvpn
37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab
212,654,608,633,349,600,000,000,000,000,000,000,000
4
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...
xmlExpDivide(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub, xmlExpNodePtr *mult, xmlExpNodePtr *remain) { int i; xmlExpNodePtr tmp, tmp2; if (mult != NULL) *mult = NULL; if (remain != NULL) *remain = NULL; if (exp->c_max == -1) return(0); if (IS_NILLABLE(exp) && (!IS_NIL...
0
[ "CWE-119" ]
libxml2
cbb271655cadeb8dbb258a64701d9a3a0c4835b4
270,802,438,686,171,880,000,000,000,000,000,000,000
48
Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711> * xmlregexp.c: (xmlFAParseCharRange): Only advance to the next character if there is no error. Advancing to the next character in case of an error while parsing regexp leads to an out of bounds access.
long get_user_pages(unsigned long start, unsigned long nr_pages, int write, int force, struct page **pages, struct vm_area_struct **vmas) { return __get_user_pages_locked(current, current->mm, start, nr_pages, write, force, pages, vmas, NULL, false, FOLL_TOUCH); }
0
[ "CWE-362" ]
linux
19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619
93,025,742,449,952,400,000,000,000,000,000,000,000
8
mm: remove gup_flags FOLL_WRITE games from __get_user_pages() This is an ancient bug that was actually attempted to be fixed once (badly) by me eleven years ago in commit 4ceb5db9757a ("Fix get_user_pages() race for write access") but that was then undone due to problems on s390 by commit f33ea7f404e5 ("fix get_user_p...
static CACHE_BITMAP_V2_ORDER* update_read_cache_bitmap_v2_order(rdpUpdate* update, wStream* s, BOOL compressed, UINT16 flags) { BYTE bitsPerPixelId; CACHE_BITMAP_V2_ORDER* cache_bitmap_v2; if (!update || !s) return NULL; cache_bitmap_v2 = calloc(1,...
1
[ "CWE-125" ]
FreeRDP
b8beb55913471952f92770c90c372139d78c16c0
217,840,038,882,128,220,000,000,000,000,000,000,000
88
Fixed OOB read in update_read_cache_bitmap_v3_order CVE-2020-11096 thanks @antonio-morales for finding this.
Status AuthorizationManager::getRoleDescriptionsForDB(OperationContext* opCtx, const std::string dbname, PrivilegeFormat privileges, AuthenticationRestriction...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
130,675,639,519,618,340,000,000,000,000,000,000,000
9
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static int myregwrite(RAnalEsil *esil, const char *name, ut64 *val) { AeaStats *stats = esil->user; if (oldregread && !strcmp (name, oldregread)) { r_list_pop (stats->regread); R_FREE (oldregread) } if (!IS_DIGIT (*name)) { if (!contains (stats->regs, name)) { r_list_push (stats->regs, strdup (name)); } ...
0
[ "CWE-703", "CWE-908" ]
radare2
4d3811681a80f92a53e795f6a64c4b0fc2c8dd22
207,838,638,604,675,260,000,000,000,000,000,000,000
21
Fix segfault in adf (#16230)
gst_h264_parser_identify_nalu_avc (GstH264NalParser * nalparser, const guint8 * data, guint offset, gsize size, guint8 nal_length_size, GstH264NalUnit * nalu) { GstBitReader br; memset (nalu, 0, sizeof (*nalu)); if (size < offset + nal_length_size) { GST_DEBUG ("Can't parse, buffer has too small siz...
0
[ "CWE-787" ]
gst-plugins-bad
11353b3f6e2f047cc37483d21e6a37ae558896bc
23,223,022,056,334,162,000,000,000,000,000,000,000
40
codecparsers: h264parser: guard against ref_pic_markings overflow Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703>
join_read_const_table(THD *thd, JOIN_TAB *tab, POSITION *pos) { int error; TABLE_LIST *tbl; DBUG_ENTER("join_read_const_table"); TABLE *table=tab->table; table->const_table=1; table->null_row=0; table->status=STATUS_NO_RECORD; if (tab->table->pos_in_table_list->is_materialized_derived() && !tab...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
266,505,058,792,550,860,000,000,000,000,000,000,000
115
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static u8 l2cap_get_ident(struct l2cap_conn *conn) { u8 id; /* Get next available identificator. * 1 - 128 are used by kernel. * 129 - 199 are reserved. * 200 - 254 are used by utilities like l2ping, etc. */ mutex_lock(&conn->ident_lock); if (++conn->tx_ident > 128) conn->tx_ident = 1; id = conn...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
292,556,285,635,972,370,000,000,000,000,000,000,000
21
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
_copyCompositeTypeStmt(const CompositeTypeStmt *from) { CompositeTypeStmt *newnode = makeNode(CompositeTypeStmt); COPY_NODE_FIELD(typevar); COPY_NODE_FIELD(coldeflist); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
126,422,409,538,664,150,000,000,000,000,000,000,000
9
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static inline int __ldsem_down_write_nested(struct ld_semaphore *sem, int subclass, long timeout) { long count; lockdep_acquire(sem, subclass, 0, _RET_IP_); count = ldsem_atomic_update(LDSEM_WRITE_BIAS, sem); if ((count & LDSEM_ACTIVE_MASK) != LDSEM_ACTIVE_BIAS) { lock_stat(sem, contended); if (!down...
0
[ "CWE-362" ]
linux
cf872776fc84128bb779ce2b83a37c884c3203ae
82,374,730,827,925,580,000,000,000,000,000,000,000
18
tty: Fix hang at ldsem_down_read() When a controlling tty is being hung up and the hang up is waiting for a just-signalled tty reader or writer to exit, and a new tty reader/writer tries to acquire an ldisc reference concurrently with the ldisc reference release from the signalled reader/writer, the hangup can hang. T...
add_monitor_path_args (gboolean use_session_helper, FlatpakBwrap *bwrap) { g_autoptr(AutoFlatpakSessionHelper) session_helper = NULL; g_autofree char *monitor_path = NULL; g_autofree char *pkcs11_socket_path = NULL; g_autoptr(GVariant) session_data = NULL; if (use_session_helper) ...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
84,184,865,720,521,200,000,000,000,000,000,000,000
114
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static int ext4_ext_convert_to_initialized(handle_t *handle, struct inode *inode, struct ext4_map_blocks *map, struct ext4_ext_path **ppath, int flags) { struct ext4_ext_path *path = *ppath; struct ext4_sb_info *sbi; struct ext4_extent_header *eh; struct ext4_map_blocks split_map; s...
0
[ "CWE-125" ]
linux
bc890a60247171294acc0bd67d211fa4b88d40ba
270,280,401,690,615,400,000,000,000,000,000,000,000
237
ext4: verify the depth of extent tree in ext4_find_extent() If there is a corupted file system where the claimed depth of the extent tree is -1, this can cause a massive buffer overrun leading to sadness. This addresses CVE-2018-10877. https://bugzilla.kernel.org/show_bug.cgi?id=199417 Signed-off-by: Theodore Ts'o ...
static int mov_write_tfxd_tag(AVIOContext *pb, MOVTrack *track) { int64_t pos = avio_tell(pb); static const uint8_t uuid[] = { 0x6d, 0x1d, 0x9b, 0x05, 0x42, 0xd5, 0x44, 0xe6, 0x80, 0xe2, 0x14, 0x1d, 0xaf, 0xf7, 0x57, 0xb2 }; avio_wb32(pb, 0); /* size placeholder */ ffio_wfourcc(pb, ...
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
2,788,352,637,938,252,000,000,000,000,000,000,000
20
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...
void fmtutil_macbitmap_read_rowbytes_and_bounds(deark *c, dbuf *f, struct fmtutil_macbitmap_info *bi, i64 pos) { struct pict_rect tmprect; i64 rowbytes_code; de_dbg(c, "rowBytes/bounds part of bitmap/PixMap header, at %d", (int)pos); de_dbg_indent(c, 1); rowbytes_code = dbuf_getu16be(f, pos); bi->rowbytes = row...
0
[ "CWE-369" ]
deark
62acb7753b0e3c0d3ab3c15057b0a65222313334
157,653,938,096,841,900,000,000,000,000,000,000,000
21
pict,macrsrc: Fixed a bug that could cause division by 0 Found by F. Çelik.