func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
xmlParseEntityRef(xmlParserCtxtPtr ctxt) { const xmlChar *name; xmlEntityPtr ent = NULL; GROW; if (ctxt->instate == XML_PARSER_EOF) return(NULL); if (RAW != '&') return(NULL); NEXT; name = xmlParseName(ctxt); if (name == NULL) { xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIR...
0
[]
libxml2
be2a7edaf289c5da74a4f9ed3a0b6c733e775230
233,102,286,451,847,070,000,000,000,000,000,000,000
154
Fix for CVE-2014-3660 Issues related to the billion laugh entity expansion which happened to escape the initial set of fixes
void exit_creds(struct task_struct *tsk) { struct cred *cred; kdebug("exit_creds(%u,%p,%p,{%d,%d})", tsk->pid, tsk->real_cred, tsk->cred, atomic_read(&tsk->cred->usage), read_cred_subscribers(tsk->cred)); cred = (struct cred *) tsk->real_cred; tsk->real_cred = NULL; validate_creds(cred); alter_c...
1
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
53,911,689,431,677,350,000,000,000,000,000,000,000
20
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...
HTTPSession::updateWriteBufSize(int64_t delta) { // This is the sum of body bytes buffered within transactions_ and in // the sock_'s write buffer. delta += pendingWriteSizeDelta_; pendingWriteSizeDelta_ = 0; bool wasExceeded = egressLimitExceeded(); updatePendingWriteSize(delta); if (egressLimitExceeded...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
57,550,332,188,967,540,000,000,000,000,000,000,000
32
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
CURLUcode curl_url_set(CURLU *u, CURLUPart what, const char *part, unsigned int flags) { char **storep = NULL; long port = 0; bool urlencode = (flags & CURLU_URLENCODE)? 1 : 0; bool plusencode = FALSE; bool urlskipslash = FALSE; bool appendquery = FALSE; bool equalsencode = FALSE; ...
0
[]
curl
914aaab9153764ef8fa4178215b8ad89d3ac263a
88,939,971,916,910,750,000,000,000,000,000,000,000
250
urlapi: reject percent-decoding host name into separator bytes CVE-2022-27780 Reported-by: Axel Chong Bug: https://curl.se/docs/CVE-2022-27780.html Closes #8826
static double mp_isint(_cimg_math_parser& mp) { return (double)(cimg::mod(_mp_arg(2),1.)==0);
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
242,598,447,936,406,930,000,000,000,000,000,000,000
3
.
GF_Err gf_hinter_track_process(GF_RTPHinter *tkHint) { GF_Err e; u32 i, descIndex, duration; u64 ts; u8 PadBits; GF_Fraction ft; GF_ISOSample *samp; tkHint->HintSample = tkHint->RTPTime = 0; tkHint->TotalSample = gf_isom_get_sample_count(tkHint->file, tkHint->TrackNum); ft.num = tkHint->rtp_p->sl_config.time...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
99,378,589,640,604,840,000,000,000,000,000,000,000
120
fixed #1706
flatpak_dir_config_remove_pattern (FlatpakDir *self, const char *key, const char *pattern, GError **error) { g_autoptr(GPtrArray) patterns = flatpak_dir_get_config_patterns (self, key); g_autofree char *merge...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
278,047,323,434,824,600,000,000,000,000,000,000,000
25
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
static void elo_process_data(struct input_dev *input, const u8 *data, int size) { int press; input_report_abs(input, ABS_X, (data[3] << 8) | data[2]); input_report_abs(input, ABS_Y, (data[5] << 8) | data[4]); press = 0; if (data[1] & 0x80) press = (data[7] << 8) | data[6]; input_report_abs(input, ABS_PRESSURE...
0
[ "CWE-200", "CWE-401" ]
linux
817b8b9c5396d2b2d92311b46719aad5d3339dbe
125,180,111,504,940,570,000,000,000,000,000,000,000
22
HID: elo: fix memory leak in elo_probe When hid_parse() in elo_probe() fails, it forgets to call usb_put_dev to decrease the refcount. Fix this by adding usb_put_dev() in the error handling code of elo_probe(). Fixes: fbf42729d0e9 ("HID: elo: update the reference count of the usb device structure") Reported-by: syzk...
static bool name_is_device_color( char *cs_name ) { return( strcmp(cs_name, "DeviceGray") == 0 || strcmp(cs_name, "DeviceRGB") == 0 || strcmp(cs_name, "DeviceCMYK") == 0); }
0
[]
ghostpdl
b326a71659b7837d3acde954b18bda1a6f5e9498
89,477,886,814,210,170,000,000,000,000,000,000,000
8
Bug 699655: Properly check the return value.... ...when getting a value from a dictionary
bool RGWHandler_REST_S3Website::web_dir() const { std::string subdir_name = url_decode(s->object.name); if (subdir_name.empty()) { return false; } else if (subdir_name.back() == '/') { subdir_name.pop_back(); } rgw_obj obj(s->bucket, subdir_name); RGWObjectCtx& obj_ctx = *static_cast<RGWObjectCtx...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
182,904,646,277,010,660,000,000,000,000,000,000,000
24
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
print_digest_algo_note (digest_algo_t algo) { if(algo >= 100 && algo <= 110) { static int warn=0; if(!warn) { warn=1; es_fflush (es_stdout); log_info (_("WARNING: using experimental digest algorithm %s\n"), gcry_md_algo_name (algo)); } } else if(algo==DIGEST...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
268,948,725,754,365,850,000,000,000,000,000,000,000
20
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 ...
void __weak module_memfree(void *module_region) { /* * This memory may be RO, and freeing RO memory in an interrupt is not * supported by vmalloc. */ WARN_ON(in_interrupt()); vfree(module_region); }
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
318,658,137,843,322,400,000,000,000,000,000,000,000
9
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
static char *psutil_get_drive_type(int type) { switch (type) { case DRIVE_FIXED: return "fixed"; case DRIVE_CDROM: return "cdrom"; case DRIVE_REMOVABLE: return "removable"; case DRIVE_UNKNOWN: return "unknown"; case DRIVE_NO_ROO...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
110,933,753,337,310,660,000,000,000,000,000,000,000
20
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
static inline void skb_set_tail_pointer(struct sk_buff *skb, const int offset) { skb->tail = skb->data + offset;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
313,211,463,818,904,330,000,000,000,000,000,000,000
4
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler) { zval *arr = (zval *) arg; php_stream *s = SG(request_info).request_body; post_var_data_t post_data; if (s && SUCCESS == php_stream_rewind(s)) { memset(&post_data, 0, sizeof(post_data)); while (!php_stream_eof(s)) { char buf[SAPI_POST_HANDLER_BUFSIZ] =...
0
[ "CWE-400", "CWE-703" ]
php-src
0f8cf3b8497dc45c010c44ed9e96518e11e19fc3
174,010,425,588,122,300,000,000,000,000,000,000,000
35
Fix bug #73807
static int check_bpf_snprintf_call(struct bpf_verifier_env *env, struct bpf_reg_state *regs) { struct bpf_reg_state *fmt_reg = &regs[BPF_REG_3]; struct bpf_reg_state *data_len_reg = &regs[BPF_REG_5]; struct bpf_map *fmt_map = fmt_reg->map_ptr; int err, fmt_map_off, num_args; u64 fmt_addr; char *fmt; /* d...
0
[ "CWE-682" ]
linux
10bf4e83167cc68595b85fd73bb91e8f2c086e36
240,376,555,427,453,560,000,000,000,000,000,000,000
36
bpf: Fix propagation of 32 bit unsigned bounds from 64 bit bounds Similarly as b02709587ea3 ("bpf: Fix propagation of 32-bit signed bounds from 64-bit bounds."), we also need to fix the propagation of 32 bit unsigned bounds from 64 bit counterparts. That is, really only set the u32_{min,max}_value when /both/ {umin,um...
bool ConnectionManagerImpl::ActiveStreamFilterBase::commonHandleAfterHeadersCallback( FilterHeadersStatus status, bool& headers_only) { ASSERT(!headers_continued_); ASSERT(canIterate()); if (status == FilterHeadersStatus::StopIteration) { iteration_state_ = IterationState::StopSingleIteration; } else i...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
152,882,865,130,623,080,000,000,000,000,000,000,000
29
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static ssize_t oom_adj_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct task_struct *task = get_proc_task(file_inode(file)); char buffer[PROC_NUMBUF]; int oom_adj = OOM_ADJUST_MIN; size_t len; if (!task) return -ESRCH; if (task->signal->oom_score_adj == OOM_SCORE_ADJ_MAX) ...
0
[ "CWE-119" ]
linux
7f7ccc2ccc2e70c6054685f5e3522efa81556830
252,594,520,392,549,740,000,000,000,000,000,000,000
19
proc: do not access cmdline nor environ from file-backed areas proc_pid_cmdline_read() and environ_read() directly access the target process' VM to retrieve the command line and environment. If this process remaps these areas onto a file via mmap(), the requesting process may experience various issues such as extra de...
static int __init init_pipe_fs(void) { int err = register_filesystem(&pipe_fs_type); if (!err) { pipe_mnt = kern_mount(&pipe_fs_type); if (IS_ERR(pipe_mnt)) { err = PTR_ERR(pipe_mnt); unregister_filesystem(&pipe_fs_type); } } return err; }
0
[ "CWE-17" ]
linux
f0d1bec9d58d4c038d0ac958c9af82be6eb18045
132,708,078,715,506,230,000,000,000,000,000,000,000
13
new helper: copy_page_from_iter() parallel to copy_page_to_iter(). pipe_write() switched to it (and became ->write_iter()). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static int r_bin_file_object_add(RBinFile *binfile, RBinObject *o) { if (!o) { return false; } r_list_append (binfile->objs, o); r_bin_file_set_cur_binfile_obj (binfile->rbin, binfile, o); return true; }
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
1,289,441,139,451,320,500,000,000,000,000,000,000
8
Fix #8748 - Fix oobread on string search
cmsPipeline* DefaultICCintents(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], cmsBool BPC[], ...
1
[ "CWE-94" ]
Little-CMS
fefaaa43c382eee632ea3ad0cfa915335140e1db
159,388,555,409,343,010,000,000,000,000,000,000,000
123
Fix a double free on error recovering
interactive_getc(void) { int c; prepare_for_client_read(); c = getc(stdin); client_read_ended(); return c; }
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
299,628,418,130,844,120,000,000,000,000,000,000,000
9
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...
CURLcode Curl_http_body(struct Curl_easy *data, struct connectdata *conn, Curl_HttpReq httpreq, const char **tep) { CURLcode result = CURLE_OK; const char *ptr; struct HTTP *http = data->req.p.http; http->postsize = 0; switch(httpreq) { case HTTPREQ_POST_MIME: http->sendit = &da...
0
[]
curl
48d7064a49148f03942380967da739dcde1cdc24
307,045,002,500,276,500,000,000,000,000,000,000,000
88
cookie: apply limits - Send no more than 150 cookies per request - Cap the max length used for a cookie: header to 8K - Cap the max number of received Set-Cookie: headers to 50 Bug: https://curl.se/docs/CVE-2022-32205.html CVE-2022-32205 Reported-by: Harry Sintonen Closes #9048
int mbedtls_ssl_check_timer( mbedtls_ssl_context *ssl ) { if( ssl->f_get_timer == NULL ) return( 0 ); if( ssl->f_get_timer( ssl->p_timer ) == 2 ) { MBEDTLS_SSL_DEBUG_MSG( 3, ( "timer expired" ) ); return( -1 ); } return( 0 ); }
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
193,434,611,302,639,540,000,000,000,000,000,000,000
13
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
static int fdc_post_load(void *opaque, int version_id) { FDCtrl *s = opaque; SET_CUR_DRV(s, s->dor_vmstate & FD_DOR_SELMASK); s->dor = s->dor_vmstate & ~FD_DOR_SELMASK; if (s->phase == FD_PHASE_RECONSTRUCT) { s->phase = reconstruct_phase(s); } return 0; }
0
[ "CWE-787" ]
qemu
defac5e2fbddf8423a354ff0454283a2115e1367
208,727,116,062,524,800,000,000,000,000,000,000,000
13
hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507) Per the 82078 datasheet, if the end-of-track (EOT byte in the FIFO) is more than the number of sectors per side, the command is terminated unsuccessfully: * 5.2.5 DATA TRANSFER TERMINATION The 82078 supports terminal count explicitly through the TC pin a...
pkinit_init_certs(pkinit_identity_crypto_context ctx) { krb5_error_code retval = ENOMEM; int i; for (i = 0; i < MAX_CREDS_ALLOWED; i++) ctx->creds[i] = NULL; ctx->my_certs = NULL; ctx->cert_index = 0; ctx->my_key = NULL; ctx->trustedCAs = NULL; ctx->intermediateCAs = NULL; c...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
67,623,470,536,661,790,000,000,000,000,000,000,000
17
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 ...
read_message_bdat_smtp_wire(FILE *fout) { int ch; /* Remember that this message uses wireformat. */ DEBUG(D_receive) debug_printf("CHUNKING: writing spoolfile in wire format\n"); spool_file_wireformat = TRUE; for (;;) { if (chunking_data_left > 0) { unsigned len = MAX(chunking_data_left, thismessage_size...
0
[ "CWE-416" ]
exim
4e6ae6235c68de243b1c2419027472d7659aa2b4
287,848,317,999,532,170,000,000,000,000,000,000,000
40
Avoid release of store if there have been later allocations. Bug 2199
void LibRaw::setCancelFlag() { #ifdef WIN32 InterlockedExchange(&_exitflag,1); #else __sync_fetch_and_add(&_exitflag,1); #endif #ifdef RAWSPEED_FASTEXIT if(_rawspeed_decoder) { RawDecoder *d = static_cast<RawDecoder*>(_rawspeed_decoder); d->cancelProcessing(); } #endif }
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
321,675,127,633,925,100,000,000,000,000,000,000,000
15
fixed two more problems found by fuzzer
int ethtool_op_set_sg(struct net_device *dev, u32 data) { if (data) dev->features |= NETIF_F_SG; else dev->features &= ~NETIF_F_SG; return 0; }
0
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
100,184,902,977,304,570,000,000,000,000,000,000,000
9
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
xfrm_get_saddr(struct net *net, int oif, xfrm_address_t *local, xfrm_address_t *remote, unsigned short family) { int err; const struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); if (unlikely(afinfo == NULL)) return -EINVAL; err = afinfo->get_saddr(net, oif, local, remote); rcu_read_unl...
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
226,678,974,328,163,080,000,000,000,000,000,000,000
12
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
read_yin_when(struct lys_module *module, struct lyxml_elem *yin, struct unres_schema *unres) { struct ly_ctx *ctx = module->ctx; struct lys_when *retval = NULL; struct lyxml_elem *child, *next; const char *value; retval = calloc(1, sizeof *retval); LY_CHECK_ERR_RETURN(!retval, LOGMEM(ctx), NULL...
0
[ "CWE-252" ]
libyang
a3917d95d516e3de267d3cfa5d4d3715a90e8777
57,979,620,149,706,280,000,000,000,000,000,000,000
65
yin parser BUGFIX invalid memory access ... in case there were some unresolved extensions. Fixes #1454 Fixes #1455
int nfs4_update_server(struct nfs_server *server, const char *hostname, struct sockaddr *sap, size_t salen, struct net *net) { struct nfs_client *clp = server->nfs_client; struct rpc_clnt *clnt = server->client; struct xprt_create xargs = { .ident = clp->cl_proto, .net = net, .dstaddr = sap, .addr...
0
[ "CWE-703" ]
linux
dd99e9f98fbf423ff6d365b37a98e8879170f17c
316,528,436,453,746,500,000,000,000,000,000,000,000
47
NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Mich...
xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encoding) { if (ctxt == NULL) return(-1); if (encoding != NULL) { if (ctxt->encoding != NULL) xmlFree((xmlChar *) ctxt->encoding); ctxt->encoding = xmlStrdup((const xmlChar *) encoding); } if (options ...
0
[ "CWE-119" ]
libxml2
6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d
231,168,328,346,819,740,000,000,000,000,000,000,000
129
Fix potential out of bound access
static void tcf_block_unbind(struct tcf_block *block, struct flow_block_offload *bo) { struct flow_block_cb *block_cb, *next; lockdep_assert_held(&block->cb_lock); list_for_each_entry_safe(block_cb, next, &bo->cb_list, list) { tcf_block_playback_offloads(block, block_cb->cb, block_cb->cb_priv, f...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
328,571,511,575,918,300,000,000,000,000,000,000,000
18
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...
PosibErr<void> open_file_readlock(FStream & in, ParmString file) { RET_ON_ERR(in.open(file, "r")); #ifdef USE_FILE_LOCKS int fd = in.file_no(); struct flock fl; fl.l_type = F_RDLCK; fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; fcntl(fd, F_SETLKW, &fl); // ignore errors #...
0
[ "CWE-125" ]
aspell
80fa26c74279fced8d778351cff19d1d8f44fe4e
163,048,001,469,147,470,000,000,000,000,000,000,000
13
Fix various bugs found by OSS-Fuze.
static bool svm_xsaves_supported(void) { return false; }
0
[ "CWE-200", "CWE-399" ]
linux
cbdb967af3d54993f5814f1cee0ed311a055377d
265,898,666,196,584,630,000,000,000,000,000,000,000
4
KVM: svm: unconditionally intercept #DB This is needed to avoid the possibility that the guest triggers an infinite stream of #DB exceptions (CVE-2015-8104). VMX is not affected: because it does not save DR6 in the VMCS, it already intercepts #DB unconditionally. Reported-by: Jan Beulich <jbeulich@suse.com> Cc: stab...
void CLASS cielab (ushort rgb[3], short lab[3]) { int c, i, j, k; float r, xyz[3]; #ifdef LIBRAW_NOTHREADS static float cbrt[0x10000], xyz_cam[3][4]; #else #define cbrt tls->ahd_data.cbrt #define xyz_cam tls->ahd_data.xyz_cam #endif if (!rgb) { #ifndef LIBRAW_NOTHREADS if(cbrt[0] < -1.0f) #endif for (i...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
90,876,677,515,520,300,000,000,000,000,000,000,000
42
backported 0.15.4 datachecks
static int com_source(String *buffer __attribute__((unused)), char *line) { char source_name[FN_REFLEN], *end, *param; LINE_BUFFER *line_buff; int error; STATUS old_status; FILE *sql_file; /* Skip space from file name */ while (my_isspace(charset_info,*line)) line++; if (!(par...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
104,973,335,459,286,870,000,000,000,000,000,000,000
51
WL#9072: Backport WL#8785 to 5.5
static void dump_escape_string(FILE * trace, char *name) { u32 i, len = (u32) strlen(name); for (i=0; i<len; i++) { if (name[i]=='"') fprintf(trace, "&quot;"); else fputc(name[i], trace); } }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
172,565,719,259,768,850,000,000,000,000,000,000,000
8
fixed 2 possible heap overflows (inc. #1088)
static void encode_getfattr_open(struct xdr_stream *xdr, const u32 *bitmask, const u32 *open_bitmap, struct compound_hdr *hdr) { encode_getattr(xdr, open_bitmap, bitmask, 3, hdr); }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
133,101,073,192,433,240,000,000,000,000,000,000,000
6
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static int virtio_net_handle_vlan_table(VirtIONet *n, uint8_t cmd, struct iovec *iov, unsigned int iov_cnt) { VirtIODevice *vdev = VIRTIO_DEVICE(n); uint16_t vid; size_t s; NetClientState *nc = qemu_get_queue(n->nic); s = iov_to_buf(iov, iov_cnt, 0, &vid, siz...
0
[ "CWE-703" ]
qemu
abe300d9d894f7138e1af7c8e9c88c04bfe98b37
275,233,034,947,368,960,000,000,000,000,000,000,000
28
virtio-net: fix map leaking on error during receive Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") tries to fix the use after free of the sg by caching the virtqueue elements in an array and unmap them at once after receiving the packets, But it forgot to unmap the cached elements on error which ...
void rfc2231_decode_parameters (PARAMETER **headp) { PARAMETER *head = NULL; PARAMETER **last; PARAMETER *p, *q; struct rfc2231_parameter *conthead = NULL; struct rfc2231_parameter *conttmp; char *s, *t; char charset[STRING]; int encoded; int index; short dirty = 0; /* set to 1 when we may have c...
0
[]
mutt
3b6f6b829718ec8a7cf3eb6997d86e83e6c38567
123,163,267,178,905,680,000,000,000,000,000,000,000
100
Avoid undefined behavior on huge integer in a RFC 2231 header. The atoi() function was called on the index, which can potentially be huge in an invalid message and can yield undefined behavior. The mutt_atoi() function is now used for error detection.
static int imap_mbox_check(struct Mailbox *m) { imap_allow_reopen(m); int rc = imap_check_mailbox(m, false); /* NOTE - ctx might have been changed at this point. In particular, * m could be NULL. Beware. */ imap_disallow_reopen(m); return rc; }
0
[ "CWE-522", "CWE-287", "CWE-755" ]
neomutt
9c36717a3e2af1f2c1b7242035455ec8112b4b06
113,586,071,897,039,990,000,000,000,000,000,000,000
10
imap: close connection on all failures Thanks to Gabriel Salles-Loustau for spotting the problem. Co-authored-by: Kevin McCarthy <kevin@8t8.us>
rb_buffer_peek(struct ring_buffer_per_cpu *cpu_buffer, u64 *ts, unsigned long *lost_events) { struct ring_buffer_event *event; struct buffer_page *reader; int nr_loops = 0; if (ts) *ts = 0; again: /* * We repeat when a time extend is encountered. * Since the time extend is always attached to a data...
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
100,532,571,315,280,510,000,000,000,000,000,000,000
70
tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_...
may_adjust_color_count(int val) { if (val != t_colors) { // Nr of colors changed, initialize highlighting and // redraw everything. This causes a redraw, which usually // clears the message. Try keeping the message if it // might work. set_keep_msg_from_hist(); set_color_count(val); init_highlight(TRUE...
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
253,417,799,408,447,100,000,000,000,000,000,000,000
22
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait) { unsigned int mask = datagram_poll(file, sock, wait); struct sock *sk = sock->sk; int is_lite = IS_UDPLITE(sk); /* Check for false positives due to checksum errors */ if ( (mask & POLLRDNORM) && !(file->f_flags & O_NONBLOCK) &...
0
[]
linux-2.6
32c1da70810017a98aa6c431a5494a302b6b9a30
314,247,862,468,881,000,000,000,000,000,000,000,000
30
[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>
FindAffixes(AffixNode *node, const char *word, int wrdlen, int *level, int type) { AffixNodeData *StopLow, *StopHigh, *StopMiddle; uint8 symbol; if (node->isvoid) { /* search void affixes */ if (node->data->naff) return node->data; node = node->data->node; } while (node && *level < wrdl...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
65,928,892,856,166,895,000,000,000,000,000,000,000
41
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
NTSTATUS tstream_tls_params_server(TALLOC_CTX *mem_ctx, const char *dns_host_name, bool enabled, const char *key_file, const char *cert_file, const char *ca_file, const char *crl_file, const char *dhp_file, struct tstream_tls_params **_tlsp) { struct tstream_tls_...
0
[]
samba
22af043d2f20760f27150d7d469c7c7b944c6b55
250,842,549,061,191,350,000,000,000,000,000,000,000
150
CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file (key.pem) If the tls key is not owned by root or has not mode 0600 samba will not start up. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@s...
static int btrfs_free_dev_extent(struct btrfs_trans_handle *trans, struct btrfs_device *device, u64 start, u64 *dev_extent_len) { struct btrfs_fs_info *fs_info = device->fs_info; struct btrfs_root *root = fs_info->dev_root; int ret; struct btrfs_path *path; struct btrfs_key key; struct btrfs_key found_k...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
32,708,183,819,004,140,000,000,000,000,000,000,000
58
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
R_API void r_bin_java_print_constant_value_attr_summary(RBinJavaAttrInfo *attr) { if (!attr) { eprintf ("Attempting to print an invalid RBinJavaAttrInfo *ConstantValue.\n"); return; } Eprintf ("Constant Value Attribute Information:\n"); Eprintf (" Attribute Offset: 0x%08"PFMT64x "\n", attr->file_offset); Epri...
0
[ "CWE-787" ]
radare2
9650e3c352f675687bf6c6f65ff2c4a3d0e288fa
259,672,593,599,596,930,000,000,000,000,000,000,000
11
Fix oobread segfault in java arith8.class ##crash * Reported by Cen Zhang via huntr.dev
int RGWInitMultipart::verify_permission() { if (s->iam_policy) { auto e = s->iam_policy->eval(s->env, *s->auth.identity, rgw::IAM::s3PutObject, rgw_obj(s->bucket, s->object)); if (e == Effect::Allow) { return 0; } else if (e == Effect::Deny) { return -EACCES; } } if (!verify...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
320,902,098,358,019,270,000,000,000,000,000,000,000
19
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 <...
explicit FormatInt(unsigned value) : str_(format_decimal(value)) {}
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
48,619,091,138,554,590,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
compare_method_imap (const void *key, const void *elem) { const char* method_name = (const char*)&icall_names_str + (*(guint16*)elem); return strcmp (key, method_name); }
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
48,306,227,131,511,320,000,000,000,000,000,000,000
5
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
plperl_call_perl_func(plperl_proc_desc *desc, FunctionCallInfo fcinfo) { dSP; SV *retval; int i; int count; ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(sp, desc->nargs); for (i = 0; i < desc->nargs; i++) { if (fcinfo->argnull[i]) PUSHs(&PL_sv_undef); else if (desc->arg_is_rowtype[i]) { SV ...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
74,603,415,615,081,020,000,000,000,000,000,000,000
76
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
TEST_P(DownstreamProtocolIntegrationTest, TestPreconnect) { config_helper_.addConfigModifier([](envoy::config::bootstrap::v3::Bootstrap& bootstrap) { auto* cluster = bootstrap.mutable_static_resources()->mutable_clusters(0); cluster->mutable_preconnect_policy()->mutable_per_upstream_preconnect_ratio()->set_va...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
241,028,045,853,658,830,000,000,000,000,000,000,000
20
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
static void packet_mm_open(struct vm_area_struct *vma) { struct file *file = vma->vm_file; struct socket *sock = file->private_data; struct sock *sk = sock->sk; if (sk) atomic_inc(&pkt_sk(sk)->mapped); }
0
[ "CWE-909" ]
linux-2.6
67286640f638f5ad41a946b9a3dc75327950248f
144,058,101,357,193,670,000,000,000,000,000,000,000
9
net: packet: fix information leak to userland packet_getname_spkt() doesn't initialize all members of sa_data field of sockaddr struct if strlen(dev->name) < 13. This structure is then copied to userland. It leads to leaking of contents of kernel stack memory. We have to fully fill sa_data with strncpy() instead of ...
static OPJ_BOOL opj_j2k_setup_header_writing(opj_j2k_t *p_j2k, opj_event_mgr_t * p_manager) { /* preconditions */ assert(p_j2k != 00); assert(p_manager != 00); if (! opj_procedure_list_add_procedure(p_j2k->m_procedure_list, (opj_procedure)opj_j2k_init_...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
60,254,898,787,925,500,000,000,000,000,000,000,000
89
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
static pj_status_t encode_empty_attr(const void *a, pj_uint8_t *buf, unsigned len, const pj_stun_msg_hdr *msghdr, unsigned *printed) { const pj_stun_empty_attr *ca = (pj_stun_empty_attr*)a; PJ_UNUSED_ARG(msghdr); if (len < ATTR_HDR_LEN) return PJ_ETOOSMALL; PUTVAL16H(bu...
0
[ "CWE-191" ]
pjproject
15663e3f37091069b8c98a7fce680dc04bc8e865
240,019,409,779,165,770,000,000,000,000,000,000,000
20
Merge pull request from GHSA-2qpg-f6wf-w984
size_t ad_getentryoff(const struct adouble *ad, int eid) { return ad->ad_eid[eid].ade_off; }
0
[ "CWE-787" ]
samba
0e2b3fb982d1f53d111e10d9197ed2ec2e13712c
42,767,733,014,264,880,000,000,000,000,000,000,000
4
CVE-2021-44142: libadouble: harden parsing code BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
snd_pcm_stream_group_ref(struct snd_pcm_substream *substream) { bool nonatomic = substream->pcm->nonatomic; struct snd_pcm_group *group; bool trylock; for (;;) { if (!snd_pcm_stream_linked(substream)) return NULL; group = substream->group; /* block freeing the group object */ refcount_inc(&group->refs);...
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
138,701,631,677,056,980,000,000,000,000,000,000,000
31
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
int parse_CColumnGroupArray(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...) { proto_tree *tree; proto_item *item; va_list ap; const char *txt; guint32 count, i; va_start(ap, fmt); txt = wmem_strdup_vprintf(wmem_packet_scope(), fmt, ap); va_end(ap); tree = proto...
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
14,221,946,267,364,672,000,000,000,000,000,000,000
26
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
static int nfs4_xdr_enc_setattr(struct rpc_rqst *req, __be32 *p, struct nfs_setattrargs *args) { struct xdr_stream xdr; struct compound_hdr hdr = { .nops = 3, }; int status; xdr_init_encode(&xdr, &req->rq_snd_buf, p); encode_compound_hdr(&xdr, &hdr); ...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
237,294,653,073,251,060,000,000,000,000,000,000,000
21
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
void WebContents::DecrementCapturerCount(gin_helper::Arguments* args) { bool stay_hidden = false; // get stayHidden arguments if they exist args->GetNext(&stay_hidden); web_contents()->DecrementCapturerCount(stay_hidden); }
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
286,620,990,850,998,700,000,000,000,000,000,000,000
8
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
getdecchrs(void) { long_u nr = 0; int c; int i; for (i = 0; ; ++i) { c = regparse[0]; if (c < '0' || c > '9') break; nr *= 10; nr += c - '0'; ++regparse; curchr = -1; // no longer valid } if (i == 0) return -1; return (long)nr; }
0
[ "CWE-416" ]
vim
4c13e5e6763c6eb36a343a2b8235ea227202e952
197,235,835,451,121,260,000,000,000,000,000,000,000
21
patch 8.2.3949: using freed memory with /\%V Problem: Using freed memory with /\%V. Solution: Get the line again after getvvcol().
static void node_remove_accesses(struct node *node) { struct node_access_nodes *c, *cnext; list_for_each_entry_safe(c, cnext, &node->access_list, list_node) { list_del(&c->list_node); device_unregister(&c->dev); } }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
157,930,658,993,132,180,000,000,000,000,000,000,000
9
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
int xt_check_table_hooks(const struct xt_table_info *info, unsigned int valid_hooks) { const char *err = "unsorted underflow"; unsigned int i, max_uflow, max_entry; bool check_hooks = false; BUILD_BUG_ON(ARRAY_SIZE(info->hook_entry) != ARRAY_SIZE(info->underflow)); max_entry = 0; max_uflow = 0; for (i = 0; i ...
0
[]
linux
175e476b8cdf2a4de7432583b49c871345e4f8a1
186,714,575,984,964,930,000,000,000,000,000,000,000
47
netfilter: x_tables: Use correct memory barriers. When a new table value was assigned, it was followed by a write memory barrier. This ensured that all writes before this point would complete before any writes after this point. However, to determine whether the rules are unused, the sequence counter is read. To ensure...
ves_icall_System_Threading_Events_CloseEvent_internal (HANDLE handle) { MONO_ARCH_SAVE_REGS; CloseHandle (handle); }
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
221,185,532,006,666,860,000,000,000,000,000,000,000
5
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
msnprintf( char * buf, size_t bufsiz, const char * fmt, ... ) { va_list ap; size_t rc; va_start(ap, fmt); rc = mvsnprintf(buf, bufsiz, fmt, ap); va_end(ap); return rc; }
0
[ "CWE-835" ]
ntp
bb928ef08eec020ef6008f3a140702ccc0536b8e
295,506,024,453,932,200,000,000,000,000,000,000,000
16
[TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same
zcurrenttextknockout(i_ctx_t *i_ctx_p) { os_ptr op = osp; push(1); make_bool(op, gs_currenttextknockout(igs)); return 0; }
0
[ "CWE-704" ]
ghostpdl
548bb434e81dadcc9f71adf891a3ef5bea8e2b4e
279,714,561,682,398,720,000,000,000,000,000,000,000
8
PS interpreter - add some type checking These were 'probably' safe anyway, since they mostly treat the objects as integers without checking, which at least can't result in a crash. Nevertheless, we ought to check. The return from comparedictkeys could be wrong if one of the keys had a value which was not an array, i...
xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt, xmlSchemaTypePtr type) { xmlSchemaTypePtr baseType = type->baseType; xmlChar *str = NULL; /* STATE: error funcs converted. */ /* * Schema Component Constraint: Simple Type Definition Properties Correct * * NOTE: This is someh...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
143,372,721,190,960,550,000,000,000,000,000,000,000
89
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 copy_files(unsigned long clone_flags, struct task_struct *tsk) { struct files_struct *oldf, *newf; int error = 0; /* * A background process may not have any files ... */ oldf = current->files; if (!oldf) goto out; if (clone_flags & CLONE_FILES) { atomic_inc(&oldf->count); goto out; } new...
0
[ "CWE-416", "CWE-703" ]
linux
2b7e8665b4ff51c034c55df3cff76518d1a9ee3a
28,013,377,613,571,670,000,000,000,000,000,000,000
26
fork: fix incorrect fput of ->exe_file causing use-after-free Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new erro...
void lsetCommand(client *c) { robj *o = lookupKeyWriteOrReply(c,c->argv[1],shared.nokeyerr); if (o == NULL || checkType(c,o,OBJ_LIST)) return; long index; robj *value = c->argv[3]; if ((getLongFromObjectOrReply(c, c->argv[2], &index, NULL) != C_OK)) return; if (o->encoding == OBJ_ENCOD...
1
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
337,462,189,578,650,300,000,000,000,000,000,000,000
25
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 int storageConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED) { return 1; }
0
[]
libvirt
447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87
164,136,038,456,390,730,000,000,000,000,000,000,000
4
storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath 'virStoragePoolObjListSearch' returns a locked and refed object, thus we must release it on ACL permission failure. Fixes: 7aa0e8c0cb8 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318 Signed-off-by: Peter Krempa <pkrempa@redhat.co...
void TABLE_LIST::print(THD *thd, table_map eliminated_tables, String *str, enum_query_type query_type) { if (nested_join) { str->append('('); print_join(thd, eliminated_tables, str, &nested_join->join_list, query_type); str->append(')'); } else if (jtbm_subselect) { if ...
0
[ "CWE-89" ]
server
5ba77222e9fe7af8ff403816b5338b18b342053c
212,009,088,107,155,300,000,000,000,000,000,000,000
137
MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view if the view has algorithm=temptable it is not updatable, so DEFAULT() for its fields is meaningless, and thus it's NULL or 0/'' for NOT NULL columns.
drill_parse_T_code(gerb_file_t *fd, drill_state_t *state, gerbv_image_t *image, ssize_t file_line) { int tool_num; gboolean done = FALSE; int temp; double size; gerbv_drill_stats_t *stats = image->drill_stats; gerbv_aperture_t *apert; gchar *tmps; gchar *string; dprintf("---> ent...
1
[ "CWE-787" ]
gerbv
672214abb47a802fc000125996e6e0a46c623a4e
112,903,329,744,372,600,000,000,000,000,000,000,000
233
Add test to demonstrate buffer overrun
static int get_options(int *argc, char ***argv) { int ho_error; if (*argc == 1) { usage(); exit(0); } my_getopt_use_args_separator= TRUE; if ((ho_error= load_defaults("my", load_default_groups, argc, argv)) || (ho_error=handle_options(argc, argv, my_long_options, get_one_option))) exit(h...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
231,791,522,841,906,940,000,000,000,000,000,000,000
72
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static void store_irk(struct btd_adapter *adapter, const bdaddr_t *peer, uint8_t bdaddr_type, const unsigned char *key) { char device_addr[18]; char filename[PATH_MAX]; GKeyFile *key_file; char *store_data; char str[33]; size_t length = 0; int i; ba2str(peer, device_addr); snprintf(filename, PATH_MAX, ST...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
274,120,895,621,971,030,000,000,000,000,000,000,000
31
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static void fuse_retrieve_end(struct fuse_conn *fc, struct fuse_req *req) { release_pages(req->pages, req->num_pages); }
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
324,542,562,474,302,600,000,000,000,000,000,000,000
4
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
reexec_in_user_namespace_wait (int pid, int options) { pid_t p; int status; p = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)); if (p < 0) return -1; if (WIFEXITED (status)) return WEXITSTATUS (status); if (WIFSIGNALED (status)) return 128 + WTERMSIG (status); return -1; }
0
[]
libpod
d400f0b5b2d68c4148a7c173e7fbbfd9b377a660
205,324,524,304,058,700,000,000,000,000,000,000,000
15
rootless: fix segfault when open fd >= FD_SETSIZE if there are more than FD_SETSIZE open fds passed down to the Podman process, the initialization code could crash as it attempts to store them into a fd_set. Use an array of fd_set structs, each of them holding only FD_SETSIZE file descriptors. Signed-off-by: Giusepp...
static bool io_kill_timeouts(struct io_ring_ctx *ctx, struct task_struct *tsk, struct files_struct *files) { struct io_kiocb *req, *tmp; int canceled = 0; spin_lock_irq(&ctx->completion_lock); list_for_each_entry_safe(req, tmp, &ctx->timeout_list, timeout.list) { if (io_match_task(req, tsk, files)) { ...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
107,457,227,321,676,520,000,000,000,000,000,000,000
16
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
static inline void l2cap_state_change_and_error(struct l2cap_chan *chan, int state, int err) { chan->state = state; chan->ops->state_change(chan, chan->state, err); }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
87,484,841,557,505,860,000,000,000,000,000,000,000
6
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...
inline size_t ReducedOutputOffset(const int num_dims, const int* dims, const int* index, const int num_axis, const int* axis) { if (num_dims == 0) { return 0; } TFLITE_DCHECK(dims != nullptr); TFLITE_DCHECK(index != nullptr); size_t offse...
0
[ "CWE-125", "CWE-787" ]
tensorflow
8ee24e7949a203d234489f9da2c5bf45a7d5157d
22,720,827,580,861,310,000,000,000,000,000,000,000
27
[tflite] Ensure `MatchingDim` does not allow buffer overflow. We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ...
u8 ath6kl_wmi_determine_user_priority(u8 *pkt, u32 layer2_pri) { struct iphdr *ip_hdr = (struct iphdr *) pkt; u8 ip_pri; /* * Determine IPTOS priority * * IP-TOS - 8bits * : DSCP(6-bits) ECN(2-bits) * : DSCP - P2 P1 P0 X X X * where (P2 P1 P0) form 802.1D */ ip_pri = ip_hdr->tos >> ...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
273,674,522,667,875,500,000,000,000,000,000,000,000
21
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
int crypt_set_data_offset(struct crypt_device *cd, uint64_t data_offset) { if (!cd) return -EINVAL; if (data_offset % (MAX_SECTOR_SIZE >> SECTOR_SHIFT)) { log_err(cd, _("Data offset is not multiple of %u bytes."), MAX_SECTOR_SIZE); return -EINVAL; } cd->data_offset = data_offset; log_dbg(cd, "Data offset se...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
337,475,867,576,331,100,000,000,000,000,000,000,000
14
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) { struct vcpu_svm *svm = to_svm(vcpu); #ifdef CONFIG_X86_64 if (vcpu->arch.efer & EFER_LME) { if (!is_paging(vcpu) && (cr0 & X86_CR0_PG)) { vcpu->arch.efer |= EFER_LMA; svm->vmcb->save.efer |= EFER_LMA | EFER_LME; } if (is_paging(vcpu) &&...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
152,841,346,834,112,600,000,000,000,000,000,000,000
33
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...
int do_show(FILE *stream, const char *path_p, const struct stat *st, acl_t acl, acl_t dacl) { struct name_list *acl_names = get_list(st, acl), *first_acl_name = acl_names; struct name_list *dacl_names = get_list(st, dacl), *first_dacl_name = dacl_names; int acl_names...
0
[]
acl
63451a06b7484d220750ed8574d3ee84e156daf5
148,979,610,646,046,170,000,000,000,000,000,000,000
87
Make sure that getfacl -R only calls stat(2) on symlinks when it needs to This fixes http://oss.sgi.com/bugzilla/show_bug.cgi?id=790 "getfacl follows symlinks, even without -L".
httpLocalRequest(ObjectPtr object, int method, int from, int to, HTTPRequestPtr requestor, void *closure) { if(object->requestor == NULL) object->requestor = requestor; if(!disableLocalInterface && urlIsSpecial(object->key, object->key_size)) return httpSpecialRequest(object, m...
0
[ "CWE-617" ]
polipo
0e2b44af619e46e365971ea52b97457bc0778cd3
103,354,406,527,151,680,000,000,000,000,000,000,000
28
Try to read POST requests to local configuration interface correctly.
PosibErr<void> Convert::init_norm_to(const Config & c, ParmStr in, ParmStr out) { String norm_form = c.retrieve("norm-form"); if ((!c.retrieve_bool("normalize") || norm_form == "none") && !c.retrieve_bool("norm-required")) return init(c,in,out); if (norm_form == "none" && c.retrieve_bool("...
0
[ "CWE-125" ]
aspell
de29341638833ba7717bd6b5e6850998454b044b
160,900,272,220,046,920,000,000,000,000,000,000,000
29
Don't allow null-terminated UCS-2/4 strings using the original API. Detect if the encoding is UCS-2/4 and the length is -1 in affected API functions and refuse to convert the string. If the string ends up being converted somehow, abort with an error message in DecodeDirect and ConvDirect. To convert a null terminate...
static int decode_locku(struct xdr_stream *xdr, struct nfs_locku_res *res) { __be32 *p; int status; status = decode_op_hdr(xdr, OP_LOCKU); if (status != -EIO) nfs_increment_lock_seqid(status, res->seqid); if (status == 0) { READ_BUF(NFS4_STATEID_SIZE); COPYMEM(res->stateid.data, NFS4_STATEID_SIZE); } retu...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
55,428,662,353,788,840,000,000,000,000,000,000,000
14
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static CURLcode hsts_pull(struct Curl_easy *data, struct hsts *h) { /* if the HSTS read callback is set, use it */ if(data->set.hsts_read) { CURLSTScode sc; DEBUGASSERT(h); do { char buffer[MAX_HSTS_HOSTLEN + 1]; struct curl_hstsentry e; e.name = buffer; e.namelen = sizeof(buffer...
0
[]
curl
fae6fea209a2d4db1582f608bd8cc8000721733a
270,234,893,250,522,660,000,000,000,000,000,000,000
38
hsts: ignore trailing dots when comparing hosts names CVE-2022-30115 Reported-by: Axel Chong Bug: https://curl.se/docs/CVE-2022-30115.html Closes #8821
bracketed_paste(paste_mode_T mode, int drop, garray_T *gap) { int c; char_u buf[NUMBUFLEN + MB_MAXBYTES]; int idx = 0; char_u *end = find_termcode((char_u *)"PE"); int ret_char = -1; int save_allow_keys = allow_keys; int save_paste = p_paste; // If the end code is too long we can't...
1
[ "CWE-122", "CWE-787" ]
vim
806d037671e133bd28a7864248763f643967973a
254,669,502,955,167,600,000,000,000,000,000,000,000
96
patch 8.2.4218: illegal memory access with bracketed paste in Ex mode Problem: Illegal memory access with bracketed paste in Ex mode. Solution: Reserve space for the trailing NUL.
alloc_free_clump(clump_t * cp, gs_ref_memory_t * mem) { gs_memory_t *parent = mem->non_gc_memory; byte *cdata = (byte *)cp->chead; ulong csize = (byte *)cp->cend - cdata; alloc_unlink_clump(cp, mem); mem->allocated -= st_clump.ssize; if (mem->cfreed.cp == cp) mem->cfreed.cp = 0; if ...
0
[ "CWE-190" ]
ghostpdl
cfde94be1d4286bc47633c6e6eaf4e659bd78066
315,583,272,103,765,430,000,000,000,000,000,000,000
19
Bug 697985: bounds check the array allocations methods The clump allocator has four allocation functions that use 'number of elements' and 'size of elements' parameters (rather than a simple 'number of bytes'). Those need specific bounds checking.
static int on_fcn_delete (RAnal *_anal, void* _user, RAnalFunction *fcn) { RCore *core = (RCore*)_user; const char *cmd = r_config_get (core->config, "cmd.fcn.delete"); if (cmd && *cmd) { ut64 oaddr = core->offset; ut64 addr = fcn->addr; r_core_seek (core, addr, 1); r_core_cmd0 (core, cmd); r_core_seek (co...
0
[ "CWE-415", "CWE-703" ]
radare2
cb8b683758edddae2d2f62e8e63a738c39f92683
281,843,144,130,837,620,000,000,000,000,000,000,000
12
Fix #16303 - c->table_query double free (#16318)
cifs_sync_mid_result(struct mid_q_entry *mid, struct TCP_Server_Info *server) { int rc = 0; cFYI(1, "%s: cmd=%d mid=%llu state=%d", __func__, le16_to_cpu(mid->command), mid->mid, mid->mid_state); spin_lock(&GlobalMid_Lock); switch (mid->mid_state) { case MID_RESPONSE_RECEIVED: spin_unlock(&GlobalMid_Lock...
0
[ "CWE-362" ]
linux
ea702b80e0bbb2448e201472127288beb82ca2fe
27,841,985,122,826,427,000,000,000,000,000,000,000
32
cifs: move check for NULL socket into smb_send_rqst Cai reported this oops: [90701.616664] BUG: unable to handle kernel NULL pointer dereference at 0000000000000028 [90701.625438] IP: [<ffffffff814a343e>] kernel_setsockopt+0x2e/0x60 [90701.632167] PGD fea319067 PUD 103fda4067 PMD 0 [90701.637255] Oops: 0000 [#1] SMP ...
static void qeth_check_outbound_queue(struct qeth_qdio_out_q *queue) { int index; int flush_cnt = 0; int q_was_packing = 0; /* * check if weed have to switch to non-packing mode or if * we have to get a pci flag out on the queue */ if ((atomic_read(&queue->used_buffers) <= QETH_LOW_WATERMARK_PACK) || !...
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
90,764,526,753,879,450,000,000,000,000,000,000,000
39
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
static int kvm_vm_ioctl_get_pit(struct kvm *kvm, struct kvm_pit_state *ps) { int r = 0; memcpy(ps, &kvm->arch.vpit->pit_state, sizeof(struct kvm_pit_state)); return r; }
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
81,269,471,559,339,290,000,000,000,000,000,000,000
7
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
XML_GetErrorCode(XML_Parser parser) { return errorCode; }
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
256,605,997,451,954,040,000,000,000,000,000,000,000
4
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
static inline struct ucma_context *_ucma_find_context(int id, struct ucma_file *file) { struct ucma_context *ctx; ctx = idr_find(&ctx_idr, id); if (!ctx) ctx = ERR_PTR(-ENOENT); else if (ctx->file != file) ctx = ERR_PTR(-EINVAL); return ctx; }
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
261,237,508,373,173,870,000,000,000,000,000,000,000
12
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
static int map_vdso(const struct vdso_image *image, bool calculate_addr) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; unsigned long addr, text_start; int ret = 0; static struct page *no_pages[] = {NULL}; static struct vm_special_mapping vvar_mapping = { .name = "[vvar]", .pages = no_pages...
0
[]
linux
394f56fe480140877304d342dec46d50dc823d46
262,147,911,809,404,200,000,000,000,000,000,000,000
87
x86_64, vdso: Fix the vdso address randomization algorithm The theory behind vdso randomization is that it's mapped at a random offset above the top of the stack. To avoid wasting a page of memory for an extra page table, the vdso isn't supposed to extend past the lowest PMD into which it can fit. Other than that, t...
static void jpeg2000_dec_cleanup(Jpeg2000DecoderContext *s) { int tileno, compno; for (tileno = 0; tileno < s->numXtiles * s->numYtiles; tileno++) { if (s->tile[tileno].comp) { for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = s->tile[tileno]...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
9a271a9368eaabf99e6c2046103acb33957e63b7
153,580,574,984,432,580,000,000,000,000,000,000,000
17
jpeg2000: check log2_cblk dimensions Fixes out of array access Fixes Ticket2895 Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>