func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void __perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) { int ctxn; for_each_task_context_nr(ctxn) perf_event_context_sched_out(task, ctxn, next); /* * if cgroup events exist on this CPU, then we need * to check if we have to switch out PMU state. * cgroup event are system...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
173,320,756,162,112,830,000,000,000,000,000,000,000
16
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
static void sctp_assoc_bh_rcv(struct work_struct *work) { struct sctp_association *asoc = container_of(work, struct sctp_association, base.inqueue.immediate); struct sctp_endpoint *ep; struct sctp_chunk *chunk; struct sock *sk; struct sctp_inq *inqueue; int state; sctp_subtype_t subtype; int error = 0...
1
[]
linux
bbd0d59809f923ea2b540cbd781b32110e249f6e
209,574,450,719,557,150,000,000,000,000,000,000,000
50
[SCTP]: Implement the receive and verification of AUTH chunk This patch implements the receive path needed to process authenticated chunks. Add ability to process the AUTH chunk and handle edge cases for authenticated COOKIE-ECHO as well. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David ...
static unsigned long read_swap_header(struct swap_info_struct *p, union swap_header *swap_header, struct inode *inode) { int i; unsigned long maxpages; unsigned long swapfilepages; if (memcmp("SWAPSPACE2", swap_header->magic.magic, 10)) { printk(KERN_ERR "Unable to find swap-space signature\n"); retu...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
187,347,178,479,355,200,000,000,000,000,000,000,000
76
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
Item *negate_expression(THD *thd, Item *expr) { Item *negated; if (expr->type() == Item::FUNC_ITEM && ((Item_func *) expr)->functype() == Item_func::NOT_FUNC) { /* it is NOT(NOT( ... )) */ Item *arg= ((Item_func *) expr)->arguments()[0]; enum_parsing_place place= thd->lex->current_select->parsin...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
92,400,750,821,458,840,000,000,000,000,000,000,000
22
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
static int __init io_uring_init(void) { req_cachep = KMEM_CACHE(io_kiocb, SLAB_HWCACHE_ALIGN | SLAB_PANIC); return 0; };
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
28,699,049,265,702,684,000,000,000,000,000,000,000
5
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...
static void gen_setcc1(DisasContext *s, int b, TCGv reg) { CCPrepare cc = gen_prepare_cc(s, b, reg); if (cc.no_setcond) { if (cc.cond == TCG_COND_EQ) { tcg_gen_xori_tl(reg, cc.reg, 1); } else { tcg_gen_mov_tl(reg, cc.reg); } return; } if (cc.cond...
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
312,228,557,789,516,900,000,000,000,000,000,000,000
29
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
static char *dex_field_name(RBinDexObj *bin, int fid) { int cid, tid, type_id; if (!bin || !bin->fields) { return NULL; } if (fid < 0 || fid >= bin->header.fields_size) { return NULL; } cid = bin->fields[fid].class_id; if (cid < 0 || cid >= bin->header.types_size) { return NULL; } type_id = bin->fields[f...
0
[ "CWE-125" ]
radare2
ead645853a63bf83d8386702cad0cf23b31d7eeb
269,253,331,365,397,730,000,000,000,000,000,000,000
20
fix #6857
static wchar_t convert(char value) { return value; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
121,108,620,404,659,570,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
static inline void vmsvga_update_rect(struct vmsvga_state_s *s, int x, int y, int w, int h) { DisplaySurface *surface = qemu_console_surface(s->vga.con); int line; int bypl; int width; int start; uint8_t *src; uint8_t *dst; if (!vmsvga_verify_rect(s...
0
[]
qemu
fa892e9abb728e76afcf27323ab29c57fb0fe7aa
312,641,007,792,569,040,000,000,000,000,000,000,000
30
ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206) Prevent potential integer overflow by limiting 'width' and 'height' to 512x512. Also change 'datasize' type to size_t. Refer to security advisory https://starlabs.sg/advisories/22-4206/ for more information. Fixes: CVE-2021-4206 Signed-off-by: Mauro Matt...
int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac) { int ret = 0; if (!priv->media_connected) return 0; switch (priv->bss_mode) { case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_P2P_CLIENT: ret = mwifiex_deauthenticate_infra(priv, mac); if (ret) cfg80211_disconnected(priv->netdev, 0, NUL...
0
[ "CWE-120", "CWE-787" ]
linux
5c455c5ab332773464d02ba17015acdca198f03d
236,807,138,668,342,800,000,000,000,000,000,000,000
27
mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start mwifiex_cmd_802_11_ad_hoc_start() calls memcpy() without checking the destination size may trigger a buffer overflower, which a local user could use to cause denial of service or the execution of arbitrary code. Fix it by putting the length chec...
static int do_rawv6_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { struct raw6_sock *rp = raw6_sk(sk); int val, len; if (get_user(len, optlen)) return -EFAULT; switch (optname) { case IPV6_CHECKSUM: /* * We allow getsockopt() for IPPROTO_IPV6-level ...
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
68,544,914,255,522,760,000,000,000,000,000,000,000
34
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
static void do_error_trap(struct pt_regs *regs, long error_code, char *str, unsigned long trapnr, int signr) { siginfo_t info; RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU"); /* * WARN*()s end up here; fix them up before we call the * notifier chain. */ if (!user_mode(regs) && fixup...
0
[ "CWE-362", "CWE-284" ]
linux
d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9
227,804,029,208,512,780,000,000,000,000,000,000,000
21
x86/entry/64: Don't use IST entry for #BP stack There's nothing IST-worthy about #BP/int3. We don't allow kprobes in the small handful of places in the kernel that run at CPL0 with an invalid stack, and 32-bit kernels have used normal interrupt gates for #BP forever. Furthermore, we don't allow kprobes in places tha...
void X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) { ctx->untrusted = sk; }
0
[ "CWE-295" ]
openssl
2a40b7bc7b94dd7de897a74571e7024f0cf0d63b
317,110,559,434,477,140,000,000,000,000,000,000,000
4
check_chain_extensions: Do not override error return value by check_curve The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates present in a certificate chain. It is not set by default. Starting from OpenSSL version 1.1.1h a check to disallow certificates with explicitly encoded elli...
TPMS_RSA_PARMS_Marshal(TPMS_RSA_PARMS *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPMT_SYM_DEF_OBJECT_Marshal(&source->symmetric, buffer, size); written += TPMT_RSA_SCHEME_Marshal(&source->scheme, buffer, size); written += TPMI_RSA_KEY_BITS_Marshal(&source->keyBits, buffer, si...
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
37,149,107,916,778,840,000,000,000,000,000,000,000
10
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static bool ctx_single_port_submission(const struct intel_context *ce) { return (IS_ENABLED(CONFIG_DRM_I915_GVT) && i915_gem_context_force_single_submission(ce->gem_context)); }
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
331,753,797,948,501,230,000,000,000,000,000,000,000
5
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
static NTSTATUS dcesrv_lsa_CREDRWRITE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct lsa_CREDRWRITE *r) { DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
54,639,747,295,291,200,000,000,000,000,000,000,000
5
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...
stop_conversation (GdmSessionConversation *conversation) { close_conversation (conversation); conversation->is_stopping = TRUE; gdm_session_worker_job_stop (conversation->job); }
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
13,265,212,797,846,660,000,000,000,000,000,000,000
7
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
static struct sit_entry_set *grab_sit_entry_set(void) { struct sit_entry_set *ses = f2fs_kmem_cache_alloc(sit_entry_set_slab, GFP_NOFS); ses->entry_cnt = 0; INIT_LIST_HEAD(&ses->set_list); return ses; }
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
305,585,924,416,788,000,000,000,000,000,000,000,000
9
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...
static int rsi_send_reset_mac(struct rsi_common *common) { struct sk_buff *skb; struct rsi_mac_frame *mgmt_frame; rsi_dbg(MGMT_TX_ZONE, "%s: Sending reset MAC frame\n", __func__); skb = dev_alloc_skb(FRAME_DESC_SZ); if (!skb) { rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n", __func__); return -ENOM...
0
[ "CWE-400", "CWE-401" ]
linux
d563131ef23cbc756026f839a82598c8445bc45f
288,459,463,782,373,700,000,000,000,000,000,000,000
30
rsi: release skb if rsi_prepare_beacon fails In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
static int __gup_device_huge_pud(pud_t pud, pud_t *pudp, unsigned long addr, unsigned long end, unsigned int flags, struct page **pages, int *nr) { BUILD_BUG(); return 0; }
0
[ "CWE-362" ]
linux
17839856fd588f4ab6b789f482ed3ffd7c403e1f
296,304,941,523,065,020,000,000,000,000,000,000,000
7
gup: document and work around "COW can break either way" issue Doing a "get_user_pages()" on a copy-on-write page for reading can be ambiguous: the page can be COW'ed at any time afterwards, and the direction of a COW event isn't defined. Yes, whoever writes to it will generally do the COW, but if the thread that did...
void compute_part_of_sort_key_for_equals(JOIN *join, TABLE *table, Item_field *item_field, key_map *col_keys) { col_keys->clear_all(); col_keys->merge(item_field->field->part_of_sortkey); if (!optimizer_flag(join->thd, OPTIMIZER_...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
339,186,718,154,815,900,000,000,000,000,000,000,000
58
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static struct ucma_event *ucma_create_uevent(struct ucma_context *ctx, struct rdma_cm_event *event) { struct ucma_event *uevent; uevent = kzalloc(sizeof(*uevent), GFP_KERNEL); if (!uevent) return NULL; uevent->ctx = ctx; switch (event->event) { case RDMA_CM_EVENT_MULTICAST_JOIN: case RDMA_CM_EVENT_...
0
[ "CWE-416" ]
linux
f5449e74802c1112dea984aec8af7a33c4516af1
11,037,572,689,008,856,000,000,000,000,000,000,000
36
RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy ucma_destroy_id() assumes that all things accessing the ctx will do so via the xarray. This assumption violated only in the case the FD is being closed, then the ctx is reached via the ctx_list. Normally this is OK since ucma_destroy_id() cannot run concu...
struct r_bin_pe_addr_t *PE_(check_mingw)(RBinPEObj *pe) { bool sw = false; ut8 b[1024] = {0}; size_t n = 0; if (!pe || !pe->b) { return 0LL; } struct r_bin_pe_addr_t* entry = PE_(r_bin_pe_get_entrypoint) (pe); if (r_buf_read_at (pe->b, entry->paddr, b, sizeof (b)) < 0) { pe_printf ("Warning: Cannot read entr...
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
48,659,485,283,721,990,000,000,000,000,000,000,000
54
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
Item *derived_field_transformer_for_where(THD *thd, uchar *arg) { return convert_to_basic_const_item(thd); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
222,795,311,258,714,820,000,000,000,000,000,000,000
2
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
static int decode_prediction(AACContext *ac, IndividualChannelStream *ics, GetBitContext *gb) { int sfb; if (get_bits1(gb)) { ics->predictor_reset_group = get_bits(gb, 5); if (ics->predictor_reset_group == 0 || ics->predictor_reset_group > 30) { ...
0
[ "CWE-703" ]
FFmpeg
6e42ccb9dbc13836cd52cda594f819d17af9afa2
62,576,785,998,936,260,000,000,000,000,000,000,000
18
avcodec/aacdec: Fix pulse position checks in decode_pulses() Fixes out of array read Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
void _yr_re_fiber_kill_all( RE_FIBER_LIST* fiber_list, RE_FIBER_POOL* fiber_pool) { if (fiber_list->head != NULL) _yr_re_fiber_kill_tail(fiber_list, fiber_pool, fiber_list->head); }
0
[ "CWE-125" ]
yara
83d799804648c2a0895d40a19835d9b757c6fa4e
258,425,216,730,690,760,000,000,000,000,000,000,000
7
Fix issue #646 (#648) * Fix issue #646 and some edge cases with wide regexps using \b and \B * Rename function IS_WORD_CHAR to _yr_re_is_word_char
get_ext_sys_var(const char *tag) { struct ctl_var * v; size_t c; const char * val; val = NULL; c = strlen(tag); for (v = ext_sys_var; !(EOV & v->flags); v++) { if (NULL != v->text && !memcmp(tag, v->text, c)) { if ('=' == v->text[c]) { val = v->text + c + 1; break; } else if ('\0' == v->text[c...
0
[ "CWE-22" ]
ntp
184516e143ce4448ddb5b9876dd372008cc779f6
143,899,018,104,905,280,000,000,000,000,000,000,000
22
[TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command.
static struct file *pick_file(struct files_struct *files, unsigned fd) { struct file *file; struct fdtable *fdt; spin_lock(&files->file_lock); fdt = files_fdtable(files); if (fd >= fdt->max_fds) { file = ERR_PTR(-EINVAL); goto out_unlock; } file = fdt->fd[fd]; if (!file) { file = ERR_PTR(-EBADF); goto ...
0
[]
linux
054aa8d439b9185d4f5eb9a90282d1ce74772969
224,331,800,870,297,200,000,000,000,000,000,000,000
23
fget: check that the fd still exists after getting a ref to it Jann Horn points out that there is another possible race wrt Unix domain socket garbage collection, somewhat reminiscent of the one fixed in commit cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK"). See the extended comment about the garbage colle...
static GF_Err dasher_stream_period_changed(GF_Filter *filter, GF_DasherCtx *ctx, GF_DashStream *ds, Bool is_new_period_request) { GF_Err e = GF_OK; //period switching, check the stream is still scheduled - if so and not done, flush it, update period duration s32 res = gf_list_find(ctx->current_period->streams, ds); ...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
61,971,064,753,157,730,000,000,000,000,000,000,000
100
fixed #2138
static int decompTest(char *fileName) { FILE *file = NULL; tjhandle handle = NULL; unsigned char **jpegBuf = NULL, *srcBuf = NULL; unsigned long *jpegSize = NULL, srcSize, totalJpegSize; tjtransform *t = NULL; double start, elapsed; int ps = tjPixelSize[pf], tile, row, col, i, iter, retval = 0, decompsrc ...
1
[ "CWE-787" ]
libjpeg-turbo
2a9e3bd7430cfda1bc812d139e0609c6aca0b884
151,133,768,830,025,030,000,000,000,000,000,000,000
218
TurboJPEG: Properly handle gigapixel images Prevent several integer overflow issues and subsequent segfaults that occurred when attempting to compress or decompress gigapixel images with the TurboJPEG API: - Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid integer overflow when computing the retur...
static irqreturn_t yam_interrupt(int irq, void *dev_id) { struct net_device *dev; struct yam_port *yp; unsigned char iir; int counter = 100; int i; int handled = 0; for (i = 0; i < NR_PORTS; i++) { dev = yam_devs[i]; yp = netdev_priv(dev); if (!netif_running(dev)) continue; while ((iir = IIR_MASK &...
0
[ "CWE-401" ]
linux
29eb31542787e1019208a2e1047bb7c76c069536
148,610,716,293,994,440,000,000,000,000,000,000,000
50
yam: fix a memory leak in yam_siocdevprivate() ym needs to be free when ym->cmd != SIOCYAMSMCS. Fixes: 0781168e23a2 ("yam: fix a missing-check bug") Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
vhost_scsi_send_evt(struct vhost_scsi *vs, struct vhost_scsi_tpg *tpg, struct se_lun *lun, u32 event, u32 reason) { struct vhost_scsi_evt *evt; evt = vhost_scsi_allocate_evt(vs, event, reason); if (!evt) return; if (tpg && lun) { /* TODO: share lun setup code with virtio-scsi.ko */ /* ...
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
26,713,469,318,015,517,000,000,000,000,000,000,000
28
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
static void test_drop_temp() { int rc; myheader("test_drop_temp"); rc= mysql_query(mysql, "DROP DATABASE IF EXISTS test_drop_temp_db"); myquery(rc); rc= mysql_query(mysql, "CREATE DATABASE test_drop_temp_db"); myquery(rc); rc= mysql_query(mysql, "CREATE TABLE test_drop_temp_db.t1(c1 int, c2 char(1))")...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
265,315,742,961,445,040,000,000,000,000,000,000,000
107
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 void tftp_send_next_block(struct tftp_session *spt, struct tftp_t *recv_tp) { struct mbuf *m; struct tftp_t *tp; int nobytes; m = m_get(spt->slirp); if (!m) { return; } tp = tftp_prep_mbuf_data(spt, m); tp->tp_op = htons(TFTP_DATA); ...
1
[]
libslirp
990163cf3ac86b7875559f49602c4d76f46f6f30
218,068,354,455,397,300,000,000,000,000,000,000,000
43
tftp: introduce a header structure Instead of using a composed structure and potentially reading past the incoming buffer, use a different structure for the header. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
privsep_interface_linkmtu(const char *iface, uint32_t mtu) { struct privsep_command cmd; cmd.type = SET_INTERFACE_LINKMTU; strncpy(cmd.iface, iface, sizeof(cmd.iface)); cmd.val = mtu; if (writen(pfd, &cmd, sizeof(cmd)) != sizeof(cmd)) return (-1); return 0; }
0
[ "CWE-20" ]
radvd
074816cd0b37aac7b3209987e6e998f0a847b275
335,181,433,862,225,800,000,000,000,000,000,000,000
11
privsep_read_loop() should return on unprivileged daemon death / socket close(), not loop forever with polling read() getting -1.
vim_isspace(int x) { return ((x >= 9 && x <= 13) || x == ' '); }
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
320,071,410,523,798,520,000,000,000,000,000,000,000
4
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.
static int __io_destroy_buffers(int id, void *p, void *data) { struct io_ring_ctx *ctx = data; struct io_buffer *buf = p; __io_remove_buffers(ctx, buf, id, -1U); return 0;
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
293,461,319,259,144,600,000,000,000,000,000,000,000
8
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
ofputil_decode_flow_mod(struct ofputil_flow_mod *fm, const struct ofp_header *oh, enum ofputil_protocol protocol, const struct tun_table *tun_table, const struct vl_mff_map *vl_mff_map, struct ofpbuf ...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
265,212,633,664,913,080,000,000,000,000,000,000,000
201
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
void sctp_chunk_hold(struct sctp_chunk *ch) { atomic_inc(&ch->refcnt); }
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
104,231,956,180,582,300,000,000,000,000,000,000,000
4
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
bool ZrtpQueue::isEnrollmentMode() { if (zrtpEngine != NULL) return zrtpEngine->isEnrollmentMode(); else return false; }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
320,394,576,632,011,780,000,000,000,000,000,000,000
6
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
static OPJ_BOOL opj_j2k_mct_validation(opj_j2k_t * p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t * p_manager) { OPJ_BOOL l_is_valid = OPJ_TRUE; OPJ_UINT32 i, j; /* preconditions */ assert(p_j2k != 00); assert(p_s...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
133,797,038,580,021,130,000,000,000,000,000,000,000
35
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
SELECT_LEX *LEX::parsed_TVC_end() { SELECT_LEX *res= pop_select(); // above TVC select if (!(res->tvc= new (thd->mem_root) table_value_constr(many_values, res, res->options))) return NULL; restore_values_list_state(); return res; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
125,083,336,267,172,670,000,000,000,000,000,000,000
11
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
char *cli_hashstream(FILE *fs, unsigned char *digcpy, int type) { unsigned char digest[32]; char buff[FILEBUFF]; char *hashstr, *pt; const char *alg=NULL; int i, bytes, size; void *ctx; switch (type) { case 1: alg = "md5"; size = 16; break; ...
0
[]
clamav-devel
167c0079292814ec5523d0b97a9e1b002bf8819b
247,525,587,838,235,960,000,000,000,000,000,000,000
47
fix 0.99.3 false negative of virus Pdf.Exploit.CVE_2016_1046-1.
tiff_document_get_resolution (TiffDocument *tiff_document, gfloat *x_res, gfloat *y_res) { gfloat x = 0.0; gfloat y = 0.0; gushort unit; if (TIFFGetField (tiff_document->tiff, TIFFTAG_XRESOLUTION, &x) && TIFFGetField (tiff_document->tiff, TIFFTAG_YRESOLUTION, &y)) { if (TIFFGet...
0
[ "CWE-754" ]
evince
234f034a4d15cd46dd556f4945f99fbd57ef5f15
200,262,271,772,780,340,000,000,000,000,000,000,000
22
tiff: Handle failure from TIFFReadRGBAImageOriented The TIFFReadRGBAImageOriented function returns zero if it was unable to read the image. Return NULL in this case instead of displaying uninitialized memory. Fixes #1129
static int ad_open(vfs_handle_struct *handle, struct adouble *ad, files_struct *fsp, const struct smb_filename *smb_fname, int flags, mode_t mode) { NTSTATUS status; DBG_DEBUG("Path [%s] type [%s]\n", smb_fname->base_name, ad->ad_type == ADOUBLE_META ? "meta" : "rsrc"); if (ad->ad_type...
0
[ "CWE-787" ]
samba
0e2b3fb982d1f53d111e10d9197ed2ec2e13712c
182,843,332,610,076,280,000,000,000,000,000,000,000
39
CVE-2021-44142: libadouble: harden parsing code BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
routerstatus_parse_entry_from_string(memarea_t *area, const char **s, smartlist_t *tokens, networkstatus_t *vote, vote_routerstatus_t *vote_rs, int consensus_method, ...
0
[ "CWE-399" ]
tor
57e35ad3d91724882c345ac709666a551a977f0f
237,843,446,012,224,330,000,000,000,000,000,000,000
236
Avoid possible segfault when handling networkstatus vote with bad flavor Fix for 6530; fix on 0.2.2.6-alpha.
struct netdev_queue *netdev_core_pick_tx(struct net_device *dev, struct sk_buff *skb, struct net_device *sb_dev) { int queue_index = 0; #ifdef CONFIG_XPS u32 sender_cpu = skb->sender_cpu - 1; if (sender_cpu >= (u32)NR_CPUS) skb->sender_cpu = raw_smp_processor_id() + 1; #endif if (dev->real_num_tx_...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
277,459,153,228,434,950,000,000,000,000,000,000,000
27
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
attlist_helper (void *item, void *data) { struct atchinfo *aptr = item; mu_list_t list = data; attlist_add (list, aptr->id, aptr->encoding, aptr->content_type, aptr->name, aptr->filename, aptr->source, aptr->skip_empty, aptr->disp_inline); return 0; }
0
[]
mailutils
4befcfd015256c568121653038accbd84820198f
99,549,940,932,686,240,000,000,000,000,000,000,000
9
mail: disable compose escapes in non-interctive mode. * NEWS: Document changes. * doc/texinfo/programs/mail.texi: Document changes. * mail/send.c (mail_compose_send): Recognize escapes only in interactive mode.
CIFSSMBClose(const int xid, struct cifs_tcon *tcon, int smb_file_id) { int rc = 0; CLOSE_REQ *pSMB = NULL; cFYI(1, "In CIFSSMBClose"); /* do not retry on dead session on close */ rc = small_smb_init(SMB_COM_CLOSE, 3, tcon, (void **) &pSMB); if (rc == -EAGAIN) return 0; if (rc) return rc; pSMB->FileID = (__...
0
[ "CWE-362", "CWE-119", "CWE-189" ]
linux
9438fabb73eb48055b58b89fc51e0bc4db22fabd
325,185,437,224,826,800,000,000,000,000,000,000,000
31
cifs: fix possible memory corruption in CIFSFindNext The name_len variable in CIFSFindNext is a signed int that gets set to the resume_name_len in the cifs_search_info. The resume_name_len however is unsigned and for some infolevels is populated directly from a 32 bit value sent by the server. If the server sends a v...
on_reauthentication_verification_complete (GdmSession *session, const char *service_name, GdmManager *self) { const char *session_id; session_id = g_object_get_data (G_OBJECT (session), "caller-session-id"); g_...
0
[]
gdm
ff98b2817014684ae1acec78ff06f0f461a56a9f
56,588,739,032,902,430,000,000,000,000,000,000,000
11
manager: if falling back to X11 retry autologin Right now, we get one shot to autologin. If it fails, we fall back to the greeter. We should give it another go if the reason for the failure was wayland fallback to X. https://bugzilla.gnome.org/show_bug.cgi?id=780520
int mutt_query_variables (LIST *queries) { LIST *p; char errbuff[LONG_STRING]; char command[STRING]; BUFFER err, token; memset (&err, 0, sizeof (err)); memset (&token, 0, sizeof (token)); err.data = errbuff; err.dsize = sizeof (errbuff); for (p = queries; p; p = p->next) { snprint...
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
157,089,616,391,259,750,000,000,000,000,000,000,000
30
use a 64-bit random value in temporary filenames. closes #3158
static int acm_submit_read_urb(struct acm *acm, int index, gfp_t mem_flags) { int res; if (!test_and_clear_bit(index, &acm->read_urbs_free)) return 0; dev_vdbg(&acm->data->dev, "%s - urb %d\n", __func__, index); res = usb_submit_urb(acm->read_urbs[index], mem_flags); if (res) { if (res != -EPERM) { dev_e...
0
[ "CWE-703" ]
linux
8835ba4a39cf53f705417b3b3a94eb067673f2c9
326,982,114,233,947,070,000,000,000,000,000,000,000
22
USB: cdc-acm: more sanity checking An attack has become available which pretends to be a quirky device circumventing normal sanity checks and crashes the kernel by an insufficient number of interfaces. This patch adds a check to the code path for quirky devices. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: sta...
SumBuffer() : total_(0) {}
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
8,587,375,183,256,071,000,000,000,000,000,000,000
1
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static JSValue js_fileio_protect(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { JSFileIOCtx *ioctx = JS_GetOpaque(this_val, fileio_class_id); if (!ioctx) return JS_UNDEFINED; if (!ioctx->factory->lock) { ioctx->factory->lock = GF_TRUE; ioctx->factory->all_refs++; } return JS_UNDEFINED;
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
301,627,534,680,758,400,000,000,000,000,000,000,000
10
fixed #2138
static ssize_t oz_cdev_read(struct file *filp, char __user *buf, size_t count, loff_t *fpos) { int n; int ix; struct oz_pd *pd; struct oz_serial_ctx *ctx; spin_lock_bh(&g_cdev.lock); pd = g_cdev.active_pd; if (pd) oz_pd_get(pd); spin_unlock_bh(&g_cdev.lock); if (pd == NULL) return -1; ctx = oz_cdev_cl...
0
[ "CWE-119", "CWE-787" ]
linux
c2c65cd2e14ada6de44cb527e7f1990bede24e15
159,151,160,076,124,690,000,000,000,000,000,000,000
49
staging: ozwpan: prevent overflow in oz_cdev_write() We need to check "count" so we don't overflow the ei->data buffer. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <t...
static CImg<T> string(const char *const str, const bool is_last_zero=true, const bool is_shared=false) { if (!str) return CImg<T>(); return CImg<T>(str,(unsigned int)std::strlen(str) + (is_last_zero?1:0),1,1,1,is_shared); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
195,465,977,503,417,840,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
TEST(FormatterTest, RightAlign) { EXPECT_EQ(" 42", format("{0:>4}", 42)); EXPECT_EQ(" 42", format("{0:>4o}", 042)); EXPECT_EQ(" 42", format("{0:>4x}", 0x42)); EXPECT_EQ(" -42", format("{0:>5}", -42)); EXPECT_EQ(" 42", format("{0:>5}", 42u)); EXPECT_EQ(" -42", format("{0:>5}", -42l)); EXPECT_EQ(" ...
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
30,754,054,829,068,720,000,000,000,000,000,000,000
16
Fix segfault on complex pointer formatting (#642)
static struct sctp_chunk *sctp_make_op_error_space( const struct sctp_association *asoc, const struct sctp_chunk *chunk, size_t size) { struct sctp_chunk *retval; retval = sctp_make_control(asoc, SCTP_CID_ERROR, 0, sizeof(sctp_errhdr_t) + size); if (!retval) goto nodata; /* RFC 2960 6.4 Multi-homed SC...
0
[ "CWE-20", "CWE-399" ]
linux
9de7922bc709eee2f609cd01d98aaedc4cf5ea74
205,131,099,727,010,200,000,000,000,000,000,000,000
26
net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for ASCONF chunk") added basic verification of ASCONF chunks, however, it is still possible to remotely crash a server by sending a special crafted ASCONF chunk, even up to pre 2.6.12 kernels: ...
int kvm_xen_hvm_get_attr(struct kvm *kvm, struct kvm_xen_hvm_attr *data) { int r = -ENOENT; mutex_lock(&kvm->lock); switch (data->type) { case KVM_XEN_ATTR_TYPE_LONG_MODE: data->u.long_mode = kvm->arch.xen.long_mode; r = 0; break; case KVM_XEN_ATTR_TYPE_SHARED_INFO: if (kvm->arch.xen.shinfo_cache.active...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
151,694,373,812,579,520,000,000,000,000,000,000,000
32
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 MonClient::handle_get_version_reply(MMonGetVersionReply* m) { ceph_assert(ceph_mutex_is_locked(monc_lock)); auto iter = version_requests.find(m->handle); if (iter == version_requests.end()) { ldout(cct, 0) << __func__ << " version request with handle " << m->handle << " not found" << dendl; } else ...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
202,511,965,363,495,030,000,000,000,000,000,000,000
20
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
DeepImageStateAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) { unsigned char tmp; Xdr::read <StreamIO> (is, tmp); _value = DeepImageState (tmp); }
0
[]
openexr
2da13029bf4abd3ed553a2eef7663acd2b637017
42,019,996,541,017,850,000,000,000,000,000,000,000
7
suppress sanitizer warnings when writing invalid enums Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
gdk_pixbuf_get_pixels_with_length (const GdkPixbuf *pixbuf, guint *length) { g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL); if (length) *length = gdk_pixbuf_get_byte_length (pixbuf); return pixbuf->pixels; }
0
[]
gdk-pixbuf
deb78d971c4bcb9e3ccbb71e7925bc6baa707188
335,981,679,109,368,270,000,000,000,000,000,000,000
10
Use g_try_malloc_n where it makes sense This lets us avoid some manual overflow checks.
void Display::slotHelperFinished(Auth::HelperExitStatus status) { // Don't restart greeter and display server unless sddm-helper exited // with an internal error or the user session finished successfully, // we want to avoid greeter from restarting when an authentication // error hap...
0
[ "CWE-613", "CWE-287", "CWE-284" ]
sddm
147cec383892d143b5e02daa70f1e7def50f5d98
203,608,269,843,858,240,000,000,000,000,000,000,000
9
Fix authentication when reusing an existing session - Check the success value before unlocking the session - Don't attempt to use the nonexistant "sddm-check" PAM service
scoped_istream& scoped_istream::operator=(std::istream *s) { delete stream; stream = s; return *this; }
0
[ "CWE-200" ]
wesnoth
af61f9fdd15cd439da9e2fe5fa39d174c923eaae
18,656,785,636,855,412,000,000,000,000,000,000,000
6
fs: Use game data path to resolve ./ in the absence of a current_dir Fixes a file content disclosure bug (#22042) affecting functionality relying on the get_wml_location() function and not passing a non-empty value for the current_dir parameter. See <https://gna.org/bugs/?22042> for details. This is a candidate for ...
inline std::FILE *fopen(const char *const path, const char *const mode) { if (!path) throw CImgArgumentException("cimg::fopen(): Specified file path is (null)."); if (!mode) throw CImgArgumentException("cimg::fopen(): File '%s', specified mode is (null).", ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
2,069,548,791,592,158,400,000,000,000,000,000,000
23
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void ext4_dirty_inode(struct inode *inode) { handle_t *current_handle = ext4_journal_current_handle(); handle_t *handle; if (!ext4_handle_valid(current_handle)) { ext4_mark_inode_dirty(current_handle, inode); return; } handle = ext4_journal_start(inode, 2); if (IS_ERR(handle)) goto out; if (current_handl...
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
288,822,271,592,596,600,000,000,000,000,000,000,000
27
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
QPDFWriter::computeDeterministicIDData() { assert(this->md5_pipeline != 0); assert(this->deterministic_id_data.empty()); this->deterministic_id_data = this->md5_pipeline->getHexDigest(); this->md5_pipeline->enable(false); }
0
[ "CWE-399", "CWE-835" ]
qpdf
8249a26d69f72b9cda584c14cc3f12769985e481
327,792,485,526,336,820,000,000,000,000,000,000,000
7
Fix infinite loop in QPDFWriter (fixes #143)
void explain_append_mrr_info(QUICK_RANGE_SELECT *quick, String *res) { char mrr_str_buf[128]; mrr_str_buf[0]=0; int len; handler *h= quick->head->file; len= h->multi_range_read_explain_info(quick->mrr_flags, mrr_str_buf, sizeof(mrr_str_buf)); if (len > 0) { //re...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
93,547,147,485,457,520,000,000,000,000,000,000,000
14
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static Bool naludmx_process_event(GF_Filter *filter, const GF_FilterEvent *evt) { u32 i; u64 file_pos = 0; GF_FilterEvent fevt; GF_NALUDmxCtx *ctx = gf_filter_get_udta(filter); switch (evt->base.type) { case GF_FEVT_PLAY: if (!ctx->is_playing) { ctx->is_playing = GF_TRUE; ctx->cts = ctx->dts = 0; } i...
0
[ "CWE-476" ]
gpac
b43f9d1a4b4e33d08edaef6d313e6ce4bdf554d3
9,886,256,805,654,466,000,000,000,000,000,000,000
87
fixed #2223
static int passwd_callback(char *buf, int num, int verify, void *data) /* {{{ */ { php_stream *stream = (php_stream *)data; zval **val = NULL; char *passphrase = NULL; /* TODO: could expand this to make a callback into PHP user-space */ GET_VER_OPT_STRING("passphrase", passphrase); if (passphr...
0
[ "CWE-200" ]
php-src
270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e
183,796,526,462,967,300,000,000,000,000,000,000,000
17
Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only
PS_SERIALIZER_ENCODE_FUNC(php_serialize) /* {{{ */ { smart_str buf = {0}; php_serialize_data_t var_hash; IF_SESSION_VARS() { PHP_VAR_SERIALIZE_INIT(var_hash); php_var_serialize(&buf, Z_REFVAL(PS(http_session_vars)), &var_hash); PHP_VAR_SERIALIZE_DESTROY(var_hash); } return buf.s; }
0
[ "CWE-476" ]
php-src
d76f7c6c636b8240e06a1fa29eebb98ad005008a
283,314,462,649,194,470,000,000,000,000,000,000,000
12
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr, int sockaddr_len, int flags) { struct sock *sk = sock->sk; struct sockaddr_pppol2tp *sp = (struct sockaddr_pppol2tp *) uservaddr; struct pppox_sock *po = pppox_sk(sk); struct l2tp_session *session = NULL; struct l2tp_tunnel *tunnel...
0
[ "CWE-416" ]
linux
f026bc29a8e093edfbb2a77700454b285c97e8ad
4,719,854,297,298,756,000,000,000,000,000,000,000
216
l2tp: pass tunnel pointer to ->session_create() Using l2tp_tunnel_find() in pppol2tp_session_create() and l2tp_eth_create() is racy, because no reference is held on the returned session. These functions are only used to implement the ->session_create callback which is run by l2tp_nl_cmd_session_create(). Therefore sea...
int uwsgi_run_command_putenv_and_wait(char *command, char *arg, char **envs, unsigned int nenvs) { int waitpid_status = 0; pid_t pid = fork(); if (pid < 0) { return -1; } if (pid > 0) { if (waitpid(pid, &waitpid_status, 0) < 0) { uwsgi_error("uwsgi_run_command_and_wait()/waitpid()"); return -1; } ...
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
94,294,513,938,273,080,000,000,000,000,000,000,000
27
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
unsigned long __init find_min_pfn_with_active_regions(void) { return find_min_pfn_for_node(MAX_NUMNODES); }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
41,284,025,942,652,096,000,000,000,000,000,000,000
4
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
inline int HowManyConvThreads(const RuntimeShape& output_shape, const RuntimeShape& filter_shape, int thread_dim) { constexpr int kMinMulPerThread = 8; const int output_units = output_shape.Dims(thread_dim); const int filter_height = filter_shape.Dims(1)...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
254,777,754,329,302,440,000,000,000,000,000,000,000
13
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
int LibRaw::open_file(const wchar_t *fname, INT64 max_buf_size) { struct _stati64 st; if(_wstati64(fname,&st)) return LIBRAW_IO_ERROR; int big = (st.st_size > max_buf_size)?1:0; LibRaw_abstract_datastream *stream; try { if(big) stream = new LibRaw_bigfile_datastream(fname); else strea...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
261,445,953,493,320,360,000,000,000,000,000,000,000
38
fixed two more problems found by fuzzer
static int local_remove(FsContext *ctx, const char *path) { struct stat stbuf; char *dirpath = g_path_get_dirname(path); char *name = g_path_get_basename(path); int flags = 0; int dirfd; int err = -1; dirfd = local_opendir_nofollow(ctx, dirpath); if (dirfd == -1) { goto out; ...
0
[ "CWE-732" ]
qemu
9c6b899f7a46893ab3b671e341a2234e9c0c060e
34,798,648,082,549,790,000,000,000,000,000,000,000
30
9pfs: local: set the path of the export root to "." The local backend was recently converted to using "at*()" syscalls in order to ensure all accesses happen below the shared directory. This requires that we only pass relative paths, otherwise the dirfd argument to the "at*()" syscalls is ignored and the path is treat...
static bool cgroupfs_mount_cgroup(void *hdata, const char *root, int type) { size_t bufsz = strlen(root) + sizeof("/sys/fs/cgroup"); char *path = NULL; char **parts = NULL; char *dirname = NULL; char *abs_path = NULL; char *abs_path2 = NULL; struct cgfs_data *cgfs_d; struct cgroup_process_info *info, *base_info...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
336,570,994,287,619,170,000,000,000,000,000,000,000
220
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
void fxInt8Setter(txMachine* the, txSlot* data, txInteger offset, txSlot* slot, int endian) { *((txS1*)(data->value.arrayBuffer.address + offset)) = (txS1)slot->value.integer; mxMeterOne(); }
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
188,219,760,680,815,600,000,000,000,000,000,000,000
5
XS: #896
void gfs2_quota_unhold(struct gfs2_inode *ip) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_alloc *al = ip->i_alloc; unsigned int x; gfs2_assert_warn(sdp, !test_bit(GIF_QD_LOCKED, &ip->i_flags)); for (x = 0; x < al->al_qd_num; x++) { qdsb_put(al->al_qd[x]); al->al_qd[x] = NULL; } al->al_qd_nu...
0
[ "CWE-399" ]
linux-2.6
7e619bc3e6252dc746f64ac3b486e784822e9533
325,529,764,185,842,040,000,000,000,000,000,000,000
14
GFS2: Fix writing to non-page aligned gfs2_quota structures This is the upstream fix for this bug. This patch differs from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte value field of the quota. In upstream quota code, we're required to write the entire quota (88 bytes) which can be split across...
static ssize_t alloc_calls_show(struct kmem_cache *s, char *buf) { if (!(s->flags & SLAB_STORE_USER)) return -ENOSYS; return list_locations(s, buf, TRACK_ALLOC); }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
315,403,421,640,697,200,000,000,000,000,000,000,000
6
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 ...
read_readbuf(buffheader_T *buf, int advance) { char_u c; buffblock_T *curr; if (buf->bh_first.b_next == NULL) /* buffer is empty */ return NUL; curr = buf->bh_first.b_next; c = curr->b_str[buf->bh_index]; if (advance) { if (curr->b_str[++buf->bh_index] == NUL) { buf->bh_first.b_n...
0
[ "CWE-78" ]
vim
53575521406739cf20bbe4e384d88e7dca11f040
272,589,137,131,716,370,000,000,000,000,000,000,000
22
patch 8.1.1365: source command doesn't check for the sandbox Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
static int rotateSingleLog(const struct logInfo *log, unsigned logNum, struct logState *state, struct logNames *rotNames) { int hasErrors = 0; struct stat sb; char *savedContext = NULL; if (!state->doRotate) return 0; if (!hasErrors) { if (!(log->flags &...
0
[ "CWE-732" ]
logrotate
f46d0bdfc9c53515c13880c501f4d2e1e7dd8b25
25,571,992,995,282,685,000,000,000,000,000,000,000
135
Lock state file to prevent parallel execution Running multiple instances of logrotate on the same set of log-files might have undesirable effects. Add command line option --skip-state-lock to skip locking the state file, for example if locking is unsupported or prohibited. Fixes: https://github.com/logrotate/logrota...
kvp_send_key(struct work_struct *dummy) { struct cn_msg *msg; int index = kvp_transaction.index; msg = kzalloc(sizeof(*msg) + sizeof(struct hv_kvp_msg) , GFP_ATOMIC); if (msg) { msg->id.idx = CN_KVP_IDX; msg->id.val = CN_KVP_VAL; msg->seq = KVP_KERNEL_GET; ((struct hv_ku_msg *)msg->data)->kvp_index = ind...
0
[ "CWE-119", "CWE-787" ]
linux
0720a06a7518c9d0c0125bd5d1f3b6264c55c3dd
151,458,051,167,361,340,000,000,000,000,000,000,000
18
NLS: improve UTF8 -> UTF16 string conversion routine The utf8s_to_utf16s conversion routine needs to be improved. Unlike its utf16s_to_utf8s sibling, it doesn't accept arguments specifying the maximum length of the output buffer or the endianness of its 16-bit output. This patch (as1501) adds the two missing argumen...
static __poll_t vsock_poll(struct file *file, struct socket *sock, poll_table *wait) { struct sock *sk; __poll_t mask; struct vsock_sock *vsk; sk = sock->sk; vsk = vsock_sk(sk); poll_wait(file, sk_sleep(sk), wait); mask = 0; if (sk->sk_err) /* Signify that there has been an error on this socket. ...
0
[ "CWE-667" ]
linux
c518adafa39f37858697ac9309c6cf1805581446
114,380,435,710,071,630,000,000,000,000,000,000,000
116
vsock: fix the race conditions in multi-transport support There are multiple similar bugs implicitly introduced by the commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading"). The bug pattern: [1] vsock_sock.transport pointer is copie...
CImgDisplay& set_title(const char *const format, ...) { if (is_empty()) return *this; char *const tmp = new char[1024]; va_list ap; va_start(ap, format); cimg_vsnprintf(tmp,1024,format,ap); va_end(ap); if (!std::strcmp(_title,tmp)) { delete[] tmp; return *this; } del...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
246,571,438,506,907,200,000,000,000,000,000,000,000
19
Fix other issues in 'CImg<T>::load_bmp()'.
static int ZEND_FASTCALL ZEND_PRINT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG; return ZEND_ECHO_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
321,430,947,457,426,700,000,000,000,000,000,000,000
9
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
ushort * CLASS ljpeg_row (int jrow, struct jhead *jh) { int col, c, diff, pred, spred=0; ushort mark=0, *row[3]; if (jrow * jh->wide % jh->restart == 0) { FORC(6) jh->vpred[c] = 1 << (jh->bits-1); if (jrow) { fseek (ifp, -2, SEEK_CUR); do mark = (mark << 8) + (c = fgetc(ifp)); while (c ...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
236,291,660,165,528,000,000,000,000,000,000,000,000
38
cumulated data checks patch
HtmlMetaVar::~HtmlMetaVar() { delete name; delete content; }
0
[ "CWE-824" ]
poppler
30c731b487190c02afff3f036736a392eb60cd9a
57,932,381,880,293,210,000,000,000,000,000,000,000
5
Properly initialize HtmlOutputDev::page to avoid SIGSEGV upon error exit. Closes #742
RPVector *r_bin_wasm_get_imports(RBinWasmObj *bin) { r_return_val_if_fail (bin && bin->g_sections, NULL); return bin->g_imports? bin->g_imports: parse_unique_subsec_vec_by_id (bin, R_BIN_WASM_SECTION_IMPORT); }
0
[ "CWE-787" ]
radare2
b4ca66f5d4363d68a6379e5706353b3bde5104a4
108,649,241,830,552,630,000,000,000,000,000,000,000
4
Fix #20336 - wasm bin parser ##crash
static void handle_wl_output_geometry(void *data, struct wl_output *wl_output, int32_t x, int32_t y, int32_t width_mm, int32_t height_mm, int32_t subpixel, const char *make, const char *model, int32_t transform) { struct swaylock_surface *surface = data; surface->subpixel = subpixel; if (surface->state->run_di...
0
[ "CWE-703" ]
swaylock
1d1c75b6316d21933069a9d201f966d84099f6ca
85,687,049,267,645,540,000,000,000,000,000,000,000
10
Add support for ext-session-lock-v1 This is a new protocol to lock the session [1]. It should be more reliable than layer-shell + input-inhibitor. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131
static uint32 get_part_id_linear_key(partition_info *part_info, Field **field_array, uint num_parts, longlong *func_value) { DBUG_ENTER("get_part_id_linear_key"); *func_value= ha_partition::calculate_key_...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
6,471,867,140,509,998,000,000,000,000,000,000,000
12
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 struct hblk * GC_free_block_ending_at(struct hblk *h) { struct hblk * p = h - 1; hdr * phdr; GET_HDR(p, phdr); while (0 != phdr && IS_FORWARDING_ADDR_OR_NIL(phdr)) { p = FORWARDED_ADDR(p,phdr); phdr = HDR(p); } if (0 != phdr) { if(HBLK_IS_FREE(phdr)) { ...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
77,108,348,525,585,500,000,000,000,000,000,000,000
26
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...
prep_reprocess_req(krb5_kdc_req *request, krb5_principal *krbtgt_princ) { krb5_error_code retval = KRB5KRB_AP_ERR_BADMATCH; char **realms, **cpp, *temp_buf=NULL; krb5_data *comp1 = NULL, *comp2 = NULL; char *comp1_str = NULL; /* By now we know that server principal name is unknown. * If CANONI...
1
[ "CWE-476", "CWE-119" ]
krb5
8ee70ec63931d1e38567905387ab9b1d45734d81
276,397,861,067,898,750,000,000,000,000,000,000,000
93
KDC TGS-REQ null deref [CVE-2013-1416] By sending an unusual but valid TGS-REQ, an authenticated remote attacker can cause the KDC process to crash by dereferencing a null pointer. prep_reprocess_req() can cause a null pointer dereference when processing a service principal name. Code in this function can inappropri...
rsvg_filter_primitive_flood_free (RsvgNode * self) { RsvgFilterPrimitive *upself; upself = (RsvgFilterPrimitive *) self; g_string_free (upself->result, TRUE); g_string_free (upself->in, TRUE); _rsvg_node_free (self); }
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
185,190,497,795,514,850,000,000,000,000,000,000,000
9
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) { JPEGState *sp = JState(tif); tmsize_t nrows; (void) s; /* ** Update available information, buffer may have been refilled ** between decode requests */ sp->src.next_input_byte = (const JOCTET*) tif->tif_rawcp; sp->src.bytes_...
0
[ "CWE-369" ]
libtiff
47f2fb61a3a64667bce1a8398a8fcb1b348ff122
240,931,629,130,260,300,000,000,000,000,000,000,000
52
* libtiff/tif_jpeg.c: avoid integer division by zero in JPEGSetupEncode() when horizontal or vertical sampling is set to 0. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653
void MainWindow::replaceInTimeline(const QUuid& uuid, Mlt::Producer& producer) { int trackIndex = -1; int clipIndex = -1; // lookup the current track and clip index by UUID QScopedPointer<Mlt::ClipInfo> info(MAIN.timelineClipInfoByUuid(uuid, trackIndex, clipIndex)); if (trackIndex >= 0 && clipIndex...
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
150,392,610,724,299,570,000,000,000,000,000,000,000
13
fix upgrade check is not using TLS correctly
static inline void skb_probe_transport_header(struct sk_buff *skb, const int offset_hint) { struct flow_keys keys; if (skb_transport_header_was_set(skb)) return; else if (skb_flow_dissect_flow_keys(skb, &keys, 0)) skb_set_transport_header(skb, keys.control.thoff); else skb_set_transport_header(sk...
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
268,456,712,721,350,040,000,000,000,000,000,000,000
12
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
APE::Properties::~Properties() { delete d; }
0
[]
taglib
77d61c6eca4d08b9b025738acf6b926cc750db23
118,628,502,799,722,180,000,000,000,000,000,000,000
4
Make sure to not try dividing by zero
deinit_pci(struct vmctx *ctx) { struct pci_vdev_ops *ops; struct businfo *bi; struct slotinfo *si; struct funcinfo *fi; int bus, slot, func; size_t lowmem; struct mem_range mr; /* Release PCI extended config space */ bzero(&mr, sizeof(struct mem_range)); mr.name = "PCI ECFG"; mr.base = PCI_EMUL_ECFG_BASE; ...
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
6199e653418eda58cd698d8769820904453e2535
17,479,612,342,103,617,000,000,000,000,000,000,000
51
dm: validate the input in 'pci_emul_mem_handler()' checking the inputs explicitly instead of using Assert. Tracked-On: #4003 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>