func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
g_get_proc_address(long lib, const char* name) { if (lib == 0) { return 0; } #if defined(_WIN32) return GetProcAddress((HMODULE)lib, name); #else return dlsym((void*)lib, name); #endif }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
86,535,879,375,012,500,000,000,000,000,000,000,000
12
move temp files from /tmp to /tmp/.xrdp
ptp_free_DI (PTPDeviceInfo *di) { free (di->SerialNumber); free (di->DeviceVersion); free (di->Model); free (di->Manufacturer); free (di->ImageFormats); free (di->CaptureFormats); free (di->VendorExtensionDesc); free (di->OperationsSupported); free (di->EventsSupported); free (di->DevicePropertiesSupported); ...
0
[ "CWE-190" ]
libgphoto2
203df81b9d97e820411e1eb94ae08139af73bbd0
51,740,465,828,002,180,000,000,000,000,000,000,000
13
check for an integer overflow in ptp_unpack_OPL
**/ CImg<T>& draw_plasma(const float alpha=1, const float beta=0, const unsigned int scale=8) { if (is_empty()) return *this; const int w = width(), h = height(); const Tfloat m = (Tfloat)cimg::type<T>::min(), M = (Tfloat)cimg::type<T>::max(); ulongT rng = (cimg::_rand(),cimg::rng()); ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
271,219,770,411,364,250,000,000,000,000,000,000,000
50
.
struct wireless_dev *brcmf_ap_add_vif(struct wiphy *wiphy, const char *name, struct vif_params *params) { struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg)); struct brcmf_cfg80211_vif *vif; int err; if (brcmf_cfg80211_vif_event_armed(cfg)) retur...
0
[ "CWE-787" ]
linux
1b5e2423164b3670e8bc9174e4762d297990deff
64,364,819,145,735,010,000,000,000,000,000,000,000
57
brcmfmac: assure SSID length from firmware is limited The SSID length as received from firmware should not exceed IEEE80211_MAX_SSID_LEN as that would result in heap overflow. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by:...
ip_printts(netdissect_options *ndo, register const u_char *cp, u_int length) { register u_int ptr; register u_int len; int hoplen; const char *type; if (length < 4) { ND_PRINT((ndo, "[bad length %u]", length)); return; } ND_PRINT((ndo, " TS{")); hoplen = ((cp[3]&0xF) != IPOPT_TS_TSONLY) ? 8 : 4;...
1
[ "CWE-125", "CWE-787" ]
tcpdump
2c2cfbd2b771ac888bc5c4a6d922f749d3822538
116,051,068,143,359,880,000,000,000,000,000,000,000
61
CVE-2017-13037/IP: Add bounds checks when printing time stamp options. This fixes a buffer over-read discovered by Bhargava Shastry, SecT/TU Berlin. Add a test using the capture file supplied by the reporter(s), modified so the capture file won't be rejected as an invalid capture.
void addReplyNullArray(client *c) { if (c->resp == 2) { addReplyProto(c,"*-1\r\n",5); } else { addReplyProto(c,"_\r\n",3); } }
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
318,288,837,272,751,270,000,000,000,000,000,000,000
7
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[]) { NCURSES_CONST char *name; char *s; int status; #if !PURE_TERMINFO bool termcap = FALSE; #endif name = check_aliases(argv[0], FALSE); if (is_reset || is_init) { TTY oldmode; int terasechar = -1; /* new erase characte...
1
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
141,225,999,047,631,950,000,000,000,000,000,000,000
134
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...
bool usb_device_is_owned(struct usb_device *udev) { struct usb_hub *hub; if (udev->state == USB_STATE_NOTATTACHED || !udev->parent) return false; hub = usb_hub_to_struct_hub(udev->parent); return !!hub->ports[udev->portnum - 1]->port_owner; }
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
160,254,262,228,838,500,000,000,000,000,000,000,000
9
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); const Tensor& filter_sizes = context->input(1); const Tensor& out_backprop = context->input(2); OP_REQUIRES( context, TensorShapeUtils::IsVector(filter_sizes.shape()), errors::InvalidArgument( ...
0
[ "CWE-369", "CWE-787" ]
tensorflow
c570e2ecfc822941335ad48f6e10df4e21f11c96
185,614,158,715,186,700,000,000,000,000,000,000,000
46
Fix issues in Conv2DBackpropFilter. PiperOrigin-RevId: 369772454 Change-Id: I49b465f2ae2ce91def61b56cea8000197d5177d8
static int replmd_rename(struct ldb_module *module, struct ldb_request *req) { struct ldb_context *ldb; struct ldb_control *fix_dn_name_control = NULL; struct replmd_replicated_request *ac; int ret; struct ldb_request *down_req; /* do not manipulate our control entries */ if (ldb_dn_is_special(req->op.rename.ol...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
213,958,208,701,395,800,000,000,000,000,000,000,000
43
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
void RtmpProtocol::sendAcknowledgementSize(uint32_t size) { size = htonl(size); std::string set_windowSize((char *) &size, 4); sendRequest(MSG_WIN_SIZE, set_windowSize); }
0
[ "CWE-703" ]
ZLMediaKit
7d8b212a3c3368bc2f6507cb74664fc419eb9327
225,607,696,440,899,140,000,000,000,000,000,000,000
5
修复rtmp汇报窗口太小导致循环递归的bug:#1839
void zend_shared_alloc_create_lock(void) { int val; #ifdef ZTS zts_lock = tsrm_mutex_alloc(); #endif sprintf(lockfile_name, "%s/%sXXXXXX", TMP_DIR, SEM_FILENAME_PREFIX); lock_file = mkstemp(lockfile_name); fchmod(lock_file, 0666); if (lock_file == -1) { zend_accel_error(ACCEL_LOG_FATAL, "Unable to create ...
0
[ "CWE-416" ]
php-src
777c39f4042327eac4b63c7ee87dc1c7a09a3115
37,315,271,396,221,790,000,000,000,000,000,000,000
21
Fixed #68677
static int ext4_da_reserve_space(struct inode *inode, sector_t lblock) { int retries = 0; struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); struct ext4_inode_info *ei = EXT4_I(inode); unsigned long md_needed, md_reserved; /* * recalculate the amount of metadata blocks to reserve * in order to allocate nrblocks...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
91,316,666,897,228,360,000,000,000,000,000,000,000
42
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
ebb_ews_contact_to_info (EContact *contact, gboolean is_gal) { EBookMetaBackendInfo *nfo; if (!E_IS_CONTACT (contact)) return NULL; if (!is_gal) ebb_ews_store_original_vcard (contact); nfo = e_book_meta_backend_info_new ( e_contact_get_const (contact, E_CONTACT_UID), e_contact_get_const (contact, E_C...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
79,591,652,726,760,860,000,000,000,000,000,000,000
19
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
void blk_mq_release(struct request_queue *q) { struct blk_mq_hw_ctx *hctx; unsigned int i; /* hctx kobj stays in hctx */ queue_for_each_hw_ctx(q, hctx, i) { if (!hctx) continue; kfree(hctx->ctxs); kfree(hctx); } kfree(q->queue_hw_ctx); /* ctx kobj stays in queue_ctx */ free_percpu(q->queue_ctx); }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
225,201,016,316,785,560,000,000,000,000,000,000,000
18
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
cmd_number_inf (const char *com, const char *val, void *place) { if (!strcasecmp (val, "inf")) { *(int *) place = 0; return true; } return cmd_number (com, val, place); }
0
[ "CWE-22" ]
wget
18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7
224,070,034,550,765,840,000,000,000,000,000,000,000
9
CVE-2014-4877: Arbitrary Symlink Access Wget was susceptible to a symlink attack which could create arbitrary files, directories or symbolic links and set their permissions when retrieving a directory recursively through FTP. This commit changes the default settings in Wget such that Wget no longer creates local symbo...
CtPtr ProtocolV1::send_connect_message_reply(char tag, ceph_msg_connect_reply &reply, bufferlist &authorizer_reply) { ldout(cct, 20) << __func__ << dendl; bufferlist reply_bl; reply.tag = tag; reply.features = ((uint...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
76,351,891,243,706,230,000,000,000,000,000,000,000
27
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path, u64 devid) { struct btrfs_device *device; struct btrfs_fs_devices *cur_devices; struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; u64 num_devices; int ret = 0; mutex_lock(&uuid_mutex); num_devices = btrfs_num_devices(fs_...
1
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
319,350,513,243,799,650,000,000,000,000,000,000,000
148
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
Field *get_tmp_table_field() { return result_field; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
304,926,207,844,161,800,000,000,000,000,000,000,000
1
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
bool HTTPSession::shouldShutdown() const { return draining_ && allTransactionsStarted() && (!codec_->supportsParallelRequests() || isUpstream() || !codec_->isReusable()); }
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
228,578,503,403,592,920,000,000,000,000,000,000,000
7
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
authority_cert_dl_failed(const char *id_digest, int status) { cert_list_t *cl; if (!trusted_dir_certs || !(cl = digestmap_get(trusted_dir_certs, id_digest))) return; download_status_failed(&cl->dl_status, status); }
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
238,586,492,745,085,200,000,000,000,000,000,000,000
9
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
static void _6502_anal_esil_push(RAnalOp *op, ut8 data0) { // case 0x08: // php // case 0x48: // pha char *reg = (data0==0x08) ? "flags" : "a"; // stack is on page one: sp + 0x100 r_strbuf_setf (&op->esil, "%s,sp,0x100,+,=[1],sp,--=", reg); }
0
[ "CWE-190", "CWE-125" ]
radare2
bbb4af56003c1afdad67af0c4339267ca38b1017
260,265,958,767,793,600,000,000,000,000,000,000,000
7
Fix #10294 - crash in r2_hoobr__6502_op
UTI_ZeroTimespec(struct timespec *ts) { ts->tv_sec = 0; ts->tv_nsec = 0; }
0
[ "CWE-59" ]
chrony
7a4c396bba8f92a3ee8018620983529152050c74
91,867,656,719,289,140,000,000,000,000,000,000,000
5
util: add functions for common file operations Add a function to open a file for reading, writing, or appending. In uppercase modes errors are handled as fatal, i.e. the caller doesn't need to check for NULL. To avoid string manipulations in the callers, the function accepts an optional directory and suffix. New files...
static int nfs_do_access(struct inode *inode, struct rpc_cred *cred, int mask) { struct nfs_access_entry cache; int status; status = nfs_access_get_cached(inode, cred, &cache); if (status == 0) goto out; /* Be clever: ask server to check for all possible rights */ cache.mask = MAY_EXEC | MAY_WRITE | MAY_READ;...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
195,596,598,932,901,600,000,000,000,000,000,000,000
22
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...
static int tw5864_frameinterval_get(struct tw5864_input *input, struct v4l2_fract *frameinterval) { struct tw5864_dev *dev = input->root; switch (input->std) { case STD_NTSC: frameinterval->numerator = 1001; frameinterval->denominator = 30000; break; case STD_PAL: case STD_SECAM: frameinterval->nu...
0
[ "CWE-476" ]
linux
2e7682ebfc750177a4944eeb56e97a3f05734528
73,032,195,036,244,260,000,000,000,000,000,000,000
23
media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame 'vb' null check should be done before dereferencing it in tw5864_handle_frame, otherwise a NULL pointer dereference may occur. Fixes: 34d1324edd31 ("[media] pci: Add tw5864 driver") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-of...
JwtParamLocation(const std::string& token, const absl::node_hash_set<std::string>& issuers, const std::string&) : JwtLocationBase(token, issuers) {}
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
22,700,515,592,051,835,000,000,000,000,000,000,000
3
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
static int stale_bundle(struct dst_entry *dst) { return !xfrm_bundle_ok((struct xfrm_dst *)dst); }
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
239,448,596,350,034,670,000,000,000,000,000,000,000
4
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx) { return ctx->tree; }
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
231,045,077,337,270,650,000,000,000,000,000,000,000
4
Backport OCSP fixes.
static int am_send_login_authn_request(request_rec *r, const char *idp, const char *return_to_url, int is_passive) { int ret; LassoServer *server; LassoProvider *provider; LassoHttpMethod http_method; char *destination_url; char *...
0
[]
mod_auth_mellon
6bdda9170a8f1757dabc5b109958657417728018
50,251,647,890,930,010,000,000,000,000,000,000,000
76
Fix segmentation fault when receiving badly formed logout message. If the logout message is badly formed, we won't get the entityID in `logout->parent.remote_providerID`. If we call `apr_hash_get()` with a null pointer, it will cause a segmentation fault. Add a check to validate that the entityID is correctly set.
static inline void debug_hrtimer_init(struct hrtimer *timer) { debug_object_init(timer, &hrtimer_debug_descr); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
141,670,144,919,254,860,000,000,000,000,000,000,000
4
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
size_t iov_iter_zero(size_t bytes, struct iov_iter *i) { if (unlikely(iov_iter_is_pipe(i))) return pipe_zero(bytes, i); iterate_and_advance(i, bytes, base, len, count, clear_user(base, len), memset(base, 0, len) ) return bytes; }
0
[ "CWE-665", "CWE-284" ]
linux
9d2231c5d74e13b2a0546fee6737ee4446017903
281,152,385,762,853,800,000,000,000,000,000,000,000
11
lib/iov_iter: initialize "flags" in new pipe_buffer The functions copy_page_to_iter_pipe() and push_pipe() can both allocate a new pipe_buffer, but the "flags" member initializer is missing. Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed") To: Alexander Viro <viro@zeniv.linux.org.uk> To: linux-fsdevel@vger.k...
bool WriteImageData(const std::string *basepath, const std::string *filename, Image *image, bool embedImages, void *fsPtr) { const std::string ext = GetFilePathExtension(*filename); // Write image to temporary buffer std::string header; std::vector<unsigned char> data; if (ext == "png") ...
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
96,325,617,009,526,080,000,000,000,000,000,000,000
68
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
static int v9fs_vfs_setattr(struct dentry *dentry, struct iattr *iattr) { int retval; struct v9fs_session_info *v9ses; struct p9_fid *fid; struct p9_wstat wstat; p9_debug(P9_DEBUG_VFS, "\n"); retval = setattr_prepare(dentry, iattr); if (retval) return retval; retval = -EPERM; v9ses = v9fs_dentry2v9ses(dent...
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
45,409,520,372,197,230,000,000,000,000,000,000,000
57
9p: use inode->i_lock to protect i_size_write() under 32-bit Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely in read_seqcount_begin() when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a...
mbfl_buffer_converter_feed_result(mbfl_buffer_converter *convd, mbfl_string *string, mbfl_string *result) { if (convd == NULL || string == NULL || result == NULL) { return NULL; } mbfl_buffer_converter_feed(convd, string); if (convd->filter1 != NULL) { mbfl_convert_filter_flush(convd->filter1); } if (co...
0
[ "CWE-119" ]
php-src
64f42c73efc58e88671ad76b6b6bc8e2b62713e1
175,980,696,591,980,100,000,000,000,000,000,000,000
16
Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
int sas_notify_lldd_dev_found(struct domain_device *dev) { int res = 0; struct sas_ha_struct *sas_ha = dev->port->ha; struct Scsi_Host *shost = sas_ha->core.shost; struct sas_internal *i = to_sas_internal(shost->transportt); if (!i->dft->lldd_dev_found) return 0; res = i->dft->lldd_dev_found(dev); if (res) {...
0
[ "CWE-476" ]
linux
f70267f379b5e5e11bdc5d72a56bf17e5feed01f
35,683,150,222,578,250,000,000,000,000,000,000,000
20
scsi: libsas: stop discovering if oob mode is disconnected The discovering of sas port is driven by workqueue in libsas. When libsas is processing port events or phy events in workqueue, new events may rise up and change the state of some structures such as asd_sas_phy. This may cause some problems such as follows: ...
GC_API void GC_CALL GC_debug_change_stubborn(const void *p) { const void * q = GC_base_C(p); hdr * hhdr; if (q == 0) { ABORT_ARG1("GC_debug_change_stubborn: bad arg", ": %p", p); } hhdr = HDR(q); if (hhdr -> hb_obj_kind != STUBBORN) { ABORT_ARG1("GC_debug_change_stubborn: ar...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
70,831,849,478,829,080,000,000,000,000,000,000,000
14
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
void x509_proxy_free( globus_gsi_cred_handle_t handle ) { if ( activate_globus_gsi() != 0 ) { return; } if (handle) { (*globus_gsi_cred_handle_destroy_ptr)(handle); } }
0
[ "CWE-20" ]
htcondor
2f3c393feb819cf6c6d06fb0a2e9c4e171f3c26d
55,938,155,917,081,830,000,000,000,000,000,000,000
9
(#6455) Fix issue validating VOMS proxies
png_write_tEXt(png_structrp png_ptr, png_const_charp key, png_const_charp text, png_size_t text_len) { png_uint_32 key_len; png_byte new_key[80]; png_debug(1, "in png_write_tEXt"); key_len = png_check_keyword(png_ptr, key, new_key); if (key_len == 0) png_error(png_ptr, "tEXt: invalid keyword...
0
[ "CWE-120" ]
libpng
81f44665cce4cb1373f049a76f3904e981b7a766
67,916,237,106,425,900,000,000,000,000,000,000,000
38
[libpng16] Reject attempt to write over-length PLTE chunk
int sha1sum_file(char *fnam, unsigned char *digest) { char *buf; int ret; FILE *f; long flen; if (!fnam) return -1; f = fopen_cloexec(fnam, "r"); if (!f) { SYSERROR("Error opening template"); return -1; } if (fseek(f, 0, SEEK_END) < 0) { SYSERROR("Error seeking to end of template"); fclose(f); ret...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
1,625,059,458,663,287,500,000,000,000,000,000,000
50
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static ssize_t usbip_status_show(struct device *dev, struct device_attribute *attr, char *buf) { struct stub_device *sdev = dev_get_drvdata(dev); int status; if (!sdev) { dev_err(dev, "sdev is null\n"); return -ENODEV; } spin_lock_irq(&sdev->ud.lock); status = sdev->ud.status; spin_unlock_irq(&sdev->u...
0
[ "CWE-362" ]
linux
22076557b07c12086eeb16b8ce2b0b735f7a27e7
221,206,337,063,205,550,000,000,000,000,000,000,000
17
usbip: usbip_host: fix NULL-ptr deref and use-after-free errors usbip_host updates device status without holding lock from stub probe, disconnect and rebind code paths. When multiple requests to import a device are received, these unprotected code paths step all over each other and drive fails with NULL-ptr deref and ...
void __init early_platform_driver_register_all(char *class_str) { /* The "class_str" parameter may or may not be present on the kernel * command line. If it is present then there may be more than one * matching parameter. * * Since we register our early platform drivers using early_param() * we need to make ...
0
[ "CWE-362", "CWE-284" ]
linux
6265539776a0810b7ce6398c27866ddb9c6bd154
325,064,070,242,648,170,000,000,000,000,000,000,000
18
driver core: platform: fix race condition with driver_override The driver_override implementation is susceptible to race condition when different threads are reading vs storing a different driver override. Add locking to avoid race condition. Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive...
GF_Node *gf_sm_load_svg_from_string(GF_SceneGraph *in_scene, char *node_str) { GF_Err e; GF_SVG_Parser *parser; GF_Node *node; GF_SceneLoader ctx; memset(&ctx, 0, sizeof(GF_SceneLoader)); ctx.scene_graph = in_scene; ctx.type = GF_SM_LOAD_SVG; e = gf_sm_load_initialize_svg(&ctx, node_str, GF_TRUE); parser = (...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
295,275,687,137,381,040,000,000,000,000,000,000,000
29
fixed #2138
handle_event_moddone(struct module_qstate* qstate, int id) { struct dns64_qstate* iq = (struct dns64_qstate*)qstate->minfo[id]; /* * In many cases we have nothing special to do. From most to least common: * * - An internal query. * - A query for a record type other than AAAA. * - CD ...
1
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
128,394,781,786,791,010,000,000,000,000,000,000,000
45
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
void ida_init(struct ida *ida) { memset(ida, 0, sizeof(struct ida)); idr_init(&ida->idr); }
0
[]
linux
2dcb22b346be7b7b7e630a8970d69cf3f1111ec1
208,205,199,201,238,370,000,000,000,000,000,000,000
6
idr: fix backtrack logic in idr_remove_all Currently idr_remove_all will fail with a use after free error if idr::layers is bigger than 2, which on 32 bit systems corresponds to items more than 1024. This is due to stepping back too many levels during backtracking. For simplicity let's assume that IDR_BITS=1 -> we h...
smtp_proceed_rset(struct smtp_session *s, const char *args) { smtp_reply(s, "250 %s Reset state", esc_code(ESC_STATUS_OK, ESC_OTHER_STATUS)); if (s->tx) { if (s->tx->msgid) smtp_tx_rollback(s->tx); smtp_tx_free(s->tx); } }
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
282,333,266,365,258,200,000,000,000,000,000,000,000
11
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
static void sysbus_esp_gpio_demux(void *opaque, int irq, int level) { SysBusESPState *sysbus = SYSBUS_ESP(opaque); ESPState *s = ESP(&sysbus->esp); switch (irq) { case 0: parent_esp_reset(s, irq, level); break; case 1: esp_dma_enable(opaque, irq, level); break; }...
0
[ "CWE-476" ]
qemu
0db895361b8a82e1114372ff9f4857abea605701
15,345,464,755,328,198,000,000,000,000,000,000,000
14
esp: always check current_req is not NULL before use in DMA callbacks After issuing a SCSI command the SCSI layer can call the SCSIBusInfo .cancel callback which resets both current_req and current_dev to NULL. If any data is left in the transfer buffer (async_len != 0) then the next TI (Transfer Information) command ...
static bool valid_pat_type(unsigned t) { return t < 8 && (1 << t) & 0xf3; /* 0, 1, 4, 5, 6, 7 */ }
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
283,534,330,147,728,200,000,000,000,000,000,000,000
4
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
explicit BasicWriter(Buffer<Char> &b) : buffer_(b) {}
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
88,304,557,741,806,350,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
static void av1_read_global_param(AV1State *state, GF_BitStream *bs, u8 type, u8 ref, u8 idx) { u8 absBits = GM_ABS_ALPHA_BITS; u8 precBits = GM_ALPHA_PREC_BITS; if (idx < 2) { if (type == AV1_GMC_TRANSLATION) { absBits = GM_ABS_TRANS_ONLY_BITS - (!state->frame_state.allow_high_precision_mv ? 1 : 0); precBit...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
100,298,087,292,702,890,000,000,000,000,000,000,000
29
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
static ssize_t add_slot_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t nbytes) { char drc_name[MAX_DRC_NAME_LEN]; char *end; int rc; if (nbytes >= MAX_DRC_NAME_LEN) return 0; strscpy(drc_name, buf, nbytes + 1); end = strchr(drc_name, '\n'); if (end) *end = '\0'; ...
0
[ "CWE-120" ]
linux
cc7a0bb058b85ea03db87169c60c7cfdd5d34678
77,605,556,412,884,070,000,000,000,000,000,000,000
22
PCI: rpadlpar: Fix potential drc_name corruption in store functions Both add_slot_store() and remove_slot_store() try to fix up the drc_name copied from the store buffer by placing a NUL terminator at nbyte + 1 or in place of a '\n' if present. However, the static buffer that we copy the drc_name data into is not zero...
void l2cap_unregister_user(struct l2cap_conn *conn, struct l2cap_user *user) { struct hci_dev *hdev = conn->hcon->hdev; hci_dev_lock(hdev); if (list_empty(&user->list)) goto out_unlock; list_del_init(&user->list); user->remove(conn, user); out_unlock: hci_dev_unlock(hdev); }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
340,049,755,264,683,400,000,000,000,000,000,000,000
15
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
window_activity_cb (GSWindow *window, GSManager *manager) { gboolean handled; handled = gs_manager_request_unlock (manager); return handled; }
0
[]
gnome-screensaver
2f597ea9f1f363277fd4dfc109fa41bbc6225aca
50,181,546,057,495,020,000,000,000,000,000,000,000
9
Fix adding monitors Make sure to show windows that are added. And fix an off by one bug.
static int snd_usb_playback_close(struct snd_pcm_substream *substream) { return snd_usb_pcm_close(substream, SNDRV_PCM_STREAM_PLAYBACK); }
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
89,117,552,897,926,820,000,000,000,000,000,000,000
4
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...
static void hidinput_update_battery(struct hid_device *dev, int value) { }
0
[ "CWE-787" ]
linux
35556bed836f8dc07ac55f69c8d17dce3e7f0e25
238,455,999,563,060,200,000,000,000,000,000,000,000
3
HID: core: Sanitize event code and type when mapping input When calling into hid_map_usage(), the passed event code is blindly stored as is, even if it doesn't fit in the associated bitmap. This event code can come from a variety of sources, including devices masquerading as input devices, only a bit more "programmab...
**/ const CImg<T>& save(const char *const filename, const int number=-1, const unsigned int digits=6) const { if (!filename) throw CImgArgumentException(_cimg_instance "save(): Specified filename is (null).", cimg_instance); ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
321,180,824,159,192,960,000,000,000,000,000,000,000
114
.
static uint32_t displayable_pack_version(uint32_t version) { if (version < LDB_PACKING_FORMAT_NODN) { return version; /* unknown - can't convert */ } return (version - LDB_PACKING_FORMAT_NODN); }
0
[ "CWE-703" ]
samba
08c9016cb9f25105c39488770113a1b00f8a4223
4,472,385,603,817,147,000,000,000,000,000,000,000
7
CVE-2021-3670 ldb: Confirm the request has not yet timed out in ldb filter processing The LDB filter processing is where the time is spent in the LDB stack but the timeout event will not get run while this is ongoing, so we must confirm we have not yet timed out manually. RN: Ensure that the LDB request has not timed...
bool SQClass::NewSlot(SQSharedState *ss,const SQObjectPtr &key,const SQObjectPtr &val,bool bstatic) { SQObjectPtr temp; bool belongs_to_static_table = sq_type(val) == OT_CLOSURE || sq_type(val) == OT_NATIVECLOSURE || bstatic; if(_locked && !belongs_to_static_table) return false; //the class already ...
1
[ "CWE-125" ]
squirrel
23a0620658714b996d20da3d4dd1a0dcf9b0bd98
199,509,684,587,999,850,000,000,000,000,000,000,000
47
check max member count in class
void sctp_put_port(struct sock *sk) { sctp_local_bh_disable(); __sctp_put_port(sk); sctp_local_bh_enable(); }
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
308,001,724,456,453,320,000,000,000,000,000,000,000
6
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
hexdump (const char *prefix, const char *str) { uint8_t *u8; uint32_t *u32 = NULL; size_t u32len; size_t i; const char *encoding = locale_charset (); u8 = u8_strconv_from_encoding (str, encoding, iconveh_error); if (u8) u32 = u8_to_u32 (u8, strlen ((char *) u8), NULL, &u32len); for (i = 0; i < str...
0
[ "CWE-20" ]
libidn2
241e8f486134793cb0f4a5b0e5817a97883401f5
214,540,505,062,861,800,000,000,000,000,000,000,000
26
Perform A-Label roundtrip for lookup functions by default This adds another check to avoid unexpected results. It was a longstanding FIXME. Thanks to Jonathan Birch of Microsoft Corporation, Florian Weimer (GNU glibc) and Nikos Mavrogiannopoulos (GnuTLS) for investigation, discussion and testing.
static __cold int io_uring_alloc_task_context(struct task_struct *task, struct io_ring_ctx *ctx) { struct io_uring_task *tctx; int ret; tctx = kzalloc(sizeof(*tctx), GFP_KERNEL); if (unlikely(!tctx)) return -ENOMEM; tctx->registered_rings = kcalloc(IO_RINGFD_REG_MAX, sizeof(struct file *), GF...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
210,215,493,648,016,000,000,000,000,000,000,000,000
44
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
int bnxt_re_modify_ah(struct ib_ah *ib_ah, struct rdma_ah_attr *ah_attr) { return 0; }
0
[ "CWE-400", "CWE-401" ]
linux
4a9d46a9fe14401f21df69cea97c62396d5fb053
90,156,765,418,417,020,000,000,000,000,000,000,000
4
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 mp_forcezero (mp_int * a) { fp_forcezero(a); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
20,131,455,424,391,724,000,000,000,000,000,000,000
4
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
static int mov_write_trak_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, AVStream *st) { int64_t pos = avio_tell(pb); int entry_backup = track->entry; int chunk_backup = track->chunkCount; int ret; /* If we want to have an empty moov, but...
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
131,336,423,428,486,650,000,000,000,000,000,000,000
52
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
DECODE_JSON(ByteString) { ALLOW_NULL; CHECK_STRING; CHECK_TOKEN_BOUNDS; size_t tokenSize; char* tokenData; GET_TOKEN(tokenData, tokenSize); /* Empty bytestring? */ if(tokenSize == 0) { dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL; dst->length = 0; return UA_STAT...
0
[ "CWE-703", "CWE-787" ]
open62541
c800e2987b10bb3af6ef644b515b5d6392f8861d
238,326,388,894,335,760,000,000,000,000,000,000,000
27
fix(json): Check max recursion depth in more places
static void hugetlbfs_destroy_inode(struct inode *inode) { hugetlbfs_inc_free_inodes(HUGETLBFS_SB(inode->i_sb)); mpol_free_shared_policy(&HUGETLBFS_I(inode)->policy); call_rcu(&inode->i_rcu, hugetlbfs_i_callback); }
0
[]
linux
1bfad99ab42569807d0ca1698449cae5e8c0334a
35,876,812,555,857,167,000,000,000,000,000,000,000
6
hugetlbfs: hugetlb_vmtruncate_list() needs to take a range to delete fallocate hole punch will want to unmap a specific range of pages. Modify the existing hugetlb_vmtruncate_list() routine to take a start/end range. If end is 0, this indicates all pages after start should be unmapped. This is the same as the existi...
static int mov_read_meta(MOVContext *c, AVIOContext *pb, MOVAtom atom) { while (atom.size > 8) { uint32_t tag; if (avio_feof(pb)) return AVERROR_EOF; tag = avio_rl32(pb); atom.size -= 4; if (tag == MKTAG('h','d','l','r')) { int ret; avio_se...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
109,899,452,889,302,780,000,000,000,000,000,000,000
30
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>
static int sctp_getsockopt_peeloff_common(struct sock *sk, sctp_peeloff_arg_t *peeloff, struct file **newfile, unsigned flags) { struct socket *newsock; int retval; retval = sctp_do_peeloff(sk, peeloff->associd, &newsock); if (retval < 0) goto out; /* Map the socket to an unused fd that can be returned ...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
149,972,596,017,011,800,000,000,000,000,000,000,000
35
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
const char* CMSEXPORT cmsIT8GetData(cmsHANDLE hIT8, const char* cPatch, const char* cSample) { cmsIT8* it8 = (cmsIT8*) hIT8; int iField, iSet; _cmsAssert(hIT8 != NULL); iField = LocateSample(it8, cSample); if (iField < 0) { return NULL; } iSet = LocatePatch(it8, cPatch); if (i...
0
[]
Little-CMS
65e2f1df3495edc984f7e0d7b7b24e29d851e240
98,865,515,934,848,420,000,000,000,000,000,000,000
19
Fix some warnings from static analysis
static int pdo_sqlite_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC) /* {{{ */ { pdo_sqlite_db_handle *H; int i, ret = 0; long timeout = 60; char *filename; H = pecalloc(1, sizeof(pdo_sqlite_db_handle), dbh->is_persistent); H->einfo.errcode = 0; H->einfo.errmsg = NULL; dbh->driver_data = H; ...
0
[ "CWE-264" ]
php-src
055ecbc62878e86287d742c7246c21606cee8183
184,844,079,778,353,800,000,000,000,000,000,000,000
49
Improve check for :memory: pseudo-filename in SQlite
void inotify_dentry_parent_queue_event(struct dentry *dentry, u32 mask, u32 cookie, const char *name) { struct dentry *parent; struct inode *inode; if (!(dentry->d_flags & DCACHE_INOTIFY_PARENT_WATCHED)) return; spin_lock(&dentry->d_lock); parent = dentry->d_parent; inode = parent->d_inode; if (i...
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
121,782,974,819,823,630,000,000,000,000,000,000,000
22
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 av_always_inline int dnxhd_decode_dct_block(const DNXHDContext *ctx, RowContext *row, int n, int index_bits, ...
0
[ "CWE-125" ]
FFmpeg
f31fc4755f69ab26bf6e8be47875b7dcede8e29e
265,627,120,479,820,470,000,000,000,000,000,000,000
100
avcodec/dnxhddec: Move mb height check out of non hr branch Fixes: out of array access Fixes: poc.dnxhd Found-by: Bingchang, Liu@VARAS of IIE Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 296debd213bd6dce7647cedd34eb64e5b94cdc92) Signed-off-by: Michael Niedermayer <michael@nie...
sf_writef_short (SNDFILE *sndfile, const short *ptr, sf_count_t frames) { SF_PRIVATE *psf ; sf_count_t count ; VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ; if (psf->file.mode == SFM_READ) { psf->error = SFE_NOT_WRITEMODE ; return 0 ; } ; if (psf->write_short == NULL || psf->seek == NULL) { psf->err...
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
220,828,420,099,484,200,000,000,000,000,000,000,000
40
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
static int __init tun_init(void) { int ret = 0; pr_info("%s, %s\n", DRV_DESCRIPTION, DRV_VERSION); pr_info("%s\n", DRV_COPYRIGHT); ret = rtnl_link_register(&tun_link_ops); if (ret) { pr_err("Can't register link_ops\n"); goto err_linkops; } ret = misc_register(&tun_miscdev); if (ret) { pr_err("Can't reg...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
137,412,056,051,731,140,000,000,000,000,000,000,000
24
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
ENCODE_JSON(Int64) { char buf[23]; buf[0] = '\"'; UA_UInt16 digits = itoaSigned(*src, buf + 1); buf[digits + 1] = '\"'; UA_UInt16 length = (UA_UInt16)(digits + 2); if(ctx->pos + length > ctx->end) return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED; if(!ctx->calcOnly) memcpy(ctx...
0
[ "CWE-703", "CWE-787" ]
open62541
c800e2987b10bb3af6ef644b515b5d6392f8861d
96,914,918,372,379,400,000,000,000,000,000,000,000
15
fix(json): Check max recursion depth in more places
static void v9fs_stat_init(V9fsStat *stat) { v9fs_string_init(&stat->name); v9fs_string_init(&stat->uid); v9fs_string_init(&stat->gid); v9fs_string_init(&stat->muid); v9fs_string_init(&stat->extension); }
0
[ "CWE-362" ]
qemu
89fbea8737e8f7b954745a1ffc4238d377055305
178,223,895,818,824,700,000,000,000,000,000,000,000
8
9pfs: Fully restart unreclaim loop (CVE-2021-20181) Depending on the client activity, the server can be asked to open a huge number of file descriptors and eventually hit RLIMIT_NOFILE. This is currently mitigated using a reclaim logic : the server closes the file descriptors of idle fids, based on the assumption that...
GF_Box *stri_box_new() { ISOM_DECL_BOX_ALLOC(GF_SubTrackInformationBox, GF_ISOM_BOX_TYPE_STRI); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
197,473,069,584,290,370,000,000,000,000,000,000,000
5
fixed #2255
static int current_has_perm(const struct task_struct *tsk, u32 perms) { u32 sid, tsid; sid = current_sid(); tsid = task_sid(tsk); return avc_has_perm(sid, tsid, SECCLASS_PROCESS, perms, NULL); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
146,170,394,794,093,340,000,000,000,000,000,000,000
9
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
Item_sum::Item_sum(THD *thd, Item_sum *item): Item_func_or_sum(thd, item), aggr_sel(item->aggr_sel), nest_level(item->nest_level), aggr_level(item->aggr_level), quick_group(item->quick_group), orig_args(NULL) { if (arg_count <= 2) { orig_args=tmp_orig_args; } else { if (!(orig_args= (Item**)...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
2,187,475,508,066,376,000,000,000,000,000,000,000
23
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
dp_packet_ip_checksum_valid(struct dp_packet *p OVS_UNUSED) { return false; }
0
[ "CWE-400" ]
ovs
abd7a457652e6734902720fe6a5dddb3fc0d1e3b
86,140,302,354,709,200,000,000,000,000,000,000,000
4
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static int bond_open(struct net_device *bond_dev) { struct bonding *bond = netdev_priv(bond_dev); struct list_head *iter; struct slave *slave; /* reset slave->backup and slave->inactive */ if (bond_has_slaves(bond)) { bond_for_each_slave(bond, slave, iter) { if (bond_uses_primary(bond) && slave != rcu...
0
[ "CWE-476", "CWE-703" ]
linux
105cd17a866017b45f3c45901b394c711c97bf40
176,968,264,114,188,740,000,000,000,000,000,000,000
50
bonding: fix null dereference in bond_ipsec_add_sa() If bond doesn't have real device, bond->curr_active_slave is null. But bond_ipsec_add_sa() dereferences bond->curr_active_slave without null checking. So, null-ptr-deref would occur. Test commands: ip link add bond0 type bond ip link set bond0 up ip x s...
__must_hold(&ctx->completion_lock) { u32 seq = ctx->cached_cq_tail - atomic_read(&ctx->cq_timeouts); spin_lock_irq(&ctx->timeout_lock); while (!list_empty(&ctx->timeout_list)) { u32 events_needed, events_got; struct io_kiocb *req = list_first_entry(&ctx->timeout_list, struct io_kiocb, timeout.list); i...
1
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
187,873,782,806,306,170,000,000,000,000,000,000,000
31
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
sec_establish_key(void) { uint32 length = g_server_public_key_len + SEC_PADDING_SIZE; uint32 flags = SEC_CLIENT_RANDOM; STREAM s; s = sec_init(flags, length + 4); out_uint32_le(s, length); out_uint8p(s, g_sec_crypted_random, g_server_public_key_len); out_uint8s(s, SEC_PADDING_SIZE); s_mark_end(s); sec_send(...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
268,602,145,258,301,770,000,000,000,000,000,000,000
15
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx, bool send_if_empty) { int i, not_empty = 0; u8 buff[sizeof(struct iwl_wep_cmd) + sizeof(struct iwl_wep_key) * WEP_KEYS_MAX]; struct iwl_wep_cmd *wep_cmd = (struct iwl_wep_cmd *)buff; size_t cmd_size = s...
0
[ "CWE-119", "CWE-787" ]
linux
2da424b0773cea3db47e1e81db71eeebde8269d4
108,930,795,006,275,950,000,000,000,000,000,000,000
46
iwlwifi: Sanity check for sta_id On my testing, I saw some strange behavior [ 421.739708] iwlwifi 0000:01:00.0: ACTIVATE a non DRIVER active station id 148 addr 00:00:00:00:00:00 [ 421.739719] iwlwifi 0000:01:00.0: iwl_sta_ucode_activate Added STA id 148 addr 00:00:00:00:00:00 to uCode not sure how it happen, but ...
Mode mode(JSObject *self) { MOZ_ASSERT(is_instance(self)); return static_cast<Mode>(JS::GetReservedSlot(self, Slots::Mode).toInt32()); }
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
187,390,263,214,659,220,000,000,000,000,000,000,000
4
use rangom_get instead of arc4random as arc4random does not work correctly with wizer wizer causes the seed in arc4random to be the same between executions which is not random
static inline bool ipv6_addr_is_multicast(const struct in6_addr *addr) { return (addr->s6_addr32[0] & htonl(0xFF000000)) == htonl(0xFF000000); }
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
191,885,497,225,577,060,000,000,000,000,000,000,000
4
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
s32 gf_hevc_read_sps(u8 *data, u32 size, HEVCState *hevc) { return gf_hevc_read_sps_ex(data, size, hevc, NULL); }
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
301,519,982,238,120,100,000,000,000,000,000,000,000
4
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
GF_Err mfra_box_size(GF_Box *s) { u32 pos=0; GF_MovieFragmentRandomAccessBox *ptr = (GF_MovieFragmentRandomAccessBox *)s; gf_isom_check_position_list(s, ptr->tfra_list, &pos); gf_isom_check_position(s, (GF_Box *)ptr->mfro, &pos); return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
249,897,265,478,901,340,000,000,000,000,000,000,000
8
fixed #1587
int nla_authenticate(rdpNla* nla) { WINPR_ASSERT(nla); if (nla->server) return nla_server_authenticate(nla); else return nla_client_authenticate(nla); }
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
7,710,470,346,373,628,000,000,000,000,000,000,000
9
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
static void reverse(unsigned char *buf, size_t len) { unsigned char tmp; size_t i; assert(buf || len == 0); for (i = 0; i < len / 2; ++i) { tmp = buf[i]; buf[i] = buf[len - 1 - i]; buf[len - 1 - i] = tmp; } }
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
230,626,335,678,292,600,000,000,000,000,000,000,000
13
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static int fts3CloseMethod(sqlite3_vtab_cursor *pCursor){ Fts3Cursor *pCsr = (Fts3Cursor *)pCursor; assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 ); fts3ClearCursor(pCsr); assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 ); sqlite3_free(pCsr); return SQLITE_OK; }
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
91,859,612,250,685,560,000,000,000,000,000,000,000
8
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
static void decode_data(struct sixpack *sp, unsigned char inbyte) { unsigned char *buf; if (sp->rx_count != 3) { sp->raw_buf[sp->rx_count++] = inbyte; return; } if (sp->rx_count_cooked + 2 >= sizeof(sp->cooked_buf)) { pr_err("6pack: cooked buffer overrun, data loss\n"); sp->rx_count = 0; return; } b...
0
[ "CWE-787" ]
linux
19d1532a187669ce86d5a2696eb7275310070793
309,991,919,821,601,280,000,000,000,000,000,000,000
25
net: 6pack: fix slab-out-of-bounds in decode_data Syzbot reported slab-out-of bounds write in decode_data(). The problem was in missing validation checks. Syzbot's reproducer generated malicious input, which caused decode_data() to be called a lot in sixpack_decode(). Since rx_count_cooked is only 400 bytes and noone...
static inline int _get_extstore(conn *c, item *it, mc_resp *resp) { #ifdef NEED_ALIGN item_hdr hdr; memcpy(&hdr, ITEM_data(it), sizeof(hdr)); #else item_hdr *hdr = (item_hdr *)ITEM_data(it); #endif size_t ntotal = ITEM_ntotal(it); unsigned int clsid = slabs_clsid(ntotal); item *new_it; bool ...
0
[]
memcached
f249724cedcab6605ca8a0769ac4b356a8124f63
263,095,999,796,651,800,000,000,000,000,000,000,000
130
crash fix: errstr wasn't initialized in metaget if meta_flag_preparse bailed out early it would try to read uninitialized memory.
static int udf_fill_super(struct super_block *sb, void *options, int silent) { int ret; struct inode *inode = NULL; struct udf_options uopt; struct kernel_lb_addr rootdir, fileset; struct udf_sb_info *sbi; uopt.flags = (1 << UDF_FLAG_USE_AD_IN_ICB) | (1 << UDF_FLAG_STRICT); uopt.uid = -1; uopt.gid = -1; uopt....
0
[]
linux-2.6
57b9655d01ef057a523e810d29c37ac09b80eead
60,699,975,955,093,860,000,000,000,000,000,000,000
176
udf: Improve table length check to avoid possible overflow When a partition table length is corrupted to be close to 1 << 32, the check for its length may overflow on 32-bit systems and we will think the length is valid. Later on the kernel can crash trying to read beyond end of buffer. Fix the check to avoid possible...
email_handler(vector_t *strvec) { vector_t *email_vec = read_value_block(strvec); unsigned int i; char *str; if (!email_vec) { report_config_error(CONFIG_GENERAL_ERROR, "Warning - empty notification_email block"); return; } for (i = 0; i < vector_size(email_vec); i++) { str = vector_slot(email_vec, i); ...
0
[ "CWE-200" ]
keepalived
c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067
320,407,004,989,149,300,000,000,000,000,000,000,000
18
Add command line and configuration option to set umask Issue #1048 identified that files created by keepalived are created with mode 0666. This commit changes the default to 0644, and also allows the umask to be specified in the configuration or as a command line option. Signed-off-by: Quentin Armitage <quentin@armit...
dnp3_al_process_iin(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *al_tree) { guint16 al_iin; proto_item *tiin; static int* const indications[] = { &hf_dnp3_al_iin_rst, &hf_dnp3_al_iin_dt, &hf_dnp3_al_iin_dol, &hf_dnp3_al_iin_tsr, &hf_dnp3_al_iin_cls3d, &hf_dnp3...
0
[ "CWE-835" ]
wireshark
618661b22e34a59b21117db723d8ff91e064d4ba
171,123,453,282,055,020,000,000,000,000,000,000,000
31
dnp: plug a memory leak. If we're throwing away the data, *throw away the data* - free it, as we're not using it as the backing data for a tvbuff.
void pda_init(int cpu) { struct x8664_pda *pda = cpu_pda(cpu); /* Setup up data that may be needed in __get_free_pages early */ asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); /* Memory clobbers used to order PDA accessed */ mb(); wrmsrl(MSR_GS_BASE, pda); mb(); pda->cpunumber = cpu; pda->irqcount...
0
[]
linux-2.6
658fdbef66e5e9be79b457edc2cbbb3add840aa9
271,521,094,747,459,600,000,000,000,000,000,000,000
32
[PATCH] Don't leak NT bit into next task SYSENTER can cause a NT to be set which might cause crashes on the IRET in the next task. Following similar i386 patch from Linus. Signed-off-by: Andi Kleen <ak@suse.de>
pk_transaction_get_distro_upgrades (PkTransaction *transaction, GVariant *params, GDBusMethodInvocation *context) { g_autoptr(GError) error = NULL; g_return_if_fail (PK_IS_TRANSACTION (transaction)); g_return_if_fail (transaction->priv->tid != NULL); g_debug ("GetDistroUpgrades method called"); ...
0
[ "CWE-287" ]
PackageKit
7e8a7905ea9abbd1f384f05f36a4458682cd4697
236,957,997,258,975,300,000,000,000,000,000,000,000
28
Do not set JUST_REINSTALL on any kind of auth failure If we try to continue the auth queue when it has been cancelled (or failed) then we fall upon the obscure JUST_REINSTALL transaction flag which only the DNF backend actually verifies. Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem.
BigInt inverse_mod(const BigInt& n, const BigInt& mod) { if(mod.is_zero()) throw BigInt::DivideByZero(); if(mod.is_negative() || n.is_negative()) throw Invalid_Argument("inverse_mod: arguments must be non-negative"); if(n.is_zero() || (n.is_even() && mod.is_even())) return 0; BigInt x...
1
[ "CWE-200" ]
botan
bcf13fa153a11b3e0ad54e2af6962441cea3adf1
74,300,015,016,923,800,000,000,000,000,000,000,000
45
Fixes for CVE-2015-7827 and CVE-2016-2849
//! Resize image to new dimensions \newinstance. CImg<T> get_resize(const int size_x, const int size_y = -100, const int size_z = -100, const int size_c = -100, const int interpolation_type=1, const unsigned int boundary_conditions=0, const fl...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
111,378,758,598,699,000,000,000,000,000,000,000,000
885
Fix other issues in 'CImg<T>::load_bmp()'.
int CIFSSMBRenameOpenFile(const int xid, struct cifs_tcon *pTcon, int netfid, const char *target_name, const struct nls_table *nls_codepage, int remap) { struct smb_com_transaction2_sfi_req *pSMB = NULL; struct smb_com_transaction2_sfi_rsp *pSMBr = NULL; struct set_file_rename *rename_info; char *data_offset; ...
0
[ "CWE-362", "CWE-119", "CWE-189" ]
linux
9438fabb73eb48055b58b89fc51e0bc4db22fabd
97,556,062,140,088,710,000,000,000,000,000,000,000
78
cifs: fix possible memory corruption in CIFSFindNext The name_len variable in CIFSFindNext is a signed int that gets set to the resume_name_len in the cifs_search_info. The resume_name_len however is unsigned and for some infolevels is populated directly from a 32 bit value sent by the server. If the server sends a v...