func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
link_info_stop (NautilusDirectory *directory) { NautilusFile *file; if (directory->details->link_info_read_state != NULL) { file = directory->details->link_info_read_state->file; if (file != NULL) { g_assert (NAUTILUS_IS_FILE (file)); g_assert (file->details...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
234,605,653,162,564,230,000,000,000,000,000,000,000
24
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
static void pcntl_signal_handler(int signo) { struct php_pcntl_pending_signal *psig; TSRMLS_FETCH(); psig = PCNTL_G(spares); if (!psig) { /* oops, too many signals for us to track, so we'll forget about this one */ return; } PCNTL_G(spares) = psig->next; psig->signo = signo; psig->next = NULL; /* the h...
1
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
71,456,774,139,021,010,000,000,000,000,000,000,000
24
Fixed bug #69418 - more s->p fixes for filenames
f_complete(typval_T *argvars, typval_T *rettv UNUSED) { int startcol; if (in_vim9script() && (check_for_number_arg(argvars, 0) == FAIL || check_for_list_arg(argvars, 1) == FAIL)) return; if ((State & MODE_INSERT) == 0) { emsg(_(e_complete_can_only_be_used_in_insert_mode)); return; } ...
0
[ "CWE-416" ]
vim
0ff01835a40f549c5c4a550502f62a2ac9ac447c
330,735,417,050,027,300,000,000,000,000,000,000,000
27
patch 9.0.0579: using freed memory when 'tagfunc' wipes out buffer Problem: Using freed memory when 'tagfunc' wipes out buffer that holds 'complete'. Solution: Make a copy of the option. Make sure cursor position is valid.
static void var_mtrr_range(struct kvm_mtrr_range *range, u64 *start, u64 *end) { u64 mask; *start = range->base & PAGE_MASK; mask = range->mask & PAGE_MASK; /* This cannot overflow because writing to the reserved bits of * variable MTRRs causes a #GP. */ *end = (*start | ~mask) + 1; }
0
[ "CWE-284" ]
linux
9842df62004f366b9fed2423e24df10542ee0dc5
13,446,267,002,333,850,000,000,000,000,000,000,000
13
KVM: MTRR: remove MSR 0x2f8 MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support was introduced by 9ba075a664df ("KVM: MTRR support"). 0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8, which made access to ...
int ber_write_integer(wStream* s, UINT32 value) { if (value < 0x80) { ber_write_universal_tag(s, BER_TAG_INTEGER, FALSE); ber_write_length(s, 1); Stream_Write_UINT8(s, value); return 3; } else if (value < 0x8000) { ber_write_universal_tag(s, BER_TAG_INTEGER, FALSE); ber_write_length(s, 2); Stream_W...
0
[ "CWE-476" ]
FreeRDP
bceec083677a609ba2f06cc75924ab0accac5388
306,290,454,275,236,960,000,000,000,000,000,000,000
34
Finished merging missing changes from pull request #1257 (https://github.com/FreeRDP/FreeRDP/pull/1257 - commit 0dc22d5). Correctly report the length of ts_password_creds.
ecma_string_substr (const ecma_string_t *string_p, /**< pointer to an ecma string */ lit_utf8_size_t start_pos, /**< start position, should be less or equal than string length */ lit_utf8_size_t end_pos) /**< end position, should be less or equal than string length */ { const l...
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
157,851,501,583,461,790,000,000,000,000,000,000,000
43
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static void test_prepare_grant() { int rc; char query[MAX_TEST_QUERY_LENGTH]; myheader("test_prepare_grant"); mysql_autocommit(mysql, TRUE); rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_grant"); myquery(rc); rc= mysql_query(mysql, "CREATE TABLE test_grant(a tinyint primary key auto_increment)"); ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
317,805,709,354,256,280,000,000,000,000,000,000,000
93
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static int setup_raw_socket(RemoteServer *s, const char *address) { int fd; fd = make_socket_fd(LOG_INFO, address, SOCK_STREAM, SOCK_CLOEXEC); if (fd < 0) return fd; return journal_remote_add_raw_socket(s, fd); }
0
[ "CWE-770" ]
systemd
ef4d6abe7c7fab6cbff975b32e76b09feee56074
158,594,689,414,921,080,000,000,000,000,000,000,000
9
journal-remote: set a limit on the number of fields in a message Existing use of E2BIG is replaced with ENOBUFS (entry too long), and E2BIG is reused for the new error condition (too many fields). This matches the change done for systemd-journald, hence forming the second part of the fix for CVE-2018-16865 (https://b...
ossl_cipher_memsize(const void *ptr) { const EVP_CIPHER_CTX *ctx = ptr; return sizeof(*ctx); }
0
[ "CWE-326" ]
ruby
739782e37a6662fea379e7ef3ec89e851b04b46c
266,687,002,530,893,500,000,000,000,000,000,000,000
5
* ext/openssl/ossl_cipher.c: remove the encryption key initialization from Cipher#initialize. This is effectively a revert of r32723 ("Avoid possible SEGV from AES encryption/decryption", 2011-07-28). the patch is derived from https://github.com/ruby/openssl/commit/8108e0a6db133f3375608303fdd2083eb5115062, writ...
static int mem_resize(jas_stream_memobj_t *m, int bufsize) { unsigned char *buf; //assert(m->buf_); assert(bufsize >= 0); if (!(buf = jas_realloc2(m->buf_, bufsize, sizeof(unsigned char))) && bufsize) { return -1; } m->buf_ = buf; m->bufsize_ = bufsize; return 0; }
0
[ "CWE-415" ]
jasper
44a524e367597af58d6265ae2014468b334d0309
298,737,159,420,728,960,000,000,000,000,000,000,000
14
The memory stream interface allows for a buffer size of zero. The case of a zero-sized buffer was not handled correctly, as it could lead to a double free. This problem has now been fixed (hopefully). One might ask whether a zero-sized buffer should be allowed at all, but this is a question for another day.
DU_findSOPClassAndInstanceInFile( const char *fname, char* sopClass, size_t sopClassSize, char* sopInstance, size_t sopInstanceSize, OFBool tolerateSpacePaddedUIDs) { DcmFileFormat ff; if (! ff.loadFile(fname, EXS_Unknown, EGL_noChange).good()) return OFFalse; /* look in the meta-header...
0
[ "CWE-476", "CWE-787" ]
dcmtk
5c14bf53fb42ceca12bbcc0016e8704b1580920d
11,524,237,239,603,796,000,000,000,000,000,000,000
23
Fixed possible NULL pointer dereference. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and patch.
peer_remote_as_vty (struct vty *vty, const char *peer_str, const char *as_str, afi_t afi, safi_t safi) { int ret; struct bgp *bgp; as_t as; union sockunion su; bgp = vty->index; /* Get AS number. */ VTY_GET_INTEGER_RANGE ("AS", as, as_str, 1, 65535); /* If peer is peer group, ca...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
333,097,685,631,537,500,000,000,000,000,000,000,000
47
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static void SVGInternalSubset(void *context,const xmlChar *name, const xmlChar *external_id,const xmlChar *system_id) { SVGInfo *svg_info; /* Does this document has an internal subset? */ (void) LogMagickEvent(CoderEvent,GetMagickModule(), " SAX.internalSubset(%s, %s, %s)",(const char *) name, ...
0
[ "CWE-125" ]
ImageMagick6
a5db4873626f702d2ddd8bc293573493e0a412c0
201,789,813,634,126,800,000,000,000,000,000,000,000
16
https://github.com/ImageMagick/ImageMagick/issues/1336
lka_proc_errfd(const char *name, int fd) { struct processor_instance *processor; processor = dict_xget(&processors, name); io_set_nonblocking(fd); processor->errfd = io_new(); io_set_fd(processor->errfd, fd); io_set_callback(processor->errfd, processor_errfd, processor->name); lka_proc_config(processor); }
0
[ "CWE-476" ]
src
6c3220444ed06b5796dedfd53a0f4becd903c0d1
207,559,901,539,859,460,000,000,000,000,000,000,000
14
smtpd's filter state machine can prematurely release resources leading to a crash. From gilles@
TRIO_PUBLIC_STRING int trio_xstring_copy TRIO_ARGS2((self, other), trio_string_t* self, TRIO_CONST char* other) { assert(self); assert(other); self->length = 0; return trio_xstring_append(self, other); }
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
169,566,970,012,025,120,000,000,000,000,000,000,000
9
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
struct sock *__vsock_create(struct net *net, struct socket *sock, struct sock *parent, gfp_t priority, unsigned short type) { struct sock *sk; struct vsock_sock *psk; struct vsock_sock *vsk; sk = sk_alloc(net, AF_VSOCK, priority, &vsock_proto); if (!sk) return NULL; sock_init_data(...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
301,384,278,894,101,500,000,000,000,000,000,000,000
63
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 int linear_payload_sz(bool first_skb) { if (first_skb) return SKB_WITH_OVERHEAD(2048 - MAX_TCP_HEADER); return 0; }
0
[ "CWE-399", "CWE-835" ]
linux
ccf7abb93af09ad0868ae9033d1ca8108bdaec82
64,539,210,518,801,000,000,000,000,000,000,000,000
6
tcp: avoid infinite loop in tcp_splice_read() Splicing from TCP socket is vulnerable when a packet with URG flag is received and stored into receive queue. __tcp_splice_read() returns 0, and sk_wait_data() immediately returns since there is the problematic skb in queue. This is a nice way to burn cpu (aka infinite l...
void radeon_atom_output_lock(struct drm_encoder *encoder, bool lock) { struct drm_device *dev = encoder->dev; struct radeon_device *rdev = dev->dev_private; uint32_t bios_6_scratch; if (rdev->family >= CHIP_R600) bios_6_scratch = RREG32(R600_BIOS_6_SCRATCH); else bios_6_scratch = RREG32(RADEON_BIOS_6_SCRATCH)...
0
[ "CWE-119", "CWE-193" ]
linux
0031c41be5c529f8329e327b63cde92ba1284842
147,876,163,213,563,610,000,000,000,000,000,000,000
21
drivers/gpu/drm/radeon/radeon_atombios.c: range check issues This change makes the array larger, "MAX_SUPPORTED_TV_TIMING_V1_2" is 3 and the original size "MAX_SUPPORTED_TV_TIMING" is 2. Also there were checks that were off by one. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Alex Deucher <alexdeucher@...
static int submodule_url_is_relative(const char *url) { return starts_with_dot_slash(url) || starts_with_dot_dot_slash(url); }
0
[ "CWE-522" ]
git
c44088ecc4b0722636e0a305f9608d3047197282
283,532,121,469,881,600,000,000,000,000,000,000,000
4
credential: treat URL without scheme as invalid libcurl permits making requests without a URL scheme specified. In this case, it guesses the URL from the hostname, so I can run git ls-remote http::ftp.example.com/path/to/repo and it would make an FTP request. Any user intentionally using such a URL is likely to h...
u64 kvm_get_apic_base(struct kvm_vcpu *vcpu) { if (irqchip_in_kernel(vcpu->kvm)) return vcpu->arch.apic_base; else return vcpu->arch.apic_base; }
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
317,102,745,573,918,560,000,000,000,000,000,000,000
7
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
UnicodeString __fastcall TCommandSet::GetFirstLine() { return FIRST_LINE; }
0
[ "CWE-20" ]
winscp
49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54
243,134,729,567,275,060,000,000,000,000,000,000,000
4
Bug 1675: Prevent SCP server sending files that were not requested https://winscp.net/tracker/1675 Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55
static CURLcode telnet_done(struct Curl_easy *data, CURLcode status, bool premature) { struct TELNET *tn = data->req.p.telnet; (void)status; /* unused */ (void)premature; /* not used */ if(!tn) return CURLE_OK; curl_slist_free_all(tn->telnet_vars); tn->telnet_vars = NULL; ...
0
[ "CWE-200", "CWE-909" ]
curl
39ce47f219b09c380b81f89fe54ac586c8db6bde
142,837,039,039,702,000,000,000,000,000,000,000,000
17
telnet: check sscanf() for correct number of matches CVE-2021-22898 Bug: https://curl.se/docs/CVE-2021-22898.html
static void vnc_write_pixels_generic(VncState *vs, struct PixelFormat *pf, void *pixels1, int size) { uint8_t buf[4]; if (pf->bytes_per_pixel == 4) { uint32_t *pixels = pixels1; int n, i; n = size >> 2; for(i = 0; i < n; i++) { vn...
1
[ "CWE-125" ]
qemu
9f64916da20eea67121d544698676295bbb105a7
296,488,283,124,217,100,000,000,000,000,000,000,000
33
pixman/vnc: use pixman images in vnc. The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content...
static int sisusb_send_bridge_packet(struct sisusb_usb_data *sisusb, int len, struct sisusb_packet *packet, unsigned int tflags) { int ret; ssize_t bytes_transferred = 0; __le32 tmp; if (len == 6) packet->data = 0; #ifdef SISUSB_DONTSYNC if (!(sisusb_wait_all_out_complete(sisusb))) return 1; #endif /* Ev...
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
311,275,225,913,733,130,000,000,000,000,000,000,000
35
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
GF_Err url_box_read(GF_Box *s, GF_BitStream *bs) { GF_DataEntryURLBox *ptr = (GF_DataEntryURLBox *)s; if (ptr->size) { ptr->location = (char*)gf_malloc((u32) ptr->size); if (! ptr->location) return GF_OUT_OF_MEM; gf_bs_read_data(bs, ptr->location, (u32)ptr->size); if (ptr->location[ptr->size-1]) { GF_LOG(...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
298,097,733,031,404,500,000,000,000,000,000,000,000
15
fixed #1587
static void manager_build_unit_path_cache(Manager *m) { char **i; int r; assert(m); set_free_free(m->unit_path_cache); m->unit_path_cache = set_new(&string_hash_ops); if (!m->unit_path_cache) { r = -ENOMEM; goto fail; } ...
0
[ "CWE-20" ]
systemd
531ac2b2349da02acc9c382849758e07eb92b020
31,297,949,834,635,366,000,000,000,000,000,000,000
49
If the notification message length is 0, ignore the message (#4237) Fixes #4234. Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
ecryptfs_find_global_auth_tok_for_sig( struct ecryptfs_global_auth_tok **global_auth_tok, struct ecryptfs_mount_crypt_stat *mount_crypt_stat, char *sig) { struct ecryptfs_global_auth_tok *walker; int rc = 0; (*global_auth_tok) = NULL; mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex); list_for_each_entr...
0
[ "CWE-119" ]
linux-2.6
6352a29305373ae6196491e6d4669f301e26492e
267,917,333,583,210,800,000,000,000,000,000,000,000
22
eCryptfs: Check Tag 11 literal data buffer size Tag 11 packets are stored in the metadata section of an eCryptfs file to store the key signature(s) used to encrypt the file encryption key. After extracting the packet length field to determine the key signature length, a check is not performed to see if the length woul...
print_filename (void) { pr_sgr_start_if (filename_color); fputs (filename, stdout); pr_sgr_end_if (filename_color); }
0
[ "CWE-189" ]
grep
8fcf61523644df42e1905c81bed26838e0b04f91
244,422,434,937,685,800,000,000,000,000,000,000,000
6
grep: fix integer-overflow issues in main program * NEWS: Document this. * bootstrap.conf (gnulib_modules): Add inttypes, xstrtoimax. Remove xstrtoumax. * src/main.c: Include <inttypes.h>, for INTMAX_MAX, PRIdMAX. (context_length_arg, prtext, grepbuf, grep, grepfile) (get_nondigit_option, main): Use intmax_t, not int,...
Item* element_index(uint i) { return ref && result_type() == ROW_RESULT ? (*ref)->element_index(i) : this; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
112,423,160,393,413,220,000,000,000,000,000,000,000
4
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
static SECURITY_STATUS SEC_ENTRY negotiate_QueryContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void* pBuffer) { NEGOTIATE_CONTEXT* context = (NEGOTIATE_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext); if (!context) return SEC_E_I...
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
254,570,731,835,443,560,000,000,000,000,000,000,000
17
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
static void rds_ib_ic_info(struct socket *sock, unsigned int len, struct rds_info_iterator *iter, struct rds_info_lengths *lens) { rds_for_each_conn_info(sock, len, iter, lens, rds_ib_conn_info_visitor, sizeof(struct rds_info_rdma_connection)); }
0
[ "CWE-399", "CWE-476" ]
linux
c2349758acf1874e4c2b93fe41d072336f1a31d0
148,071,730,580,915,800,000,000,000,000,000,000,000
8
rds: prevent dereference of a NULL device Binding might result in a NULL device, which is dereferenced causing this BUG: [ 1317.260548] BUG: unable to handle kernel NULL pointer dereference at 000000000000097 4 [ 1317.261847] IP: [<ffffffff84225f52>] rds_ib_laddr_check+0x82/0x110 [ 1317.263315] PGD 418bcb067 PUD 3ceb...
pk11_rand_seed_fromfile(const char *randomfile) { pk11_context_t ctx; FILE *stream = NULL; size_t cc = 0; isc_result_t ret; ret = pk11_get_session(&ctx, OP_RAND, false, false, false, NULL, 0); if ((ret != ISC_R_SUCCESS) && (ret != PK11_R_NODIGESTSERVICE) && (ret != PK11_R_NOAESSERVICE)) ret...
0
[ "CWE-617" ]
bind9
8d807cc21655eaa6e6a08afafeec3682c0f3f2ab
118,757,811,435,819,170,000,000,000,000,000,000,000
30
Fix crash in pk11_numbits() when native-pkcs11 is used When pk11_numbits() is passed a user provided input that contains all zeroes (via crafted DNS message), it would crash with assertion failure. Fix that by properly handling such input.
virtual CHARSET_INFO *sort_charset(void) const { return charset(); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
68,865,446,148,876,780,000,000,000,000,000,000,000
1
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
int ha_partition::delete_table(const char *name) { DBUG_ENTER("ha_partition::delete_table"); DBUG_RETURN(del_ren_cre_table(name, NULL, NULL, NULL)); }
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
200,985,434,742,619,830,000,000,000,000,000,000,000
6
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
static int nr_accept(struct socket *sock, struct socket *newsock, int flags) { struct sk_buff *skb; struct sock *newsk; DEFINE_WAIT(wait); struct sock *sk; int err = 0; if ((sk = sock->sk) == NULL) return -EINVAL; lock_sock(sk); if (sk->sk_type != SOCK_SEQPACKET) { err = -EOPNOTSUPP; goto out_release; ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
80,849,135,326,580,930,000,000,000,000,000,000,000
61
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 sta_info_cleanup(unsigned long data) { struct ieee80211_local *local = (struct ieee80211_local *) data; struct sta_info *sta; bool timer_needed = false; rcu_read_lock(); list_for_each_entry_rcu(sta, &local->sta_list, list) if (sta_info_cleanup_expire_buffered(local, sta)) timer_needed = true; rc...
0
[ "CWE-362" ]
linux
1d147bfa64293b2723c4fec50922168658e613ba
200,967,325,614,114,840,000,000,000,000,000,000,000
21
mac80211: fix AP powersave TX vs. wakeup race There is a race between the TX path and the STA wakeup: while a station is sleeping, mac80211 buffers frames until it wakes up, then the frames are transmitted. However, the RX and TX path are concurrent, so the packet indicating wakeup can be processed while a packet is b...
Method* LinkResolver::linktime_resolve_interface_method(const LinkInfo& link_info, TRAPS) { // normal interface method resolution Method* resolved_method = resolve_interface_method(link_info, Bytecodes::_invokeinterface, CHECK_NULL); assert(resolved_met...
0
[]
jdk17u
860464e46105b98ccf21e98abe2dc6e80155887c
111,703,372,186,010,840,000,000,000,000,000,000,000
9
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
int snd_pcm_status64(struct snd_pcm_substream *substream, struct snd_pcm_status64 *status) { struct snd_pcm_runtime *runtime = substream->runtime; snd_pcm_stream_lock_irq(substream); snd_pcm_unpack_audio_tstamp_config(status->audio_tstamp_data, &runtime->audio_tstamp_config); /* backwards compatible ...
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
279,283,568,294,842,900,000,000,000,000,000,000,000
75
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
static PHP_INI_MH(OnUpdateName) /* {{{ */ { /* Numeric session.name won't work at all */ if (PG(modules_activated) && (!new_value_length || is_numeric_string(new_value, new_value_length, NULL, NULL, 0))) { int err_type; if (stage == ZEND_INI_STAGE_RUNTIME) { err_type = E_WARNING; } else { err_type = E_...
0
[ "CWE-264" ]
php-src
25e8fcc88fa20dc9d4c47184471003f436927cde
334,054,244,386,721,600,000,000,000,000,000,000,000
23
Strict session
X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx) { return ctx->parent; }
0
[ "CWE-119" ]
openssl
370ac320301e28bb615cee80124c042649c95d14
1,106,682,271,836,860,200,000,000,000,000,000,000
4
Fix length checks in X509_cmp_time to avoid out-of-bounds reads. Also tighten X509_cmp_time to reject more than three fractional seconds in the time; and to reject trailing garbage after the offset. CVE-2015-1789 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
xmlXPtrLocationSetMerge(xmlLocationSetPtr val1, xmlLocationSetPtr val2) { int i; if (val1 == NULL) return(NULL); if (val2 == NULL) return(val1); /* * !!!!! this can be optimized a lot, knowing that both * val1 and val2 already have unicity of their values. */ for (i = 0;i < v...
0
[ "CWE-415" ]
libxml2
f5048b3e71fc30ad096970b8df6e7af073bae4cb
200,399,752,541,747,550,000,000,000,000,000,000,000
16
Hardening of XPath evaluation Add a mechanism of frame for XPath evaluation when entering a function or a scoped evaluation, also fix a potential problem in predicate evaluation.
InitAuxiliaryProcess(void) { PGPROC *auxproc; int proctype; /* * ProcGlobal should be set up already (if we are a backend, we inherit * this by fork() or EXEC_BACKEND mechanism from the postmaster). */ if (ProcGlobal == NULL || AuxiliaryProcs == NULL) elog(PANIC, "proc header uninitialized"); if (My...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
98,540,565,282,747,250,000,000,000,000,000,000,000
100
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
Bool gf_utf8_is_legal(const u8 *data, u32 length) { //we simply run ConvertUTF8toUTF16 without target const UTF8** sourceStart = (const UTF8**) &data; const UTF8* sourceEnd = (const UTF8*) ( data + length ); ConversionResult result = conversionOK; const UTF8* source = *sourceStart; while (source < sourceEnd) { ...
0
[ "CWE-276" ]
gpac
96699aabae042f8f55cf8a85fa5758e3db752bae
163,626,323,128,943,970,000,000,000,000,000,000,000
57
fixed #2061
box_intersect(PG_FUNCTION_ARGS) { BOX *box1 = PG_GETARG_BOX_P(0); BOX *box2 = PG_GETARG_BOX_P(1); BOX *result; if (!box_ov(box1, box2)) PG_RETURN_NULL(); result = (BOX *) palloc(sizeof(BOX)); result->high.x = Min(box1->high.x, box2->high.x); result->low.x = Max(box1->low.x, box2->low.x); result...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
154,710,491,959,144,600,000,000,000,000,000,000,000
18
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...
void kvm_mmu_pre_destroy_vm(struct kvm *kvm) { if (kvm->arch.nx_lpage_recovery_thread) kthread_stop(kvm->arch.nx_lpage_recovery_thread); }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
140,764,767,148,907,210,000,000,000,000,000,000,000
5
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[]) { struct net *net; /* Examine the link attributes and figure out which * network namespace we are talking about. */ if (tb[IFLA_NET_NS_PID]) net = get_net_ns_by_pid(nla_get_u32(tb[IFLA_NET_NS_PID])); else if (tb[IFLA_NET_NS_FD]) net = g...
0
[ "CWE-399" ]
linux-2.6
84d73cd3fb142bf1298a8c13fd4ca50fd2432372
108,784,469,015,557,400,000,000,000,000,000,000,000
14
rtnl: fix info leak on RTM_GETLINK request for VF devices Initialize the mac address buffer with 0 as the driver specific function will probably not fill the whole buffer. In fact, all in-kernel drivers fill only ETH_ALEN of the MAX_ADDR_LEN bytes, i.e. 6 of the 32 possible bytes. Therefore we currently leak 26 bytes ...
static enum sctp_ierror sctp_process_unk_param( const struct sctp_association *asoc, union sctp_params param, struct sctp_chunk *chunk, struct sctp_chunk **errp) { int retval = SCTP_IERROR_NO_ERROR; switch (param.p->type & SCTP_PARAM_ACTION_MASK) { case SCTP_PARAM_ACTION_DISCARD: retval = SCT...
0
[ "CWE-704" ]
linux
a2d859e3fc97e79d907761550dbc03ff1b36479c
293,838,495,858,348,000,000,000,000,000,000,000,000
45
sctp: account stream padding length for reconf chunk sctp_make_strreset_req() makes repeated calls to sctp_addto_chunk() which will automatically account for padding on each call. inreq and outreq are already 4 bytes aligned, but the payload is not and doing SCTP_PAD4(a + b) (which _sctp_make_chunk() did implicitly he...
static inline int base_key_length(const cipher_type_t *cipher, int key_length) { switch (cipher->id) { case AES_128_ICM: case AES_192_ICM: case AES_256_ICM: /* The legacy modes are derived from * the configured key length on the policy */ return key_length - 14; break; case AES_128_GCM: r...
0
[ "CWE-119" ]
libsrtp
704a31774db0dd941094fd2b47c21638b8dc3de2
307,244,829,231,072,350,000,000,000,000,000,000,000
21
Prevent potential DoS attack due to lack of bounds checking on RTP header CSRC count and extension header length. Credit goes to Randell Jesup and the Firefox team for reporting this issue.
static uint32_t cirrus_mmio_readw(void *opaque, target_phys_addr_t addr) { uint32_t v; #ifdef TARGET_WORDS_BIGENDIAN v = cirrus_mmio_readb(opaque, addr) << 8; v |= cirrus_mmio_readb(opaque, addr + 1); #else v = cirrus_mmio_readb(opaque, addr); v |= cirrus_mmio_readb(opaque, addr + 1) << 8; #endif ...
0
[ "CWE-787" ]
qemu
b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef
115,181,013,677,112,370,000,000,000,000,000,000,000
12
CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow I have just noticed that patch for CVE-2007-1320 has never been applied to the QEMU CVS. Please find it below. | Multiple heap-based buffer overflows in the cirrus_invalidate_region | function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and | possib...
compile_quantifier_node(QuantNode* qn, regex_t* reg, ScanEnv* env) { int i, r, mod_tlen; int infinite = IS_REPEAT_INFINITE(qn->upper); enum BodyEmpty empty_info = qn->empty_info; int tlen = compile_length_tree(NODE_QUANT_BODY(qn), reg); if (tlen < 0) return tlen; if (tlen == 0) return 0; if (is_anychar_...
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
51,402,227,973,247,890,000,000,000,000,000,000,000
169
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
static int read_descriptor(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops, void *ptr, u16 *size, unsigned long *address, int op_bytes) { int rc; if (op_bytes == 2) op_bytes = 3; *address = 0; rc = ops->read_std((unsigned long)ptr, (unsigned long *)size, 2, ctxt->vcpu); if (rc...
0
[ "CWE-20" ]
kvm
e42d9b8141d1f54ff72ad3850bb110c95a5f3b88
191,295,860,554,288,500,000,000,000,000,000,000,000
18
KVM: x86 emulator: limit instructions to 15 bytes While we are never normally passed an instruction that exceeds 15 bytes, smp games can cause us to attempt to interpret one, which will cause large latencies in non-preempt hosts. Cc: stable@kernel.org Signed-off-by: Avi Kivity <avi@redhat.com>
wiener_map( unsigned int n ) { static struct { unsigned int p_n, q_n; } t[] = { /* p q attack cost */ { 512, 119 }, /* 9 x 10^17 */ { 768, 145 }, /* 6 x 10^21 */ { 1024, 165 }, /* 7 x 10^24 */ { 1280, 183 }, /* 3 x 10^27 */ { 1536, 198 }, /* 7 x 10^29 */ { 1792, 212 }, /...
0
[ "CWE-200" ]
libgcrypt
410d70bad9a650e3837055e36f157894ae49a57d
259,127,677,338,673,650,000,000,000,000,000,000,000
35
cipher: Use ciphertext blinding for Elgamal decryption. * cipher/elgamal.c (USE_BLINDING): New. (decrypt): Rewrite to use ciphertext blinding. -- CVE-id: CVE-2014-3591 As a countermeasure to a new side-channel attacks on sliding windows exponentiation we blind the ciphertext for Elgamal decryption. This is similar ...
struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, const struct in6_addr *addr, bool anycast) { struct net *net = dev_net(idev->dev); struct rt6_info *rt = ip6_dst_alloc(net, net->loopback_dev, DST_NOCOUNT, NULL); if (!rt) return ERR_PTR(-ENOMEM); in6_dev_hold(idev); rt->dst.f...
0
[ "CWE-119" ]
net
c88507fbad8055297c1d1e21e599f46960cbee39
187,682,044,664,504,300,000,000,000,000,000,000,000
32
ipv6: don't set DST_NOCOUNT for remotely added routes DST_NOCOUNT should only be used if an authorized user adds routes locally. In case of routes which are added on behalf of router advertisments this flag must not get used as it allows an unlimited number of routes getting added remotely. Signed-off-by: Sabrina Dub...
static int is_pcm(enum AVCodecID codec_id) { /* we only care about "normal" PCM codecs until we get samples */ return codec_id >= AV_CODEC_ID_PCM_S16LE && codec_id < AV_CODEC_ID_PCM_S24DAUD; }
0
[ "CWE-703", "CWE-834" ]
FFmpeg
900f39692ca0337a98a7cf047e4e2611071810c2
267,155,135,244,758,200,000,000,000,000,000,000,000
5
avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array() Fixes: 20170829A.mxf Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted) { const struct cred *cred; /* Derived from kernel/capability.c:sys_capget. */ rcu_read_lock(); cred = __task_cred(target); *effective = cred->cap_effective; *inheritable = cred->cap_i...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
207,642,291,266,045,060,000,000,000,000,000,000,000
14
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
int ssl_write_record( ssl_context *ssl ) { int ret, done = 0; size_t len = ssl->out_msglen; SSL_DEBUG_MSG( 2, ( "=> write record" ) ); if( ssl->out_msgtype == SSL_MSG_HANDSHAKE ) { ssl->out_msg[1] = (unsigned char)( ( len - 4 ) >> 16 ); ssl->out_msg[2] = (unsigned char)( ( len - 4 ...
0
[ "CWE-119" ]
mbedtls
c988f32adde62a169ba340fee0da15aecd40e76e
116,417,483,267,448,530,000,000,000,000,000,000,000
89
Added max length checking of hostname
static void list_slab_objects(struct kmem_cache *s, struct page *page, const char *text) { #ifdef CONFIG_SLUB_DEBUG void *addr = page_address(page); void *p; DECLARE_BITMAP(map, page->objects); bitmap_zero(map, page->objects); slab_err(s, page, "%s", text); slab_lock(page); for_each_free_object(p, s, pag...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
59,665,175,249,569,155,000,000,000,000,000,000,000
25
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
int _FVMenuGenerate(FontView *fv,int family) { FVFlattenAllBitmapSelections(fv); return( SFGenerateFont(fv->b.sf,fv->b.active_layer,family,fv->b.normal==NULL?fv->b.map:fv->b.normal) ); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
22,204,068,032,594,660,000,000,000,000,000,000,000
4
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
void MainWindow::updateMarkers() { if (playlist() && MLT.isPlaylist()) { QList<int> markers; int n = playlist()->count(); for (int i = 0; i < n; i++) markers.append(playlist()->clip_start(i)); m_player->setMarkers(markers); } }
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
137,327,915,342,211,800,000,000,000,000,000,000,000
10
fix upgrade check is not using TLS correctly
int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, struct hostent **host, struct ares_addr6ttl *addrttls, int *naddrttls) { struct ares_addrinfo ai; struct ares_addrinfo_node *next; struct ares_addrinfo_cname *next_cname; char **aliases = NULL; c...
0
[ "CWE-400" ]
c-ares
0d252eb3b2147179296a3bdb4ef97883c97c54d3
131,669,831,176,297,250,000,000,000,000,000,000,000
167
ares_parse_{a,aaaa}_reply could return larger *naddrttls than passed in If there are more ttls returned than the maximum provided by the requestor, then the *naddrttls response would be larger than the actual number of elements in the addrttls array. This bug could lead to invalid memory accesses in applications usin...
check_filename(char *str, int len) { int i; if (len == 0) return nfserr_inval; if (isdotent(str, len)) return nfserr_badname; for (i = 0; i < len; i++) if (str[i] == '/') return nfserr_badname; return 0; }
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
29,446,685,873,060,357,000,000,000,000,000,000,000
13
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
smtp_auth_failure_pause(struct smtp_session *s) { struct timeval tv; tv.tv_sec = 0; tv.tv_usec = arc4random_uniform(1000000); log_trace(TRACE_SMTP, "smtp: timing-attack protection triggered, " "will defer answer for %lu microseconds", tv.tv_usec); evtimer_set(&s->pause, smtp_auth_failure_resume, s); evtimer...
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
151,177,388,451,417,550,000,000,000,000,000,000,000
11
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
void bpf_link_inc(struct bpf_link *link) { atomic64_inc(&link->refcnt); }
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
336,345,154,876,585,300,000,000,000,000,000,000,000
4
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
static int connect_logger_as( const Unit *unit, const ExecContext *context, const ExecParameters *params, ExecOutput output, const char *ident, int nfd, uid_t uid, gid_t gid) { _clean...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
182,679,281,794,417,000,000,000,000,000,000,000,000
51
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
cb_syslog_goodpri(const union sudo_defs_val *sd_un) { debug_decl(cb_syslog_goodpri, SUDOERS_DEBUG_PLUGIN); eventlog_set_syslog_acceptpri(sd_un->ival); debug_return_bool(true); }
0
[ "CWE-193" ]
sudo
1f8638577d0c80a4ff864a2aad80a0d95488e9a8
88,510,599,995,688,500,000,000,000,000,000,000,000
8
Fix potential buffer overflow when unescaping backslashes in user_args. Also, do not try to unescaping backslashes unless in run mode *and* we are running the command via a shell. Found by Qualys, this fixes CVE-2021-3156.
void xfrm_policy_walk_init(struct xfrm_policy_walk *walk, u8 type) { INIT_LIST_HEAD(&walk->walk.all); walk->walk.dead = 1; walk->type = type; walk->seq = 0; }
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
332,277,697,526,327,940,000,000,000,000,000,000,000
7
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
reg_save(regsave_T *save, garray_T *gap) { if (REG_MULTI) { save->rs_u.pos.col = (colnr_T)(rex.input - rex.line); save->rs_u.pos.lnum = rex.lnum; } else save->rs_u.ptr = rex.input; save->rs_len = gap->ga_len; }
0
[ "CWE-823", "CWE-703" ]
vim
6456fae9ba8e72c74b2c0c499eaf09974604ff30
65,670,639,999,339,890,000,000,000,000,000,000,000
11
patch 8.2.4440: crash with specific regexp pattern and string Problem: Crash with specific regexp pattern and string. Solution: Stop at the start of the string.
autoar_extractor_signal_decide_destination (AutoarExtractor *self, GFile *destination, GList *files, GFile **new_destination) { autoar_common_g_signal_emit (self, self->in_thread, ...
0
[ "CWE-22" ]
gnome-autoar
adb067e645732fdbe7103516e506d09eb6a54429
253,348,444,671,220,640,000,000,000,000,000,000,000
11
AutoarExtractor: Do not extract files outside the destination dir Currently, a malicious archive can cause that the files are extracted outside of the destination dir. This can happen if the archive contains a file whose parent is a symbolic link, which points outside of the destination dir. This is potentially a secu...
void CLASS smal_decode_segment (unsigned seg[2][2], int holes) { uchar hist[3][13] = { { 7, 7, 0, 0, 63, 55, 47, 39, 31, 23, 15, 7, 0 }, { 7, 7, 0, 0, 63, 55, 47, 39, 31, 23, 15, 7, 0 }, { 3, 3, 0, 0, 63, 47, 31, 15, 0 } }; int low, high=0xff, carry=0, nbits=8; int pix, s, count, bin, n...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
254,789,267,476,367,830,000,000,000,000,000,000,000
64
fixed two more problems found by fuzzer
static void print_res_row(MYSQL_RES *result,MYSQL_ROW cur) { uint i,length; MYSQL_FIELD *field; putchar('|'); mysql_field_seek(result,0); for (i=0 ; i < mysql_num_fields(result); i++) { field = mysql_fetch_field(result); length=field->max_length; printf(" %-*s|",length+1,cur[i] ? (char*) cur[i] ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
39,722,386,774,967,864,000,000,000,000,000,000,000
14
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) { int err; wait_queue_entry_t wait; if (pcm == NULL) { err = -ENODEV; goto __error1; } err = snd_card_file_add(pcm->card, file); if (err < 0) goto __error1; if (!try_module_get(pcm->card->module)) { err = -EFAULT; goto __error...
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
152,819,567,679,767,120,000,000,000,000,000,000,000
56
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
void umm_corruption(void) { corruption_cnt++; }
0
[ "CWE-190" ]
mongoose-os
b338266c0492cccdb8d8a93ee0b9217bc5a04036
307,453,356,066,587,600,000,000,000,000,000,000,000
3
Fix umm_malloc()
static int writeBufferToContigStrips(TIFF* out, uint8* buf, uint32 imagelength) { uint32 row, nrows, rowsperstrip; tstrip_t strip = 0; tsize_t stripsize; TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); for (row = 0; row < imagelength; row += rowsperstrip) { nrows = (row + rowsperst...
0
[ "CWE-125" ]
libtiff
21d39de1002a5e69caa0574b2cc05d795d6fbfad
321,257,431,524,113,820,000,000,000,000,000,000,000
22
* tools/tiffcrop.c: fix multiple uint32 overflows in writeBufferToSeparateStrips(), writeBufferToContigTiles() and writeBufferToSeparateTiles() that could cause heap buffer overflows. Reported by Henri Salo from Nixu Corporation. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592
int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key, int *slot) { if (btrfs_header_level(eb) == 0) return generic_bin_search(eb, offsetof(struct btrfs_leaf, items), sizeof(struct btrfs_item), key, btrfs_header_nritems(eb), slot); else return generic_bin_se...
0
[ "CWE-362" ]
linux
dbcc7d57bffc0c8cac9dac11bec548597d59a6a5
232,007,589,755,795,120,000,000,000,000,000,000,000
16
btrfs: fix race when cloning extent buffer during rewind of an old root While resolving backreferences, as part of a logical ino ioctl call or fiemap, we can end up hitting a BUG_ON() when replaying tree mod log operations of a root, triggering a stack trace like the following: ------------[ cut here ]------------ ...
int cil_gen_bool(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, int tunableif) { enum cil_syntax syntax[] = { CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_END }; int syntax_len = sizeof(syntax)/sizeof(*syntax); char *key = NULL; struct cil_bool *boolean =...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
271,790,619,428,184,640,000,000,000,000,000,000,000
53
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 ...
static int io_sq_thread(void *data) { struct io_ring_ctx *ctx = data; const struct cred *old_cred; DEFINE_WAIT(wait); unsigned long timeout; int ret = 0; complete(&ctx->sq_thread_comp); old_cred = override_creds(ctx->creds); timeout = jiffies + ctx->sq_thread_idle; while (!kthread_should_park()) { unsigne...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
65,644,786,511,284,500,000,000,000,000,000,000,000
116
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static inline int get_appcontext_input_count_at(int offset) { return *((short *)((char *)x_app_context + offset)); }
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
251,226,409,044,780,770,000,000,000,000,000,000,000
4
Support all the new variables added
uint32_t smb2cli_conn_server_capabilities(struct smbXcli_conn *conn) { return conn->smb2.server.capabilities; }
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
238,127,035,571,461,450,000,000,000,000,000,000,000
4
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
void MainWindow::on_actionProgressive_triggered(bool checked) { MLT.videoWidget()->setProperty("progressive", checked); if (Settings.playerGPU()) MLT.pause(); if (MLT.consumer()) { MLT.profile().set_progressive(checked); MLT.updatePreviewProfile(); MLT.restart(); } Se...
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
264,039,279,760,490,320,000,000,000,000,000,000,000
12
fix upgrade check is not using TLS correctly
p_b_cclass(p, cs) register struct parse *p; register cset *cs; { register char *sp = p->next; register struct cclass *cp; register size_t len; while (MORE() && my_isalpha(p->charset,PEEK())) NEXT(); len = p->next - sp; for (cp = cclasses; cp->name != NULL; cp++) if (strncmp(cp->name, sp, len) == 0 && cp->na...
0
[ "CWE-190" ]
mysql-server
dc45e408250c582eb532417a42cef5b5a8e2fe77
128,651,182,563,827,110,000,000,000,000,000,000,000
41
Bug#20642505: HENRY SPENCER REGULAR EXPRESSIONS (REGEX) LIBRARY The MySQL server uses Henry Spencer's library for regular expressions to support the REGEXP/RLIKE string operator. This changeset adapts a recent fix from the upstream for better 32-bit compatiblity. (Note that we cannot simply use the current upstream ve...
void *crypto_create_tfm(struct crypto_alg *alg, const struct crypto_type *frontend) { char *mem; struct crypto_tfm *tfm = NULL; unsigned int tfmsize; unsigned int total; int err = -ENOMEM; tfmsize = frontend->tfmsize; total = tfmsize + sizeof(*tfm) + frontend->extsize(alg); mem = kzalloc(total, GFP_KERNEL)...
0
[ "CWE-284", "CWE-264", "CWE-269" ]
linux
5d26a105b5a73e5635eae0629b42fa0a90e07b7b
165,767,155,724,585,770,000,000,000,000,000,000,000
39
crypto: prefix module autoloading with "crypto-" This prefixes all crypto module loading with "crypto-" so we never run the risk of exposing module auto-loading to userspace via a crypto API, as demonstrated by Mathias Krause: https://lkml.org/lkml/2013/3/4/70 Signed-off-by: Kees Cook <keescook@chromium.org> Signed-...
u32 vmx_exec_control(struct vcpu_vmx *vmx) { u32 exec_control = vmcs_config.cpu_based_exec_ctrl; if (vmx->vcpu.arch.switch_db_regs & KVM_DEBUGREG_WONT_EXIT) exec_control &= ~CPU_BASED_MOV_DR_EXITING; if (!cpu_need_tpr_shadow(&vmx->vcpu)) { exec_control &= ~CPU_BASED_TPR_SHADOW; #ifdef CONFIG_X86_64 exec_cont...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
276,801,855,200,191,880,000,000,000,000,000,000,000
25
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
SYSCALL_DEFINE3(sigaction, int, sig, const struct old_sigaction __user *, act, struct old_sigaction __user *, oact) { struct k_sigaction new_ka, old_ka; int ret; if (act) { old_sigset_t mask; if (!access_ok(act, sizeof(*act)) || __get_user(new_ka.sa.sa_handler, &act->sa_handler) || __get_...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
214,149,030,123,779,900,000,000,000,000,000,000,000
34
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
ceph::crypto::onwire::rxtx_t ceph::crypto::onwire::rxtx_t::create_handler_pair( CephContext* cct, const AuthConnectionMeta& auth_meta, bool crossed) { if (auth_meta.is_mode_secure()) { ceph_assert_always(auth_meta.connection_secret.length() >= \ sizeof(key_t) + 2 * sizeof(nonce_t)); const char* se...
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
57,681,382,943,473,270,000,000,000,000,000,000,000
38
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
print_help (void) { /* We split the help text this way to ease translation of individual entries. */ static const char *help[] = { "\n", N_("\ Mandatory arguments to long options are mandatory for short options too.\n\n"), N_("\ Startup:\n"), N_("\ -V, --version display th...
0
[ "CWE-200" ]
wget
a933bdd31eee9c956a3b5cc142f004ef1fa94cb3
321,657,387,193,582,500,000,000,000,000,000,000,000
438
Keep fetched URLs in POSIX extended attributes * configure.ac: Check for xattr availability * src/Makefile.am: Add xattr.c * src/ftp.c: Include xattr.h. (getftp): Set attributes if enabled. * src/http.c: Include xattr.h. (gethttp): Add parameter 'original_url', set attributes if enabled. (http_loop): Add 'orig...
static int ieee80211_fragment(struct ieee80211_tx_data *tx, struct sk_buff *skb, int hdrlen, int frag_threshold) { struct ieee80211_local *local = tx->local; struct ieee80211_tx_info *info; struct sk_buff *tmp; int per_fragm = frag_threshold - hdrlen - FCS_LEN; int pos = hdrlen + per_fragm; int ...
1
[ "CWE-200" ]
linux
338f977f4eb441e69bb9a46eaa0ac715c931a67f
260,116,787,066,897,360,000,000,000,000,000,000,000
59
mac80211: fix fragmentation code, particularly for encryption The "new" fragmentation code (since my rewrite almost 5 years ago) erroneously sets skb->len rather than using skb_trim() to adjust the length of the first fragment after copying out all the others. This leaves the skb tail pointer pointing to after where t...
static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf, size_t length, size_t displacement) { unsigned exif_value_2a, offset_of_ifd; if (length < 2) { exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Missing TIFF alignment marker"); return; } /* set the thumbnail stuff to not...
0
[ "CWE-125" ]
php-src
0c77b4307df73217283a4aaf9313e1a33a0967ff
65,460,415,971,884,760,000,000,000,000,000,000,000
48
Fixed bug #79282
merge_queue_lists(queue_filename *a, queue_filename *b) { queue_filename *first = NULL; queue_filename **append = &first; while (a && b) { int d; if ((d = Ustrncmp(a->text, b->text, 6)) == 0) d = Ustrcmp(a->text + 14, b->text + 14); if (d < 0) { *append = a; append= &a->next; a = a->next; ...
0
[ "CWE-78" ]
exim
7ea1237c783e380d7bdb86c90b13d8203c7ecf26
21,606,997,459,044,330,000,000,000,000,000,000,000
27
Events: raise msg:fail:internal & msg:complete for -Mrm. Bug 2310
pqEndcopy3(PGconn *conn) { PGresult *result; if (conn->asyncStatus != PGASYNC_COPY_IN && conn->asyncStatus != PGASYNC_COPY_OUT && conn->asyncStatus != PGASYNC_COPY_BOTH) { printfPQExpBuffer(&conn->errorMessage, libpq_gettext("no COPY in progress\n")); return 1; } /* Send the CopyDone message if...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
67,931,453,728,078,930,000,000,000,000,000,000,000
86
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
u64 hashlen_string(const void *salt, const char *name) { unsigned long hash = init_name_hash(salt); unsigned long len = 0, c; c = (unsigned char)*name; while (c) { len++; hash = partial_name_hash(c, hash); c = (unsigned char)name[len]; } return hashlen_create(end_name_hash(hash), len); }
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
281,391,237,401,078,940,000,000,000,000,000,000,000
13
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
header(const char *fmt,...) { char tmp[64]; va_list ap; va_start(ap, fmt); vsnprintf(tmp, sizeof(tmp), fmt, ap); va_end(ap); fprintf(stdout, "============== %-38s ==============\n", tmp); fflush(stdout); }
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
306,090,607,744,712,900,000,000,000,000,000,000,000
12
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
static MagickBooleanType GetIPTCProperty(const Image *image,const char *key, ExceptionInfo *exception) { char *attribute, *message; const StringInfo *profile; long count, dataset, record; register ssize_t i; size_t length; profile=GetImageProfile(image,"iptc"); if (p...
0
[ "CWE-190", "CWE-125" ]
ImageMagick
d8ab7f046587f2e9f734b687ba7e6e10147c294b
56,380,516,879,494,910,000,000,000,000,000,000,000
66
Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed)
int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) { int al, i, j, ret; unsigned int n; SSL3_RECORD *rr; void (*cb) (const SSL *ssl, int type2, int val) = NULL; if (s->s3->rbuf.buf == NULL) /* Not initialized yet */ if (!ssl3_setup_buffers(s)) return (...
0
[ "CWE-200", "CWE-203" ]
openssl
e9bbefbf0f24c57645e7ad6a5a71ae649d18ac8e
115,745,184,538,734,830,000,000,000,000,000,000,000
668
Go into the error state if a fatal alert is sent or received If an application calls SSL_shutdown after a fatal alert has occured and then behaves different based on error codes from that function then the application may be vulnerable to a padding oracle. CVE-2019-1559 Reviewed-by: Richard Levitte <levitte@openssl....
RecoveryConflictInterrupt(ProcSignalReason reason) { int save_errno = errno; /* * Don't joggle the elbow of proc_exit */ if (!proc_exit_inprogress) { RecoveryConflictReason = reason; switch (reason) { case PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK: /* * If we aren't waiting for a lock we ...
1
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
297,053,155,428,208,920,000,000,000,000,000,000,000
130
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
static int MP4_ReadBox_skcr( stream_t *p_stream, MP4_Box_t *p_box ) { MP4_READBOX_ENTER( MP4_Box_data_skcr_t ); MP4_GET4BYTES( p_box->data.p_skcr->i_init ); MP4_GET4BYTES( p_box->data.p_skcr->i_encr ); MP4_GET4BYTES( p_box->data.p_skcr->i_decr ); #ifdef MP4_VERBOSE msg_Dbg( p_stream, "read box: \"...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
273,810,364,525,310,520,000,000,000,000,000,000,000
17
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
void inc_nlink(struct inode *inode) { if (unlikely(inode->i_nlink == 0)) { WARN_ON(!(inode->i_state & I_LINKABLE)); atomic_long_dec(&inode->i_sb->s_remove_count); } inode->__i_nlink++; }
0
[ "CWE-269" ]
linux
0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7
62,244,250,808,914,140,000,000,000,000,000,000,000
9
Fix up non-directory creation in SGID directories sgid directories have special semantics, making newly created files in the directory belong to the group of the directory, and newly created subdirectories will also become sgid. This is historically used for group-shared directories. But group directories writable b...
static void __perf_event_enable(struct perf_event *event, struct perf_cpu_context *cpuctx, struct perf_event_context *ctx, void *info) { struct perf_event *leader = event->group_leader; struct perf_event_context *task_ctx; if (event->state >= PERF_EVENT_STATE_INACTIVE || event->state <= PERF_EVENT_...
0
[ "CWE-190" ]
linux
1572e45a924f254d9570093abde46430c3172e3d
217,078,593,194,054,460,000,000,000,000,000,000,000
42
perf/core: Fix the perf_cpu_time_max_percent check Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input value from user-space. If not, we can set a big value and some vars will overflow like "sysctl_perf_event_sample_rate" which will cause a lot of unexpected problems. Signed-off-by: Tan Xiaojun ...
void bjc_init_tresh(gx_device_bjc_printer *dev, int rnd) { int i=(int)(time(NULL) & 0x0ff); float delta=40.64*rnd; for(;i>0;i--) bjc_rand(dev); for(i=-512; i<512; i++) dev->bjc_treshold[i+512] = (int)(delta * i / 1024.0 + 2040); } /* init treshold arr...
0
[ "CWE-787" ]
ghostpdl
bf72f1a3dd5392ee8291e3b1518a0c2c5dc6ba39
122,396,555,054,048,150,000,000,000,000,000,000,000
8
Fix valgrind problems with gdevbjca.c 2 problems here. Firstly, we could access off the end of a row while looking for runs. Change the indexing to fix this. Secondly, we could overrun our gamma tables due to unexpectedly large values. Add some clamping.
static inline bool kvm_request_pending(struct kvm_vcpu *vcpu) { return READ_ONCE(vcpu->requests); }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
307,964,118,238,849,640,000,000,000,000,000,000,000
4
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
ga_add_string(garray_T *gap, char_u *p) { if (ga_grow(gap, 1) == FAIL) return FAIL; ((char_u **)(gap->ga_data))[gap->ga_len++] = p; return OK; }
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
140,315,962,183,363,570,000,000,000,000,000,000,000
7
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.