func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_FETCH_DIM_R, (!(op2_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))), ZEND_FETCH_DIM_R_INDEX, CONST|TMPVAR|CV, CONST|TMPVARCV, SPEC(NO_CONST_CONST)) { USE_OPLINE zend_free_op free_op1, free_op2; zval *container, *dim, *value; ...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
279,226,911,185,230,380,000,000,000,000,000,000,000
52
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
close_lb(PG_FUNCTION_ARGS) { #ifdef NOT_USED LINE *line = PG_GETARG_LINE_P(0); BOX *box = PG_GETARG_BOX_P(1); #endif /* think about this one for a while */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("function \"close_lb\" not implemented"))); PG_RETURN_NULL(); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
142,125,185,426,255,750,000,000,000,000,000,000,000
14
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static int __devinit airo_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pent) { struct net_device *dev; if (pci_enable_device(pdev)) return -ENODEV; pci_set_master(pdev); if (pdev->device == 0x5000 || pdev->device == 0xa504) dev = _init_airo_card(pdev->irq, pdev->resource[0].start, 0, p...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
280,544,295,079,812,200,000,000,000,000,000,000,000
21
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
int Field_temporal_with_date::store_decimal(const my_decimal *d) { ulonglong nr; ulong sec_part; int error; MYSQL_TIME ltime; longlong tmp; THD *thd= get_thd(); ErrConvDecimal str(d); if (my_decimal2seconds(d, &nr, &sec_part)) { tmp= -1; error= 2; } else tmp= number_to_datetime(nr, se...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
104,137,209,528,352,570,000,000,000,000,000,000,000
21
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...
njs_function_instance_length(njs_vm_t *vm, njs_object_prop_t *prop, njs_value_t *value, njs_value_t *setval, njs_value_t *retval) { njs_object_t *proto; njs_function_t *function; proto = njs_object(value); do { if (njs_fast_path(proto->type == NJS_FUNCTION)) { break; ...
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
165,071,525,453,414,280,000,000,000,000,000,000,000
27
Fixed recursive async function calls. Previously, PromiseCapability record was stored (function->context) directly in function object during a function invocation. This is not correct, because PromiseCapability record should be linked to current execution context. As a result, function->context is overwritten with c...
static void hso_free_tiomget(struct hso_serial *serial) { struct hso_tiocmget *tiocmget; if (!serial) return; tiocmget = serial->tiocmget; if (tiocmget) { usb_free_urb(tiocmget->urb); tiocmget->urb = NULL; serial->tiocmget = NULL; kfree(tiocmget); } }
0
[ "CWE-125" ]
linux
5146f95df782b0ac61abde36567e718692725c89
170,128,595,347,890,040,000,000,000,000,000,000,000
13
USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data The function hso_probe reads if_num from the USB device (as an u8) and uses it without a length check to index an array, resulting in an OOB memory read in hso_probe or hso_get_config_data. Add a length check for both locations and updated hso_probe to ...
MagickExport void *FileToBlob(const char *filename,const size_t extent, size_t *length,ExceptionInfo *exception) { int file; MagickBooleanType status; MagickOffsetType offset; register size_t i; ssize_t count; struct stat attributes; unsigned char *blob; void *ma...
0
[ "CWE-416", "CWE-399" ]
ImageMagick
c5d012a46ae22be9444326aa37969a3f75daa3ba
155,656,929,466,982,450,000,000,000,000,000,000,000
162
https://github.com/ImageMagick/ImageMagick6/issues/43
bool is_outer_table(TABLE_LIST *table, SELECT_LEX *select) { DBUG_ASSERT(table->select_lex != select); TABLE_LIST *tl; if (table->belong_to_view && table->belong_to_view->select_lex == select) return FALSE; for (tl= select->master_unit()->derived; tl && tl->is_merged_derived(); select=...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
337,113,837,319,431,800,000,000,000,000,000,000,000
18
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
iperf_stats_callback(struct iperf_test *test) { struct iperf_stream *sp; struct iperf_stream_result *rp = NULL; struct iperf_interval_results *irp, temp; temp.omitted = test->omitting; SLIST_FOREACH(sp, &test->streams, streams) { rp = sp->result; temp.bytes_transferred = test->sender ? rp...
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
209,979,619,579,759,160,000,000,000,000,000,000,000
54
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
bool ThreadCommand::classof(const LoadCommand* cmd) { // This must be sync with BinaryParser.tcc const LOAD_COMMAND_TYPES type = cmd->command(); return type == LOAD_COMMAND_TYPES::LC_THREAD || type == LOAD_COMMAND_TYPES::LC_UNIXTHREAD; }
0
[ "CWE-787" ]
LIEF
0033b6312fd311b2e45e379c04a83d77c1e58578
99,483,532,418,231,670,000,000,000,000,000,000,000
6
Resolve #767
TEST_F(ExprMatchTest, GtWithLHSFieldPathMatchesCorrectly) { createMatcher(fromjson("{$expr: {$gt: ['$x', 3]}}")); ASSERT_TRUE(matches(BSON("x" << 10))); ASSERT_FALSE(matches(BSON("x" << 1))); ASSERT_FALSE(matches(BSON("x" << 3))); }
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
272,631,643,808,582,720,000,000,000,000,000,000,000
8
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
*/ PHP_FUNCTION(date_modify) { zval *object; char *modify; int modify_len; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &object, date_ce_date, &modify, &modify_len) == FAILURE) { RETURN_FALSE; } if (php_date_modify(object, modify, modify_len TSRMLS_CC)...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
107,389,952,638,263,830,000,000,000,000,000,000,000
16
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
brcmf_notify_connect_status_ap(struct brcmf_cfg80211_info *cfg, struct net_device *ndev, const struct brcmf_event_msg *e, void *data) { struct wiphy *wiphy = cfg_to_wiphy(cfg); static int generation; u32 event = e->event_code; u32 reason = e->reason; struct station_info *sinfo; brcmf_dbg(CONN...
0
[ "CWE-787" ]
linux
1b5e2423164b3670e8bc9174e4762d297990deff
177,293,861,205,345,160,000,000,000,000,000,000,000
44
brcmfmac: assure SSID length from firmware is limited The SSID length as received from firmware should not exceed IEEE80211_MAX_SSID_LEN as that would result in heap overflow. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by:...
CLEAR_MARKS_PROC(aos_clear_marks) { aos_state_t *const pptr = vptr; r_clear_attrs(&pptr->blocks, l_mark); }
0
[]
ghostpdl
04b37bbce174eed24edec7ad5b920eb93db4d47d
194,736,761,960,034,230,000,000,000,000,000,000,000
5
Bug 697799: have .rsdparams check its parameters The Ghostscript internal operator .rsdparams wasn't checking the number or type of the operands it was being passed. Do so.
void mp_encode_lua_number(lua_State *L, mp_buf *buf) { lua_Number n = lua_tonumber(L,-1); if (IS_INT64_EQUIVALENT(n)) { mp_encode_lua_integer(L, buf); } else { mp_encode_double(L,buf,(double)n); } }
0
[ "CWE-119", "CWE-787" ]
redis
52a00201fca331217c3b4b8b634f6a0f57d6b7d3
187,663,891,783,661,120,000,000,000,000,000,000,000
9
Security: fix Lua cmsgpack library stack overflow. During an auditing effort, the Apple Vulnerability Research team discovered a critical Redis security issue affecting the Lua scripting part of Redis. -- Description of the problem Several years ago I merged a pull request including many small changes at the Lua Msg...
asmlinkage long sys_getrlimit(unsigned int resource, struct rlimit __user *rlim) { if (resource >= RLIM_NLIMITS) return -EINVAL; else { struct rlimit value; task_lock(current->group_leader); value = current->signal->rlim[resource]; task_unlock(current->group_leader); return copy_to_user(rlim, &value, size...
0
[ "CWE-20" ]
linux-2.6
9926e4c74300c4b31dee007298c6475d33369df0
302,681,378,235,367,640,000,000,000,000,000,000,000
12
CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix As discovered here today, the change in Kernel 2.6.17 intended to inhibit users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by "cheating" and setting it to 1 in such a case, does not make a difference, as the check is done in the wrong pla...
virDomainGraphicsDefParseXML(virDomainXMLOptionPtr xmlopt, xmlNodePtr node, xmlXPathContextPtr ctxt, unsigned int flags) { virDomainGraphicsDefPtr def; int typeVal; g_autofree char *type = NULL; if (!(def = virDomain...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
239,130,690,212,277,600,000,000,000,000,000,000,000
62
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static bool red_stream_write_u32_le(RedStream *s, uint32_t n) { n = GUINT32_TO_LE(n); return red_stream_write_all(s, &n, sizeof(uint32_t)); }
0
[]
spice
95a0cfac8a1c8eff50f05e65df945da3bb501fc9
197,565,083,366,231,800,000,000,000,000,000,000,000
5
With OpenSSL 1.0.2 and earlier: disable client-side renegotiation. Fixed issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static unsigned long get_trampoline_vaddr(void) { struct xol_area *area; unsigned long trampoline_vaddr = -1; area = current->mm->uprobes_state.xol_area; smp_read_barrier_depends(); if (area) trampoline_vaddr = area->vaddr; return trampoline_vaddr; }
0
[ "CWE-416" ]
linux
355627f518978b5167256d27492fe0b343aaf2f2
149,026,700,729,089,100,000,000,000,000,000,000,000
12
mm, uprobes: fix multiple free of ->uprobes_state.xol_area 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 error p...
void f2fs_destroy_extent_tree(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct extent_tree *et = F2FS_I(inode)->extent_tree; unsigned int node_cnt = 0; if (!et) return; if (inode->i_nlink && !is_bad_inode(inode) && atomic_read(&et->node_cnt)) { mutex_lock(&sbi->extent_tree_lock...
0
[ "CWE-119", "CWE-787" ]
linux
dad48e73127ba10279ea33e6dbc8d3905c4d31c0
153,607,176,159,188,560,000,000,000,000,000,000,000
33
f2fs: fix a bug caused by NULL extent tree Thread A: Thread B: -f2fs_remount -sbi->mount_opt.opt = 0; <--- -f2fs_iget -do_read_inode -f2fs_init_extent_tree -F2FS_I(inode)->extent_tree is NULL -default_options && parse_options -remount return ...
static void schedule_async_open(struct timeval request_time, struct smb_request *req) { struct deferred_open_record state; struct timeval timeout; timeout = timeval_set(20, 0); ZERO_STRUCT(state); state.delayed_for_oplocks = false; state.async_open = true; if (!request_timed_out(request_time, timeout)) { ...
0
[]
samba
60f922bf1bd8816eacbb32c24793ad1f97a1d9f2
103,765,046,869,100,110,000,000,000,000,000,000,000
16
Fix bug #10229 - No access check verification on stream files. https://bugzilla.samba.org/show_bug.cgi?id=10229 We need to check if the requested access mask could be used to open the underlying file (if it existed), as we're passing in zero for the access mask to the base filename. Signed-off-by: Jeremy Allison <jr...
MagickExport int EOFBlob(const Image *image) { BlobInfo *magick_restrict blob_info; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(image->blob != (BlobInfo *) NULL); ...
0
[ "CWE-416", "CWE-399" ]
ImageMagick
c5d012a46ae22be9444326aa37969a3f75daa3ba
73,394,598,787,734,800,000,000,000,000,000,000,000
56
https://github.com/ImageMagick/ImageMagick6/issues/43
static int check_stack_boundary(struct bpf_verifier_env *env, int regno, int access_size, bool zero_size_allowed, struct bpf_call_arg_meta *meta) { struct bpf_verifier_state *state = env->cur_state; struct bpf_reg_state *regs = state->regs; int off, i, slot, spi; if (regs[regno].type != PTR_TO_STACK) { /...
0
[ "CWE-190" ]
linux
bb7f0f989ca7de1153bd128a40a71709e339fa03
4,440,700,468,841,552,500,000,000,000,000,000,000
59
bpf: fix integer overflows There were various issues related to the limited size of integers used in the verifier: - `off + size` overflow in __check_map_access() - `off + reg->off` overflow in check_mem_access() - `off + reg->var_off.value` overflow or 32-bit truncation of `reg->var_off.value` in check_mem_acce...
static int cx24116_firmware_ondemand(struct dvb_frontend *fe) { struct cx24116_state *state = fe->demodulator_priv; const struct firmware *fw; int ret = 0; dprintk("%s()\n", __func__); if (cx24116_readreg(state, 0x20) > 0) { if (state->skip_fw_load) return 0; /* Load firmware */ /* request the firmwar...
0
[ "CWE-476", "CWE-119", "CWE-125" ]
linux
1fa2337a315a2448c5434f41e00d56b01a22283c
310,982,214,199,791,900,000,000,000,000,000,000,000
47
[media] cx24116: fix a buffer overflow when checking userspace params The maximum size for a DiSEqC command is 6, according to the userspace API. However, the code allows to write up much more values: drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23 Cc: stab...
static void buzz_set_leds(struct sony_sc *sc) { struct hid_device *hdev = sc->hdev; struct list_head *report_list = &hdev->report_enum[HID_OUTPUT_REPORT].report_list; struct hid_report *report = list_entry(report_list->next, struct hid_report, list); s32 *value = report->field[0]->value; BUILD_BUG_ON(MAX_LEDS...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
15,857,824,433,490,087,000,000,000,000,000,000,000
20
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
static struct dentry *__lookup_hash(const struct qstr *name, struct dentry *base, unsigned int flags) { struct dentry *dentry = lookup_dcache(name, base, flags); struct dentry *old; struct inode *dir = base->d_inode; if (dentry) return dentry; /* Don't create child dentry for a dead directory. */ if (unlike...
0
[ "CWE-416", "CWE-284" ]
linux
d0cb50185ae942b03c4327be322055d622dc79f6
163,830,558,680,490,970,000,000,000,000,000,000,000
25
do_last(): fetch directory ->i_mode and ->i_uid before it's too late may_create_in_sticky() call is done when we already have dropped the reference to dir. Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static const char * my_os_charset_to_mysql_charset(const char *csname) { const MY_CSET_OS_NAME *csp; for (csp= charsets; csp->os_name; csp++) { if (!my_strcasecmp(&my_charset_latin1, csp->os_name, csname)) { switch (csp->param) { case my_cs_exact: return csp->my_name; case...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
298,180,249,005,823,700,000,000,000,000,000,000,000
40
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 snd_card_disconnect_sync(struct snd_card *card) { int err; err = snd_card_disconnect(card); if (err < 0) { dev_err(card->dev, "snd_card_disconnect error (%d), skipping sync\n", err); return; } spin_lock_irq(&card->files_lock); wait_event_lock_irq(card->remove_sleep, list_empty(&card->files...
0
[ "CWE-416" ]
linux
2a3f7221acddfe1caa9ff09b3a8158c39b2fdeac
102,136,263,838,419,810,000,000,000,000,000,000,000
18
ALSA: core: Fix card races between register and disconnect There is a small race window in the card disconnection code that allows the registration of another card with the very same card id. This leads to a warning in procfs creation as caught by syzkaller. The problem is that we delete snd_cards and snd_cards_lock ...
int rfc822_write_address (char *buf, size_t buflen, ADDRESS *addr, int display) { char *pbuf = buf; size_t len = mutt_strlen (buf); buflen--; /* save room for the terminal nul */ if (len > 0) { if (len > buflen) return pbuf - buf; /* safety check for bogus arguments */ pbuf += len; buflen...
0
[ "CWE-401" ]
mutt
4a2becbdb4422aaffe3ce314991b9d670b7adf17
102,590,033,296,082,580,000,000,000,000,000,000,000
54
Fix memory leak parsing group addresses without a display name. When there was a group address terminator with no previous addresses (including the group display-name), an address would be allocated but not attached to the address list. Change this to only allocate when last exists. It would be more correct to not a...
static void release_all_pte_pages(pte_t *pte) { release_pte_pages(pte, pte + HPAGE_PMD_NR); }
0
[ "CWE-399" ]
linux
78f11a255749d09025f54d4e2df4fbcb031530e2
68,132,576,904,041,060,000,000,000,000,000,000,000
4
mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups The huge_memory.c THP page fault was allowed to run if vm_ops was null (which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't setup a special vma->vm_ops and it would fallback to regular anonymous memory) but other THP logics weren't fully ac...
int main(int argc, char **argv) { char self_name[FN_REFLEN]; MY_INIT(argv[0]); #if __WIN__ if (GetModuleFileName(NULL, self_name, FN_REFLEN) == 0) #endif { strncpy(self_name, argv[0], FN_REFLEN); } if (init_dynamic_string(&ds_args, "", 512, 256) || init_dynamic_string(&conn_args, "", 512, 256))...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
65,001,621,767,038,640,000,000,000,000,000,000,000
116
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
void Curl_http_method(struct Curl_easy *data, struct connectdata *conn, const char **method, Curl_HttpReq *reqp) { Curl_HttpReq httpreq = data->state.httpreq; const char *request; if((conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_FTP)) && data->set.upload) httpreq = HTTPREQ_P...
0
[]
curl
48d7064a49148f03942380967da739dcde1cdc24
116,559,111,797,850,840,000,000,000,000,000,000,000
39
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
ssh_connect_direct(const char *host, struct addrinfo *aitop, struct sockaddr_storage *hostaddr, u_short port, int family, int connection_attempts, int *timeout_ms, int want_keepalive, int needpriv) { int on = 1; int sock = -1, attempt; char ntop[NI_MAXHOST], strport[NI_MAXSERV]; struct addrinfo *ai; debug...
0
[ "CWE-20" ]
openssh-portable
7d6a9fb660c808882d064e152d6070ffc3844c3f
301,124,422,328,006,660,000,000,000,000,000,000,000
76
- djm@cvs.openbsd.org 2014/04/01 03:34:10 [sshconnect.c] When using VerifyHostKeyDNS with a DNSSEC resolver, down-convert any certificate keys to plain keys and attempt SSHFP resolution. Prevents a server from skipping SSHFP lookup and forcing a new-hostkey dialog by offering only certificate ...
TfLiteStatus MultiplyAndCheckOverflow(size_t a, size_t b, size_t* product) { // Multiplying a * b where a and b are size_t cannot result in overflow in a // size_t accumulator if both numbers have no non-zero bits in their upper // half. constexpr size_t size_t_bits = 8 * sizeof(size_t); constexpr size_t over...
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
178,231,244,800,399,920,000,000,000,000,000,000,000
14
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
static int __kvm_read_guest_atomic(struct kvm_memory_slot *slot, gfn_t gfn, void *data, int offset, unsigned long len) { int r; unsigned long addr; addr = gfn_to_hva_memslot_prot(slot, gfn, NULL); if (kvm_is_error_hva(addr)) return -EFAULT; pagefault_disable(); r = __copy_from_user_inatomic(data,...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
254,133,066,017,794,240,000,000,000,000,000,000,000
16
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...
void sas_device_set_phy(struct domain_device *dev, struct sas_port *port) { struct sas_ha_struct *ha; struct sas_phy *new_phy; if (!dev) return; ha = dev->port->ha; new_phy = sas_port_get_phy(port); /* pin and record last seen phy */ spin_lock_irq(&ha->phy_port_lock); if (new_phy) { sas_port_put_phy(dev-...
0
[ "CWE-284" ]
linux
0558f33c06bb910e2879e355192227a8e8f0219d
282,507,551,689,220,220,000,000,000,000,000,000,000
19
scsi: libsas: direct call probe and destruct In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") introduced disco mutex to prevent rediscovery competing with ata error handling and put the whole revalidation in the mutex. But the rphy add/remove needs to wait for the ...
ex_unmap(exarg_T *eap) { do_exmap(eap, FALSE); }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
127,350,526,083,224,290,000,000,000,000,000,000,000
4
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
GF_Err gf_isom_remove_edit(GF_ISOFile *movie, u32 trackNumber, u32 seg_index) { GF_Err e; GF_TrackBox *trak; GF_EdtsEntry *ent, *next_ent; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!trak || !seg_index) return GF_BAD_PARAM; e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE); if (e) return e; if (!...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
236,372,395,827,109,460,000,000,000,000,000,000,000
21
fixed #1706
static void zoneref_set_zone(struct zone *zone, struct zoneref *zoneref) { zoneref->zone = zone; zoneref->zone_idx = zone_idx(zone); }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
199,068,525,048,904,620,000,000,000,000,000,000,000
5
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
gst_h264_parser_parse_pps (GstH264NalParser * nalparser, GstH264NalUnit * nalu, GstH264PPS * pps) { GstH264ParserResult res = gst_h264_parse_pps (nalparser, nalu, pps); if (res == GST_H264_PARSER_OK) { GST_DEBUG ("adding picture parameter set with id: %d to array", pps->id); if (!gst_h264_pps_copy (&n...
0
[ "CWE-787" ]
gst-plugins-bad
11353b3f6e2f047cc37483d21e6a37ae558896bc
327,629,450,899,585,170,000,000,000,000,000,000,000
15
codecparsers: h264parser: guard against ref_pic_markings overflow Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703>
int Field::store(const char *to, size_t length, CHARSET_INFO *cs, enum_check_fields check_level) { Check_level_instant_set check_level_save(get_thd(), check_level); return store(to, length, cs); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
148,752,044,500,408,020,000,000,000,000,000,000,000
6
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static JSValue js_sys_url_cat(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { const char *parent; const char *src; char *url; JSValue res; if (argc<2) return GF_JS_EXCEPTION(ctx); parent = JS_ToCString(ctx, argv[0]); src = JS_ToCString(ctx, argv[1]); url = gf_url_concatenate(parent, src);...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
131,585,747,350,238,550,000,000,000,000,000,000,000
20
fixed #2138
const char *ipx_frame_name(__be16 frame) { char* rc = "None"; switch (ntohs(frame)) { case ETH_P_IPX: rc = "EtherII"; break; case ETH_P_802_2: rc = "802.2"; break; case ETH_P_SNAP: rc = "SNAP"; break; case ETH_P_802_3: rc = "802.3"; break; } return rc; }
0
[ "CWE-416" ]
linux
ee0d8d8482345ff97a75a7d747efc309f13b0d80
158,764,794,981,465,140,000,000,000,000,000,000,000
13
ipx: call ipxitf_put() in ioctl error path We should call ipxitf_put() if the copy_to_user() fails. Reported-by: 李强 <liqiang6-s@360.cn> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static double OptimalTau(const ssize_t *histogram,const double max_tau, const double min_tau,const double delta_tau,const double smooth_threshold, short *extrema) { IntervalTree **list, *node, *root; MagickBooleanType peak; double average_tau, *derivative, *second_derivative, ...
0
[ "CWE-369" ]
ImageMagick
a4c89f2a61069ad7637bc7749cc1a839de442526
73,541,710,271,091,600,000,000,000,000,000,000,000
184
https://github.com/ImageMagick/ImageMagick/issues/1730
struct block_device *f2fs_target_device(struct f2fs_sb_info *sbi, block_t blk_addr, struct bio *bio) { struct block_device *bdev = sbi->sb->s_bdev; int i; if (f2fs_is_multi_device(sbi)) { for (i = 0; i < sbi->s_ndevs; i++) { if (FDEV(i).start_blk <= blk_addr && FDEV(i).end_blk >= blk_addr) { blk...
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
302,288,351,260,026,820,000,000,000,000,000,000,000
22
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
void Downstream::inspect_http1_request() { if (req_.method == HTTP_CONNECT) { req_.upgrade_request = true; } else if (req_.http_minor > 0) { auto upgrade = req_.fs.header(http2::HD_UPGRADE); if (upgrade) { const auto &val = upgrade->value; // TODO Perform more strict checking for upgrade hea...
1
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
58,365,931,505,958,020,000,000,000,000,000,000,000
30
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
static void ctxload_finalize(GF_Filter *filter) { CTXLoadPriv *priv = gf_filter_get_udta(filter); if (priv->ctx) gf_sm_del(priv->ctx); if (priv->files_to_delete) gf_list_del(priv->files_to_delete); }
0
[ "CWE-276" ]
gpac
96699aabae042f8f55cf8a85fa5758e3db752bae
80,425,923,785,756,390,000,000,000,000,000,000,000
7
fixed #2061
my_decimal *Item_sum_avg::val_decimal(my_decimal *val) { my_decimal cnt; const my_decimal *sum_dec; DBUG_ASSERT(fixed == 1); if (aggr) aggr->endup(); if (!count) { null_value=1; return NULL; } /* For non-DECIMAL result_type() the division will be done in Item_sum_avg::val_real(). ...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
298,716,981,722,125,950,000,000,000,000,000,000,000
25
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...
ikev2_auth_print(netdissect_options *ndo, u_char tpay, const struct isakmp_gen *ext, u_int item_len _U_, const u_char *ep, uint32_t phase _U_, uint32_t doi _U_, uint32_t proto _U_, int depth _U_) { struct ikev2_auth a; const char *v2_auth[]={ "invalid", "rsasig", "shared-secret", "dsssig" }; const u_char...
1
[ "CWE-125", "CWE-787" ]
tcpdump
8dca25d26c7ca2caf6138267f6f17111212c156e
249,175,220,691,638,030,000,000,000,000,000,000,000
39
CVE-2017-13690/IKEv2: Fix some bounds checks. Use a pointer of the correct type in ND_TCHECK(), or use ND_TCHECK2() and provide the correct length. While we're at it, remove the blank line between some checks and the UNALIGNED_MEMCPY()s they protect. Also, note the places where we print the entire payload. This fix...
void str_to_file2(const char *fname, char *str, int size, my_bool append) { int fd; char buff[FN_REFLEN]; int flags= O_WRONLY | O_CREAT; if (!test_if_hard_path(fname)) { strxmov(buff, opt_basedir, fname, NullS); fname= buff; } fn_format(buff, fname, "", "", MY_UNPACK_FILENAME); if (!append) ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
76,206,270,570,934,275,000,000,000,000,000,000,000
23
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...
GC_API void GC_CALL GC_set_force_unmap_on_gcollect(int value) { GC_force_unmap_on_gcollect = (GC_bool)value; }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
58,322,731,880,576,420,000,000,000,000,000,000,000
4
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...
static int unit_export_log_extra_fields(Unit *u, const ExecContext *c) { _cleanup_close_ int fd = -1; struct iovec *iovec; const char *p; char *pattern; le64_t *sizes; ssize_t n; size_t i; int r; if (u->exported_log_extra_fields) r...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
237,373,792,367,992,250,000,000,000,000,000,000,000
53
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
void kvm_hv_synic_send_eoi(struct kvm_vcpu *vcpu, int vector) { struct kvm_vcpu_hv_synic *synic = to_hv_synic(vcpu); int i; trace_kvm_hv_synic_send_eoi(vcpu->vcpu_id, vector); for (i = 0; i < ARRAY_SIZE(synic->sint); i++) if (synic_get_sint_vector(synic_read_sint(synic, i)) == vector) kvm_hv_notify_acked_sin...
0
[ "CWE-476" ]
linux
919f4ebc598701670e80e31573a58f1f2d2bf918
168,583,593,922,302,470,000,000,000,000,000,000,000
11
KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref Reported by syzkaller: KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] RIP: 0010:kvm_hv_set_sint_gs...
static void set_rpa_resolution_complete(uint8_t status, uint16_t len, const void *param, void *user_data) { if (status != 0) error("Set RPA Resolution failed with status 0x%02x (%s)", status, mgmt_errstr(status)); else DBG("RPA Resolution successfully set"); }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
64,710,258,845,152,940,000,000,000,000,000,000,000
9
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
int smb_vfs_call_sys_acl_delete_def_file(struct vfs_handle_struct *handle, const char *path) { VFS_FIND(sys_acl_delete_def_file); return handle->fns->sys_acl_delete_def_file_fn(handle, path); }
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
296,711,518,050,723,340,000,000,000,000,000,000,000
6
CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share). Ensure matching component ends in '/' or '\0'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
cdf_dump_header(const cdf_header_t *h) { size_t i; #define DUMP(a, b) (void)fprintf(stderr, "%40.40s = " a "\n", # b, h->h_ ## b) #define DUMP2(a, b) (void)fprintf(stderr, "%40.40s = " a " (" a ")\n", # b, \ h->h_ ## b, 1 << h->h_ ## b) DUMP("%d", revision); DUMP("%d", version); DUMP("%#x", byte_order); DUMP2...
0
[ "CWE-787" ]
file
46a8443f76cec4b41ec736eca396984c74664f84
257,613,716,104,927,940,000,000,000,000,000,000,000
26
Limit the number of elements in a vector (found by oss-fuzz)
void WriteVirtIODeviceByte(ULONG_PTR ulRegister, u8 bValue) { DPrintf(6, ("[%s]R[%x]=%x\n", __FUNCTION__, (ULONG)ulRegister, bValue) ); NdisRawWritePortUchar(ulRegister, bValue); }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
185,421,506,597,077,180,000,000,000,000,000,000,000
6
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static bool notify_append_le16(struct nfy_mult_data *data, uint16_t value) { if (data->offset + sizeof(value) > data->len) return false; put_le16(value, data->pdu + data->offset); data->offset += sizeof(value); return true; }
0
[ "CWE-476", "CWE-119", "CWE-787" ]
bluez
591c546c536b42bef696d027f64aa22434f8c3f0
153,023,523,810,231,330,000,000,000,000,000,000,000
10
shared/gatt-server: Fix heap overflow when appending prepare writes The code shall check if the prepare writes would append more the allowed maximum attribute length. Fixes https://github.com/bluez/bluez/security/advisories/GHSA-479m-xcq5-9g2q
static inline int rcu_use_vmalloc(int size) { /* Too big for a single page? */ if (HDRLEN_KMALLOC + size > PAGE_SIZE) return 1; return 0; }
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
273,334,731,274,306,580,000,000,000,000,000,000,000
7
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...
static void sntp_cb(struct mg_connection *c, int ev, void *evd, void *fnd) { if (ev == MG_EV_SNTP_TIME) { *(int64_t *) fnd = *(int64_t *) evd; } (void) c; }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
13,735,100,177,361,483,000,000,000,000,000,000,000
6
Protect against the directory traversal in mg_upload()
static inline bool is_no_device(u32 intr_info) { return is_exception_n(intr_info, NM_VECTOR); }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
255,118,056,326,747,500,000,000,000,000,000,000,000
4
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
static ZIPARCHIVE_METHOD(getExternalAttributesIndex) { struct zip *intern; zval *self = getThis(), *z_opsys, *z_attr; zend_long index, flags=0; zip_uint8_t opsys; zip_uint32_t attr; struct zip_stat sb; if (!self) { RETURN_FALSE; } ZIP_FROM_OBJECT(intern, self); if (zend_parse_parameters(ZEND_NUM_ARGS(), ...
0
[ "CWE-190" ]
php-src
3b8d4de300854b3517c7acb239b84f7726c1353c
24,071,615,986,789,373,000,000,000,000,000,000,000
31
Fix bug #71923 - integer overflow in ZipArchive::getFrom*
static void detach_task(struct task_struct *p, struct lb_env *env) { lockdep_assert_held(&env->src_rq->lock); p->on_rq = TASK_ON_RQ_MIGRATING; deactivate_task(env->src_rq, p, DEQUEUE_NOCLOCK); set_task_cpu(p, env->dst_cpu); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
48,264,770,314,329,450,000,000,000,000,000,000,000
8
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
xmlSchemaParseIncludeOrRedefineAttrs(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, xmlNodePtr node, xmlChar **schemaLocation, int type) { xmlAttrPtr attr; if ((pctxt == NULL) || (schema == NULL) || (node == NULL) || (schemaLocation == NULL)) return (-1); *...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
242,409,516,049,178,660,000,000,000,000,000,000,000
94
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
void Run(OpKernelContext* c, CollectiveParams* col_params, DoneCallback done) { CollectiveExecutor* col_exec = c->collective_executor(); OP_REQUIRES_ASYNC( c, col_exec, errors::Internal( "Failed to get CollectiveExecutor from OpKernelContext for Op ", name_),...
0
[ "CWE-416" ]
tensorflow
ca38dab9d3ee66c5de06f11af9a4b1200da5ef75
81,768,683,026,637,690,000,000,000,000,000,000,000
50
Fix undefined behavior in CollectiveReduceV2 and others We should not call done after it's moved. PiperOrigin-RevId: 400838185 Change-Id: Ifc979740054b8f8c6f4d50acc89472fe60c4fdb1
int sys_posix_fallocate(int fd, off_t offset, off_t len) { #if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_BROKEN_POSIX_FALLOCATE) return posix_fallocate(fd, offset, len); #elif defined(F_RESVSP64) /* this handles XFS on IRIX */ struct flock64 fl; off_t new_len = offset + len; int ret; struct stat64 sbuf; /*...
0
[ "CWE-20" ]
samba
d77a74237e660dd2ce9f1e14b02635f8a2569653
329,425,343,698,518,440,000,000,000,000,000,000,000
33
s3: nmbd: Fix bug 10633 - nmbd denial of service The Linux kernel has a bug in that it can give spurious wakeups on a non-blocking UDP socket for a non-deliverable packet. When nmbd was changed to use non-blocking sockets it became vulnerable to a spurious wakeup from poll/epoll. Fix sys_recvfile() to return on EWOU...
get_default_executable_text_file_action (void) { int preferences_value; preferences_value = eel_preferences_get_enum (NAUTILUS_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION); switch (preferences_value) { case NAUTILUS_EXECUTABLE_TEXT_LAUNCH: return ACTIVATION_ACTION_LAUNCH; case NAUTILUS_EXECUTABLE_TEXT_DISPLAY: ...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
50,260,050,833,249,940,000,000,000,000,000,000,000
16
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
bool isPngType(BasicIo& iIo, bool advance) { if (iIo.error() || iIo.eof()) { throw Error(kerInputDataReadFailed); } const int32_t len = 8; byte buf[len]; iIo.read(buf, len); if (iIo.error() || iIo.eof()) { return false; } in...
0
[ "CWE-190" ]
exiv2
491c3ebe3b3faa6d8f75fb28146186792c2439da
303,938,128,593,327,640,000,000,000,000,000,000,000
18
Avoid negative integer overflow when `iccOffset > chunkLength`. This fixes #790. (cherry picked from commit 6fa2e31206127bd8bcac0269311f3775a8d6ea21)
BGD_DECLARE(void) gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out) { int x, y, c, b, sx, sy, p; char *name, *f; size_t i, l; name = file_name; if ((f = strrchr(name, '/')) != NULL) name = f+1; if ((f = strrchr(name, '\\')) != NULL) name = f+1; name = strdup(name); if ((f = strrchr(name, ...
1
[ "CWE-119", "CWE-787" ]
libgd
4dc1a2d7931017d3625f2d7cff70a17ce58b53b4
81,687,968,932,291,470,000,000,000,000,000,000,000
58
xbm: avoid stack overflow (read) with large names #211 We use the name passed in to printf into a local stack buffer which is limited to 4000 bytes. So given a large enough value, lots of stack data is leaked. Rewrite the code to do simple memory copies with most of the strings to avoid that issue, and only use stac...
static const char* lua_ap_get_server_name(request_rec* r) { const char *name; name = ap_get_server_name(r); return name ? name : "localhost"; }
0
[ "CWE-20" ]
httpd
78eb3b9235515652ed141353d98c239237030410
336,405,114,744,677,170,000,000,000,000,000,000,000
6
*) SECURITY: CVE-2015-0228 (cve.mitre.org) mod_lua: A maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash. [Edward Lu <Chaosed0 gmail.com>] Discovered by Guido Vranken <guidovranken gmail.com> Submitted by: Edward Lu Committed by: covener git-svn-id...
template<typename tp, typename tf, typename tc, typename to> CImg<T>& draw_object3d(LibBoard::Board& board, const float x0, const float y0, const float z0, const CImg<tp>& vertices, const CImgList<tf>& primitives, const CImgList<tc...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
270,983,233,920,883,100,000,000,000,000,000,000,000
13
.
hstore_contained(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall2(hstore_contains, PG_GETARG_DATUM(1), PG_GETARG_DATUM(0) )); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
73,102,553,226,876,805,000,000,000,000,000,000,000
7
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static void svm_sched_in(struct kvm_vcpu *vcpu, int cpu) { if (!kvm_pause_in_guest(vcpu->kvm)) shrink_ple_window(vcpu); }
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
243,732,318,993,160,230,000,000,000,000,000,000,000
5
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
static void tg3_write32_tx_mbox(struct tg3 *tp, u32 off, u32 val) { void __iomem *mbox = tp->regs + off; writel(val, mbox); if (tg3_flag(tp, TXD_MBOX_HWBUG)) writel(val, mbox); if (tg3_flag(tp, MBOX_WRITE_REORDER) || tg3_flag(tp, FLUSH_POSTED_WRITES)) readl(mbox); }
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
273,642,258,056,342,400,000,000,000,000,000,000,000
10
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static size_t kat_nonce(RAND_DRBG *drbg, unsigned char **pout, int entropy, size_t min_len, size_t max_len) { TEST_CTX *t = (TEST_CTX *)RAND_DRBG_get_ex_data(drbg, app_data_index); t->noncecnt++; *pout = (unsigned char *)t->nonce; return t->noncelen; }
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
262,940,219,054,899,800,000,000,000,000,000,000,000
9
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...
static s32 gf_media_hevc_read_pps_bs(GF_BitStream *bs, HEVCState *hevc) { u32 i; s32 pps_id = -1; HEVC_PPS *pps; //NAL header already read pps_id = bs_get_ue(bs); if ((pps_id<0) || (pps_id>=64)) { GF_LOG(GF_LOG_ERROR, GF_LOG_CODING, ("[HEVC] wrong PPS ID %d in PPS\n", pps_id)); return -1; } pps = &hevc->p...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
301,125,735,870,067,540,000,000,000,000,000,000,000
82
fix some exploitable overflows (#994, #997)
dns_zonemgr_unreachabledel(dns_zonemgr_t *zmgr, isc_sockaddr_t *remote, isc_sockaddr_t *local) { unsigned int i; isc_rwlocktype_t locktype; isc_result_t result; char master[ISC_SOCKADDR_FORMATSIZE]; char source[ISC_SOCKADDR_FORMATSIZE]; isc_sockaddr_format(remote, master, sizeof(master)); isc_sockaddr_fo...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
10,060,886,933,922,106,000,000,000,000,000,000,000
37
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
ofputil_queue_stats_to_ofp14(const struct ofputil_queue_stats *oqs, struct ofp14_queue_stats *qs14) { qs14->length = htons(sizeof *qs14); memset(qs14->pad, 0, sizeof qs14->pad); ofputil_queue_stats_to_ofp13(oqs, &qs14->qs); }
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
15,542,498,163,839,173,000,000,000,000,000,000,000
7
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
finish_object (P11KitIter *iter) { iter->object = 0; }
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
119,339,537,834,926,290,000,000,000,000,000,000,000
4
Check for arithmetic overflows before allocating
parse_command_modifiers( exarg_T *eap, char **errormsg, cmdmod_T *cmod, int skip_only) { char_u *cmd_start = NULL; char_u *p; int starts_with_colon = FALSE; int vim9script = in_vim9script(); int has_visual_range = FALSE; CLEAR_POINTER(cmod); cmod->cmod_flags...
1
[ "CWE-122" ]
vim
f50808ed135ab973296bca515ae4029b321afe47
263,926,808,274,265,130,000,000,000,000,000,000,000
339
patch 8.2.4763: using invalid pointer with "V:" in Ex mode Problem: Using invalid pointer with "V:" in Ex mode. Solution: Correctly handle the command being changed to "+".
ArgParser::ArgParser(int argc, char* argv[], Options& o) : argc(argc), argv(argv), o(o), cur_arg(0), bash_completion(false), zsh_completion(false) { option_table = &main_option_table; initOptionTable(); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
281,191,231,104,589,200,000,000,000,000,000,000,000
11
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 ...
int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *)) { if (pthread_key_create(key, cleanup) != 0) return 0; return 1; }
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
74,519,411,251,339,680,000,000,000,000,000,000,000
7
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...
const MD5& sslHashes::get_MD5() const { return md5HandShake_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
78,246,922,545,914,960,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
ModResult OnUserPreTagMessage(User* user, const MessageTarget& target, CTCTags::TagMessageDetails& details) CXX11_OVERRIDE { if (target.type == MessageTarget::TYPE_CHANNEL) return BuildChannelExempts(user, target.Get<Channel>(), SilenceEntry::SF_TAGMSG_CHANNEL, details.exemptions); if (target.type == MessageT...
0
[ "CWE-416" ]
inspircd
7b47de3c194f239c5fea09a0e49696c9af017d51
33,545,519,623,845,474,000,000,000,000,000,000,000
13
Copy the silence flags when sending update notifications. This fixes a crash bug in the silence module on some versions of GCC.
AdjustFractDays(double frac, struct pg_tm * tm, fsec_t *fsec, int scale) { int extra_days; if (frac == 0) return; frac *= scale; extra_days = (int) frac; tm->tm_mday += extra_days; frac -= extra_days; AdjustFractSeconds(frac, tm, fsec, SECS_PER_DAY); }
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
231,975,752,157,068,760,000,000,000,000,000,000,000
12
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
template<typename tc> CImg<T>& draw_point(const int x0, const int y0, const tc *const color, const float opacity=1) { return draw_point(x0,y0,0,color,opacity);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
297,085,476,705,393,720,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
static int switch_character_set_results(MYSQL *mysql, const char *cs_name) { char query_buffer[QUERY_LENGTH]; size_t query_length; /* Server lacks facility. This is not an error, by arbitrary decision . */ if (!server_supports_switching_charsets) return FALSE; query_length= my_snprintf(query_buffer, ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
169,763,884,773,224,090,000,000,000,000,000,000,000
16
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static int ext4_split_extent_at(handle_t *handle, struct inode *inode, struct ext4_ext_path *path, ext4_lblk_t split, int split_flag, int flags) { ext4_fsblk_t newblock; ext4_lblk_t ee_block; struct ext4_extent *ex, newex, orig_ex; struct ext4_extent *ex2 = NULL; unsigned in...
0
[ "CWE-703" ]
linux
667eff35a1f56fa74ce98a0c7c29a40adc1ba4e3
108,960,409,715,415,750,000,000,000,000,000,000,000
92
ext4: reimplement convert and split_unwritten Reimplement ext4_ext_convert_to_initialized() and ext4_split_unwritten_extents() using ext4_split_extent() Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Tested-by: Allison Henderson <achender@linux.vnet.ibm.com>
long qemu_maxrampagesize(void) { return qemu_real_host_page_size(); }
0
[ "CWE-908" ]
qemu
418ade7849ce7641c0f7333718caf5091a02fd4c
311,269,696,724,321,760,000,000,000,000,000,000,000
4
softmmu: Always initialize xlat in address_space_translate_for_iotlb The bug is an uninitialized memory read, along the translate_fail path, which results in garbage being read from iotlb_to_section, which can lead to a crash in io_readx/io_writex. The bug may be fixed by writing any value with zero in ~TARGET_PAGE_M...
gdImageColorExact (gdImagePtr im, int r, int g, int b) { return gdImageColorExactAlpha (im, r, g, b, gdAlphaOpaque); }
0
[ "CWE-119" ]
php-src
feba44546c27b0158f9ac20e72040a224b918c75
119,122,182,207,733,240,000,000,000,000,000,000,000
4
Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()).
newoffsets(dns_message_t *msg) { dns_msgblock_t *msgblock; dns_offsets_t *offsets; msgblock = ISC_LIST_TAIL(msg->offsets); offsets = msgblock_get(msgblock, dns_offsets_t); if (offsets == NULL) { msgblock = msgblock_allocate(msg->mctx, sizeof(dns_offsets_t), OFFSET_COUNT); if (msgblock == N...
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
158,778,450,184,527,950,000,000,000,000,000,000,000
20
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
calculateBytesPerPixel (const Header &header) { const ChannelList &channels = header.channels(); size_t bytesPerPixel = 0; for (ChannelList::ConstIterator c = channels.begin(); c != channels.end(); ++c) { bytesPerPixel += pixelTypeSize (c.channel().type); } return bytesPerPixel; }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
166,290,580,943,272,890,000,000,000,000,000,000,000
15
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
resolve_list_keys(struct lys_node_list *list, const char *keys_str) { int i, len, rc; const char *value; char *s = NULL; struct ly_ctx *ctx = list->module->ctx; for (i = 0; i < list->keys_size; ++i) { assert(keys_str); if (!list->child) { /* no child, possible forward r...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
245,730,864,337,438,750,000,000,000,000,000,000,000
66
schema tree BUGFIX do not check features while still resolving schema Fixes #723
do_compose_group16(pdf14_buf *tos, pdf14_buf *nos, pdf14_buf *maskbuf, int x0, int x1, int y0, int y1, int n_chan, bool additive, const pdf14_nonseparable_blending_procs_t * pblend_procs, bool has_matte, bool overprint, gx_color_index drawn_comps, ...
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
272,016,536,818,458,700,000,000,000,000,000,000,000
185
Bug 701795: Segv due to image mask issue
static void do_git_path(const struct repository *repo, const struct worktree *wt, struct strbuf *buf, const char *fmt, va_list args) { int gitdir_len; strbuf_worktree_gitdir(buf, repo, wt); if (buf->len && !is_dir_sep(buf->buf[buf->len - 1])) strbuf_addch(buf, '/'); gitdir_len = buf->len; strbuf_vaddf(buf,...
0
[ "CWE-20" ]
git
7c3745fc6185495d5765628b4dfe1bd2c25a2981
286,664,847,799,407,730,000,000,000,000,000,000,000
14
path: safeguard `.git` against NTFS Alternate Streams Accesses Probably inspired by HFS' resource streams, NTFS supports "Alternate Data Streams": by appending `:<stream-name>` to the file name, information in addition to the file contents can be written and read, information that is copied together with the file (unl...
static int sched_read_attr(struct sched_attr __user *uattr, struct sched_attr *attr, unsigned int usize) { int ret; if (!access_ok(VERIFY_WRITE, uattr, usize)) return -EFAULT; /* * If we're handed a smaller struct than we know of, * ensure all the unknown bits are 0 - i.e. old * user-space does...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
205,094,584,523,807,200,000,000,000,000,000,000,000
35
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
port::StatusOr<DeviceMemory<uint8>> CreateBatchNormForwardWorkspace( Stream* stream, const CudnnHandle& cudnn, const cudnnBatchNormMode_t& mode, const cudnnBatchNormOps_t& bn_ops, const cudnnActivationDescriptor_t& activation_desc, const CudnnTensorDescriptor& x_descriptor, const CudnnTensorDescript...
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
331,573,609,817,897,670,000,000,000,000,000,000,000
23
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
unlimit_nproc(void) { #ifdef __linux__ struct rlimit rl; debug_decl(unlimit_nproc, SUDOERS_DEBUG_UTIL); if (getrlimit(RLIMIT_NPROC, &nproclimit) != 0) sudo_warn("getrlimit(RLIMIT_NPROC)"); rl.rlim_cur = rl.rlim_max = RLIM_INFINITY; if (setrlimit(RLIMIT_NPROC, &rl) != 0) { rl.rlim_cur = rl.rli...
0
[ "CWE-193" ]
sudo
1f8638577d0c80a4ff864a2aad80a0d95488e9a8
100,221,184,173,583,720,000,000,000,000,000,000,000
17
Fix potential buffer overflow when unescaping backslashes in user_args. Also, do not try to unescaping backslashes unless in run mode *and* we are running the command via a shell. Found by Qualys, this fixes CVE-2021-3156.
join_path(const char *basedir, const char *name, const char *suffix, char *buffer, size_t length, LOG_Severity severity) { const char *sep; if (!basedir) { basedir = ""; sep = ""; } else { sep = "/"; } if (!suffix) suffix = ""; if (snprintf(buffer, length, "%s%s%s%s", basedir, s...
0
[ "CWE-59" ]
chrony
7a4c396bba8f92a3ee8018620983529152050c74
261,202,690,241,563,780,000,000,000,000,000,000,000
22
util: add functions for common file operations Add a function to open a file for reading, writing, or appending. In uppercase modes errors are handled as fatal, i.e. the caller doesn't need to check for NULL. To avoid string manipulations in the callers, the function accepts an optional directory and suffix. New files...
Defrag4Reassemble(ThreadVars *tv, DefragTracker *tracker, Packet *p) { Packet *rp = NULL; /* Should not be here unless we have seen the last fragment. */ if (!tracker->seen_last) return NULL; /* Check that we have all the data. Relies on the fact that * fragments are inserted if frag_offs...
0
[ "CWE-358" ]
suricata
4a04f814b15762eb446a5ead4d69d021512df6f8
151,963,393,966,409,320,000,000,000,000,000,000,000
116
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.