func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
char * expand_string_unsplit_to_string (string, quoted) char *string; int quoted; { return (expand_string_to_string_internal (string, quoted, expand_string_unsplit));
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
40,826,947,193,662,520,000,000,000,000,000,000,000
6
Bash-4.4 patch 7
static bool vmxnet3_peer_has_vnet_hdr(VMXNET3State *s) { NetClientState *nc = qemu_get_queue(s->nic); if (qemu_has_vnet_hdr(nc->peer)) { return true; } return false; }
0
[ "CWE-416" ]
qemu
6c352ca9b4ee3e1e286ea9e8434bd8e69ac7d0d8
308,363,884,106,774,200,000,000,000,000,000,000,000
10
net: vmxnet3: check for device_active before write Vmxnet3 device emulator does not check if the device is active, before using it for write. It leads to a use after free issue, if the vmxnet3_io_bar0_write routine is called after the device is deactivated. Add check to avoid it. Reported-by: Li Qiang <liqiang6-s@360...
vte_sequence_handler_send_secondary_device_attributes (VteTerminal *terminal, GValueArray *params) { char **version; char buf[128]; long ver = 0, i; /* Claim to be a VT220, more or less. The '>' in the response appears * to be undocumented. */ version = g_strsplit(VERSION, ".", 0); if (version != NULL) { for...
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
308,283,993,932,304,040,000,000,000,000,000,000,000
18
fix bug #548272 svn path=/trunk/; revision=2365
static __always_inline ssize_t mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **page, bool zeropage) { ssize_t err; /* * The normal page fault path for a shmem will invoke the...
0
[ "CWE-862", "CWE-863" ]
linux
29ec90660d68bbdd69507c1c8b4e33aa299278b1
194,354,394,265,234,300,000,000,000,000,000,000,000
39
userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas After the VMA to register the uffd onto is found, check that it has VM_MAYWRITE set before allowing registration. This way we inherit all common code checks before allowing to fill file holes in shmem and hugetlbfs with UFFDIO_COPY. The userfaultf...
check_secret_key( ELG_secret_key *sk ) { int rc; gcry_mpi_t y = mpi_alloc( mpi_get_nlimbs(sk->y) ); gcry_mpi_powm( y, sk->g, sk->x, sk->p ); rc = !mpi_cmp( y, sk->y ); mpi_free( y ); return rc; }
0
[ "CWE-200" ]
libgcrypt
35cd81f134c0da4e7e6fcfe40d270ee1251f52c2
196,601,768,204,127,700,000,000,000,000,000,000,000
10
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 ...
static MagickBooleanType ReadDCMPixels(Image *image,DCMInfo *info, DCMStreamInfo *stream_info,MagickBooleanType first_segment, ExceptionInfo *exception) { int byte, index; MagickBooleanType status; PixelPacket pixel; ssize_t i, x; Quantum *q; ssize_t y; /* Con...
0
[ "CWE-416" ]
ImageMagick
82775af03bbb10a0a1d0e15c0156c75673b4525e
182,506,689,010,592,070,000,000,000,000,000,000,000
172
Moved the free to the correct position to fix #4446.
int ssl3_get_cert_verify(SSL *s) { EVP_PKEY *pkey = NULL; unsigned char *p; int al, ok, ret = 0; long n; int type = 0, i, j; X509 *peer; const EVP_MD *md = NULL; EVP_MD_CTX mctx; EVP_MD_CTX_init(&mctx); /* * We should only process a CertificateVerify message if we have rece...
0
[ "CWE-362" ]
openssl
3c66a669dfc7b3792f7af0758ea26fe8502ce70c
10,387,882,680,320,034,000,000,000,000,000,000,000
197
Fix PSK handling. The PSK identity hint should be stored in the SSL_SESSION structure and not in the parent context (which will overwrite values used by other SSL structures with the same SSL_CTX). Use BUF_strndup when copying identity as it may not be null terminated. Reviewed-by: Tim Hudson <tjh@openssl.org>
reached_end_position(XLogRecPtr segendpos, uint32 timeline, bool segment_finished) { if (!has_xlogendptr) { #ifndef WIN32 fd_set fds; struct timeval tv; int r; /* * Don't have the end pointer yet - check our pipe to see if it has * been sent yet. */ FD_ZERO(&fds); FD_SET(bgpipe[0], &fds...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
111,363,248,018,700,140,000,000,000,000,000,000,000
81
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...
virtual Field *tmp_table_field(TABLE *t_arg) { return 0; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
258,337,865,441,649,320,000,000,000,000,000,000,000
1
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...
call_refreshresult(struct rpc_task *task) { int status = task->tk_status; dprint_status(task); task->tk_status = 0; task->tk_action = call_refresh; switch (status) { case 0: if (rpcauth_uptodatecred(task)) task->tk_action = call_allocate; return; case -ETIMEDOUT: rpc_delay(task, 3*HZ); case -EAGAIN: ...
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
0b760113a3a155269a3fba93a409c640031dd68f
57,330,765,688,592,700,000,000,000,000,000,000,000
28
NLM: Don't hang forever on NLM unlock requests If the NLM daemon is killed on the NFS server, we can currently end up hanging forever on an 'unlock' request, instead of aborting. Basically, if the rpcbind request fails, or the server keeps returning garbage, we really want to quit instead of retrying. Tested-by: Vasi...
static int io_buffer_account_pin(struct io_ring_ctx *ctx, struct page **pages, int nr_pages, struct io_mapped_ubuf *imu, struct page **last_hpage) { int i, ret; imu->acct_pages = 0; for (i = 0; i < nr_pages; i++) { if (!PageCompound(pages[i])) { imu->acct_pages++; } else { struct page *hpage; ...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
16,864,125,685,391,847,000,000,000,000,000,000,000
31
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
//! Compute the square value of each pixel value \newinstance. CImg<Tfloat> get_sqr() const { return CImg<Tfloat>(*this,false).sqr();
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
33,290,859,506,076,695,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
WandExport MagickBooleanType PixelSyncIterator(PixelIterator *iterator) { MagickBooleanType status; register ssize_t x; register Quantum *_magickcore_restrict pixels; assert(iterator != (const PixelIterator *) NULL); assert(iterator->signature == MagickWandSignature); if (iterator->debug != M...
1
[ "CWE-369" ]
ImageMagick
a81ca9a1b46a96be83682af3389f0a6f3d0d389d
141,847,533,324,882,420,000,000,000,000,000,000,000
34
https://github.com/ImageMagick/ImageMagick/issues/1711
void ntlm_generate_server_signing_key(NTLM_CONTEXT* context) { SecBuffer signMagic; signMagic.pvBuffer = (void*)NTLM_SERVER_SIGN_MAGIC; signMagic.cbBuffer = sizeof(NTLM_SERVER_SIGN_MAGIC); ntlm_generate_signing_key(context->ExportedSessionKey, &signMagic, context->ServerSigningKey); }
0
[ "CWE-125" ]
FreeRDP
c098f21fdaadca57ff649eee1674f6cc321a2ec4
236,533,187,870,703,850,000,000,000,000,000,000,000
7
Fixed oob read in ntlm_read_ntlm_v2_response
search_header_linear_backwards(const HeaderRefs &headers, const StringRef &name) { for (auto it = headers.rbegin(); it != headers.rend(); ++it) { auto &kv = *it; if (kv.name == name) { return &kv; } } return nullptr; }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
162,177,738,829,222,250,000,000,000,000,000,000,000
10
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
void TABLE::mark_columns_used_by_virtual_fields(void) { MY_BITMAP *save_read_set; Field **vfield_ptr; TABLE_SHARE::enum_v_keys v_keys= TABLE_SHARE::NO_V_KEYS; /* If there is virtual fields are already initialized */ if (s->check_set_initialized) return; if (s->tmp_table == NO_TMP_TABLE) mysql_mute...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
123,124,554,985,600,960,000,000,000,000,000,000,000
54
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static int h264_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; H264Context *h = avctx->priv_data; AVFrame *pict = data; int buf_index = 0; int ret; ...
0
[ "CWE-787" ]
FFmpeg
1f097d168d9cad473dd44010a337c1413a9cd198
336,348,251,709,498,880,000,000,000,000,000,000,000
89
h264: reset data partitioning at the beginning of each decode call Prevents using GetBitContexts with data from previous calls. Fixes access to freed memory. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
check_DEC_NSH_TTL(const struct ofpact_null *a OVS_UNUSED, struct ofpact_check_params *cp) { struct flow *flow = &cp->match->flow; if (flow->packet_type != htonl(PT_NSH) && flow->dl_type != htons(ETH_TYPE_NSH)) { inconsistent_match(&cp->usable_protocols); } return 0; }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
158,365,674,715,656,500,000,000,000,000,000,000,000
10
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
xfs_vm_writepage( struct page *page, struct writeback_control *wbc) { struct xfs_writepage_ctx wpc = { .io_type = XFS_IO_INVALID, }; int ret; ret = xfs_do_writepage(page, wbc, &wpc); if (wpc.ioend) ret = xfs_submit_ioend(wbc, wpc.ioend, ret); return ret; }
0
[ "CWE-362" ]
linux
04197b341f23b908193308b8d63d17ff23232598
5,102,069,753,805,767,000,000,000,000,000,000,000
14
xfs: don't BUG() on mixed direct and mapped I/O We've had reports of generic/095 causing XFS to BUG() in __xfs_get_blocks() due to the existence of delalloc blocks on a direct I/O read. generic/095 issues a mix of various types of I/O, including direct and memory mapped I/O to a single file. This is clearly not suppor...
answer_from_dnscache(int dns_fd, int userid, struct query *q) /* Checks cache and sends repeated answer if we alreay saw this query recently. Returns: 1 = answer sent, drop this query, 0 = no answer sent, this is a new query. */ { int i; int use; for (i = 0; i < DNSCACHE_LEN ; i++) { /* Try cache most-recen...
0
[]
iodine
b715be5cf3978fbe589b03b09c9398d0d791f850
64,925,233,000,551,195,000,000,000,000,000,000,000
38
Fix authentication bypass bug The client could bypass the password check by continuing after getting error from the server and guessing the network parameters. The server would still accept the rest of the setup and also network traffic. Add checks for normal and raw mode that user has authenticated before allowing a...
static int io_sqe_file_register(struct io_ring_ctx *ctx, struct file *file, int index) { #if defined(CONFIG_UNIX) struct sock *sock = ctx->ring_sock->sk; struct sk_buff_head *head = &sock->sk_receive_queue; struct sk_buff *skb; /* * See if we can merge this file into an existing skb SCM_RIGHTS * file set. ...
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
282,828,753,523,650,340,000,000,000,000,000,000,000
42
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
isoent_remove_child(struct isoent *parent, struct isoent *child) { struct isoent *ent; /* Remove a child entry from children chain. */ ent = parent->children.first; while (ent->chnext != child) ent = ent->chnext; if ((ent->chnext = ent->chnext->chnext) == NULL) parent->children.last = &(ent->chnext); parent-...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
6,760,797,497,365,181,000,000,000,000,000,000,000
25
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
skiphex(char_u *q) { char_u *p = q; while (vim_isxdigit(*p)) // skip to next non-digit ++p; return p; }
0
[ "CWE-125", "CWE-787" ]
vim
94f3192b03ed27474db80b4d3a409e107140738b
174,535,807,135,582,100,000,000,000,000,000,000,000
8
patch 8.2.3950: going beyond the end of the line with /\%V Problem: Going beyond the end of the line with /\%V. Solution: Check for valid column in getvcol().
static void xfrm_policy_queue_process(struct timer_list *t) { struct sk_buff *skb; struct sock *sk; struct dst_entry *dst; struct xfrm_policy *pol = from_timer(pol, t, polq.hold_timer); struct net *net = xp_net(pol); struct xfrm_policy_queue *pq = &pol->polq; struct flowi fl; struct sk_buff_head list; __u32 sk...
0
[ "CWE-703" ]
linux
f85daf0e725358be78dfd208dea5fd665d8cb901
42,661,439,893,191,980,000,000,000,000,000,000,000
86
xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup() xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of pols[0]. This refcount can be dropped in xfrm_expand_policies() when xfrm_expand_policies() return error. pols[0]'s refcount is balanced in here. But xfrm_bundle_look...
PHP_FUNCTION(pi) { RETURN_DOUBLE(M_PI); }
0
[]
php-src
0d822f6df946764f3f0348b82efae2e1eaa83aa0
116,525,366,050,864,140,000,000,000,000,000,000,000
4
Bug #71201 round() segfault on 64-bit builds
int do_pcie_aer_inject_error(Monitor *mon, const QDict *qdict, QObject **ret_data) { const char *id = qdict_get_str(qdict, "id"); const char *error_name; uint32_t error_status; bool correctable; PCIDevice *dev; PCIEAERErr err; int ret; ret = pci_qdev_find_de...
0
[ "CWE-119" ]
qemu
5f691ff91d323b6f97c6600405a7f9dc115a0ad1
262,735,211,244,630,900,000,000,000,000,000,000,000
73
hw/pci/pcie_aer.c: fix buffer overruns on invalid state load 4) CVE-2013-4529 hw/pci/pcie_aer.c pcie aer log can overrun the buffer if log_num is too large There are two issues in this file: 1. log_max from remote can be larger than on local then buffer will overrun with data coming from state...
static struct avrcp_data *data_init(struct avrcp *session, const char *uuid) { struct avrcp_data *data; const sdp_record_t *rec; sdp_list_t *list; sdp_profile_desc_t *desc; data = g_new0(struct avrcp_data, 1); rec = btd_device_get_record(session->dev, uuid); if (rec == NULL) return data; if (sdp_get_profil...
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
88,241,126,734,536,350,000,000,000,000,000,000,000
23
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) { char buff[NAME_LEN+USERNAME_LENGTH+100]; int scramble_data_len, pkt_scramble_len= 0; char *end,*host_info= 0, *s...
0
[ "CWE-254" ]
server
f0d774d48416bb06063184380b684380ca005a41
280,847,199,170,942,600,000,000,000,000,000,000,000
560
MDEV-9212 ssl-validate-cert incorrect hostname check Reimplement ssl_verify_server_cert() using the logic from https://wiki.openssl.org/index.php/Hostname_validation The bug was discovered by Alex Gaynor.
int dccp_disconnect(struct sock *sk, int flags) { struct inet_connection_sock *icsk = inet_csk(sk); struct inet_sock *inet = inet_sk(sk); struct dccp_sock *dp = dccp_sk(sk); int err = 0; const int old_state = sk->sk_state; if (old_state != DCCP_CLOSED) dccp_set_state(sk, DCCP_CLOSED); /* * This corresponds...
0
[ "CWE-416" ]
linux
69c64866ce072dea1d1e59a0d61e0f66c0dffb76
184,335,291,840,994,900,000,000,000,000,000,000,000
53
dccp: CVE-2017-8824: use-after-free in DCCP code Whenever the sock object is in DCCP_CLOSED state, dccp_disconnect() must free dccps_hc_tx_ccid and dccps_hc_rx_ccid and set to NULL. Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <...
user_mapping_ddl_aclcheck(Oid umuserid, Oid serverid, const char *servername) { Oid curuserid = GetUserId(); if (!pg_foreign_server_ownercheck(serverid, curuserid)) { if (umuserid == curuserid) { AclResult aclresult; aclresult = pg_foreign_server_aclcheck(serverid, curuserid, ACL_USAGE); if (aclresu...
0
[ "CWE-94" ]
postgres
b9b21acc766db54d8c337d508d0fe2f5bf2daab0
213,301,019,153,873,200,000,000,000,000,000,000,000
19
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
void ptlock_free(struct page *page) { kmem_cache_free(page_ptl_cachep, page->ptl); }
0
[ "CWE-20" ]
linux
6b7339f4c31ad69c8e9c0b2859276e22cf72176d
108,406,364,014,391,070,000,000,000,000,000,000,000
4
mm: avoid setting up anonymous pages into file mapping Reading page fault handler code I've noticed that under right circumstances kernel would map anonymous pages into file mappings: if the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated on ->mmap(), kernel would handle page fault to not populated...
void Item_sum::cleanup() { if (aggr) { delete aggr; aggr= NULL; } Item_result_field::cleanup(); const_item_cache= false; }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
181,724,259,482,058,900,000,000,000,000,000,000,000
10
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
void _handle_events(const XEvent *const pevent) { Display *const dpy = cimg::X11_attr().display; XEvent event = *pevent; switch (event.type) { case ClientMessage : { if ((int)event.xclient.message_type==(int)_wm_protocol_atom && (int)event.xclient.data.l[0]==(int)_wm_wind...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
97,863,744,867,940,420,000,000,000,000,000,000,000
102
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void alloc_init_cont_pmd(pud_t *pudp, unsigned long addr, unsigned long end, phys_addr_t phys, pgprot_t prot, phys_addr_t (*pgtable_alloc)(void), int flags) { unsigned long next; pud_t pud = READ_ONCE(*pudp); /* * Check for initial section mappings in the pgd/pud. */ BUG_ON(pud_sect(pud)); ...
0
[]
linux
15122ee2c515a253b0c66a3e618bc7ebe35105eb
7,047,066,084,173,210,000,000,000,000,000,000,000
36
arm64: Enforce BBM for huge IO/VMAP mappings ioremap_page_range doesn't honour break-before-make and attempts to put down huge mappings (using p*d_set_huge) over the top of pre-existing table entries. This leads to us leaking page table memory and also gives rise to TLB conflicts and spurious aborts, which have been s...
dequote_pathname (pathname) char *pathname; { if (MB_CUR_MAX > 1) wdequote_pathname (pathname); else udequote_pathname (pathname); }
0
[ "CWE-273", "CWE-787" ]
bash
951bdaad7a18cc0dc1036bba86b18b90874d39ff
311,027,664,859,492,280,000,000,000,000,000,000,000
8
commit bash-20190628 snapshot
void warning(char *str) { fprintf(stderr, "warning: %s\n", str); }
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
157,076,347,377,694,200,000,000,000,000,000,000,000
4
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
zzip_disk_entry_strdup_comment(ZZIP_DISK * disk, struct zzip_disk_entry *entry) { if (! disk || ! entry) { errno = EINVAL; return 0; } ___ zzip_size_t len = zzip_disk_entry_comment(entry); if (! len) { return strdup(""); /* ENOMEM */ } ___ char *text = zzip_disk...
0
[]
zziplib
72ec933663f738d8e166979aa7fd5590b2104a07
314,286,761,837,634,300,000,000,000,000,000,000,000
26
need to check on endbuf for stored files #15
jas_image_t *jp2_decode(jas_stream_t *in, const char *optstr) { jp2_box_t *box; int found; jas_image_t *image; jp2_dec_t *dec; bool samedtype; int dtype; unsigned int i; jp2_cmap_t *cmapd; jp2_pclr_t *pclrd; jp2_cdef_t *cdefd; unsigned int channo; int newcmptno; int_fast32_t *lutents; #if 0 jp2_cdefchan_t...
1
[ "CWE-125" ]
jasper
839b1bcf0450ff036c28e8db40a7abf886e02891
116,524,198,483,996,810,000,000,000,000,000,000,000
358
jp2_dec: fix `numchans` mixup When iterating over `dec->cdef->data.cdef.ents`, we need to use its `numchans` variable, not the one in `jp2_dec_t`. Fixes CVE-2018-19543 Fixes CVE-2017-9782 Closes https://github.com/jasper-maint/jasper/issues/13 Closes https://github.com/jasper-maint/jasper/issues/18 Closes https://gi...
void xenvif_disconnect(struct xenvif *vif) { struct net_device *dev = vif->dev; if (netif_carrier_ok(dev)) { rtnl_lock(); netif_carrier_off(dev); /* discard queued packets */ if (netif_running(dev)) xenvif_down(vif); rtnl_unlock(); xenvif_put(vif); } atomic_dec(&vif->refcnt); wait_event(vif->waiting_...
1
[ "CWE-20" ]
linux
48856286b64e4b66ec62b94e504d0b29c1ade664
88,792,264,702,573,050,000,000,000,000,000,000,000
26
xen/netback: shutdown the ring if it contains garbage. A buggy or malicious frontend should not be able to confuse netback. If we spot anything which is not as it should be then shutdown the device and don't try to continue with the ring in a potentially hostile state. Well behaved and non-hostile frontends will not b...
static int iwl_fw_rxf_len(struct iwl_fw_runtime *fwrt, struct iwl_fwrt_shared_mem_cfg *mem_cfg) { size_t hdr_len = sizeof(struct iwl_fw_error_dump_data) + sizeof(struct iwl_fw_error_dump_fifo); u32 fifo_len = 0; int i; if (!iwl_fw_dbg_type_on(fwrt, IWL_FW_ERROR_DUMP_RXF)) return 0; /* Count RXF2 size ...
0
[ "CWE-400", "CWE-401" ]
linux
b4b814fec1a5a849383f7b3886b654a13abbda7d
295,592,885,047,615,300,000,000,000,000,000,000,000
23
iwlwifi: dbg_ini: fix memory leak in alloc_sgtable In alloc_sgtable if alloc_page fails, the alocated table should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
PHP_FUNCTION(radius_put_vendor_attr) { long type, vendor; int len; char *data; radius_descriptor *raddesc; zval *z_radh; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlls", &z_radh, &vendor, &type, &data, &len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(raddesc, radius_descriptor *, &z_radh, -1,...
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
292,638,433,372,972,100,000,000,000,000,000,000,000
21
Fix a security issue in radius_get_vendor_attr(). The underlying rad_get_vendor_attr() function assumed that it would always be given valid VSA data. Indeed, the buffer length wasn't even passed in; the assumption was that the length field within the VSA structure would be valid. This could result in denial of servic...
static struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp) { struct rpc_cred *cred; spin_lock(&clp->cl_lock); cred = nfs4_get_renew_cred_locked(clp); spin_unlock(&clp->cl_lock); return cred; }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
21,815,021,066,673,465,000,000,000,000,000,000,000
9
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static void qeth_close_dev_handler(struct work_struct *work) { struct qeth_card *card; card = container_of(work, struct qeth_card, close_dev_work); QETH_CARD_TEXT(card, 2, "cldevhdl"); rtnl_lock(); dev_close(card->dev); rtnl_unlock(); ccwgroup_set_offline(card->gdev); }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
169,940,938,963,780,500,000,000,000,000,000,000,000
11
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
gif_lzw_fill_buffer (GifContext *context) { gint retval; if (context->code_done) { if (context->code_curbit >= context->code_lastbit) { g_set_error (context->error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, ...
0
[ "CWE-20" ]
gdk-pixbuf
3bac204e0d0241a0d68586ece7099e6acf0e9bea
265,374,599,228,571,540,000,000,000,000,000,000,000
42
Initial stab at getting the focus code to work. Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at getting the focus code to work. (gtk_tree_view_class_init): Add a bunch of keybindings. * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_c...
rede_get_entry(struct file_info *re) { struct file_info *file; if ((file = re->rede_files.first) != NULL) { re->rede_files.first = file->re_next; if (re->rede_files.first == NULL) re->rede_files.last = &(re->rede_files.first); } return (file); }
0
[ "CWE-125" ]
libarchive
f9569c086ff29259c73790db9cbf39fe8fb9d862
135,146,338,262,879,440,000,000,000,000,000,000,000
12
iso9660: validate directory record length
void __dump_page(struct page *page, const char *reason) { bool page_poisoned = PagePoisoned(page); int mapcount; /* * If struct page is poisoned don't access Page*() functions as that * leads to recursive loop. Page*() check for poisoned pages, and calls * dump_page() when detected. */ if (page_poisoned) {...
0
[ "CWE-416" ]
linux
7a9cdebdcc17e426fb5287e4a82db1dfe86339b2
98,291,515,603,651,060,000,000,000,000,000,000,000
45
mm: get rid of vmacache_flush_all() entirely Jann Horn points out that the vmacache_flush_all() function is not only potentially expensive, it's buggy too. It also happens to be entirely unnecessary, because the sequence number overflow case can be avoided by simply making the sequence number be 64-bit. That doesn't...
changed_common( linenr_T lnum, colnr_T col, linenr_T lnume, long xtra) { win_T *wp; tabpage_T *tp; int i; int cols; pos_T *p; int add; // mark the buffer as modified changed(); #ifdef FEAT_EVAL may_record_change(lnum, col, lnume, xtra); #endif #ifdef FEAT_DIFF ...
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
74,360,890,445,513,750,000,000,000,000,000,000,000
218
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
fdprint_message( int fd, message_t *message) { char *msg; if (message == NULL) return NULL; msg = sprint_message(message); full_write(fd, msg, strlen(msg)); g_free(msg); return message; }
0
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
108,968,352,064,395,720,000,000,000,000,000,000,000
14
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
uint16_t mesg_id (void) { static uint16_t id = 0; if (!id) { srandom (time (NULL)); id = random (); } id++; if (T.debug > 4) syslog (LOG_DEBUG, "mesg_id() = %d", id); return id; }
1
[ "CWE-330" ]
totd
afd8a10a6a21f82a70940d1b43cff48143250399
329,347,116,326,077,060,000,000,000,000,000,000,000
13
Patch provided by Gabor Lencse for generating better randomized mesg IDs.
static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct net_device *dev = info->user_ptr[1]; struct cfg80211_crypto_settings crypto; struct ieee80211_channel *chan; const u8 *bssid, *ssid, *ie = NULL, *prev_bssid = NULL; int ...
0
[ "CWE-362", "CWE-119" ]
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
290,808,868,320,465,400,000,000,000,000,000,000,000
60
nl80211: fix check for valid SSID size in scan operations In both trigger_scan and sched_scan operations, we were checking for the SSID length before assigning the value correctly. Since the memory was just kzalloc'ed, the check was always failing and SSID with over 32 characters were allowed to go through. This was...
__rb_data_page_index(struct buffer_data_page *bpage, unsigned index) { return bpage->data + index; }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
330,371,754,617,697,230,000,000,000,000,000,000,000
4
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { char buffer[MagickPathExtent], cache_filename[MagickPathExtent]; const char *property, *value; MagickBooleanType status; MagickOffsetType offset, scene; register ssize...
1
[ "CWE-476" ]
ImageMagick
76f94fa2d9ae5d96e15929b6b6ce0c866fc44c69
126,274,928,243,521,090,000,000,000,000,000,000,000
415
https://github.com/ImageMagick/ImageMagick/issues/746 https://github.com/ImageMagick/ImageMagick/issues/741
static inline void free_thread_stack(struct task_struct *tsk) { #ifdef CONFIG_VMAP_STACK struct vm_struct *vm = task_stack_vm_area(tsk); if (vm) { int i; for (i = 0; i < THREAD_SIZE / PAGE_SIZE; i++) { mod_memcg_page_state(vm->pages[i], MEMCG_KERNEL_STACK_KB, -(int)(PAGE_SIZE / 1024)); ...
0
[ "CWE-362" ]
linux
7b55851367136b1efd84d98fea81ba57a98304cf
98,175,762,975,096,590,000,000,000,000,000,000,000
31
fork: record start_time late This changes the fork(2) syscall to record the process start_time after initializing the basic task structure but still before making the new process visible to user-space. Technically, we could record the start_time anytime during fork(2). But this might lead to scenarios where a start_...
static int32_t bmdma_prepare_buf(IDEDMA *dma, int is_write) { BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma); IDEState *s = bmdma_active_if(bm); PCIDevice *pci_dev = PCI_DEVICE(bm->pci_dev); struct { uint32_t addr; uint32_t size; } prd; int l, len; pci_dma_sglist_init(&s->...
0
[ "CWE-399" ]
qemu
3251bdcf1c67427d964517053c3d185b46e618e8
18,093,621,734,413,098,000,000,000,000,000,000,000
53
ide: Correct handling of malformed/short PRDTs This impacts both BMDMA and AHCI HBA interfaces for IDE. Currently, we confuse the difference between a PRDT having "0 bytes" and a PRDT having "0 complete sectors." When we receive an incomplete sector, inconsistent error checking leads to an infinite loop wherein the c...
void GC_printf(const char *format, ...) { if (!GC_quiet) { char buf[BUFSZ + 1]; GC_PRINTF_FILLBUF(buf, format); # ifdef NACL (void)WRITE(GC_stdout, buf, strlen(buf)); /* Ignore errors silently. */ # else if (WRITE(GC_stdout, buf, strlen(buf)) < 0) ABORT("w...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
78,800,599,163,064,120,000,000,000,000,000,000,000
15
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static inline unsigned long long sched_ns(struct task_struct *p) { return task_sched_runtime(p); }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
25,744,542,327,033,305,000,000,000,000,000,000,000
4
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 ...
QTNSort(QTNode *in) { int i; /* since this function recurses, it could be driven to stack overflow. */ check_stack_depth(); if (in->valnode->type != QI_OPR) return; for (i = 0; i < in->nchild; i++) QTNSort(in->child[i]); if (in->nchild > 1) qsort((void *) in->child, in->nchild, sizeof(QTNode *), cmpQTN...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
107,826,217,544,397,410,000,000,000,000,000,000,000
15
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...
_nextA(int visited) { HmarkerList *hl = Currentbuf->hmarklist; BufferPoint *po; Anchor *an, *pan; int i, x, y, n = searchKeyNum(); ParsedURL url; if (Currentbuf->firstLine == NULL) return; if (!hl || hl->nmark == 0) return; an = retrieveCurrentAnchor(Currentbuf); if (visited != T...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
41,371,775,578,843,565,000,000,000,000,000,000,000
81
Make temporary directory safely when ~/.w3m is unwritable
static Image *ReadMATImageV4(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { typedef struct { unsigned char Type[4]; unsigned int nRows; unsigned int nCols; unsigned int imagf; unsigned int nameLen; } MAT4_HDR; long ldblk; EndianType endian; Image *ro...
0
[ "CWE-772" ]
ImageMagick
d3144a8be81aed6e635de68f0d8e97881638a398
233,152,253,152,513,100,000,000,000,000,000,000,000
230
https://github.com/ImageMagick/ImageMagick/issues/691
bool kthread_should_stop(void) { return test_bit(KTHREAD_SHOULD_STOP, &to_kthread(current)->flags); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
313,082,386,759,713,930,000,000,000,000,000,000,000
4
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
ews_connection_finalize (GObject *object) { EEwsConnectionPrivate *priv; priv = E_EWS_CONNECTION_GET_PRIVATE (object); g_free (priv->uri); g_free (priv->password); g_free (priv->email); g_free (priv->hash_key); g_free (priv->impersonate_user); g_free (priv->ssl_certificate_pem); g_clear_object (&priv->beare...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
329,592,040,138,158,400,000,000,000,000,000,000,000
22
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
static void fill_v2_desc(struct hnae_ring *ring, void *priv, int size, dma_addr_t dma, int frag_end, int buf_num, enum hns_desc_type type, int mtu) { struct hnae_desc *desc = &ring->desc[ring->next_to_use]; struct hnae_desc_cb *desc_cb = &ring->desc_cb[ring->next_to_use]; struct iphdr *iphdr; struct ipv6hdr...
0
[ "CWE-416" ]
linux
27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
109,442,494,142,057,240,000,000,000,000,000,000,000
92
net: hns: Fix a skb used after free bug skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x...
static const char *funcnamefromcall (lua_State *L, CallInfo *ci, const char **name) { if (ci->callstatus & CIST_HOOKED) { /* was it called inside a hook? */ *name = "?"; return "hook"; } else if (ci->callstatus & CIST_FIN) { /* was it called as a finali...
0
[ "CWE-787" ]
lua
42d40581dd919fb134c07027ca1ce0844c670daf
114,545,836,053,657,650,000,000,000,000,000,000,000
15
Save stack space while handling errors Because error handling (luaG_errormsg) uses slots from EXTRA_STACK, and some errors can recur (e.g., string overflow while creating an error message in 'luaG_runerror', or a C-stack overflow before calling the message handler), the code should use stack slots with parsimony. Thi...
GF_Err cprt_box_read(GF_Box *s,GF_BitStream *bs) { GF_CopyrightBox *ptr = (GF_CopyrightBox *)s; ISOM_DECREASE_SIZE(ptr, 2); gf_bs_read_int(bs, 1); //the spec is unclear here, just says "the value 0 is interpreted as undetermined" ptr->packedLanguageCode[0] = gf_bs_read_int(bs, 5); ptr->packedLanguageCode[1] = gf...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
187,755,073,664,886,470,000,000,000,000,000,000,000
29
fixed #1587
void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async) { struct blk_mq_hw_ctx *hctx; int i; queue_for_each_hw_ctx(q, hctx, i) { if (!test_bit(BLK_MQ_S_STOPPED, &hctx->state)) continue; clear_bit(BLK_MQ_S_STOPPED, &hctx->state); blk_mq_run_hw_queue(hctx, async); } }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
98,188,491,826,437,510,000,000,000,000,000,000,000
13
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
static int exec_runtime_add( Manager *m, const char *id, const char *tmp_dir, const char *var_tmp_dir, const int netns_storage_socket[2], ExecRuntime **ret) { _cleanup_(exec_runtime_freep) ExecRuntime *rt = NULL; ...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
307,197,925,179,877,400,000,000,000,000,000,000,000
56
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static bool replmd_recyclebin_enabled(struct ldb_module *module) { bool enabled = false; struct replmd_private *replmd_private = talloc_get_type_abort(ldb_module_get_private(module), struct replmd_private); /* * only lookup the recycle-bin state once per replication, then cache * the result. This ca...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
254,533,835,560,212,870,000,000,000,000,000,000,000
23
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
void sctp_chunk_put(struct sctp_chunk *ch) { if (refcount_dec_and_test(&ch->refcnt)) sctp_chunk_destroy(ch); }
0
[ "CWE-20" ]
linux
07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c
176,372,463,813,622,700,000,000,000,000,000,000,000
5
sctp: verify size of a new chunk in _sctp_make_chunk() When SCTP makes INIT or INIT_ACK packet the total chunk length can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when transmitting these packets, e.g. the crash on sending INIT_ACK: [ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168 ...
need_type_where( type_T *actual, type_T *expected, int offset, where_T where, cctx_T *cctx, int silent, int actual_is_const) { int ret; if (expected == &t_bool && actual != &t_bool && (actual->tt_flags & TTFLAG_BOOL_OK)) { // Using "0", "1" or the result of an expression with "&&" or "||" as a...
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
56,678,568,507,504,515,000,000,000,000,000,000,000
36
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
SYSCALL_DEFINE1(uname, struct old_utsname __user *, name) { int error = 0; if (!name) return -EFAULT; down_read(&uts_sem); if (copy_to_user(name, utsname(), sizeof(*name))) error = -EFAULT; up_read(&uts_sem); if (!error && override_release(name->release, sizeof(name->release))) error = -EFAULT; if (!err...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
52,469,723,117,872,840,000,000,000,000,000,000,000
18
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...
limit_printout_length(const char *str) { #define MAX_COPY_DATA_DISPLAY 100 int slen = strlen(str); int len; char *res; /* Fast path if definitely okay */ if (slen <= MAX_COPY_DATA_DISPLAY) return pstrdup(str); /* Apply encoding-dependent truncation */ len = pg_mbcliplen(str, slen, MAX_COPY_DATA_DISPL...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
191,238,088,315,154,460,000,000,000,000,000,000,000
24
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
static void cmv_decode_inter(CmvContext *s, AVFrame *frame, const uint8_t *buf, const uint8_t *buf_end) { const uint8_t *raw = buf + (s->avctx->width*s->avctx->height/16); int x,y,i; i = 0; for(y=0; y<s->avctx->height/4; y++) for(x=0; x<s->avctx->width/4 && buf_end - bu...
0
[ "CWE-703" ]
FFmpeg
5430839144c6da0160e8e0cfb0c8db01de432e94
175,934,418,007,037,560,000,000,000,000,000,000,000
38
eacmv: clear references on frame dimensions change Fixes invalid reads. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
static int _mysql_exec(void *conn, const char *cmd, char *value, size_t size, size_t *value_len, const sasl_utils_t *utils) { MYSQL_RES *result; MYSQL_ROW row; int row_count, len; len = strlen(cmd); /* mysql_real_query() doesn't want a terminating ';' */ if (cmd[len-1] == ';') len-...
0
[ "CWE-89" ]
cyrus-sasl
9eff746c9daecbcc0041b09a5a51ba30738cdcbc
119,710,468,785,314,180,000,000,000,000,000,000,000
75
CVE-2022-24407 Escape password for SQL insert/update commands. Signed-off-by: Klaus Espenlaub <klaus@espenlaub.com>
static NOINLINE int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr) { struct dhcp_packet packet; struct in_addr temp_addr; /* * RFC 2131 4.3.2 DHCPREQUEST message * ... * DHCPREQUEST generated during RENEWING state: * * 'server identifier' MUST NOT be filled in, 'requested IP address' * option MUST ...
0
[ "CWE-125" ]
busybox
6d3b4bb24da9a07c263f3c1acf8df85382ff562c
192,216,650,192,534,630,000,000,000,000,000,000,000
38
udhcpc: check that 4-byte options are indeed 4-byte, closes 11506 function old new delta udhcp_get_option32 - 27 +27 udhcp_get_option 231 248 +17 ----------------------------------...
X11_static& X11_attr() { static X11_static val; return val; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
166,696,834,879,783,980,000,000,000,000,000,000,000
1
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void vrend_draw_bind_abo_shader(struct vrend_context *ctx) { uint32_t mask; struct vrend_abo *abo; struct vrend_resource *res; int i; if (!has_feature(feat_atomic_counters)) return; mask = ctx->sub->abo_used_mask; while (mask) { i = u_bit_scan(&mask); abo = &ctx->sub->ab...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
250,429,049,738,064,600,000,000,000,000,000,000,000
20
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
uint32_t update_free(DOS_FS * fs) { uint32_t i; uint32_t free = 0; int do_set = 0; for (i = 2; i < fs->clusters + 2; i++) { FAT_ENTRY curEntry; get_fat(&curEntry, fs->fat, i, fs); if (!get_owner(fs, i) && !FAT_IS_BAD(fs, curEntry.value)) ++free; } if (!fs->fsinfo_start) return free; ...
0
[ "CWE-703", "CWE-189" ]
dosfstools
07908124838afcc99c577d1d3e84cef2dbd39cb7
23,807,658,957,556,786,000,000,000,000,000,000,000
51
set_fat(): Fix off-by-2 error leading to corruption in FAT12 In FAT12 two 12 bit entries are combined to a 24 bit value (three bytes). Therefore, when an even numbered FAT entry is set in FAT12, it must be be combined with the following entry. To prevent accessing beyond the end of the FAT array, it must be checked th...
int mthd_my_read_query_result(MYSQL *mysql) { uchar *pos; ulong field_count; MYSQL_DATA *fields; ulong length; my_bool can_local_infile= (mysql->options.extension) && (mysql->extension->auto_local_infile != WAIT_FOR_QUERY); if (mysql->options.extension && mysql->extension->auto_local_infile == ACCEPT_FILE_...
0
[ "CWE-20" ]
mariadb-connector-c
2759b87d72926b7c9b5426437a7c8dd15ff57945
42,436,805,830,013,063,000,000,000,000,000,000,000
42
sanity checks for client-supplied OK packet content reported by Matthias Kaiser, Apple Information Security
static int emulator_pio_in(struct kvm_vcpu *vcpu, int size, unsigned short port, void *val, unsigned int count) { if (vcpu->arch.pio.count) { /* * Complete a previous iteration that required userspace I/O. * Note, @count isn't guaranteed to match pio.count as userspace * can modify ECX before rerunnin...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
217,797,697,559,729,370,000,000,000,000,000,000,000
22
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
void DataReaderImpl::InnerDataReaderListener::onReaderMatched( RTPSReader* /*reader*/, const SubscriptionMatchedStatus& info) { DataReaderListener* listener = data_reader_->get_listener_for(StatusMask::subscription_matched()); if (listener != nullptr) { listener->on_subscription_matc...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
229,990,396,968,670,200,000,000,000,000,000,000,000
10
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
TEST_F(HttpConnectionManagerImplTest, HitFilterWatermarkLimits) { initial_buffer_limit_ = 1; streaming_filter_ = true; setup(false, ""); setUpEncoderAndDecoder(false, false); // The filter is a streaming filter. Sending 4 bytes should hit the // watermark limit and disable reads on the stream. EXPECT_CAL...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
207,725,213,270,793,270,000,000,000,000,000,000,000
46
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static void bt_tags_for_each(struct blk_mq_tags *tags, struct blk_mq_bitmap_tags *bt, unsigned int off, busy_tag_iter_fn *fn, void *data, bool reserved) { struct request *rq; int bit, i; if (!tags->rqs) return; for (i = 0; i < bt->map_nr; i++) { struct blk_align_bitmap *bm = &bt->map[i]; for (bit = find...
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
14,487,834,132,707,455,000,000,000,000,000,000,000
22
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
static float cut(const float val) { return (float)val; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
158,972,417,375,797,640,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
TEST_P(Http2CodecImplTest, Invalid103) { initialize(); TestRequestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); EXPECT_CALL(request_decoder_, decodeHeaders_(_, true)); request_encoder_->encodeHeaders(request_headers, true); TestResponseHeaderMapImpl continue_headers{{...
1
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
64,058,566,091,325,910,000,000,000,000,000,000,000
20
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
ServerItem::ServerItem(const BonjourRecord &br) : QTreeWidgetItem(QTreeWidgetItem::UserType) { siParent = NULL; bParent = false; itType = LANType; qsName = br.serviceName; qsBonjourHost = qsName; brRecord = br; usPort = 0; bCA = false; init(); }
0
[ "CWE-59", "CWE-61" ]
mumble
e59ee87abe249f345908c7d568f6879d16bfd648
204,245,962,265,957,550,000,000,000,000,000,000,000
12
FIX(client): Only allow "http"/"https" for URLs in ConnectDialog Our public server list registration script doesn't have an URL scheme whitelist for the website field. Turns out a malicious server can register itself with a dangerous URL in an attempt to attack a user's machine. User interaction is required, as the ...
static int bus_socket_read_message_need(sd_bus *bus, size_t *need) { uint32_t a, b; uint8_t e; uint64_t sum; assert(bus); assert(need); assert(IN_SET(bus->state, BUS_RUNNING, BUS_HELLO)); if (bus->rbuffer_size < sizeof(struct bus_header)) { *need...
0
[ "CWE-787" ]
systemd
6d586a13717ae057aa1b4127400c3de61cd5b9e7
173,911,917,271,064,260,000,000,000,000,000,000,000
51
sd-bus: if we receive an invalid dbus message, ignore and proceeed dbus-daemon might have a slightly different idea of what a valid msg is than us (for example regarding valid msg and field sizes). Let's hence try to proceed if we can and thus drop messages rather than fail the connection if we fail to validate a mess...
static const char *cmd_to_string(ut32 cmd) { switch (cmd) { case LC_DATA_IN_CODE: return "LC_DATA_IN_CODE"; case LC_RPATH: return "LC_RPATH"; case LC_SEGMENT: return "LC_SEGMENT"; case LC_SEGMENT_64: return "LC_SEGMENT_64"; case LC_SYMTAB: return "LC_SYMTAB"; case LC_SYMSEG: return "LC_SYMSEG"; case...
0
[ "CWE-416" ]
radare2
d1e8ac62c6d978d4662f69116e30230d43033c92
236,656,901,119,795,550,000,000,000,000,000,000,000
53
Fix null deref and uaf in mach0 parser
void __init inode_init(void) { unsigned int loop; /* inode slab cache */ inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode), 0, (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC| SLAB_MEM_SPREAD), init_once); /* Hash may have been set up in inode_init_early */ if (!hashdist) retu...
0
[ "CWE-284", "CWE-264" ]
linux
23adbe12ef7d3d4195e80800ab36b37bee28cd03
38,598,908,058,651,810,000,000,000,000,000,000,000
30
fs,userns: Change inode_capable to capable_wrt_inode_uidgid The kernel has no concept of capabilities with respect to inodes; inodes exist independently of namespaces. For example, inode_capable(inode, CAP_LINUX_IMMUTABLE) would be nonsense. This patch changes inode_capable to check for uid and gid mappings and rena...
std::string RandomString(std::size_t length) { static const char chrs[] = "0123456789" "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; thread_local static std::mt19937 rg{ std::random_device{}() }; thread_local static std::uniform_int_distribution<std::string::size_type> pick{ ...
0
[ "CWE-22" ]
webcc
55a45fd5039061d5cc62e9f1b9d1f7e97a15143f
190,733,737,382,282,040,000,000,000,000,000,000,000
19
fix static file serving security issue; fix url path encoding issue
osf_filldir(void *__buf, const char *name, int namlen, loff_t offset, u64 ino, unsigned int d_type) { struct osf_dirent __user *dirent; struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf; unsigned int reclen = ALIGN(NAME_OFFSET + namlen + 1, sizeof(u32)); unsigned int d_ino; buf->error = ...
0
[ "CWE-703", "CWE-264", "CWE-189" ]
linux
21c5977a836e399fc710ff2c5367845ed5c2527f
176,267,895,307,217,800,000,000,000,000,000,000,000
36
alpha: fix several security issues Fix several security issues in Alpha-specific syscalls. Untested, but mostly trivial. 1. Signedness issue in osf_getdomainname allows copying out-of-bounds kernel memory to userland. 2. Signedness issue in osf_sysinfo allows copying large amounts of kernel memory to userland. 3. ...
GF_Err gen_sample_entry_Size(GF_Box *s) { GF_SampleEntryBox *ptr = (GF_SampleEntryBox *)s; ptr->size += 8; return gf_isom_box_array_size(s, ptr->protections); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
185,992,535,474,371,500,000,000,000,000,000,000,000
6
prevent dref memleak on invalid input (#1183)
try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) { unsigned long flags; int cpu, success = 0; /* * If we are going to wake up a thread waiting for CONDITION we * need to ensure that CONDITION=1 done by the caller can not be * reordered with p->state check below. This pairs with mb() i...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
300,331,109,824,613,060,000,000,000,000,000,000,000
77
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static void ext4_free_io_end(ext4_io_end_t *io) { BUG_ON(!io); if (io->page) put_page(io->page); iput(io->inode); kfree(io); }
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
169,702,644,170,072,630,000,000,000,000,000,000,000
8
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
void StreamEncoderImpl::encodeTrailersBase(const HeaderMap& trailers) { if (!connection_.enableTrailers()) { return endEncode(); } // Trailers only matter if it is a chunk transfer encoding // https://tools.ietf.org/html/rfc7230#section-4.4 if (chunk_encoding_) { // Finalize the body connection_.b...
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
64,387,858,370,729,310,000,000,000,000,000,000,000
23
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int snd_usb_mbox2_boot_quirk(struct usb_device *dev) { struct usb_host_config *config = dev->actconfig; int err; u8 bootresponse[0x12]; int fwsize; int count; fwsize = le16_to_cpu(get_cfg_desc(config)->wTotalLength); if (fwsize != MBOX2_FIRMWARE_SIZE) { dev_err(&dev->dev, "Invalid firmware size=%d.\n"...
0
[]
sound
0f886ca12765d20124bd06291c82951fd49a33be
79,689,506,189,719,130,000,000,000,000,000,000,000
55
ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk() create_fixed_stream_quirk() may cause a NULL-pointer dereference by accessing the non-existing endpoint when a USB device with a malformed USB descriptor is used. This patch avoids it simply by adding a sanity check of bNumEndpoints before the acces...
virtual bool getCanIgnorePathMTU() { return true; }
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
259,062,553,550,464,070,000,000,000,000,000,000,000
3
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
static kdc_code kdc_process(struct kdc_server *kdc, TALLOC_CTX *mem_ctx, DATA_BLOB *input, DATA_BLOB *reply, struct tsocket_address *peer_addr, struct tsocket_address *my_addr, int datagram_reply) { int ret; char *pa; struct sockaddr_storage ss; krb5_data k5_reply; krb5_kd...
0
[ "CWE-288" ]
samba
bbad8f1de43d643e20f1a71c3466f08ed7c9d480
187,160,993,849,551,550,000,000,000,000,000,000,000
57
CVE-2022-32744 s4:kdc: Don't allow HDB keytab iteration A fallback in krb5_rd_req_ctx() means that Samba's kpasswd service will try many inappropriate keys to decrypt the ticket supplied to it. For example, it will accept a ticket encrypted with the Administrator's key, when it should rather accept only tickets encryp...
void destroy() { if (owner) { removeDirTree(path); } }
0
[ "CWE-401" ]
passenger
94428057c602da3d6d34ef75c78091066ecac5c0
222,020,062,931,603,500,000,000,000,000,000,000,000
5
Fix a symlink-related security vulnerability. The fix in commit 34b10878 and contained a small attack time window in between two filesystem operations. This has been fixed.
static void _state_release(struct bpf_state *state) { unsigned int bkt; struct bpf_hash_bkt *iter; if (state == NULL) return; /* release all of the hash table entries */ for (bkt = 0; bkt < _BPF_HASH_SIZE; bkt++) { while (state->htbl[bkt]) { iter = state->htbl[bkt]; state->htbl[bkt] = iter->next; __...
0
[]
libseccomp
cf5d1538d243fb6f1839db70b69469d3d7e9e077
264,698,904,891,537,830,000,000,000,000,000,000,000
21
bpf: pass the correct accumulator state to the next level We were mistakenly passing the wrong accumulator state (the state at the start of the instruction block, not at the end) which was causing us to generate unnecessary load instructions. Signed-off-by: Paul Moore <paul@paul-moore.com>
prepare_enc_data(const uint8_t *indata, int indata_len, uint8_t **outdata, int *outdata_len) { int tag, class; long tlen, slen; const uint8_t *p = indata, *oldp; if (ASN1_get_object(&p, &slen, &tag, &class, indata_len) & 0x80) return EINVAL; if (tag != V_ASN1_SEQUENCE) ...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
96,907,054,382,739,170,000,000,000,000,000,000,000
28
Fix PKINIT cert matching data construction Rewrite X509_NAME_oneline_ex() and its call sites to use dynamic allocation and to perform proper error checking. ticket: 8617 target_version: 1.16 target_version: 1.15-next target_version: 1.14-next tags: pullup