func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static ssize_t show_delegatable_files(struct cftype *files, char *buf, ssize_t size, const char *prefix) { struct cftype *cft; ssize_t ret = 0; for (cft = files; cft && cft->name[0] != '\0'; cft++) { if (!(cft->flags & CFTYPE_NS_DELEGATABLE)) continue; if ((cft->flags & CFTYPE_PRESSURE) && !cgroup...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
159,519,160,059,761,250,000,000,000,000,000,000,000
24
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
static void io_poll_task_func(struct callback_head *cb) { struct io_kiocb *req = container_of(cb, struct io_kiocb, task_work); struct io_ring_ctx *ctx = req->ctx; struct io_kiocb *nxt; if (io_poll_rewait(req, &req->poll)) { spin_unlock_irq(&ctx->completion_lock); } else { hash_del(&req->hash_node); io_poll...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
191,794,475,736,012,280,000,000,000,000,000,000,000
21
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 int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc) { if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && !st->codecpar->sample_rate && sc->time_scale > 1) st->codecpar->sample_rate = sc->time_scale; /* spec...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
9cb4eb772839c5e1de2855d126bf74ff16d13382
258,546,434,217,674,380,000,000,000,000,000,000,000
77
avformat/mov: Fix DoS in read_tfra() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void nfs4_xdr_enc_reclaim_complete(struct rpc_rqst *req, struct xdr_stream *xdr, const void *data) { const struct nfs41_reclaim_complete_args *args = data; struct compound_hdr hdr = { .minorversion = nfs4_xdr_minorversion(&args->seq_args) }; encode_compound_hdr(xdr, req, &hdr); encode_seque...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
152,950,129,089,163,300,000,000,000,000,000,000,000
14
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...
unsigned_time_secs_to_str(wmem_allocator_t *scope, const guint32 time_val) { wmem_strbuf_t *buf; if (time_val == 0) { return wmem_strdup(scope, "0 seconds"); } buf = wmem_strbuf_sized_new(scope, TIME_SECS_LEN+1, TIME_SECS_LEN+1); unsigned_time_secs_to_str_buf(time_val, 0, FALSE, buf); return wmem_strbuf_fin...
0
[ "CWE-125" ]
wireshark
d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1
326,534,929,469,845,800,000,000,000,000,000,000,000
14
epan: Limit our bits in decode_bits_in_field. Limit the number of bits we process in decode_bits_in_field, otherwise we'll overrun our buffer. Fixes #16958.
static inline void print_dropped_signal(int sig) { static DEFINE_RATELIMIT_STATE(ratelimit_state, 5 * HZ, 10); if (!print_fatal_signals) return; if (!__ratelimit(&ratelimit_state)) return; pr_info("%s/%d: reached RLIMIT_SIGPENDING, dropped signal %d\n", current->comm, current->pid, sig); }
0
[ "CWE-119", "CWE-787" ]
linux
4ea77014af0d6205b05503d1c7aac6eace11d473
265,617,753,055,157,930,000,000,000,000,000,000,000
13
kernel/signal.c: avoid undefined behaviour in kill_something_info When running kill(72057458746458112, 0) in userspace I hit the following issue. UBSAN: Undefined behaviour in kernel/signal.c:1462:11 negation of -2147483648 cannot be represented in type 'int': CPU: 226 PID: 9849 Comm: test Tainted: G B ...
njs_vmcode_await(njs_vm_t *vm, njs_vmcode_await_t *await) { size_t size; njs_int_t ret; njs_frame_t *frame; njs_value_t ctor, val, on_fulfilled, on_rejected, *value; njs_promise_t *promise; njs_function_t *fulfilled, *rejected; njs_async_ctx_...
1
[ "CWE-843", "CWE-269" ]
njs
6a40a85ff239497c6458c7dbef18f6a2736fe992
198,982,947,472,627,750,000,000,000,000,000,000,000
96
Fixed type confusion bug while resolving promises. Previously, the internal function njs_promise_perform_then() which implements PerformPromiseThen() expects its first argument to always be a promise instance. This assertion might be invalid because the functions corresponding to Promise.prototype.then() and Promise....
proto_tree_set_system_id(field_info *fi, const guint8* value_ptr, gint length) { GByteArray *bytes; DISSECTOR_ASSERT(value_ptr != NULL || length == 0); bytes = g_byte_array_new(); if (length > 0) { g_byte_array_append(bytes, value_ptr, length); } fvalue_set_byte_array(&fi->value, bytes); }
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
14,125,635,759,749,508,000,000,000,000,000,000,000
12
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
TEST_F(QueryPlannerTest, NegatedRangeIntGT) { addIndex(BSON("i" << 1)); runQuery(fromjson("{i: {$not: {$gt: 5}}}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{fetch: {filter: null, node: {ixscan: {pattern: {i:1}, " "bounds: {i: [['Min...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
306,130,653,680,980,340,000,000,000,000,000,000,000
11
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, Key *host_key, int readonly, char **user_hostfiles, u_int num_user_hostfiles, char **system_hostfiles, u_int num_system_hostfiles) { HostStatus host_status; HostStatus ip_status; Key *raw_key = NULL; char *ip = NULL, *host = NULL; ...
0
[ "CWE-20" ]
openssh-portable
7d6a9fb660c808882d064e152d6070ffc3844c3f
231,432,782,110,287,050,000,000,000,000,000,000,000
414
- djm@cvs.openbsd.org 2014/04/01 03:34:10 [sshconnect.c] When using VerifyHostKeyDNS with a DNSSEC resolver, down-convert any certificate keys to plain keys and attempt SSHFP resolution. Prevents a server from skipping SSHFP lookup and forcing a new-hostkey dialog by offering only certificate ...
static int parseAssert ( Operation *op, SlapReply *rs, LDAPControl *ctrl ) { BerElement *ber; struct berval fstr = BER_BVNULL; if ( op->o_assert != SLAP_CONTROL_NONE ) { rs->sr_text = "assert control specified multiple times"; return LDAP_PROTOCOL_ERROR; } if ( BER_BVISNULL( &ctrl->ldctl_value )) { rs->...
0
[ "CWE-125" ]
openldap
21981053a1195ae1555e23df4d9ac68d34ede9dd
274,276,017,796,050,670,000,000,000,000,000,000,000
62
ITS#9408 fix vrfilter double-free
std::string get_binary_dir_location(const std::string &type, const std::string &filename) { DBG_FS << "Looking for '" << filename << "'.\n"; if (filename.empty()) { LOG_FS << " invalid filename (type: " << type <<")\n"; return std::string(); } if (filename.find("..") != std::string::npos) { ERR_FS << "Ille...
0
[ "CWE-200" ]
wesnoth
af61f9fdd15cd439da9e2fe5fa39d174c923eaae
73,143,512,752,327,570,000,000,000,000,000,000,000
27
fs: Use game data path to resolve ./ in the absence of a current_dir Fixes a file content disclosure bug (#22042) affecting functionality relying on the get_wml_location() function and not passing a non-empty value for the current_dir parameter. See <https://gna.org/bugs/?22042> for details. This is a candidate for ...
rtadv_terminate (struct zebra_vrf *zvrf) { rtadv_event (zvrf, RTADV_STOP, 0); if (zvrf->rtadv.sock >= 0) { close (zvrf->rtadv.sock); zvrf->rtadv.sock = -1; } zvrf->rtadv.adv_if_count = 0; zvrf->rtadv.adv_msec_if_count = 0; }
0
[ "CWE-119", "CWE-787" ]
quagga
cfb1fae25f8c092e0d17073eaf7bd428ce1cd546
171,810,904,591,170,250,000,000,000,000,000,000,000
13
zebra: stack overrun in IPv6 RA receive code (CVE-2016-1245) The IPv6 RA code also receives ICMPv6 RS and RA messages. Unfortunately, by bad coding practice, the buffer size specified on receiving such messages mixed up 2 constants that in fact have different values. The code itself has: #define RTADV_MSG_SIZE 4096 ...
static void wcd9335_codec_apply_sido_voltage(struct wcd9335_codec *wcd, enum wcd9335_sido_voltage req_mv) { struct snd_soc_component *comp = wcd->component; int vout_d_val; if (req_mv == wcd->sido_voltage) return; /* compute the vout_d step value */ vout_d_val = WCD9335_CALCULATE_VOUT_D(req_mv) & ...
0
[]
sound
a54988113985ca22e414e132054f234fc8a92604
290,502,354,538,051,980,000,000,000,000,000,000,000
24
wcd9335: fix a incorrect use of kstrndup() In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup(). However, according to doc: "Note: Use kmemdup_nul() instead if the size is known exactly." So we should use kmemdup_nul() here instead of kstrndup(). Signed-off-by: Gen Zhang <blackgod016574@gmail.com> ...
inline cimg_uint64 toc() { return cimg::tictoc(false); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
25,539,979,160,233,070,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
Expression_Obj Parser::parse_factor() { NESTING_GUARD(nestings); lex < css_comments >(false); if (lex_css< exactly<'('> >()) { // parse_map may return a list Expression_Obj value = parse_map(); // lex the expected closing parenthesis if (!lex_css< exactly<')'> >()) error("unclose...
0
[ "CWE-674" ]
libsass
f2db04883e5fff4e03777dcc1eb60d4373c45be1
62,098,239,651,217,130,000,000,000,000,000,000,000
82
Make `parse_css_variable_value` non-recursive Fixes #2658 stack overflow
transchar(int c) { return transchar_buf(curbuf, c); }
0
[ "CWE-125", "CWE-787" ]
vim
94f3192b03ed27474db80b4d3a409e107140738b
99,481,723,871,357,620,000,000,000,000,000,000,000
4
patch 8.2.3950: going beyond the end of the line with /\%V Problem: Going beyond the end of the line with /\%V. Solution: Check for valid column in getvcol().
NTSTATUS ldap_full_packet(void *private_data, DATA_BLOB blob, size_t *packet_size) { if (blob.length < 6) { /* * We need at least 6 bytes to workout the length * of the pdu. */ return STATUS_MORE_ENTRIES; } return asn1_peek_full_tag(blob, ASN1_SEQUENCE(0), packet_size); }
0
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
236,415,693,388,297,450,000,000,000,000,000,000,000
11
CVE-2015-7540: s4: libcli: ldap message - Ensure all asn1_XX returns are checked. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): F...
ConnStateData::receivedFirstByte() { if (receivedFirstByte_) return; receivedFirstByte_ = true; resetReadTimeout(Config.Timeout.request); }
0
[ "CWE-116" ]
squid
7024fb734a59409889e53df2257b3fc817809fb4
141,013,042,947,700,120,000,000,000,000,000,000,000
8
Handle more Range requests (#790) Also removed some effectively unused code.
mm_sshpam_init_ctx(Authctxt *authctxt) { Buffer m; int success; debug3("%s", __func__); buffer_init(&m); mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_INIT_CTX, &m); debug3("%s: waiting for MONITOR_ANS_PAM_INIT_CTX", __func__); mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_INIT_CTX, &m); ...
0
[ "CWE-20", "CWE-200" ]
openssh-portable
d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
305,190,042,510,467,950,000,000,000,000,000,000,000
19
Don't resend username to PAM; it already has it. Pointed out by Moritz Jodeit; ok dtucker@
static int DoPamAuth(struct pam_handle* pamh, const char* username, std::string& authenticated_username) { int err = pam_set_item(pamh, PAM_RUSER, username); if (err != PAM_SUCCESS) { Dmsg1(debuglevel, "PAM set_item failed: %s\n", pam_strerror(pamh, err)); return er...
0
[ "CWE-284" ]
bareos
abe462037388635193f3b5b71575f32596c3b69d
161,093,192,015,925,200,000,000,000,000,000,000,000
38
dir: check account authorization during PAM login Fixes CVE-2022-24755 Previously, when a user logged in via PAM, Bareos did only check for authentication (i.e. the "auth" section in PAM). No authorization checks were made (the "account" section in PAM). This patch now adds the proper check. This will break existing ...
void uwsgi_string_del_list(struct uwsgi_string_list **list, struct uwsgi_string_list *item) { struct uwsgi_string_list *uwsgi_string = *list, *old_uwsgi_string = NULL; while (uwsgi_string) { if (uwsgi_string == item) { // parent instance ? if (old_uwsgi_string == NULL) { *list = uwsgi_string->next; }...
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
215,284,222,344,617,380,000,000,000,000,000,000,000
23
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
UTI_PathToDir(const char *path) { char *dir, *slash; slash = strrchr(path, '/'); if (!slash) return Strdup("."); if (slash == path) return Strdup("/"); dir = Malloc(slash - path + 1); snprintf(dir, slash - path + 1, "%s", path); return dir; }
0
[ "CWE-59" ]
chrony
7a4c396bba8f92a3ee8018620983529152050c74
224,995,793,323,875,120,000,000,000,000,000,000,000
17
util: add functions for common file operations Add a function to open a file for reading, writing, or appending. In uppercase modes errors are handled as fatal, i.e. the caller doesn't need to check for NULL. To avoid string manipulations in the callers, the function accepts an optional directory and suffix. New files...
int mutt_socket_poll(struct Connection *conn, time_t wait_secs) { if (conn->bufpos < conn->available) return conn->available - conn->bufpos; if (conn->poll) return conn->poll(conn, wait_secs); return -1; }
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
216,988,063,231,382,400,000,000,000,000,000,000,000
10
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
static u32 ext4_xattr_inode_get_hash(struct inode *ea_inode) { return (u32)ea_inode->i_atime.tv_sec; }
0
[]
linux
54dd0e0a1b255f115f8647fc6fb93273251b01b9
138,313,357,253,151,030,000,000,000,000,000,000,000
4
ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.or...
LJ_NOINLINE void lj_err_caller(lua_State *L, ErrMsg em) { lj_err_callermsg(L, err2msg(em)); }
0
[ "CWE-125" ]
LuaJIT
53f82e6e2e858a0a62fd1a2ff47e9866693382e6
221,447,061,817,743,300,000,000,000,000,000,000,000
4
Fix frame traversal for __gc handler frames. Reported by Changochen.
rsvg_css_parse_overflow (const char *str, gboolean * inherit) { SETINHERIT (); if (!strcmp (str, "visible") || !strcmp (str, "auto")) return 1; if (!strcmp (str, "hidden") || !strcmp (str, "scroll")) return 0; UNSETINHERIT (); return 0; }
0
[ "CWE-20" ]
librsvg
d83e426fff3f6d0fa6042d0930fb70357db24125
142,882,825,872,693,310,000,000,000,000,000,000,000
10
io: Use XML_PARSE_NONET We don't want to load resources off the net. Bug #691708.
gnutls_x509_crt_get_signature(gnutls_x509_crt_t cert, char *sig, size_t * sig_size) { gnutls_datum_t dsig = {NULL, 0}; int ret; if (cert == NULL) return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); ret = _gnutls_x509_get_signature(cert->cert, "signature", &dsig); if (ret < 0) return gnutls_assert_va...
0
[ "CWE-295" ]
gnutls
6e76e9b9fa845b76b0b9a45f05f4b54a052578ff
84,516,113,661,137,370,000,000,000,000,000,000,000
24
on certificate import check whether the two signature algorithms match
add_nickname_list_to_smartlist(smartlist_t *sl, const char *list, int must_be_running) { routerinfo_t *router; smartlist_t *nickname_list; int have_dir_info = router_have_minimum_dir_info(); if (!list) return; /* nothing to do */ tor_assert(sl); nickname_list = smartlist...
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
269,446,726,177,894,500,000,000,000,000,000,000,000
41
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
ClearToEOS() { register int y = curr->w_y, x = curr->w_x; if (x == 0 && y == 0) { ClearScreen(); RestorePosRendition(); return; } LClearArea(&curr->w_layer, x, y, cols - 1, rows - 1, CURR_BCE, 1); MClearArea(curr, x, y, cols - 1, rows - 1, CURR_BCE); RestorePosRendition(); }
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
310,427,791,443,731,720,000,000,000,000,000,000,000
14
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
static void FVMenuKPCloseup(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); int i; for ( i=0; i<fv->b.map->enccount; ++i ) if ( fv->b.selected[i] ) break; KernPairD(fv->b.sf,i==fv->b.map->enccount?NULL: fv->b.map->map[i]==-1?NU...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
161,798,706,571,251,810,000,000,000,000,000,000,000
12
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, sigset_t *oldset, struct pt_regs * regs) { int ret; /* Set up the stack frame */ if (ka->sa.sa_flags & SA_SIGINFO) ret = setup_rt_frame(sig, ka, info, oldset, regs); else ret = setup_frame(sig, ka, oldset, regs); if (ka->sa.sa_flags ...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
9,880,576,971,623,618,000,000,000,000,000,000,000
25
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...
static bool change_security(struct bt_att_chan *chan, uint8_t ecode) { int security; if (chan->sec_level != BT_ATT_SECURITY_AUTO) return false; security = bt_att_chan_get_security(chan); if (ecode == BT_ATT_ERROR_INSUFFICIENT_ENCRYPTION && security < BT_ATT_SECURITY_MEDIUM) { security = BT_ATT_SECURITY_...
0
[ "CWE-415" ]
bluez
1cd644db8c23a2f530ddb93cebed7dacc5f5721a
213,605,395,594,990,900,000,000,000,000,000,000,000
27
shared/att: Fix possible crash on disconnect If there are pending request while disconnecting they would be notified but clients may endup being freed in the proccess which will then be calling bt_att_cancel to cancal its requests causing the following trace: Invalid read of size 4 at 0x1D894C: enable_ccc_callback...
static inline void ieee80211_rx_stats(struct net_device *dev, u32 len) { struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats); u64_stats_update_begin(&tstats->syncp); tstats->rx_packets++; tstats->rx_bytes += len; u64_stats_update_end(&tstats->syncp); }
0
[]
linux
588f7d39b3592a36fb7702ae3b8bdd9be4621e2f
6,522,548,697,787,364,000,000,000,000,000,000,000
9
mac80211: drop robust management frames from unknown TA When receiving a robust management frame, drop it if we don't have rx->sta since then we don't have a security association and thus couldn't possibly validate the frame. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
static int mb86a20s_tune(struct dvb_frontend *fe, bool re_tune, unsigned int mode_flags, unsigned int *delay, enum fe_status *status) { struct mb86a20s_state *state = fe->demodulator_priv; int rc = 0; dev_dbg(&state->i2c->dev, "%s called.\n", __func__); if (re_tune) rc = mb86a20s_set_frontend(fe); ...
0
[ "CWE-119" ]
media_tree
eca2d34b9d2ce70165a50510659838e28ca22742
184,787,701,852,803,500,000,000,000,000,000,000,000
19
[media] mb86a20s: apply mask to val after checking for read failure Appling the mask 0x0f to the immediate return of the call to mb86a20s_readreg will always result in a positive value, meaning that the check of ret < 0 will never work. Instead, check for a -ve return value first, and then mask val with 0x0f. Kudos ...
rl_show_char (c) int c; { int n = 1; if (META_CHAR (c) && (_rl_output_meta_chars == 0)) { fprintf (rl_outstream, "M-"); n += 2; c = UNMETA (c); } #if defined (DISPLAY_TABS) if ((CTRL_CHAR (c) && c != '\t') || c == RUBOUT) #else if (CTRL_CHAR (c) || c == RUBOUT) #endif /* !DISPLAY...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
160,663,428,716,941,300,000,000,000,000,000,000,000
26
bash-4.4-rc2 release
static int mixer_ctl_selector_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct usb_mixer_elem_info *cval = kcontrol->private_data; int val, oval, err; err = get_cur_ctl_value(cval, cval->control << 8, &oval); if (err < 0) return filter_error(cval, err); val = ucontrol->valu...
0
[ "CWE-416", "CWE-787" ]
linux
124751d5e63c823092060074bd0abaae61aaa9c4
280,864,213,399,899,850,000,000,000,000,000,000,000
17
ALSA: usb-audio: Kill stray URB at exiting USB-audio driver may leave a stray URB for the mixer interrupt when it exits by some error during probe. This leads to a use-after-free error as spotted by syzkaller like: ================================================================== BUG: KASAN: use-after-free in sn...
static int hns_gmac_get_regs_count(void) { return ETH_GMAC_DUMP_NUM; }
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
194,967,000,761,223,120,000,000,000,000,000,000,000
4
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...
struct net_device *dn_dev_get_default(void) { struct net_device *dev; spin_lock(&dndev_lock); dev = decnet_default_device; if (dev) { if (dev->dn_ptr) dev_hold(dev); else dev = NULL; } spin_unlock(&dndev_lock); return dev; }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
263,042,111,385,323,040,000,000,000,000,000,000,000
16
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
int SSL_clear(SSL *s) { if (s->method == NULL) { SSLerr(SSL_F_SSL_CLEAR,SSL_R_NO_METHOD_SPECIFIED); return(0); } if (ssl_clear_bad_session(s)) { SSL_SESSION_free(s->session); s->session=NULL; } s->error=0; s->hit=0; s->shutdown=0; #if 0 /* Disabled since version 1.10 of this file (early return...
0
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
157,875,526,184,098,500,000,000,000,000,000,000,000
69
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static int tcp_v6_md5_hash_pseudoheader(struct tcp_md5sig_pool *hp, const struct in6_addr *daddr, const struct in6_addr *saddr, int nbytes) { struct tcp6_pseudohdr *bp; struct scatterlist sg; bp = &hp->md5_blk.ip6; /* 1. TCP pseudo-header (RFC2460) */ bp->saddr = *saddr; bp->daddr = *daddr; bp->protoc...
0
[]
linux
1d2f7b2d956e242179aaf4a08f3545f99c81f9a3
215,807,950,302,759,140,000,000,000,000,000,000,000
18
net: ipv6: tcp reset, icmp need to consider L3 domain Responses for packets to unused ports are getting lost with L3 domains. IPv4 has ip_send_unicast_reply for sending TCP responses which accounts for L3 domains; update the IPv6 counterpart tcp_v6_send_response. For icmp the L3 master check needs to be moved up in i...
join_read_prev(READ_RECORD *info) { int error; if ((error= info->table->file->ha_index_prev(info->record))) return report_error(info->table, error); return 0; }
0
[ "CWE-89" ]
server
5ba77222e9fe7af8ff403816b5338b18b342053c
121,952,368,614,976,090,000,000,000,000,000,000,000
7
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.
static char *addr_to_string(const char *format, struct sockaddr_storage *sa, socklen_t salen) { char *addr; char host[NI_MAXHOST]; char serv[NI_MAXSERV]; int err; size_t addrlen; if ((err = getnameinfo((struct sockaddr *)sa, salen, ...
0
[ "CWE-125" ]
qemu
bea60dd7679364493a0d7f5b54316c767cf894ef
298,264,409,364,832,350,000,000,000,000,000,000,000
27
ui/vnc: fix potential memory corruption issues this patch makes the VNC server work correctly if the server surface and the guest surface have different sizes. Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of VNC_DIRTY_PIXELS...
void ZRtp::synchEnter() { callback->synchEnter(); }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
270,547,008,557,317,630,000,000,000,000,000,000,000
3
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
void maybeAllocTrailers() override { ASSERT(processing_trailers_); if (!absl::holds_alternative<ResponseTrailerMapPtr>(headers_or_trailers_)) { headers_or_trailers_.emplace<ResponseTrailerMapPtr>(ResponseTrailerMapImpl::create()); } }
1
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
223,777,481,564,437,740,000,000,000,000,000,000,000
6
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static int exec_permission_lite(struct inode *inode, struct nameidata *nd) { umode_t mode = inode->i_mode; if (inode->i_op && inode->i_op->permission) return -EAGAIN; if (current->fsuid == inode->i_uid) mode >>= 6; else if (in_group_p(inode->i_gid)) mode >>= 3; if (mode & MAY_EXEC) goto ok; ...
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
178,888,354,633,360,940,000,000,000,000,000,000,000
29
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
extern void onig_add_end_call(void (*func)(void)) { OnigEndCallListItemType* item; item = (OnigEndCallListItemType* )xmalloc(sizeof(*item)); if (item == 0) return ; item->next = EndCallTop; item->func = func; EndCallTop = item; }
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
237,464,670,775,556,420,000,000,000,000,000,000,000
12
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
copy_callback(callback_T *dest, callback_T *src) { dest->cb_partial = src->cb_partial; if (dest->cb_partial != NULL) { dest->cb_name = src->cb_name; dest->cb_free_name = FALSE; ++dest->cb_partial->pt_refcount; } else { dest->cb_name = vim_strsave(src->cb_name); dest->cb_free_name = TRUE; f...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
150,891,240,248,670,920,000,000,000,000,000,000,000
16
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
void lj_debug_addloc(lua_State *L, const char *msg, cTValue *frame, cTValue *nextframe) { if (frame) { GCfunc *fn = frame_func(frame); if (isluafunc(fn)) { BCLine line = debug_frameline(L, fn, nextframe); if (line >= 0) { char buf[LUA_IDSIZE]; lj_debug_shortname(buf, proto_chunkname(funcp...
0
[ "CWE-125" ]
LuaJIT
e296f56b825c688c3530a981dc6b495d972f3d01
112,114,269,542,622,970,000,000,000,000,000,000,000
17
Call error function on rethrow after trace exit.
int csync_unlink(const char *filename, int ign) { struct stat st; int rc; if ( lstat_strict(prefixsubst(filename), &st) != 0 ) return 0; if ( ign==2 && S_ISREG(st.st_mode) ) return 0; rc = S_ISDIR(st.st_mode) ? rmdir(prefixsubst(filename)) : unlink(prefixsubst(filename)); if ( rc && !ign ) cmd_error = strerror(...
0
[ "CWE-703" ]
csync2
416f1de878ef97e27e27508914f7ba8599a0be22
214,845,084,672,192,680,000,000,000,000,000,000,000
12
fail HELLO command when SSL is required
static void test_multi_stmt() { MYSQL_STMT *stmt, *stmt1, *stmt2; int rc; uint32 id; char name[50]; MYSQL_BIND my_bind[2]; ulong length[2]; my_bool is_null[2]; myheader("test_multi_stmt"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_multi_table"); myquery(rc);...
0
[ "CWE-416" ]
server
eef21014898d61e77890359d6546d4985d829ef6
288,953,816,082,493,500,000,000,000,000,000,000,000
128
MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left...
static inline int gso_pskb_expand_head(struct sk_buff *skb, int extra) { int new_headroom, headroom; int ret; headroom = skb_headroom(skb); ret = pskb_expand_head(skb, extra, 0, GFP_ATOMIC); if (ret) return ret; new_headroom = skb_headroom(skb); SKB_GSO_CB(skb)->mac_offset += (new_headroom - headroom); ret...
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
30,360,390,001,436,230,000,000,000,000,000,000,000
14
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...
static struct snd_seq_client *seq_create_client1(int client_index, int poolsize) { unsigned long flags; int c; struct snd_seq_client *client; /* init client data */ client = kzalloc(sizeof(*client), GFP_KERNEL); if (client == NULL) return NULL; client->pool = snd_seq_pool_new(poolsize); if (client->pool == N...
0
[ "CWE-362" ]
linux
b3defb791b26ea0683a93a4f49c77ec45ec96f10
57,392,137,419,599,020,000,000,000,000,000,000,000
46
ALSA: seq: Make ioctls race-free The ALSA sequencer ioctls have no protection against racy calls while the concurrent operations may lead to interfere with each other. As reported recently, for example, the concurrent calls of setting client pool with a combination of write calls may lead to either the unkillable dea...
file_printable(char *buf, size_t bufsiz, const char *str) { char *ptr, *eptr; const unsigned char *s = (const unsigned char *)str; for (ptr = buf, eptr = ptr + bufsiz - 1; ptr < eptr && *s; s++) { if (isprint(*s)) { *ptr++ = *s; continue; } if (ptr >= eptr - 3) break; *ptr++ = '\\'; *ptr++ = ((CA...
1
[ "CWE-787" ]
file
d65781527c8134a1202b2649695d48d5701ac60b
22,611,302,145,665,493,000,000,000,000,000,000,000
20
PR/62: spinpx: limit size of file_printable.
static void vhost_init_is_le(struct vhost_virtqueue *vq) { vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || virtio_legacy_is_little_endian(); }
0
[ "CWE-120" ]
linux
060423bfdee3f8bc6e2c1bac97de24d5415e2bc4
19,900,566,027,921,624,000,000,000,000,000,000,000
5
vhost: make sure log_num < in_num The code assumes log_num < in_num everywhere, and that is true as long as in_num is incremented by descriptor iov count, and log_num by 1. However this breaks if there's a zero sized descriptor. As a result, if a malicious guest creates a vring desc with desc.len = 0, it may cause th...
static void pv_eoi_clr_pending(struct kvm_vcpu *vcpu) { if (pv_eoi_put_user(vcpu, KVM_PV_EOI_DISABLED) < 0) { printk(KERN_WARNING "Can't clear EOI MSR value: 0x%llx\n", (unsigned long long)vcpu->arch.pv_eoi.msr_val); return; } __clear_bit(KVM_APIC_PV_EOI_PENDING, &vcpu->arch.apic_attention); }
0
[ "CWE-703", "CWE-459" ]
linux
f7d8a19f9a056a05c5c509fa65af472a322abfee
6,838,007,169,083,940,000,000,000,000,000,000,000
9
Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET" Revert a change to open code bits of kvm_lapic_set_base() when emulating APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base and apic_hw_disabled being unsyncrhonized when the APIC is created. If kvm_arch_vcpu_crea...
xmlRelaxNGNewMemParserCtxt(const char *buffer, int size) { xmlRelaxNGParserCtxtPtr ret; if ((buffer == NULL) || (size <= 0)) return (NULL); ret = (xmlRelaxNGParserCtxtPtr) xmlMalloc(sizeof(xmlRelaxNGParserCtxt)); if (ret == NULL) { xmlRngPErrMemory(NULL, "building parser\n"); ...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
76,462,971,492,272,120,000,000,000,000,000,000,000
20
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
MODRET set_rootlogin(cmd_rec *cmd) { int bool = -1; config_rec *c = NULL; CHECK_ARGS(cmd,1); CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL|CONF_ANON); bool = get_boolean(cmd, 1); if (bool == -1) CONF_ERROR(cmd, "expected Boolean parameter"); c = add_config_param(cmd->argv[0], 1, NULL); c->ar...
0
[ "CWE-59", "CWE-61" ]
proftpd
ecff21e0d0e84f35c299ef91d7fda088e516d4ed
197,898,745,549,518,230,000,000,000,000,000,000,000
18
Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks is off, to 1.3.5 branch.
explicit UnicodeDecodeWithOffsetsOp(OpKernelConstruction* ctx) : UnicodeDecodeBaseOp<SPLITS_TYPE>(ctx, true) {}
0
[ "CWE-824", "CWE-787" ]
tensorflow
2e0ee46f1a47675152d3d865797a18358881d7a6
231,659,753,511,053,220,000,000,000,000,000,000,000
2
Ensure non-empty input_splits in tf.raw_ops.UnicodeEncode PiperOrigin-RevId: 387170080 Change-Id: I3b489acc51c5cb4124c535b9df7cc6e62ef21766
static lu_mem entergen (lua_State *L, global_State *g) { lu_mem numobjs; luaC_runtilstate(L, bitmask(GCSpause)); /* prepare to start a new cycle */ luaC_runtilstate(L, bitmask(GCSpropagate)); /* start new cycle */ numobjs = atomic(L); /* propagates all and then do the atomic stuff */ atomic2gen(L, g); re...
0
[ "CWE-125" ]
lua
127e7a6c8942b362aa3c6627f44d660a4fb75312
186,798,532,384,045,500,000,000,000,000,000,000,000
8
Fixed bug of old finalized objects in the GC When an object aged OLD1 is finalized, it is moved from the list 'finobj' to the *beginning* of the list 'allgc'. So, this part of the list (and not only the survival list) must be visited by 'markold'.
MagickExport MagickBooleanType IsFuzzyEquivalencePixel(const Image *source, const Quantum *p,const Image *destination,const Quantum *q) { double fuzz, pixel; register double distance, scale; fuzz=GetFuzzyColorDistance(source,destination); scale=1.0; distance=0.0; if (source->alpha_trait ...
0
[ "CWE-190" ]
ImageMagick
406da3af9e09649cda152663c179902edf5ab3ac
131,363,590,822,963,790,000,000,000,000,000,000,000
66
https://github.com/ImageMagick/ImageMagick/issues/1732
double number() const { return numberDouble(); }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
310,249,502,063,098,000,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit
static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) { struct pipe_buffer *ibuf, *obuf; int ret = 0, nbuf; bool input_wakeup = false; retry: ret = ipipe_prep(ipipe, flags); if (ret) return ret; ret = opipe_prep(opipe,...
0
[ "CWE-284", "CWE-264" ]
linux
8d0207652cbe27d1f962050737848e5ad4671958
309,719,419,076,298,260,000,000,000,000,000,000,000
111
->splice_write() via ->write_iter() iter_file_splice_write() - a ->splice_write() instance that gathers the pipe buffers, builds a bio_vec-based iov_iter covering those and feeds it to ->write_iter(). A bunch of simple cases coverted to that... [AV: fixed the braino spotted by Cyrill] Signed-off-by: Al Viro <viro@z...
static void spl_array_it_move_forward(zend_object_iterator *iter TSRMLS_DC) /* {{{ */ { spl_array_it *iterator = (spl_array_it *)iter; spl_array_object *object = iterator->object; HashTable *aht = spl_array_get_hash_table(object, 0 TSRMLS_CC); if (object->ar_flags & SPL_ARRAY_OVERLOADED_NEX...
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
327,074,151,938,699,100,000,000,000,000,000,000,000
22
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share, const LEX_CSTRING *alias, uint db_stat, uint prgflag, uint ha_open_flags, TABLE *outparam, bool is_create_table, List<String> *partitions_to_open) { enum open_frm_error error; ...
1
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
144,095,820,175,211,900,000,000,000,000,000,000,000
477
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
tabpage_new(void) { exarg_T ea; vim_memset(&ea, 0, sizeof(ea)); ea.cmdidx = CMD_tabnew; ea.cmd = (char_u *)"tabn"; ea.arg = (char_u *)""; ex_splitview(&ea); }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
249,880,644,932,085,050,000,000,000,000,000,000,000
10
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
static __inline__ void ipv6_select_ident(struct sk_buff *skb, struct frag_hdr *fhdr) { static u32 ipv6_fragmentation_id = 1; static DEFINE_SPINLOCK(ip6_id_lock); spin_lock_bh(&ip6_id_lock); fhdr->identification = htonl(ipv6_fragmentation_id); if (++ipv6_fragmentation_id == 0) ipv6_fragmentation_id = 1; spin_un...
0
[]
linux
e89e9cf539a28df7d0eb1d0a545368e9920b34ac
308,119,976,971,998,500,000,000,000,000,000,000,000
11
[IPv4/IPv6]: UFO Scatter-gather approach Attached is kernel patch for UDP Fragmentation Offload (UFO) feature. 1. This patch incorporate the review comments by Jeff Garzik. 2. Renamed USO as UFO (UDP Fragmentation Offload) 3. udp sendfile support with UFO This patches uses scatter-gather feature of skb to generate l...
static int em_cmp(struct x86_emulate_ctxt *ctxt) { emulate_2op_SrcV(ctxt, "cmp"); /* Disable writeback. */ ctxt->dst.type = OP_NONE; return X86EMUL_CONTINUE; }
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
267,936,790,800,157,240,000,000,000,000,000,000,000
7
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
static int ntop_dump_file(lua_State* vm) { char *fname; FILE *fd; struct mg_connection *conn; ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); lua_getglobal(vm, CONST_HTTP_CONN); if((conn = (struct mg_connection*)lua_touserdata(vm, lua_gettop(vm))) == NULL) { ntop->getTrace()-...
0
[ "CWE-284", "CWE-352" ]
ntopng
f91fbe3d94c8346884271838ae3406ae633f6f15
44,461,036,964,898,280,000,000,000,000,000,000,000
36
Check for presence of crsf in admin scripts
GF_Err gf_seng_get_stream_carousel_info(GF_SceneEngine *seng, u16 ESID, u32 *carousel_period, u16 *aggregate_on_es_id) { u32 i=0; GF_StreamContext *sc; if (carousel_period) *carousel_period = (u32) -1; if (aggregate_on_es_id) *aggregate_on_es_id = 0; while (NULL != (sc = gf_list_enum(seng->ctx->streams, &i))) { ...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
180,164,593,516,278,670,000,000,000,000,000,000,000
17
fixed #2138
cmd_restart (assuan_context_t ctx, char *line) { ctrl_t ctrl = assuan_get_pointer (ctx); (void)line; if (ctrl->app_ctx) { release_application (ctrl->app_ctx); ctrl->app_ctx = NULL; } if (locked_session && ctrl->server_local == locked_session) { locked_session = NULL; log_in...
0
[]
gnupg
b0b3803e8c2959dd67ca96debc54b5c6464f0d41
94,264,112,905,140,340,000,000,000,000,000,000,000
18
scd: Avoid double-free on error condition in scd * scd/command.c (cmd_readkey): avoid double-free of cert -- When ksba_cert_new() fails, cert will be double-freed. Debian-Bug-Id: 773471 Original patch changed by wk to do the free only at leave.
template<typename t> CImg<T>& assign(const CImg<t>& img, const char *const dimensions) { if (!dimensions || !*dimensions) return assign(img._width,img._height,img._depth,img._spectrum); unsigned int siz[4] = { 0,1,1,1 }, k = 0; CImg<charT> item(256); for (const char *s = dimensions; *s &...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
3,906,705,309,274,135,600,000,000,000,000,000,000
28
Fix other issues in 'CImg<T>::load_bmp()'.
//! Return a \c 1x9 image containing specified values. static CImg<T> vector(const T& a0, const T& a1, const T& a2, const T& a3, const T& a4, const T& a5, const T& a6, const T& a7, const T& a8) { CImg<T> r(1,9); T *ptr = r._data; *(ptr++) = a0; *(ptr++) = a1; *(ptr++) = a2; *(ptr++) = a3; ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
210,503,647,256,080,700,000,000,000,000,000,000,000
9
Fix other issues in 'CImg<T>::load_bmp()'.
uint16_t peakID() { uint16_t ret; if(!d_available.empty()) { ret=d_available.front(); return ret; } else throw runtime_error("out of ids!"); // XXX FIXME }
0
[ "CWE-787" ]
pdns
f9c57c98da1b1007a51680629b667d57d9b702b8
291,383,151,841,820,500,000,000,000,000,000,000,000
10
dnsreplay: Bail out on a too small outgoing buffer
size_t sdsAllocSize(sds s) { size_t alloc = sdsalloc(s); return sdsHdrSize(s[-1])+alloc+1; }
0
[ "CWE-190" ]
redis
d32f2e9999ce003bad0bd2c3bca29f64dcce4433
326,101,887,948,616,670,000,000,000,000,000,000,000
4
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. A...
xsltRunStylesheetUser(xsltStylesheetPtr style, xmlDocPtr doc, const char **params, const char *output, xmlSAXHandlerPtr SAX, xmlOutputBufferPtr IObuf, FILE * profile, xsltTransformContextPtr userCtxt) { xmlDocPtr tmp; int ret; if ((output == NULL) && (SAX == NULL) &&...
0
[]
libxslt
937ba2a3eb42d288f53c8adc211bd1122869f0bf
214,632,225,256,910,630,000,000,000,000,000,000,000
35
Fix default template processing on namespace nodes
parser_emit_cbc (parser_context_t *context_p, /**< context */ uint16_t opcode) /**< opcode */ { JERRY_ASSERT (PARSER_ARGS_EQ (opcode, 0)); if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILABLE) { parser_flush_cbc (context_p); } context_p->last_cbc_opcode = opcode; } /* parser_emit_cb...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
229,749,074,944,866,260,000,000,000,000,000,000,000
12
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
Variant f_simplexml_import_dom(CObjRef node, const String& class_name /* = "SimpleXMLElement" */) { c_DOMNode *domnode = node.getTyped<c_DOMNode>(); xmlNodePtr nodep = domnode->m_node; if (nodep) { if (nodep->doc == nullptr) { raise_warning("Imported Node must have assoc...
0
[ "CWE-94" ]
hhvm
95f96e7287effe2fcdfb9a5338d1a7e4f55b083b
213,218,213,585,812,200,000,000,000,000,000,000,000
26
Fix libxml_disable_entity_loader() This wasn't calling requestInit and setting the libxml handler no null. So the first time an error came along it would reset the handler from no-op to reading again. This is a much better fix, we set our custom handler in requestInit and when libxml_disable_entity_loader we store th...
void free_filter(struct filter *f) { if (f == NULL) return; assert(f->ref == 0); unref(f->next, filter); unref(f->glob, string); free(f); }
0
[]
augeas
051c73a9a7ffe9e525f6f0a1b8f5198ff8cc6752
273,913,290,188,559,700,000,000,000,000,000,000,000
8
Fix regression in permissions of created files Commit 16387744 changed temporary file creation to use mkstemp, resulting in new files being created with 0600 permissions. For brand new files created through Augeas, their permissions stayed at 0600 rather than being set by the umask as before. * src/transform.c (tr...
static void ehci_update_halt(EHCIState *s) { if (s->usbcmd & USBCMD_RUNSTOP) { ehci_clear_usbsts(s, USBSTS_HALT); } else { if (s->astate == EST_INACTIVE && s->pstate == EST_INACTIVE) { ehci_set_usbsts(s, USBSTS_HALT); } } }
0
[]
qemu
791f97758e223de3290592d169f8e6339c281714
132,070,886,302,911,500,000,000,000,000,000,000,000
10
usb: ehci: fix memory leak in ehci_init_transfer In ehci_init_transfer function, if the 'cpage' is bigger than 4, it doesn't free the 'p->sgl' once allocated previously thus leading a memory leak issue. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog...
void* sspi_SecureHandleGetLowerPointer(SecHandle* handle) { void* pointer; if (!handle || !SecIsValidHandle(handle)) return NULL; pointer = (void*) ~((size_t) handle->dwLower); return pointer; }
0
[ "CWE-476", "CWE-125" ]
FreeRDP
0773bb9303d24473fe1185d85a424dfe159aff53
236,315,422,314,978,650,000,000,000,000,000,000,000
11
nla: invalidate sec handle after creation If sec pointer isn't invalidated after creation it is not possible to check if the upper and lower pointers are valid. This fixes a segfault in the server part if the client disconnects before the authentication was finished.
PHP_FUNCTION(openssl_x509_checkpurpose) { zval * zcert, * zcainfo = NULL; X509_STORE * cainfo = NULL; X509 * cert = NULL; STACK_OF(X509) * untrustedchain = NULL; zend_long purpose; char * untrusted = NULL; size_t untrusted_len = 0; int ret; if (zend_parse_parameters(ZEND_NUM_ARGS(), "zl|a!s", &zcert, &purpose...
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
144,938,492,685,574,400,000,000,000,000,000,000,000
50
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, const char *chunk, int size, const char *filename) { xmlParserCtxtPtr ctxt; xmlParserInputPtr inputStream; xmlParserInputBufferPtr buf; xmlCharEncoding enc = XML_CHAR_ENCODING_NONE; /* * plug some encoding ...
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
63,746,510,751,874,390,000,000,000,000,000,000,000
110
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
void sqlite_iterator_move_forward(zend_object_iterator *iter TSRMLS_DC) { struct php_sqlite_result *res = ((sqlite_object_iterator*)iter)->res; if (((sqlite_object_iterator*)iter)->value) { zval_ptr_dtor(&((sqlite_object_iterator*)iter)->value); ((sqlite_object_iterator*)iter)->value = NULL; } if (res) { if ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
251,736,422,647,024,540,000,000,000,000,000,000,000
20
- 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
notify_find_address(dns_notify_t *notify) { isc_result_t result; unsigned int options; REQUIRE(DNS_NOTIFY_VALID(notify)); options = DNS_ADBFIND_WANTEVENT | DNS_ADBFIND_INET | DNS_ADBFIND_INET6 | DNS_ADBFIND_RETURNLAME; if (notify->zone->view->adb == NULL) goto destroy; result = dns_adb_createfind(notify-...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
314,468,230,341,192,960,000,000,000,000,000,000,000
35
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
void visit(CaptureScope &ope) override { ope.ope_->accept(*this); found_ope = csc(found_ope); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
305,396,007,279,880,670,000,000,000,000,000,000,000
4
Fix #122
void tls_fips_digest_extra( const EVP_CIPHER_CTX *cipher_ctx, const EVP_MD *hash, HMAC_CTX *hctx, const unsigned char *data, size_t data_len, size_t orig_len) { size_t block_size, digest_pad, blocks_data, blocks_orig; if (EVP_CIPHER_CTX_mode(cipher_ctx) != EVP_CIPH_CBC_MODE) return; block_size = EVP_MD_block_si...
0
[ "CWE-310" ]
openssl
924b11742296c13816a9f301e76fea023003920c
299,546,616,344,409,070,000,000,000,000,000,000,000
38
Timing fix mitigation for FIPS mode. We have to use EVP in FIPS mode so we can only partially mitigate timing differences. Make an extra call to HMAC_Update to hash additonal blocks to cover any timing differences caused by removal of padding.
static int isofs_statfs (struct dentry *dentry, struct kstatfs *buf) { struct super_block *sb = dentry->d_sb; u64 id = huge_encode_dev(sb->s_bdev->bd_dev); buf->f_type = ISOFS_SUPER_MAGIC; buf->f_bsize = sb->s_blocksize; buf->f_blocks = (ISOFS_SB(sb)->s_nzones << (ISOFS_SB(sb)->s_log_zone_size - sb->s_blocksize...
0
[ "CWE-20", "CWE-399" ]
linux
410dd3cf4c9b36f27ed4542ee18b1af5e68645a4
278,241,991,886,105,930,000,000,000,000,000,000,000
18
isofs: Fix unbounded recursion when processing relocated directories We did not check relocated directory in any way when processing Rock Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL entry pointing to another CL entry leading to possibly unbounded recursion in kernel code and thus stack overflow...
void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map, bool dirty) { if (!map) return; if (!map->hva) return; if (map->page != KVM_UNMAPPED_PAGE) kunmap(map->page); #ifdef CONFIG_HAS_IOMEM else memunmap(map->hva); #endif if (dirty) kvm_vcpu_mark_page_dirty(vcpu, map->gfn); kvm_release...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
332,358,977,149,781,850,000,000,000,000,000,000,000
23
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
smtp_check_mail_from(struct smtp_session *s, const char *args) { char *copy; char tmp[SMTP_LINE_MAX]; struct mailaddr sender; (void)strlcpy(tmp, args, sizeof tmp); copy = tmp; if (s->helo[0] == '\0' || s->tx) { smtp_reply(s, "503 %s %s: Command not allowed at this point.", esc_code(ESC_STATUS_PERMFAIL...
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
42,509,003,641,109,736,000,000,000,000,000,000,000
51
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
GF_Err gf_isom_svc_config_update(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex, GF_AVCConfig *cfg, Bool is_add) { return gf_isom_avc_config_update_ex(the_file, trackNumber, DescriptionIndex, cfg, is_add ? 1 : 2, GF_FALSE); }
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
50,211,714,365,398,930,000,000,000,000,000,000,000
4
fixed #1785 (fuzz)
const Type_handler *type_handler() const { return &type_handler_varchar; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
230,831,100,285,120,470,000,000,000,000,000,000,000
1
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int mac80211_hwsim_croc(struct ieee80211_hw *hw) { struct mac80211_hwsim_data *hwsim = hw->priv; cancel_delayed_work_sync(&hwsim->roc_start); cancel_delayed_work_sync(&hwsim->roc_done); mutex_lock(&hwsim->mutex); hwsim->tmp_chan = NULL; mutex_unlock(&hwsim->mutex); wiphy_dbg(hw->wiphy, "hwsim ROC cance...
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
334,433,028,451,549,840,000,000,000,000,000,000,000
15
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
ldns_str2rdf_ilnp64(ldns_rdf **rd, const char *str) { unsigned int a, b, c, d; uint16_t shorts[4]; int l; if (sscanf(str, "%4x:%4x:%4x:%4x%n", &a, &b, &c, &d, &l) != 4 || l != (int)strlen(str) || /* more data to read */ strpbrk(str, "+-") /* signed hexes */ ) { return LDNS_STATUS_INVALID_ILNP64; ...
0
[]
ldns
3bdeed02505c9bbacb3b64a97ddcb1de967153b7
287,287,123,011,339,100,000,000,000,000,000,000,000
21
bugfix #1257: Free after reallocing to 0 size Thanks Stephan Zeisberg
static int io_init_wq_offload(struct io_ring_ctx *ctx, struct io_uring_params *p) { struct io_wq_data data; struct fd f; struct io_ring_ctx *ctx_attach; unsigned int concurrency; int ret = 0; data.user = ctx->user; data.free_work = io_free_work; data.do_work = io_wq_submit_work; if (!(p->flags & IOR...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
167,032,974,464,008,970,000,000,000,000,000,000,000
46
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static void t1_mark_glyphs(void) { char *glyph; struct avl_traverser t; cs_entry *ptr; if (t1_synthetic || fd_cur->all_glyphs) { /* mark everything */ if (cs_tab != NULL) for (ptr = cs_tab; ptr < cs_ptr; ptr++) if (ptr->valid) ptr->used = true; ...
0
[ "CWE-119" ]
texlive-source
6ed0077520e2b0da1fd060c7f88db7b2e6068e4c
337,485,880,144,089,870,000,000,000,000,000,000,000
29
writet1 protection against buffer overflow git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751
unsetspec(struct tbl *vp) { /* * AT&T ksh man page says OPTIND, OPTARG and _ lose special * meaning, but OPTARG does not (still set by getopts) and _ is * also still set in various places. Don't know what AT&T does * for HISTSIZE, HISTFILE. Unsetting these in AT&T ksh does not * loose the 'specialness': IFS,...
0
[]
mksh
de53d2df1c3b812c262cc1bddbfe0b3bfc25c14b
295,773,913,728,377,950,000,000,000,000,000,000,000
38
SECURITY: do not permit += from environment either this makes our environment filter/sanitisation complete
ssize_t enc_untrusted_recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) { int klinux_flags = TokLinuxRecvSendFlag(flags); if (klinux_flags == 0 && flags != 0) { errno = EINVAL; return -1; } MessageWriter input; input.P...
1
[ "CWE-125" ]
asylo
6e158d558abd3c29a0208e30c97c9a8c5bd4230f
165,735,439,512,029,670,000,000,000,000,000,000,000
42
Check for result of recvfrom PiperOrigin-RevId: 333399155 Change-Id: I3d79e1e3f45f75d4c4360d42499e511d84b9aff7
static int cap_sb_statfs(struct dentry *dentry) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
244,359,863,616,052,970,000,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...
static int io_wake_function(struct wait_queue_entry *curr, unsigned int mode, int wake_flags, void *key) { struct io_wait_queue *iowq = container_of(curr, struct io_wait_queue, wq); /* * Cannot safely flush overflowed CQEs from here, ensure we wake up * the task, and the next invocation will do it...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
149,856,466,295,383,540,000,000,000,000,000,000,000
15
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...