func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void tcp_dsack_set(struct sock *sk, u32 seq, u32 end_seq) { struct tcp_sock *tp = tcp_sk(sk); if (tcp_is_sack(tp) && sysctl_tcp_dsack) { int mib_idx; if (before(seq, tp->rcv_nxt)) mib_idx = LINUX_MIB_TCPDSACKOLDSENT; else mib_idx = LINUX_MIB_TCPDSACKOFOSENT; NET_INC_STATS(sock_net(sk), mib_idx...
0
[ "CWE-200" ]
net
75ff39ccc1bd5d3c455b6822ab09e533c551f758
185,744,436,745,575,240,000,000,000,000,000,000,000
19
tcp: make challenge acks less predictable Yue Cao claims that current host rate limiting of challenge ACKS (RFC 5961) could leak enough information to allow a patient attacker to hijack TCP sessions. He will soon provide details in an academic paper. This patch increases the default limit from 100 to 1000, and adds s...
static int kvm_vm_ioctl_get_irqchip(struct kvm *kvm, struct kvm_irqchip *chip) { int r; r = 0; switch (chip->chip_id) { case KVM_IRQCHIP_PIC_MASTER: memcpy(&chip->chip.pic, &pic_irqchip(kvm)->pics[0], sizeof(struct kvm_pic_state)); break; case KVM_IRQCHIP_PIC_SLAVE: memcpy(&chip->chip.pic, &pic_irq...
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
116,308,303,169,068,900,000,000,000,000,000,000,000
25
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
static int suspend_set_state(struct regulator_dev *rdev, struct regulator_state *rstate) { int ret = 0; /* If we have no suspend mode configration don't set anything; * only warn if the driver implements set_suspend_voltage or * set_suspend_mode callback. */ if (!rstate->enabled && !rstate->disabled) { if ...
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
262,590,152,762,059,660,000,000,000,000,000,000,000
50
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
int i2400m_op_rfkill_sw_toggle(struct wimax_dev *wimax_dev, enum wimax_rf_state state) { int result; struct i2400m *i2400m = wimax_dev_to_i2400m(wimax_dev); struct device *dev = i2400m_dev(i2400m); struct sk_buff *ack_skb; struct { struct i2400m_l3l4_hdr hdr; struct i2400m_tlv_rf_operation sw_rf; } ...
0
[ "CWE-400", "CWE-401" ]
linux
6f3ef5c25cc762687a7341c18cbea5af54461407
86,645,922,023,293,150,000,000,000,000,000,000,000
69
wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle In the implementation of i2400m_op_rfkill_sw_toggle() the allocated buffer for cmd should be released before returning. The documentation for i2400m_msg_to_dev() says when it returns the buffer can be reused. Meaning cmd should be released in either case. Mov...
static int getnpasses(Jpeg2000DecoderContext *s) { int num; if (!get_bits(s, 1)) return 1; if (!get_bits(s, 1)) return 2; if ((num = get_bits(s, 2)) != 3) return num < 0 ? num : 3 + num; if ((num = get_bits(s, 5)) != 31) return num < 0 ? num : 6 + num; num = get_b...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
9a271a9368eaabf99e6c2046103acb33957e63b7
256,986,612,180,191,150,000,000,000,000,000,000,000
14
jpeg2000: check log2_cblk dimensions Fixes out of array access Fixes Ticket2895 Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
void exit_robust_list(struct task_struct *curr) { struct robust_list_head __user *head = curr->robust_list; struct robust_list __user *entry, *next_entry, *pending; unsigned int limit = ROBUST_LIST_LIMIT, pi, pip; unsigned int uninitialized_var(next_pi); unsigned long futex_offset; int rc; if (!futex_cmpxchg_en...
0
[ "CWE-264", "CWE-269" ]
linux
e9c243a5a6de0be8e584c604d353412584b592f8
8,408,842,387,785,284,000,000,000,000,000,000,000
62
futex-prevent-requeue-pi-on-same-futex.patch futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1) If uaddr == uaddr2, then we have broken the rule of only requeueing from a non-pi futex to a pi futex with this call. If we attempt this, then dangling pointers may be left for rt_waiter resulting in an expl...
int st21nfca_apdu_reader_event_received(struct nfc_hci_dev *hdev, u8 event, struct sk_buff *skb) { int r = 0; struct st21nfca_hci_info *info = nfc_hci_get_clientdata(hdev); pr_debug("apdu reader gate event: %x\n", event); switch (event) { case ST21NFCA_EVT_TRANSMIT_DATA: del_timer_sync(&info->se_info.bwi_...
0
[ "CWE-120" ]
linux
4fbcc1a4cb20fe26ad0225679c536c80f1648221
195,484,059,902,040,960,000,000,000,000,000,000,000
33
nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION It appears that there are some buffer overflows in EVT_TRANSACTION. This happens because the length parameters that are passed to memcpy come directly from skb->data and are not guarded in any way. Signed-off-by: Jordy Zomer <jordy@pwning.systems> Revie...
static void readCoord(u8 *p, RtreeCoord *pCoord){ assert( ((((char*)p) - (char*)0)&3)==0 ); /* p is always 4-byte aligned */ #if SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300 pCoord->u = _byteswap_ulong(*(u32*)p); #elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000 pCoord->u = __builtin_bswap32(*(u32*)p); #elif ...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
75,625,188,075,233,800,000,000,000,000,000,000,000
17
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
GF_Err trik_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 i; GF_TrickPlayBox *ptr = (GF_TrickPlayBox *) s; e = gf_isom_full_box_write(s, bs); if (e) return e; for (i=0; i < ptr->entry_count; i++ ) { gf_bs_write_int(bs, ptr->entries[i].pic_type, 2); gf_bs_write_int(bs, ptr->entries[i].dependency_le...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
179,237,889,626,684,700,000,000,000,000,000,000,000
15
fixed #1587
bool peekSet() { T_VIRTUAL_CALL(); return peekSet_virt(); }
0
[ "CWE-20", "CWE-755" ]
fbthrift
01686e15ec77ccb4d49a77d5bce3a01601e54d64
290,627,683,033,064,060,000,000,000,000,000,000,000
4
Throw on skipping an invalid type. Summary: Certain values (e.g.) T_STOP should not appear as a skip type. Allowing them to can cause thrift to loop unboundedly. Reviewed By: spalamarchuk Differential Revision: D15102451 fbshipit-source-id: c08d52f44f37e9c212d3480233ac217105586c9f
static void cmd_parse_capability(struct ImapData *idata, char *s) { mutt_debug(3, "Handling CAPABILITY\n"); s = imap_next_word(s); char *bracket = strchr(s, ']'); if (bracket) *bracket = '\0'; FREE(&idata->capstr); idata->capstr = mutt_str_strdup(s); memset(idata->capabilities, 0, sizeof(idata->capa...
0
[ "CWE-78", "CWE-77" ]
neomutt
e52393740334443ae0206cab2d7caef381646725
225,010,600,387,800,200,000,000,000,000,000,000,000
27
quote imap strings more carefully Co-authored-by: JerikoOne <jeriko.one@gmx.us>
static noinline int acls_after_inode_item(struct extent_buffer *leaf, int slot, u64 objectid) { u32 nritems = btrfs_header_nritems(leaf); struct btrfs_key found_key; int scanned = 0; slot++; while (slot < nritems) { btrfs_item_key_to_cpu(leaf, &found_key, slot); /* we found a different objectid, there...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
277,380,149,524,147,550,000,000,000,000,000,000,000
44
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
execute_case_command (case_command) CASE_COM *case_command; { register WORD_LIST *list; WORD_LIST *wlist, *es; PATTERN_LIST *clauses; char *word, *pattern; int retval, match, ignore_return, save_line_number; save_line_number = line_number; line_number = case_command->line; command_string_index = ...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
71,402,133,377,305,255,000,000,000,000,000,000,000
99
commit bash-20120224 snapshot
print_p2r_iccclock (const unsigned char *msg, size_t msglen) { print_p2r_header ("PC_to_RDR_IccClock", msg, msglen); if (msglen < 10) return; DEBUGOUT_1 (" bClockCommand .....: 0x%02x\n", msg[7]); print_pr_data (msg, msglen, 8); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
13,690,907,065,009,380,000,000,000,000,000,000,000
8
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 ...
BOOL msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR* MsConfg, wStream* out) { UINT32 inum = 0; MSUSB_INTERFACE_DESCRIPTOR** MsInterfaces; MSUSB_INTERFACE_DESCRIPTOR* MsInterface; if (!MsConfg) return FALSE; if (!Stream_EnsureRemainingCapacity(out, 8)) return FALSE; /* ConfigurationHandle*/ Stream_Write_UINT...
0
[ "CWE-190" ]
FreeRDP
9f77fc3dd2394373e1be753952b00dafa1a9b7da
192,511,978,851,124,600,000,000,000,000,000,000,000
29
Fixed int overflow in msusb_mspipes_read Thanks to hac425
static void FontView_Free(FontView *fv) { int i; FontView *prev; FontView *fvs; if ( fv->b.sf == NULL ) /* Happens when usurping a font to put it into an MM */ BDFFontFree(fv->filled); else if ( fv->b.nextsame==NULL && fv->b.sf->fv==&fv->b ) { EncMapFree(fv->b.map); if (fv->b.sf != NULL && fv->b...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
123,464,887,899,398,570,000,000,000,000,000,000,000
44
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static char *get_eow(char *s, char *e) { while (s<e && *s && !isblank(*s) && *s != '\n') s++; return s; }
0
[ "CWE-284", "CWE-862" ]
lxc
16af238036a5464ae8f2420ed3af214f0de875f9
306,543,988,485,093,730,000,000,000,000,000,000,000
6
CVE-2017-5985: Ensure target netns is caller-owned Before this commit, lxc-user-nic could potentially have been tricked into operating on a network namespace over which the caller did not hold privilege. This commit ensures that the caller is privileged over the network namespace by temporarily dropping privilege. L...
static int __sev_dbg_decrypt(struct kvm *kvm, unsigned long src_paddr, unsigned long dst_paddr, int sz, int *err) { int offset; /* * Its safe to read more than we are asked, caller should ensure that * destination has enough space. */ offset = src_paddr & 15; src_paddr = round_down(src_paddr, 16); s...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
159,083,133,113,063,120,000,000,000,000,000,000,000
15
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
bool stringfgets(FILE* fp, std::string& line) { char buffer[1024]; line.clear(); do { if(!fgets(buffer, sizeof(buffer), fp)) return !line.empty(); line.append(buffer); } while(!strchr(buffer, '\n')); return true; }
0
[ "CWE-399" ]
pdns
881b5b03a590198d03008e4200dd00cc537712f3
37,432,419,503,268,060,000,000,000,000,000,000,000
13
Reject qname's wirelength > 255, `chopOff()` handle dot inside labels
PHP_FUNCTION(xmlrpc_is_fault) { zval *arg; if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &arg) == FAILURE) { return; } /* The "correct" way to do this would be to call the xmlrpc * library XMLRPC_ValueIsFault() func. However, doing that * would require us to create an xmlrpc value from the php * array,...
0
[]
php-src
f3c1863aa2721343245b63ac7bd68cfdc3dd41f3
220,854,840,109,757,760,000,000,000,000,000,000,000
21
Fixed #70728 Conflicts: ext/xmlrpc/xmlrpc-epi-php.c
static void fuse_writepage_end(struct fuse_conn *fc, struct fuse_req *req) { struct inode *inode = req->inode; struct fuse_inode *fi = get_fuse_inode(inode); mapping_set_error(inode->i_mapping, req->out.h.error); spin_lock(&fc->lock); fi->writectr--; fuse_writepage_finish(fc, req); spin_unlock(&fc->lock); fuse...
0
[]
linux-2.6
0bd87182d3ab18a32a8e9175d3f68754c58e3432
67,892,843,624,044,160,000,000,000,000,000,000,000
12
fuse: fix kunmap in fuse_ioctl_copy_user Looks like another victim of the confusing kmap() vs kmap_atomic() API differences. Reported-by: Todor Gyumyushev <yodor1@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Tejun Heo <tj@kernel.org> Cc: stable@kern...
mono_thread_push_appdomain_ref (MonoDomain *domain) { MonoInternalThread *thread = mono_thread_internal_current (); if (thread) { /* printf ("PUSH REF: %"G_GSIZE_FORMAT" -> %s.\n", (gsize)thread->tid, domain->friendly_name); */ SPIN_LOCK (thread->lock_thread_id); if (thread->appdomain_refs == NULL) thread->...
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
234,307,085,666,043,800,000,000,000,000,000,000,000
13
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) { return security_ops->secid_to_secctx(secid, secdata, seclen); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
220,340,253,765,178,070,000,000,000,000,000,000,000
4
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...
int gfs2_rgrp_send_discards(struct gfs2_sbd *sdp, u64 offset, struct buffer_head *bh, const struct gfs2_bitmap *bi, unsigned minlen, u64 *ptrimmed) { struct super_block *sb = sdp->sd_vfs; u64 blk; sector_t start = 0; sector_t nr_blks = 0; int rv; unsigned int x; u32 trimmed = 0; u8 diff; for (...
0
[ "CWE-416" ]
linux
36e4ad0316c017d5b271378ed9a1c9a4b77fab5f
230,018,810,870,803,980,000,000,000,000,000,000,000
66
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree Before this patch, function read_rindex_entry would set a rgrp glock's gl_object pointer to itself before inserting the rgrp into the rgrp rbtree. The problem is: if another process was also reading the rgrp in, and had already inserted its newly create...
e_ews_connection_create_folder (EEwsConnection *cnc, gint pri, const gchar *parent_folder_id, gboolean is_distinguished_id, const gchar *folder_name, EEwsFolder...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
171,913,015,429,551,000,000,000,000,000,000,000,000
96
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
void kvm_vcpu_uninit(struct kvm_vcpu *vcpu) { put_pid(vcpu->pid); kvm_arch_vcpu_uninit(vcpu); free_page((unsigned long)vcpu->run); }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
294,963,452,133,539,140,000,000,000,000,000,000,000
6
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
ClientHttpRequest::logRequest() { if (!out.size && logType.oldType == LOG_TAG_NONE) debugs(33, 5, "logging half-baked transaction: " << log_uri); al->icp.opcode = ICP_INVALID; al->url = log_uri; debugs(33, 9, "clientLogRequest: al.url='" << al->url << "'"); const auto findReply = [this]() ...
0
[ "CWE-116" ]
squid
7024fb734a59409889e53df2257b3fc817809fb4
306,536,448,001,964,700,000,000,000,000,000,000,000
100
Handle more Range requests (#790) Also removed some effectively unused code.
local unsigned long gf2_matrix_times(unsigned long *mat, unsigned long vec) { unsigned long sum; sum = 0; while (vec) { if (vec & 1) sum ^= *mat; vec >>= 1; mat++; } return sum; }
0
[ "CWE-703", "CWE-22" ]
pigz
fdad1406b3ec809f4954ff7cdf9e99eb18c2458f
42,072,312,235,361,613,000,000,000,000,000,000,000
13
When decompressing with -N or -NT, strip any path from header name. This uses the path of the compressed file combined with the name from the header as the name of the decompressed output file. Any path information in the header name is stripped. This avoids a possible vulnerability where absolute or descending path...
BIGNUM *SRP_Calc_client_key(BIGNUM *N, BIGNUM *B, BIGNUM *g, BIGNUM *x, BIGNUM *a, BIGNUM *u) { BIGNUM *tmp = NULL, *tmp2 = NULL, *tmp3 = NULL , *k = NULL, *K = NULL; BN_CTX *bn_ctx; if (u == NULL || B == NULL || N == NULL || g == NULL || x == NULL || a == NULL || (bn_ctx = BN_CTX_new()) == NULL) return NULL; ...
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
92,765,984,637,737,110,000,000,000,000,000,000,000
39
Add SRP support.
fs_print(netdissect_options *ndo, const u_char *bp, u_int length) { uint32_t fs_op; uint32_t i; if (length <= sizeof(struct rx_header)) return; /* * Print out the afs call we're invoking. The table used here was * gleaned from fsint/afsint.xg */ ND_TCHECK_4(bp + sizeof(struct rx_header)); fs_...
0
[]
tcpdump
4154778a262b4a7449141535a99da4d13b4c8b2e
83,654,805,310,785,150,000,000,000,000,000,000,000
165
RX: Fix a data fetch The serviceId field is 2 bytes long, therefore use EXTRACT_BE_U_2 to fetch it.
gdm_session_worker_finalize (GObject *object) { GdmSessionWorker *worker; g_return_if_fail (object != NULL); g_return_if_fail (GDM_IS_SESSION_WORKER (object)); worker = GDM_SESSION_WORKER (object); g_return_if_fail (worker->priv != NULL); gdm_session_worker_unwatch_ch...
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
51,045,595,715,349,980,000,000,000,000,000,000,000
30
Store the face and dmrc files in a cache. Refer to bug #565151.
inf_gtk_certificate_manager_new(GtkWindow* parent_window, InfXmppManager* xmpp_manager, const gchar* known_hosts_file) { GObject* object; object = g_object_new( INF_GTK_TYPE_CERTIFICATE_MANAGER, "parent-window", parent_window, "xmpp-manage...
0
[ "CWE-295" ]
libinfinity
c97f870f5ae13112988d9f8ad464b4f679903706
169,077,505,348,996,840,000,000,000,000,000,000,000
16
Fix expired certificate validation (gobby #61)
void CWebServer::Cmd_UpdateDevices(WebEmSession & session, const request& req, Json::Value &root) { std::string script = request::findValue(&req, "script"); if (script.empty()) { return; } std::string content = req.content; std::vector<std::string> allParameters; // Keep the url content o...
0
[ "CWE-89" ]
domoticz
ee70db46f81afa582c96b887b73bcd2a86feda00
111,599,207,028,180,310,000,000,000,000,000,000,000
28
Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!)
static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) { struct net *net = sock_net(in_skb->sk); struct rtmsg *rtm; struct nlattr *tb[RTA_MAX+1]; struct fib_result res = {}; struct rtable *rt = NULL; struct flowi4 fl4; __be32 dst = 0; __be32 src = 0; ...
1
[ "CWE-476" ]
linux
bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205
138,523,950,409,692,440,000,000,000,000,000,000,000
123
net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set Syzkaller hit 'general protection fault in fib_dump_info' bug on commit 4.13-rc5.. Guilty file: net/ipv4/fib_semantics.c kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked...
static const char *set_protocol(cmd_parms *cmd, void *dummy, const char *arg) { const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_CONTEXT); core_server_config *conf = ap_get_core_module_config(cmd->server->module_config); char* proto; if (err != NULL) { ...
0
[]
httpd
ecebcc035ccd8d0e2984fe41420d9e944f456b3c
82,133,112,125,746,070,000,000,000,000,000,000,000
18
Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk: *) core: Split ap_create_request() from ap_read_request(). [Graham Leggett] *) core, h2: common ap_parse_request_line() and ap_check_request_header() code. [Yann Ylavic] ...
static MagickBooleanType EncodeLabImage(Image *image,ExceptionInfo *exception) { CacheView *image_view; MagickBooleanType status; ssize_t y; status=MagickTrue; image_view=AcquireAuthenticCacheView(image,exception); for (y=0; y < (ssize_t) image->rows; y++) { register PixelPacket *...
0
[ "CWE-400" ]
ImageMagick6
0701e59f00194897494fa2be74cee8ca626d8f6f
30,647,353,221,793,607,000,000,000,000,000,000,000
51
https://github.com/ImageMagick/ImageMagick/issues/664
cms_context_init(cms_context *cms) { memset(cms, '\0', sizeof (*cms)); cms->log = cms_common_log; cms->arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (!cms->arena) cnreterr(-1, cms, "could not create cryptographic arena"); cms->selected_digest = -1; INIT_LIST_HEAD(&cms->pk12_ins); cms->pk12_out.fd = -1; ...
0
[ "CWE-787" ]
pesign
b879dda52f8122de697d145977c285fb0a022d76
97,368,831,086,487,940,000,000,000,000,000,000,000
18
Handle NULL pwdata in cms_set_pw_data() When 12f16710ee44ef64ddb044a3523c3c4c4d90039a rewrote this function, it didn't handle the NULL pwdata invocation from daemon.c. This leads to a explicit NULL dereference and crash on all attempts to daemonize pesign. Signed-off-by: Robbie Harwood <rharwood@redhat.com>
#ifdef XP_OPTIMIZED_FILTER_FIRST static int xmlXPathCompOpEvalFilterFirst(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op, xmlNodePtr * first) { int total = 0; xmlXPathCompExprPtr comp; xmlXPathObjectPtr res; xmlXPathObjectPtr obj; xmlNodeSetPtr oldset; xmlNodePtr oldnode; xmlDo...
0
[]
libxml2
03c6723043775122313f107695066e5744189a08
253,374,849,215,515,700,000,000,000,000,000,000,000
295
Handling of XPath function arguments in error case The XPath engine tries to guarantee that every XPath function can pop 'nargs' non-NULL values off the stack. libxslt, for example, relies on this assumption. But the check isn't thorough enough if there are errors during the evaluation of arguments. This can lead to s...
bool set_main_unit(st_select_lex_unit *u) { unit.options= u->options; unit.uncacheable= u->uncacheable; unit.register_select_chain(u->first_select()); unit.first_select()->options|= builtin_select.options; unit.fake_select_lex= u->fake_select_lex; unit.union_distinct= u->union_distinct; ...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
293,299,993,583,564,900,000,000,000,000,000,000,000
12
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static int proc_reapurb_compat(struct usb_dev_state *ps, void __user *arg) { struct async *as = reap_as(ps); if (as) { int retval; snoop(&ps->dev->dev, "reap %p\n", as->userurb); retval = processcompl_compat(as, (void __user * __user *)arg); free_async(as); return retval; } if (signal_pending(current)) ...
0
[ "CWE-200" ]
linux
681fef8380eb818c0b845fca5d2ab1dcbab114ee
44,971,032,533,198,330,000,000,000,000,000,000,000
16
USB: usbfs: fix potential infoleak in devio The stack object “ci” has a total size of 8 bytes. Its last 3 bytes are padding bytes which are not initialized and leaked to userland via “copy_to_user”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static void resched_task(struct task_struct *p) { int cpu; assert_raw_spin_locked(&task_rq(p)->lock); if (test_tsk_need_resched(p)) return; set_tsk_need_resched(p); cpu = task_cpu(p); if (cpu == smp_processor_id()) return; /* NEED_RESCHED must be visible before we test polling */ smp_mb(); if (!tsk_is...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
243,593,184,097,798,280,000,000,000,000,000,000,000
20
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
X509_TRUST * X509_TRUST_get0(int idx) { if(idx < 0) return NULL; if(idx < (int)X509_TRUST_COUNT) return trstandard + idx; return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT); }
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
293,070,432,100,474,540,000,000,000,000,000,000,000
6
Backport OCSP fixes.
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 1); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* input = GetInput(context, node, kInputTensor); TfLiteTensor* output = GetOutput(context, node, kOutputTensor); auto* params = ...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
110,690,327,601,701,330,000,000,000,000,000,000,000
50
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static inline void process_get_command(conn *c, token_t *tokens, size_t ntokens, bool return_cas, bool should_touch) { char *key; size_t nkey; item *it; token_t *key_token = &tokens[KEY_TOKEN]; int32_t exptime_int = 0; rel_time_t exptime = 0; bool fail_length = false; assert(c != NULL); ...
0
[]
memcached
f249724cedcab6605ca8a0769ac4b356a8124f63
122,655,341,937,757,310,000,000,000,000,000,000,000
174
crash fix: errstr wasn't initialized in metaget if meta_flag_preparse bailed out early it would try to read uninitialized memory.
delete_never(key, value, never) st_data_t key, value, never; #endif { if (value == never) return ST_DELETE; return ST_CONTINUE; }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
49,954,008,698,425,160,000,000,000,000,000,000,000
7
onig-5.9.2
NM nm_new_v4(struct in_addr *s) { NM self; union { struct in6_addr s6; uint32_t u32[4]; } v; v.u32[0] = 0; v.u32[1] = 0; v.u32[2] = htonl(0x0000ffff); v.u32[3] = s->s_addr; self = nm_new_v6(&v.s6); self->domain = AF_INET; return self; }
0
[]
netmask
29a9c239bd1008363f5b34ffd6c2cef906f3660c
288,161,029,024,768,600,000,000,000,000,000,000,000
15
bump version to 2.4.4 * remove checks for negative unsigned ints, fixes #2 * harden error logging functions, fixes #3
zone_iattach(dns_zone_t *source, dns_zone_t **target) { /* * 'source' locked by caller. */ REQUIRE(LOCKED_ZONE(source)); REQUIRE(DNS_ZONE_VALID(source)); REQUIRE(target != NULL && *target == NULL); INSIST(source->irefs + isc_refcount_current(&source->erefs) > 0); source->irefs++; INSIST(source->irefs != 0);...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
190,744,059,800,794,640,000,000,000,000,000,000,000
13
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
PHP_FUNCTION(tempnam) { char *dir, *prefix; int dir_len, prefix_len; size_t p_len; char *opened_path; char *p; int fd; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &dir, &dir_len, &prefix, &prefix_len) == FAILURE) { return; } if (strlen(dir) != dir_len) { RETURN_FALSE; } if (strlen(prefi...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
329,442,501,065,874,640,000,000,000,000,000,000,000
42
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
get_string (Buffer *buffer, Header *header, guint32 *offset, guint32 end_offset) { guint8 len; char *str; *offset = align_by_4 (*offset); if (*offset + 4 >= end_offset) return FALSE; len = read_uint32 (header, &buffer->data[*offset]); *offset += 4; if ((*offset) + len + 1 > end_offset) return ...
0
[ "CWE-284", "CWE-436" ]
flatpak
52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
220,943,915,523,460,630,000,000,000,000,000,000,000
23
Fix vulnerability in dbus proxy During the authentication all client data is directly forwarded to the dbus daemon as is, until we detect the BEGIN command after which we start filtering the binary dbus protocol. Unfortunately the detection of the BEGIN command in the proxy did not exactly match the detection in the ...
static void conn_to_str(const conn *c, char *buf) { char addr_text[MAXPATHLEN]; if (!c) { strcpy(buf, "<null>"); } else if (c->state == conn_closed) { strcpy(buf, "<closed>"); } else { const char *protoname = "?"; struct sockaddr_in6 local_addr; struct sockaddr *...
0
[ "CWE-190" ]
memcached
bd578fc34b96abe0f8d99c1409814a09f51ee71c
17,297,324,722,118,126,000,000,000,000,000,000,000
77
CVE reported by cisco talos
juniper_es_print(netdissect_options *ndo, const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; struct juniper_ipsec_header { uint8_t sa_index[2]; uint8_t ttl; uint8_t type; uint8_t spi[4]; ui...
1
[ "CWE-125", "CWE-787" ]
tcpdump
b534e304568585707c4a92422aeca25cf908ff02
209,752,087,217,018,640,000,000,000,000,000,000,000
68
CVE-2017-12993/Juniper: Add more bounds checks. This fixes a buffer over-read discovered by Kamil Frankowicz. Add tests using the capture files supplied by the reporter(s).
ZrtpPacketCommit* ZRtp::prepareCommit(ZrtpPacketHello *hello, uint32_t* errMsg) { // Save data before detailed checks - may aid in analysing problems peerClientId.assign((char*)hello->getClientId(), ZRTP_WORD_SIZE * 4); memcpy(peerHelloVersion, hello->getVersion(), ZRTP_WORD_SIZE); peerHelloVersion[ZRT...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
329,158,159,137,840,360,000,000,000,000,000,000,000
145
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
int16_t yang_str2int16(const char *value) { return strtol(value, NULL, 10); }
0
[ "CWE-119", "CWE-787" ]
frr
ac3133450de12ba86c051265fc0f1b12bc57b40c
236,263,835,903,810,670,000,000,000,000,000,000,000
4
isisd: fix #10505 using base64 encoding Using base64 instead of the raw string to encode the binary data. Signed-off-by: whichbug <whichbug@github.com>
void RGWDelBucketMetaSearch::pre_exec() { rgw_bucket_object_pre_exec(s); }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
335,764,741,208,689,840,000,000,000,000,000,000,000
4
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
RZ_IPI void rz_core_analysis_function_until(RzCore *core, ut64 addr_end) { rz_return_if_fail(core->offset <= addr_end); ut64 addr = core->offset; int depth = 1; ut64 a, b; const char *c; a = rz_config_get_i(core->config, "analysis.from"); b = rz_config_get_i(core->config, "analysis.to"); c = rz_config_get(core-...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
259,858,863,172,736,140,000,000,000,000,000,000,000
27
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
MagickExport Image *ShadowImage(const Image *image,const double opacity, const double sigma,const ssize_t x_offset,const ssize_t y_offset, ExceptionInfo *exception) { #define ShadowImageTag "Shadow/Image" CacheView *image_view; Image *border_image, *clone_image, *shadow_image; MagickBoolea...
0
[ "CWE-369" ]
ImageMagick6
f1e68d22d1b35459421710587a0dcbab6900b51f
202,142,931,642,936,670,000,000,000,000,000,000,000
121
https://github.com/ImageMagick/ImageMagick/issues/3296
R_API void r_bin_java_print_stack_map_frame_summary(RBinJavaStackMapFrame *obj) { RListIter *iter, *iter_tmp; RList *ptrList; RBinJavaVerificationObj *ver_obj; if (obj == NULL) { eprintf ("Attempting to print an invalid RBinJavaStackMapFrame* .\n"); return; } Eprintf ("Stack Map Frame Information\n"); Eprin...
0
[ "CWE-787" ]
radare2
9650e3c352f675687bf6c6f65ff2c4a3d0e288fa
20,555,520,754,310,040,000,000,000,000,000,000,000
24
Fix oobread segfault in java arith8.class ##crash * Reported by Cen Zhang via huntr.dev
static struct list_head *gro_list_prepare(struct napi_struct *napi, struct sk_buff *skb) { unsigned int maclen = skb->dev->hard_header_len; u32 hash = skb_get_hash_raw(skb); struct list_head *head; struct sk_buff *p; head = &napi->gro_hash[hash & (GRO_HASH_BUCKETS - 1)].list; list_for_each_entry(p, head,...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
196,612,550,510,267,750,000,000,000,000,000,000,000
37
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
inline long long BSONElement::numberLong() const { switch (type()) { case NumberDouble: return (long long)_numberDouble(); case NumberInt: return _numberInt(); case NumberLong: return _numberLong(); case NumberDecimal: return _numberDec...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
36,738,086,009,262,390,000,000,000,000,000,000,000
14
SERVER-38984 Validate unique User ID on UserCache hit
diff_clear(tabpage_T *tp) { diff_T *p, *next_p; for (p = tp->tp_first_diff; p != NULL; p = next_p) { next_p = p->df_next; vim_free(p); } tp->tp_first_diff = NULL; }
0
[ "CWE-787" ]
vim
c101abff4c6756db4f5e740fde289decb9452efa
339,648,184,036,181,600,000,000,000,000,000,000,000
11
patch 8.2.5164: invalid memory access after diff buffer manipulations Problem: Invalid memory access after diff buffer manipulations. Solution: Use zero offset when change removes all lines in a diff block.
const EbmlSemantic & EbmlSemanticContext::GetSemantic(size_t i) const { assert(i<Size); if (i<Size) return MyTable[i]; else return *(EbmlSemantic*)NULL; }
0
[ "CWE-200" ]
libebml
24e5cd7c666b1ddd85619d60486db0a5481c1b90
69,616,747,416,008,810,000,000,000,000,000,000,000
8
EbmlElement: don't read beyond end of buffer when reading variable length integers
CodingReturnValue LeptonCodec::ThreadState::vp8_decode_thread(unsigned int thread_id, UncompressedComponents *const colldata) { Sirikata::Array1d<uint32_t, (uint32_t)ColorChannel::NumBlockTypes> component_size_in_blocks; BlockBasedImagePerChannel<fal...
0
[ "CWE-1187" ]
lepton
82167c144a322cc956da45407f6dce8d4303d346
313,053,543,403,620,930,000,000,000,000,000,000,000
43
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
int security_real_capable_noaudit(struct task_struct *tsk, int cap) { const struct cred *cred; int ret; cred = get_task_cred(tsk); ret = security_ops->capable(tsk, cred, cap, SECURITY_CAP_NOAUDIT); put_cred(cred); return ret; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
308,535,886,101,836,220,000,000,000,000,000,000,000
10
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...
int Downstream::push_request_headers() { if (!dconn_) { DLOG(INFO, this) << "dconn_ is NULL"; return -1; } return dconn_->push_request_headers(); }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
1,894,259,651,354,703,000,000,000,000,000,000,000
7
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
static void nfs_resync_open_stateid_locked(struct nfs4_state *state) { if (!(state->n_wronly || state->n_rdonly || state->n_rdwr)) return; if (state->n_wronly) set_bit(NFS_O_WRONLY_STATE, &state->flags); if (state->n_rdonly) set_bit(NFS_O_RDONLY_STATE, &state->flags); if (state->n_rdwr) set_bit(NFS_O_RDWR_S...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
81,678,516,616,557,000,000,000,000,000,000,000,000
12
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...
bool Cluster::EOS() const { return (m_pSegment == NULL); }
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
197,795,477,784,622,200,000,000,000,000,000,000,000
1
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
_equalUpdateStmt(const UpdateStmt *a, const UpdateStmt *b) { COMPARE_NODE_FIELD(relation); COMPARE_NODE_FIELD(targetList); COMPARE_NODE_FIELD(whereClause); COMPARE_NODE_FIELD(fromClause); COMPARE_NODE_FIELD(returningList); COMPARE_NODE_FIELD(withClause); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
302,587,455,864,371,640,000,000,000,000,000,000,000
11
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 int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; int ret; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; if ((uint64_t)atom.size > (1<<30)) return AVERROR_INVALIDDATA; if (atom.size >= 10) { // Broke...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
333,401,873,379,025,800,000,000,000,000,000,000,000
40
avformat/mov: Check count sums in build_open_gop_key_points() Fixes: ffmpeg.md Fixes: Out of array access Fixes: CVE-2022-2566 Found-by: Andy Nguyen <theflow@google.com> Found-by: 3pvd <3pvd@google.com> Reviewed-by: Andy Nguyen <theflow@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tcp_analyze_sequence_number(packet_info *pinfo, guint32 seq, guint32 ack, guint32 seglen, guint16 flags, guint32 window, struct tcp_analysis *tcpd) { tcp_unacked_t *ual=NULL; tcp_unacked_t *prevual=NULL; guint32 nextseq; int ackcount; #if 0 printf("\nanalyze_sequence numbers frame:%u\n",pinfo->nu...
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
241,111,341,189,100,060,000,000,000,000,000,000,000
506
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
static void cli_session_setup_done_nt1(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data( subreq, struct tevent_req); NTSTATUS status; status = cli_session_setup_nt1_recv(subreq); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { DEBUG(3, ("cli_session_setup: NT1 session setup ...
0
[ "CWE-94" ]
samba
94295b7aa22d2544af5323bca70d3dcb97fd7c64
313,240,013,661,867,700,000,000,000,000,000,000,000
16
CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860 Signed-off-by: Stefan Metzmacher <metze@samba.org>
static int __init set_tracing_thresh(char *str) { unsigned long threshold; int ret; if (!str) return 0; ret = kstrtoul(str, 0, &threshold); if (ret < 0) return 0; tracing_thresh = threshold * 1000; return 1; }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
131,035,516,500,142,630,000,000,000,000,000,000,000
13
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
static int decode_attr_type(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *type) { __be32 *p; int ret = 0; *type = 0; if (unlikely(bitmap[0] & (FATTR4_WORD0_TYPE - 1U))) return -EIO; if (likely(bitmap[0] & FATTR4_WORD0_TYPE)) { p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) return -EIO; *type = ...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
156,535,365,885,210,860,000,000,000,000,000,000,000
23
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...
conn_to_ct_dpif_entry(const struct conn *conn, struct ct_dpif_entry *entry, long long now, int bkt) { memset(entry, 0, sizeof *entry); conn_key_to_tuple(&conn->key, &entry->tuple_orig); conn_key_to_tuple(&conn->rev_key, &entry->tuple_reply); entry->zone = conn->key.zone; entry...
0
[ "CWE-400" ]
ovs
abd7a457652e6734902720fe6a5dddb3fc0d1e3b
304,801,978,387,884,530,000,000,000,000,000,000,000
30
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static int io_openat2_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct open_how __user *how; size_t len; int ret; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; how = u64_to_user_ptr(READ_ONCE(sqe->addr2)); len = READ_ONCE(sqe->len); if (len < OPEN_HOW_SIZE_VER0) ret...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
253,774,720,054,171,340,000,000,000,000,000,000,000
20
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
dns_zonemgr_settransfersperns(dns_zonemgr_t *zmgr, uint32_t value) { REQUIRE(DNS_ZONEMGR_VALID(zmgr)); zmgr->transfersperns = value; }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
212,081,753,532,461,240,000,000,000,000,000,000,000
5
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
proto_tree_set_uint64(field_info *fi, guint64 value) { header_field_info *hfinfo; guint64 integer; hfinfo = fi->hfinfo; integer = value; if (hfinfo->bitmask) { /* Mask out irrelevant portions */ integer &= hfinfo->bitmask; /* Shift bits */ integer >>= hfinfo_bitshift(hfinfo); FI_SET_FLAG(fi, FI_B...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
322,414,385,812,091,200,000,000,000,000,000,000,000
21
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static int ZEND_FASTCALL ZEND_SUB_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); sub_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
108,459,733,354,156,080,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static ssize_t print_nodes_state(enum node_states state, char *buf) { int n; n = scnprintf(buf, PAGE_SIZE - 1, "%*pbl", nodemask_pr_args(&node_states[state])); buf[n++] = '\n'; buf[n] = '\0'; return n; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
51,665,783,700,384,930,000,000,000,000,000,000,000
10
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...
QueryPlanner::QueryPlanner(const std::string& query, const SQLiteDBInstanceRef& instance) { QueryData plan; queryInternal("EXPLAIN QUERY PLAN " + query, plan, instance); queryInternal("EXPLAIN " + query, program_, instance); for (const auto& row : plan) { auto details = osquery::...
0
[ "CWE-77", "CWE-295" ]
osquery
c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c
239,879,280,665,233,430,000,000,000,000,000,000,000
13
Merge pull request from GHSA-4g56-2482-x7q8 * Proposed fix for attach tables vulnerability * Add authorizer to ATC tables and cleanups - Add unit test for authorizer function
static ssize_t store_uart_mode(struct device *dev, struct device_attribute *attr, const char *valbuf, size_t count) { struct usb_serial_port *port = to_usb_serial_port(dev); struct edgeport_port *edge_port = usb_get_serial_port_data(port); unsigned int v = simple_strtoul(valbuf, NULL, 0); dev_dbg(dev, "%s: settin...
0
[ "CWE-284", "CWE-264" ]
linux
1ee0a224bc9aad1de496c795f96bc6ba2c394811
59,776,747,200,111,650,000,000,000,000,000,000,000
16
USB: io_ti: Fix NULL dereference in chase_port() The tty is NULL when the port is hanging up. chase_port() needs to check for this. This patch is intended for stable series. The behavior was observed and tested in Linux 3.2 and 3.7.1. Johan Hovold submitted a more elaborate patch for the mainline kernel. [ 56.277...
check_overwrite( exarg_T *eap, buf_T *buf, char_u *fname, // file name to be used (can differ from // buf->ffname) char_u *ffname, // full path version of fname int other) // writing under other name { /* * Write to another file or b_flags set or not writing the whole fil...
0
[ "CWE-787" ]
vim
e2bd8600b873d2cd1f9d667c28cba8b1dba18839
225,281,045,363,435,170,000,000,000,000,000,000,000
110
patch 8.2.4977: memory access error when substitute expression changes window Problem: Memory access error when substitute expression changes window. Solution: Disallow changing window in substitute expression.
conv_ext0be32(const UChar* s, const UChar* end, UChar* conv) { while (s < end) { *conv++ = '\0'; *conv++ = '\0'; *conv++ = '\0'; *conv++ = *s++; } }
0
[ "CWE-416", "CWE-200" ]
oniguruma
0f7f61ed1b7b697e283e37bd2d731d0bd57adb55
45,750,134,700,000,170,000,000,000,000,000,000,000
9
Fix CVE-2019-13224: don't allow different encodings for onig_new_deluxe()
static void update_bound_addr(struct tls_listener *listener, const pj_sockaddr *local) { pj_sockaddr *listener_addr = &listener->factory.local_addr; int af = pjsip_transport_type_get_af(listener->factory.type); /* Bind address may be different than factory.local_addr because * factory.local_a...
0
[ "CWE-362", "CWE-703" ]
pjproject
d5f95aa066f878b0aef6a64e60b61e8626e664cd
137,312,887,717,380,930,000,000,000,000,000,000,000
16
Merge pull request from GHSA-cv8x-p47p-99wr * - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count. - Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport. * - Fix silly mistake: accepted active socket created without...
static int do_check(struct bpf_verifier_env *env) { struct bpf_verifier_state *state; struct bpf_insn *insns = env->prog->insnsi; struct bpf_reg_state *regs; int insn_cnt = env->prog->len, i; int insn_processed = 0; bool do_print_state = false; env->prev_linfo = NULL; state = kzalloc(sizeof(struct bpf_verifie...
0
[ "CWE-703", "CWE-189" ]
linux
979d63d50c0c0f7bc537bf821e056cc9fe5abd38
329,841,186,682,982,930,000,000,000,000,000,000,000
347
bpf: prevent out of bounds speculation on pointer arithmetic Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on masking array map access for unprivileged ...
congestion_control_set_cc_enabled(void) { cc_alg = CC_ALG_VEGAS; }
0
[]
tor
b0496d40197dd5b4fb7b694c1410082d4e34dda6
162,005,160,511,078,310,000,000,000,000,000,000,000
4
Fix for RTT calculation hang during congestion control. Only cache RTT on explicit stalls; Only use this cache for the RTT decrease case. Otherwise use only local circuit RTT state for clock jump checks.
int bcf_hdr_append(bcf_hdr_t *hdr, const char *line) { int len; bcf_hrec_t *hrec = bcf_hdr_parse_line(hdr, (char*) line, &len); if ( !hrec ) return -1; if (bcf_hdr_add_hrec(hdr, hrec) < 0) return -1; return 0; }
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
47,836,292,695,460,860,000,000,000,000,000,000,000
9
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
PHP_METHOD(Phar, getModified) { PHAR_ARCHIVE_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_BOOL(phar_obj->archive->is_modified); }
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
94,198,734,488,610,550,000,000,000,000,000,000,000
10
Fix bug #71860: Require valid paths for phar filenames
static BOOL update_read_ellipse_sc_order(wStream* s, const ORDER_INFO* orderInfo, ELLIPSE_SC_ORDER* ellipse_sc) { ORDER_FIELD_COORD(1, ellipse_sc->leftRect); ORDER_FIELD_COORD(2, ellipse_sc->topRect); ORDER_FIELD_COORD(3, ellipse_sc->rightRect); ORDER_FIELD_COORD(4, ellipse_...
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
25,934,127,019,830,090,000,000,000,000,000,000,000
12
Fixed #6013: Check new length is > 0
tor_timegm(const struct tm *tm, time_t *time_out) { /* This is a pretty ironclad timegm implementation, snarfed from Python2.2. * It's way more brute-force than fiddling with tzset(). */ time_t year, days, hours, minutes, seconds; int i; year = tm->tm_year + 1900; if (year < 1970 || tm->tm_mon < 0 || tm...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
261,574,445,943,989,650,000,000,000,000,000,000,000
26
Fix assertion failure in tor_timegm. Fixes bug 6811.
void test_checkout_nasty__dotdot_dotcapitalgit_path(void) { test_checkout_fails("refs/heads/dotdot_dotcapitalgit_path", ".GIT/foobar"); }
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
206,266,804,427,525,150,000,000,000,000,000,000,000
4
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
PHP_FUNCTION(xml_parse) { xml_parser *parser; zval *pind; char *data; int data_len, ret; long isFinal = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &pind, &data, &data_len, &isFinal) == FAILURE) { return; } ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser); ...
0
[ "CWE-787" ]
php-src
7d163e8a0880ae8af2dd869071393e5dc07ef271
284,575,477,018,600,520,000,000,000,000,000,000,000
18
truncate results at depth of 255 to prevent corruption
strlen16 (unsigned short *s) { int len = 0; while (*s) { s++; len++; } return len; }
0
[ "CWE-119" ]
php-src
feba44546c27b0158f9ac20e72040a224b918c75
39,219,563,990,040,632,000,000,000,000,000,000,000
10
Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()).
xmlParseElementDecl(xmlParserCtxtPtr ctxt) { const xmlChar *name; int ret = -1; xmlElementContentPtr content = NULL; /* GROW; done in the caller */ if (CMP9(CUR_PTR, '<', '!', 'E', 'L', 'E', 'M', 'E', 'N', 'T')) { int inputid = ctxt->input->id; SKIP(9); if (SKIP_BLANKS == 0) { xmlFatalErr...
0
[ "CWE-703", "CWE-835" ]
libxml2
899a5d9f0ed13b8e32449a08a361e0de127dd961
49,157,418,953,146,340,000,000,000,000,000,000,000
92
Detect infinite recursion in parameter entities When expanding a parameter entity in a DTD, infinite recursion could lead to an infinite loop or memory exhaustion. Thanks to Wei Lei for the first of many reports. Fixes bug 759579.
void cil_destroy_sensitivityorder(struct cil_sensorder *sensorder) { if (sensorder == NULL) { return; } if (sensorder->sens_list_str != NULL) { cil_list_destroy(&sensorder->sens_list_str, CIL_TRUE); } free(sensorder); }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
170,316,901,204,153,420,000,000,000,000,000,000,000
12
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
int register_qdisc(struct Qdisc_ops *qops) { struct Qdisc_ops *q, **qp; int rc = -EEXIST; write_lock(&qdisc_mod_lock); for (qp = &qdisc_base; (q = *qp) != NULL; qp = &q->next) if (!strcmp(qops->id, q->id)) goto out; if (qops->enqueue == NULL) qops->enqueue = noop_qdisc_ops.enqueue; if (qops->requeue == N...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
320,853,664,304,535,880,000,000,000,000,000,000,000
24
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
retrieveAnchor(AnchorList *al, int line, int pos) { Anchor *a; size_t b, e; int cmp; if (al == NULL || al->nanchor == 0) return NULL; if (al->acache < 0 || al->acache >= al->nanchor) al->acache = 0; for (b = 0, e = al->nanchor - 1; b <= e; al->acache = (b + e) / 2) { a = &al->anchors[al->a...
0
[ "CWE-119" ]
w3m
4e464819dd360ffd3d58fa2a89216fe413cfcc74
215,281,321,369,379,030,000,000,000,000,000,000,000
26
Prevent segfault due to buffer overflows in addMultirowsForm Bug-Debian: https://github.com/tats/w3m/issues/21 Bug-Debian: https://github.com/tats/w3m/issues/26
static void enable_latest_record_version(gnutls_priority_t c) { c->min_record_version = 0; }
0
[ "CWE-310" ]
gnutls
21f89efad7014a5ee0debd4cd3d59e27774b29e6
110,720,120,008,562,750,000,000,000,000,000,000,000
4
handshake: add FALLBACK_SCSV priority option This allows clients to enable the TLS_FALLBACK_SCSV mechanism during the handshake, as defined in RFC7507.
inline int date(T *attr, const unsigned int nb_attr) { int res = -1; cimg::mutex(6); #if cimg_OS==2 SYSTEMTIME st; GetLocalTime(&st); for (unsigned int i = 0; i<nb_attr; ++i) { res = (int)(attr[i]==0?st.wYear: attr[i]==1?st.wMonth: attr[i...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
221,560,466,474,998,800,000,000,000,000,000,000,000
36
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void SelectOpenCLDevice(MagickCLEnv clEnv,cl_device_type type) { MagickCLDevice device; size_t i, j; for (i = 0; i < clEnv->number_devices; i++) clEnv->devices[i]->enabled=MagickFalse; for (i = 0; i < clEnv->number_devices; i++) { device=clEnv->devices[i]; if (device->type !=...
0
[ "CWE-476" ]
ImageMagick
cca91aa1861818342e3d072bb0fad7dc4ffac24a
40,619,636,125,334,700,000,000,000,000,000,000,000
30
https://github.com/ImageMagick/ImageMagick/issues/790
print_exception(PyObject *f, PyObject *value) { int err = 0; PyObject *type, *tb; _Py_IDENTIFIER(print_file_and_line); if (!PyExceptionInstance_Check(value)) { err = PyFile_WriteString("TypeError: print_exception(): Exception expected for value, ", f); err += PyFile_WriteString(Py_TYPE(...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
248,106,829,535,960,850,000,000,000,000,000,000,000
119
bpo-35766: Merge typed_ast back into CPython (GH-11645)