func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
bool CLua::callfn(const char *fn, const char *params, ...) { error.clear(); lua_State *ls = state(); if (!ls) return false; pushglobal(fn); if (!lua_isfunction(ls, -1)) { lua_pop(ls, 1); return false; } va_list args; va_list fnret; va_start(args, params)...
0
[ "CWE-434" ]
crawl
fc522ff6eb1bbb85e3de60c60a45762571e48c28
98,618,206,300,929,100,000,000,000,000,000,000,000
28
Disable lua load(), loadstring() bytcode loading
process_cmd_add_server_or_peer(CMD_Request *msg, char *line) { CPS_NTP_Source data; CPS_Status status; IPAddr ip_addr; int result = 0; status = CPS_ParseNTPSourceAdd(line, &data); switch (status) { case CPS_Success: if (DNS_Name2IPAddress(data.name, &ip_addr) != DNS_Success) { Free(data...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
143,391,268,367,554,480,000,000,000,000,000,000,000
89
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
static inline unsigned int metapath_branch_start(const struct metapath *mp) { if (mp->mp_list[0] == 0) return 2; return 1; }
0
[ "CWE-119", "CWE-787" ]
linux
64dd153c83743af81f20924c6343652d731eeecb
145,796,716,852,327,520,000,000,000,000,000,000,000
6
GFS2: rewrite fallocate code to write blocks directly GFS2's fallocate code currently goes through the page cache. Since it's only writing to the end of the file or to holes in it, it doesn't need to, and it was causing issues on low memory environments. This patch pulls in some of Steve's block allocation work, and u...
int tty_set_ldisc(struct tty_struct *tty, int ldisc) { int retval; struct tty_ldisc *old_ldisc, *new_ldisc; new_ldisc = tty_ldisc_get(tty, ldisc); if (IS_ERR(new_ldisc)) return PTR_ERR(new_ldisc); tty_lock(tty); retval = tty_ldisc_lock(tty, 5 * HZ); if (retval) goto err; /* Check the no-op case */ if (t...
0
[ "CWE-200" ]
linux-stable
dd42bf1197144ede075a9d4793123f7689e164bc
331,332,694,350,144,620,000,000,000,000,000,000,000
63
tty: Prevent ldisc drivers from re-using stale tty fields Line discipline drivers may mistakenly misuse ldisc-related fields when initializing. For example, a failure to initialize tty->receive_room in the N_GIGASET_M101 line discipline was recently found and fixed [1]. Now, the N_X25 line discipline has been discover...
SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon, const u64 persistent_fid, const u64 volatile_fid, __u8 oplock_level) { int rc; struct smb2_oplock_break *req = NULL; cifs_dbg(FYI, "SMB2_oplock_break\n"); rc = small_smb2_init(SMB2_OPLOCK_BREAK, tcon, (void **) &req); if (rc) return rc; ...
0
[ "CWE-399" ]
linux
18f39e7be0121317550d03e267e3ebd4dbfbb3ce
9,973,084,468,653,839,000,000,000,000,000,000,000
28
[CIFS] Possible null ptr deref in SMB2_tcon As Raphael Geissert pointed out, tcon_error_exit can dereference tcon and there is one path in which tcon can be null. Signed-off-by: Steve French <smfrench@gmail.com> CC: Stable <stable@vger.kernel.org> # v3.7+ Reported-by: Raphael Geissert <geissert@debian.org>
HTTP1_Write(const struct worker *w, const struct http *hp, const int *hf) { unsigned u, l; assert(hf == HTTP1_Req || hf == HTTP1_Resp); AN(hp->hd[hf[0]].b); AN(hp->hd[hf[1]].b); AN(hp->hd[hf[2]].b); l = http1_WrTxt(w, &hp->hd[hf[0]], " "); l += http1_WrTxt(w, &hp->hd[hf[1]], " "); l += http1_WrTxt(w, &hp->hd[h...
0
[ "CWE-617" ]
varnish-cache
406b583fe54634afd029e7a41e35b3cf9ccac28a
246,402,275,349,675,840,000,000,000,000,000,000,000
17
Avoid some code duplication Apply some adjustments to recent patches based off of review by Nils Goroll at UPLEX (@nigoroll)
static void clean_demultiplex_info(struct TCP_Server_Info *server) { int length; /* take it off the list, if it's not already */ spin_lock(&cifs_tcp_ses_lock); list_del_init(&server->tcp_ses_list); spin_unlock(&cifs_tcp_ses_lock); spin_lock(&GlobalMid_Lock); server->tcpStatus = CifsExiting; spin_unlock(&Globa...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
56,067,090,811,363,460,000,000,000,000,000,000,000
87
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
void kvm_arch_destroy_vm(struct kvm *kvm) { if (current->mm == kvm->mm) { /* * Free memory regions allocated on behalf of userspace, * unless the the memory map has changed due to process exit * or fd copying. */ x86_set_memory_region(kvm, APIC_ACCESS_PAGE_PRIVATE_MEMSLOT, 0, 0); x86_set_memory_regio...
0
[ "CWE-369" ]
linux
0185604c2d82c560dab2f2933a18f797e74ab5a8
222,589,876,493,836,440,000,000,000,000,000,000,000
18
KVM: x86: Reload pit counters for all channels when restoring state Currently if userspace restores the pit counters with a count of 0 on channels 1 or 2 and the guest attempts to read the count on those channels, then KVM will perform a mod of 0 and crash. This will ensure that 0 values are converted to 65536 as per...
void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer) { unsigned ver97 = 0, offset = 0, entries, tag, type, len, save, c; unsigned i; uchar NikonKey, ci, cj, ck; unsigned serial = 0; unsigned NikonLensDataVersion = 0; unsigned lenNikonLensData = 0; uchar *CanonCameraInfo; unsigne...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
280,842,123,451,369,460,000,000,000,000,000,000,000
700
fixed two more problems found by fuzzer
static bool hard_acs_rdy_or_timeout(struct temac_local *lp, ktime_t timeout) { ktime_t cur = ktime_get(); return hard_acs_rdy(lp) || ktime_after(cur, timeout); }
0
[ "CWE-120", "CWE-787" ]
linux
c364df2489b8ef2f5e3159b1dff1ff1fdb16040d
323,434,616,089,841,280,000,000,000,000,000,000,000
6
net: ll_temac: Fix TX BD buffer overwrite Just as the initial check, we need to ensure num_frag+1 buffers available, as that is the number of buffers we are going to use. This fixes a buffer overflow, which might be seen during heavy network load. Complete lockup of TEMAC was reproducible within about 10 minutes of a...
static __always_inline long __get_user_pages_locked(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, struct page **pages, struct vm_area_struct **vmas, int *locked, bool notify_drop, unsigned int flags) { long ret, pages_done; bool l...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
263,802,903,172,103,100,000,000,000,000,000,000,000
90
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
void CLASS lin_interpolate() { int code[16][16][32], size=16, *ip, sum[4]; int f, c, x, y, row, col, shift, color; #ifdef DCRAW_VERBOSE if (verbose) fprintf (stderr,_("Bilinear interpolation...\n")); #endif #ifdef LIBRAW_LIBRARY_BUILD RUN_CALLBACK(LIBRAW_PROGRESS_INTERPOLATE,0,3); #endif if (filters == 9) ...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
49,929,748,507,169,550,000,000,000,000,000,000,000
45
backported 0.15.4 datachecks
SRC_SetActive(SRC_Instance inst) { inst->active = 1; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
244,251,587,611,639,240,000,000,000,000,000,000,000
4
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) { DBUG_ENTER("mysql_option"); DBUG_PRINT("enter",("option: %d",(int) option)); switch (option) { case MYSQL_OPT_CONNECT_TIMEOUT: mysql->options.connect_timeout= *(uint*) arg; break; case MYSQL_OPT_READ_TIMEOUT: mysql...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
39,706,105,450,751,640,000,000,000,000,000,000,000
171
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...
bool Arg_comparator::set_cmp_func_real() { if ((((*a)->result_type() == DECIMAL_RESULT && !(*a)->const_item() && (*b)->result_type() == STRING_RESULT && (*b)->const_item()) || ((*b)->result_type() == DECIMAL_RESULT && !(*b)->const_item() && (*a)->result_type() == STRING_RESULT && (*a)->const_...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
164,700,529,332,185,790,000,000,000,000,000,000,000
33
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static int sieve_execute_error_handler(const char *msg, void *ic __attribute__((unused)), void *sc, void *mc) { script_data_t *sd = (script_data_t *) sc; message_data_t *md = ((deliver_data_t *) mc)->m; syslog(LOG_INFO, "sieve r...
0
[ "CWE-269" ]
cyrus-imapd
673ebd96e2efbb8895d08648983377262f35b3f7
140,365,996,410,784,640,000,000,000,000,000,000,000
12
lmtp_sieve: don't create mailbox with admin for sieve autocreate
static int __rb_allocate_pages(long nr_pages, struct list_head *pages, int cpu) { struct buffer_page *bpage, *tmp; bool user_thread = current->mm != NULL; gfp_t mflags; long i; /* * Check if the available memory is there first. * Note, si_mem_available() only gives us a rough estimate of available * memory....
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
55,463,686,255,637,390,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_...
void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov, unsigned long nr_segs, size_t count) { /* It will get better. Eventually... */ if (segment_eq(get_fs(), KERNEL_DS)) { direction |= ITER_KVEC; i->type = direction; i->kvec = (struct kvec *)iov; } else { i->type = direction; ...
0
[ "CWE-200" ]
linux
b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb
55,739,550,444,906,240,000,000,000,000,000,000,000
17
fix a fencepost error in pipe_advance() The logics in pipe_advance() used to release all buffers past the new position failed in cases when the number of buffers to release was equal to pipe->buffers. If that happened, none of them had been released, leaving pipe full. Worse, it was trivial to trigger and we end up ...
void timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) { auto conn = static_cast<Connection *>(w->data); auto dconn = static_cast<HttpDownstreamConnection *>(conn->data); if (w == &conn->rt && !conn->expired_rt()) { return; } if (LOG_ENABLED(INFO)) { DCLOG(INFO, dconn) << "Time out"; } ...
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
173,812,897,657,774,660,000,000,000,000,000,000,000
24
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
static void nl_fib_input(struct sk_buff *skb) { struct net *net; struct fib_result_nl *frn; struct nlmsghdr *nlh; u32 portid; net = sock_net(skb->sk); nlh = nlmsg_hdr(skb); if (skb->len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len || nlmsg_len(nlh) < sizeof(*frn)) return; skb = netlink_skb_clone(skb, GF...
0
[ "CWE-399" ]
net-next
fbd40ea0180a2d328c5adc61414dc8bab9335ce2
171,842,549,827,095,080,000,000,000,000,000,000,000
26
ipv4: Don't do expensive useless work during inetdev destroy. When an inetdev is destroyed, every address assigned to the interface is removed. And in this scenerio we do two pointless things which can be very expensive if the number of assigned interfaces is large: 1) Address promotion. We are deleting all address...
int g_dhcp_client_get_index(GDHCPClient *dhcp_client) { return dhcp_client->ifindex; }
0
[]
connman
a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1
281,437,414,830,351,660,000,000,000,000,000,000,000
4
gdhcp: Avoid leaking stack data via unitiialized variable Fixes: CVE-2021-26676
char *pgpIdentItem(pgpDigParams digp) { char *id = NULL; if (digp) { char *signid = pgpHexStr(digp->signid+4, sizeof(digp->signid)-4); rasprintf(&id, _("V%d %s/%s %s, key ID %s"), digp->version, pgpValStr(pgpPubkeyTbl, digp->pubkey_algo), pgpValStr(pgpHashTbl, digp->hash_algo), pgpValStr(pgpTagT...
0
[ "CWE-347", "CWE-284" ]
rpm
bd36c5dc9fb6d90c46fbfed8c2d67516fc571ec8
267,371,393,151,476,500,000,000,000,000,000,000,000
18
Validate and require subkey binding signatures on PGP public keys All subkeys must be followed by a binding signature by the primary key as per the OpenPGP RFC, enforce the presence and validity in the parser. The implementation is as kludgey as they come to work around our simple-minded parser structure without touc...
bool JsonIsNull(const json &o) { #ifdef TINYGLTF_USE_RAPIDJSON return o.IsNull(); #else return o.is_null(); #endif }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
192,724,681,841,470,240,000,000,000,000,000,000,000
7
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
static int jpc_dec_decode(jpc_dec_t *dec) { jpc_ms_t *ms; const jpc_dec_mstabent_t *mstabent; int ret; jpc_cstate_t *cstate; if (!(cstate = jpc_cstate_create())) { return -1; } dec->cstate = cstate; /* Initially, we should expect to encounter a SOC marker segment. */ dec->state = JPC_MHSOC; for (;;) { ...
0
[ "CWE-617" ]
jasper
84d00fb29a22e360c2ff91bdc2cd81c288826bfc
187,584,348,179,927,940,000,000,000,000,000,000,000
55
jpc_dec: check for JPC_QCX_EXPN() parameter overflow Avoid the assertion failure in the JPC_QCX_EXPN() function. While the "expn" variable cannot be bigger than 0x1f, adding something to it may exceed that limit. This condition could be exploited with a malicious JP2 file, allowing a denial of service attack on proc...
static char const *acurite_getChannelAndType(uint8_t byte, uint8_t mtype) { static char const *channel_strs[] = {"CR", "ER", "BR", "AR", "CF", "EF", "BF", "AF"}; // 'E' stands for error int channel = ((mtype & 0x01) << 2) | ((byte & 0xC0) >> 6); return channel_strs[channel]; }
0
[ "CWE-703" ]
rtl_433
37455483889bd1c641bdaafc493d1cc236b74904
10,287,885,806,760,375,000,000,000,000,000,000,000
7
Fix overflow in Acurite-00275rm (closes #2012)
static OPJ_BOOL opj_j2k_write_rgn(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_no, OPJ_UINT32 p_comp_no, OPJ_UINT32 nb_comps, opj_stream_private_t *p_stream, opj_event_mgr_t * p_manager ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
183,536,864,842,005,140,000,000,000,000,000,000,000
56
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static int kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn, const struct mmu_notifier_range *range) { struct kvm *kvm = mmu_notifier_to_kvm(mn); int need_tlb_flush = 0, idx; int ret; idx = srcu_read_lock(&kvm->srcu); spin_lock(&kvm->mmu_lock); /* * The count increase must become visible at...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
102,877,323,950,761,850,000,000,000,000,000,000,000
31
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
STATIC void GC_print_obj(ptr_t p) { oh * ohdr = (oh *)GC_base(p); ptr_t q; hdr * hhdr; int kind; char *kind_str; char buffer[GC_TYPE_DESCR_LEN + 1]; GC_ASSERT(I_DONT_HOLD_LOCK()); # ifdef LINT2 if (!ohdr) ABORT("Invalid GC_print_obj argument"); # endif q = (ptr_t)(ohdr + 1); ...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
114,557,957,250,003,180,000,000,000,000,000,000,000
67
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
TEST_F(QueryPlannerTest, ContainedOrInAndInElemMatch) { addIndex(BSON("b.d" << 1 << "b.c" << 1)); addIndex(BSON("b.e" << 1 << "b.c" << 1)); runQuery( fromjson("{$and: [{a: 5}, {b: {$elemMatch: {$and: [{c: 5}, {$or: [{d: 6}, {e: 7}]}]}}}]}")); assertNumSolutions(2); assertSolutionExists( ...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
152,848,107,395,470,560,000,000,000,000,000,000,000
18
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
add_randomness( const void *buffer, size_t length, int source ) { const byte *p = buffer; if( !is_initialized ) initialize(); rndstats.addbytes += length; rndstats.naddbytes++; while( length-- ) { rndpool[pool_writepos++] ^= *p++; if( pool_writepos >= POOLSIZE ) { if( source > 1 ) pool_fi...
0
[ "CWE-200" ]
gnupg
c6dbfe89903d0c8191cf50ecf1abb3c8458b427a
65,380,712,258,925,800,000,000,000,000,000,000,000
19
random: Hash continuous areas in the csprng pool. * cipher/random.c (mix_pool): Store the first hash at the end of the pool. -- This fixes a long standing bug (since 1998) in Libgcrypt and GnuPG. An attacker who obtains 580 bytes of the random number from the standard RNG can trivially predict the next 20 bytes of ou...
NOEXPORT char *pop3_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) { char *line; (void)opt; /* squash the unused parameter warning */ if(phase!=PROTOCOL_MIDDLE) return NULL; line=fd_getline(c, c->remote_fd.fd); if(!is_prefix(line, "+OK ")) { s_log(LOG_ERR, "Unknown server w...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
45,844,151,004,601,440,000,000,000,000,000,000,000
24
stunnel-5.57
Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
102,910,601,350,549,060,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
void fpm_request_info() /* {{{ */ { struct fpm_scoreboard_proc_s *proc; char *request_uri = fpm_php_request_uri(); char *request_method = fpm_php_request_method(); char *script_filename = fpm_php_script_filename(); char *query_string = fpm_php_query_string(); char *auth_user = fpm_php_auth_user(); size_t content...
0
[ "CWE-787" ]
php-src
fadb1f8c1d08ae62b4f0a16917040fde57a3b93b
106,084,886,167,785,170,000,000,000,000,000,000,000
48
Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation) The main change is to store scoreboard procs directly to the variable sized array rather than indirectly through the pointer. Signed-off-by: Stanislav Malyshev <stas@php.net>
S_dump_trie_interim_list(pTHX_ const struct _reg_trie_data *trie, HV *widecharmap, AV *revcharmap, U32 next_alloc, U32 depth) { U32 state; SV *sv=sv_newmortal(); int colwidth= widecharmap ? 6 : 4; GET_RE_DEBUG_FLAGS_DECL; PERL_ARGS_ASSERT_DUMP_TRIE_INTERIM_LIST; /* print out the table ...
0
[ "CWE-125" ]
perl5
43b2f4ef399e2fd7240b4eeb0658686ad95f8e62
107,479,906,465,741,900,000,000,000,000,000,000,000
52
regcomp.c: Convert some strchr to memchr This allows things to work properly in the face of embedded NULs. See the branch merge message for more information.
QPDF::isLinearized() { // If the first object in the file is a dictionary with a suitable // /Linearized key and has an /L key that accurately indicates the // file size, initialize this->m->lindict and return true. // A linearized PDF spec's first object will be contained within // the first 1024 ...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
34,705,999,501,448,160,000,000,000,000,000,000,000
96
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static void hardware_enable_nolock(void *junk) { int cpu = raw_smp_processor_id(); int r; if (cpumask_test_cpu(cpu, cpus_hardware_enabled)) return; cpumask_set_cpu(cpu, cpus_hardware_enabled); r = kvm_arch_hardware_enable(); if (r) { cpumask_clear_cpu(cpu, cpus_hardware_enabled); atomic_inc(&hardware_e...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
308,238,971,158,520,740,000,000,000,000,000,000,000
18
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static inline PixelTrait GetPixelYellowTraits( const Image *magick_restrict image) { return(image->channel_map[YellowPixelChannel].traits); }
0
[ "CWE-20", "CWE-125" ]
ImageMagick
8187d2d8fd010d2d6b1a3a8edd935beec404dddc
297,066,172,820,525,900,000,000,000,000,000,000,000
5
https://github.com/ImageMagick/ImageMagick/issues/1610
long ssl_get_algorithm2(SSL *s) { long alg2 = s->s3->tmp.new_cipher->algorithm2; if (s->method->version == TLS1_2_VERSION && alg2 == (SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF)) return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256; return alg2; }
0
[ "CWE-310" ]
openssl
ca989269a2876bae79393bd54c3e72d49975fc75
28,636,269,522,336,763,000,000,000,000,000,000,000
8
Use version in SSL_METHOD not SSL structure. When deciding whether to use TLS 1.2 PRF and record hash algorithms use the version number in the corresponding SSL_METHOD structure instead of the SSL structure. The SSL structure version is sometimes inaccurate. Note: OpenSSL 1.0.2 and later effectively do this already. (...
static void stream_cleanup(h2_mplx *m, h2_stream *stream) { ap_assert(stream->state == H2_SS_CLEANUP); if (stream->input) { h2_beam_on_consumed(stream->input, NULL, NULL, NULL); h2_beam_abort(stream->input); } if (stream->output) { h2_beam_on_produced(stream->output, NULL, NULL)...
0
[ "CWE-444" ]
mod_h2
825de6a46027b2f4c30d7ff5a0c8b852d639c207
172,247,038,777,963,550,000,000,000,000,000,000,000
28
* Fixed keepalives counter on slave connections.
sodium_misuse_handler(void) { fatal_exit( "dnscrypt: libsodium could not be initialized, this typically" " happens when no good source of entropy is found. If you run" " unbound in a chroot, make sure /dev/urandom is available. See" " https://www.unbound.net/documentation/unbound.conf.html"); }
0
[ "CWE-190" ]
unbound
02080f6b180232f43b77f403d0c038e9360a460f
154,959,608,987,284,830,000,000,000,000,000,000,000
8
- Fix Integer Overflows in Size Calculations, reported by X41 D-Sec.
static int set_mlx_qp_type(struct mlx5_ib_dev *dev, struct ib_qp_init_attr *init_attr, struct mlx5_ib_create_qp *ucmd, struct ib_udata *udata) { enum { MLX_QP_FLAGS = MLX5_QP_FLAG_TYPE_DCT | MLX5_QP_FLAG_TYPE_DCI }; int err; if (!udata) return -EINVAL; if (udata->inlen < sizeof(*ucmd)) { mlx...
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
116,406,978,176,962,220,000,000,000,000,000,000,000
37
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
size_t rand_drbg_get_additional_data(RAND_POOL *pool, unsigned char **pout) { size_t ret = 0; if (rand_pool_add_additional_data(pool) == 0) goto err; ret = rand_pool_length(pool); *pout = rand_pool_detach(pool); err: return ret; }
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
175,900,217,235,287,950,000,000,000,000,000,000,000
13
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
methodHandle LinkResolver::resolve_special_call_or_null( KlassHandle resolved_klass, Symbol* name, Symbol* signature, Kl...
0
[]
jdk8u
f14e35d20e1a4d0f507f05838844152f2242c6d3
35,440,794,053,114,713,000,000,000,000,000,000,000
15
8281866: Enhance MethodHandle invocations Reviewed-by: andrew Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
bool generate_derived_keys_for_table(KEYUSE *keyuse, uint count, uint keys) { TABLE *table= keyuse->table; if (table->alloc_keys(keys)) return TRUE; uint key_count= 0; KEYUSE *first_keyuse= keyuse; uint prev_part= keyuse->keypart; uint parts= 0; uint i= 0; for ( ; i < count && key_count < keys; ) ...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
230,294,648,487,314,580,000,000,000,000,000,000,000
60
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
explicit CImg(const char *const filename):_width(0),_height(0),_depth(0),_spectrum(0),_is_shared(false),_data(0) { assign(filename); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
245,194,733,570,019,400,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.
noname_disable_map(Node** plink, GroupNumRemap* map, int* counter) { int r = 0; Node* node = *plink; switch (NODE_TYPE(node)) { case NODE_LIST: case NODE_ALT: do { r = noname_disable_map(&(NODE_CAR(node)), map, counter); } while (r == 0 && IS_NOT_NULL(node = NODE_CDR(node))); break; case...
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
102,165,557,832,556,910,000,000,000,000,000,000,000
69
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
static Int32 BZ2_decompress ( DState* s ) { UChar uc; Int32 retVal; Int32 minLen, maxLen; nsis_bzstream* strm = s->strm; /* stuff that needs to be saved/restored */ Int32 i; Int32 j; Int32 t; Int32 alphaSize; Int32 nGroups; Int32 nSelectors; Int32 EOB; Int32...
1
[]
clamav-devel
fcd8091474d12592d509adcfd0bdd0b0dc8835f5
71,080,105,146,203,660,000,000,000,000,000,000,000
528
bb#2230-2231
render_state_set_file( RenderState state, int idx ) { const char* filepath; if ( idx < 0 ) idx = state->num_faces - 1; else if ( idx >= state->num_faces ) idx = 0; if ( idx >= state->num_faces ) return -2; state->face_index = idx; fil...
0
[ "CWE-120" ]
freetype2-demos
b995299b73ba4cd259f221f500d4e63095508bec
295,582,039,520,956,230,000,000,000,000,000,000,000
63
Fix Savannah bug #30054. * src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c, src/ftview.c: Use precision for `%s' where appropriate to avoid buffer overflows.
_copyDeclareCursorStmt(const DeclareCursorStmt *from) { DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt); COPY_STRING_FIELD(portalname); COPY_SCALAR_FIELD(options); COPY_NODE_FIELD(query); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
119,962,817,146,633,500,000,000,000,000,000,000,000
10
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static uint16_t vring_used_idx(VirtQueue *vq) { hwaddr pa; pa = vq->vring.used + offsetof(VRingUsed, idx); return lduw_phys(&address_space_memory, pa); }
0
[ "CWE-94" ]
qemu
cc45995294b92d95319b4782750a3580cabdbc0c
26,338,866,750,443,300,000,000,000,000,000,000,000
6
virtio: out-of-bounds buffer write on invalid state load CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in virtio_load@hw/virtio/virtio.c So we have this code since way back when: num = qemu_get_be32(f); for (i = 0; i < num; i++) { vdev->vq[i].vring.num = qemu_get_be32(f); array of vqs has size ...
bool check_some_routine_access(THD *thd, const char *db, const char *name, bool is_proc) { ulong save_priv; /* The following test is just a shortcut for check_access() (to avoid calculating db_access) Note that this effectively bypasses the ACL_internal_schema_access check...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
278,024,506,955,703,300,000,000,000,000,000,000,000
20
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
bool is_temporal() const { return m_type == DYN_COL_DATETIME; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
231,845,106,121,880,080,000,000,000,000,000,000,000
1
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static int check_cert(X509_STORE_CTX *ctx) { X509_CRL *crl = NULL, *dcrl = NULL; int ok = 0; int cnum = ctx->error_depth; X509 *x = sk_X509_value(ctx->chain, cnum); ctx->current_cert = x; ctx->current_issuer = NULL; ctx->current_crl_score = 0; ctx->current_reasons = 0; if (x->ex_fl...
0
[ "CWE-295" ]
openssl
2a40b7bc7b94dd7de897a74571e7024f0cf0d63b
173,816,203,960,681,480,000,000,000,000,000,000,000
72
check_chain_extensions: Do not override error return value by check_curve The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates present in a certificate chain. It is not set by default. Starting from OpenSSL version 1.1.1h a check to disallow certificates with explicitly encoded elli...
GF_Err ssix_dump(GF_Box *a, FILE * trace) { u32 i, j; GF_SubsegmentIndexBox *p = (GF_SubsegmentIndexBox *)a; gf_isom_box_dump_start(a, "SubsegmentIndexBox", trace); fprintf(trace, "subsegment_count=\"%d\" >\n", p->subsegment_count); for (i = 0; i < p->subsegment_count; i++) { fprintf(trace, "<Subsegment range_c...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
239,456,635,991,245,450,000,000,000,000,000,000,000
22
fixed 2 possible heap overflows (inc. #1088)
static inline void store_bigendian(ulonglong num, uchar *to, uint bytes) { switch(bytes) { case 1: mi_int1store(to, num); break; case 2: mi_int2store(to, num); break; case 3: mi_int3store(to, num); break; case 4: mi_int4store(to, num); break; case 5: mi_int5store(to, num); break; case 6: mi_int6store(to, ...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
47,574,218,387,731,170,000,000,000,000,000,000,000
14
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...
place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) { u64 vruntime; if (first_fair(cfs_rq)) { vruntime = min_vruntime(cfs_rq->min_vruntime, __pick_next_entity(cfs_rq)->vruntime); } else vruntime = cfs_rq->min_vruntime; if (sched_feat(TREE_AVG)) { struct sched_entity *last = __pick_...
0
[]
linux-2.6
6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
193,369,394,412,823,340,000,000,000,000,000,000,000
41
sched: simplify sched_slice() Use the existing calc_delta_mine() calculation for sched_slice(). This saves a divide and simplifies the code because we share it with the other /cfs_rq->load users. It also improves code size: text data bss dec hex filename 42659 2740 144 45543 b1e...
static void ieee80211_abort_scan(struct wiphy *wiphy, struct wireless_dev *wdev) { ieee80211_scan_cancel(wiphy_priv(wiphy)); }
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
96,778,168,498,335,300,000,000,000,000,000,000,000
4
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
static int ftrace_pid_add(int p) { struct pid *pid; struct ftrace_pid *fpid; int ret = -EINVAL; mutex_lock(&ftrace_lock); if (!p) pid = ftrace_swapper_pid; else pid = find_get_pid(p); if (!pid) goto out; ret = 0; list_for_each_entry(fpid, &ftrace_pids, list) if (fpid->pid == pid) goto out_put; ...
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
167,272,282,108,719,020,000,000,000,000,000,000,000
47
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
static int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) { struct net *net = sock_net(sk); struct flowi4 fl4; struct inet_sock *inet = inet_sk(sk); struct ipcm_cookie ipc; struct icmphdr user_icmph; struct pingfakehdr pfh; struct rtable *rt = NULL; struct ip_options_...
0
[ "CWE-416" ]
net
b04c46190219a4f845e46a459e3102137b7f6cac
271,145,306,034,078,600,000,000,000,000,000,000,000
156
net: ipv4: current group_info should be put after using. Plug a group_info refcount leak in ping_init. group_info is only needed during initialization and the code failed to release the reference on exit. While here move grabbing the reference to a place where it is actually needed. Signed-off-by: Chuansheng Liu <chu...
static void curl_parse_filename(const char *filename, QDict *options, Error **errp) { #define RA_OPTSTR ":readahead=" char *file; char *ra; const char *ra_val; int parse_state = 0; file = g_strdup(filename); /* Parse a trailing ":readahead=#:" param, if pre...
0
[ "CWE-20" ]
qemu
6d4b9e55fc625514a38d27cff4b9933f617fa7dc
108,657,227,597,232,770,000,000,000,000,000,000,000
41
curl: check data size before memcpy to local buffer. (CVE-2014-0144) curl_read_cb is callback function for libcurl when data arrives. The data size passed in here is not guaranteed to be within the range of request we submitted, so we may overflow the guest IO buffer. Check the real size we have before memcpy to buffe...
vlan_enabled(E1000State *s) { return ((s->mac_reg[CTRL] & E1000_CTRL_VME) != 0); }
0
[ "CWE-120" ]
qemu
b0d9ffcd0251161c7c92f94804dcf599dfa3edeb
330,125,337,267,012,040,000,000,000,000,000,000,000
4
e1000: Discard packets that are too long if !SBP and !LPE The e1000_receive function for the e1000 needs to discard packets longer than 1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes this behavior and allocates memory based on this assumption. Signed-off-by: Michael Contreras <michael@inet...
std::basic_string<Char> str() const { return std::basic_string<Char>(&buffer_[0], buffer_.size()); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
203,065,044,675,276,550,000,000,000,000,000,000,000
3
Fix segfault on complex pointer formatting (#642)
set_vim_var_tv(int idx, typval_T *tv) { if (vimvars[idx].vv_tv_type != tv->v_type) { emsg(_(e_type_mismatch_for_v_variable)); clear_tv(tv); return FAIL; } // VV_RO is also checked when compiling, but let's check here as well. if (vimvars[idx].vv_flags & VV_RO) { semsg(_(e_cannot_change_reado...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
116,397,941,589,762,780,000,000,000,000,000,000,000
23
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.
set_omnifunc_option(void) { int retval; retval = option_set_callback_func(curbuf->b_p_ofu, &ofu_cb); if (retval == OK) set_buflocal_ofu_callback(curbuf); return retval; }
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
151,192,245,417,504,610,000,000,000,000,000,000,000
10
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig, siginfo_t __user *, uinfo) { siginfo_t info; if (copy_from_user(&info, uinfo, sizeof(siginfo_t))) return -EFAULT; /* Not even root can pretend to send signals from the kernel. * Nor can they impersonate a kill()/tgkill(), which adds source info. */ if...
0
[]
linux-2.6
243b422af9ea9af4ead07a8ad54c90d4f9b6081a
327,304,479,757,525,600,000,000,000,000,000,000,000
21
Relax si_code check in rt_sigqueueinfo and rt_tgsigqueueinfo Commit da48524eb206 ("Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code") made the check on si_code too strict. There are several legitimate places where glibc wants to queue a negative si_code different from SI_QUEUE: - This was ...
SPL_METHOD(SplDoublyLinkedList, push) { zval *value; spl_dllist_object *intern; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &value) == FAILURE) { return; } SEPARATE_ARG_IF_REF(value); intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC); spl_ptr_llist_push(intern->lli...
0
[ "CWE-416" ]
php-src
863bf294feb9ad425eadb94f288bc7f18673089d
154,598,134,405,730,550,000,000,000,000,000,000,000
16
Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
static void win_stdio_wait_func(void *opaque) { CharDriverState *chr = opaque; WinStdioCharState *stdio = chr->opaque; INPUT_RECORD buf[4]; int ret; DWORD dwSize; int i; ret = ReadConsoleInput(stdio->hStdIn, buf, ARRAY_SIZE(buf), &dwSize)...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
273,427,761,713,790,700,000,000,000,000,000,000,000
33
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static int get_derived_key(u8 *derived_key, enum derived_key_type key_type, const u8 *master_key, size_t master_keylen) { u8 *derived_buf; unsigned int derived_buf_len; int ret; derived_buf_len = strlen("AUTH_KEY") + 1 + master_keylen; if (derived_buf_len < HASH_SIZE) derived_buf_len = HASH_SIZE; derive...
0
[ "CWE-20" ]
linux
363b02dab09b3226f3bd1420dad9c72b79a42a76
70,794,506,544,644,410,000,000,000,000,000,000,000
26
KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unione...
mono_thread_has_appdomain_ref (MonoThread *thread, MonoDomain *domain) { return mono_thread_internal_has_appdomain_ref (thread->internal_thread, domain); }
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
257,938,366,210,003,700,000,000,000,000,000,000,000
4
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
GF_Err gitn_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 i; GroupIdToNameBox *ptr = (GroupIdToNameBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u16(bs, ptr->nb_entries); for (i=0; i<ptr->nb_entries; i++) { gf_bs_write_u32(bs, ptr->entries[i]...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
254,350,524,209,362,670,000,000,000,000,000,000,000
17
fixed #1587
static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) { struct inet_sock *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); struct sockaddr_in6 *addr = (struct sockaddr_in6 *) uaddr; __be32 v4addr = 0; int addr_type; int err; if (addr_len < SIN6_LEN_RFC2133) return -EINVAL; if...
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
57,411,391,748,289,840,000,000,000,000,000,000,000
77
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags) { if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) do_signal(regs, orig_i0); if (thread_info_flags & _TIF_NOTIFY_RESUME) { clear_thread_flag(TIF_NOTIFY_RESUME); tracehook_notify_resume(re...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
110,405,115,526,743,340,000,000,000,000,000,000,000
12
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...
agent_decode_alg(struct sshkey *key, u_int flags) { if (key->type == KEY_RSA) { if (flags & SSH_AGENT_RSA_SHA2_256) return "rsa-sha2-256"; else if (flags & SSH_AGENT_RSA_SHA2_512) return "rsa-sha2-512"; } else if (key->type == KEY_RSA_CERT) { if (flags & SSH_AGENT_RSA_SHA2_256) return "rsa-sha2-256-cer...
0
[ "CWE-399", "CWE-415" ]
openssh-portable
e04fd6dde16de1cdc5a4d9946397ff60d96568db
303,433,690,926,433,620,000,000,000,000,000,000,000
15
upstream: factor SSH_AGENT_CONSTRAIN_EXTENSION parsing into its own function and remove an unused variable; ok dtucker@ OpenBSD-Commit-ID: e1a938657fbf7ef0ba5e73b30365734a0cc96559
ipvs_set_srule(int cmd, ipvs_service_t *srule, virtual_server_t *vs) { /* Clean service rule */ memset(srule, 0, sizeof(ipvs_service_t)); strncpy(srule->user.sched_name, vs->sched, IP_VS_SCHEDNAME_MAXLEN); srule->af = vs->af; srule->user.flags = vs->flags; srule->user.netmask = (vs->af == AF_INET6) ? 128 : ((uin...
0
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
163,851,989,223,383,700,000,000,000,000,000,000,000
24
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
static void FVMenuRevertBackup(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontViewBase *fv = (FontViewBase *) GDrawGetUserData(gw); FVRevertBackup(fv); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
17,674,541,232,366,663,000,000,000,000,000,000,000
4
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
int uvc_register_video_device(struct uvc_device *dev, struct uvc_streaming *stream, struct video_device *vdev, struct uvc_video_queue *queue, enum v4l2_buf_type type, const struct v4l2_file_operations *fops, const struct v4l2_ioctl_ops *ioctl_ops) { int ret; /* I...
0
[ "CWE-269" ]
linux
68035c80e129c4cfec659aac4180354530b26527
181,079,295,328,812,340,000,000,000,000,000,000,000
63
media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors Way back in 2017, fuzzing the 4.14-rc2 USB stack with syzkaller kicked up the following WARNING from the UVC chain scanning code: | list_add double add: new=ffff880069084010, prev=ffff880069084010, | next=ffff880067d22298. | ----------...
format_job_cmp(struct format_job *fj1, struct format_job *fj2) { if (fj1->tag < fj2->tag) return (-1); if (fj1->tag > fj2->tag) return (1); return (strcmp(fj1->cmd, fj2->cmd)); }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
297,388,885,110,379,200,000,000,000,000,000,000,000
8
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
static void fdc_specify(void) { unsigned char spec1; unsigned char spec2; unsigned long srt; unsigned long hlt; unsigned long hut; unsigned long dtr = NOMINAL_DTR; unsigned long scale_dtr = NOMINAL_DTR; int hlt_max_code = 0x7f; int hut_max_code = 0xf; if (FDCS->need_configure && FDCS->version >= FDC_82072A) ...
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
242,171,032,523,359,980,000,000,000,000,000,000,000
75
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
std::vector<StringData> extractCodePointsFromChars(StringData utf8String, StringData expressionName) { std::vector<StringData> codePoints; std::size_t i = 0; while (i < utf8String.size()) { uassert(50698, str::stream() << "Failed to ...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
143,195,997,906,571,740,000,000,000,000,000,000,000
20
SERVER-49404 Enforce additional checks in $arrayToObject
parser_t * __open_etc_hosts(void) { parser_t *parser; parser = config_open("/etc/hosts"); #ifdef FALLBACK_TO_CONFIG_RESOLVCONF if (parser == NULL) parser = config_open("/etc/config/hosts"); #endif return parser; }
0
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
187,059,067,982,637,040,000,000,000,000,000,000,000
10
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
void tcf_exts_change(struct tcf_exts *dst, struct tcf_exts *src) { #ifdef CONFIG_NET_CLS_ACT struct tcf_exts old = *dst; *dst = *src; tcf_exts_destroy(&old); #endif }
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
275,693,216,516,148,180,000,000,000,000,000,000,000
9
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
static void e1000e_set_eecd(E1000ECore *core, int index, uint32_t val) { static const uint32_t ro_bits = E1000_EECD_PRES | E1000_EECD_AUTO_RD | E1000_EECD_SIZE_EX_MASK; core->mac[EECD] = (core->mac[EECD] & ro_bits) | (val & ...
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
18,610,278,382,700,540,000,000,000,000,000,000,000
8
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
static inline int pmd_large(pmd_t pte) { return pmd_flags(pte) & _PAGE_PSE; }
0
[ "CWE-119", "CWE-787" ]
linux
027ef6c87853b0a9df53175063028edb4950d476
116,002,393,226,249,200,000,000,000,000,000,000,000
4
mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP In many places !pmd_present has been converted to pmd_none. For pmds that's equivalent and pmd_none is quicker so using pmd_none is better. However (unless we delete pmd_present) we should provide an accurate pmd_present too. This will avoid the ri...
static void v4l_print_framebuffer(const void *arg, bool write_only) { const struct v4l2_framebuffer *p = arg; pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, height=%u, pixelformat=%c%c%c%c, bytesperline=%u, sizeimage=%u, colorspace=%d\n", p->capability, p->flags, p->base, p->fmt.width, p->fmt.heigh...
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
58,105,662,328,324,900,000,000,000,000,000,000,000
14
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
assegment_dup (struct assegment *seg) { struct assegment *new; new = assegment_new (seg->type, seg->length); memcpy (new->as, seg->as, ASSEGMENT_DATA_SIZE (new->length, 1) ); return new; }
0
[ "CWE-20" ]
quagga
7a42b78be9a4108d98833069a88e6fddb9285008
307,415,582,652,662,620,000,000,000,000,000,000,000
9
bgpd: Fix AS_PATH size calculation for long paths If you have an AS_PATH with more entries than what can be written into a single AS_SEGMENT_MAX it needs to be broken up. The code that noticed that the AS_PATH needs to be broken up was not correctly calculating the size of the resulting message. This patch addresses...
int credssp_server_authenticate(rdpCredssp* credssp) { UINT32 cbMaxToken; ULONG fContextReq; ULONG pfContextAttr; SECURITY_STATUS status; CredHandle credentials; TimeStamp expiration; PSecPkgInfo pPackageInfo; SecBuffer input_buffer; SecBuffer output_buffer; SecBufferDesc input_buffer_desc; SecBufferDesc out...
0
[ "CWE-476" ]
FreeRDP
0dc22d5a30a1c7d146b2a835b2032668127c33e9
134,795,983,133,299,350,000,000,000,000,000,000,000
243
Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically.
int llhttp__internal__c_update_type( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { state->type = 1; return 0; }
0
[ "CWE-444" ]
node
641f786bb1a1f6eb1ff8750782ed939780f2b31a
242,017,464,560,084,100,000,000,000,000,000,000,000
7
http: unset `F_CHUNKED` on new `Transfer-Encoding` Duplicate `Transfer-Encoding` header should be a treated as a single, but with original header values concatenated with a comma separator. In the light of this, even if the past `Transfer-Encoding` ended with `chunked`, we should be not let the `F_CHUNKED` to leak int...
static int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit) { struct net_device *ndev = rx_queue->ndev; struct gfar_private *priv = netdev_priv(ndev); struct rxbd8 *bdp; int i, howmany = 0; struct sk_buff *skb = rx_queue->skb; int cleaned_cnt = gfar_rxbd_unused(rx_queue); unsigned ...
1
[]
linux
d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f
200,144,639,640,968,900,000,000,000,000,000,000,000
91
gianfar: fix jumbo packets+napi+rx overrun crash When using jumbo packets and overrunning rx queue with napi enabled, the following sequence is observed in gfar_add_rx_frag: | lstatus | | skb | t | lstatus, size, flags | first | len, data_len, *...
static int qeth_peer_func_level(int level) { if ((level & 0xff) == 8) return (level & 0xff) + 0x400; if (((level >> 8) & 3) == 1) return (level & 0xff) + 0x200; return level; }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
65,934,250,110,954,360,000,000,000,000,000,000,000
8
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 selinux_ptrace_access_check(struct task_struct *child, unsigned int mode) { u32 sid = current_sid(); u32 csid = task_sid(child); if (mode & PTRACE_MODE_READ) return avc_has_perm(&selinux_state, sid, csid, SECCLASS_FILE, FILE__READ, NULL); return avc_has_perm(&selinux_state, si...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
222,966,237,254,990,960,000,000,000,000,000,000,000
13
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
static inline int nm_widen(NM self, u128_t max, u128_t *last) { u128_t mask, neta, bcst; int cmp = u128_cmp(self->neta, max); while(cmp < 0) { /* attempt widening by one bit */ mask = u128_lsh(self->mask, 1); neta = u128_and(self->neta, mask); bcst = u128_or(self->neta, u128...
0
[]
netmask
29a9c239bd1008363f5b34ffd6c2cef906f3660c
265,955,705,541,544,050,000,000,000,000,000,000,000
24
bump version to 2.4.4 * remove checks for negative unsigned ints, fixes #2 * harden error logging functions, fixes #3
static int p54u_upload_firmware_net2280(struct ieee80211_hw *dev) { struct p54u_priv *priv = dev->priv; const struct p54p_csr *devreg = (const struct p54p_csr *) P54U_DEV_BASE; int err, alen; void *buf; __le32 reg; unsigned int remains, offset; const u8 *data; buf = kmalloc(512, GFP_KERNEL); if (!buf) retur...
0
[ "CWE-416" ]
linux
6e41e2257f1094acc37618bf6c856115374c6922
54,393,338,142,279,700,000,000,000,000,000,000,000
227
p54usb: Fix race between disconnect and firmware loading The syzbot fuzzer found a bug in the p54 USB wireless driver. The issue involves a race between disconnect and the firmware-loader callback routine, and it has several aspects. One big problem is that when the firmware can't be loaded, the callback routine tri...
TEST_F(QueryPlannerTest, ContainedOrOnePredicateIsLeadingField) { addIndex(BSON("a" << 1 << "b" << 1 << "c" << 1)); addIndex(BSON("a" << 1 << "b" << 1 << "d" << 1)); runQuery(fromjson("{$and: [{a: 5}, {b: 6}, {$or: [{c: 7}, {d: 8}]}]}")); assertNumSolutions(4); assertSolutionExists( "{fetch...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
204,881,056,938,452,400,000,000,000,000,000,000,000
25
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static MZ_FORCEINLINE mz_bool mz_zip_array_resize(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_size, mz_uint growing) { if (new_size > pArray->m_capacity) { ...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
264,055,192,713,532,300,000,000,000,000,000,000,000
11
Make line_no with too large value(2**20) invalid. Fixes #124
invoke_NPN_ReleaseObject(NPObject *npobj) { npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection), npobj->referenceCount); int error = rpc_method_invoke(g_rpc_connection, RPC_METHOD_NPN_RELEASE_OBJECT, RPC_TYPE_NP_OBJECT, npobj, RPC_TYPE_INVALID); if (error != RPC_ER...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
105,737,349,113,947,810,000,000,000,000,000,000,000
25
Support all the new variables added
static int update_size(struct mddev *mddev, sector_t num_sectors) { struct md_rdev *rdev; int rv; int fit = (num_sectors == 0); if (mddev->pers->resize == NULL) return -EINVAL; /* The "num_sectors" is the number of sectors of each device that * is used. This can only make sense for arrays with redundancy. ...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
230,218,863,022,915,270,000,000,000,000,000,000,000
36
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
static int hns_nic_net_up(struct net_device *ndev) { struct hns_nic_priv *priv = netdev_priv(ndev); struct hnae_handle *h = priv->ae_handle; int i, j; int ret; ret = hns_nic_init_irq(priv); if (ret != 0) { netdev_err(ndev, "hns init irq failed! ret=%d\n", ret); return ret; } for (i = 0; i < h->q_num * 2; ...
0
[ "CWE-416" ]
linux
27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
85,840,395,540,968,750,000,000,000,000,000,000,000
46
net: hns: Fix a skb used after free bug skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x...
void __fastcall TSCPFileSystem::RenameFile(const UnicodeString FileName, const TRemoteFile * /*File*/, const UnicodeString NewName) { ExecCommand(fsRenameFile, ARRAYOFCONST((DelimitStr(FileName), DelimitStr(NewName)))); }
0
[ "CWE-20" ]
winscp
49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54
205,607,488,055,561,200,000,000,000,000,000,000,000
5
Bug 1675: Prevent SCP server sending files that were not requested https://winscp.net/tracker/1675 Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55
SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags) { struct fs_struct *fs, *new_fs = NULL; struct files_struct *fd, *new_fd = NULL; struct cred *new_cred = NULL; struct nsproxy *new_nsproxy = NULL; int do_sysvsem = 0; int err; /* * If unsharing a user namespace must also unshare the thread group * and u...
0
[ "CWE-416", "CWE-703" ]
linux
2b7e8665b4ff51c034c55df3cff76518d1a9ee3a
168,258,154,091,196,200,000,000,000,000,000,000,000
115
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...
static int __tipc_nl_add_sk_publ(struct sk_buff *skb, struct netlink_callback *cb, struct publication *publ) { void *hdr; struct nlattr *attrs; hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, &tipc_genl_family, NLM_F_MULTI, TIPC_NL_PUBL_GET); if (!hdr) goto msg_cancel; att...
0
[ "CWE-703" ]
linux
45e093ae2830cd1264677d47ff9a95a71f5d9f9c
284,738,382,902,578,330,000,000,000,000,000,000,000
37
tipc: check nl sock before parsing nested attributes Make sure the socket for which the user is listing publication exists before parsing the socket netlink attributes. Prior to this patch a call without any socket caused a NULL pointer dereference in tipc_nl_publ_dump(). Tested-and-reported-by: Baozeng Ding <splovi...