func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
} static Double amix_get_dbl(u8 *data) { return *(Double *)data;
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
335,933,611,138,847,400,000,000,000,000,000,000,000
4
fixed #2138
static apr_status_t validate_status_line(request_rec *r) { char *end; if (r->status_line) { int len = strlen(r->status_line); if (len < 3 || apr_strtoi64(r->status_line, &end, 10) != r->status || (end - 3) != r->status_line || (len >= 4 && ! apr_isspace(r->st...
0
[ "CWE-20" ]
httpd
a6027e56924bb6227c1fdbf6f91e7e2438338be6
2,557,814,832,258,734,800,000,000,000,000,000,000
25
Limit accepted chunk-size to 2^63-1 and be strict about chunk-ext authorized characters. Submitted by: Yann Ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1684513 13f79535-47bb-0310-9956-ffa450edef68
void Monitor::sync_trim_providers() { dout(20) << __func__ << dendl; utime_t now = ceph_clock_now(); map<uint64_t,SyncProvider>::iterator p = sync_providers.begin(); while (p != sync_providers.end()) { if (now > p->second.timeout) { dout(10) << __func__ << " expiring cookie " << p->second.cookie << "...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
259,725,516,565,758,540,000,000,000,000,000,000,000
15
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
end_unique_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), bool end_of_records) { TABLE *table= join_tab->table; int error; DBUG_ENTER("end_unique_update"); if (end_of_records) DBUG_RETURN(NESTED_LOOP_OK); init_tmptable_sum_functions(join->sum_funcs); copy_fields(join_tab->tmp_tab...
0
[ "CWE-89" ]
server
5ba77222e9fe7af8ff403816b5338b18b342053c
280,824,041,312,123,340,000,000,000,000,000,000,000
61
MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view if the view has algorithm=temptable it is not updatable, so DEFAULT() for its fields is meaningless, and thus it's NULL or 0/'' for NOT NULL columns.
static gpointer test_helper_server(gpointer opaque) { struct GVncTest *data = opaque; GSocketListener *server; GSocketConnection *client; GIOStream *ios; GInputStream *is; GOutputStream *os; server = g_socket_listener_new(); data->port = g_socket_listener_add_any_inet_port(server, NULL...
0
[]
gtk-vnc
ea0386933214c9178aaea9f2f85049ea3fa3e14a
308,584,341,326,835,000,000,000,000,000,000,000,000
48
Fix bounds checking for RRE, hextile & copyrect encodings While the client would bounds check the overall update region, it failed to bounds check the payload data parameters. Add a test case to validate bounds checking. https://bugzilla.gnome.org/show_bug.cgi?id=778048 CVE-2017-5884 Signed-off-by: Daniel P. Berra...
static int audit_set_failure(u32 state) { if (state != AUDIT_FAIL_SILENT && state != AUDIT_FAIL_PRINTK && state != AUDIT_FAIL_PANIC) return -EINVAL; return audit_do_config_change("audit_failure", &audit_failure, state); }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
266,724,825,644,502,930,000,000,000,000,000,000,000
9
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static int sas_configure_parent(struct domain_device *parent, struct domain_device *child, u8 *sas_addr, int include) { struct expander_device *ex_parent = &parent->ex_dev; int res = 0; int i; if (parent->parent) { res = sas_configure_parent(parent->parent, parent, sas_addr, include); if (res) ...
0
[ "CWE-399", "CWE-772" ]
linux
4a491b1ab11ca0556d2fda1ff1301e862a2d44c4
214,299,819,013,988,830,000,000,000,000,000,000,000
35
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 finish(void) { int magic = BPF_PRELOAD_END; struct pid *tgid; loff_t pos = 0; ssize_t n; /* send the last magic to UMD. It will do a normal exit. */ n = kernel_write(umd_ops.info.pipe_to_umh, &magic, sizeof(magic), &pos); if (n != sizeof(magic)) return -EPIPE; tgid = umd_ops.info.tgid; if (t...
0
[ "CWE-401" ]
linux
f60a85cad677c4f9bb4cadd764f1d106c38c7cf8
98,165,059,016,791,670,000,000,000,000,000,000,000
20
bpf: Fix umd memory leak in copy_process() The syzbot reported a memleak as follows: BUG: memory leak unreferenced object 0xffff888101b41d00 (size 120): comm "kworker/u4:0", pid 8, jiffies 4294944270 (age 12.780s) backtrace: [<ffffffff8125dc56>] alloc_pid+0x66/0x560 [<ffffffff81226405>] copy_process+0x146...
TfLiteRegistration* Register_ADD_REF() { static TfLiteRegistration r = {add::Init, add::Free, add::Prepare, add::Eval<add::kReference>}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
57,003,817,064,020,970,000,000,000,000,000,000,000
5
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
unsigned int rtas_busy_delay(int status) { unsigned int ms; might_sleep(); ms = rtas_busy_delay_time(status); if (ms && need_resched()) msleep(ms); return ms; }
0
[ "CWE-862" ]
linux
bd59380c5ba4147dcbaad3e582b55ccfd120b764
335,337,989,203,973,380,000,000,000,000,000,000,000
11
powerpc/rtas: Restrict RTAS requests from userspace A number of userspace utilities depend on making calls to RTAS to retrieve information and update various things. The existing API through which we expose RTAS to userspace exposes more RTAS functionality than we actually need, through the sys_rtas syscall, which al...
static int io_writev_prep_async(struct io_kiocb *req) { return io_rw_prep_async(req, WRITE); }
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
148,264,534,733,770,130,000,000,000,000,000,000,000
4
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
static int sctp_wait_for_sndbuf(struct sctp_association *asoc, long *timeo_p, size_t msg_len) { struct sock *sk = asoc->base.sk; long current_timeo = *timeo_p; DEFINE_WAIT(wait); int err = 0; pr_debug("%s: asoc:%p, timeo:%ld, msg_len:%zu\n", __func__, asoc, *timeo_p, msg_len); /* Increment the associatio...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
172,861,347,538,464,920,000,000,000,000,000,000,000
68
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
input_pending(struct window_pane *wp) { return (wp->ictx->since_ground); }
0
[]
tmux
2ffbd5b5f05dded1564ba32a6a00b0b417439b2f
36,108,107,659,458,220,000,000,000,000,000,000,000
4
When searching for tabs, start from screen width, fixes out-of-bounds read found by Kuang-che Wu.
static int update_add_entry(struct libmnt_update *upd, struct libmnt_lock *lc) { struct libmnt_table *tb; int rc = 0, u_lc = -1; assert(upd); assert(upd->fs); DBG(UPDATE, mnt_debug_h(upd, "%s: add entry", upd->filename)); if (lc) mnt_lock_file(lc); else if (upd->userspace_only) u_lc = utab_lock(upd->filen...
1
[ "CWE-399" ]
util-linux
28594c9d4fc8a4108408c5749b62933b967ba23b
46,605,956,960,290,350,000,000,000,000,000,000,000
35
libmount: block signals when update utab Signed-off-by: Karel Zak <kzak@redhat.com>
INST_HANDLER (lsr) { // LSR Rd int d = ((buf[0] >> 4) & 0xf) | ((buf[1] & 1) << 4); ESIL_A ("1,r%d,>>,", d); // 0: R=(Rd >> 1) ESIL_A ("r%d,0x1,&,!,!,cf,=,", d); // C = Rd0 ESIL_A ("0,RPICK,!,zf,=,"); // Z ESIL_A ("0,nf,=,"); // N ESIL_A ("nf,cf,^,vf,=,"); // V ESIL_A ("nf,vf,^,sf,=,"); // S E...
0
[ "CWE-125" ]
radare2
041e53cab7ca33481ae45ecd65ad596976d78e68
132,964,553,391,083,820,000,000,000,000,000,000,000
10
Fix crash in anal.avr
LinkInfo::LinkInfo(const constantPoolHandle& pool, int index, TRAPS) { // resolve klass _resolved_klass = pool->klass_ref_at(index, CHECK); // Get name, signature, and static klass _name = pool->name_ref_at(index); _signature = pool->signature_ref_at(index); _tag = pool->tag_ref_at(...
0
[]
jdk17u
860464e46105b98ccf21e98abe2dc6e80155887c
174,640,969,651,503,830,000,000,000,000,000,000,000
15
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
rsvg_node_svg_draw (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate) { RsvgNodeSvg *sself; RsvgState *state; gdouble affine[6], affine_old[6], affine_new[6]; guint i; double nx, ny, nw, nh; sself = (RsvgNodeSvg *) self; nx = _rsvg_css_normalize_length (&sself->x, ctx, 'h'); ny = _rs...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
5,339,432,292,195,884,000,000,000,000,000,000,000
67
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...
static void __attribute__((__constructor__)) v9fs_set_fd_limit(void) { struct rlimit rlim; if (getrlimit(RLIMIT_NOFILE, &rlim) < 0) { error_report("Failed to get the resource limit"); exit(1); } open_fd_hw = rlim.rlim_cur - MIN(400, rlim.rlim_cur / 3); open_fd_rc = rlim.rlim_cur / 2;...
0
[ "CWE-362" ]
qemu
89fbea8737e8f7b954745a1ffc4238d377055305
52,143,744,171,081,350,000,000,000,000,000,000,000
10
9pfs: Fully restart unreclaim loop (CVE-2021-20181) Depending on the client activity, the server can be asked to open a huge number of file descriptors and eventually hit RLIMIT_NOFILE. This is currently mitigated using a reclaim logic : the server closes the file descriptors of idle fids, based on the assumption that...
tok_decimal_tail(struct tok_state *tok) { int c; while (1) { do { c = tok_nextc(tok); } while (isdigit(c)); if (c != '_') { break; } c = tok_nextc(tok); if (!isdigit(c)) { tok_backup(tok, c); syntaxerror(tok, "inval...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
258,541,667,655,390,700,000,000,000,000,000,000,000
20
bpo-35766: Merge typed_ast back into CPython (GH-11645)
CotpConnection_sendConnectionResponseMessage(CotpConnection* self) { allocateWriteBuffer(self); int optionsLength = getOptionsLength(self); int messageLength = 11 + optionsLength; writeRfc1006Header(self, messageLength); writeStaticConnectResponseHeader(self, optionsLength); writeOptions(sel...
0
[ "CWE-122" ]
libiec61850
033ab5b6488250c8c3b838f25a7cbc3e099230bb
38,834,778,797,126,860,000,000,000,000,000,000,000
18
- COTP: fixed possible heap buffer overflow when handling message with invalid (zero) value in length field (#250)
const char *type_name() { return type == COLUMN ? "COLUMN" : type == CHECK_CONSTRAINT ? "CONSTRAINT" : type == KEY ? "INDEX" : "FOREIGN KEY"; }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
251,224,855,229,362,660,000,000,000,000,000,000,000
6
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
may_do_si() { return curbuf->b_p_si && !curbuf->b_p_cin # ifdef FEAT_EVAL && *curbuf->b_p_inde == NUL # endif && !p_paste; }
0
[ "CWE-122", "CWE-787" ]
vim
0e8e938d497260dd57be67b4966cb27a5f72376f
79,275,121,101,165,230,000,000,000,000,000,000,000
9
patch 8.2.5122: lisp indenting my run over the end of the line Problem: Lisp indenting my run over the end of the line. Solution: Check for NUL earlier.
Symbol* MethodHandles::lookup_basic_type_signature(Symbol* sig, bool keep_last_arg, TRAPS) { Symbol* bsig = NULL; if (sig == NULL) { return sig; } else if (is_basic_type_signature(sig)) { sig->increment_refcount(); return sig; // that was easy } else if (sig->byte_at(0) != '(') { BasicType bt =...
0
[]
jdk8u
f14e35d20e1a4d0f507f05838844152f2242c6d3
182,887,524,019,433,300,000,000,000,000,000,000,000
49
8281866: Enhance MethodHandle invocations Reviewed-by: andrew Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
int smb_vfs_call_lsetxattr(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags) { VFS_FIND(lsetxattr); return handle->fns->lsetxattr(handle, path, name, value, size, flags); }
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
172,560,256,017,662,200,000,000,000,000,000,000,000
7
Fix bug 7104 - "wide links" and "unix extensions" are incompatible. Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow t...
static void dissect_GAP(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags, const guint encoding, int octets_to_next_header, proto_tree *tree, endpoint_guid *guid) { /* RTPS 1.0/1.1: * 0...2...........7...............15.............23...............31 * +-+-+-+-+-+-+-+-...
0
[ "CWE-401" ]
wireshark
33e63d19e5496c151bad69f65cdbc7cba2b4c211
112,974,690,965,808,130,000,000,000,000,000,000,000
76
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 ...
static bool test_mem_cgroup_node_reclaimable(struct mem_cgroup *memcg, int nid, bool noswap) { if (mem_cgroup_node_nr_lru_pages(memcg, nid, LRU_ALL_FILE)) return true; if (noswap || !total_swap_pages) return false; if (mem_cgroup_node_nr_lru_pages(memcg, nid, LRU_ALL_ANON)) return true; return false; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
250,029,810,884,249,700,000,000,000,000,000,000,000
12
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static bool __is_valid_xdp_access(int off, int size) { if (off < 0 || off >= sizeof(struct xdp_md)) return false; if (off % size != 0) return false; if (size != sizeof(__u32)) return false; return true; }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
43,402,378,246,198,100,000,000,000,000,000,000,000
11
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...
static void s_server_init(void) { accept_socket=-1; cipher=NULL; s_server_verify=SSL_VERIFY_NONE; s_dcert_file=NULL; s_dkey_file=NULL; s_dchain_file=NULL; s_cert_file=TEST_CERT; s_key_file=NULL; s_chain_file=NULL; #ifndef OPENSSL_NO_TLSEXT curves=NULL; s_cert_file2=TEST_CERT2; s_key_file2=NULL; ctx2=NULL;...
0
[]
openssl
c70a1fee71119a9005b1f304a3bf47694b4a53ac
100,335,823,379,899,250,000,000,000,000,000,000,000
33
Reorganise supported signature algorithm extension processing. Only store encoded versions of peer and configured signature algorithms. Determine shared signature algorithms and cache the result along with NID equivalents of each algorithm. (backport from HEAD)
int num_fifos () { return nfds;
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
133,197,163,495,434,000,000,000,000,000,000,000,000
4
Bash-4.4 patch 7
static void set_nettime(void) { wr_lock(&netacc_lock); cgtime(&nettime); wr_unlock(&netacc_lock); }
0
[ "CWE-20", "CWE-703" ]
sgminer
910c36089940e81fb85c65b8e63dcd2fac71470c
136,932,334,144,578,050,000,000,000,000,000,000,000
6
stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime. Might have introduced a memory leak, don't have time to check. :( Should the other hex2bin()'s be checked? Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this.
long ContentEncoding::ParseEncryptionEntry(long long start, long long size, IMkvReader* pReader, ContentEncryption* encryption) { assert(pReader); assert(encryption); long long pos = start; const long long stop = start + size...
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
118,323,880,597,227,150,000,000,000,000,000,000,000
103
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
struct dentry *vfs_tmpfile(struct dentry *dentry, umode_t mode, int open_flag) { struct dentry *child = NULL; struct inode *dir = dentry->d_inode; struct inode *inode; int error; /* we want directory to be writable */ error = inode_permission(dir, MAY_WRITE | MAY_EXEC); if (error) goto out_err; error = -EOPN...
0
[ "CWE-416", "CWE-284" ]
linux
d0cb50185ae942b03c4327be322055d622dc79f6
77,357,637,469,178,220,000,000,000,000,000,000,000
37
do_last(): fetch directory ->i_mode and ->i_uid before it's too late may_create_in_sticky() call is done when we already have dropped the reference to dir. Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
tstamp_precision_to_string(int precision) { switch (precision) { case PCAP_TSTAMP_PRECISION_MICRO: return "micro"; case PCAP_TSTAMP_PRECISION_NANO: return "nano"; default: return "unknown"; } }
0
[ "CWE-120", "CWE-787" ]
tcpdump
9ba91381954ad325ea4fd26b9c65a8bd9a2a85b6
73,807,433,040,596,490,000,000,000,000,000,000,000
14
(for 4.9.3) CVE-2018-14879/fix -V to fail invalid input safely get_next_file() did not check the return value of strlen() and underflowed an array index if the line read by fgets() from the file started with \0. This caused an out-of-bounds read and could cause a write. Add the missing check. This vulnerability was d...
unset_addr_list_fix(UnsetAddrList* uslist, regex_t* reg) { int i, offset; EncloseNode* en; AbsAddrType addr; for (i = 0; i < uslist->num; i++) { en = NENCLOSE(uslist->us[i].target); if (! IS_ENCLOSE_ADDR_FIXED(en)) return ONIGERR_PARSER_BUG; addr = en->call_addr; offset = uslist->us[i].offset; ...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
119,989,806,380,453,540,000,000,000,000,000,000,000
16
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
static int dccp_new(struct nf_conn *ct, const struct sk_buff *skb, unsigned int dataoff) { int pf = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; struct dccp_hdr _dh, *dh; const char *msg; u_int8_t state; dh = skb_header_pointer(skb, dataoff, sizeof(_dh), &dh); BUG_ON(dh == NULL); state = dccp_state...
0
[]
linux
2bc780499aa33311ec0f3e42624dfaa7be0ade5e
29,791,042,815,320,774,000,000,000,000,000,000,000
35
[NETFILTER]: nf_conntrack: add DCCP protocol support Add DCCP conntrack helper. Thanks to Gerrit Renker <gerrit@erg.abdn.ac.uk> for review and testing. Signed-off-by: Patrick McHardy <kaber@trash.net>
static int selinux_quota_on(struct dentry *dentry) { const struct cred *cred = current_cred(); return dentry_has_perm(cred, NULL, dentry, FILE__QUOTAON); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
10,373,136,010,536,211,000,000,000,000,000,000,000
6
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
QPDFOutlineObjectHelper::Members::~Members() { }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
161,094,766,008,766,110,000,000,000,000,000,000,000
3
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 ...
do_user_id( IOBUF out, int ctb, PKT_user_id *uid ) { int rc; if (uid->attrib_data) { write_header(out, ctb, uid->attrib_len); rc = iobuf_write( out, uid->attrib_data, uid->attrib_len ); } else { write_header2( out, ctb, uid->len, 2 ); rc = iobuf_write( out, uid->name, uid->len...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
297,795,201,076,537,320,000,000,000,000,000,000,000
16
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 ...
void jspSetInterrupted(bool interrupt) { if (interrupt) execInfo.execute = execInfo.execute | EXEC_INTERRUPTED; else execInfo.execute = execInfo.execute & (JsExecFlags)~EXEC_INTERRUPTED; }
0
[ "CWE-787" ]
Espruino
e069be2ecc5060ef47391716e4de94999595b260
263,640,111,571,587,100,000,000,000,000,000,000,000
6
Fix potential corruption issue caused by `delete [].__proto__` (fix #2142)
static void call_trans2mkdir(connection_struct *conn, struct smb_request *req, char **pparams, int total_params, char **ppdata, int total_data, unsigned int max_data_bytes) { struct files_struct *fsp = NULL; struct smb_filename *smb_dname = NULL; char *params = *pparams; char *pdata = *ppdat...
0
[ "CWE-787" ]
samba
22b4091924977f6437b59627f33a8e6f02b41011
49,145,427,802,081,750,000,000,000,000,000,000,000
158
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>
curwin_col_off(void) { return win_col_off(curwin); }
0
[ "CWE-122" ]
vim
777e7c21b7627be80961848ac560cb0a9978ff43
192,016,510,539,196,630,000,000,000,000,000,000,000
4
patch 8.2.3564: invalid memory access when scrolling without valid screen Problem: Invalid memory access when scrolling without a valid screen. Solution: Do not set VALID_BOTLINE in w_valid.
flatpak_dir_drop_current_ref (FlatpakDir *self, const char *name, GCancellable *cancellable, GError **error) { g_autoptr(GFile) base = NULL; g_autoptr(GFile) dir = NULL; g_autoptr(GFile) current_link = NULL; g_aut...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
28,625,964,171,899,330,000,000,000,000,000,000,000
45
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
void print_usage_title(FILE *fp, char *progname) { fprintf(fp, _("Usage: %s [ options ] [ <interval> [ <count> ] ]\n"), progname); }
0
[ "CWE-125" ]
sysstat
fbc691eaaa10d0bcea6741d5a223dc3906106548
313,405,675,208,151,000,000,000,000,000,000,000,000
5
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>
policy_expand_private(smartlist_t **policy) { uint16_t port_min, port_max; int i; smartlist_t *tmp; if (!*policy) /*XXXX disallow NULL policies? */ return; tmp = smartlist_create(); SMARTLIST_FOREACH(*policy, addr_policy_t *, p, { if (! p->is_private) { smartlist_add(tmp, p); co...
0
[ "CWE-119" ]
tor
43414eb98821d3b5c6c65181d7545ce938f82c8e
204,107,979,998,119,860,000,000,000,000,000,000,000
35
Fix bounds-checking in policy_summarize Found by piebeer.
static int megasas_dcmd_set_properties(MegasasState *s, MegasasCmd *cmd) { struct mfi_ctrl_props info; size_t dcmd_size = sizeof(info); if (cmd->iov_size < dcmd_size) { trace_megasas_dcmd_invalid_xfer_len(cmd->index, cmd->iov_size, dcmd_size); ret...
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
9,521,871,968,909,483,000,000,000,000,000,000,000
14
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
static inline void paravirt_alloc_pte(struct mm_struct *mm, unsigned long pfn) { PVOP_VCALL2(mmu.alloc_pte, mm, pfn); }
0
[ "CWE-276" ]
linux
cadfad870154e14f745ec845708bc17d166065f2
138,481,894,741,378,450,000,000,000,000,000,000,000
4
x86/ioperm: Fix io bitmap invalidation on Xen PV tss_invalidate_io_bitmap() wasn't wired up properly through the pvop machinery, so the TSS and Xen's io bitmap would get out of sync whenever disabling a valid io bitmap. Add a new pvop for tss_invalidate_io_bitmap() to fix it. This is XSA-329. Fixes: 22fe5b0439dd ("...
xfs_bmapi_write( struct xfs_trans *tp, /* transaction pointer */ struct xfs_inode *ip, /* incore inode */ xfs_fileoff_t bno, /* starting file offs. mapped */ xfs_filblks_t len, /* length to map in file */ int flags, /* XFS_BMAPI_... */ xfs_fsblock_t *firstblock, /* first allocated block control...
0
[]
linux
2c4306f719b083d17df2963bc761777576b8ad1b
30,476,147,084,287,230,000,000,000,000,000,000,000
269
xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla...
GF_Err gf_isom_ismacryp_sample_to_sample(const GF_ISMASample *s, GF_ISOSample *dest) { GF_BitStream *bs; if (!s || !dest) return GF_BAD_PARAM; bs = gf_bs_new(NULL, 0, GF_BITSTREAM_WRITE); if (s->flags & GF_ISOM_ISMA_USE_SEL_ENC) { gf_bs_write_int(bs, (s->flags & GF_ISOM_ISMA_IS_ENCRYPTED) ? 1 : 0, 1); gf_bs_w...
0
[ "CWE-476" ]
gpac
3b84ffcbacf144ce35650df958432f472b6483f8
291,197,158,400,395,130,000,000,000,000,000,000,000
23
fixed #1735
asn1_encode_sequence_of_keys(krb5_key_data *key_data, krb5_int16 n_key_data, krb5_int32 mkvno, krb5_data **code) { krb5_error_code err; ldap_seqof_key_data val; /* * This should be pushed back into other library initialization * code. */ err = kldap_ensure_in...
0
[ "CWE-703" ]
krb5
04038bf3633c4b909b5ded3072dc88c8c419bf16
22,748,238,671,325,310,000,000,000,000,000,000,000
21
Support keyless principals in LDAP [CVE-2014-5354] Operations like "kadmin -q 'addprinc -nokey foo'" or "kadmin -q 'purgekeys -all foo'" result in principal entries with no keys present, so krb5_encode_krbsecretkey() would just return NULL, which then got unconditionally dereferenced in krb5_add_ber_mem_ldap_mod(). A...
CImg<T>& invert_endianness() { cimg::invert_endianness(_data,size()); return *this; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
187,722,176,627,817,440,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
parse_extension (const char *filename) { const char *compression; compression = file_is_compressed (filename); /* if the file is compressed we might have a double extension */ if (compression != NULL) { int i; static const char * const extensions[] = {"tar", "ps", "xcf", "dvi", "txt", "text", NULL}; ...
0
[]
epiphany
3e0f7dea754381c5ad11a06ccc62eb153382b498
47,195,261,892,024,945,000,000,000,000,000,000,000
31
Report broken certs through the padlock icon This uses a new feature in libsoup that reports through a SoupMessageFlag whether the message is talking to a server that has a trusted server. Bug #600663
cifs_umount(struct cifs_sb_info *cifs_sb) { struct rb_root *root = &cifs_sb->tlink_tree; struct rb_node *node; struct tcon_link *tlink; cancel_delayed_work_sync(&cifs_sb->prune_tlinks); spin_lock(&cifs_sb->tlink_tree_lock); while ((node = rb_first(root))) { tlink = rb_entry(node, struct tcon_link, tl_rbnode);...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
23,235,264,295,492,077,000,000,000,000,000,000,000
26
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
add_unsupported_rotation_item (GsdXrandrManager *manager) { struct GsdXrandrManagerPrivate *priv = manager->priv; GtkWidget *item; GtkWidget *label; item = gtk_menu_item_new (); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("<i>Rotation not su...
0
[]
gnome-settings-daemon
be513b3c7d80d0b7013d79ce46d7eeca929705cc
328,908,839,515,271,500,000,000,000,000,000,000,000
15
Implement autoconfiguration of the outputs This is similar in spirit to 'xrandr --auto', but we disfavor selecting clone modes. Instead, we lay out the outputs left-to-right. Signed-off-by: Federico Mena Quintero <federico@novell.com>
const char *string_of_NPNVariable(int variable) { const char *str; switch (variable) { #define _(VAL) case VAL: str = #VAL; break; _(NPNVxDisplay); _(NPNVxtAppContext); _(NPNVnetscapeWindow); _(NPNVjavascriptEnabledBool); _(NPNVasdEnabledBool); _(NPNVisOfflineBool); _(NPNVserviceManager); _(NPNVDOMElement)...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
177,041,656,526,530,260,000,000,000,000,000,000,000
40
Support all the new variables added
add_std_definition(const char *name, const char *value, char *(*fn)(void)) { def_t* def; def = MALLOC(sizeof(*def)); def->name_len = strlen(name); def->name = MALLOC(def->name_len + 1); strcpy(def->name, name); if (value) { def->value_len = strlen(value); def->value = MALLOC(def->value_len + 1); strcpy(def...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
228,244,576,543,170,960,000,000,000,000,000,000,000
19
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
static int irda_create(struct net *net, struct socket *sock, int protocol, int kern) { struct sock *sk; struct irda_sock *self; IRDA_DEBUG(2, "%s()\n", __func__); if (net != &init_net) return -EAFNOSUPPORT; /* Check for valid socket type */ switch (sock->type) { case SOCK_STREAM: /* For TTP con...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
242,830,862,715,326,460,000,000,000,000,000,000,000
80
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static void vma_stop(struct proc_maps_private *priv) { struct mm_struct *mm = priv->mm; release_task_mempolicy(priv); up_read(&mm->mmap_sem); mmput(mm); }
0
[ "CWE-200" ]
linux
ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce
137,202,007,404,441,600,000,000,000,000,000,000,000
8
pagemap: do not leak physical addresses to non-privileged userspace As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information which can be used to do attacks. This disallows anybody without CAP_SYS_ADMIN to read the pagemap. [1] http://googleprojectzero.bl...
static inline struct ahash_request *ahash_dequeue_request( struct crypto_queue *queue) { return ahash_request_cast(crypto_dequeue_request(queue)); }
0
[ "CWE-835" ]
linux
ef0579b64e93188710d48667cb5e014926af9f1b
150,544,330,422,563,100,000,000,000,000,000,000,000
5
crypto: ahash - Fix EINPROGRESS notification callback The ahash API modifies the request's callback function in order to clean up after itself in some corner cases (unaligned final and missing finup). When the request is complete ahash will restore the original callback and everything is fine. However, when the requ...
static int remove_blocked_xattrs(struct lo_data *lo, char *xattr_list, unsigned in_size) { size_t out_index, in_index; /* * As of now we only filter out acl xattrs. If acls are enabled or * they have not been explicitly disabled, there is nothing to * filter. ...
0
[ "CWE-273" ]
qemu
449e8171f96a6a944d1f3b7d3627ae059eae21ca
308,385,332,625,984,180,000,000,000,000,000,000,000
32
virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358) At the start, drop membership of all supplementary groups. This is not required. If we have membership of "root" supplementary group and when we switch uid/gid using setresuid/setsgid, we still retain membership of existing supplemntary groups. An...
static void dump_orphan_list(struct super_block *sb, struct ext4_sb_info *sbi) { struct list_head *l; printk(KERN_ERR "sb orphan head is %d\n", le32_to_cpu(sbi->s_es->s_last_orphan)); printk(KERN_ERR "sb_info orphan list:\n"); list_for_each(l, &sbi->s_orphan) { struct inode *inode = orphan_list_entry(l)...
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
117,775,423,395,247,750,000,000,000,000,000,000,000
17
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
get_cached_table_access(GRANT_INTERNAL_INFO *grant_internal_info, const char *schema_name, const char *table_name) { DBUG_ASSERT(grant_internal_info); if (! grant_internal_info->m_table_lookup_done) { const ACL_internal_schema_access *schema_access; schema_a...
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
40,217,554,900,517,944,000,000,000,000,000,000,000
15
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
/* {{{ php_mysqlnd_cmd_write */ size_t php_mysqlnd_cmd_write(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC) { /* Let's have some space, which we can use, if not enough, we will allocate new buffer */ MYSQLND_PACKET_COMMAND * packet= (MYSQLND_PACKET_COMMAND *) _packet; MYSQLND_NET * net = conn->net; unsigned in...
0
[ "CWE-119", "CWE-787" ]
php-src
28f80baf3c53e267c9ce46a2a0fadbb981585132
174,557,185,158,134,900,000,000,000,000,000,000,000
61
Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields
static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb) { const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh); const struct nft_table *table; unsigned int idx = 0, s_idx = cb->args[0]; struct nft_obj_filter *filter = cb->data; struct net *net = sock_net(skb->sk); int family = nfmsg->nfgen_f...
0
[ "CWE-400", "CWE-703" ]
linux
e02f0d3970404bfea385b6edb86f2d936db0ea2b
98,775,906,102,615,320,000,000,000,000,000,000,000
71
netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung <exsociety@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
z2save(i_ctx_t *i_ctx_p) { if (!save_page_device(igs)) return zsave(i_ctx_p); return push_callout(i_ctx_p, "%savepagedevice"); }
0
[]
ghostpdl
5516c614dc33662a2afdc377159f70218e67bde5
106,573,805,063,950,230,000,000,000,000,000,000,000
6
Improve restore robustness Prompted by looking at Bug 699654: There are two variants of the restore operator in Ghostscript: one is Level 1 (restoring VM), the other is Level 2+ (adding page device restoring to the Level operator). This was implemented by the Level 2+ version restoring the device in the graphics sta...
void rewrite_request_host_path_from_uri(BlockAllocator &balloc, Request &req, const StringRef &uri, http_parser_url &u) { assert(u.field_set & (1 << UF_HOST)); // As per https://tools.ietf.org/html/rfc7230#section-5.4, we // rewrite ...
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
197,397,099,329,856,330,000,000,000,000,000,000,000
73
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
memory_block_action(unsigned long start_section_nr, unsigned long action, int online_type, int nid) { unsigned long start_pfn; unsigned long nr_pages = PAGES_PER_SECTION * sections_per_block; int ret; start_pfn = section_nr_to_pfn(start_section_nr); switch (action) { case MEM_ONLINE: ret = online_pages(...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
254,415,313,823,441,000,000,000,000,000,000,000,000
24
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
void rpushCommand(client *c) { pushGenericCommand(c,LIST_TAIL); }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
18,784,663,482,234,660,000,000,000,000,000,000,000
3
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static void snd_msndmidi_input_trigger(struct snd_rawmidi_substream *substream, int up) { unsigned long flags; struct snd_msndmidi *mpu; snd_printdd("snd_msndmidi_input_trigger(, %i)\n", up); mpu = substream->rmidi->private_data; spin_lock_irqsave(&mpu->input_lock, flags); if (up) { if (!test_and_set_bit...
0
[ "CWE-125", "CWE-401" ]
linux
20e2b791796bd68816fa115f12be5320de2b8021
187,801,256,078,120,530,000,000,000,000,000,000,000
21
ALSA: msnd: Optimize / harden DSP and MIDI loops The ISA msnd drivers have loops fetching the ring-buffer head, tail and size values inside the loops. Such codes are inefficient and fragile. This patch optimizes it, and also adds the sanity check to avoid the endless loops. Bugzilla: https://bugzilla.kernel.org/sho...
long sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, struct pt_regs *regs) { struct sigframe __user *sf; struct sigcontext __user *sc; struct sigcontext sigctx; struct mcontext __user *sr; void __user *addr; sigset_t set; #ifdef CONFIG_PPC_TRANSACTIONAL_MEM struct mcontext __user *mcp, *tm...
0
[ "CWE-20", "CWE-284", "CWE-369" ]
linux
d2b9d2a5ad5ef04ff978c9923d19730cb05efd55
7,339,581,274,691,202,000,000,000,000,000,000,000
69
powerpc/tm: Block signal return setting invalid MSR state Currently we allow both the MSR T and S bits to be set by userspace on a signal return. Unfortunately this is a reserved configuration and will cause a TM Bad Thing exception if attempted (via rfid). This patch checks for this case in both the 32 and 64 bit s...
static int avoid_alias(char *p) { int sl, ndot; /* * This resurrects the belts and suspenders paranoia check by HPA * done in <435560F7.4080006@zytor.com> thread, now enter_repo() * does not do getcwd() based path canonicalizations. * * sl becomes true immediately after seeing '/' and continues to * be t...
0
[]
git
73bb33a94ec67a53e7d805b12ad9264fa25f4f8d
196,430,670,198,683,540,000,000,000,000,000,000,000
46
daemon: Strictly parse the "extra arg" part of the command Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon") git daemon enters an infinite loop and never terminates if a client hides any extra arguments in the initial request line which is not exactly "\0host=blah\0". Since that change, a client m...
static void inv_predict_13(uint8_t *p, const uint8_t *p_l, const uint8_t *p_tl, const uint8_t *p_t, const uint8_t *p_tr) { p[0] = clamp_add_subtract_half(p_l[0], p_t[0], p_tl[0]); p[1] = clamp_add_subtract_half(p_l[1], p_t[1], p_tl[1]); p[2] = clamp_add_subtract_half(p_l[2], p_t[2...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
112,973,644,681,666,620,000,000,000,000,000,000,000
8
avcodec/webp: Always set pix_fmt Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbult...
void NumberFormatTest::Test13737_ParseScientificStrict() { IcuTestErrorCode status(*this, "Test13737_ParseScientificStrict"); LocalPointer<NumberFormat> df(NumberFormat::createScientificInstance("en", status), status); if (!assertSuccess("", status, true, __FILE__, __LINE__)) {return;} df->setLenient(FA...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
313,727,216,478,009,960,000,000,000,000,000,000,000
8
ICU-20246 Fixing another integer overflow in number parsing.
tor_timegm_wrapper(const struct tm *tm) { time_t t; if (tor_timegm(tm, &t) < 0) return -1; return t; }
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
79,991,031,822,405,760,000,000,000,000,000,000,000
7
Fix assertion failure in tor_timegm. Fixes bug 6811.
static int nl80211_send_band_rateinfo(struct sk_buff *msg, struct ieee80211_supported_band *sband) { struct nlattr *nl_rates, *nl_rate; struct ieee80211_rate *rate; int i; /* add HT info */ if (sband->ht_cap.ht_supported && (nla_put(msg, NL80211_BAND_ATTR_HT_MCS_SET, sizeof(sband->ht_cap.mcs...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
122,968,579,300,136,420,000,000,000,000,000,000,000
91
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 ib_uverbs_remove_one(struct ib_device *device, void *client_data) { struct ib_uverbs_device *uverbs_dev = client_data; int wait_clients = 1; if (!uverbs_dev) return; dev_set_drvdata(uverbs_dev->dev, NULL); device_destroy(uverbs_class, uverbs_dev->cdev.dev); cdev_del(&uverbs_dev->cdev); if (uverb...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
191,929,558,162,091,740,000,000,000,000,000,000,000
40
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
int gethostbyaddr_r(const void *addr, socklen_t addrlen, int type, struct hostent *result_buf, char *buf, size_t buflen, struct hostent **result, int *h_errnop) { struct in_addr *in; struct in_addr **addr_list; char **alias; unsigned char *packet; struct resolv_answer a; int i; int packet_len; int ne...
1
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
87,395,765,246,648,440,000,000,000,000,000,000,000
154
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
DirectSpawner(const SafeLibevPtr &_libev, const ResourceLocator &_resourceLocator, const ServerInstanceDir::GenerationPtr &_generation, const RandomGeneratorPtr &_randomGenerator = RandomGeneratorPtr(), const SpawnerConfigPtr &_config = SpawnerConfigPtr()) : Spawner(_resourceLocator), libev(_libev) { ...
0
[]
passenger
8c6693e0818772c345c979840d28312c2edd4ba4
110,824,458,332,181,150,000,000,000,000,000,000,000
20
Security check socket filenames reported by spawned application processes.
mrb_io_close(mrb_state *mrb, mrb_value self) { struct mrb_io *fptr; fptr = io_get_open_fptr(mrb, self); fptr_finalize(mrb, fptr, FALSE); return mrb_nil_value(); }
0
[ "CWE-416", "CWE-787" ]
mruby
b51b21fc63c9805862322551387d9036f2b63433
119,640,380,391,394,800,000,000,000,000,000,000,000
7
Fix `use after free in File#initilialize_copy`; fix #4001 The bug and the fix were reported by https://hackerone.com/pnoltof
void InstanceKlass::store_fingerprint(uint64_t fingerprint) { address adr = adr_fingerprint(); if (adr != NULL) { Bytes::put_native_u8(adr, (u8)fingerprint); // adr may not be 64-bit aligned ResourceMark rm; log_trace(class, fingerprint)("stored as " PTR64_FORMAT " for class %s", fingerprint, external_...
0
[]
jdk11u-dev
41825fa33d605f8501164f9296572e4378e8183b
18,276,959,116,553,318,000,000,000,000,000,000,000
9
8270386: Better verification of scan methods Reviewed-by: mbaesken Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
static int mmap_kvaddr(struct vm_area_struct *vma, u64 pgaddr, struct qib_ctxtdata *rcd, unsigned subctxt) { struct qib_devdata *dd = rcd->dd; unsigned subctxt_cnt; unsigned long len; void *addr; size_t size; int ret = 0; subctxt_cnt = rcd->subctxt_cnt; size = rcd->rcvegrbuf_chunks * rcd->rcvegrbuf_si...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
19,329,546,483,262,427,000,000,000,000,000,000,000
71
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
varbit_in(PG_FUNCTION_ARGS) { char *input_string = PG_GETARG_CSTRING(0); #ifdef NOT_USED Oid typelem = PG_GETARG_OID(1); #endif int32 atttypmod = PG_GETARG_INT32(2); VarBit *result; /* The resulting bit string */ char *sp; /* pointer into the character string */ bits8 *r; /* pointer i...
1
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
52,487,879,411,292,130,000,000,000,000,000,000,000
116
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
main (int argc, char *const *argv) { unsigned int errorCount = 0; (void) argc; (void) argv; /* Unused. Silent compiler warning. */ errorCount += test_multipart_splits (); errorCount += test_multipart_garbage (); errorCount += test_urlencoding (); errorCount += test_multipart (); errorCount += test_neste...
1
[ "CWE-120" ]
libmicrohttpd
a110ae6276660bee3caab30e9ff3f12f85cf3241
16,047,715,124,559,428,000,000,000,000,000,000,000
15
fix buffer overflow and add test
add_bitset(regex_t* reg, BitSetRef bs) { BBUF_ADD(reg, bs, SIZE_BITSET); return 0; }
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
254,637,243,331,347,860,000,000,000,000,000,000,000
5
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
u32 gf_utf8_wcstombs(char* dest, size_t len, const unsigned short** srcp) { if (!srcp || !*srcp) return 0; else { const UTF16** sourceStart = srcp; const UTF16* sourceEnd = *srcp + gf_utf8_wcslen(*srcp); UTF8* targetStart = (UTF8*) dest; UTF8* targetEnd = (UTF8*) dest + len; ConversionFlags flags = strict...
0
[ "CWE-276" ]
gpac
96699aabae042f8f55cf8a85fa5758e3db752bae
2,470,335,122,302,545,400,000,000,000,000,000,000
18
fixed #2061
evdns_base_nameserver_sockaddr_add(struct evdns_base *base, const struct sockaddr *sa, ev_socklen_t len, unsigned flags) { int res; EVUTIL_ASSERT(base); EVDNS_LOCK(base); res = evdns_nameserver_add_impl_(base, sa, len); EVDNS_UNLOCK(base); return res; }
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
163,113,980,712,999,540,000,000,000,000,000,000,000
10
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
#ifndef GPAC_DISABLE_ISOM_DUMP GF_Err dump_isom_xml(GF_ISOFile *file, char *inName, Bool is_final_name, Bool do_track_dump, Bool merge_vtt_cues, Bool skip_init, Bool skip_samples) { GF_Err e; FILE *dump = stdout; Bool do_close=GF_FALSE; if (!file) return GF_ISOM_INVALID_FILE; if (inName) { char szBuf[1024]; ...
0
[ "CWE-476", "CWE-401" ]
gpac
289ffce3e0d224d314f5f92a744d5fe35999f20b
262,543,833,230,432,420,000,000,000,000,000,000,000
101
fixed #1767 (fuzz)
static bool edge_tx_empty(struct usb_serial_port *port) { struct edgeport_port *edge_port = usb_get_serial_port_data(port); int ret; ret = tx_active(edge_port); if (ret > 0) return false; return true; }
0
[ "CWE-191" ]
linux
654b404f2a222f918af9b0cd18ad469d0c941a8e
85,454,337,284,327,960,000,000,000,000,000,000,000
11
USB: serial: io_ti: fix information leak in completion handler Add missing sanity check to the bulk-in completion handler to avoid an integer underflow that can be triggered by a malicious device. This avoids leaking 128 kB of memory content from after the URB transfer buffer to user space. Fixes: 8c209e6782ca ("USB...
xfs_set_inode_alloc( struct xfs_mount *mp, xfs_agnumber_t agcount) { xfs_agnumber_t index; xfs_agnumber_t maxagi = 0; xfs_sb_t *sbp = &mp->m_sb; xfs_agnumber_t max_metadata; xfs_agino_t agino; xfs_ino_t ino; /* * Calculate how much should be reserved for inodes to meet * the max inode percentage. Used on...
0
[ "CWE-416" ]
linux
c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82
84,576,649,182,285,490,000,000,000,000,000,000,000
70
xfs: clear sb->s_fs_info on mount failure We recently had an oops reported on a 4.14 kernel in xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage and so the m_perag_tree lookup walked into lala land. Essentially, the machine was under memory pressure when the mount was being run, xfs_fs_fill_super() fa...
int snd_sof_debugfs_io_item(struct snd_sof_dev *sdev, void __iomem *base, size_t size, const char *name, enum sof_debugfs_access_type access_type) { struct snd_sof_dfsentry *dfse; if (!sdev) return -EINVAL; dfse = devm_kzalloc(sdev->dev, sizeof(*dfse), GFP_KERNEL); if (!dfse) return -ENOM...
0
[ "CWE-400", "CWE-401" ]
linux
c0a333d842ef67ac04adc72ff79dc1ccc3dca4ed
66,750,143,792,098,630,000,000,000,000,000,000,000
40
ASoC: SOF: Fix memory leak in sof_dfsentry_write In the implementation of sof_dfsentry_write() memory allocated for string is leaked in case of an error. Go to error handling path if the d_name.name is not valid. Fixes: 091c12e1f50c ("ASoC: SOF: debug: add new debugfs entries for IPC flood test") Signed-off-by: Navid...
void CLASS phase_one_load_raw() { int a, b, i; ushort akey, bkey, t_mask; fseek (ifp, ph1.key_off, SEEK_SET); akey = get2(); bkey = get2(); t_mask = ph1.format == 1 ? 0x5555:0x1354; fseek (ifp, data_offset, SEEK_SET); read_shorts (raw_image, raw_width*raw_height); if (ph1.format) for (i=0; i < ra...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
323,869,071,706,005,560,000,000,000,000,000,000,000
19
cumulated data checks patch
rsvg_handle_close_impl (RsvgHandle * handle, GError ** error) { GError *real_error = NULL; handle->priv->is_closed = TRUE; handle->priv->error = &real_error; if (handle->priv->ctxt != NULL) { xmlDocPtr xmlDoc; int result; xmlDoc = handle->priv->ctxt->myDoc; result = xml...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
297,038,400,433,852,600,000,000,000,000,000,000,000
37
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...
static avifBool avifParseSyncSampleBox(avifSampleTable * sampleTable, const uint8_t * raw, size_t rawLen) { BEGIN_STREAM(s, raw, rawLen); CHECK(avifROStreamReadAndEnforceVersion(&s, 0)); uint32_t entryCount; CHECK(avifROStreamReadU32(&s, &entryCount)); // unsigned int(32) entry_count; for (uint32...
0
[ "CWE-703", "CWE-787" ]
libavif
0a8e7244d494ae98e9756355dfbfb6697ded2ff9
20,523,922,049,864,853,000,000,000,000,000,000,000
17
Set max image size to 16384 * 16384 Fix https://crbug.com/oss-fuzz/24728 and https://crbug.com/oss-fuzz/24734.
static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done) { tftp_event_t event; CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc; long timeout_ms = tftp_state_timeout(...
0
[ "CWE-787" ]
curl
facb0e4662415b5f28163e853dc6742ac5fafb3d
151,288,342,021,119,420,000,000,000,000,000,000,000
51
tftp: Alloc maximum blksize, and use default unless OACK is received Fixes potential buffer overflow from 'recvfrom()', should the server return an OACK without blksize. Bug: https://curl.haxx.se/docs/CVE-2019-5482.html CVE-2019-5482
void delete_atomic_file(void) { const char *atomic_file; if ((atomic_file = get_atomic_file(NULL)) == NULL || *atomic_file == 0) { return; } (void) unlink(atomic_file); atomic_file = NULL; }
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
286,840,011,597,965,600,000,000,000,000,000,000,000
10
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
static int notify_push(unsigned int event_type, u32 controller) { struct capictr_event *event = kmalloc(sizeof(*event), GFP_ATOMIC); if (!event) return -ENOMEM; INIT_WORK(&event->work, do_notify_work); event->type = event_type; event->controller = controller; queue_work(kcapi_wq, &event->work); return 0; }
0
[ "CWE-125" ]
linux
1f3e2e97c003f80c4b087092b225c8787ff91e4d
103,542,808,050,897,040,000,000,000,000,000,000,000
14
isdn: cpai: check ctr->cnr to avoid array index out of bound The cmtp_add_connection() would add a cmtp session to a controller and run a kernel thread to process cmtp. __module_get(THIS_MODULE); session->task = kthread_run(cmtp_session, session, "kcmtpd_ctr_%d", session->num); During this process, the ker...
uint Item_hex_hybrid::decimal_precision() const { switch (max_length) {// HEX DEC case 0: // ---- --- case 1: return 3; // 0xFF 255 case 2: return 5; // 0xFFFF 65535 case...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
116,274,710,138,072,180,000,000,000,000,000,000,000
14
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.
ChangeScrollRegion(newtop, newbot) int newtop, newbot; { if (display == 0) return; if (newtop == newbot) return; /* xterm etc can't do it */ if (newtop == -1) newtop = 0; if (newbot == -1) newbot = D_height - 1; if (D_CS == 0) { D_top = 0; D_bot = D_height - 1; return; ...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
166,122,437,494,669,460,000,000,000,000,000,000,000
25
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 ...
add_process (name, pid) char *name; pid_t pid; { PROCESS *t, *p; #if defined (RECYCLES_PIDS) int j; p = find_process (pid, 0, &j); if (p) { # ifdef DEBUG if (j == NO_JOB) internal_warning (_("add_process: process %5ld (%s) in the_pipeline"), (long)p->pid, p->command); # endif if (P...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
313,402,727,074,700,700,000,000,000,000,000,000,000
39
bash-4.4-rc2 release
int sctp_ulpq_tail_data(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, gfp_t gfp) { struct sk_buff_head temp; sctp_data_chunk_t *hdr; struct sctp_ulpevent *event; hdr = (sctp_data_chunk_t *) chunk->chunk_hdr; /* Create an event from the incoming chunk. */ event = sctp_ulpevent_make_rcvmsg(chunk->asoc, chu...
0
[]
linux-2.6
672e7cca17ed6036a1756ed34cf20dbd72d5e5f6
49,721,564,729,464,450,000,000,000,000,000,000,000
34
[SCTP]: Prevent possible infinite recursion with multiple bundled DATA. There is a rare situation that causes lksctp to go into infinite recursion and crash the system. The trigger is a packet that contains at least the first two DATA fragments of a message bundled together. The recursion is triggered when the user d...
static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) { struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); u32 prior_snd_una = tp->snd_una; u32 ack_seq = TCP_SKB_CB(skb)->seq; u32 ack = TCP_SKB_CB(skb)->ack_seq; bool is_dupack = false; u32 prior_in_flight; u32...
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
132,185,992,353,814,300,000,000,000,000,000,000,000
144
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...