func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
unsigned int ziplistGet(unsigned char *p, unsigned char **sstr, unsigned int *slen, long long *sval) { zlentry entry; if (p == NULL || p[0] == ZIP_END) return 0; if (sstr) *sstr = NULL; zipEntry(p, &entry); if (ZIP_IS_STR(entry.encoding)) { if (sstr) { *slen = entry.len; ...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
54,776,647,695,959,480,000,000,000,000,000,000,000
18
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static void tcp_chr_update_read_handler(CharDriverState *chr, GMainContext *context) { TCPCharDriver *s = chr->opaque; if (!s->connected) { return; } remove_fd_in_watch(chr); if (s->ioc) { chr->fd_in_tag = io_add_watch_poll(s->ioc, ...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
198,744,349,615,614,840,000,000,000,000,000,000,000
17
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
void sqlite3WindowDelete(sqlite3 *db, Window *p){ if( p ){ sqlite3WindowUnlinkFromSelect(p); sqlite3ExprDelete(db, p->pFilter); sqlite3ExprListDelete(db, p->pPartition); sqlite3ExprListDelete(db, p->pOrderBy); sqlite3ExprDelete(db, p->pEnd); sqlite3ExprDelete(db, p->pStart); sqlite3DbFree(...
0
[ "CWE-476" ]
sqlite
75e95e1fcd52d3ec8282edb75ac8cd0814095d54
34,015,962,190,283,540,000,000,000,000,000,000,000
13
When processing constant integer values in ORDER BY clauses of window definitions (see check-in [7e4809eadfe99ebf]) be sure to fully disable the constant value to avoid an invalid pointer dereference if the expression is ever duplicated. This fixes a crash report from Yongheng and Rui. FossilOrigin-Name: 1ca0bd982ab11...
f_json_encode(typval_T *argvars, typval_T *rettv) { rettv->v_type = VAR_STRING; rettv->vval.v_string = json_encode(&argvars[0], 0); }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
306,137,656,929,614,840,000,000,000,000,000,000,000
5
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
signcolumn_on(win_T *wp) { if (*wp->w_p_scl == 'n') return FALSE; if (*wp->w_p_scl == 'y') return TRUE; return (wp->w_buffer->b_signlist != NULL # ifdef FEAT_NETBEANS_INTG || wp->w_buffer->b_has_sign_column # endif ); }
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
127,173,928,497,678,300,000,000,000,000,000,000,000
12
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
int fuse_set_acl(struct inode *inode, struct posix_acl *acl, int type) { struct fuse_conn *fc = get_fuse_conn(inode); const char *name; int ret; if (fuse_is_bad(inode)) return -EIO; if (!fc->posix_acl || fc->no_setxattr) return -EOPNOTSUPP; if (type == ACL_TYPE_ACCESS) name = XATTR_NAME_POSIX_ACL_ACCESS;...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
1,883,347,907,890,635,000,000,000,000,000,000,000
53
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
void die_mem(void) { die(421, LOG_ERR, MSG_OUT_OF_MEMORY); }
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
220,954,815,835,613,300,000,000,000,000,000,000,000
4
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
find_nextcmd(char_u *p) { while (*p != '|' && *p != '\n') { if (*p == NUL) return NULL; ++p; } return (p + 1); }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
249,004,353,824,092,500,000,000,000,000,000,000,000
10
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
static size_t fr_dhcp_vp2attr(VALUE_PAIR *vp, uint8_t *p, size_t room) { size_t length; uint32_t lvalue; /* * FIXME: Check room! */ room = room; /* -Wunused */ /* * Search for all attributes of the same * type, and pack them into the same * attribute. */ switch (vp->type) { case PW_TYPE_BYTE: le...
0
[ "CWE-399" ]
freeradius-server
4dc7800b866f889a1247685bbaa6dd4238a56279
52,765,755,640,295,700,000,000,000,000,000,000,000
66
Fix endless loop when there are multiple DHCP options
GF_Err cslg_box_size(GF_Box *s) { GF_CompositionToDecodeBox *ptr = (GF_CompositionToDecodeBox *)s; ptr->size += 20; return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
230,602,833,927,760,800,000,000,000,000,000,000,000
7
fixed #1587
bgp_read (struct thread *thread) { int ret; u_char type = 0; struct peer *peer; bgp_size_t size; char notify_data_length[2]; /* Yes first of all get peer pointer. */ peer = THREAD_ARG (thread); peer->t_read = NULL; /* For non-blocking IO check. */ if (peer->status == Connect) { bgp_conne...
0
[ "CWE-119" ]
quagga
5861739f8c38bc36ea9955e5cb2be2bf2f482d70
109,352,594,758,732,730,000,000,000,000,000,000,000
161
bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS * bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are detected, and the code will stop processing the OPEN and return. However it does so without calling bgp_notify_send to send a NOTIFY - which means the peer FSM doesn't g...
static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) { char *f_org, *f_dest; int f_org_len, f_dest_len; long height, width, threshold; gdImagePtr im_org, im_dest, im_tmp; char *fn_org = NULL; char *fn_dest = NULL; FILE *org, *dest; int dest_height = -1; int dest_width = -1; int org_he...
0
[ "CWE-787" ]
php-src
1bd103df00f49cf4d4ade2cfe3f456ac058a4eae
146,689,725,264,105,230,000,000,000,000,000,000,000
174
Fix bug #72730 - imagegammacorrect allows arbitrary write access
void ssh_bind_set_blocking(ssh_bind sshbind, int blocking) { sshbind->blocking = blocking ? 1 : 0; }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
66,436,326,604,983,380,000,000,000,000,000,000,000
3
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
PHP_FUNCTION(scandir) { char *dirn; int dirn_len; long flags = 0; char **namelist; int n, i; zval *zcontext = NULL; php_stream_context *context = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|lr", &dirn, &dirn_len, &flags, &zcontext) == FAILURE) { return; } if (dirn_len < 1) { php_error_...
1
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
239,845,067,077,705,940,000,000,000,000,000,000,000
45
Fixed bug #69418 - more s->p fixes for filenames
GF_Box *bloc_New() { ISOM_DECL_BOX_ALLOC(GF_BaseLocationBox, GF_ISOM_BOX_TYPE_TRIK); return (GF_Box *)tmp; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
162,726,655,246,920,660,000,000,000,000,000,000,000
5
fixed 2 possible heap overflows (inc. #1088)
static int vrend_renderer_transfer_internal(struct vrend_context *ctx, struct vrend_resource *res, const struct vrend_transfer_info *info, int transfer_mode) { const struct iovec *iov; ...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
73,016,196,099,344,880,000,000,000,000,000,000,000
51
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
static av_cold int dnxhd_decode_close(AVCodecContext *avctx) { DNXHDContext *ctx = avctx->priv_data; ff_free_vlc(&ctx->ac_vlc); ff_free_vlc(&ctx->dc_vlc); ff_free_vlc(&ctx->run_vlc); av_freep(&ctx->rows); return 0; }
0
[ "CWE-125" ]
FFmpeg
f31fc4755f69ab26bf6e8be47875b7dcede8e29e
28,254,768,277,242,985,000,000,000,000,000,000,000
12
avcodec/dnxhddec: Move mb height check out of non hr branch Fixes: out of array access Fixes: poc.dnxhd Found-by: Bingchang, Liu@VARAS of IIE Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 296debd213bd6dce7647cedd34eb64e5b94cdc92) Signed-off-by: Michael Niedermayer <michael@nie...
void usb_buffer_dmasync_sg(const struct usb_device *dev, int is_in, struct scatterlist *sg, int n_hw_ents) { struct usb_bus *bus; struct device *controller; if (!dev || !(bus = dev->bus) || !(controller = bus->sysdev) || !controller->dma_mask) return; dma_sync_sg_for_cpu(controller, sg, n_hw_en...
0
[ "CWE-400", "CWE-703" ]
linux
704620afc70cf47abb9d6a1a57f3825d2bca49cf
252,706,917,434,284,000,000,000,000,000,000,000,000
15
USB: check usb_get_extra_descriptor for proper size When reading an extra descriptor, we need to properly check the minimum and maximum size allowed, to prevent from invalid data being sent by a device. Reported-by: Hui Peng <benquike@gmail.com> Reported-by: Mathias Payer <mathias.payer@nebelwelt.net> Co-developed-by...
static int tg3_bmcr_reset(struct tg3 *tp) { u32 phy_control; int limit, err; /* OK, reset it, and poll the BMCR_RESET bit until it * clears or we time out. */ phy_control = BMCR_RESET; err = tg3_writephy(tp, MII_BMCR, phy_control); if (err != 0) return -EBUSY; limit = 5000; while (limit--) { err = tg3...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
208,971,380,334,235,740,000,000,000,000,000,000,000
30
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
size_t olm_pk_signing_public_key_length(void) { return olm::encode_base64_length(ED25519_PUBLIC_KEY_LENGTH); }
0
[ "CWE-787" ]
olm
ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b
245,363,197,810,681,200,000,000,000,000,000,000,000
3
olm_pk_decrypt: Ensure inputs are of correct length.
void CWebServer::RType_HandleGraph(WebEmSession & session, const request& req, Json::Value &root) { uint64_t idx = 0; if (request::findValue(&req, "idx") != "") { idx = std::strtoull(request::findValue(&req, "idx").c_str(), nullptr, 10); } std::vector<std::vector<std::string> > result; char s...
0
[ "CWE-89" ]
domoticz
ee70db46f81afa582c96b887b73bcd2a86feda00
189,470,439,754,055,120,000,000,000,000,000,000,000
3,881
Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!)
exif_data_load_data_entry (ExifData *data, ExifEntry *entry, const unsigned char *d, unsigned int size, unsigned int offset) { unsigned int s, doff; entry->tag = exif_get_short (d + offset + 0, data->priv->order); entry->format = exif_get_short (d + offset + 2, data->priv->order); entry->com...
0
[ "CWE-190", "CWE-787" ]
libexif
75aa73267fdb1e0ebfbc00369e7312bac43d0566
275,938,330,846,733,770,000,000,000,000,000,000,000
73
fix CVE-2019-9278 avoid the use of unsafe integer overflow checking constructs (unsigned integer operations cannot overflow, so "u1 + u2 > u1" can be optimized away) check for the actual sizes, which should also handle the overflows document other places google patched, but do not seem relevant due to other restricti...
fm_mgr_config_connect ( IN p_fm_config_conx_hdlt p_hdl ) { fm_config_conx_hdl *hdl = p_hdl; fm_mgr_config_errno_t res = FM_CONF_OK; int fail_count = 0; if ( (res = fm_mgr_config_mgr_connect(hdl, FM_MGR_SM)) == FM_CONF_INIT_ERR ) { res = FM_CONF_INIT_ERR; g...
0
[ "CWE-362" ]
opa-fm
c5759e7b76f5bf844be6c6641cc1b356bbc83869
158,558,358,561,673,630,000,000,000,000,000,000,000
44
Fix scripts and code that use well-known tmp files.
static void sev_es_sync_to_ghcb(struct vcpu_svm *svm) { struct kvm_vcpu *vcpu = &svm->vcpu; struct ghcb *ghcb = svm->sev_es.ghcb; /* * The GHCB protocol so far allows for the following data * to be returned: * GPRs RAX, RBX, RCX, RDX * * Copy their values, even if they may not have been written during t...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
80,999,021,635,491,760,000,000,000,000,000,000,000
18
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
QVectorPath::~QVectorPath() { if (m_hints & ShouldUseCacheHint) { CacheEntry *e = m_cache; while (e) { if (e->data) e->cleanup(e->engine, e->data); CacheEntry *n = e->next; delete e; e = n; } } }
0
[ "CWE-787" ]
qtbase
6b400e3147dcfd8cc3a393ace1bd118c93762e0c
174,355,243,938,003,500,000,000,000,000,000,000,000
13
Improve fix for avoiding huge number of tiny dashes Some pathological cases were not caught by the previous fix. Fixes: QTBUG-95239 Pick-to: 6.2 6.1 5.15 Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5 Reviewed-by: Robert Löhning <robert.loehning@qt.io>
static void analysis_emul_restore(RzCore *core, RzConfigHold *hc, RzDebugTrace *dt, RzAnalysisEsilTrace *et) { rz_config_hold_restore(hc); rz_config_hold_free(hc); rz_debug_trace_free(core->dbg->trace); rz_analysis_esil_trace_free(core->analysis->esil->trace); core->analysis->esil->trace = et; core->dbg->trace = ...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
183,353,557,505,630,000,000,000,000,000,000,000,000
8
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
word32 SetSequence(word32 len, byte* output) { output[0] = SEQUENCE | CONSTRUCTED; return SetLength(len, output + 1) + 1; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
219,838,060,372,036,000,000,000,000,000,000,000,000
6
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static bool check_same_owner(struct task_struct *p) { const struct cred *cred = current_cred(), *pcred; bool match; rcu_read_lock(); pcred = __task_cred(p); match = (cred->euid == pcred->euid || cred->euid == pcred->uid); rcu_read_unlock(); return match; }
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
291,968,361,877,782,540,000,000,000,000,000,000,000
12
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
void tracing_start(void) { struct ring_buffer *buffer; unsigned long flags; if (tracing_disabled) return; raw_spin_lock_irqsave(&global_trace.start_lock, flags); if (--global_trace.stop_count) { if (global_trace.stop_count < 0) { /* Someone screwed up their debugging */ WARN_ON_ONCE(1); global_trace...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
86,262,480,888,928,670,000,000,000,000,000,000,000
36
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
static void tctx_task_work(struct callback_head *cb) { bool uring_locked = false; struct io_ring_ctx *ctx = NULL; struct io_uring_task *tctx = container_of(cb, struct io_uring_task, task_work); while (1) { struct io_wq_work_node *node1, *node2; spin_lock_irq(&tctx->task_lock); node1 = tctx->prio_tas...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
19,913,624,362,063,710,000,000,000,000,000,000,000
38
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
static int virtcons_freeze(struct virtio_device *vdev) { struct ports_device *portdev; struct port *port; portdev = vdev->priv; vdev->config->reset(vdev); virtqueue_disable_cb(portdev->c_ivq); cancel_work_sync(&portdev->control_work); cancel_work_sync(&portdev->config_work); /* * Once more: if control_work...
0
[ "CWE-119", "CWE-787" ]
linux
c4baad50297d84bde1a7ad45e50c73adae4a2192
182,020,656,561,416,050,000,000,000,000,000,000,000
33
virtio-console: avoid DMA from stack put_chars() stuffs the buffer it gets into an sg, but that buffer may be on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it manifested as printks getting turned into NUL bytes). Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Michael S. Tsirkin <mst@redhat...
lexer_skip_empty_statements (parser_context_t *context_p) /**< context */ { lexer_skip_spaces (context_p); while (context_p->source_p < context_p->source_end_p && *context_p->source_p == LIT_CHAR_SEMICOLON) { lexer_consume_next_character (context_p); lexer_skip_spaces (context_p); } context_p->token...
0
[ "CWE-288" ]
jerryscript
f3a420b672927037beb4508d7bdd68fb25d2caf6
132,914,853,410,743,600,000,000,000,000,000,000,000
12
Fix class static block opening brace parsing (#4942) The next character should not be consumed after finding the static block opening brace. This patch fixes #4916. JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu
} #undef CHECK_VAL #undef CHECK_STR #undef CHECK_FRAC return recompute_set; } static void dasher_forward_manifest_raw(GF_DasherCtx *ctx, GF_DashStream *ds, const char *manifest, const char *manifest_name) { GF_FilterPacket *pck; u32 size; u8 *output; size = (u32) strlen(manifest); pck = gf_filter_pck_new_allo...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
37,216,007,860,611,364,000,000,000,000,000,000,000
27
fixed #2138
static int em_ret_far(struct x86_emulate_ctxt *ctxt) { int rc; unsigned long cs; int cpl = ctxt->ops->cpl(ctxt); rc = emulate_pop(ctxt, &ctxt->_eip, ctxt->op_bytes); if (rc != X86EMUL_CONTINUE) return rc; if (ctxt->op_bytes == 4) ctxt->_eip = (u32)ctxt->_eip; rc = emulate_pop(ctxt, &cs, ctxt->op_bytes); if...
1
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
299,508,775,925,335,600,000,000,000,000,000,000,000
20
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
v8::Local<v8::Promise> WebContents::CapturePage(gin::Arguments* args) { gfx::Rect rect; gin_helper::Promise<gfx::Image> promise(args->isolate()); v8::Local<v8::Promise> handle = promise.GetHandle(); // get rect arguments if they exist args->GetNext(&rect); auto* const view = web_contents()->GetRenderWidge...
0
[]
electron
ea1f402417022c59c0794e97c87e6be2553989e7
266,438,099,735,919,340,000,000,000,000,000,000,000
45
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33323) (#33350) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary mai...
void f2fs_inode_chksum_set(struct f2fs_sb_info *sbi, struct page *page) { struct f2fs_inode *ri = &F2FS_NODE(page)->i; if (!f2fs_enable_inode_chksum(sbi, page)) return; ri->i_inode_checksum = cpu_to_le32(f2fs_inode_chksum(sbi, page)); }
0
[ "CWE-125" ]
linux
e34438c903b653daca2b2a7de95aed46226f8ed3
50,145,662,393,043,730,000,000,000,000,000,000,000
9
f2fs: fix to do sanity check with node footer and iblocks This patch adds to do sanity check with below fields of inode to avoid reported panic. - node footer - iblocks https://bugzilla.kernel.org/show_bug.cgi?id=200223 - Overview BUG() triggered in f2fs_truncate_inode_blocks() when un-mounting a mounted f2fs image ...
CompositeDeepScanLine::readPixels(int start, int end) { size_t parts = _Data->_file.size() + _Data->_part.size(); // total of files+parts vector<DeepFrameBuffer> framebuffers(parts); vector< vector<unsigned int> > counts(parts); // // for each part, a pointer to an array of channels // vect...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
129,325,533,649,819,800,000,000,000,000,000,000,000
166
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
void gs_lib_ctx_set_cms_context( const gs_memory_t *mem, void *cms_context ) { if (mem == NULL) return; mem->gs_lib_ctx->cms_context = cms_context; }
0
[]
ghostpdl
6d444c273da5499a4cd72f21cb6d4c9a5256807d
57,496,402,604,787,175,000,000,000,000,000,000,000
6
Bug 697178: Add a file permissions callback For the rare occasions when the graphics library directly opens a file (currently for reading), this allows us to apply any restrictions on file access normally applied in the interpteter.
int dns_select(s2s_t s2s, char *ip, int *port, time_t now, dnscache_t dns, int allow_bad) { /* list of results */ dnsres_t l_reuse[DNS_MAX_RESULTS]; dnsres_t l_aaaa[DNS_MAX_RESULTS]; dnsres_t l_a[DNS_MAX_RESULTS]; dnsres_t l_bad[DNS_MAX_RESULTS]; /* running weight sums of results */ int rw_r...
0
[ "CWE-20" ]
jabberd2
aabcffae560d5fd00cd1d2ffce5d760353cf0a4d
118,889,037,424,168,200,000,000,000,000,000,000,000
214
Fixed possibility of Unsolicited Dialback Attacks
entry_guard_add_to_sample_impl(guard_selection_t *gs, const uint8_t *rsa_id_digest, const char *nickname, const tor_addr_port_t *bridge_addrport) { const int GUARD_LIFETIME = get_guard_lifetime(); tor_assert(gs); // XXXX...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
263,632,333,513,381,700,000,000,000,000,000,000,000
40
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static int do_check_common(struct bpf_verifier_env *env, int subprog) { bool pop_log = !(env->log.level & BPF_LOG_LEVEL2); struct bpf_verifier_state *state; struct bpf_reg_state *regs; int ret, i; env->prev_linfo = NULL; env->pass_cnt++; state = kzalloc(sizeof(struct bpf_verifier_state), GFP_KERNEL); if (!sta...
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
98,538,750,795,775,080,000,000,000,000,000,000,000
81
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
g_init(const char* app_name) { #if defined(_WIN32) WSADATA wsadata; WSAStartup(2, &wsadata); #endif setlocale(LC_CTYPE, ""); if (app_name != 0) { if (app_name[0] != 0) { if (!g_directory_exist("/tmp/.xrdp")) { g_create_dir("/tmp/.xrdp"); g_chmod_hex("/tmp/.xrdp", 0x1777); ...
1
[]
xrdp
cadad6e181d2a67698e5eb7cacd6b233ae29eb97
124,142,626,038,934,400,000,000,000,000,000,000,000
28
/tmp cleanup
static int ctnetlink_parse_tuple_ip(struct nlattr *attr, struct nf_conntrack_tuple *tuple, u_int32_t flags) { struct nlattr *tb[CTA_IP_MAX+1]; int ret = 0; ret = nla_parse_nested_deprecated(tb, CTA_IP_MAX, attr, NULL, NULL); if (ret < 0) return ret; ret = nla_validate_nested_deprecated(attr, CT...
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
308,577,646,435,838,800,000,000,000,000,000,000,000
27
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
void flush_thread(void) { struct thread_info *thread = current_thread_info(); struct task_struct *tsk = current; flush_ptrace_hw_breakpoint(tsk); memset(thread->used_cp, 0, sizeof(thread->used_cp)); memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); memset(&thread->fpstate, 0, sizeof(union fp_state)); ...
0
[ "CWE-284", "CWE-264" ]
linux
a4780adeefd042482f624f5e0d577bf9cdcbb760
129,639,801,702,238,490,000,000,000,000,000,000,000
13
ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to prevent it from being used as a covert channel between two tasks. There are more and more applications coming to Windows RT, Wine could support them, but mostly they ...
void dvb_frontend_sleep_until(ktime_t *waketime, u32 add_usec) { s32 delta; *waketime = ktime_add_us(*waketime, add_usec); delta = ktime_us_delta(ktime_get_boottime(), *waketime); if (delta > 2500) { msleep((delta - 1500) / 1000); delta = ktime_us_delta(ktime_get_boottime(), *waketime); } if (delta > 0) ud...
0
[ "CWE-416" ]
linux
b1cb7372fa822af6c06c8045963571d13ad6348b
142,723,777,913,880,000,000,000,000,000,000,000,000
13
dvb_frontend: don't use-after-free the frontend struct dvb_frontend_invoke_release() may free the frontend struct. So, the free logic can't update it anymore after calling it. That's OK, as __dvb_frontend_free() is called only when the krefs are zeroed, so nobody is using it anymore. That should fix the following KA...
EmitMousePositionSeparator(TScreen *screen, Char line[], unsigned count) { switch (screen->extend_coords) { case SET_SGR_EXT_MODE_MOUSE: case SET_URXVT_EXT_MODE_MOUSE: case SET_PIXEL_POSITION_MOUSE: line[count++] = ';'; break; } return count; }
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
171,056,381,517,520,380,000,000,000,000,000,000,000
11
snapshot of project "xterm", label xterm-365d
WalSndDone(WalSndSendDataCallback send_data) { XLogRecPtr replicatedPtr; /* ... let's just be real sure we're caught up ... */ send_data(); /* * Check a write location to see whether all the WAL have successfully * been replicated if this walsender is connecting to a standby such as * pg_receivexlog which a...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
55,903,193,233,802,690,000,000,000,000,000,000,000
27
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
camel_imapx_server_sync_changes_sync (CamelIMAPXServer *is, CamelIMAPXMailbox *mailbox, gboolean can_influence_flags, GCancellable *cancellable, GError **error) { guint i, jj, on, on_orset, off_orset; GPtrArray *changed_uids; GArray *on_user = NULL, *off_user = NULL; CamelFol...
0
[ "CWE-476" ]
evolution-data-server
2cc39592b532cf0dc994fd3694b8e6bf924c9ab5
303,276,983,979,666,440,000,000,000,000,000,000,000
615
I#189 - Crash on malformed server response with minimal capabilities Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189
virtual Item *convert_to_basic_const_item(THD *thd) { return 0; };
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
129,376,081,158,035,030,000,000,000,000,000,000,000
1
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 __dcbnl_pg_getcfg(struct net_device *netdev, struct nlmsghdr *nlh, struct nlattr **tb, struct sk_buff *skb, int dir) { struct nlattr *pg_nest, *param_nest, *data; struct nlattr *pg_tb[DCB_PG_ATTR_MAX + 1]; struct nlattr *param_tb[DCB_TC_ATTR_PARAM_MAX + 1]; u8 prio, pgid, tc_pct, up_map; int ret...
0
[ "CWE-399" ]
linux-2.6
29cd8ae0e1a39e239a3a7b67da1986add1199fc0
23,926,273,564,534,440,000,000,000,000,000,000,000
133
dcbnl: fix various netlink info leaks The dcb netlink interface leaks stack memory in various places: * perm_addr[] buffer is only filled at max with 12 of the 32 bytes but copied completely, * no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand, so we're leaking up to 58 bytes for ieee_ets structs...
void createHermesBuiltins( Runtime *runtime, llvm::MutableArrayRef<NativeFunction *> builtins) { auto defineInternMethod = [&](BuiltinMethod::Enum builtinIndex, Predefined::Str symID, NativeFunctionPtr func, uint8_...
0
[ "CWE-787" ]
hermes
86543ac47e59c522976b5632b8bf9a2a4583c7d2
317,121,141,459,774,970,000,000,000,000,000,000,000
74
Added stack overflow check for hermes::vm:: hermesBuiltinApply Summary: This adds a missing check for stack overflow. Reviewed By: tmikov Differential Revision: D20104955 fbshipit-source-id: 1f37e23d2e28ebcd3aa4176d134b8418e7059ebd
xmlValidPrintNode(xmlNodePtr cur) { if (cur == NULL) { xmlGenericError(xmlGenericErrorContext, "null"); return; } switch (cur->type) { case XML_ELEMENT_NODE: xmlGenericError(xmlGenericErrorContext, "%s ", cur->name); break; case XML_TEXT_NODE: xmlGenericError(xmlGenericErrorContext, "text...
0
[]
libxml2
932cc9896ab41475d4aa429c27d9afd175959d74
339,632,049,567,968,300,000,000,000,000,000,000,000
73
Fix buffer size checks in xmlSnprintfElementContent xmlSnprintfElementContent failed to correctly check the available buffer space in two locations. Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048). Thanks to Marcel Böhme and Thuan Pham for the report.
do_invoke_method (VerifyContext *ctx, int method_token, gboolean virtual) { int param_count, i; MonoMethodSignature *sig; ILStackDesc *value; MonoMethod *method; gboolean virt_check_this = FALSE; gboolean constrained = ctx->prefix_set & PREFIX_CONSTRAINED; if (!(method = verifier_load_method (ctx, method_token,...
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
130,250,278,390,864,530,000,000,000,000,000,000,000
153
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static int tiff_closeproc(thandle_t clientdata) { (void)clientdata; /*tiff_handle *th = (tiff_handle *)clientdata; gdIOCtx *ctx = th->ctx; (ctx->gd_free)(ctx);*/ return 0; }
0
[ "CWE-125" ]
libgd
4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae
89,332,085,147,246,760,000,000,000,000,000,000,000
10
Fix invalid read in gdImageCreateFromTiffPtr() tiff_invalid_read.tiff is corrupt, and causes an invalid read in gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case, dynamicGetbuf() is called with a negative dp->pos, bu...
static WC_INLINE void innermul8_mulx(fp_digit *c_mulx, fp_digit *cy_mulx, fp_digit *tmpm, fp_digit mu) { fp_digit cy = *cy_mulx ; INNERMUL8_MULX ; *cy_mulx = cy ; }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
38,648,501,991,054,510,000,000,000,000,000,000,000
6
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
copytup_cluster(Tuplesortstate *state, SortTuple *stup, void *tup) { HeapTuple tuple = (HeapTuple) tup; Datum original; /* copy the tuple into sort storage */ tuple = heap_copytuple(tuple); stup->tuple = (void *) tuple; USEMEM(state, GetMemoryChunkSpace(tuple)); /* * set up first-column key value, and potent...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
135,958,605,335,450,700,000,000,000,000,000,000,000
65
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...
void CLASS foveon_make_curves(short **curvep, float dq[3], float div[3], float filt) { double mul[3], max = 0; int c; FORC3 mul[c] = dq[c] / div[c]; FORC3 if (max < mul[c]) max = mul[c]; FORC3 curvep[c] = foveon_make_curve(max, mul[c], filt); }
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
41,513,709,502,862,043,000,000,000,000,000,000,000
9
Secunia SA75000 advisory: several buffer overruns
GF_ISMASample *gf_isom_get_ismacryp_sample(GF_ISOFile *the_file, u32 trackNumber, const GF_ISOSample *samp, u32 sampleDescriptionIndex) { GF_TrackBox *trak; GF_ISMASampleFormatBox *fmt; GF_ProtectionSchemeInfoBox *sinf; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return NULL; sinf = is...
0
[ "CWE-476" ]
gpac
3b84ffcbacf144ce35650df958432f472b6483f8
1,812,034,089,161,067,300,000,000,000,000,000,000
31
fixed #1735
int nfc_fw_download(struct nfc_dev *dev, const char *firmware_name) { int rc = 0; pr_debug("%s do firmware %s\n", dev_name(&dev->dev), firmware_name); device_lock(&dev->dev); if (dev->shutting_down) { rc = -ENODEV; goto error; } if (dev->dev_up) { rc = -EBUSY; goto error; } if (!dev->ops->fw_downlo...
0
[ "CWE-416" ]
linux
da5c0f119203ad9728920456a0f52a6d850c01cd
150,036,504,821,052,330,000,000,000,000,000,000,000
32
nfc: replace improper check device_is_registered() in netlink related functions The device_is_registered() in nfc core is used to check whether nfc device is registered in netlink related functions such as nfc_fw_download(), nfc_dev_up() and so on. Although device_is_registered() is protected by device_lock, there is ...
static struct sock *vsock_dequeue_accept(struct sock *listener) { struct vsock_sock *vlistener; struct vsock_sock *vconnected; vlistener = vsock_sk(listener); if (list_empty(&vlistener->accept_queue)) return NULL; vconnected = list_entry(vlistener->accept_queue.next, struct vsock_sock, accept_queue); li...
0
[ "CWE-667" ]
linux
c518adafa39f37858697ac9309c6cf1805581446
207,743,485,761,014,880,000,000,000,000,000,000,000
21
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...
create_generic_typespec (MonoDynamicImage *assembly, MonoReflectionTypeBuilder *tb) { MonoDynamicTable *table; MonoClass *klass; MonoType *type; guint32 *values; guint32 token; SigBuffer buf; int count, i; /* * We're creating a TypeSpec for the TypeBuilder of a generic type declaration, * ie. what we'd nor...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
130,730,261,363,789,490,000,000,000,000,000,000,000
58
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
TEST_P(CdsIntegrationTest, CdsClusterDownWithLotsOfIdleConnections) { constexpr int num_requests = 2000; // Make upstream H/1 so it creates connection for each request upstream_codec_type_ = Http::CodecType::HTTP1; // Relax default circuit breaker limits and timeouts so Envoy can accumulate a lot of idle // c...
0
[ "CWE-703", "CWE-674" ]
envoy
4b6dd3b53cd5c6d4d4df378a2fc62c1707522b31
198,429,760,405,033,100,000,000,000,000,000,000,000
85
CVE-2022-23606 Avoid closing other connections to prevent deep recursion when a large number of idle connections are closed at the start of a pool drain, when a connection is closed. Signed-off-by: Yan Avlasov <yavlasov@google.com>
bool do_find_state(ctx_t &ctx) { kernels_t &kernels = ctx.dc_kernels; const closure_t &closure = ctx.state; // empty closure corresponds to default state if (closure.size() == 0) { ctx.dc_target = dfa_t::NIL; ctx.dc_actions = NULL; return false; } // resize buffer if cl...
1
[ "CWE-787" ]
re2c
a3473fd7be829cb33907cb08612f955133c70a96
19,823,844,414,563,305,000,000,000,000,000,000,000
40
Limit maximum allowed NFA and DFA size. Instead of failing with an out of memory exception or crashing with a stack overflow, emit an error message and exit. This is a partial fix for bug #394 "Stack overflow due to recursion in src/dfa/dead_rules.cc", where re2c hit stack overflow on a counted repetition regexp with ...
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *lst) { xmlParserCtxtPtr ctxt; xmlDocPtr newDoc; xmlNodePtr newRoot; xmlSAXHandlerPtr oldsax = NULL; int ret = 0; xmlChar start[4]; xmlCharEncoding enc; if (ctx == NULL) re...
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
251,541,098,090,117,500,000,000,000,000,000,000,000
176
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
bool CIRCSock::OnTextMessage(CTextMessage& Message) { bool bResult = false; CChan* pChan = nullptr; CString sTarget = Message.GetTarget(); if (sTarget.Equals(GetNick())) { IRCSOCKMODULECALL(OnPrivTextMessage(Message), &bResult); if (bResult) return true; if (!m_pNetwork->IsUser...
0
[ "CWE-20", "CWE-284" ]
znc
d22fef8620cdd87490754f607e7153979731c69d
422,630,610,214,911,840,000,000,000,000,000,000
44
Better cleanup lines coming from network. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
kill_query_thread( /*===============*/ void *arg __attribute__((unused))) { MYSQL *mysql; time_t start_time; my_thread_init(); start_time = time(NULL); os_event_set(kill_query_thread_started); msg_ts("Kill query timeout %d seconds.\n", opt_kill_long_queries_timeout); while (time(NULL) - start_time ...
0
[ "CWE-200" ]
percona-xtrabackup
7742f875bb289a874246fb4653b7cd9f14b588fe
237,508,858,860,223,630,000,000,000,000,000,000,000
49
PXB-2722 password is written into xtrabackup_info https://jira.percona.com/browse/PXB-2722 Analysis: password passed with -p option is written into backup tool_command in xtrabackup_info Fix: mask password before writting into xtrabackup_info
static inline __be32 try_6to4(struct in6_addr *v6dst) { __be32 dst = 0; if (v6dst->s6_addr16[0] == htons(0x2002)) { /* 6to4 v6 addr has 16 bits prefix, 32 v4addr, 16 SLA, ... */ memcpy(&dst, &v6dst->s6_addr16[1], 4); } return dst; }
0
[ "CWE-399" ]
linux-2.6
36ca34cc3b8335eb1fe8bd9a1d0a2592980c3f02
94,432,550,802,322,260,000,000,000,000,000,000,000
10
sit: Add missing kfree_skb() on pskb_may_pull() failure. Noticed by Paul Marks <paul@pmarks.net>. Signed-off-by: David S. Miller <davem@davemloft.net>
flatpak_dir_mirror_oci (FlatpakDir *self, FlatpakOciRegistry *dst_registry, FlatpakRemoteState *state, const char *ref, const char *skip_if_current_is, OstreeAsyncProgress...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
197,633,998,554,398,300,000,000,000,000,000,000,000
64
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static int mwifiex_free_ack_frame(int id, void *p, void *data) { pr_warn("Have pending ack frames!\n"); kfree_skb(p); return 0; }
0
[ "CWE-787" ]
linux
3a9b153c5591548612c3955c9600a98150c81875
12,342,755,708,413,417,000,000,000,000,000,000,000
6
mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status() mwifiex_ret_wmm_get_status() calls memcpy() without checking the destination size.Since the source is given from remote AP which contains illegal wmm elements , this may trigger a heap buffer overflow. Fix it by putting the length check before call...
Field *Item::make_string_field(TABLE *table) { Field *field; MEM_ROOT *mem_root= table->in_use->mem_root; DBUG_ASSERT(collation.collation); /* Note: the following check is repeated in subquery_types_allow_materialization(): */ if (too_big_for_varchar()) field= new (mem_root) Field_blob(...
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
82,930,299,264,242,420,000,000,000,000,000,000,000
27
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
int intel_guc_allocate_and_map_vma(struct intel_guc *guc, u32 size, struct i915_vma **out_vma, void **out_vaddr) { struct i915_vma *vma; void *vaddr; vma = intel_guc_allocate_vma(guc, size); if (IS_ERR(vma)) return PTR_ERR(vma); vaddr = i915_gem_object_pin_map(vma->obj, I915_MAP_WB); if (IS_ERR(vaddr))...
0
[ "CWE-20", "CWE-190" ]
linux
c784e5249e773689e38d2bc1749f08b986621a26
281,548,084,053,508,750,000,000,000,000,000,000,000
21
drm/i915/guc: Update to use firmware v49.0.1 The latest GuC firmware includes a number of interface changes that require driver updates to match. * Starting from Gen11, the ID to be provided to GuC needs to contain the engine class in bits [0..2] and the instance in bits [3..6]. NOTE: this patch breaks pointer d...
void Lua::setParamsTable(lua_State* vm, const char* table_name, const char* query) const { char outbuf[FILENAME_MAX]; char *where; char *tok; char *query_string = query ? strdup(query) : NULL; lua_newtable(L); if (query_string) { // ntop->getTrace()->traceEvent(TRACE_WARNING, "[HTTP] %s", query_s...
1
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
220,933,882,247,283,180,000,000,000,000,000,000,000
71
Security fix: prevents empty host from being used
pkinit_fini_pkcs11(pkinit_identity_crypto_context ctx) { #ifndef WITHOUT_PKCS11 if (ctx == NULL) return; if (ctx->p11 != NULL) { if (ctx->session) { ctx->p11->C_CloseSession(ctx->session); ctx->session = CK_INVALID_HANDLE; } ctx->p11->C_Finalize(NULL_PTR)...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
232,091,692,134,409,200,000,000,000,000,000,000,000
24
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
bool napi_complete_done(struct napi_struct *n, int work_done) { unsigned long flags, val, new; /* * 1) Don't let napi dequeue from the cpu poll list * just in case its running on a different cpu. * 2) If we are busy polling, do nothing here, we have * the guarantee we will be called later. */ if (u...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
303,388,549,387,947,600,000,000,000,000,000,000,000
58
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...
static bool torture_winbind_struct_lookup_sids_invalid( struct torture_context *torture) { struct winbindd_request req = {0}; struct winbindd_response rep = {0}; bool strict = torture_setting_bool(torture, "strict mode", false); bool ok; torture_comment(torture, "Running WINBINDD_LOOKUP_SIDS (struct based)\n"...
0
[ "CWE-476" ]
samba
0b259a48a70bde4dfd482e0720e593ae5a9c414a
85,179,865,752,990,630,000,000,000,000,000,000,000
22
CVE-2020-14323 torture4: Add a simple test for invalid lookup_sids winbind call We can't add this test before the fix, add it to knownfail and have the fix remove the knownfail entry again. As this crashes winbind, many tests after this one will fail. Reported by Bas Alberts of the GitHub Security Lab Team as GHSL-20...
void CairoOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen) { if (currentFont) { glyphs[glyphCount].index = currentFont->getGlyph (code, u, uLen); glyphs[glyphCount].x = x -...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
337,816,582,921,032,330,000,000,000,000,000,000,000
16
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static int ff_layout_read_done_cb(struct rpc_task *task, struct nfs_pgio_header *hdr) { int err; if (task->tk_status < 0) { ff_layout_io_track_ds_error(hdr->lseg, hdr->pgio_mirror_idx, hdr->args.offset, hdr->args.count, &hdr->res.op_status, OP_READ, task->tk_status); trace_ff_layou...
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
330,872,505,513,758,720,000,000,000,000,000,000,000
36
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
void *ztrymalloc_usable(size_t size, size_t *usable) { void *ptr = malloc(size+PREFIX_SIZE); if (!ptr) return NULL; #ifdef HAVE_MALLOC_SIZE size = zmalloc_size(ptr); update_zmalloc_stat_alloc(size); if (usable) *usable = size; return ptr; #else *((size_t*)ptr) = size; update_zmalloc_sta...
1
[ "CWE-190" ]
redis
d32f2e9999ce003bad0bd2c3bca29f64dcce4433
238,902,175,294,809,530,000,000,000,000,000,000,000
16
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. A...
void var_copy(VAR *dest, VAR *src) { dest->int_val= src->int_val; dest->is_int= src->is_int; dest->int_dirty= src->int_dirty; /* Alloc/realloc data for str_val in dest */ if (dest->alloced_len < src->alloced_len && !(dest->str_val= dest->str_val ? (char*)my_realloc(PSI_NOT_INSTRUMENTED, ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
26,863,751,203,197,487,000,000,000,000,000,000,000
22
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 inline size_t write_octet_sequence(unsigned char *buf, enum entity_charset charset, unsigned code) { /* code is not necessarily a unicode code point */ switch (charset) { case cs_utf_8: return php_utf32_utf8(buf, code); case cs_8859_1: case cs_cp1252: case cs_8859_15: case cs_koi8r: case cs_cp1251: c...
0
[ "CWE-190" ]
php-src
0da8b8b801f9276359262f1ef8274c7812d3dfda
238,986,132,984,639,300,000,000,000,000,000,000,000
51
Fix bug #72135 - don't create strings with lengths outside int range
int Monitor::check_features(MonitorDBStore *store) { CompatSet required = get_supported_features(); CompatSet ondisk; read_features_off_disk(store, &ondisk); if (!required.writeable(ondisk)) { CompatSet diff = required.unsupported(ondisk); generic_derr << "ERROR: on disk data includes unsupported feat...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
43,881,108,404,497,660,000,000,000,000,000,000,000
15
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static void clean_up_mutexes() { mysql_rwlock_destroy(&LOCK_grant); mysql_mutex_destroy(&LOCK_thread_count); mysql_mutex_destroy(&LOCK_thread_created); mysql_mutex_destroy(&LOCK_status); mysql_mutex_destroy(&LOCK_delayed_insert); mysql_mutex_destroy(&LOCK_delayed_status); mysql_mutex_destroy(&LOCK_delayed...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
51,905,197,003,892,760,000,000,000,000,000,000,000
39
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
static void cli_session_setup_gensec_local_next(struct tevent_req *req) { struct cli_session_setup_gensec_state *state = tevent_req_data(req, struct cli_session_setup_gensec_state); struct tevent_req *subreq = NULL; if (state->local_ready) { tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE); retur...
0
[ "CWE-94" ]
samba
94295b7aa22d2544af5323bca70d3dcb97fd7c64
131,924,787,296,153,880,000,000,000,000,000,000,000
20
CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860 Signed-off-by: Stefan Metzmacher <metze@samba.org>
static TRBCCode xhci_disable_slot(XHCIState *xhci, unsigned int slotid) { int i; trace_usb_xhci_slot_disable(slotid); assert(slotid >= 1 && slotid <= xhci->numslots); for (i = 1; i <= 31; i++) { if (xhci->slots[slotid-1].eps[i-1]) { xhci_disable_ep(xhci, slotid, i); } }...
0
[ "CWE-835" ]
qemu
96d87bdda3919bb16f754b3d3fd1227e1f38f13c
47,844,528,077,119,330,000,000,000,000,000,000,000
18
xhci: guard xhci_kick_epctx against recursive calls Track xhci_kick_epctx processing being active in a variable. Check the variable before calling xhci_kick_epctx from xhci_kick_ep. Add an assert to make sure we don't call recursively into xhci_kick_epctx. Cc: 1653384@bugs.launchpad.net Fixes: 94b037f2a451b3dc855f9...
SPICE_GNUC_VISIBLE int spice_server_is_server_mouse(SpiceServer *reds) { return reds->mouse_mode == SPICE_MOUSE_MODE_SERVER; }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
39,720,937,035,308,923,000,000,000,000,000,000,000
4
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
xmlSchemaInternalErr2(xmlSchemaAbstractCtxtPtr actxt, const char *funcName, const char *message, const xmlChar *str1, const xmlChar *str2) { xmlChar *msg = NULL; if (actxt == NULL) return; msg = xmlStrdup(BAD_CAST "Internal error: %s, "); msg = xmlStrcat(msg, BAD_CAS...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
326,093,710,680,008,600,000,000,000,000,000,000,000
23
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static int v9fs_mapped_iattr_valid(int iattr_valid) { int i; int p9_iattr_valid = 0; struct dotl_iattr_map dotl_iattr_map[] = { { ATTR_MODE, P9_ATTR_MODE }, { ATTR_UID, P9_ATTR_UID }, { ATTR_GID, P9_ATTR_GID }, { ATTR_SIZE, P9_ATTR_SIZE }, { ATTR_ATIME, P9_ATTR_ATIME }, { ATTR_MTIME, P9_ATTR_MTIME ...
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
236,850,894,041,139,240,000,000,000,000,000,000,000
21
9p: use inode->i_lock to protect i_size_write() under 32-bit Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely in read_seqcount_begin() when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a...
GF_Err segr_Size(GF_Box *s) { u32 i; FDSessionGroupBox *ptr = (FDSessionGroupBox *)s; ptr->size += 2; for (i=0; i<ptr->num_session_groups; i++) { ptr->size += 1 + 4*ptr->session_groups[i].nb_groups; ptr->size += 2 + 4*ptr->session_groups[i].nb_channels; } return GF_OK; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
308,925,652,887,555,150,000,000,000,000,000,000,000
13
fixed 2 possible heap overflows (inc. #1088)
static void __hw_addr_init(struct netdev_hw_addr_list *list) { INIT_LIST_HEAD(&list->list); list->count = 0; }
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
68,193,219,985,289,940,000,000,000,000,000,000,000
5
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
static int decode_delegation(struct xdr_stream *xdr, struct nfs_openres *res) { __be32 *p; uint32_t delegation_type; READ_BUF(4); READ32(delegation_type); if (delegation_type == NFS4_OPEN_DELEGATE_NONE) { res->delegation_type = 0; return 0; } READ_BUF(NFS4_STATEID_SIZE+4); COPYMEM(res->delega...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
88,318,508,111,435,540,000,000,000,000,000,000,000
25
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
int wc_CheckRsaKey(RsaKey* key) { #if defined(WOLFSSL_CRYPTOCELL) return 0; #endif #ifdef WOLFSSL_SMALL_STACK mp_int *k = NULL, *tmp = NULL; #else mp_int k[1], tmp[1]; #endif int ret = 0; #ifdef WOLFSSL_SMALL_STACK k = (mp_int*)XMALLOC(sizeof(mp_int) * 2, NULL, DYNAMIC_TYPE_RSA); if (k == NULL)...
0
[ "CWE-310", "CWE-787" ]
wolfssl
fb2288c46dd4c864b78f00a47a364b96a09a5c0f
154,692,935,145,047,000,000,000,000,000,000,000,000
190
RSA-PSS: Handle edge case with encoding message to hash When the key is small relative to the digest (1024-bit key, 64-byte hash, 61-byte salt length), the internal message to hash is larger than the output size. Allocate a buffer for the message when this happens.
smtp_check_rcpt_to(struct smtp_session *s, const char *args) { char *copy; char tmp[SMTP_LINE_MAX]; (void)strlcpy(tmp, args, sizeof tmp); copy = tmp; if (s->tx == NULL) { smtp_reply(s, "503 %s %s: Command not allowed at this point.", esc_code(ESC_STATUS_PERMFAIL, ESC_INVALID_COMMAND), esc_descript...
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
327,340,120,332,336,170,000,000,000,000,000,000,000
33
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
const AST *ast_iter(const AST *a, uint32_t n, uint32_t m) { AST *ast = new AST(a->loc, AST::ITER); ast->iter.ast = a; ast->iter.min = n; ast->iter.max = m; return ast; }
1
[ "CWE-787" ]
re2c
039c18949190c5de5397eba504d2c75dad2ea9ca
20,856,557,274,485,214,000,000,000,000,000,000,000
8
Emit an error when repetition lower bound exceeds upper bound. Historically this was allowed and re2c swapped the bounds. However, it most likely indicates an error in user code and there is only a single occurrence in the tests (and the test in an artificial one), so although the change is backwards incompatible ther...
int udplite_get_port(struct sock *sk, unsigned short p, int (*c)(const struct sock *, const struct sock *)) { return __udp_lib_get_port(sk, p, udplite_hash, &udplite_port_rover, c); }
1
[]
linux-2.6
32c1da70810017a98aa6c431a5494a302b6b9a30
251,875,682,803,410,300,000,000,000,000,000,000,000
5
[UDP]: Randomize port selection. This patch causes UDP port allocation to be randomized like TCP. The earlier code would always choose same port (ie first empty list). Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
int register_reboot_notifier(struct notifier_block * nb) { return blocking_notifier_chain_register(&reboot_notifier_list, nb); }
0
[ "CWE-20" ]
linux-2.6
9926e4c74300c4b31dee007298c6475d33369df0
8,350,201,037,623,848,000,000,000,000,000,000,000
4
CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix As discovered here today, the change in Kernel 2.6.17 intended to inhibit users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by "cheating" and setting it to 1 in such a case, does not make a difference, as the check is done in the wrong pla...
static void tcf_block_owner_del(struct tcf_block *block, struct Qdisc *q, enum flow_block_binder_type binder_type) { struct tcf_block_owner_item *item; list_for_each_entry(item, &block->owner_list, list) { if (item->q == q && item->binder_type == binder_type) { list_del(&item->list); kfree(item); ...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
290,936,942,589,178,460,000,000,000,000,000,000,000
15
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
static int MP4_ReadBox_padb( stream_t *p_stream, MP4_Box_t *p_box ) { uint32_t count; MP4_READBOX_ENTER( MP4_Box_data_padb_t ); MP4_GETVERSIONFLAGS( p_box->data.p_padb ); MP4_GET4BYTES( p_box->data.p_padb->i_sample_count ); count = (p_box->data.p_padb->i_sample_count + 1) / 2; p_box->data.p_...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
2,326,422,861,790,196,300,000,000,000,000,000,000
44
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
ASN1_TIME* X509_get_notAfter(X509* x) { if (x) return x->GetAfter(); return 0; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
31,677,096,498,438,415,000,000,000,000,000,000,000
5
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
void __audit_seccomp(unsigned long syscall, long signr, int code) { struct audit_buffer *ab; ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_SECCOMP); if (unlikely(!ab)) return; audit_log_task(ab); audit_log_format(ab, " sig=%ld arch=%x syscall=%ld compat=%d ip=0x%lx code=0x%x", signr, syscall_get_arch(), sysc...
0
[ "CWE-362" ]
linux
43761473c254b45883a64441dd0bc85a42f3645c
77,096,021,968,496,240,000,000,000,000,000,000,000
13
audit: fix a double fetch in audit_log_single_execve_arg() There is a double fetch problem in audit_log_single_execve_arg() where we first check the execve(2) argumnets for any "bad" characters which would require hex encoding and then re-fetch the arguments for logging in the audit record[1]. Of course this leaves a...
static int validate_params(uint cmd, struct dm_ioctl *param) { /* Always clear this flag */ param->flags &= ~DM_BUFFER_FULL_FLAG; param->flags &= ~DM_UEVENT_GENERATED_FLAG; param->flags &= ~DM_SECURE_DATA_FLAG; param->flags &= ~DM_DATA_OUT_FLAG; /* Ignores parameters */ if (cmd == DM_REMOVE_ALL_CMD || cmd ...
0
[ "CWE-787" ]
linux
4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a
328,007,714,444,360,000,000,000,000,000,000,000,000
30
dm ioctl: fix out of bounds array access when no devices If there are not any dm devices, we need to zero the "dev" argument in the first structure dm_name_list. However, this can cause out of bounds write, because the "needed" variable is zero and len may be less than eight. Fix this bug by reporting DM_BUFFER_FULL_...