func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp, const unsigned char *dgst, int dlen) { BN_CTX *ctx = NULL; BIGNUM *k, *kinv = NULL, *r = *rp; BIGNUM *l, *m; int ret = 0; int q_bits; if (!dsa->p || !dsa->q || !d...
1
[ "CWE-327" ]
openssl
8abfe72e8c1de1b95f50aa0d9134803b4d00070f
285,440,352,149,894,450,000,000,000,000,000,000,000
104
Timing vulnerability in DSA signature generation (CVE-2018-0734). Avoid a timing attack that leaks information via a side channel that triggers when a BN is resized. Increasing the size of the BNs prior to doing anything with them suppresses the attack. Thanks due to Samuel Weiser for finding and locating this. Rev...
is_bit_set(int P, int bit) { // Bits in P are numbered from 1 in the spec return (P & (1 << (bit - 1))); }
0
[ "CWE-125" ]
qpdf
dea704f0ab7f625e1e7b3f9a1110b45b63157317
132,754,036,848,415,260,000,000,000,000,000,000,000
5
Pad keys to avoid memory errors (fixes #147)
static bool dce81_construct( uint8_t num_virtual_links, struct dc *dc, struct dce110_resource_pool *pool) { unsigned int i; struct dc_context *ctx = dc->ctx; struct dc_bios *bp; ctx->dc_bios->regs = &bios_regs; pool->base.res_cap = &res_cap_81; pool->base.funcs = &dce80_res_pool_funcs; /******************...
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
055e547478a11a6360c7ce05e2afc3e366968a12
262,271,999,548,121,980,000,000,000,000,000,000,000
179
drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
static SQInteger array_filter(HSQUIRRELVM v) { SQObject &o = stack_get(v,1); SQArray *a = _array(o); SQObjectPtr ret = SQArray::Create(_ss(v),0); SQInteger size = a->Size(); SQObjectPtr val; for(SQInteger n = 0; n < size; n++) { a->Get(n,val); v->Push(o); v->Push(n); ...
0
[ "CWE-703", "CWE-787" ]
squirrel
a6413aa690e0bdfef648c68693349a7b878fe60d
7,560,435,152,106,950,000,000,000,000,000,000,000
23
fix in thread.call
regcomp(regex_t* reg, const char* pattern, int posix_options) { int r, len; OnigSyntaxType* syntax = OnigDefaultSyntax; OnigOptionType options; if ((posix_options & REG_EXTENDED) == 0) syntax = ONIG_SYNTAX_POSIX_BASIC; options = syntax->options; if ((posix_options & REG_ICASE) != 0) ONIG_OPTION_...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
311,269,493,028,173,960,000,000,000,000,000,000,000
30
onig-5.9.2
int bdrv_pwritev(BlockDriverState *bs, int64_t offset, QEMUIOVector *qiov) { int ret; ret = bdrv_prwv_co(bs, offset, qiov, true, 0); if (ret < 0) { return ret; } return qiov->size; }
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
142,135,975,451,857,390,000,000,000,000,000,000,000
11
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
WavInFile::WavInFile(FILE *file) { // Try to open the file for reading fptr = file; if (!file) { // didn't succeed string msg = "Error : Unable to access input stream for reading"; ST_THROW_RT_ERROR(msg.c_str()); } init(); }
0
[ "CWE-119" ]
soundtouch
9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e
52,240,557,022,432,040,000,000,000,000,000,000,000
13
Added minimum size check for WAV header block lengh values
int sys_stat(const char *fname, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times) { int ret; struct stat statbuf; ret = stat(fname, &statbuf); if (ret == 0) { /* we always want directories to appear zero size */ if (S_ISDIR(statbuf.st_mode)) { statbuf.st_size = 0; } init_stat_ex_from_stat(sbuf, &s...
0
[ "CWE-20" ]
samba
d77a74237e660dd2ce9f1e14b02635f8a2569653
229,232,443,059,445,900,000,000,000,000,000,000,000
15
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...
static int lookupName( Parse *pParse, /* The parsing context */ const char *zDb, /* Name of the database containing table, or NULL */ const char *zTab, /* Name of table containing column, or NULL */ const char *zCol, /* Name of the column. */ NameContext *pNC, /* The name context used to re...
0
[ "CWE-416" ]
sqlite
4ded26a53c4df312e9fd06facbbf70377e969983
81,464,820,342,618,840,000,000,000,000,000,000,000
391
Prevent aliases of window functions expressions from being used as arguments to aggregate or other window functions. FossilOrigin-Name: 1e16d3e8fc60d39ca3899759ff15d355fdd7d3e23b325d8d2b0f954e11ce8dce
GF_Err gf_seng_get_stream_config(GF_SceneEngine *seng, u32 idx, u16 *ESID, const u8 **config, u32 *config_len, u32 *streamType, u32 *codec_id, u32 *timeScale) { GF_StreamContext *sc = gf_list_get(seng->ctx->streams, idx); if (!sc || !ESID || !config || !config_len) return GF_BAD_PARAM; *ESID = sc->ESID; *config = s...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
294,728,340,412,665,230,000,000,000,000,000,000,000
12
fixed #2138
static void FV_BiggerGlyphCache(FontView *fv, int gidcnt) { if ( fv->filled!=NULL ) BDFOrigFixup(fv->filled,gidcnt,fv->b.sf); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
25,771,373,950,576,400,000,000,000,000,000,000,000
4
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static void dcc_send_connected(SEND_DCC_REC *dcc) { GIOChannel *handle; IPADDR addr; int port; /* accept connection */ handle = net_accept(dcc->handle, &addr, &port); if (handle == NULL) return; /* TODO: some kind of paranoia check would be nice. it would check that the host of the nick who we sen...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
220,512,752,585,638,340,000,000,000,000,000,000,000
32
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
static int ntop_sqlite_exec_query(lua_State* vm) { char *db_path, *db_query; sqlite3 *db; char *zErrMsg = 0; struct ntopng_sqlite_state state; struct stat buf; ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(CONST_LUA_E...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
337,249,053,578,710,830,000,000,000,000,000,000,000
37
Security fix: prevents empty host from being used
void do_connect(struct st_command *command) { int con_port= opt_port; char *con_options; my_bool con_ssl= 0, con_compress= 0; my_bool con_pipe= 0, con_shm= 0, con_cleartext_enable= 0; my_bool con_secure_auth= 1; struct st_connection* con_slot; #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) my_boo...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
197,670,963,337,084,900,000,000,000,000,000,000,000
252
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...
ncp__io2vol(unsigned char *vname, unsigned int *vlen, const unsigned char *iname, unsigned int ilen, int cc) { int i; if (*vlen <= ilen) return -ENAMETOOLONG; if (cc) for (i = 0; i < ilen; i++) { *vname = toupper(*iname); vname++; iname++; } else { memmove(vname, iname, ilen); vname += ilen; ...
0
[ "CWE-119" ]
staging
4c41aa24baa4ed338241d05494f2c595c885af8f
84,252,788,211,062,590,000,000,000,000,000,000,000
23
staging: ncpfs: memory corruption in ncp_read_kernel() If the server is malicious then *bytes_read could be larger than the size of the "target" buffer. It would lead to memory corruption when we do the memcpy(). Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com> Signed-off-by: Dan Ca...
XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) { /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return 0; hash_secret_salt = hash_salt; return 1; }
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
141,782,621,413,002,600,000,000,000,000,000,000,000
9
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
ep_read_iter(struct kiocb *iocb, struct iov_iter *to) { struct file *file = iocb->ki_filp; struct ep_data *epdata = file->private_data; size_t len = iov_iter_count(to); ssize_t value; char *buf; if ((value = get_ready_ep(file->f_flags, epdata, false)) < 0) return value; /* halt any endpoint by doing a "wrong...
0
[ "CWE-763" ]
linux
501e38a5531efbd77d5c73c0ba838a889bfc1d74
42,174,202,416,929,407,000,000,000,000,000,000,000
55
usb: gadget: clear related members when goto fail dev->config and dev->hs_config and dev->dev need to be cleaned if dev_config fails to avoid UAF. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Link: https://lore.kernel.org/r/20211231172138.7993-3-hbh25y@gmail.com Signed...
static int prov_link_open(const uint8_t uuid[16], k_timeout_t timeout, const struct prov_bearer_cb *cb, void *cb_data) { int err; BT_DBG("uuid %s", bt_hex(uuid, 16)); err = bt_mesh_adv_enable(); if (err) { BT_ERR("Failed enabling advertiser"); return err; } if (atomic_test_and_set_bit(link.flags, ADV_...
0
[ "CWE-787" ]
zephyr
6ec31c852049641095f2cdf25591f2e1bff86774
226,182,955,995,395,760,000,000,000,000,000,000,000
29
Bluetooth: Mesh: Check SegN when receiving Transaction Start PDU When receiving Transaction Start PDU, assure that number of segments needed to send a Provisioning PDU with TotalLength size is equal to SegN value provided in the Transaction Start PDU. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no> (cher...
isdn_free_channel(int di, int ch, int usage) { int i; if ((di < 0) || (ch < 0)) { printk(KERN_WARNING "%s: called with invalid drv(%d) or channel(%d)\n", __func__, di, ch); return; } for (i = 0; i < ISDN_MAX_CHANNELS; i++) if (((!usage) || ((dev->usage[i] & ISDN_USAGE_MASK) == usage)) && (dev-...
0
[ "CWE-119" ]
linux
9f5af546e6acc30f075828cb58c7f09665033967
279,353,977,901,090,470,000,000,000,000,000,000,000
28
isdn/i4l: fix buffer overflow This fixes a potential buffer overflow in isdn_net.c caused by an unbounded strcpy. [ ISDN seems to be effectively unmaintained, and the I4L driver in particular is long deprecated, but in case somebody uses this.. - Linus ] Signed-off-by: Jiten Thakkar <jitenmt@gmail.com> Signed-...
int gethostbyname_r(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop) { resolver_storage_t *storage = (void*) buf; int h_errno; test_param_t *test; test = get_test_param(); *result = NULL; if (buflen < sizeof(*storage) + strlen(name)) return ERANGE; te...
0
[ "CWE-310" ]
libgadu
d882b15661ee94949919ebbbc43edf0db5f619cb
77,099,662,389,590,130,000,000,000,000,000,000,000
55
Odkąd biblioteka weryfikuje certyfikaty ciężko testować z self-signed.
dissect_kafka_offset_delete_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_item *subti; proto_tree *subtree; offset = dissect_kafka_error(tvb, pinfo, tree, offset); offset = dissect_kafka_throttle_t...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
58,212,698,496,158,530,000,000,000,000,000,000,000
21
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
png_cache_unknown_chunk(png_structrp png_ptr, png_uint_32 length) { png_alloc_size_t limit = PNG_SIZE_MAX; if (png_ptr->unknown_chunk.data != NULL) { png_free(png_ptr, png_ptr->unknown_chunk.data); png_ptr->unknown_chunk.data = NULL; } # ifdef PNG_SET_USER_LIMITS_SUPPORTED if (png_ptr->use...
0
[ "CWE-369" ]
libpng
2dca15686fadb1b8951cb29b02bad4cae73448da
286,545,891,851,217,540,000,000,000,000,000,000,000
55
[libpng16] Moved chunk-length check into a png_check_chunk_length() private function (Suggested by Max Stepin).
void zmq::curve_server_t::send_zap_request (const uint8_t *key) { int rc; msg_t msg; // Address delimiter frame rc = msg.init (); errno_assert (rc == 0); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Version frame rc = msg.init_si...
0
[]
libzmq
0900a489213d74feb86fc0b343308fe7884a2a3c
56,387,938,747,335,790,000,000,000,000,000,000,000
67
Problem: curve messages can be replayed Solution: ensure message short nonces are strictly increasing and validate them
static Grammar &grammar() { return get_instance().g; }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
63,605,970,373,170,470,000,000,000,000,000,000,000
1
Fix #122
push_caller(const char *path, VALUE val, void *enc) { struct push_glob_args *arg = (struct push_glob_args *)val; struct glob_pattern *list; int status; list = glob_make_pattern(path, path + strlen(path), arg->flags, enc); if (!list) { return -1; } status = glob_helper(arg->fd, arg->path, a...
0
[]
ruby
a0a2640b398cffd351f87d3f6243103add66575b
235,655,106,704,298,600,000,000,000,000,000,000,000
16
Fix for wrong fnmatch patttern * dir.c (file_s_fnmatch): ensure that pattern does not contain a NUL character. https://hackerone.com/reports/449617
qf_win_pos_update( qf_info_T *qi, int old_qf_index) // previous qf_index or zero { win_T *win; int qf_index = qf_get_curlist(qi)->qf_index; // Put the cursor on the current error in the quickfix window, so that // it's viewable. win = qf_find_win(qi); if (win != NULL && qf_index ...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
82,286,363,802,886,150,000,000,000,000,000,000,000
28
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
int nfc_fw_download(struct nfc_dev *dev, const char *firmware_name) { int rc = 0; pr_debug("%s do firmware %s\n", dev_name(&dev->dev), firmware_name); device_lock(&dev->dev); if (!device_is_registered(&dev->dev)) { rc = -ENODEV; goto error; } if (dev->dev_up) { rc = -EBUSY; goto error; } if (!dev->...
1
[ "CWE-416" ]
linux
da5c0f119203ad9728920456a0f52a6d850c01cd
174,640,597,496,876,170,000,000,000,000,000,000,000
32
nfc: replace improper check device_is_registered() in netlink related functions The device_is_registered() in nfc core is used to check whether nfc device is registered in netlink related functions such as nfc_fw_download(), nfc_dev_up() and so on. Although device_is_registered() is protected by device_lock, there is ...
static int kvm_iommu_unmap_memslots(struct kvm *kvm) { int idx; struct kvm_memslots *slots; struct kvm_memory_slot *memslot; idx = srcu_read_lock(&kvm->srcu); slots = kvm_memslots(kvm); kvm_for_each_memslot(memslot, slots) kvm_iommu_unmap_pages(kvm, memslot); srcu_read_unlock(&kvm->srcu, idx); return 0; }
0
[ "CWE-264" ]
kvm
32f6daad4651a748a58a3ab6da0611862175722f
82,282,456,886,732,810,000,000,000,000,000,000,000
16
KVM: unmap pages from the iommu when slots are removed We've been adding new mappings, but not destroying old mappings. This can lead to a page leak as pages are pinned using get_user_pages, but only unpinned with put_page if they still exist in the memslots list on vm shutdown. A memslot that is destroyed while an i...
int iscsi_copy_param_list( struct iscsi_param_list **dst_param_list, struct iscsi_param_list *src_param_list, int leading) { struct iscsi_param *param = NULL; struct iscsi_param *new_param = NULL; struct iscsi_param_list *param_list = NULL; param_list = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL); if ...
0
[ "CWE-119" ]
target-pending
cea4dcfdad926a27a18e188720efe0f2c9403456
106,510,320,451,789,400,000,000,000,000,000,000,000
65
iscsi-target: fix heap buffer overflow on error If a key was larger than 64 bytes, as checked by iscsi_check_key(), the error response packet, generated by iscsi_add_notunderstood_response(), would still attempt to copy the entire key into the packet, overflowing the structure on the heap. Remote preauthentication ke...
virtual ProcessPtr spawn(const Options &options) { TRACE_POINT(); possiblyRaiseInternalError(options); SocketPair adminSocket = createUnixSocketPair(); SocketListPtr sockets = make_shared<SocketList>(); sockets->add("main", "tcp://127.0.0.1:1234", "session", config->concurrency); syscalls::usleep(config->...
0
[]
passenger
8c6693e0818772c345c979840d28312c2edd4ba4
226,878,300,153,562,350,000,000,000,000,000,000,000
17
Security check socket filenames reported by spawned application processes.
static int date_interval_initialize(timelib_rel_time **rt, /*const*/ char *format, int format_length TSRMLS_DC) { timelib_time *b = NULL, *e = NULL; timelib_rel_time *p = NULL; int r = 0; int retval = 0; struct timelib_error_container *errors; timelib_strtointerval(format, format...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
19,600,982,964,451,142,000,000,000,000,000,000,000
32
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt, unsigned long addr, const void *old, const void *new, unsigned int bytes, struct x86_exception *exception) { struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt); gpa_t gpa; struct page *page; char *kaddr; bool e...
0
[ "CWE-369" ]
linux
0185604c2d82c560dab2f2933a18f797e74ab5a8
56,153,382,098,806,140,000,000,000,000,000,000,000
64
KVM: x86: Reload pit counters for all channels when restoring state Currently if userspace restores the pit counters with a count of 0 on channels 1 or 2 and the guest attempts to read the count on those channels, then KVM will perform a mod of 0 and crash. This will ensure that 0 values are converted to 65536 as per...
void ConnectionImpl::ServerStreamImpl::decodeHeaders(bool allow_waiting_for_informational_headers) { ASSERT(!allow_waiting_for_informational_headers); auto& headers = absl::get<RequestHeaderMapPtr>(headers_or_trailers_); if (Http::Utility::isH2UpgradeRequest(*headers)) { Http::Utility::transformUpgradeRequest...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
319,602,004,346,973,860,000,000,000,000,000,000,000
8
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...
bool IsObject(const json &o) { #ifdef TINYGLTF_USE_RAPIDJSON return o.IsObject(); #else return o.is_object(); #endif }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
47,209,739,091,629,090,000,000,000,000,000,000,000
7
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
__tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout) { return ldsem_down_write(&tty->ldisc_sem, timeout); }
0
[ "CWE-200" ]
linux-stable
dd42bf1197144ede075a9d4793123f7689e164bc
84,426,377,177,075,550,000,000,000,000,000,000,000
4
tty: Prevent ldisc drivers from re-using stale tty fields Line discipline drivers may mistakenly misuse ldisc-related fields when initializing. For example, a failure to initialize tty->receive_room in the N_GIGASET_M101 line discipline was recently found and fixed [1]. Now, the N_X25 line discipline has been discover...
void sigterm_handler(int s) { int parent=0; g_hash_table_foreach(children, killchild, &parent); if(parent) { unlink(pidfname); } exit(EXIT_SUCCESS); }
0
[ "CWE-119", "CWE-787" ]
nbd
3ef52043861ab16352d49af89e048ba6339d6df8
170,546,622,722,565,850,000,000,000,000,000,000,000
11
Fix buffer size checking Yes, this means we've re-introduced CVE-2005-3534. Sigh.
size_t mg_http_next_multipart(struct mg_str body, size_t ofs, struct mg_http_part *part) { struct mg_str cd = mg_str_n("Content-Disposition", 19); const char *s = body.ptr; size_t b = ofs, h1, h2, b1, b2, max = body.len; // Init part params if (part != NULL) part->name = part->f...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
27,053,765,937,500,453,000,000,000,000,000,000,000
39
Protect against the directory traversal in mg_upload()
int cmp_item_row::cmp(Item *arg) { arg->null_value= 0; if (arg->cols() != n) { my_error(ER_OPERAND_COLUMNS, MYF(0), n); return 1; } bool was_null= 0; arg->bring_value(); for (uint i=0; i < n; i++) { const int rc= comparators[i]->cmp(arg->element_index(i)); switch (rc) { case UNKN...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
31,536,457,930,817,154,000,000,000,000,000,000,000
27
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
void tcp_get_info(const struct sock *sk, struct tcp_info *info) { const struct tcp_sock *tp = tcp_sk(sk); const struct inet_connection_sock *icsk = inet_csk(sk); u32 now = tcp_time_stamp; memset(info, 0, sizeof(*info)); info->tcpi_state = sk->sk_state; info->tcpi_ca_state = icsk->icsk_ca_state; info->tcpi_retr...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
119,653,545,147,208,630,000,000,000,000,000,000,000
65
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
void ConnectionManagerImpl::ActiveStream::recreateStream( StreamInfo::FilterStateSharedPtr filter_state) { // n.b. we do not currently change the codecs to point at the new stream // decoder because the decoder callbacks are complete. It would be good to // null out that pointer but should not be necessary. ...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
256,943,772,560,430,270,000,000,000,000,000,000,000
42
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
msg_outtrans_attr(char_u *str, int attr) { return msg_outtrans_len_attr(str, (int)STRLEN(str), attr); }
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
315,293,046,993,167,250,000,000,000,000,000,000,000
4
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
static int tipc_aead_key_generate(struct tipc_aead_key *skey) { int rc = 0; /* Fill the key's content with a random value via RNG cipher */ rc = crypto_get_default_rng(); if (likely(!rc)) { rc = crypto_rng_get_bytes(crypto_default_rng, skey->key, skey->keylen); crypto_put_default_rng(); } return rc; ...
0
[ "CWE-20" ]
linux
fa40d9734a57bcbfa79a280189799f76c88f7bb0
267,506,834,461,417,640,000,000,000,000,000,000,000
14
tipc: fix size validations for the MSG_CRYPTO type The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages to receive keys from other nodes in the cluster in order to decrypt any further messages from them. This patch verifies that any supplied sizes in the message body are valid for the received message...
void MatShaperEval16(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register const void* D) { MatShaper8Data* p = (MatShaper8Data*) D; cmsS1Fixed14Number l1, l2, l3, r, g, b; cmsUInt32Number ri, gi, bi; // In this case (and only in this ca...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
149,275,826,381,033,600,000,000,000,000,000,000,000
35
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
static void generic_done(int result) { command_status = result; cont = &wakeup_cont; }
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
219,494,724,820,641,260,000,000,000,000,000,000,000
5
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
static uint32 TIFFClampDoubleToUInt32( double val ) { if( val < 0 ) return 0; if( val > 0xFFFFFFFFU || val != val ) return 0xFFFFFFFFU; return (uint32)val; }
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
15,661,350,357,863,127,000,000,000,000,000,000,000
8
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
NO_INLINE void jspeBlockNoBrackets() { if (JSP_SHOULD_EXECUTE) { while (lex->tk && lex->tk!='}') { JsVar *a = jspeStatement(); jsvCheckReferenceError(a); jsvUnLock(a); if (JSP_HAS_ERROR) { if (lex && !(execInfo.execute&EXEC_ERROR_LINE_REPORTED)) { execInfo.execute = (JsEx...
0
[ "CWE-787" ]
Espruino
e069be2ecc5060ef47391716e4de94999595b260
26,430,472,524,733,815,000,000,000,000,000,000,000
29
Fix potential corruption issue caused by `delete [].__proto__` (fix #2142)
build_overlap_sched_groups(struct sched_domain *sd, int cpu) { struct sched_group *first = NULL, *last = NULL, *groups = NULL, *sg; const struct cpumask *span = sched_domain_span(sd); struct cpumask *covered = sched_domains_tmpmask; struct sd_data *sdd = sd->private; struct sched_domain *child; int i; cpumask_c...
0
[ "CWE-200" ]
linux
4efbc454ba68def5ef285b26ebfcfdb605b52755
216,248,353,522,703,770,000,000,000,000,000,000,000
75
sched: Fix information leak in sys_sched_getattr() We're copying the on-stack structure to userspace, but forgot to give the right number of bytes to copy. This allows the calling process to obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent kernel memory). This fix copies only as much as we actually ...
TEST_F(QueryPlannerTest, CompoundMultikeyBounds) { // true means multikey addIndex(BSON("a" << 1 << "b" << 1), true); runQuery(fromjson("{a: 1, b: 3}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {filter: {$and:[{a:1},{b:3}]}, dir: 1}}"); assertSolutionExists( "{fetch: {filt...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
65,080,053,636,428,820,000,000,000,000,000,000,000
12
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
Item_cache_int(THD *thd, const Type_handler *handler): Item_cache(thd, handler), value(0) {}
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
209,776,503,461,637,330,000,000,000,000,000,000,000
2
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
add_to_buffer(struct reqelem * req, const unsigned char * data, int len) { unsigned char * tmp; if(req->output_buffer_offset > 0) { memmove(req->output_buffer, req->output_buffer + req->output_buffer_offset, req->output_buffer_len); req->output_buffer_offset = 0; } tmp = realloc(req->output_buffer, req->output_...
0
[ "CWE-416" ]
miniupnp
cd506a67e174a45c6a202eff182a712955ed6d6f
267,054,484,485,425,940,000,000,000,000,000,000,000
18
updateDevice() remove element from the list when realloc fails
int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) { struct iphdr *iph; int raw = 0; int ptr; struct net_device *dev; struct sk_buff *skb2; unsigned int mtu, hlen, left, len, ll_rs; int offset; int not_last_frag; struct rtable *rt = (struct rtable*)skb->dst; int err = 0; dev = rt->u.dst.de...
0
[]
linux
e89e9cf539a28df7d0eb1d0a545368e9920b34ac
134,508,000,768,835,520,000,000,000,000,000,000,000
250
[IPv4/IPv6]: UFO Scatter-gather approach Attached is kernel patch for UDP Fragmentation Offload (UFO) feature. 1. This patch incorporate the review comments by Jeff Garzik. 2. Renamed USO as UFO (UDP Fragmentation Offload) 3. udp sendfile support with UFO This patches uses scatter-gather feature of skb to generate l...
check_minimum_width(struct table *t, short *tabwidth) { int i; struct table_cell *cell = &t->cell; for (i = 0; i <= t->maxcol; i++) { if (tabwidth[i] < t->minimum_width[i]) tabwidth[i] = t->minimum_width[i]; } check_cell_width(tabwidth, cell->minimum_width, cell->col, cell->colspan, c...
0
[ "CWE-119" ]
w3m
67a3db378f5ee3047c158eae4342f7e3245a2ab1
304,035,274,431,724,130,000,000,000,000,000,000,000
13
Fix table rowspan and colspan Origin: https://github.com/tats/w3m/pull/19 Bug-Debian: https://github.com/tats/w3m/issues/8
cmsHANDLE CMSEXPORT cmsDictAlloc(cmsContext ContextID) { _cmsDICT* dict = (_cmsDICT*) _cmsMallocZero(ContextID, sizeof(_cmsDICT)); if (dict == NULL) return NULL; dict ->ContextID = ContextID; return (cmsHANDLE) dict; }
0
[]
Little-CMS
886e2f524268efe8a1c3aa838c28e446fda24486
76,176,122,308,174,480,000,000,000,000,000,000,000
9
Fixes from coverity check
static inline int audit_add_rule(struct audit_entry *entry, struct list_head *list) { struct audit_entry *e; struct audit_field *inode_f = entry->rule.inode_f; struct audit_watch *watch = entry->rule.watch; struct audit_tree *tree = entry->rule.tree; struct nameidata *ndp = NULL, *ndw = NULL; int h, err; #if...
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
51,923,742,535,654,520,000,000,000,000,000,000,000
84
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
static int get_filter(void __user *arg, struct sock_filter **p) { struct sock_fprog uprog; struct sock_filter *code = NULL; int len; if (copy_from_user(&uprog, arg, sizeof(uprog))) return -EFAULT; if (!uprog.len) { *p = NULL; return 0; } /* uprog.len is unsigned short, so no overflow here */ len = upro...
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
172,229,048,255,021,800,000,000,000,000,000,000,000
23
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
static int module_list(int argc, const char **argv, const char *prefix) { int i; struct pathspec pathspec; struct module_list list = MODULE_LIST_INIT; struct option module_list_options[] = { OPT_STRING(0, "prefix", &prefix, N_("path"), N_("alternative anchor for relative paths")), OPT_END() }; c...
0
[ "CWE-88" ]
git
98afac7a7cefdca0d2c4917dd8066a59f7088265
297,215,258,737,356,200,000,000,000,000,000,000,000
37
submodule--helper: use "--" to signal end of clone options When we clone a submodule, we call "git clone $url $path". But there's nothing to say that those components can't begin with a dash themselves, confusing git-clone into thinking they're options. Let's pass "--" to make it clear what we expect. There's no test...
struct ib_mr *bnxt_re_reg_user_mr(struct ib_pd *ib_pd, u64 start, u64 length, u64 virt_addr, int mr_access_flags, struct ib_udata *udata) { struct bnxt_re_pd *pd = container_of(ib_pd, struct bnxt_re_pd, ib_pd); struct bnxt_re_dev *rdev = pd->rdev; struct bnxt_re_mr *mr; struct ib_umem *umem; u64 *pbl_t...
0
[ "CWE-400", "CWE-401" ]
linux
4a9d46a9fe14401f21df69cea97c62396d5fb053
236,009,302,178,547,270,000,000,000,000,000,000,000
101
RDMA: Fix goto target to release the allocated memory In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com Si...
void kernel_flock(int fd, uint32 share_mode, uint32 access_mask) { #if HAVE_KERNEL_SHARE_MODES int kernel_mode = 0; if (share_mode == FILE_SHARE_WRITE) { kernel_mode = LOCK_MAND|LOCK_WRITE; } else if (share_mode == FILE_SHARE_READ) { kernel_mode = LOCK_MAND|LOCK_READ; } else if (share_mode == FILE_SHARE_NONE) {...
0
[ "CWE-20" ]
samba
d77a74237e660dd2ce9f1e14b02635f8a2569653
57,639,952,347,668,090,000,000,000,000,000,000,000
17
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...
static void ini_print_section_header(WriterContext *wctx) { INIContext *ini = wctx->priv; AVBPrint *buf = &wctx->section_pbuf[wctx->level]; const struct section *section = wctx->section[wctx->level]; const struct section *parent_section = wctx->level ? wctx->section[wctx->level-1] : NULL; a...
0
[ "CWE-476" ]
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
42,561,729,185,266,520,000,000,000,000,000,000,000
32
ffprobe: Fix null pointer dereference with color primaries Found-by: AD-lab of venustech Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream) { struct snd_usb_midi *umidi = substream->rmidi->private_data; struct usbmidi_out_port *port = NULL; int i, j; for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) if (umidi->endpoints[i].out) for (j = 0; j < 0x10; ++j) if (umidi->endpoints[i...
0
[ "CWE-703" ]
linux
07d86ca93db7e5cdf4743564d98292042ec21af7
323,653,279,408,523,400,000,000,000,000,000,000,000
22
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...
crypto_set_deferred_id(krb5_context context, pkinit_identity_crypto_context id_cryptoctx, const char *identity, const char *password) { unsigned long ck_flags; ck_flags = pkinit_get_deferred_id_flags(id_cryptoctx->deferred_ids, ...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
314,555,331,948,214,800,000,000,000,000,000,000,000
11
Fix PKINIT cert matching data construction Rewrite X509_NAME_oneline_ex() and its call sites to use dynamic allocation and to perform proper error checking. ticket: 8617 target_version: 1.16 target_version: 1.15-next target_version: 1.14-next tags: pullup
format_METER(const struct ofpact_meter *a, struct ds *s) { ds_put_format(s, "%smeter:%s%"PRIu32, colors.param, colors.end, a->meter_id); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
283,327,906,707,934,000,000,000,000,000,000,000,000
5
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
void sasl_init(void) { signal_add_first("server cap ack sasl", (SIGNAL_FUNC) sasl_start); signal_add_first("event authenticate", (SIGNAL_FUNC) sasl_step); signal_add_first("event 903", (SIGNAL_FUNC) sasl_success); signal_add_first("event 902", (SIGNAL_FUNC) sasl_fail); signal_add_first("event 904", (SIGNAL_FUNC) s...
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
164,653,293,618,009,400,000,000,000,000,000,000,000
12
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl) { return ssl->statem.hand_state; }
0
[ "CWE-400" ]
openssl
4b390b6c3f8df925dc92a3dd6b022baa9a2f4650
24,780,218,083,062,606,000,000,000,000,000,000,000
4
Excessive allocation of memory in tls_get_message_header() A TLS message includes 3 bytes for its length in the header for the message. This would allow for messages up to 16Mb in length. Messages of this length are excessive and OpenSSL includes a check to ensure that a peer is sending reasonably sized messages in or...
static hb_language_t script_to_language(hb_script_t script) { switch (script) { // Unicode 1.1 case HB_SCRIPT_ARABIC: return hb_language_from_string("ar", -1); break; case HB_SCRIPT_ARMENIAN: return hb_language_from_string("hy", -1); break; case HB_SCRIPT_BENGALI: return hb_language_...
0
[ "CWE-399" ]
libass
aa54e0b59200a994d50a346b5d7ac818ebcf2d4b
107,461,438,293,402,870,000,000,000,000,000,000,000
62
shaper: fix reallocation Update the variable that tracks the allocated size. This potentially improves performance and avoid some side effects, which lead to undefined behavior in some cases. Fixes fuzzer test case id:000051,sig:11,sync:fuzzer3,src:004221.
CompositeDeepScanLine::Data::Data() : _zback(false) , _comp(NULL) {}
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
285,974,783,892,957,600,000,000,000,000,000,000,000
1
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static int ctnetlink_done_list(struct netlink_callback *cb) { if (cb->args[1]) nf_ct_put((struct nf_conn *)cb->args[1]); return 0; }
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
215,806,575,427,825,960,000,000,000,000,000,000,000
6
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
int ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, unsigned char *p, int (*put_cb) (const SSL_CIPHER *, unsigned char *)) { int i, j = 0; SSL_CIPHER *c; unsigned char *q; int empty_reneg_inf...
0
[ "CWE-362" ]
openssl
98ece4eebfb6cd45cc8d550c6ac0022965071afc
26,174,862,901,340,884,000,000,000,000,000,000,000
61
Fix race condition in NewSessionTicket If a NewSessionTicket is received by a multi-threaded client when attempting to reuse a previous ticket then a race condition can occur potentially leading to a double free of the ticket data. CVE-2015-1791 This also fixes RT#3808 where a session ID is changed for a session alr...
static void handle_event(struct inotify_watch *watch, u32 wd, u32 mask, u32 cookie, const char *dname, struct inode *inode) { struct audit_chunk *chunk = container_of(watch, struct audit_chunk, watch); if (mask & IN_IGNORED) { evict_chunk(chunk); put_inotify_watch(watch); } }
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
296,448,454,374,635,250,000,000,000,000,000,000,000
10
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
static void handle_nm_fault_irqoff(struct kvm_vcpu *vcpu) { /* * Save xfd_err to guest_fpu before interrupt is enabled, so the * MSR value is not clobbered by the host activity before the guest * has chance to consume it. * * Do not blindly read xfd_err here, since this exception might * be caused by L1 in...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
276,497,716,579,603,200,000,000,000,000,000,000,000
19
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
void gpp_read_style(GF_BitStream *bs, GF_StyleRecord *rec) { rec->startCharOffset = gf_bs_read_u16(bs); rec->endCharOffset = gf_bs_read_u16(bs); rec->fontID = gf_bs_read_u16(bs); rec->style_flags = gf_bs_read_u8(bs); rec->font_size = gf_bs_read_u8(bs); rec->text_color = gpp_read_rgba(bs); }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
159,261,070,574,435,620,000,000,000,000,000,000,000
9
fixed #1768
void ZrtpStateClass::evInitial(void) { DEBUGOUT((cout << "Checking for match in Initial.\n")); if (event->type == ZrtpInitial) { ZrtpPacketHello* hello = parent->prepareHello(); sentVersion = hello->getVersionInt(); // remember packet for easy resend in case timer triggers sent...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
38,831,606,808,135,086,000,000,000,000,000,000,000
21
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
gs_pattern2_set_color(const gs_client_color * pcc, gs_gstate * pgs) { gs_pattern2_instance_t * pinst = (gs_pattern2_instance_t *)pcc->pattern; gs_color_space * pcs = pinst->templat.Shading->params.ColorSpace; int code; uchar k, num_comps; pinst->saved->overprint_mode = pgs->overprint_mode; pins...
0
[ "CWE-704" ]
ghostpdl
693baf02152119af6e6afd30bb8ec76d14f84bbf
180,112,894,640,153,400,000,000,000,000,000,000,000
18
PS interpreter - check the Implementation of a Pattern before use Bug #700141 "Type confusion in setpattern" As the bug thread says, we were not checking that the Implementation of a pattern dictionary was a structure type, leading to a crash when we tried to treat it as one. Here we make the st_pattern1_instance an...
static u64 svm_get_l2_tsc_offset(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); return svm->nested.ctl.tsc_offset; }
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
206,576,274,749,971,880,000,000,000,000,000,000,000
6
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...
mono_loader_lock (void) { mono_locks_acquire (&loader_mutex, LoaderLock); if (G_UNLIKELY (loader_lock_track_ownership)) { TlsSetValue (loader_lock_nest_id, GUINT_TO_POINTER (GPOINTER_TO_UINT (TlsGetValue (loader_lock_nest_id)) + 1)); } }
0
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
149,133,099,918,348,970,000,000,000,000,000,000,000
7
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
dns_zone_clearnotifyacl(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone)); LOCK_ZONE(zone); if (zone->notify_acl != NULL) dns_acl_detach(&zone->notify_acl); UNLOCK_ZONE(zone); }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
184,939,713,291,704,600,000,000,000,000,000,000,000
9
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.
static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char *basename, int request_uri_len) /* {{{ */ { HashTable *_SERVER; zval *stuff; char *path_info; size_t basename_len = strlen(basename); size_t code; zval temp; /* "tweak" $_SERVER variables requested in earlier call to Phar::mungServe...
0
[ "CWE-281" ]
php-src
e5c95234d87fcb8f6b7569a96a89d1e1544749a6
105,431,436,875,784,260,000,000,000,000,000,000,000
84
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
checker_terminate_phase2(void) { struct rusage usage; /* Remove the notify fifo */ notify_fifo_close(&global_data->notify_fifo, &global_data->lvs_notify_fifo); /* Destroy master thread */ checker_dispatcher_release(); thread_destroy_master(master); master = NULL; free_checkers_queue(); free_ssl(); ipvs_sto...
0
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
110,334,305,050,852,680,000,000,000,000,000,000,000
57
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
static void qpdf_get_buffer_internal(qpdf_data qpdf) { if (qpdf->write_memory && (qpdf->output_buffer == 0)) { qpdf->output_buffer = qpdf->qpdf_writer->getBuffer(); } }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
330,456,499,351,625,060,000,000,000,000,000,000,000
7
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 ...
EXPORTED void xml_response(long code, struct transaction_t *txn, xmlDocPtr xml) { xmlChar *buf; int bufsiz; switch (code) { case HTTP_OK: case HTTP_CREATED: case HTTP_NO_CONTENT: case HTTP_MULTI_STATUS: break; default: /* Neither Brief nor Prefer affect error response b...
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
53,131,190,462,984,040,000,000,000,000,000,000,000
48
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
png_error_handler(const char *code, const char *msg) { set_add_response(code, "%s", msg); }
0
[ "CWE-787" ]
kitty
82c137878c2b99100a3cdc1c0f0efea069313901
40,966,513,870,827,154,000,000,000,000,000,000,000
3
Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters Fixes #3128
static void rbd_img_handle_request_work(struct work_struct *work) { struct rbd_img_request *img_req = container_of(work, struct rbd_img_request, work); rbd_img_handle_request(img_req, img_req->work_result); }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
281,664,969,773,034,100,000,000,000,000,000,000,000
7
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static u32 OS_GetSysClockHIGHRES() { LARGE_INTEGER now; QueryPerformanceCounter(&now); now.QuadPart -= init_counter.QuadPart; return (u32) ((now.QuadPart * 1000) / frequency.QuadPart); }
0
[ "CWE-787" ]
gpac
f3698bb1bce62402805c3fda96551a23101a32f9
80,870,699,309,641,050,000,000,000,000,000,000,000
7
fix buffer overrun in gf_bin128_parse closes #1204 closes #1205
virSecuritySELinuxGenNewContext(const char *basecontext, const char *mcs, bool isObjectContext) { context_t context = NULL; char *ret = NULL; char *str; char *ourSecContext = NULL; context_t ourContext = NULL; VIR_DEBUG("basecontex...
0
[ "CWE-732" ]
libvirt
15073504dbb624d3f6c911e85557019d3620fdb2
329,348,336,081,560,000,000,000,000,000,000,000,000
69
security: fix SELinux label generation logic A process can access a file if the set of MCS categories for the file is equal-to *or* a subset-of, the set of MCS categories for the process. If there are two VMs: a) svirt_t:s0:c117 b) svirt_t:s0:c117,c720 Then VM (b) is able to access files labelled for VM (a). I...
display_fill_rectangle_hl_color(gx_device *dev, const gs_fixed_rect *rect, const gs_gstate *pgs, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath) { int x = fixed2int(rect->p.x); int y = fixed2int(rect->p.y); int w = fixed2int(rect->q.x) - x; int h = fixed2int(rect->q.y) - y; gx_c...
0
[]
ghostpdl
1ef5f08f2c2e27efa978f0010669ff22355c385f
337,918,049,021,114,800,000,000,000,000,000,000,000
18
Fix display device DisplayFormat=16#a0800 (Separation mode) broken by f2cf6829 The ICC profile checking needs to be told that the device supports_devn, so add a spec_op proc to return true when in separation mode, and add a proc for fill_rectangle_hl_color so that fillpage will work in Separation mode. This was fixed...
int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, const char *path, struct cifs_sb_info *cifs_sb, struct cached_fid **cfid) { struct cifs_ses *ses = tcon->ses; struct TCP_Server_Info *server = ses->server; struct cifs_open_parms oparms; struct smb2_create_rsp *o_rsp = NULL; struct smb2_query_info...
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
31,489,535,250,283,964,000,000,000,000,000,000,000
195
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
void mobi_buffer_dup32(uint32_t **val, MOBIBuffer *buf) { *val = NULL; if (buf->offset + 4 > buf->maxlen) { return; } *val = malloc(sizeof(uint32_t)); if (*val == NULL) { return; } **val = mobi_buffer_get32(buf); }
0
[ "CWE-787" ]
libmobi
ab5bf0e37e540eac682a14e628853b918626e72b
183,088,525,466,482,260,000,000,000,000,000,000,000
11
fix oob write bug inside libmobi
static struct node *lookup_node(struct fuse *f, fuse_ino_t parent, const char *name) { size_t hash = name_hash(f, parent, name); struct node *node; for (node = f->name_table[hash]; node != NULL; node = node->name_next) if (node->parent->nodeid == parent && strcmp(nod...
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
256,928,553,653,494,250,000,000,000,000,000,000,000
12
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
void Filter::onResponseTimeout() { ENVOY_STREAM_LOG(debug, "upstream timeout", *callbacks_); // Reset any upstream requests that are still in flight. while (!upstream_requests_.empty()) { UpstreamRequestPtr upstream_request = upstream_requests_.back()->removeFromList(upstream_requests_); // Don'...
0
[ "CWE-703" ]
envoy
5bf9b0f1e7f247a4eee7180849cb0823926f7fff
286,168,818,015,515,670,000,000,000,000,000,000,000
40
[1.21] CVE-2022-21655 Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static void gf_m2ts_process_nit(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *nit_es, GF_List *sections, u8 table_id, u16 ex_table_id, u8 version_number, u8 last_section_number, u32 status) { GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[MPEG-2 TS] NIT table processing (not yet implemented)")); }
0
[ "CWE-416", "CWE-125" ]
gpac
1ab4860609f2e7a35634930571e7d0531297e090
227,651,152,709,588,700,000,000,000,000,000,000,000
4
fixed potential crash on PMT IOD parse - cf #1268 #1269
static void f_midi_rmidi_free(struct snd_rawmidi *rmidi) { f_midi_free(rmidi->private_data); }
0
[ "CWE-415" ]
linux
7fafcfdf6377b18b2a726ea554d6e593ba44349f
604,559,647,381,343,100,000,000,000,000,000,000
4
USB: gadget: f_midi: fixing a possible double-free in f_midi It looks like there is a possibility of a double-free vulnerability on an error path of the f_midi_set_alt function in the f_midi driver. If the path is feasible then free_ep_req gets called twice: req->complete = f_midi_complete; err = us...
void sqlite3VdbeChangeOpcode(Vdbe *p, int addr, u8 iNewOpcode){ sqlite3VdbeGetOp(p,addr)->opcode = iNewOpcode; }
0
[ "CWE-755" ]
sqlite
8654186b0236d556aa85528c2573ee0b6ab71be3
267,071,599,860,387,500,000,000,000,000,000,000,000
3
When an error occurs while rewriting the parser tree for window functions in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set, and make sure that this shuts down any subsequent code generation that might depend on the transformations that were implemented. This fixes a problem discovered by the Y...
xmlAutomataNewCountTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, const xmlChar *token2, int min, int max, void *data) { xmlRegAtomPtr atom; int counter; if ((am == NULL) || (from == NULL) || (token == NULL)) return(NULL); if (min < 0) re...
0
[ "CWE-119" ]
libxml2
cbb271655cadeb8dbb258a64701d9a3a0c4835b4
218,929,779,809,356,340,000,000,000,000,000,000,000
68
Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711> * xmlregexp.c: (xmlFAParseCharRange): Only advance to the next character if there is no error. Advancing to the next character in case of an error while parsing regexp leads to an out of bounds access.
static int pcan_usb_pro_set_led(struct peak_usb_device *dev, u8 mode, u32 timeout) { struct pcan_usb_pro_msg um; pcan_msg_init_empty(&um, dev->cmd_buf, PCAN_USB_MAX_CMD_LEN); pcan_msg_add_rec(&um, PCAN_USBPRO_SETLED, dev->ctrl_idx, mode, timeout); return pcan_usb_pro_send_cmd(dev, &um); }
0
[ "CWE-909" ]
linux
ead16e53c2f0ed946d82d4037c630e2f60f4ab69
211,543,819,372,415,870,000,000,000,000,000,000,000
10
can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com> Reported-by: syzbot+d6a5a1a3657b596ef132@syzkaller.appspotmail.com Fixes: f14e2243...
nfp_flower_reprs_reify(struct nfp_app *app, enum nfp_repr_type type, bool exists) { struct nfp_reprs *reprs; int i, err, count = 0; reprs = rcu_dereference_protected(app->reprs[type], lockdep_is_held(&app->pf->lock)); if (!reprs) return 0; for (i = 0; i < reprs->num_reprs; i++) { struct net_d...
0
[ "CWE-400", "CWE-401" ]
linux
8572cea1461a006bce1d06c0c4b0575869125fa4
197,607,090,597,923,050,000,000,000,000,000,000,000
27
nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs In nfp_flower_spawn_phy_reprs, in the for loop over eth_tbl if any of intermediate allocations or initializations fail memory is leaked. requiered releases are added. Fixes: b94524529741 ("nfp: flower: add per repr private data for LAG offload") Signed-of...
static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x) { X509_REVOKED *rev; /* * The rules changed for this... previously if a CRL contained unhandled * critical extensions it could still be used to indicate a certificate * was revoked. This has since been changed since critical extens...
0
[ "CWE-295" ]
openssl
2a40b7bc7b94dd7de897a74571e7024f0cf0d63b
71,852,611,798,083,930,000,000,000,000,000,000,000
27
check_chain_extensions: Do not override error return value by check_curve The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates present in a certificate chain. It is not set by default. Starting from OpenSSL version 1.1.1h a check to disallow certificates with explicitly encoded elli...
static int mszip_read_input(struct mszip_stream *zip) { int nread = zip->read_cb ? zip->read_cb(zip->file, zip->inbuf, (int)zip->inbuf_size) : cli_readn(zip->fd, zip->inbuf, (int)zip->inbuf_size); if (nread < 0) { if (zip->file->error == CL_BREAK) return zip->error = CL_BREAK; else return zip->e...
0
[]
clamav-devel
158c35e81a25ea5fda55a2a7f62ea9fec2e883d9
231,115,509,786,644,140,000,000,000,000,000,000,000
14
libclamav/mspack.c: improve unpacking of malformed cabinets (bb#1826)
const_iterator begin() const { if (isASCII()) { return const_iterator(castToCharPtr()); } return const_iterator(castToChar16Ptr()); }
0
[ "CWE-416", "CWE-703" ]
hermes
d86e185e485b6330216dee8e854455c694e3a36e
171,650,916,726,946,870,000,000,000,000,000,000,000
6
Fix a bug in transient object property assignment and getUTF16Ref Summary: The returned `UTF16Ref` from `StringView::getUTF16Ref` can be invalidated by appending more contents to the same allocator. This case was encountered in `transientObjectPutErrorMessage`, resulting in using free'd memory. Reviewed By: tmikov D...
void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping) { if (mapping) kref_put(&mapping->kref, release_iommu_mapping); }
0
[ "CWE-284", "CWE-264" ]
linux
0ea1ec713f04bdfac343c9702b21cd3a7c711826
203,852,188,927,054,800,000,000,000,000,000,000,000
5
ARM: dma-mapping: don't allow DMA mappings to be marked executable DMA mapping permissions were being derived from pgprot_kernel directly without using PAGE_KERNEL. This causes them to be marked with executable permission, which is not what we want. Fix this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk...
ssize_t __weak cpu_show_meltdown(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "Not affected\n"); }
1
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
19,402,052,827,455,579,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...