func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
proto_tree_set_time(field_info *fi, const nstime_t *value_ptr) { DISSECTOR_ASSERT(value_ptr != NULL); fvalue_set_time(&fi->value, value_ptr); }
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
276,789,581,742,720,920,000,000,000,000,000,000,000
6
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr, struct nfs_writeres *res) { struct compound_hdr hdr; int status; status = decode_compound_hdr(xdr, &hdr); if (status) goto out; status = decode_sequence(xdr, &res->seq_res, rqstp); if (status) goto out; status = decode_pu...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
44,965,395,017,901,490,000,000,000,000,000,000,000
26
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
static int vmxnet3_post_load(void *opaque, int version_id) { VMXNET3State *s = opaque; PCIDevice *d = PCI_DEVICE(s); net_tx_pkt_init(&s->tx_pkt, PCI_DEVICE(s), s->max_tx_frags, s->peer_has_vhdr); net_rx_pkt_init(&s->rx_pkt, s->peer_has_vhdr); if (s->msix_used) { if (!v...
0
[]
qemu
d05dcd94aee88728facafb993c7280547eb4d645
287,224,929,047,297,500,000,000,000,000,000,000,000
25
net: vmxnet3: validate configuration values during activate (CVE-2021-20203) While activating device in vmxnet3_acticate_device(), it does not validate guest supplied configuration values against predefined minimum - maximum limits. This may lead to integer overflow or OOB access issues. Add checks to avoid it. Fixes...
Debug* debug() { if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger(); return debug_; }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
72,085,724,280,605,530,000,000,000,000,000,000,000
4
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
static void dump_esp_combs(struct sk_buff *skb, const struct xfrm_tmpl *t) { struct sadb_prop *p; int i, k; p = skb_put(skb, sizeof(struct sadb_prop)); p->sadb_prop_len = sizeof(struct sadb_prop)/8; p->sadb_prop_exttype = SADB_EXT_PROPOSAL; p->sadb_prop_replay = 32; memset(p->sadb_prop_reserved, 0, sizeof(p->sa...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
236,008,637,276,379,100,000,000,000,000,000,000,000
47
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
static void io_worker_release(struct io_worker *worker) { if (refcount_dec_and_test(&worker->ref)) complete(&worker->ref_done); }
0
[ "CWE-200" ]
linux
713b9825a4c47897f66ad69409581e7734a8728e
77,718,057,647,659,380,000,000,000,000,000,000,000
5
io-wq: fix cancellation on create-worker failure WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test fs/io_uring.c:1151 [inline] WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test fs/io_uring.c:1146 [inline] WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 io_req_complete_post+0xf5...
ssize_t device_store_ulong(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct dev_ext_attribute *ea = to_ext_attr(attr); int ret; unsigned long new; ret = kstrtoul(buf, 0, &new); if (ret) return ret; *(unsigned long *)(ea->var) = new; /* Always return full wr...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
254,874,278,630,101,040,000,000,000,000,000,000,000
15
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
void lodepng_color_mode_cleanup(LodePNGColorMode* info) { lodepng_palette_clear(info); }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
138,073,688,580,559,400,000,000,000,000,000,000,000
4
Fixed #5645: realloc return handling
CURLcode Curl_add_custom_headers(struct Curl_easy *data, bool is_connect, #ifndef USE_HYPER struct dynbuf *req #else void *req #endif ) { struct connectdata *conn = data->conn; char *ptr; struct curl_slist *h[2]; ...
0
[]
curl
48d7064a49148f03942380967da739dcde1cdc24
22,797,235,565,006,050,000,000,000,000,000,000,000
152
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 void prl_entry_destroy_rcu(struct rcu_head *head) { kfree(container_of(head, struct ip_tunnel_prl_entry, rcu_head)); }
0
[]
linux-2.6
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
49,395,704,423,593,710,000,000,000,000,000,000,000
4
tunnels: fix netns vs proto registration ordering Same stuff as in ip_gre patch: receive hook can be called before netns setup is done, oopsing in net_generic(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bool isIDString(const char *s) { if (!isAlpha(*s)) return false; while (*s) { if (!(isAlpha(*s) || isNumeric(*s))) return false; s++; } return true; }
0
[ "CWE-119", "CWE-787" ]
Espruino
0a7619875bf79877907205f6bee08465b89ff10b
256,626,387,008,079,220,000,000,000,000,000,000,000
10
Fix strncat/cpy bounding issues (fix #1425)
IndexGetRelation(Oid indexId, bool missing_ok) { HeapTuple tuple; Form_pg_index index; Oid result; tuple = SearchSysCache1(INDEXRELID, ObjectIdGetDatum(indexId)); if (!HeapTupleIsValid(tuple)) { if (missing_ok) return InvalidOid; elog(ERROR, "cache lookup failed for index %u", indexId); } index = (For...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
11,547,867,728,391,211,000,000,000,000,000,000,000
20
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static inline unsigned long zap_pmd_range(struct mmu_gather *tlb, struct vm_area_struct *vma, pud_t *pud, unsigned long addr, unsigned long end, struct zap_details *details) { pmd_t *pmd; unsigned long next; pmd = pmd_offset(pud, addr); do { next = pmd_addr_end(addr, end); if (pmd_trans_huge(*pmd))...
1
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
55,003,604,487,249,720,000,000,000,000,000,000,000
27
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static int reenc_refresh_helper_devices(struct crypt_device *cd, const char *overlay, const char *hotzone) { int r; /* * we have to explicitly suspend the overlay device before suspending * the hotzone one. Resuming overlay device (aka switching tables) only * after suspending the hotzone may lead to deadlock....
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
325,369,824,219,874,400,000,000,000,000,000,000,000
31
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static MagickBooleanType ReadPSDChannelZip(Image *image,const size_t channels, const ssize_t type,const PSDCompressionType compression, const size_t compact_size,ExceptionInfo *exception) { MagickBooleanType status; register unsigned char *p; size_t count, length, packet_size, row_si...
0
[]
ImageMagick
bd9f1e7d1bd2c8e2cf7895d133c5c5b5cd3526b6
138,364,944,464,310,140,000,000,000,000,000,000,000
112
Fixed memory leak when reading incorrect PSD files
IOBuf IOBuf::cloneCoalescedAsValueWithHeadroomTailroom( std::size_t newHeadroom, std::size_t newTailroom) const { if (!isChained() && newHeadroom <= headroom() && newTailroom <= tailroom()) { return cloneOneAsValue(); } // Coalesce into newBuf const std::size_t newLength = computeChainDataLength(); co...
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
336,289,993,245,346,870,000,000,000,000,000,000,000
28
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
static void snd_free_sbus_pages(struct device *dev, size_t size, void *ptr, dma_addr_t dma_addr) { struct sbus_dev *sdev = (struct sbus_dev *)dev; int pg; if (ptr == NULL) return; pg = get_order(size); dec_snd_pages(pg); sbus_free_consistent(sdev, PAGE_SIZE * (1 << pg), ptr, dma_addr); }
0
[]
linux-2.6
ccec6e2c4a74adf76ed4e2478091a311b1806212
276,830,935,411,004,730,000,000,000,000,000,000,000
12
Convert snd-page-alloc proc file to use seq_file Use seq_file for the proc file read/write of snd-page-alloc module. This automatically fixes bugs in the old proc code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
void* CLUTElemDup(cmsStage* mpe) { _cmsStageCLutData* Data = (_cmsStageCLutData*) mpe ->Data; _cmsStageCLutData* NewElem; NewElem = (_cmsStageCLutData*) _cmsMallocZero(mpe ->ContextID, sizeof(_cmsStageCLutData)); if (NewElem == NULL) return NULL; NewElem ->nEntries = Data ->nEntries; Ne...
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
108,268,350,221,549,560,000,000,000,000,000,000,000
40
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
static bool is_preallocated_map(struct bpf_map *map) { if (!check_map_prealloc(map)) return false; if (map->inner_map_meta && !check_map_prealloc(map->inner_map_meta)) return false; return true; }
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
321,993,804,534,211,300,000,000,000,000,000,000,000
8
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
open_input(const char *filename, char *alt_file) { FILE *fp; struct stat sb; int mode; if (!strcmp(filename, "-")) { fp = copy_input(stdin, STDIN_NAME, alt_file); } else if (stat(filename, &sb) < 0) { fprintf(stderr, "%s: %s %s\n", _nc_progname, filename, strerror(errno)); ExitProgram(EXIT_FAILU...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
170,273,613,788,360,260,000,000,000,000,000,000,000
34
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
int main(int argc, const char** argv) { U32 seed = 0; int seedset = 0; int argNb; int nbTests = nbTestsDefault; int testNb = 0; U32 proba = FUZ_compressibility_default; int result = 0; U32 mainPause = 0; U32 maxDuration = 0; int bigTests = 1; U32 memTestsOnly = 0; const c...
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
97,936,614,466,479,040,000,000,000,000,000,000,000
116
fixed T36302429
static RZ_OWN RzType *var_type_clone_or_default_type(RzAnalysis *analysis, RZ_BORROW RZ_NULLABLE const RzType *type, int size) { if (type) { return rz_type_clone(type); } const char *typestr = __int_type_from_size(size); if (!typestr) { typestr = __int_type_from_size(analysis->bits); } if (!typestr) { types...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
82,404,412,478,521,120,000,000,000,000,000,000,000
20
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
void ConnectDialog::fetched(QByteArray xmlData, QUrl, QMap<QString, QString> headers) { if (xmlData.isNull()) { QMessageBox::warning(this, QLatin1String("Mumble"), tr("Failed to fetch server list"), QMessageBox::Ok); return; } QDomDocument doc; doc.setContent(xmlData); qlPublicServers.clear(); qsUserCountry...
0
[ "CWE-59", "CWE-61" ]
mumble
e59ee87abe249f345908c7d568f6879d16bfd648
207,565,006,386,275,950,000,000,000,000,000,000,000
40
FIX(client): Only allow "http"/"https" for URLs in ConnectDialog Our public server list registration script doesn't have an URL scheme whitelist for the website field. Turns out a malicious server can register itself with a dangerous URL in an attempt to attack a user's machine. User interaction is required, as the ...
is_select_query(const char *query) { const char *query_list[] = {"select", NULL}; return is_query_from_list(query, query_list); }
0
[ "CWE-200" ]
percona-xtrabackup
7742f875bb289a874246fb4653b7cd9f14b588fe
235,798,102,187,698,800,000,000,000,000,000,000,000
6
PXB-2722 password is written into xtrabackup_info https://jira.percona.com/browse/PXB-2722 Analysis: password passed with -p option is written into backup tool_command in xtrabackup_info Fix: mask password before writting into xtrabackup_info
FSContinuationData(uv_fs_t* req, int mode, uv_fs_cb done_cb) : req(req), mode(mode), done_cb(done_cb) { }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
105,855,083,870,115,380,000,000,000,000,000,000,000
3
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
static zend_always_inline Bucket *zend_hash_index_find_bucket(const HashTable *ht, zend_ulong h) { uint32_t nIndex; uint32_t idx; Bucket *p, *arData; arData = ht->arData; nIndex = h | ht->nTableMask; idx = HT_HASH_EX(arData, nIndex); while (idx != HT_INVALID_IDX) { ZEND_ASSERT(idx < HT_IDX_TO_HASH(ht->nTableS...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
117,529,707,261,690,370,000,000,000,000,000,000,000
19
Fix #73832 - leave the table in a safe state if the size is too big.
int SSL_set_cipher_list(SSL *s,const char *str) { STACK_OF(SSL_CIPHER) *sk; sk=ssl_create_cipher_list(s->ctx->method,&s->cipher_list, &s->cipher_list_by_id,str); /* see comment in SSL_CTX_set_cipher_list */ if (sk == NULL) return 0; else if (sk_SSL_CIPHER_num(sk) == 0) { SSLerr(SSL_F_SSL_SET_CIPHER_LIST...
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
339,818,018,402,446,300,000,000,000,000,000,000,000
16
Add Next Protocol Negotiation.
int am_get_boolean_query_parameter(request_rec *r, const char *name, int *return_value, int default_value) { char *value_str; int ret = OK; *return_value = default_value; value_str = am_extract_query_parameter(r->pool, r->args, name); if (value_str != NULL) { ...
0
[ "CWE-601" ]
mod_auth_mellon
9d28908e28ef70a12196c215503fb0075e1fd7f3
238,839,373,712,486,860,000,000,000,000,000,000,000
31
Add MellonRedirectDomains option. Limit the domains that we will redirect to after login / logout to a set of trusted domains. By default we only allow redirects to the current domain. This change breaks backwards compatibility with any site that relies on redirects to separate domains. Fixes #35
parse_ignore(struct ly_ctx *ctx, const char *data, const char *endstr, unsigned int *len) { unsigned int slen; const char *c = data; slen = strlen(endstr); while (*c && strncmp(c, endstr, slen)) { c++; } if (!*c) { LOGVAL(ctx, LYE_XML_MISS, LY_VLOG_NONE, NULL, "closing sequence...
0
[ "CWE-674" ]
libyang
298b30ea4ebee137226acf9bb38678bd82704582
41,760,350,241,490,020,000,000,000,000,000,000,000
19
common FEATURE add a hard limit for recursion Fixes #1453
static double Hamming(const double x, const ResizeFilter *magick_unused(resize_filter)) { /* Offset cosine window function: .54 + .46 cos(pi x). */ const double cosine=cos((double) (MagickPI*x)); magick_unreferenced(resize_filter); return(0.54+0.46*cosine); }
0
[ "CWE-125" ]
ImageMagick
c5402b6e0fcf8b694ae2af6a6652ebb8ce0ccf46
16,004,295,484,183,677,000,000,000,000,000,000,000
11
https://github.com/ImageMagick/ImageMagick/issues/717
yaffs_make_orphan_dir( YAFFSFS_INFO * yaffsfs, TSK_FS_FILE * a_fs_file ) { TSK_FS_FILE * fs_file = a_fs_file; TSK_FS_NAME *fs_name = tsk_fs_name_alloc(256, 0); if (fs_name == NULL) return TSK_ERR; if (tsk_verbose) tsk_fprintf(stderr, "yaffs_make_orphan_dir: Making orphan dir node\n"...
0
[ "CWE-125", "CWE-787" ]
sleuthkit
459ae818fc8dae717549810150de4d191ce158f1
312,775,996,476,907,000,000,000,000,000,000,000,000
22
Fix stack buffer overflow in yaffsfs_istat Prevent a stack buffer overflow in yaffsfs_istat by increasing the buffer size to the size required by tsk_fs_time_to_str.
static void data_to_host(void *data, pj_uint8_t bits, unsigned count) { unsigned i; count /= (bits == 32? 4 : 2); if (bits == 32) { pj_int32_t *data32 = (pj_int32_t *)data; for (i=0; i<count; ++i) data32[i] = pj_swap32(data32[i]); } else { pj_int16_t *data16 = (pj_int16_t *)data; ...
0
[ "CWE-703", "CWE-835" ]
pjproject
947bc1ee6d05be10204b918df75a503415fd3213
211,981,340,207,889,750,000,000,000,000,000,000,000
17
Merge pull request from GHSA-rwgw-vwxg-q799 * Prevent potential infinite loop when parsing WAV format file * Check if subchunk is negative. * Fix and add checks * Change data type from pj_ssize_t to long. * Modify check * Fix leak file descriptor and modify check on wav_playlist * Move overflow/underflow check t...
opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image, opj_cp_t *p_cp, OPJ_UINT32 p_tile_no) { /* loop */ OPJ_UINT32 pino; OPJ_UINT32 compno, resno; /* to store w, h, dx and dy fro all components and resolutions */ ...
0
[ "CWE-369" ]
openjpeg
d27ccf01c68a31ad62b33d2dc1ba2bb1eeaafe7b
102,129,999,212,057,950,000,000,000,000,000,000,000
192
Avoid division by zero in opj_pi_next_rpcl, opj_pi_next_pcrl and opj_pi_next_cprl (#938) Fixes issues with id:000026,sig:08,src:002419,op:int32,pos:60,val:+32 and id:000019,sig:08,src:001098,op:flip1,pos:49
TfLiteStatus PreluPrepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 2); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* input = GetInput(context, node, 0); TfLiteTensor* output = GetOutput(context, node, 0); const TfLiteTensor* alpha = GetInpu...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
72,782,775,112,923,680,000,000,000,000,000,000,000
55
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static int l2cap_sock_listen(struct socket *sock, int backlog) { struct sock *sk = sock->sk; int err = 0; BT_DBG("sk %p backlog %d", sk, backlog); lock_sock(sk); if (sk->sk_state != BT_BOUND || sock->type != SOCK_SEQPACKET) { err = -EBADFD; goto done; } switch (l2cap_pi(sk)->mode) { case L2CAP_MODE_BASI...
1
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
211,003,898,318,773,800,000,000,000,000,000,000,000
56
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
static void OneLineTransp(struct ico_progressive_state *context) { gint X; guchar *Pixels; /* Ignore the XOR mask for XP style 32-bpp icons with alpha */ if (context->Header.depth == 32) return; X = 0; if (context->Header.Negative == 0) Pixels = (context->pixbuf->pixels + (gsize) context->pixbuf->rows...
0
[ "CWE-787" ]
gdk-pixbuf
88af50a864195da1a4f7bda5f02539704fbda599
231,152,450,124,166,400,000,000,000,000,000,000,000
37
ico: Be more careful when parsing headers There is some redundancy between the ico directory and the bitmap image header. If the two disagree on the icon dimensions, just toss the image, instead of risking crashes or OOM later. Also add some more debug spew that helped in tracking this down, and make error messages mo...
TEST_F(HttpConnectionManagerImplTest, StartAndFinishSpanNormalFlowIngressDecoratorOverrideOp) { setup(false, ""); auto* span = new NiceMock<Tracing::MockSpan>(); EXPECT_CALL(tracer_, startSpan_(_, _, _, _)) .WillOnce( Invoke([&](const Tracing::Config& config, const HeaderMap&, const StreamInfo::S...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
218,369,994,548,876,400,000,000,000,000,000,000,000
65
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y) { CirrusVGAState *s = container_of(s1, CirrusVGAState, vga); int w, h, x1, x2, poffset; unsigned int color0, color1; const uint8_t *palette, *src; uint32_t content; if (!(s->vga.sr[0x12] & CIRRUS_CURSOR_SHOW)) ...
0
[ "CWE-119" ]
qemu
026aeffcb4752054830ba203020ed6eb05bcaba8
29,489,975,512,768,465,000,000,000,000,000,000,000
61
cirrus: stop passing around dst pointers in the blitter Instead pass around the address (aka offset into vga memory). Calculate the pointer in the rop_* functions, after applying the mask to the address, to make sure the address stays within the valid range. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-i...
static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp) { ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT; shm_rmid(ns, shp); shm_unlock(shp); if (!is_file_hugepages(shp->shm_file)) shmem_lock(shp->shm_file, 0, shp->mlock_user); else if (shp->mlock_user) user_shm_unlock(file_i...
1
[ "CWE-362" ]
linux
a399b29dfbaaaf91162b2dc5a5875dd51bbfa2a1
220,336,206,663,422,200,000,000,000,000,000,000,000
13
ipc,shm: fix shm_file deletion races When IPC_RMID races with other shm operations there's potential for use-after-free of the shm object's associated file (shm_file). Here's the race before this patch: TASK 1 TASK 2 ------ ------ shm_rmid() ipc_lock_object() ...
static struct htab_elem *get_htab_elem(struct bpf_htab *htab, int i) { return (struct htab_elem *) (htab->elems + i * (u64)htab->elem_size); }
0
[ "CWE-787" ]
bpf
c4eb1f403243fc7bbb7de644db8587c03de36da6
107,173,325,865,489,760,000,000,000,000,000,000,000
4
bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as repor...
void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *chunk) { /* Directly call the packet handling routine. */ /* We are now calling this either from the soft interrupt * or from the backlog processing. * Eventually, we should clean up inqueue to not rely * on the BH related data structures. */ list_ad...
0
[]
linux
bbd0d59809f923ea2b540cbd781b32110e249f6e
83,095,385,365,345,690,000,000,000,000,000,000,000
12
[SCTP]: Implement the receive and verification of AUTH chunk This patch implements the receive path needed to process authenticated chunks. Add ability to process the AUTH chunk and handle edge cases for authenticated COOKIE-ECHO as well. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David ...
_zip_set_open_error(int *zep, const zip_error_t *err, int ze) { if (err) { ze = zip_error_code_zip(err); if (zip_error_system_type(err) == ZIP_ET_SYS) { errno = zip_error_code_system(err); } } if (zep) *zep = ze; }
0
[ "CWE-119", "CWE-770", "CWE-787" ]
libzip
9b46957ec98d85a572e9ef98301247f39338a3b5
145,724,198,819,782,740,000,000,000,000,000,000,000
12
Make eocd checks more consistent between zip and zip64 cases.
static int path_set_acls(Item *item, const char *path) { int r = 0; #if HAVE_ACL char fn[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; _cleanup_close_ int fd = -1; struct stat st; assert(item); assert(path); fd = open(path, O_NOFOLLOW|O_CLOEXEC|O_PATH); ...
1
[ "CWE-59" ]
systemd
5579f85663d10269e7ac7464be6548c99cea4ada
255,511,849,952,610,430,000,000,000,000,000,000,000
40
tmpfiles: refuse to chown()/chmod() files which are hardlinked, unless protected_hardlinks sysctl is on Let's add some extra safety. Fixes: #7736
static int lag_read_prob_header(lag_rac *rac, GetBitContext *gb) { int i, j, scale_factor; unsigned prob, cumulative_target; unsigned cumul_prob = 0; unsigned scaled_cumul_prob = 0; rac->prob[0] = 0; rac->prob[257] = UINT_MAX; /* Read probabilities from bitstream */ for (i = 1; i < 257;...
0
[ "CWE-787" ]
FFmpeg
4c3e1956ee35fdcc5ffdb28782050164b4623c0b
181,205,676,459,954,830,000,000,000,000,000,000,000
85
lagarith: reallocate rgb_planes when needed Fixes invalid writes on pixel format changes. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
int abytereader::getpos( void ) { return cbyte; }
0
[ "CWE-1187" ]
lepton
82167c144a322cc956da45407f6dce8d4303d346
250,971,663,466,414,540,000,000,000,000,000,000,000
4
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
rb_str_succ_bang(VALUE str) { rb_str_shared_replace(str, rb_str_succ(str)); return str; }
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
13,853,835,733,456,435,000,000,000,000,000,000,000
6
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
win_drag_status_line(win_T *dragwin, int offset) { frame_T *curfr; frame_T *fr; int room; int row; int up; // if TRUE, drag status line up, otherwise down int n; fr = dragwin->w_frame; curfr = fr; if (fr != topframe) // more than one window { fr = fr->fr_parent; // When t...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
108,646,555,676,806,120,000,000,000,000,000,000,000
124
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
void ha_partition::column_bitmaps_signal() { handler::column_bitmaps_signal(); /* Must read all partition fields to make position() call possible */ bitmap_union(table->read_set, &m_part_info->full_part_field_set); }
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
124,723,508,488,063,670,000,000,000,000,000,000,000
6
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
static ssize_t proc_pid_cmdline_read(struct file *file, char __user *buf, size_t _count, loff_t *pos) { struct task_struct *tsk; struct mm_struct *mm; char *page; unsigned long count = _count; unsigned long arg_start, arg_end, env_start, env_end; unsigned long len1, len2, len; unsigned long p; char c; ...
0
[ "CWE-362" ]
linux
8148a73c9901a8794a50f950083c00ccf97d43b3
311,468,568,734,766,440,000,000,000,000,000,000,000
198
proc: prevent accessing /proc/<PID>/environ until it's ready If /proc/<PID>/environ gets read before the envp[] array is fully set up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to read more bytes than are actually written, as env_start will already be set but env_end will still be zero, makin...
check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries, const unsigned int *underflows, const char *name) { struct xt_entry_match *...
0
[ "CWE-284", "CWE-264" ]
linux
ce683e5f9d045e5d67d1312a42b359cb2ab2a13c
212,023,257,380,300,730,000,000,000,000,000,000,000
89
netfilter: x_tables: check for bogus target offset We're currently asserting that targetoff + targetsize <= nextoff. Extend it to also check that targetoff is >= sizeof(xt_entry). Since this is generic code, add an argument pointing to the start of the match/target, we can then derive the base structure size from the...
static inline uint32_t htx_meta_space(const struct htx *htx) { if (htx->tail == -1) return 0; return ((htx->tail + 1 - htx->head) * sizeof(struct htx_blk)); }
0
[ "CWE-190" ]
haproxy
3b69886f7dcc3cfb3d166309018e6cfec9ce2c95
49,442,782,115,629,340,000,000,000,000,000,000,000
7
BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer Ori Hollander of JFrog Security reported that htx_add_header() and htx_add_trailer() were missing a length check on the header name. While this does not allow to overwrite any memory area, it results in bits of the header name length to sli...
void version() { printf("Redis server version %s (%s:%d)\n", REDIS_VERSION, redisGitSHA1(), atoi(redisGitDirty()) > 0); exit(0); }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
136,526,321,351,951,190,000,000,000,000,000,000,000
5
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
int generalizedTimeFilter( slap_mask_t use, slap_mask_t flags, Syntax *syntax, MatchingRule *mr, struct berval *prefix, void * assertedValue, BerVarray *keysp, void *ctx ) { BerVarray keys; char tmp[5]; BerValue bvtmp; /* 40 bit index */ BerValue *value = (BerValue *) assertedValue; struct lutil_tm tm; st...
0
[ "CWE-617" ]
openldap
3539fc33212b528c56b716584f2c2994af7c30b0
330,723,492,879,432,400,000,000,000,000,000,000,000
46
ITS#9454 fix issuerAndThisUpdateCheck
static inline int is_zero_pfn(unsigned long pfn) { extern unsigned long zero_pfn; unsigned long offset_from_zero_pfn = pfn - zero_pfn; return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT); }
0
[]
linux
ee53664bda169f519ce3c6a22d378f0b946c8178
276,198,475,247,196,530,000,000,000,000,000,000,000
6
mm: Fix NULL pointer dereference in madvise(MADV_WILLNEED) support Sasha Levin found a NULL pointer dereference that is due to a missing page table lock, which in turn is due to the pmd entry in question being a transparent huge-table entry. The code - introduced in commit 1998cc048901 ("mm: make madvise(MADV_WILLNEE...
xmlXPtrEvalRangePredicate(xmlXPathParserContextPtr ctxt) { const xmlChar *cur; xmlXPathObjectPtr res; xmlXPathObjectPtr obj, tmp; xmlLocationSetPtr newset = NULL; xmlLocationSetPtr oldset; int i; if (ctxt == NULL) return; SKIP_BLANKS; if (CUR != '[') { XP_ERROR(XPATH_INVALID_PREDI...
0
[ "CWE-416" ]
libxml2
9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
138,078,863,867,999,100,000,000,000,000,000,000,000
99
Fix XPointer paths beginning with range-to The old code would invoke the broken xmlXPtrRangeToFunction. range-to isn't really a function but a special kind of location step. Remove this function and always handle range-to in the XPath code. The old xmlXPtrRangeToFunction could also be abused to trigger a use-after-fr...
static void php_wddx_pop_element(void *user_data, const XML_Char *name) { st_entry *ent1, *ent2; wddx_stack *stack = (wddx_stack *)user_data; HashTable *target_hash; zend_class_entry **pce; zval *obj; zval *tmp; TSRMLS_FETCH(); /* OBJECTS_FIXME */ if (stack->top == 0) { return; } if (!strc...
1
[]
php-src
1785d2b805f64eaaacf98c14c9e13107bf085ab1
797,678,010,461,884,000,000,000,000,000,000,000
124
Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability
static inline struct page *compound_trans_head(struct page *page) { if (PageTail(page)) { struct page *head; head = page->first_page; smp_rmb(); /* * head may be a dangling pointer. * __split_huge_page_refcount clears PageTail before * overwriting first_page, so if PageTail is still * there it mean...
0
[ "CWE-399" ]
linux
78f11a255749d09025f54d4e2df4fbcb031530e2
214,226,278,658,219,330,000,000,000,000,000,000,000
17
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...
poppler_font_info_init (PopplerFontInfo *font_info) { font_info->document = nullptr; font_info->scanner = nullptr; }
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
162,374,012,148,659,200,000,000,000,000,000,000,000
5
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
ConnectionImpl::StreamImpl::StreamImpl(ConnectionImpl& parent, uint32_t buffer_limit) : parent_(parent), local_end_stream_sent_(false), remote_end_stream_(false), data_deferred_(false), waiting_for_non_informational_headers_(false), pending_receive_buffer_high_watermark_called_(false), pending_sen...
1
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
8,147,067,521,466,703,000,000,000,000,000,000,000
9
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
HandleToObject( TPMI_DH_OBJECT handle // IN: handle of the object ) { UINT32 index; // Return NULL if the handle references a permanent handle because there is no // associated OBJECT. if(HandleGetType(handle) == TPM_HT_PERMANENT) return NULL; // In this imple...
0
[ "CWE-119" ]
libtpms
ea62fd9679f8c6fc5e79471b33cfbd8227bfed72
32,293,914,196,175,960,000,000,000,000,000,000,000
16
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...
do_setval(Oid relid, int64 next, bool iscalled) { SeqTable elm; Relation seqrel; Buffer buf; HeapTupleData seqdatatuple; Form_pg_sequence_data seq; HeapTuple pgstuple; Form_pg_sequence pgsform; int64 maxv, minv; /* open and lock sequence */ init_sequence(relid, &elm, &seqrel); if (pg_class_aclcheck(e...
0
[ "CWE-94" ]
postgres
7e92f78abe80e4b30e648a40073abb59057e21f8
22,606,258,172,124,430,000,000,000,000,000,000,000
107
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
static u32 ctrn_u32_to_index(u32 val) { if (!val) return 0; if (val<=255) return 1; if (val<=65535) return 2; return 3; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
145,046,949,160,716,770,000,000,000,000,000,000,000
7
fixed #2255
static int synthesize_connected_signal(sd_bus *bus) { _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL; int r; assert(bus); /* If enabled, synthesizes a local "Connected" signal mirroring the local "Disconnected" signal. This is called * whenever we fully established ...
0
[ "CWE-416" ]
systemd
1068447e6954dc6ce52f099ed174c442cb89ed54
284,263,405,438,857,850,000,000,000,000,000,000,000
43
sd-bus: introduce API for re-enqueuing incoming messages When authorizing via PolicyKit we want to process incoming method calls twice: once to process and figure out that we need PK authentication, and a second time after we aquired PK authentication to actually execute the operation. With this new call sd_bus_enqueu...
XML_ParseBuffer(XML_Parser parser, int len, int isFinal) { const char *start; enum XML_Status result = XML_STATUS_OK; if (parser == NULL) return XML_STATUS_ERROR; switch (ps_parsing) { case XML_SUSPENDED: errorCode = XML_ERROR_SUSPENDED; return XML_STATUS_ERROR; case XML_FINISHED: errorCode...
0
[ "CWE-611" ]
libexpat
c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f
264,369,662,740,461,050,000,000,000,000,000,000,000
56
xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233)
static void snd_usbmidi_do_output(struct snd_usb_midi_out_endpoint *ep) { unsigned int urb_index; struct urb *urb; unsigned long flags; spin_lock_irqsave(&ep->buffer_lock, flags); if (ep->umidi->disconnected) { spin_unlock_irqrestore(&ep->buffer_lock, flags); return; } urb_index = ep->next_urb; for (;;) {...
0
[ "CWE-703" ]
linux
07d86ca93db7e5cdf4743564d98292042ec21af7
144,751,621,707,023,300,000,000,000,000,000,000,000
36
ALSA: usb-audio: avoid freeing umidi object twice The 'umidi' object will be free'd on the error path by snd_usbmidi_free() when tearing down the rawmidi interface. So we shouldn't try to free it in snd_usbmidi_create() after having registered the rawmidi interface. Found by KASAN. Signed-off-by: Andrey Konovalov <a...
HttpTransact::HandleCacheOpenReadMiss(State* s) { DebugTxn("http_trans", "[HandleCacheOpenReadMiss] --- MISS"); DebugTxn("http_seq", "[HttpTransact::HandleCacheOpenReadMiss] " "Miss in cache"); if (delete_all_document_alternates_and_return(s, false)) { DebugTxn("http_trans", "[HandleCacheOpenReadMiss] Delete...
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
268,709,538,434,290,500,000,000,000,000,000,000,000
80
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
static int mov_read_pasp(MOVContext *c, AVIOContext *pb, MOVAtom atom) { const int num = avio_rb32(pb); const int den = avio_rb32(pb); AVStream *st; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; if ((st->sample_aspect_ratio.den != 1 || st->sample_aspect...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
689e59b7ffed34eba6159dcc78e87133862e3746
243,904,913,595,296,170,000,000,000,000,000,000,000
22
mov: reset dref_count on realloc to keep values consistent. This fixes a potential crash. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static avifBool avifParseTrackHeaderBox(avifTrack * track, const uint8_t * raw, size_t rawLen) { BEGIN_STREAM(s, raw, rawLen); uint8_t version; CHECK(avifROStreamReadVersionAndFlags(&s, &version, NULL)); uint32_t ignored32, trackID; uint64_t ignored64; if (version == 1) { CHECK(avifROS...
0
[ "CWE-703", "CWE-787" ]
libavif
0a8e7244d494ae98e9756355dfbfb6697ded2ff9
129,185,136,114,542,280,000,000,000,000,000,000,000
47
Set max image size to 16384 * 16384 Fix https://crbug.com/oss-fuzz/24728 and https://crbug.com/oss-fuzz/24734.
bool address_space_write(AddressSpace *as, hwaddr addr, const uint8_t *buf, int len) { return address_space_rw(as, addr, (uint8_t *)buf, len, true); }
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
259,477,225,401,299,800,000,000,000,000,000,000,000
5
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
virDomainStateReasonToString(virDomainState state, int reason) { switch (state) { case VIR_DOMAIN_NOSTATE: return virDomainNostateReasonTypeToString(reason); case VIR_DOMAIN_RUNNING: return virDomainRunningReasonTypeToString(reason); case VIR_DOMAIN_BLOCKED: return virDomainBlock...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
101,283,048,933,690,660,000,000,000,000,000,000,000
25
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 void JPEGProgressHandler(j_common_ptr jpeg_info) { ErrorManager *error_manager; ExceptionInfo *exception; Image *image; error_manager=(ErrorManager *) jpeg_info->client_data; image=error_manager->image; exception=error_manager->exception; if (jpeg_info->is_decompressor == 0) retu...
0
[ "CWE-416" ]
ImageMagick
39f226a9c137f547e12afde972eeba7551124493
259,237,516,286,727,500,000,000,000,000,000,000,000
22
https://github.com/ImageMagick/ImageMagick/issues/1641
//! Return a 5x5 matrix containing specified coefficients. static CImg<T> matrix(const T& a0, const T& a1, const T& a2, const T& a3, const T& a4, const T& a5, const T& a6, const T& a7, const T& a8, const T& a9, const T& a10, const T& a11, const T& a12, const T...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
143,928,041,846,603,480,000,000,000,000,000,000,000
13
Fix other issues in 'CImg<T>::load_bmp()'.
static int tm_spr_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) { int ret; /* Build tests */ BUILD_BUG_ON(TSO(tm_tfhar) + sizeof(u64) != TSO(tm_texasr)); BUILD_BUG_ON(TSO(tm_texasr) + sizeof...
0
[ "CWE-119", "CWE-787" ]
linux
c1fa0768a8713b135848f78fd43ffc208d8ded70
183,338,482,430,463,100,000,000,000,000,000,000,000
37
powerpc/tm: Flush TM only if CPU has TM feature Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") added code to access TM SPRs in flush_tmregs_to_thread(). However flush_tmregs_to_thread() does not check if TM feature is available on CPU before trying to access TM SPRs in order to copy live state to th...
void __open_nameservers(void) { static uint32_t resolv_conf_mtime; char szBuffer[MAXLEN_searchdomain]; FILE *fp; int i; sockaddr46_t sa; if (!__res_sync) { /* Reread /etc/resolv.conf if it was modified. */ struct stat sb; if (stat(_PATH_RESCONF, &sb) != 0) sb.st_mtime = 0; if (resolv_conf_mtime != (...
0
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
270,418,321,887,860,560,000,000,000,000,000,000,000
160
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
static bool cmd_read_native_max(IDEState *s, uint8_t cmd) { bool lba48 = (cmd == WIN_READ_NATIVE_MAX_EXT); /* Refuse if no sectors are addressable (e.g. medium not inserted) */ if (s->nb_sectors == 0) { ide_abort_command(s); return true; } ide_cmd_lba48_transform(s, lba48); ide...
0
[ "CWE-189" ]
qemu
940973ae0b45c9b6817bab8e4cf4df99a9ef83d7
72,629,300,144,015,450,000,000,000,000,000,000,000
15
ide: Correct improper smart self test counter reset in ide core. The SMART self test counter was incorrectly being reset to zero, not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE: * We would write off the beginning of a dynamically allocated buffer * We forgot the SMART history Fix this. Signed-o...
static void prb_run_all_ft_ops(struct tpacket_kbdq_core *pkc, struct tpacket3_hdr *ppd) { ppd->hv1.tp_padding = 0; prb_fill_vlan_info(pkc, ppd); if (pkc->feature_req_word & TP_FT_REQ_FILL_RXHASH) prb_fill_rxhash(pkc, ppd); else prb_clear_rxhash(pkc, ppd); }
0
[ "CWE-416", "CWE-362" ]
linux
84ac7260236a49c79eede91617700174c2c19b0c
1,099,516,576,208,486,200,000,000,000,000,000,000
11
packet: fix race condition in packet_set_ring When packet_set_ring creates a ring buffer it will initialize a struct timer_list if the packet version is TPACKET_V3. This value can then be raced by a different thread calling setsockopt to set the version to TPACKET_V1 before packet_set_ring has finished. This leads to...
static int mov_read_cmov(MOVContext *c, AVIOContext *pb, MOVAtom atom) { #if CONFIG_ZLIB FFIOContext ctx; uint8_t *cmov_data; uint8_t *moov_data; /* uncompressed data */ long cmov_len, moov_len; int ret = -1; avio_rb32(pb); /* dcom atom */ if (avio_rl32(pb) != MKTAG('d','c','o','m')) ...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
162,700,968,411,982,870,000,000,000,000,000,000,000
51
avformat/mov: Check count sums in build_open_gop_key_points() Fixes: ffmpeg.md Fixes: Out of array access Fixes: CVE-2022-2566 Found-by: Andy Nguyen <theflow@google.com> Found-by: 3pvd <3pvd@google.com> Reviewed-by: Andy Nguyen <theflow@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void opj_j2k_dump_MH_index(opj_j2k_t* p_j2k, FILE* out_stream) { opj_codestream_index_t* cstr_index = p_j2k->cstr_index; OPJ_UINT32 it_marker, it_tile, it_tile_part; fprintf(out_stream, "Codestream index from main header: {\n"); fprintf(out_stream, "\t Main header start position=%" PRI...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
241,661,610,891,791,180,000,000,000,000,000,000,000
67
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
ssize_t __weak cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "Not affected\n"); }
1
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
14,991,525,528,774,103,000,000,000,000,000,000,000
5
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
GF_Err rvcc_box_size(GF_Box *s) { GF_RVCConfigurationBox *ptr = (GF_RVCConfigurationBox *)s; ptr->size += 2; if (! ptr->predefined_rvc_config) ptr->size += 2; return GF_OK;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
77,775,665,064,467,660,000,000,000,000,000,000,000
7
fixed #1587
static int dccp_to_nlattr(struct sk_buff *skb, struct nlattr *nla, struct nf_conn *ct) { struct nlattr *nest_parms; spin_lock_bh(&ct->lock); nest_parms = nla_nest_start(skb, CTA_PROTOINFO_DCCP | NLA_F_NESTED); if (!nest_parms) goto nla_put_failure; if (nla_put_u8(skb, CTA_PROTOINFO_DCCP_STATE, ct->proto.dc...
0
[ "CWE-20" ]
linux
b22f5126a24b3b2f15448c3f2a254fc10cbc2b92
294,259,721,056,764,440,000,000,000,000,000,000,000
23
netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages Some occurences in the netfilter tree use skb_header_pointer() in the following way ... struct dccp_hdr _dh, *dh; ... skb_header_pointer(skb, dataoff, sizeof(_dh), &dh); ... where dh itself is a pointer that is being passed as the copy buffer. Ins...
static int trace_create_savedcmd(void) { int ret; savedcmd = kmalloc(sizeof(*savedcmd), GFP_KERNEL); if (!savedcmd) return -ENOMEM; ret = allocate_cmdlines_buffer(SAVED_CMDLINES_DEFAULT, savedcmd); if (ret < 0) { kfree(savedcmd); savedcmd = NULL; return -ENOMEM; } return 0; }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
271,722,184,413,178,630,000,000,000,000,000,000,000
17
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
static int nfs4_set_client(struct nfs_server *server, const char *hostname, const struct sockaddr_in *addr, const char *ip_addr, rpc_authflavor_t authflavour, int proto, int timeo, int retrans) { struct nfs_client *clp; int error; dprintk("--> nfs4_set_client()\n"); /* Allocate or find a client reference ...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
232,734,887,762,544,140,000,000,000,000,000,000,000
31
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
e_ews_attachment_info_new (EEwsAttachmentInfoType type) { EEwsAttachmentInfo *info; info = g_new0 (EEwsAttachmentInfo, 1); info->type = type; return info; }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
139,477,983,948,569,100,000,000,000,000,000,000,000
8
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
bool TinyGLTF::LoadBinaryFromFile(Model *model, std::string *err, std::string *warn, const std::string &filename, unsigned int check_sections) { std::stringstream ss; if (fs.ReadWholeFile == nullptr) { // Prog...
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
180,409,658,809,506,600,000,000,000,000,000,000,000
35
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
static int asf_read_simple_index(AVFormatContext *s, const GUIDParseTable *g) { ASFContext *asf = s->priv_data; AVIOContext *pb = s->pb; AVStream *st = NULL; uint64_t interval; // index entry time interval in 100 ns units, usually it's 1s uint32_t pkt_num, nb_entries; int32_t prev_pkt_num = -...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
2b46ebdbff1d8dec7a3d8ea280a612b91a582869
23,950,799,104,633,060,000,000,000,000,000,000,000
48
avformat/asfdec_o: Check size_bmp more fully Fixes: integer overflow and out of array access Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int sqlite3WhereOrderByLimitOptLabel(WhereInfo *pWInfo){ WhereLevel *pInner; if( !pWInfo->bOrderedInnerLoop ){ /* The ORDER BY LIMIT optimization does not apply. Jump to the ** continuation of the inner-most loop. */ return pWInfo->iContinue; } pInner = &pWInfo->a[pWInfo->nLevel-1]; assert( pInn...
0
[ "CWE-129" ]
sqlite
effc07ec9c6e08d3bd17665f8800054770f8c643
82,088,961,983,671,110,000,000,000,000,000,000,000
11
Fix the whereKeyStats() routine (part of STAT4 processing only) so that it is able to cope with row-value comparisons against the primary key index of a WITHOUT ROWID table. [forum:/forumpost/3607259d3c|Forum post 3607259d3c]. FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb
static inline bool kvm_dirty_log_manual_protect_and_init_set(struct kvm *kvm) { return !!(kvm->manual_dirty_log_protect & KVM_DIRTY_LOG_INITIALLY_SET); }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
222,133,408,794,821,320,000,000,000,000,000,000,000
4
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
static inline void _set_gate(int gate, unsigned type, void *addr, unsigned dpl, unsigned ist, unsigned seg) { gate_desc s; pack_gate(&s, type, (unsigned long)addr, dpl, ist, seg); /* * does not need to be atomic because it is only done once at * setup time */ write_idt_entry(idt_table, gate, &s); }
0
[ "CWE-119" ]
linux-2.6
5ac37f87ff18843aabab84cf75b2f8504c2d81fe
29,117,269,849,685,900,000,000,000,000,000,000,000
11
x86: fix ldt limit for 64 bit Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor. Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
static struct mm_struct * mm_init(struct mm_struct * mm, struct task_struct *p) { atomic_set(&mm->mm_users, 1); atomic_set(&mm->mm_count, 1); init_rwsem(&mm->mmap_sem); INIT_LIST_HEAD(&mm->mmlist); mm->flags = (current->mm) ? (current->mm->flags & MMF_INIT_MASK) : default_dump_filter; mm->core_state = NULL; mm...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
210,163,270,316,797,950,000,000,000,000,000,000,000
27
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
evdev_tag_keyboard_internal(struct evdev_device *device) { device->tags |= EVDEV_TAG_INTERNAL_KEYBOARD; device->tags &= ~EVDEV_TAG_EXTERNAL_KEYBOARD; }
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
27,744,943,297,932,690,000,000,000,000,000,000,000
5
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
ews_config_lookup_constructed (GObject *object) { EConfigLookup *config_lookup; /* Chain up to parent's method. */ G_OBJECT_CLASS (e_ews_config_lookup_parent_class)->constructed (object); config_lookup = E_CONFIG_LOOKUP (e_extension_get_extensible (E_EXTENSION (object))); e_config_lookup_register_worker (config...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
124,322,113,463,636,950,000,000,000,000,000,000,000
11
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
R_API void r_bin_java_print_fieldref_cp_summary(RBinJavaCPTypeObj *obj) { if (obj == NULL) { eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* FieldRef.\n"); return; } eprintf ("FieldRef ConstantPool Type (%d) ", obj->metas->ord); eprintf (" Offset: 0x%08"PFMT64x"", obj->file_offset); eprintf (" Cla...
0
[ "CWE-787" ]
radare2
9650e3c352f675687bf6c6f65ff2c4a3d0e288fa
209,443,719,333,620,500,000,000,000,000,000,000,000
10
Fix oobread segfault in java arith8.class ##crash * Reported by Cen Zhang via huntr.dev
static ssize_t bm_entry_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { struct dentry *root; Node *e = file->f_path.dentry->d_inode->i_private; int res = parse_command(buffer, count); switch (res) { case 1: clear_bit(Enabled, &e->flags); break; case 2: set_bit(Enabled, ...
0
[ "CWE-200" ]
linux-2.6
b66c5984017533316fd1951770302649baf1aa33
254,836,692,459,471,300,000,000,000,000,000,000,000
24
exec: do not leave bprm->interp on stack If a series of scripts are executed, each triggering module loading via unprintable bytes in the script header, kernel stack contents can leak into the command line. Normally execution of binfmt_script and binfmt_misc happens recursively. However, when modules are enabled, and...
xvasprintf(char **strp, const char *fmt, va_list args) { int rc = 0; rc = vasprintf(strp, fmt, args); if ((rc == -1) && strp) *strp = NULL; return rc; }
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
23,220,246,322,936,427,000,000,000,000,000,000,000
9
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
static uint8_t send_read_no_dma_command(int nb_sect, uint8_t expected_st0) { uint8_t drive = 0; uint8_t head = 0; uint8_t cyl = 0; uint8_t sect_addr = 1; uint8_t sect_size = 2; uint8_t eot = nb_sect; uint8_t gap = 0x1b; uint8_t gpl = 0xff; uint8_t msr = 0; uint8_t st0; uint...
0
[ "CWE-787" ]
qemu
46609b90d9e3a6304def11038a76b58ff43f77bc
45,011,550,851,642,330,000,000,000,000,000,000,000
73
tests/qtest/fdc-test: Add a regression test for CVE-2021-3507 Add the reproducer from https://gitlab.com/qemu-project/qemu/-/issues/339 Without the previous commit, when running 'make check-qtest-i386' with QEMU configured with '--enable-sanitizers' we get: ==4028352==ERROR: AddressSanitizer: heap-buffer-overflow ...
policy_summary_add_item(smartlist_t *summary, addr_policy_t *p) { if (p->policy_type == ADDR_POLICY_ACCEPT) { if (p->maskbits == 0) { policy_summary_accept(summary, p->prt_min, p->prt_max, p->addr.family); } } else if (p->policy_type == ADDR_POLICY_REJECT) { int is_private = 0; int i; ...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
82,574,711,422,757,820,000,000,000,000,000,000,000
31
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
static void smbXcli_negprot_smb1_done(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data(subreq, struct tevent_req); struct smbXcli_negprot_state *state = tevent_req_data(req, struct smbXcli_negprot_state); struct smbXcli_conn *conn = state->conn; struct iovec *recv_iov = NULL; ...
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
183,416,033,823,732,700,000,000,000,000,000,000,000
390
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
progress_dialog_delete_event (GtkWidget *caller, GdkEvent *event, FrWindow *window) { if (window->priv->stoppable) { activate_action_stop (NULL, window); close_progress_dialog (window, TRUE); } return TRUE; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
329,081,258,481,113,100,000,000,000,000,000,000,000
11
libarchive: sanitize filenames before extracting
static int srp_done(Sg_fd *sfp, Sg_request *srp) { unsigned long flags; int ret; read_lock_irqsave(&sfp->rq_list_lock, flags); ret = srp->done; read_unlock_irqrestore(&sfp->rq_list_lock, flags); return ret; }
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
258,358,092,456,518,400,000,000,000,000,000,000,000
10
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>