func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void gf_sys_close() { if (sys_init > 0) { sys_init --; if (sys_init) return; /*prevent any call*/ last_update_time = 0xFFFFFFFF; #if defined(WIN32) && !defined(_WIN32_WCE) timeEndPeriod(1); MyGetSystemTimes = NULL; MyGetProcessMemoryInfo = NULL; MyQuerySystemInfo = NULL; if (psapi_hinst) FreeLibrar...
0
[ "CWE-787" ]
gpac
f3698bb1bce62402805c3fda96551a23101a32f9
219,090,953,890,124,700,000,000,000,000,000,000,000
19
fix buffer overrun in gf_bin128_parse closes #1204 closes #1205
static int __init nf_defrag_init(void) { int ret = 0; ret = nf_ct_frag6_init(); if (ret < 0) { pr_err("nf_defrag_ipv6: can't initialize frag6.\n"); return ret; } ret = nf_register_hooks(ipv6_defrag_ops, ARRAY_SIZE(ipv6_defrag_ops)); if (ret < 0) { pr_err("nf_defrag_ipv6: can't register hooks\n"); goto cl...
0
[ "CWE-787" ]
linux
9b57da0630c9fd36ed7a20fc0f98dc82cc0777fa
109,093,855,796,858,150,000,000,000,000,000,000,000
21
netfilter: ipv6: nf_defrag: drop mangled skb on ream error Dmitry Vyukov reported GPF in network stack that Andrey traced down to negative nh offset in nf_ct_frag6_queue(). Problem is that all network headers before fragment header are pulled. Normal ipv6 reassembly will drop the skb when errors occur further down th...
static int parse_json(ogs_sbi_message_t *message, char *content_type, char *json) { int rv = OGS_OK; cJSON *item = NULL; ogs_assert(message); if (!json) return OGS_OK; if (!content_type) { ogs_error("No Content-type"); return OGS_ERROR; } ogs_log_print(OGS...
1
[ "CWE-476", "CWE-787" ]
open5gs
d919b2744cd05abae043490f0a3dd1946c1ccb8c
219,743,315,067,547,740,000,000,000,000,000,000,000
847
[AMF] fix the memory problem (#1247) 1. memory corruption - Overflow num_of_part in SBI message 2. null pointer dereference - n2InfoContent->ngap_ie_type
TEST_P(Security, BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessNone_validation_ok_disable_discovery_disable_access_none) // *INDENT-ON* { PubSubReader<HelloWorldType> reader(TEST_TOPIC_NAME); PubSubWriter<HelloWorldType> writer(TEST_TOPIC_NAME); std::string governance_f...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
282,788,622,178,109,940,000,000,000,000,000,000,000
9
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
Item *Item_sum_xor::copy_or_same(THD* thd) { return new (thd->mem_root) Item_sum_xor(thd, this); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
292,308,110,784,976,860,000,000,000,000,000,000,000
4
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static int try_atomic_semop (struct sem_array * sma, struct sembuf * sops, int nsops, struct sem_undo *un, int pid) { int result, sem_op; struct sembuf *sop; struct sem * curr; for (sop = sops; sop < sops + nsops; sop++) { curr = sma->sem_base + sop->sem_num; sem_op = sop->sem_op; result = curr->semv...
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
102,923,440,973,002,700,000,000,000,000,000,000,000
60
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_radiotap_iterator iterator; struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *info ...
1
[ "CWE-476" ]
linux
bddc0c411a45d3718ac535a070f349be8eca8d48
22,076,804,791,435,667,000,000,000,000,000,000,000
205
mac80211: Fix NULL ptr deref for injected rate info The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") moved the code to validate the radiotap header from ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is possible to share more code with the new Tx queue selecti...
void CWebServer::GetJSonPage(WebEmSession & session, const request& req, reply & rep) { Json::Value root; root["status"] = "ERR"; std::string rtype = request::findValue(&req, "type"); if (rtype == "command") { std::string cparam = request::findValue(&req, "param"); if (cparam.empty()) { ...
0
[ "CWE-89" ]
domoticz
ee70db46f81afa582c96b887b73bcd2a86feda00
54,334,920,797,753,420,000,000,000,000,000,000,000
39
Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!)
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *str = &EX_T(opline->result.u.var).tmp_var; zval *var = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); zval var_copy; int use_copy = 0; if (IS_TMP_VAR == IS_UNUSED) { /* Initi...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
234,616,258,490,563,300,000,000,000,000,000,000,000
39
- 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
EvalPlanQualStart(EPQState *epqstate, EState *parentestate, Plan *planTree) { EState *estate; int rtsize; MemoryContext oldcontext; ListCell *l; rtsize = list_length(parentestate->es_range_table); epqstate->estate = estate = CreateExecutorState(); oldcontext = MemoryContextSwitchTo(estate->es_query_cxt...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
143,052,020,624,584,310,000,000,000,000,000,000,000
128
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
xmlBufCreateStatic(void *mem, size_t size) { xmlBufPtr ret; if (mem == NULL) return(NULL); ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf)); if (ret == NULL) { xmlBufMemoryError(NULL, "creating buffer"); return(NULL); } ret->use = size; ret->size = size; UPDATE_COMPAT(ret);...
0
[ "CWE-190" ]
libxml2
6c283d83eccd940bcde15634ac8c7f100e3caefd
70,730,888,989,553,870,000,000,000,000,000,000,000
20
[CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer In several places, the code handling string buffers didn't check for integer overflow or used wrong types for buffer sizes. This could result in out-of-bounds writes or other memory errors when working on large, multi-gigabyte buffers. Thanks to Felix Wil...
STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *c, void *user) { stbi__context s; stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); return stbi__is_16_main(&s); }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
334,650,427,031,106,240,000,000,000,000,000,000,000
6
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
table_map Item_direct_view_ref::not_null_tables() const { if (get_depended_from()) return 0; if (!( view->merged || !view->table)) return view->table->map; TABLE *tab= get_null_ref_table(); if (tab == NO_NULL_TABLE || (*ref)->used_tables()) return (*ref)->not_null_tables(); return get_null_ref_t...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
215,298,013,882,631,400,000,000,000,000,000,000,000
11
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
int ath6kl_wmi_probe_report_req_cmd(struct wmi *wmi, u8 if_idx, bool enable) { struct sk_buff *skb; struct wmi_probe_req_report_cmd *p; skb = ath6kl_wmi_get_new_buf(sizeof(*p)); if (!skb) return -ENOMEM; ath6kl_dbg(ATH6KL_DBG_WMI, "probe_report_req_cmd: enable=%u\n", enable); p = (struct wmi_probe_req_re...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
167,114,189,926,300,630,000,000,000,000,000,000,000
16
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
rsvp_intserv_print(netdissect_options *ndo, const u_char *tptr, u_short obj_tlen) { int parameter_id,parameter_length; union { float f; uint32_t i; } bw; if (obj_tlen < 4) return 0; parameter_id = *(tptr); ND_TCHECK2(*(tptr + 2), 2); parameter_length = EXTRACT_1...
0
[ "CWE-125", "CWE-787" ]
tcpdump
3c8a2b0e91d8d8947e89384dacf6b54673083e71
221,789,205,880,826,300,000,000,000,000,000,000,000
155
CVE-2017-13048/RSVP: fix decoding of Fast Reroute objects In rsvp_obj_print() the case block for Class-Num 205 (FAST_REROUTE) from RFC 4090 Section 4.1 could over-read accessing the buffer contents before making the bounds check. Rearrange those steps the correct way around. This fixes a buffer over-read discovered b...
const char *gnu_basename(const char *path) { const char *last_slash = strrchr(path, '/'); if (!last_slash) return path; return last_slash+1; }
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
316,962,130,012,899,520,000,000,000,000,000,000,000
6
fixing CVE-2022-31214
get_local_name(void) { struct utsname name; struct addrinfo hints, *res = NULL; char *canonname = NULL; size_t len = 0; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_flags = AI_CANONNAME; if (uname(&name) < 0) return NULL; if (getaddrinfo(name.nodename, NULL, &hints, &res) != 0) return NULL; if ...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
90,395,193,831,403,440,000,000,000,000,000,000,000
28
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
t_respond (int j) { if (!t[j].active) return; if (debug_level) log_querydone (&t[j].active, response_len); response_id (t[j].id); t[j].len = response_len + 2; t_free (j); t[j].buf = alloc (response_len + 2); if (!t[j].buf) { t_close (j); return; } ...
0
[ "CWE-362" ]
ndjbdns
177b5522e9b3d25778001c8cebfddd4d2973fcfd
243,319,059,927,239,760,000,000,000,000,000,000,000
22
Merge identical outgoing requests - patch 2. This patch fixes dnscache to combine *same* client queries into one single outgoing request, thus securing the server from possible cache poisoning attacks. The merges operation takes place in the dns_transmit layer, rather than between query and dns_transmit layers, as don...
free_int_stack(int_stack* s) { if (IS_NOT_NULL(s)) { if (IS_NOT_NULL(s->v)) xfree(s->v); xfree(s); } }
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
136,579,011,284,177,070,000,000,000,000,000,000,000
8
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
static int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp, int idx) { int i; if (sp->unsync) for (i=0; i < pvec->nr; i++) if (pvec->page[i].sp == sp) return 0; pvec->page[pvec->nr].sp = sp; pvec->page[pvec->nr].idx = idx; pvec->nr++; return (pvec->nr == KVM_PAGE_ARRAY_NR); }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
134,308,964,477,968,680,000,000,000,000,000,000,000
15
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
Object* global_proxy() { return context()->global_proxy(); }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
270,061,168,882,309,320,000,000,000,000,000,000,000
3
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
atk_bridge_adaptor_cleanup (void) { GList *l; GSList *ls; g_return_if_fail (inited); if (!spi_global_app_data) return; spi_atk_tidy_windows (); spi_atk_deregister_event_listeners (); deregister_application (spi_global_app_data); if (spi_global_app_data->bus) { dbus_connection_remove...
0
[]
at-spi2-atk
e4f3eee2e137cd34cd427875365f458c65458164
257,549,441,429,635,970,000,000,000,000,000,000,000
53
Use XDG_RUNTIME_DIR to hold sockets, and do not make a world-writable dir If we use XDG_RUNTIME_DIR, then the directory should be owned by the appropriate user, so it should not need to be world-writable. Hopefully this won't break accessibility for administrative apps on some distro. https://bugzilla.gnome.org/show_...
static void die(struct cstate *g, const char *message) { g->error = message; longjmp(g->kaboom, 1); }
0
[ "CWE-703", "CWE-674" ]
mujs
160ae29578054dc09fd91e5401ef040d52797e61
221,188,352,224,098,900,000,000,000,000,000,000,000
5
Issue #162: Check stack overflow during regexp compilation. Only bother checking during the first compilation pass that counts the size of the program.
static size_t cookie_hash_domain(const char *domain, const size_t len) { const char *end = domain + len; size_t h = 5381; while(domain < end) { h += h << 5; h ^= Curl_raw_toupper(*domain++); } return (h % COOKIE_HASH_SIZE); }
0
[]
curl
48d7064a49148f03942380967da739dcde1cdc24
99,251,552,421,082,000,000,000,000,000,000,000,000
12
cookie: apply limits - Send no more than 150 cookies per request - Cap the max length used for a cookie: header to 8K - Cap the max number of received Set-Cookie: headers to 50 Bug: https://curl.se/docs/CVE-2022-32205.html CVE-2022-32205 Reported-by: Harry Sintonen Closes #9048
static int replmd_update_la_val(TALLOC_CTX *mem_ctx, struct ldb_val *v, struct dsdb_dn *dsdb_dn, struct dsdb_dn *old_dsdb_dn, const struct GUID *invocation_id, uint64_t usn, uint64_t local_usn, NTTIME nttime, bool deleted) { uint32_t old_version; uint32_t version = RMD_VERSION_INITIAL; NTSTATUS status; ...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
288,929,136,601,515,350,000,000,000,000,000,000,000
23
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
dns_cache_store_msg(struct module_env* env, struct query_info* qinfo, hashvalue_type hash, struct reply_info* rep, time_t leeway, int pside, struct reply_info* qrep, uint32_t flags, struct regional* region, time_t qstarttime) { struct msgreply_entry* e; time_t ttl = rep->ttl; size_t i; /* store RRsets */ ...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
308,435,093,894,476,630,000,000,000,000,000,000,000
42
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
static void CursorLeft(int n) { if ((curr->w_x -= n) < 0) curr->w_x = 0; LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); }
0
[ "CWE-119" ]
screen
c336a32a1dcd445e6b83827f83531d4c6414e2cd
254,551,397,697,954,740,000,000,000,000,000,000,000
6
Fix stack overflow due to too deep recursion Bug: 45713 How to reproduce: Run this command inside screen $ printf '\x1b[10000000T' screen will recursively call MScrollV to depth n/256. This is time consuming and will overflow stack if n is huge.
e_util_can_use_collection_as_credential_source (ESource *collection_source, ESource *child_source) { gboolean can_use_collection = FALSE; if (collection_source) g_return_val_if_fail (E_IS_SOURCE (collection_source), FALSE); g_return_val_if_fail (E_IS_SOURCE (child_source), FALSE); if (collection_source &&...
0
[ "CWE-295" ]
evolution-data-server
6672b8236139bd6ef41ecb915f4c72e2a052dba5
229,170,838,211,980,800,000,000,000,000,000,000,000
80
Let child source with 'none' authentication method use collection source authentication That might be the same as having set NULL authentication method. Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
struct MACH0_(obj_t)* MACH0_(new_buf_steal)(RBuffer *buf, bool verbose) { struct MACH0_(obj_t) *bin = R_NEW0 (struct MACH0_(obj_t)); if (!bin) { return NULL; } bin->kv = sdb_new (NULL, "bin.mach0", 0); bin->size = r_buf_size (buf); bin->verbose = verbose; bin->b = buf; if (!init (bin)) { return MACH0_(mach0...
0
[ "CWE-415", "CWE-125" ]
radare2
60208765887f5f008b3b9a883f3addc8bdb9c134
207,028,843,362,120,540,000,000,000,000,000,000,000
14
Fix #9970 - heap oobread in mach0 parser (#10026)
void __init_work(struct work_struct *work, int onstack) { if (onstack) debug_object_init_on_stack(work, &work_debug_descr); else debug_object_init(work, &work_debug_descr); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
23,055,147,572,793,383,000,000,000,000,000,000,000
7
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
const CHARSET_INFO *charset() { return thd->charset(); }
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
18,543,593,970,159,333,000,000,000,000,000,000,000
1
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
xfs_alloc_fix_freelist( struct xfs_alloc_arg *args, /* allocation argument structure */ int flags) /* XFS_ALLOC_FLAG_... */ { struct xfs_mount *mp = args->mp; struct xfs_perag *pag = args->pag; struct xfs_trans *tp = args->tp; struct xfs_buf *agbp = NULL; struct xfs_buf *agflbp = NULL; struct xfs_alloc_arg ...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
d0c7feaf87678371c2c09b3709400be416b2dc62
130,830,654,740,065,510,000,000,000,000,000,000,000
160
xfs: add agf freeblocks verify in xfs_agf_verify We recently used fuzz(hydra) to test XFS and automatically generate tmp.img(XFS v5 format, but some metadata is wrong) xfs_repair information(just one AG): agf_freeblks 0, counted 3224 in ag 0 agf_longest 536874136, counted 3224 in ag 0 sb_fdblocks 613, counted 3228 T...
bool has_pending_exception() { return !thread_local_top_.pending_exception_->IsTheHole(); }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
156,750,645,339,221,500,000,000,000,000,000,000,000
3
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
DefRewrite(y, xs, xe, rend, doit) int y, xs, xe, doit; struct mchar *rend; { return EXPENSIVE; }
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
40,871,857,431,637,054,000,000,000,000,000,000,000
6
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 ...
smb2_dump_share_caps(struct seq_file *m, struct cifs_tcon *tcon) { seq_puts(m, "\n\tShare Capabilities:"); if (tcon->capabilities & SMB2_SHARE_CAP_DFS) seq_puts(m, " DFS,"); if (tcon->capabilities & SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY) seq_puts(m, " CONTINUOUS AVAILABILITY,"); if (tcon->capabilities & SMB2_S...
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
333,389,454,145,594,140,000,000,000,000,000,000,000
31
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
static int nested_svm_check_permissions(struct vcpu_svm *svm) { if (!(svm->vcpu.arch.efer & EFER_SVME) || !is_paging(&svm->vcpu)) { kvm_queue_exception(&svm->vcpu, UD_VECTOR); return 1; } if (svm->vmcb->save.cpl) { kvm_inject_gp(&svm->vcpu, 0); return 1; } return 0; }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
280,070,526,025,400,350,000,000,000,000,000,000,000
15
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
void LZ4_init(LZ4_stream_t_internal* lz4ds, const BYTE* base) { MEM_INIT(lz4ds->hashTable, 0, LZ4_STREAMSIZE); lz4ds->bufferStart = base; }
1
[ "CWE-20" ]
lz4
da5373197e84ee49d75b8334d4510689731d6e90
153,002,927,917,601,670,000,000,000,000,000,000,000
5
Fixed : issue 52 (reported by Ludwig Strigeus)
restore_entry(struct archive_write_disk *a) { int ret = ARCHIVE_OK, en; if (a->flags & ARCHIVE_EXTRACT_UNLINK && !S_ISDIR(a->mode)) { /* * TODO: Fix this. Apparently, there are platforms * that still allow root to hose the entire filesystem * by unlinking a dir. The S_ISDIR() test above * prevents us...
0
[ "CWE-20", "CWE-476" ]
libarchive
dfd6b54ce33960e420fb206d8872fb759b577ad9
205,448,752,594,458,250,000,000,000,000,000,000,000
167
Fixes for Issue #745 and Issue #746 from Doran Moppert.
find_KRB5SignedPath(krb5_context context, const AuthorizationData *ad, krb5_data *data) { AuthorizationData child; krb5_error_code ret; int pos; if (ad == NULL || ad->len == 0) return KRB5KDC_ERR_PADATA_TYPE_NOSUPP; pos = ad->len - 1; if (ad->val[pos].ad_type != KRB5_AUTHDATA_IF_...
0
[ "CWE-476" ]
heimdal
04171147948d0a3636bc6374181926f0fb2ec83a
196,084,083,807,554,500,000,000,000,000,000,000,000
41
kdc: validate sname in TGS-REQ In tgs_build_reply(), validate the server name in the TGS-REQ is present before dereferencing.
gdk_pixbuf_get_byte_length (const GdkPixbuf *pixbuf) { g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), -1); return ((pixbuf->height - 1) * pixbuf->rowstride + pixbuf->width * ((pixbuf->n_channels * pixbuf->bits_per_sample + 7) / 8)); }
0
[]
gdk-pixbuf
deb78d971c4bcb9e3ccbb71e7925bc6baa707188
37,218,460,485,188,764,000,000,000,000,000,000,000
7
Use g_try_malloc_n where it makes sense This lets us avoid some manual overflow checks.
static int bap_setup(struct airo_info *ai, u16 rid, u16 offset, int whichbap ) { int timeout = 50; int max_tries = 3; OUT4500(ai, SELECT0+whichbap, rid); OUT4500(ai, OFFSET0+whichbap, offset); while (1) { int status = IN4500(ai, OFFSET0+whichbap); if (status & BAP_BUSY) { /* This isn't...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
270,034,505,927,562,630,000,000,000,000,000,000,000
34
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static void get_field_name_and_type (MonoObject *field, char **name, MonoType **type) { MonoClass *klass = mono_object_class (field); if (strcmp (klass->name, "FieldBuilder") == 0) { MonoReflectionFieldBuilder *fb = (MonoReflectionFieldBuilder *)field; *name = mono_string_to_utf8 (fb->name); *type = mono_reflec...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
333,164,747,430,392,040,000,000,000,000,000,000,000
13
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static int __init slab_max_order_setup(char *str) { get_option(&str, &slab_max_order); slab_max_order = slab_max_order < 0 ? 0 : min(slab_max_order, MAX_ORDER - 1); slab_max_order_set = true; return 1; }
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
293,621,240,102,814,500,000,000,000,000,000,000,000
9
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
extract_pack_stream(struct archive_read *a, size_t minimum) { struct _7zip *zip = (struct _7zip *)a->format->data; ssize_t bytes_avail; int r; if (zip->codec == _7Z_COPY && zip->codec2 == (unsigned long)-1) { if (minimum == 0) minimum = 1; if (__archive_read_ahead(a, minimum, &bytes_avail) == NULL || ...
0
[ "CWE-190", "CWE-125" ]
libarchive
e79ef306afe332faf22e9b442a2c6b59cb175573
67,257,010,291,811,580,000,000,000,000,000,000,000
159
Issue #718: Fix TALOS-CAN-152 If a 7-Zip archive declares a rediculously large number of substreams, it can overflow an internal counter, leading a subsequent memory allocation to be too small for the substream data. Thanks to the Open Source and Threat Intelligence project at Cisco for reporting this issue.
static void __net_exit ip_tables_net_exit(struct net *net) { xt_proto_fini(net, NFPROTO_IPV4); }
0
[ "CWE-200" ]
linux-2.6
78b79876761b86653df89c48a7010b5cbd41a84a
289,264,801,264,763,800,000,000,000,000,000,000,000
4
netfilter: ip_tables: fix infoleak to userspace Structures ipt_replace, compat_ipt_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sensitive in...
static int zlib_stateful_compress_block(COMP_CTX *ctx, unsigned char *out, unsigned int olen, unsigned char *in, unsigned int ilen) { int err = Z_OK; struct zlib_state *state = (struct zlib_state *)CRYPTO_get_ex_data(&ctx->ex_data, zlib_stateful_ex_idx); if (state == NULL) return -1; state->ostream.next_...
0
[ "CWE-399" ]
openssl
1b31b5ad560b16e2fe1cad54a755e3e6b5e778a3
285,263,019,612,552,700,000,000,000,000,000,000,000
26
Modify compression code so it avoids using ex_data free functions. This stops applications that call CRYPTO_free_all_ex_data() prematurely leaking memory.
int js_isstring(js_State *J, int idx) { enum js_Type t = stackidx(J, idx)->type; return t == JS_TSHRSTR || t == JS_TLITSTR || t == JS_TMEMSTR; }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
70,664,880,215,725,060,000,000,000,000,000,000,000
1
Fix 697401: Error when dropping extra arguments to lightweight functions.
ElectronBrowserClient::~ElectronBrowserClient() { DCHECK(g_browser_client); g_browser_client = nullptr; }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
169,821,305,057,502,710,000,000,000,000,000,000,000
4
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
void check_default_gw(uint32_t defaultgw) { assert(defaultgw); if (cfg.bridge0.configured) { char *rv = in_netrange(defaultgw, cfg.bridge0.ip, cfg.bridge0.mask); if (rv == 0) return; } if (cfg.bridge1.configured) { char *rv = in_netrange(defaultgw, cfg.bridge1.ip, cfg.bridge1.mask); if (rv == 0) retur...
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
74,100,018,719,509,800,000,000,000,000,000,000,000
26
fixing CVE-2022-31214
static inline void mm_nr_pmds_init(struct mm_struct *mm) {}
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
148,470,750,488,577,140,000,000,000,000,000,000,000
1
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 ...
bool asn1_check_OID(struct asn1_data *data, const char *OID) { char *id; if (!asn1_read_OID(data, data, &id)) return false; if (strcmp(id, OID) != 0) { talloc_free(id); data->has_error = true; return false; } talloc_free(id); return true; }
0
[ "CWE-399" ]
samba
9d989c9dd7a5b92d0c5d65287935471b83b6e884
298,740,119,682,734,160,000,000,000,000,000,000,000
14
CVE-2015-7540: lib: util: Check *every* asn1 return call and early return. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep...
kex_new(struct ssh *ssh, char *proposal[PROPOSAL_MAX], struct kex **kexp) { struct kex *kex; int r; *kexp = NULL; if ((kex = calloc(1, sizeof(*kex))) == NULL) return SSH_ERR_ALLOC_FAIL; if ((kex->peer = sshbuf_new()) == NULL || (kex->my = sshbuf_new()) == NULL) { r = SSH_ERR_ALLOC_FAIL; goto out; } i...
0
[ "CWE-522", "CWE-399" ]
openssh-portable
ec165c392ca54317dbe3064a8c200de6531e89ad
102,825,791,540,485,660,000,000,000,000,000,000,000
24
upstream commit Unregister the KEXINIT handler after message has been received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause allocation of up to 128MB -- until the connection is closed. Reported by shilei-c at 360.cn Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
static int do_proc_readlink(struct path *path, char __user *buffer, int buflen) { char *tmp = (char*)__get_free_page(GFP_TEMPORARY); char *pathname; int len; if (!tmp) return -ENOMEM; pathname = d_path(path, tmp, PAGE_SIZE); len = PTR_ERR(pathname); if (IS_ERR(pathname)) goto out; len = tmp + PAGE_SIZE - ...
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
61,326,455,424,399,440,000,000,000,000,000,000,000
23
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
base::Optional<base::TimeDelta> GetCursorBlinkInterval() { #if defined(OS_MACOSX) base::TimeDelta interval; if (ui::TextInsertionCaretBlinkPeriod(&interval)) return interval; #elif defined(OS_LINUX) if (auto* linux_ui = views::LinuxUI::instance()) return linux_ui->GetCursorBlinkInterval(); #elif defined(O...
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
7,318,234,986,567,946,000,000,000,000,000,000,000
18
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
static PHP_FUNCTION(xmlwriter_write_attribute) { zval *pind; xmlwriter_object *intern; xmlTextWriterPtr ptr; char *name, *content; int name_len, content_len, retval; #ifdef ZEND_ENGINE_2 zval *this = getThis(); if (this) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &con...
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
45,726,460,293,144,290,000,000,000,000,000,000,000
40
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
xmlStopParser(xmlParserCtxtPtr ctxt) { if (ctxt == NULL) return; ctxt->instate = XML_PARSER_EOF; ctxt->disableSAX = 1; if (ctxt->input != NULL) { ctxt->input->cur = BAD_CAST""; ctxt->input->base = ctxt->input->cur; } }
1
[ "CWE-119" ]
libxml2
e50ba8164eee06461c73cd8abb9b46aa0be81869
184,321,699,411,799,870,000,000,000,000,000,000,000
10
Improve handling of xmlStopParser() Add a specific parser error Try to stop parsing as quickly as possible
static uint GetVersFromFPI(ctmbstr fpi) { uint i; for (i = 0; W3C_Doctypes[i].name; ++i) if (W3C_Doctypes[i].fpi != NULL && TY_(tmbstrcasecmp)(W3C_Doctypes[i].fpi, fpi) == 0) return W3C_Doctypes[i].vers; return 0; }
0
[ "CWE-119" ]
tidy-html5
c18f27a58792f7fbd0b30a0ff50d6b40a82f940d
190,941,175,760,321,280,000,000,000,000,000,000,000
10
Issue #217 - avoid len going negative, ever...
void Http2Stream::EmitStatistics() { CHECK_NOT_NULL(session()); if (LIKELY(!HasHttp2Observer(env()))) return; double start = statistics_.start_time / 1e6; double duration = (PERFORMANCE_NOW() / 1e6) - start; std::unique_ptr<Http2StreamPerformanceEntry> entry = std::make_unique<Http2StreamPerforman...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
119,011,231,421,356,620,000,000,000,000,000,000,000
20
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
FakeRawConnection(SharedConnectionWrapper& shared_connection, Event::TestTimeSystem& time_system) : FakeConnectionBase(shared_connection, time_system) {}
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
203,868,462,496,334,180,000,000,000,000,000,000,000
2
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static input_translation_t *add_translation_table(exporter_ipfix_domain_t *exporter, uint16_t id) { input_translation_t **table; table = &(exporter->input_translation_table); while ( *table ) { table = &((*table)->next); } // Allocate enough space for all potential ipfix tags, which we support // so template r...
1
[]
nfdump
ff0e855bd1f51bed9fc5d8559c64d3cfb475a5d8
330,926,985,164,625,880,000,000,000,000,000,000,000
29
Fix security issues in netflow_v9.c and ipfix.c
int ZEXPORT inflatePrime(strm, bits, value) z_streamp strm; int bits; int value; { struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (bits < 0) { state->hold = 0; state->bits = 0; ...
0
[ "CWE-703", "CWE-189" ]
zlib
e54e1299404101a5a9d0cf5e45512b543967f958
176,885,002,440,574,930,000,000,000,000,000,000,000
20
Avoid shifts of negative values inflateMark(). The C standard says that bit shifts of negative integers is undefined. This casts to unsigned values to assure a known result.
struct ldb_dn *ldb_dn_map_local(struct ldb_module *module, void *mem_ctx, struct ldb_dn *dn) { const struct ldb_map_context *data = map_get_context(module); struct ldb_context *ldb; struct ldb_dn *newdn; const struct ldb_map_attribute *map; enum ldb_map_attr_type map_type; const char *name; struct ldb_val value;...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
64,259,454,126,753,690,000,000,000,000,000,000,000
75
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
__wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr_exclusive) { unsigned long flags; int sync = 1; if (unlikely(!q)) return; if (unlikely(!nr_exclusive)) sync = 0; spin_lock_irqsave(&q->lock, flags); __wake_up_common(q, mode, nr_exclusive, sync, NULL); spin_unlock_irqrestore(&q->lock, flags); ...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
266,694,048,628,572,360,000,000,000,000,000,000,000
15
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
int wc_ecc_get_curve_idx(int curve_id) { int curve_idx; for (curve_idx = 0; ecc_sets[curve_idx].size != 0; curve_idx++) { if (curve_id == ecc_sets[curve_idx].id) break; } if (ecc_sets[curve_idx].size == 0) { return ECC_CURVE_INVALID; } return curve_idx; }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
228,367,795,317,145,330,000,000,000,000,000,000,000
12
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
static int submit_data_twice_on_frame_send_callback(nghttp2_session *session, const nghttp2_frame *frame, void *user_data) { static int called = 0; int rv; nghttp2_data_provider data_prd; (void)user_data; ...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
317,587,410,867,021,000,000,000,000,000,000,000,000
20
Add nghttp2_option_set_max_outbound_ack
cmd_loadBuffer(Buffer *buf, int prop, int linkid) { if (buf == NULL) { disp_err_message("Can't load string", FALSE); } else if (buf != NO_BUFFER) { buf->bufferprop |= (BP_INTERNAL | prop); if (!(buf->bufferprop & BP_NO_URL)) copyParsedURL(&buf->currentURL, &Currentbuf->currentURL); if (linkid != LB...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
144,441,919,344,301,780,000,000,000,000,000,000,000
17
Make temporary directory safely when ~/.w3m is unwritable
static int ipsecrequests_to_migrate(struct sadb_x_ipsecrequest *rq1, int len, struct xfrm_migrate *m) { int err; struct sadb_x_ipsecrequest *rq2; int mode; if (len < sizeof(*rq1) || len < rq1->sadb_x_ipsecrequest_len || rq1->sadb_x_ipsecrequest_len < sizeof(*rq1)) return -EINVAL; /* old endoi...
0
[]
linux
096f41d3a8fcbb8dde7f71379b1ca85fe213eded
232,338,011,128,825,000,000,000,000,000,000,000,000
50
af_key: Fix sadb_x_ipsecrequest parsing The parsing of sadb_x_ipsecrequest is broken in a number of ways. First of all we're not verifying sadb_x_ipsecrequest_len. This is needed when the structure carries addresses at the end. Worse we don't even look at the length when we parse those optional addresses. The migra...
static int get_sseu(struct i915_gem_context *ctx, struct drm_i915_gem_context_param *args) { struct drm_i915_gem_context_param_sseu user_sseu; struct intel_engine_cs *engine; struct intel_context *ce; if (args->size == 0) goto out; else if (args->size < sizeof(user_sseu)) return -EINVAL; if (copy_from...
0
[ "CWE-416" ]
linux
7dc40713618c884bf07c030d1ab1f47a9dc1f310
35,714,262,759,139,818,000,000,000,000,000,000,000
45
drm/i915: Introduce a mutex for file_priv->context_idr Define a mutex for the exclusive use of interacting with the per-file context-idr, that was previously guarded by struct_mutex. This allows us to reduce the coverage of struct_mutex, with a view to removing the last bits coordinating GEM context later. (In the sho...
PHP_FUNCTION(mb_regex_encoding) { size_t argc = ZEND_NUM_ARGS(); char *encoding; int encoding_len; OnigEncoding mbctype; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &encoding, &encoding_len) == FAILURE) { return; } if (argc == 0) { const char *retval = _php_mb_regex_mbctype2name(MBREX(curren...
0
[ "CWE-415" ]
php-src
5b597a2e5b28e2d5a52fc1be13f425f08f47cb62
278,365,099,767,256,480,000,000,000,000,000,000,000
31
Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free
void SSL_SESSION_free(SSL_SESSION *ss) { int i; if(ss == NULL) return; i=CRYPTO_add(&ss->references,-1,CRYPTO_LOCK_SSL_SESSION); #ifdef REF_PRINT REF_PRINT("SSL_SESSION",ss); #endif if (i > 0) return; #ifdef REF_CHECK if (i < 0) { fprintf(stderr,"SSL_SESSION_free, bad reference count\n"); abort(); /...
1
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
294,278,236,621,190,470,000,000,000,000,000,000,000
47
Add SRP support.
rsvg_filter_get_bg (RsvgFilterContext * ctx) { if (!ctx->bg_surface) ctx->bg_surface = rsvg_compile_bg (ctx->ctx); return ctx->bg_surface; }
0
[]
librsvg
a51919f7e1ca9c535390a746fbf6e28c8402dc61
104,212,322,861,856,470,000,000,000,000,000,000,000
7
rsvg: Add rsvg_acquire_node() This function does proper recursion checks when looking up resources from URLs and thereby helps avoiding infinite loops when cyclic references span multiple types of elements.
njs_vmcode_object_copy(njs_vm_t *vm, njs_value_t *value, njs_value_t *invld) { njs_object_t *object; njs_function_t *function; switch (value->type) { case NJS_OBJECT: object = njs_object_value_copy(vm, value); if (njs_slow_path(object == NULL)) { return NJS_ERROR; ...
0
[ "CWE-703", "CWE-754" ]
njs
222d6fdcf0c6485ec8e175f3a7b70d650c234b4e
170,456,891,223,436,340,000,000,000,000,000,000,000
33
Fixed njs_vmcode_interpreter() when "toString" conversion fails. Previously, while interpreting a user function, njs_vmcode_interpreter() might return prematurely when an error happens. This is not correct because the current frame has to be unwound (or exception caught) first. The fix is exit through only 5 appropr...
void bt_mesh_pb_adv_recv(struct net_buf_simple *buf) { struct prov_rx rx; if (!link.cb) { return; } if (buf->len < 6) { BT_WARN("Too short provisioning packet (len %u)", buf->len); return; } rx.link_id = net_buf_simple_pull_be32(buf); rx.xact_id = net_buf_simple_pull_u8(buf); rx.gpc = net_buf_simple_pu...
0
[ "CWE-787" ]
zephyr
6ec31c852049641095f2cdf25591f2e1bff86774
68,126,290,976,235,860,000,000,000,000,000,000,000
25
Bluetooth: Mesh: Check SegN when receiving Transaction Start PDU When receiving Transaction Start PDU, assure that number of segments needed to send a Provisioning PDU with TotalLength size is equal to SegN value provided in the Transaction Start PDU. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no> (cher...
sc_asn1_decode_object_id(const u8 *inbuf, size_t inlen, struct sc_object_id *id) { int a; const u8 *p = inbuf; int *octet; if (inlen == 0 || inbuf == NULL || id == NULL) return SC_ERROR_INVALID_ARGUMENTS; sc_init_oid(id); octet = id->value; a = *p; *octet++ = a / 40; *octet++ = a % 40; inlen--; while (...
0
[ "CWE-119", "CWE-787" ]
OpenSC
412a6142c27a5973c61ba540e33cdc22d5608e68
205,598,957,171,284,200,000,000,000,000,000,000,000
36
fixed out of bounds access of ASN.1 Bitstring Credit to OSS-Fuzz
static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op) { if ((op & MO_BSWAP) != devend_memop(mr->ops->endianness)) { switch (op & MO_SIZE) { case MO_8: break; case MO_16: *data = bswap16(*data); break; case MO_32: *da...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
231,684,797,920,146,730,000,000,000,000,000,000,000
20
Fix crash when mapping a big memory and calling uc_close
static void unix_sock_destructor(struct sock *sk) { struct unix_sock *u = unix_sk(sk); skb_queue_purge(&sk->sk_receive_queue); WARN_ON(refcount_read(&sk->sk_wmem_alloc)); WARN_ON(!sk_unhashed(sk)); WARN_ON(sk->sk_socket); if (!sock_flag(sk, SOCK_DEAD)) { pr_info("Attempt to release alive unix socket: %p\n", s...
0
[ "CWE-362" ]
linux
cbcf01128d0a92e131bd09f1688fe032480b65ca
235,952,769,904,793,800,000,000,000,000,000,000,000
26
af_unix: fix garbage collect vs MSG_PEEK unix_gc() assumes that candidate sockets can never gain an external reference (i.e. be installed into an fd) while the unix_gc_lock is held. Except for MSG_PEEK this is guaranteed by modifying inflight count under the unix_gc_lock. MSG_PEEK does not touch any variable protec...
static long btrfs_ioctl_set_received_subvol(struct file *file, void __user *arg) { struct btrfs_ioctl_received_subvol_args *sa = NULL; struct inode *inode = fdentry(file)->d_inode; struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_root_item *root_item = &root->root_item; struct btrfs_trans_hand...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
51,982,079,789,133,680,000,000,000,000,000,000,000
80
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
ObjectCreateEventSequence( TPM2B_AUTH *auth, // IN: authValue TPMI_DH_OBJECT *newHandle // OUT: sequence object handle ) { HASH_OBJECT *hashObject = AllocateSequenceSlot(newHandle, auth); UINT32 count; TPM_ALG_ID hash; // See if slot all...
0
[ "CWE-119" ]
libtpms
ea62fd9679f8c6fc5e79471b33cfbd8227bfed72
3,902,256,969,450,472,000,000,000,000,000,000,000
18
tpm2: Initialize a whole OBJECT before using it Initialize a whole OBJECT before using it. This is necessary since an OBJECT may also be used as a HASH_OBJECT via the ANY_OBJECT union and that HASH_OBJECT can leave bad size inidicators in TPM2B buffer in the OBJECT. To get rid of this problem we reset the whole OBJECT...
render_pixbuf_size_prepared_cb (GdkPixbufLoader *loader, gint width, gint height, EvRenderContext *rc) { int scaled_width, scaled_height; ev_render_context_compute_scaled_size (rc, width, height, &scaled_width, &scaled_height); gdk_pixbuf_loader_set_size (loader, scaled_width, sc...
0
[]
evince
717df38fd8509bf883b70d680c9b1b3cf36732ee
214,774,555,072,545,800,000,000,000,000,000,000,000
10
comics: Remove support for tar and tar-like commands When handling tar files, or using a command with tar-compatible syntax, to open comic-book archives, both the archive name (the name of the comics file) and the filename (the name of a page within the archive) are quoted to not be interpreted by the shell. But the ...
ext4_xattr_block_list(struct dentry *dentry, char *buffer, size_t buffer_size) { struct inode *inode = d_inode(dentry); struct buffer_head *bh = NULL; int error; struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode); ea_idebug(inode, "buffer=%p, buffer_size=%ld", buffer, (long)buffer_size); error = 0; ...
1
[ "CWE-241", "CWE-19" ]
linux
82939d7999dfc1f1998c4b1c12e2f19edbdff272
312,645,836,590,111,460,000,000,000,000,000,000,000
35
ext4: convert to mbcache2 The conversion is generally straightforward. The only tricky part is that xattr block corresponding to found mbcache entry can get freed before we get buffer lock for that block. So we have to check whether the entry is still valid after getting buffer lock. Signed-off-by: Jan Kara <jack@sus...
String *Item_func_lpad::val_str(String *str) { DBUG_ASSERT(fixed == 1); uint32 res_char_length,pad_char_length; /* must be longlong to avoid truncation */ longlong count= args[1]->val_int(); longlong byte_count; String *res= args[0]->val_str(&tmp_value); String *pad= args[2]->val_str(&lpad_str); if (!r...
0
[]
mysql-server
475dcde2c7856dd0050b967099a86c087d94f32f
92,130,637,790,890,970,000,000,000,000,000,000,000
88
Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD Description: my_crypt_genhash depends on the length of plaintext password. Longer the password, more is the time required to produce the transformation. An unusually large password may consume considerable amount of time...
static bool mysql_rename_partitions(ALTER_PARTITION_PARAM_TYPE *lpt) { char path[FN_REFLEN+1]; int error; DBUG_ENTER("mysql_rename_partitions"); build_table_filename(path, sizeof(path) - 1, lpt->db.str, lpt->table_name.str, "", 0); if (unlikely((error= lpt->table->file->ha_rename_partitions(path)))) { ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
196,512,019,795,081,920,000,000,000,000,000,000,000
15
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
unsigned long round_jiffies(unsigned long j) { return round_jiffies_common(j, raw_smp_processor_id(), false); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
175,528,010,420,380,900,000,000,000,000,000,000,000
4
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
static void test_bug6059() { MYSQL_STMT *stmt; const char *stmt_text; myheader("test_bug6059"); stmt_text= "SELECT 'foo' INTO OUTFILE 'x.3'"; stmt= mysql_stmt_init(mysql); (void) mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text)); DIE_UNLESS(mysql_stmt_field_count(stmt) == 0); mysql_stmt_close(st...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
83,781,946,722,013,280,000,000,000,000,000,000,000
14
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...
void CSoundFile::UpdateS3MEffectMemory(ModChannel *pChn, ModCommand::PARAM param) const { pChn->nOldVolumeSlide = param; // Dxy / Kxy / Lxy pChn->nOldPortaUp = param; // Exx / Fxx pChn->nOldPortaDown = param; // Exx / Fxx pChn->nTremorParam = param; // Ixy pChn->nArpeggio = param; // Jxy pChn->nRetrigParam = p...
0
[ "CWE-125" ]
openmpt
7ebf02af2e90f03e0dbd0e18b8b3164f372fb97c
175,042,045,306,799,800,000,000,000,000,000,000,000
12
[Fix] Possible out-of-bounds read when computing length of some IT files with pattern loops (OpenMPT: formats that are converted to IT, libopenmpt: IT/ITP/MO3), caught with afl-fuzz. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@10027 56274372-70c3-4bfc-bfc3-4c3a0b034d27
static struct ldb_parse_tree *ldap_decode_filter_tree(TALLOC_CTX *mem_ctx, struct asn1_data *data) { uint8_t filter_tag; struct ldb_parse_tree *ret; if (!asn1_peek_uint8(data, &filter_tag)) { return NULL; } filter_tag &= 0x1f; /* strip off the asn1 stuff */ ret = talloc(mem_ctx, struct ldb_parse...
1
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
278,543,708,998,945,240,000,000,000,000,000,000,000
332
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...
compat_get_entries(struct net *net, struct compat_ipt_get_entries __user *uptr, int *len) { int ret; struct compat_ipt_get_entries get; struct xt_table *t; if (*len < sizeof(get)) { duprintf("compat_get_entries: %u < %zu\n", *len, sizeof(get)); return -EINVAL; } if (copy_from_user(&get, uptr, sizeof(ge...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
192,309,611,879,684,850,000,000,000,000,000,000,000
46
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static inline int security_sem_alloc(struct sem_array *sma) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
283,477,028,069,836,780,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 perf_event_nop_int(struct perf_event *event, u64 value) { return 0; }
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
322,608,709,400,847,700,000,000,000,000,000,000,000
4
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
int ring_buffer_resize(struct trace_buffer *buffer, unsigned long size, int cpu_id) { struct ring_buffer_per_cpu *cpu_buffer; unsigned long nr_pages; int cpu, err = 0; /* * Always succeed at resizing a non-existent buffer: */ if (!buffer) return size; /* Make sure the requested buffer exists */ if (cp...
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
169,500,502,262,577,060,000,000,000,000,000,000,000
194
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 exit_mmap(struct mm_struct *mm) { struct mmu_gather tlb; struct vm_area_struct *vma; unsigned long nr_accounted = 0; /* mm's last user has gone, and its about to be pulled down */ mmu_notifier_release(mm); if (unlikely(mm_is_oom_victim(mm))) { /* * Manually reap the mm to free as much memory as possib...
0
[ "CWE-362" ]
linux
246c320a8cfe0b11d81a4af38fa9985ef0cc9a4c
300,328,757,055,884,100,000,000,000,000,000,000,000
68
mm/mmap.c: close race between munmap() and expand_upwards()/downwards() VMA with VM_GROWSDOWN or VM_GROWSUP flag set can change their size under mmap_read_lock(). It can lead to race with __do_munmap(): Thread A Thread B __do_munmap() detach_vmas_to_be_unmapped() mmap_write_downgrade() expand_downwards() ...
jas_image_t *jpg_decode(jas_stream_t *in, char *optstr) { struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; FILE *input_file; jpg_dest_t dest_mgr_buf; jpg_dest_t *dest_mgr = &dest_mgr_buf; JDIMENSION num_scanlines; jas_image_t *image; int ret; jpg_dec_importopts_t opts; size_t size; if (jpg_d...
1
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
311,449,610,251,867,180,000,000,000,000,000,000,000
147
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
activate_connection_cb (gpointer user_data, const char *path, GError *error) { if (error) nm_warning ("Connection activation failed: %s", error->message); applet_schedule_update_icon (NM_APPLET (user_data)); }
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
267,087,432,359,321,460,000,000,000,000,000,000,000
7
editor: prevent any registration of objects on the system bus D-Bus access-control is name-based; so requests for a specific name are allowed/denied based on the rules in /etc/dbus-1/system.d. But apparently apps still get a non-named service on the bus, and if we register *any* object even though we don't have a nam...
const GF_FilterRegister *adts_dmx_register(GF_FilterSession *session) { return NULL; }
0
[ "CWE-476", "CWE-787" ]
gpac
22774aa9e62f586319c8f107f5bae950fed900bc
300,051,462,720,438,740,000,000,000,000,000,000,000
4
fixed potential crash in adts reframer with broken streams - cf #1723
static int ext4_remount(struct super_block *sb, int *flags, char *data) { struct ext4_super_block *es; struct ext4_sb_info *sbi = EXT4_SB(sb); unsigned long old_sb_flags; struct ext4_mount_options old_opts; int enable_quota = 0; ext4_group_t g; unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO; int err = 0; ...
0
[]
linux
a45403b51582a87872927a3e0fc0a389c26867f1
66,667,862,245,016,350,000,000,000,000,000,000,000
256
ext4: always initialize the crc32c checksum driver The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mou...
//! Convert pixel values from RGB to xyY color spaces \newinstance. CImg<Tfloat> get_RGBtoxyY(const bool use_D65=true) const { return CImg<Tfloat>(*this,false).RGBtoxyY(use_D65);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
214,061,144,880,209,720,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static int store_destructor(struct results_store *del) { struct private_data *priv = del->priv; DLIST_REMOVE(priv->store, del); priv->num_stores -= 1; return 0; }
0
[ "CWE-416" ]
samba
32c333def9ad5a1c67abee320cf5f3c4f2cb1e5c
334,594,973,510,027,620,000,000,000,000,000,000,000
9
CVE-2020-10760 dsdb: Ensure a proper talloc tree for saved controls Otherwise a paged search on the GC port will fail as the ->data was not kept around for the second page of searches. An example command to produce this is bin/ldbsearch --paged -H ldap://$SERVER:3268 -U$USERNAME%$PASSWORD This shows up later in the...
CServer::CServer() : m_DemoRecorder(&m_SnapshotDelta) { m_TickSpeed = SERVER_TICK_SPEED; m_pGameServer = 0; m_CurrentGameTick = 0; m_RunServer = 1; m_pCurrentMapData = 0; m_CurrentMapSize = 0; m_MapReload = 0; m_RconClientID = IServer::RCON_CID_SERV; m_RconAuthLevel = AUTHED_ADMIN; Init(); }
0
[ "CWE-20" ]
teeworlds
a766cb44bcffcdb0b88e776d01c5ee1323d44f85
132,468,406,898,871,320,000,000,000,000,000,000,000
19
fixed a server crash
has_tablespace_privilege_name(PG_FUNCTION_ARGS) { text *tablespacename = PG_GETARG_TEXT_P(0); text *priv_type_text = PG_GETARG_TEXT_P(1); Oid roleid; Oid tablespaceoid; AclMode mode; AclResult aclresult; roleid = GetUserId(); tablespaceoid = convert_tablespace_name(tablespacename); mode = convert_t...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
73,695,719,349,920,320,000,000,000,000,000,000,000
17
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
read_cnt_string(FILE *fd, int cnt_bytes, int *cntp) { int cnt = 0; int i; char_u *str; // read the length bytes, MSB first for (i = 0; i < cnt_bytes; ++i) { int c = getc(fd); if (c == EOF) { *cntp = SP_TRUNCERROR; return NULL; } cnt = (cnt << 8) + (unsigned)c; } *cntp ...
0
[ "CWE-787" ]
vim
7c824682d2028432ee082703ef0ab399867a089b
194,198,839,628,779,600,000,000,000,000,000,000,000
27
patch 8.2.4919: can add invalid bytes with :spellgood Problem: Can add invalid bytes with :spellgood. Solution: Check for a valid word string.