func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int nft_register_flowtable_net_hooks(struct net *net, struct nft_table *table, struct list_head *hook_list, struct nft_flowtable *flowtable) { struct nft_hook *hook, *hook2, *next; struct nft_flowtable *ft; int err, i = 0; list_for_each_entry(hook, hook_list, list) { list_for_ea...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
103,478,490,648,981,540,000,000,000,000,000,000,000
54
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx) { struct TCP_Server_Info *server = tcon->ses->server; unsigned int rsize; /* start with specified rsize, or default */ rsize = ctx->rsize ? ctx->rsize : SMB3_DEFAULT_IOSIZE; rsize = min_t(unsigned int, rsize, server->max_read); #ifdef CONFI...
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
315,346,848,793,885,480,000,000,000,000,000,000,000
31
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts) { return security_ops->sb_parse_opts_str(options, opts); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
221,133,589,603,540,120,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
tls_expand_session_files(SSL_CTX *sctx, tls_ext_ctx_cb *cbinfo) { uschar *expanded; if (cbinfo->certificate == NULL) return OK; if (Ustrstr(cbinfo->certificate, US"tls_sni") || Ustrstr(cbinfo->certificate, US"tls_in_sni") || Ustrstr(cbinfo->certificate, US"tls_out_sni") ) reexpand_tls_files_for_sni = T...
0
[ "CWE-264" ]
exim
43ba2742c700d625dcdcdaf7bbadc2f72776854a
310,732,276,443,334,870,000,000,000,000,000,000,000
64
Fix CVE-2016-1531 Add keep_environment, add_environment. Change the working directory to "/" during the early startup phase. (cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0) (cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832) (cherry picked from commit 14b82c8b736c8ed24eda...
static int fault_in_user_writeable(u32 __user *uaddr) { struct mm_struct *mm = current->mm; int ret; down_read(&mm->mmap_sem); ret = fixup_user_fault(current, mm, (unsigned long)uaddr, FAULT_FLAG_WRITE); up_read(&mm->mmap_sem); return ret < 0 ? ret : 0; }
0
[ "CWE-264", "CWE-269" ]
linux
e9c243a5a6de0be8e584c604d353412584b592f8
86,262,660,193,126,360,000,000,000,000,000,000,000
12
futex-prevent-requeue-pi-on-same-futex.patch futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1) If uaddr == uaddr2, then we have broken the rule of only requeueing from a non-pi futex to a pi futex with this call. If we attempt this, then dangling pointers may be left for rt_waiter resulting in an expl...
bool Segment::DoNewClusterProcessing(uint64_t track_number, uint64_t frame_timestamp_ns, bool is_key) { for (;;) { // Based on the characteristics of the current frame and current // cluster, decide whether to create a new cluster. const int result = TestFrame(track_nu...
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
240,872,475,109,326,450,000,000,000,000,000,000,000
31
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
pdf_filter_d(fz_context *ctx, pdf_processor *proc, pdf_obj *array, float phase) { pdf_filter_processor *p = (pdf_filter_processor*)proc; filter_flush(ctx, p, 0); if (p->chain->op_d) p->chain->op_d(ctx, p->chain, array, phase); }
0
[ "CWE-125" ]
mupdf
97096297d409ec6f206298444ba00719607e8ba8
171,956,555,585,496,100,000,000,000,000,000,000,000
7
Bug 701292: Fix test for missing/empty string.
cache_user_id (KBNODE keyblock) { user_id_db_t r; const char *uid; size_t uidlen; keyid_list_t keyids = NULL; KBNODE k; for (k = keyblock; k; k = k->next) { if (k->pkt->pkttype == PKT_PUBLIC_KEY || k->pkt->pkttype == PKT_PUBLIC_SUBKEY) { keyid_list_t a = xmalloc_clear (sizeof *a); /* Hm...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
186,791,963,174,588,180,000,000,000,000,000,000,000
62
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
base::OnceClosure ElectronBrowserClient::SelectClientCertificate( content::WebContents* web_contents, net::SSLCertRequestInfo* cert_request_info, net::ClientCertIdentityList client_certs, std::unique_ptr<content::ClientCertificateDelegate> delegate) { if (!client_certs.empty() && delegate_) { dele...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
325,858,922,321,815,840,000,000,000,000,000,000,000
12
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * 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 main frame ...
static void gfs2_alloc_extent(const struct gfs2_rbm *rbm, bool dinode, unsigned int *n) { struct gfs2_rbm pos = { .rgd = rbm->rgd, }; const unsigned int elen = *n; u64 block; int ret; *n = 1; block = gfs2_rbm_to_block(rbm); gfs2_trans_add_meta(rbm->rgd->rd_gl, rbm_bi(rbm)->bi_bh); gfs2_setbit(rbm, true...
0
[ "CWE-416" ]
linux
36e4ad0316c017d5b271378ed9a1c9a4b77fab5f
210,672,135,945,167,960,000,000,000,000,000,000,000
23
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree Before this patch, function read_rindex_entry would set a rgrp glock's gl_object pointer to itself before inserting the rgrp into the rgrp rbtree. The problem is: if another process was also reading the rgrp in, and had already inserted its newly create...
int find_dirent(nfs_readdir_descriptor_t *desc) { struct nfs_entry *entry = desc->entry; int loop_count = 0, status; while((status = dir_decode(desc)) == 0) { dfprintk(DIRCACHE, "NFS: %s: examining cookie %Lu\n", __FUNCTION__, (unsigned long long)entry->cookie); if (entry->prev_cookie == *desc->dir_cook...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
197,644,269,823,862,730,000,000,000,000,000,000,000
18
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
bit_write_RLL (Bit_Chain *dat, BITCODE_RLL value) { // least significant word first bit_write_RL (dat, value & 0xFFFFFFFF); bit_write_RL (dat, value >> 32); }
0
[ "CWE-703", "CWE-125" ]
libredwg
95cc9300430d35feb05b06a9badf678419463dbe
100,945,005,853,762,960,000,000,000,000,000,000,000
6
encode: protect from stack under-flow From GH #178 fuzzing
static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) { Image *image, *image2=NULL, *rotated_image; register Quantum *q; unsigned int status; MATHeader MATLAB_HDR; size_t size; size_t CellType; QuantumInfo *quantum_info; ImageInfo *clone_info; int i; ssize_t ldblk; u...
1
[ "CWE-617" ]
ImageMagick
b76b2ffff70f2c314a069ea953f4a45b1e2ce5e6
3,298,842,614,035,262,000,000,000,000,000,000,000
507
https://github.com/ImageMagick/ImageMagick/issues/547
static void fts3DbExec( int *pRc, /* Success code */ sqlite3 *db, /* Database in which to run SQL */ const char *zFormat, /* Format string for SQL */ ... /* Arguments to the format string */ ){ va_list ap; char *zSql; if( *pRc ) return; va_start(ap, zFormat); ...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
326,685,719,104,122,150,000,000,000,000,000,000,000
19
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
PackLinuxElf64::invert_pt_dynamic(Elf64_Dyn const *dynp) { if (dt_table[Elf64_Dyn::DT_NULL]) { return; // not 1st time; do not change upx_dt_init } Elf64_Dyn const *const dynp0 = dynp; unsigned ndx = 1+ 0; if (dynp) for (; ; ++ndx, ++dynp) { upx_uint64_t const d_tag = get_te64(&...
1
[ "CWE-703" ]
upx
e2f60adc95334f47e286838dac33160819c5d74d
158,689,796,987,592,100,000,000,000,000,000,000,000
139
Detect 0==DT_SYMTAB in invert_pt_dynamic() https://github.com/upx/upx/issues/333 modified: p_lx_elf.cpp
void prepareChroot(SpawnPreparationInfo &info, const Options &options) const { TRACE_POINT(); info.appRoot = absolutizePath(options.appRoot); if (options.preexecChroot.empty()) { info.chrootDir = "/"; } else { info.chrootDir = absolutizePath(options.preexecChroot); } if (info.appRoot != info.chrootDi...
0
[]
passenger
8c6693e0818772c345c979840d28312c2edd4ba4
207,162,949,352,807,580,000,000,000,000,000,000,000
22
Security check socket filenames reported by spawned application processes.
ClientKeyExchange::ClientKeyExchange(SSL& ssl) { createKey(ssl); }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
180,486,040,906,094,770,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
static int svm_hardware_enable(void) { struct svm_cpu_data *sd; uint64_t efer; struct desc_struct *gdt; int me = raw_smp_processor_id(); rdmsrl(MSR_EFER, efer); if (efer & EFER_SVME) return -EBUSY; if (!has_svm()) { pr_err("%s: err EOPNOTSUPP on %d\n", __func__, me); return -EINVAL; } sd = per_cpu(svm...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
11,330,339,317,198,700,000,000,000,000,000,000,000
75
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
ShutdownWrap* TLSWrap::CreateShutdownWrap(Local<Object> req_wrap_object) { return underlying_stream()->CreateShutdownWrap(req_wrap_object); }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
208,866,483,709,936,460,000,000,000,000,000,000,000
3
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
MakeValue(typename WCharHelper<wchar_t, Char>::Supported value) { int_value = value; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
38,209,398,783,158,600,000,000,000,000,000,000,000
3
Fix segfault on complex pointer formatting (#642)
static void Rp_test(js_State *J) { js_Regexp *re; const char *text; int result; int opts; Resub m; re = js_toregexp(J, 0); text = js_tostring(J, 1); opts = 0; if (re->flags & JS_REGEXP_G) { if (re->last > strlen(text)) { re->last = 0; js_pushboolean(J, 0); return; } if (re->last > 0) { text...
0
[ "CWE-400", "CWE-674", "CWE-787" ]
mujs
00d4606c3baf813b7b1c176823b2729bf51002a2
127,586,547,785,564,720,000,000,000,000,000,000,000
39
Bug 700937: Limit recursion in regexp matcher. Also handle negative return code as an error in the JS bindings.
X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx) { return ctx->param; }
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
311,180,110,200,479,940,000,000,000,000,000,000,000
4
Backport OCSP fixes.
void Scan::StartMeasureScan(class BufferCtrl *ctrl) { assert(m_pParser); ctrl->PrepareForEncoding(); m_pParser->StartMeasureScan(ctrl); }
0
[ "CWE-476" ]
libjpeg
ea6315164b1649ff932a396b7600eac4bffcfaba
39,825,497,038,476,160,000,000,000,000,000,000,000
7
Added a check whether all components in a scan are actually present.
int ssl3_send_server_hello(SSL *s) { unsigned char *buf; unsigned char *p,*d; int i,sl; unsigned long l; #ifdef OPENSSL_NO_TLSEXT unsigned long Time; #endif if (s->state == SSL3_ST_SW_SRVR_HELLO_A) { buf=(unsigned char *)s->init_buf->data; #ifdef OPENSSL_NO_TLSEXT p=s->s3->server_random; /* Generate ser...
0
[]
openssl
0ffa49970b9f8ea66b43ce2eb7f8fd523b65bc2c
64,316,839,023,069,260,000,000,000,000,000,000,000
100
Backport support for fixed DH ciphersuites (from HEAD)
asmlinkage long sys_mount(char __user * dev_name, char __user * dir_name, char __user * type, unsigned long flags, void __user * data) { int retval; unsigned long data_page; unsigned long type_page; unsigned long dev_page; char *dir_page; retval = copy_mount_options(type, &type_page); if (retval < 0) ...
0
[ "CWE-269" ]
linux-2.6
ee6f958291e2a768fd727e7a67badfff0b67711a
85,010,807,117,248,000,000,000,000,000,000,000,000
41
check privileges before setting mount propagation There's a missing check for CAP_SYS_ADMIN in do_change_type(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torva...
static void nop_submission_tasklet(unsigned long data) { /* The driver is wedged; don't process any more events. */ }
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
62,847,550,443,572,010,000,000,000,000,000,000,000
4
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 int rose_neigh_show(struct seq_file *seq, void *v) { char buf[11]; int i; if (v == SEQ_START_TOKEN) seq_puts(seq, "addr callsign dev count use mode restart t0 tf digipeaters\n"); else { struct rose_neigh *rose_neigh = v; /* if (!rose_neigh->loopback) { */ seq_printf(seq, "%05d %-9s %-4s ...
0
[]
linux
148ca04518070910739dfc4eeda765057856403d
303,307,020,967,867,000,000,000,000,000,000,000,000
32
net: rose: fix UAF bug caused by rose_t0timer_expiry There are UAF bugs caused by rose_t0timer_expiry(). The root cause is that del_timer() could not stop the timer handler that is running and there is no synchronization. One of the race conditions is shown below: (thread 1) | (thread 2) ...
static long convert(long val, int oldsgnd, int oldprec, int newsgnd, int newprec) { if (newsgnd != oldsgnd) { } if (newprec != oldprec) { if (newprec > oldprec) { val <<= newprec - oldprec; } else if (oldprec > newprec) { val >>= oldprec - newprec; } } return val; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
88,036,793,537,599,670,000,000,000,000,000,000,000
14
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options) { xmlParserCtxtPtr ctxt; ctxt = xmlCreateMemoryParserCtxt(buffer, size); if (ctxt == NULL) return (NULL); return (xmlDoRead(ctxt, URL, encoding, options, 0)); }
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
138,382,262,853,904,920,000,000,000,000,000,000,000
9
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) #endif { #if defined(WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI) && \ !defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI) int A = fp_count_bits (a); int B = fp_count_bits (b); if( A >= ESP_RSA_MULM_BITS && B >= ESP_RSA_MULM_BITS) return esp_mp...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
167,247,425,180,560,160,000,000,000,000,000,000,000
14
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.
nghttp2_session* ProdNghttp2SessionFactory::create(const nghttp2_session_callbacks* callbacks, ConnectionImpl* connection, const nghttp2_option* options) { nghttp2_session* session; nghttp2_session_client_new2(&ses...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
326,585,235,274,994,630,000,000,000,000,000,000,000
7
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static void opj_j2k_write_float_to_int16(const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem) { OPJ_BYTE * l_dest_data = (OPJ_BYTE *) p_dest_data; OPJ_FLOAT32 * l_src_data = (OPJ_FLOAT32 *) p_src_data; OPJ_UINT32 i; OPJ_UINT32 l_temp; for (i = 0; i < p_nb_elem; ++i) { ...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
52,567,129,282,371,680,000,000,000,000,000,000,000
16
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
static const char *gfs2_acl_name(int type) { switch (type) { case ACL_TYPE_ACCESS: return XATTR_POSIX_ACL_ACCESS; case ACL_TYPE_DEFAULT: return XATTR_POSIX_ACL_DEFAULT; } return NULL; }
0
[ "CWE-862", "CWE-285" ]
linux
073931017b49d9458aa351605b43a7e34598caef
326,031,771,444,230,000,000,000,000,000,000,000,000
10
posix_acl: Clear SGID bit when setting file permissions When file permissions are modified via chmod(2) and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file permissions as well as the new ACL, but doesn't cl...
bool WindowsServiceControl::start() { if( checkService() == false ) { return false; } SERVICE_STATUS status; status.dwCurrentState = SERVICE_START_PENDING; if( StartService( m_serviceHandle, 0, nullptr ) ) { while( QueryServiceStatus( m_serviceHandle, &status ) ) { if( status.dwCurrentState == SERVICE...
0
[ "CWE-428", "CWE-295" ]
veyon
f231ec511b9a09f43f49b2c7bb7c60b8046276b1
123,712,398,044,744,170,000,000,000,000,000,000,000
33
WindowsServiceControl: quote service binary path Fix unquoted service path vulnerability. Closes #657.
static void l2cap_send_move_chan_cfm(struct l2cap_chan *chan, u16 result) { struct l2cap_move_chan_cfm cfm; BT_DBG("chan %p, result 0x%4.4x", chan, result); chan->ident = l2cap_get_ident(chan->conn); cfm.icid = cpu_to_le16(chan->scid); cfm.result = cpu_to_le16(result); l2cap_send_cmd(chan->conn, chan->ident, ...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
61,958,052,671,031,780,000,000,000,000,000,000,000
16
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
static void *htab_map_lookup_elem(struct bpf_map *map, void *key) { struct htab_elem *l = __htab_map_lookup_elem(map, key); if (l) return l->key + round_up(map->key_size, 8); return NULL; }
0
[ "CWE-787" ]
bpf
c4eb1f403243fc7bbb7de644db8587c03de36da6
128,460,003,656,988,820,000,000,000,000,000,000,000
9
bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as repor...
static int checkout_action_no_wd( int *action, checkout_data *data, const git_diff_delta *delta) { int error = 0; *action = CHECKOUT_ACTION__NONE; switch (delta->status) { case GIT_DELTA_UNMODIFIED: /* case 12 */ error = checkout_notify(data, GIT_CHECKOUT_NOTIFY_DIRTY, delta, NULL); if (error) return er...
0
[ "CWE-20", "CWE-706" ]
libgit2
64c612cc3e25eff5fb02c59ef5a66ba7a14751e4
10,266,213,041,212,203,000,000,000,000,000,000,000
35
Protect against 8.3 "short name" attacks also on Linux/macOS The Windows Subsystem for Linux (WSL) is getting increasingly popular, in particular because it makes it _so_ easy to run Linux software on Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to `/mnt/c/`, no need to set that up manually). ...
static inline struct hlist_nulls_head *select_bucket(struct bpf_htab *htab, u32 hash) { return &__select_bucket(htab, hash)->head; }
0
[ "CWE-787" ]
bpf
c4eb1f403243fc7bbb7de644db8587c03de36da6
286,184,040,306,028,700,000,000,000,000,000,000,000
4
bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as repor...
DwaCompressor::uncompress (const char *inPtr, int inSize, Imath::Box2i range, const char *&outPtr) { int minX = range.min.x; int maxX = std::min (range.max.x, _max[0]); int minY = range.min.y; int maxY = std::min (range.max.y, _max[1]); int headerSize = NUM_SIZES_SINGLE*sizeof(In...
1
[ "CWE-284" ]
openexr
49db4a4192482eec9c27669f75db144cf5434804
294,855,825,754,402,030,000,000,000,000,000,000,000
508
Add additional input validation in an attempt to resolve issue #232
TEST_F(RenameCollectionTest, RenameCollectionForApplyOpsDropTargetByUUIDEvenIfSourceDoesNotExist) { auto missingSourceNss = NamespaceString("test.bar2"); auto dropTargetNss = NamespaceString("test.bar3"); _createCollectionWithUUID(_opCtx.get(), _targetNss); auto dropTargetUUID = _createCollectionWithUUI...
0
[ "CWE-20" ]
mongo
35c1b1f588f04926a958ad2fe4d9c59d79f81e8b
166,224,498,753,450,280,000,000,000,000,000,000,000
14
SERVER-35636 renameCollectionForApplyOps checks for complete namespace
convert_arg_to_entry (const char *set_value, ExifEntry *e, ExifByteOrder o, ExifLog *log) { unsigned int i, numcomponents; char *value_p, *buf; /* * ASCII strings are handled separately, * since they don't require any conversion. */ if (e->format == EXIF_FORMAT_ASCII || e->tag == EXIF_TAG_USER_C...
0
[ "CWE-476" ]
exif
f6334d9d32437ef13dc902f0a88a2be0063d9d1c
294,407,360,113,274,700,000,000,000,000,000,000,000
115
added empty strign check, which would lead to NULL ptr deref/crash in exif XML display. fixes https://github.com/libexif/exif/issues/4
static int get_reg_offset_16(struct insn *insn, struct pt_regs *regs, int *offs1, int *offs2) { /* * 16-bit addressing can use one or two registers. Specifics of * encodings are given in Table 2-1. "16-Bit Addressing Forms with the * ModR/M Byte" of the Intel Software Development Manual. */ static con...
0
[ "CWE-416", "CWE-362" ]
linux
de9f869616dd95e95c00bdd6b0fcd3421e8a4323
108,849,604,965,084,040,000,000,000,000,000,000,000
56
x86/insn-eval: Fix use-after-free access to LDT entry get_desc() computes a pointer into the LDT while holding a lock that protects the LDT from being freed, but then drops the lock and returns the (now potentially dangling) pointer to its caller. Fix it by giving the caller a copy of the LDT entry instead. Fixes: 6...
static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt, struct segmented_address addr, unsigned *max_size, unsigned size, bool write, bool fetch, enum x86emul_mode mode, ulong *linear) { struct desc_struct desc; bool usable; ulong la; u32 lim; u16 sel; la...
0
[ "CWE-362", "CWE-269" ]
linux
f3747379accba8e95d70cec0eae0582c8c182050
176,451,810,291,136,180,000,000,000,000,000,000,000
60
KVM: x86: SYSENTER emulation is broken SYSENTER emulation is broken in several ways: 1. It misses the case of 16-bit code segments completely (CVE-2015-0239). 2. MSR_IA32_SYSENTER_CS is checked in 64-bit mode incorrectly (bits 0 and 1 can still be set without causing #GP). 3. MSR_IA32_SYSENTER_EIP and MSR_IA32_SYSE...
_set_source_rsvg_paint_server (RsvgDrawingCtx * ctx, guint32 current_color_rgb, RsvgPaintServer * ps, guint8 opacity, RsvgBbox bbox, guint32 current_colour) { switch (ps->type) { case RSVG_PAINT_SERVER_LIN_GRAD: ...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
135,974,672,369,445,100,000,000,000,000,000,000,000
20
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...
static int ql_mii_write_reg_ex(struct ql3_adapter *qdev, u16 regAddr, u16 value, u32 phyAddr) { struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; u8 scanWasEnabled; scanWasEnabled = ql_mii_disable_scan_mode(qdev); if (ql_wait_for_mii_ready(qdev)) { netif_warn(qdev, link, qd...
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
49,248,804,148,465,360,000,000,000,000,000,000,000
30
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
static int selinux_inode_setxattr(struct user_namespace *mnt_userns, struct dentry *dentry, const char *name, const void *value, size_t size, int flags) { struct inode *inode = d_backing_inode(dentry); struct inode_security_struct *isec; struct superblock_security_struct *sbsec; struct common_audit_data...
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
267,025,882,759,160,970,000,000,000,000,000,000,000
94
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
virDomainStorageNetCookiesParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virStorageSourcePtr src) { VIR_XPATH_NODE_AUTORESTORE(ctxt); g_autofree xmlNodePtr *nodes = NULL; ssize_t nnodes; size_t i; ctxt->node = node; if ((nnodes =...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
63,697,708,678,339,590,000,000,000,000,000,000,000
27
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static struct list_head *virtual_queue(struct virtual_engine *ve) { return &ve->base.execlists.default_priolist.requests[0]; }
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
1,634,448,689,256,512,600,000,000,000,000,000,000
4
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 void isa_cirrus_vga_realizefn(DeviceState *dev, Error **errp) { ISADevice *isadev = ISA_DEVICE(dev); ISACirrusVGAState *d = ISA_CIRRUS_VGA(dev); VGACommonState *s = &d->cirrus_vga.vga; /* follow real hardware, cirrus card emulated has 4 MB video memory. Also accept 8 MB/16 MB for backward...
0
[ "CWE-119" ]
qemu
026aeffcb4752054830ba203020ed6eb05bcaba8
99,985,067,026,456,550,000,000,000,000,000,000,000
23
cirrus: stop passing around dst pointers in the blitter Instead pass around the address (aka offset into vga memory). Calculate the pointer in the rop_* functions, after applying the mask to the address, to make sure the address stays within the valid range. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-i...
static void ax25_kill_by_device(struct net_device *dev) { ax25_dev *ax25_dev; ax25_cb *s; struct sock *sk; if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) return; spin_lock_bh(&ax25_list_lock); again: ax25_for_each(s, &ax25_list) { if (s->ax25_dev == ax25_dev) { sk = s->sk; if (!sk) { spin_unlock_...
1
[ "CWE-416" ]
linux
9fd75b66b8f68498454d685dc4ba13192ae069b0
70,748,633,350,867,735,000,000,000,000,000,000,000
43
ax25: Fix refcount leaks caused by ax25_cb_del() The previous commit d01ffb9eee4a ("ax25: add refcount in ax25_dev to avoid UAF bugs") and commit feef318c855a ("ax25: fix UAF bugs of net_device caused by rebinding operation") increase the refcounts of ax25_dev and net_device in ax25_bind() and decrease the matching re...
xfs_attr_remove_int(xfs_inode_t *dp, struct xfs_name *name, int flags) { xfs_da_args_t args; xfs_fsblock_t firstblock; xfs_bmap_free_t flist; int error; xfs_mount_t *mp = dp->i_mount; /* * Fill in the arg structure for this request. */ memset((char *)&args, 0, sizeof(args)); args.name = name->name; args....
0
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
241,000,844,569,790,450,000,000,000,000,000,000,000
119
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
TPMT_PUBLIC_Marshal(TPMT_PUBLIC *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPMI_ALG_PUBLIC_Marshal(&source->type, buffer, size); written += TPMI_ALG_HASH_Marshal(&source->nameAlg, buffer, size); written += TPMA_OBJECT_Marshal(&source->objectAttributes, buffer, size); writt...
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
23,004,076,513,785,912,000,000,000,000,000,000,000
11
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>
next_line_from_context(cctx_T *cctx, int skip_comment) { char_u *line; do { ++cctx->ctx_lnum; if (cctx->ctx_lnum >= cctx->ctx_ufunc->uf_lines.ga_len) { line = NULL; break; } line = ((char_u **)cctx->ctx_ufunc->uf_lines.ga_data)[cctx->ctx_lnum]; cctx->ctx_line_start = line; SOURCING_LNUM = ...
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
23,393,174,342,250,260,000,000,000,000,000,000,000
19
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
nbd_internal_free_option (struct nbd_handle *h) { if (h->opt_current == NBD_OPT_LIST) FREE_CALLBACK (h->opt_cb.fn.list); else if (h->opt_current == NBD_OPT_LIST_META_CONTEXT) FREE_CALLBACK (h->opt_cb.fn.context); FREE_CALLBACK (h->opt_cb.completion); }
0
[ "CWE-617" ]
libnbd
fb4440de9cc76e9c14bd3ddf3333e78621f40ad0
243,451,412,641,753,600,000,000,000,000,000,000,000
8
opt_go: Tolerate unplanned server death While debugging some experimental nbdkit code that was triggering an assertion failure in nbdkit, I noticed a secondary failure of nbdsh also dying from an assertion: libnbd: debug: nbdsh: nbd_opt_go: transition: NEWSTYLE.OPT_GO.SEND -> DEAD libnbd: debug: nbdsh: nbd_opt_go: op...
static void rtl8139_timer(void *opaque) { RTL8139State *s = opaque; if (!s->clock_enabled) { DPRINTF(">>> timer: clock is not running\n"); return; } s->IntrStatus |= PCSTimeout; rtl8139_update_irq(s); rtl8139_set_next_tctr_time(s); }
0
[ "CWE-835" ]
qemu
5311fb805a4403bba024e83886fa0e7572265de4
137,794,204,198,699,400,000,000,000,000,000,000,000
14
rtl8139: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826...
ZEND_VM_HANDLER(133, ZEND_PRE_DEC_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, CACHE_SLOT) { ZEND_VM_DISPATCH_TO_HANDLER(ZEND_PRE_INC_OBJ); }
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
43,391,542,110,148,830,000,000,000,000,000,000,000
4
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
*/ static int avi_sync(AVFormatContext *s, int exit_early) { AVIContext *avi = s->priv_data; AVIOContext *pb = s->pb; int n; unsigned int d[8]; unsigned int size; int64_t i, sync; start_sync: memset(d, -1, sizeof(d)); for (i = sync = avio_tell(pb); !avio_feof(pb); i++) { int j;...
0
[ "CWE-200" ]
FFmpeg
a5d849b149ca67ced2d271dc84db0bc95a548abb
336,312,522,723,117,200,000,000,000,000,000,000,000
148
avformat/avidec: Limit formats in gab2 to srt and ass/ssa This prevents part of one exploit leading to an information leak Found-by: Emil Lerner and Pavel Cheremushkin Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static gboolean parse_cap_name(char *name, char **key, char **val) { const char *eq; g_return_val_if_fail(name != NULL, FALSE); g_return_val_if_fail(name[0] != '\0', FALSE); eq = strchr(name, '='); /* KEY only value */ if (eq == NULL) { *key = g_strdup(name); *val = NULL; /* Some values are in a KEY=VALUE ...
0
[ "CWE-416" ]
irssi
5a4e7ab659aba2855895c9f43e9a7a131f4e89b3
281,979,543,493,539,900,000,000,000,000,000,000,000
20
fix use after free receiving caps fixes GL#34
nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) { struct nfsd4_setattr *setattr = &u->setattr; __be32 status = nfs_ok; int err; if (setattr->sa_iattr.ia_valid & ATTR_SIZE) { status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, &setattr...
0
[ "CWE-476" ]
linux
01310bb7c9c98752cc763b36532fab028e0f8f81
7,063,832,452,480,590,000,000,000,000,000,000,000
42
nfsd: COPY and CLONE operations require the saved filehandle to be set Make sure we have a saved filehandle, otherwise we'll oops with a null pointer dereference in nfs4_preprocess_stateid_op(). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat....
PHP_FUNCTION(get_meta_tags) { char *filename; int filename_len; zend_bool use_include_path = 0; int in_tag = 0, done = 0; int looking_for_val = 0, have_name = 0, have_content = 0; int saw_name = 0, saw_content = 0; char *name = NULL, *value = NULL, *temp = NULL; php_meta_tags_token tok, tok_last; php_meta_tags...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
219,931,909,536,190,570,000,000,000,000,000,000,000
155
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static int sysrq_sysctl_handler(ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { int error; error = proc_dointvec(table, write, buffer, lenp, ppos); if (error) return error; if (write) sysrq_toggle_support(__sysrq_enabled); return 0; }
0
[ "CWE-284", "CWE-264" ]
linux
bfdc0b497faa82a0ba2f9dddcf109231dd519fcc
109,974,573,944,479,850,000,000,000,000,000,000,000
15
sysctl: restrict write access to dmesg_restrict When dmesg_restrict is set to 1 CAP_SYS_ADMIN is needed to read the kernel ring buffer. But a root user without CAP_SYS_ADMIN is able to reset dmesg_restrict to 0. This is an issue when e.g. LXC (Linux Containers) are used and complete user space is running without CA...
void extract_regularization() /*{\Xop converts |\Mvar| to its regularization. }*/ { CGAL_NEF_TRACEN("extract regularization"); extract_interior(); extract_closure(); }
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
21,896,121,078,785,040,000,000,000,000,000,000,000
6
Fix Nef_2 and Nef_S2 IO
static inline int first_pte_in_page(struct dma_pte *pte) { return !((unsigned long)pte & ~VTD_PAGE_MASK); }
0
[]
linux
fb58fdcd295b914ece1d829b24df00a17a9624bc
33,421,837,193,303,830,000,000,000,000,000,000,000
4
iommu/vt-d: Do not enable ATS for untrusted devices Currently Linux automatically enables ATS (Address Translation Service) for any device that supports it (and IOMMU is turned on). ATS is used to accelerate DMA access as the device can cache translations locally so there is no need to do full translation on IOMMU sid...
static struct vrend_linked_shader_program *lookup_cs_shader_program(struct vrend_context *ctx, GLuint cs_id) { struct vrend_linked_shader_program *ent; LIST_FOR_EACH_ENTRY(ent, &ctx->sub->programs, head) { if (!ent->ss[PIPE_SHADER_COMPUTE])...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
243,388,576,608,261,460,000,000,000,000,000,000,000
12
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
if (s_httpserv->ctx == NULL) { LogError(0, RS_RET_INTERNAL_ERROR, "Cannot start CivetWeb - mg_start failed.\n"); ABORT_FINALIZE(RS_RET_INTERNAL_ERROR); }
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
333,821,656,499,331,300,000,000,000,000,000,000,000
4
net bugfix: potential buffer overrun
static void wolfSSH_SFTP_buffer_c32toa(WS_SFTP_BUFFER* buffer, word32 value) { if (buffer != NULL) { c32toa(value, buffer->data + buffer->idx); buffer->idx += UINT32_SZ; } }
0
[ "CWE-190" ]
wolfssh
edb272e35ee57e7b89f3e127222c6981b6a1e730
93,016,173,717,309,160,000,000,000,000,000,000,000
8
ASAN SFTP Fixes When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766)
static int setup_lodev(const char *rootfs, int fd, struct loop_info64 *loinfo) { int rfd; int ret = -1; rfd = open(rootfs, O_RDWR); if (rfd < 0) { SYSERROR("failed to open '%s'", rootfs); return -1; } memset(loinfo, 0, sizeof(*loinfo)); loinfo->lo_flags = LO_FLAGS_AUTOCLEAR; if (ioctl(fd, LOOP_SET_FD, r...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
156,947,811,868,364,370,000,000,000,000,000,000,000
31
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...
_outJoinPathInfo(StringInfo str, const JoinPath *node) { _outPathInfo(str, (const Path *) node); WRITE_ENUM_FIELD(jointype, JoinType); WRITE_NODE_FIELD(outerjoinpath); WRITE_NODE_FIELD(innerjoinpath); WRITE_NODE_FIELD(joinrestrictinfo); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
215,787,760,089,738,400,000,000,000,000,000,000,000
9
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
cmsBool WriteMatrix(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsStage* mpe) { _cmsStageMatrixData* m = (_cmsStageMatrixData*) mpe -> Data; // Write the Matrix if (!_cmsWrite15Fixed16Number(io, m -> Double[0])) return FALSE; if (!_cmsWrite15Fixed16Number(io, m -> Double[1])) return FALSE...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
318,971,485,196,063,200,000,000,000,000,000,000,000
33
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
RGWOpType get_type() override { return RGW_OP_DELETE_LC; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
155,626,767,164,496,570,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *)) { struct ip_ra_chain *ra, *new_ra; struct ip_ra_chain __rcu **rap; struct net *net = sock_net(sk); if (sk->sk_type != SOCK_RAW || inet_sk(sk)->inet_num == IPPROTO_RAW) return -EINVAL; new_ra = on ? kmalloc(sizeof(*new_r...
0
[ "CWE-476" ]
net
425aa0e1d01513437668fa3d4a971168bbaa8515
101,162,507,376,109,540,000,000,000,000,000,000,000
56
ip_sockglue: Fix missing-check bug in ip_ra_control() In function ip_ra_control(), the pointer new_ra is allocated a memory space via kmalloc(). And it is used in the following codes. However, when there is a memory allocation error, kmalloc() fails. Thus null pointer dereference may happen. And it will cause the ker...
AP_DECLARE(int) ap_location_walk(request_rec *r) { ap_conf_vector_t *now_merged = NULL; core_server_config *sconf = ap_get_core_module_config(r->server->module_config); ap_conf_vector_t **sec_ent = (ap_conf_vector_t **)sconf->sec_url->elts; int num_sec = sconf->sec_url->nelts; walk_cache_t *...
0
[ "CWE-284", "CWE-264" ]
httpd
db81019ab88734ed35fa70294a0cfa7a19743f73
242,142,350,708,831,860,000,000,000,000,000,000,000
201
SECURITY: CVE-2015-3185 (cve.mitre.org) Replacement of ap_some_auth_required (unusable in Apache httpd 2.4) with new ap_some_authn_required and ap_force_authn hook. Submitted by: breser git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1684524 13f79535-47bb-0310-9956-ffa450edef68
ldap_pvt_tls_accept( Sockbuf *sb, void *ctx_arg ) { int err; tls_session *ssl = NULL; if ( HAS_TLS( sb )) { ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_SSL, (void *)&ssl ); } else { ssl = alloc_handle( ctx_arg, 1 ); if ( ssl == NULL ) return -1; #ifdef LDAP_DEBUG ber_sockbuf_add_io( sb, &ber_sockbuf_io_debug, ...
0
[ "CWE-843" ]
openldap
4bdfffd2889c0c5cdf58bebafbdc8fce4bb2bff0
313,854,892,750,418,450,000,000,000,000,000,000,000
46
ITS#9425 add more checks to ldap_X509dn2bv
static void rtreeLeafConstraint( RtreeConstraint *p, /* The constraint to test */ int eInt, /* True if RTree holds integer coordinates */ u8 *pCellData, /* Raw cell content as appears on disk */ int *peWithin /* Adjust downward, as appropriate */ ){ RtreeDValue...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
71,619,554,365,111,450,000,000,000,000,000,000,000
22
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
static void evtchn_fifo_set_pending(evtchn_port_t port) { event_word_t *word = event_word_from_port(port); sync_set_bit(EVTCHN_FIFO_BIT(PENDING, word), BM(word)); }
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
235,527,941,901,968,350,000,000,000,000,000,000,000
5
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
int cli_read_binary_rows(MYSQL_STMT *stmt) { ulong pkt_len; uchar *cp; MYSQL *mysql= stmt->mysql; MYSQL_DATA *result= &stmt->result; MYSQL_ROWS *cur, **prev_ptr= &result->data; NET *net; DBUG_ENTER("cli_read_binary_rows"); if (!mysql) { set_stmt_error(stmt, CR_SERVER_LOST, ...
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
273,757,860,843,336,350,000,000,000,000,000,000,000
53
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
static ut64 buf_get_size(RBuffer *b) { r_return_val_if_fail (b && b->methods, UT64_MAX); return b->methods->get_size? b->methods->get_size (b): UT64_MAX; }
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
29,845,920,990,790,630,000,000,000,000,000,000,000
4
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
static void nvme_mmio_write(void *opaque, hwaddr addr, uint64_t data, unsigned size) { NvmeCtrl *n = (NvmeCtrl *)opaque; trace_pci_nvme_mmio_write(addr, data, size); if (addr < sizeof(n->bar)) { nvme_write_bar(n, addr, data, size); } else { nvme_process_db(n...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
82,967,864,817,851,700,000,000,000,000,000,000,000
13
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
static int readStatusRid(struct airo_info *ai, StatusRid *statr, int lock) { return PC4500_readrid(ai, RID_STATUS, statr, sizeof(*statr), lock); }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
238,401,031,646,292,580,000,000,000,000,000,000,000
4
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
int credssp_write_ts_credentials(rdpCredssp* credssp, wStream* s) { int size = 0; int innerSize = credssp_sizeof_ts_credentials(credssp); /* TSCredentials (SEQUENCE) */ size += ber_write_sequence_tag(s, innerSize); /* [0] credType (INTEGER) */ size += ber_write_contextual_tag(s, 0, ber_sizeof_integer(1), TRUE);...
0
[ "CWE-476" ]
FreeRDP
0dc22d5a30a1c7d146b2a835b2032668127c33e9
169,411,430,005,152,430,000,000,000,000,000,000,000
22
Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically.
bool CClient::PutClient(const CMessage& Message) { if (!m_bAwayNotify && Message.GetType() == CMessage::Type::Away) { return false; } else if (!m_bAccountNotify && Message.GetType() == CMessage::Type::Account) { return false; } CMessage Msg(Message); const CIRCSock* ...
0
[ "CWE-476" ]
znc
2390ad111bde16a78c98ac44572090b33c3bd2d8
221,297,508,750,695,800,000,000,000,000,000,000,000
95
Fix null pointer dereference in echo-message The bug was introduced while fixing #1705. If a client did not enable echo-message, and doesn't have a network, it crashes. Thanks to LunarBNC for reporting this
countprompt(char *str, int *wp, int *hp, int overf) { int w = 0, h = 1, multi = 0, wcw = 0; int s = 1; #ifdef MULTIBYTE_SUPPORT char inchar; mbstate_t mbs; wchar_t wc; memset(&mbs, 0, sizeof(mbs)); #endif for (; *str; str++) { /* * Avoid double-incrementing the height when there's a new...
0
[ "CWE-476" ]
zsh
c187154f47697cdbf822c2f9d714d570ed4a0fd1
307,443,203,603,181,080,000,000,000,000,000,000,000
133
security/41: Don't perform PROMPT_SUBST evaluation on %F/%K arguments Mitigates CVE-2021-45444
njs_value_enumerate(njs_vm_t *vm, njs_value_t *value, njs_object_enum_t kind, njs_object_enum_type_t type, njs_bool_t all) { njs_int_t ret; njs_value_t keys; njs_object_value_t obj_val; njs_exotic_slots_t *slots; if (njs_is_object(value)) { if (kind == NJS_ENUM_KEYS ...
0
[]
njs
6549d49630ce5f5ac823fd3ae0c6c8558b8716ae
69,272,524,307,691,870,000,000,000,000,000,000,000
33
Fixed redefinition of special props in Object.defineProperty(). Previously, when NJS_PROPERTY_HANDLER property was updated it might be left in inconsistent state. Namely, prop->type was left unchanged, but prop->value did not have an expected property handler. As a result consecutive reference to the property may re...
inline void Quantize(int32_t multiplier, int32_t shift, int32_t total_size, int32_t output_zp, int32_t* scratch, uint8_t* output) { ruy::profiler::ScopeLabel label("Quantize/uint8"); int i = 0; const int32_t output_min = std::numeric_limits<uint8_t>::min(); const int32_t output_max = std::n...
0
[ "CWE-476", "CWE-369" ]
tensorflow
15691e456c7dc9bd6be203b09765b063bf4a380c
121,029,588,576,647,820,000,000,000,000,000,000,000
62
Prevent dereferencing of null pointers in TFLite's `add.cc`. PiperOrigin-RevId: 387244946 Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9
sdap_ad_tokengroups_update_members(TALLOC_CTX *mem_ctx, const char *username, struct sysdb_ctx *sysdb, struct sss_domain_info *domain, char **ldap_groups) { TALLOC_CTX *tmp_ctx...
0
[ "CWE-264" ]
sssd
191d7f7ce3de10d9e19eaa0a6ab3319bcd4ca95d
303,205,411,467,097,150,000,000,000,000,000,000,000
51
AD: process non-posix nested groups using tokenGroups When initgr is performed for AD supporting tokenGroups, do not skip non-posix groups. Resolves: https://fedorahosted.org/sssd/ticket/2343 Reviewed-by: Michal Židek <mzidek@redhat.com> (cherry picked from commit 4932db6258ccfb612a3a28eb6a618c2f042b9d58)
xfs_da3_node_read( struct xfs_trans *tp, struct xfs_inode *dp, xfs_dablk_t bno, xfs_daddr_t mappedbno, struct xfs_buf **bpp, int which_fork) { int err; err = xfs_da_read_buf(tp, dp, bno, mappedbno, bpp, which_fork, &xfs_da3_node_buf_ops); if (!err && tp) { struct xfs_da_blkinfo *info = (*bpp)->b...
0
[ "CWE-399" ]
linux
c88547a8119e3b581318ab65e9b72f27f23e641d
172,037,416,222,754,880,000,000,000,000,000,000,000
38
xfs: fix directory hash ordering bug Commit f5ea1100 ("xfs: add CRCs to dir2/da node blocks") introduced in 3.10 incorrectly converted the btree hash index array pointer in xfs_da3_fixhashpath(). It resulted in the the current hash always being compared against the first entry in the btree rather than the current bloc...
decodeJsonNotImplemented(void *dst, const UA_DataType *type, CtxJson *ctx, ParseCtx *parseCtx, UA_Boolean moveToken) { (void)dst, (void)type, (void)ctx, (void)parseCtx, (void)moveToken; return UA_STATUSCODE_BADNOTIMPLEMENTED; }
0
[ "CWE-703", "CWE-787" ]
open62541
c800e2987b10bb3af6ef644b515b5d6392f8861d
40,693,141,903,170,770,000,000,000,000,000,000,000
5
fix(json): Check max recursion depth in more places
std::ostream *ostream_file(std::string const &fname) { LOG_FS << "streaming " << fname << " for writing." << std::endl; return new std::ofstream(fname.c_str(), std::ios_base::binary); }
0
[ "CWE-200" ]
wesnoth
f8914468182e8d0a1551b430c0879ba236fe4d6d
25,053,848,557,828,414,000,000,000,000,000,000,000
5
Disallow inclusion of .pbl files from WML (bug #23504) Note that this will also cause Lua wesnoth.have_file() to return false on .pbl files.
static void pairing_nodes_front_back_split(FriBidiPairingNode *source, /* output */ FriBidiPairingNode **front, FriBidiPairingNode **back) { FriBidiPairingNode *pfast, *pslow; if (!source...
0
[ "CWE-120", "CWE-787" ]
fribidi
034c6e9a1d296286305f4cfd1e0072b879f52568
4,003,661,269,763,474,000,000,000,000,000,000,000
29
Truncate isolate_level to FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL
void mono_reflection_create_dynamic_method (MonoReflectionDynamicMethod *mb) { MonoReferenceQueue *queue; MonoMethod *handle; DynamicMethodReleaseData *release_data; ReflectionMethodBuilder rmb; MonoMethodSignature *sig; MonoClass *klass; GSList *l; int i; if (mono_runtime_is_shutting_down ()) mono_raise_e...
0
[ "CWE-399", "CWE-264" ]
mono
3f8ee42b8c867d9a4c18c22657840d072cca5c3a
255,966,797,965,126,300,000,000,000,000,000,000,000
106
Don't use finalization to cleanup dynamic methods. * reflection.c: Use a reference queue to cleanup dynamic methods instead of finalization. * runtime.c: Shutdown the dynamic method queue before runtime cleanup begins. * DynamicMethod.cs: No longer finalizable. * ical...
int create_symlink_lockfile(const char *filename, const char *pid_str) { return create_symlink_lockfile_at(AT_FDCWD, filename, pid_str); }
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
201,476,885,181,500,750,000,000,000,000,000,000,000
4
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
static void CloseEncoder( vlc_object_t *p_this ) { encoder_t *p_enc = (encoder_t *)p_this; encoder_sys_t *p_sys = p_enc->p_sys; /* Free the encoder resources */ if( p_sys->p_schro ) schro_encoder_free( p_sys->p_schro ); free( p_sys->p_format ); if( p_sys->p_dts_fifo ) block_Fi...
0
[ "CWE-120", "CWE-787" ]
vlc
9bb0353a5c63a7f8c6fc853faa3df4b4df1f5eb5
208,122,745,022,746,870,000,000,000,000,000,000,000
18
codec: schroedinger: fix potential buffer overflow. The variable len is a raw 32 bit value read using GetDWBE. If this value is larger than UINT32_MAX - sizeof(eos), this will cause an integer overflow in the subsequent call to malloc, and finally a buffer overflow when calling memcpy. We fix this by checking len acco...
GF_Box *diST_box_new() { ISOM_DECL_BOX_ALLOC(GF_DIMSScriptTypesBox, GF_ISOM_BOX_TYPE_DIST); return (GF_Box *)tmp; }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
199,854,251,746,879,650,000,000,000,000,000,000,000
5
fixed #1768
static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb, unsigned int dataoff, enum ip_conntrack_info ctinfo, u_int8_t pf, unsigned int hooknum, unsigned int *timeouts) { struct net *net = nf_ct_net(ct); enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); struct dccp_hdr _dh, *dh;...
0
[ "CWE-20" ]
linux
b22f5126a24b3b2f15448c3f2a254fc10cbc2b92
159,178,578,761,387,140,000,000,000,000,000,000,000
91
netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages Some occurences in the netfilter tree use skb_header_pointer() in the following way ... struct dccp_hdr _dh, *dh; ... skb_header_pointer(skb, dataoff, sizeof(_dh), &dh); ... where dh itself is a pointer that is being passed as the copy buffer. Ins...
int vb2_create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create) { unsigned requested_planes = 1; unsigned requested_sizes[VIDEO_MAX_PLANES]; struct v4l2_format *f = &create->format; int ret = vb2_verify_memory_type(q, create->memory, f->type); unsigned i; create->index = q->num_buffers; if (create-...
0
[ "CWE-119", "CWE-787" ]
linux
2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab
280,877,059,728,422,170,000,000,000,000,000,000,000
49
[media] videobuf2-v4l2: Verify planes array in buffer dequeueing When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer which will be dequeued is not known until the buffer has been removed from the queue. The number of planes is specific to a buffer, not to the queue. This does lead to the situat...
xsltText(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED, xmlNodePtr inst, xsltStylePreCompPtr comp ATTRIBUTE_UNUSED) { if ((inst->children != NULL) && (comp != NULL)) { xmlNodePtr text = inst->children; xmlNodePtr copy; while (text != NULL) { if ((text->type != XML_TEXT_NODE) && ...
0
[]
libxslt
937ba2a3eb42d288f53c8adc211bd1122869f0bf
54,079,235,543,757,840,000,000,000,000,000,000,000
26
Fix default template processing on namespace nodes
static ssize_t defrag_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count) { if (!memcmp("always", buf, min(sizeof("always")-1, count))) { clear_bit(TRANSPARENT_HUGEPAGE_DEFRAG_KSWAPD_FLAG, &transparent_hugepage_flags); clear_bit(TRANSPARENT_HUGEPAGE_DEFRAG_KS...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
253,663,877,417,104,700,000,000,000,000,000,000,000
39
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE...
builtin_round_impl(PyObject *module, PyObject *number, PyObject *ndigits) /*[clinic end generated code: output=ff0d9dd176c02ede input=854bc3a217530c3d]*/ { PyObject *round, *result; if (Py_TYPE(number)->tp_dict == NULL) { if (PyType_Ready(Py_TYPE(number)) < 0) return NULL; } round ...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
233,865,962,659,131,930,000,000,000,000,000,000,000
26
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static void virtio_blk_handle_write(VirtIOBlockReq *req, MultiReqBuffer *mrb) { BlockRequest *blkreq; uint64_t sector; sector = ldq_p(&req->out->sector); trace_virtio_blk_handle_write(req, sector, req->qiov.size / 512); if (sector & req->dev->sector_mask) { virtio_blk_rw_complete(req, -EI...
1
[ "CWE-119" ]
qemu-kvm
52c050236eaa4f0b5e1d160cd66dc18106445c4d
60,935,625,863,216,740,000,000,000,000,000,000,000
28
virtio-blk: fail unaligned requests Like all block drivers virtio-blk should not allow small than block size granularity access. But given that the protocol specifies a byte unit length field we currently accept such requests, which cause qemu to abort() in lower layers. Add checks to the main read and write handler...
HttpHealthCheckerImpl::HttpActiveHealthCheckSession::~HttpActiveHealthCheckSession() { ASSERT(client_ == nullptr); }
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
189,420,940,364,417,400,000,000,000,000,000,000,000
3
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>