func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int ql_wait_for_drvr_lock(struct ql3_adapter *qdev) { int i = 0; do { if (ql_sem_lock(qdev, QL_DRVR_SEM_MASK, (QL_RESOURCE_BITS_BASE_CODE | (qdev->mac_index) * 2) << 1)) { netdev_printk(KERN_DEBUG, qdev->ndev, "driver lock acquired\n"); return 1; } ssleep(1); } while (++i <...
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
277,952,444,826,424,200,000,000,000,000,000,000,000
19
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
static int usb_set_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) { return usb_control_msg(interface_to_usbdev(intf), usb_sndctrlpipe(interface_to_usbdev(intf), 0), USB_REQ_SET_REPORT, USB_TYPE_CLASS | USB_RECIP_INTERFACE, (typ...
0
[ "CWE-703" ]
linux
4ec0ef3a82125efc36173062a50624550a900ae0
192,191,785,366,069,450,000,000,000,000,000,000,000
11
USB: iowarrior: fix oops with malicious USB descriptors The iowarrior driver expects at least one valid endpoint. If given malicious descriptors that specify 0 for the number of endpoints, it will crash in the probe function. Ensure there is at least one endpoint on the interface before using it. The full report of...
term_change_in_curbuf(void) { term_T *term = curbuf->b_term; if (term_is_finished(curbuf) && term->tl_scrollback.ga_len > 0) { free_scrollback(term); redraw_buf_later(term->tl_buffer, NOT_VALID); /* The buffer is now like a normal buffer, it cannot be easily * abandoned when changed. */ set_string_o...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
32,075,584,480,156,326,000,000,000,000,000,000,000
15
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static double mp_isdir(_cimg_math_parser& mp) { const double *ptrs = &_mp_arg(2) + 1; const ulongT siz = (ulongT)mp.opcode[3]; CImg<charT> ss(siz + 1); cimg_forX(ss,i) ss[i] = (char)ptrs[i]; ss.back() = 0; return (double)cimg::is_directory(ss);
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
173,198,617,270,444,900,000,000,000,000,000,000,000
8
.
static void flush_queued_data(VirtIOSerialPort *port) { assert(port); if (!virtio_queue_ready(port->ovq)) { return; } do_flush_queued_data(port, port->ovq, VIRTIO_DEVICE(port->vser)); }
0
[ "CWE-120", "CWE-787" ]
qemu
7882080388be5088e72c425b02223c02e6cb4295
259,996,635,480,954,150,000,000,000,000,000,000,000
9
virtio-serial: fix ANY_LAYOUT Don't assume a specific layout for control messages. Required by virtio 1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com>
static int __init powercap_init(void) { int result; result = seed_constraint_attributes(); if (result) return result; return class_register(&powercap_class); }
0
[]
linux
949dd0104c496fa7c14991a23c03c62e44637e71
38,690,907,768,415,583,000,000,000,000,000,000,000
10
powercap: restrict energy meter to root access Remove non-privileged user access to power data contained in /sys/class/powercap/intel-rapl*/*/energy_uj Non-privileged users currently have read access to power data and can use this data to form a security attack. Some privileged drivers/applications need read access t...
static double mp_list_width(_cimg_math_parser& mp) { const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listin.width()); return (double)mp.listin[ind]._width;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
177,607,918,055,481,000,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
static bool subpage_accepts(void *opaque, hwaddr addr, unsigned len, bool is_write) { subpage_t *subpage = opaque; #if defined(DEBUG_SUBPAGE) printf("%s: subpage %p %c len %u addr " TARGET_FMT_plx "\n", __func__, subpage, is_write ? 'w' : 'r', len, addr); #endif retur...
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
263,748,835,161,780,700,000,000,000,000,000,000,000
12
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
void __kfree_skb_flush(void) { struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache); /* flush skb_cache if containing objects */ if (nc->skb_count) { kmem_cache_free_bulk(skbuff_head_cache, nc->skb_count, nc->skb_cache); nc->skb_count = 0; } }
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
110,566,993,750,369,600,000,000,000,000,000,000,000
11
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
static int rev_compare_tree(struct rev_info *revs, struct commit *parent, struct commit *commit) { struct tree *t1 = parent->tree; struct tree *t2 = commit->tree; if (!t1) return REV_TREE_NEW; if (!t2) return REV_TREE_OLD; if (revs->simplify_by_decoration) { /* * If we are simplifying by decorati...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
5,427,133,572,744,687,000,000,000,000,000,000,000
36
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
calculateBytesPerLine (const Header &header, char* sampleCountBase, int sampleCountXStride, int sampleCountYStride, int minX, int maxX, int minY, int maxY, std::vector<int>& xOffsets...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
69,147,795,423,827,810,000,000,000,000,000,000,000
31
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
instanceOop InstanceKlass::allocate_instance(TRAPS) { bool has_finalizer_flag = has_finalizer(); // Query before possible GC int size = size_helper(); // Query before forming handle. instanceOop i; i = (instanceOop)Universe::heap()->obj_allocate(this, size, CHECK_NULL); if (has_finalizer_flag && !RegisterF...
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
23,399,422,322,563,614,000,000,000,000,000,000,000
12
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
GF_Err meta_dump(GF_Box *a, FILE * trace) { GF_MetaBox *p; p = (GF_MetaBox *)a; gf_isom_box_dump_start(a, "MetaBox", trace); fprintf(trace, ">\n"); if (p->handler) gf_isom_box_dump(p->handler, trace); if (p->primary_resource) gf_isom_box_dump(p->primary_resource, trace); if (p->file_locations) gf_isom_box_dump(...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
212,008,095,011,686,900,000,000,000,000,000,000,000
19
fixed 2 possible heap overflows (inc. #1088)
static GF_Err txtin_process_webvtt(GF_Filter *filter, GF_TXTIn *ctx) { GF_Err e; if (!ctx->is_setup) { ctx->is_setup = GF_TRUE; return txtin_webvtt_setup(filter, ctx); } if (!ctx->vttparser) return GF_NOT_SUPPORTED; if (ctx->seek_state==1) { ctx->seek_state = 2; gf_webvtt_parser_restart(ctx->vttparser); ...
0
[ "CWE-276" ]
gpac
96699aabae042f8f55cf8a85fa5758e3db752bae
189,407,142,933,066,350,000,000,000,000,000,000,000
20
fixed #2061
static long __video_do_ioctl(struct file *file, unsigned int cmd, void *arg) { struct video_device *vfd = video_devdata(file); const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; void *fh = file->private_data; struct v4l2_format f_copy; long ret = -EINVAL; if (ops == NULL) { printk(KERN_WARNING "videodev: \"%...
0
[ "CWE-399" ]
linux
fc0a80798576f80ca10b3f6c9c7097f12fd1d64e
135,640,603,215,576,580,000,000,000,000,000,000,000
1,622
[media] v4l: Share code between video_usercopy and video_ioctl2 The two functions are mostly identical. They handle the copy_from_user and copy_to_user operations related with V4L2 ioctls and call the real ioctl handler. Create a __video_usercopy function that implements the core of video_usercopy and video_ioctl2, a...
int memfd_create(const char *name, unsigned int flags) { return syscall(SYS_memfd_create, name, flags); }
0
[ "CWE-78", "CWE-216" ]
runc
0a8e4117e7f715d5fbeef398405813ce8e88558b
165,143,681,100,748,930,000,000,000,000,000,000,000
4
nsenter: clone /proc/self/exe to avoid exposing host binary to container There are quite a few circumstances where /proc/self/exe pointing to a pretty important container binary is a _bad_ thing, so to avoid this we have to make a copy (preferably doing self-clean-up and not being writeable). We require memfd_create(...
int gnutls_pcert_import_x509 (gnutls_pcert_st* pcert, gnutls_x509_crt_t crt, unsigned int flags) { int ret; size_t sz; memset(pcert, 0, sizeof(*pcert)); pcert->type = GNUTLS_CRT_X509; pcert->cert.data = NULL; sz = 0; ret = gnutls_x509_crt_export(crt, GNUTLS_X509_FMT_DER, NULL, &sz); if (ret < 0 && ret !...
0
[ "CWE-399" ]
gnutls
9c62f4feb2bdd6fbbb06eb0c60bfdea80d21bbb8
53,058,287,152,626,420,000,000,000,000,000,000,000
57
Deinitialize the correct number of certificates. Reported by Remi Gacogne.
xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint, int neg, int start, int end, const xmlChar *blockName) { int ret = 0; switch (type) { case XML_REGEXP_STRING: case XML_REGEXP_SUBREG: case XML_REGEXP_RANGES: case XML_REGEXP_EPSILON: return(-1)...
0
[ "CWE-119" ]
libxml2
cbb271655cadeb8dbb258a64701d9a3a0c4835b4
41,202,141,730,844,353,000,000,000,000,000,000,000
168
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 void gitmodules_read_check(struct repository *repo) { submodule_cache_check_init(repo); /* read the repo's .gitmodules file if it hasn't been already */ if (!repo->submodule_cache->gitmodules_read) repo_read_gitmodules(repo); }
0
[ "CWE-78" ]
git
e904deb89d9a9669a76a426182506a084d3f6308
7,021,901,640,504,454,000,000,000,000,000,000,000
8
submodule: reject submodule.update = !command in .gitmodules Since ac1fbbda2013 (submodule: do not copy unknown update mode from .gitmodules, 2013-12-02), Git has been careful to avoid copying [submodule "foo"] update = !run an arbitrary scary command from .gitmodules to a repository's local config, copying in th...
QString loadErrorHandlingToStr(LoadPage::LoadErrorHandling leh) { switch (leh) { case LoadPage::abort: return "abort"; case LoadPage::skip: return "skip"; case LoadPage::ignore: return "ignore"; } throw std::logic_error("Internal error in loadErrorHandlingToStr"); }
0
[ "CWE-22" ]
wkhtmltopdf
2a5f25077895fb075812c0f599326f079a59d6cf
327,241,900,788,699,800,000,000,000,000,000,000,000
8
BREAKING CHANGE: block local filesystem access by default fixes #4536
static void ffs_closed(struct ffs_data *ffs) { struct ffs_dev *ffs_obj; struct f_fs_opts *opts; ENTER(); ffs_dev_lock(); ffs_obj = ffs->private_data; if (!ffs_obj) goto done; ffs_obj->desc_ready = false; if (test_and_clear_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags) && ffs_obj->ffs_closed_callback)...
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
183,117,312,773,597,550,000,000,000,000,000,000,000
32
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
errno_t sssctl_client_data_restore(struct sss_cmdline *cmdline, struct sss_tool_ctx *tool_ctx, void *pvt) { struct sssctl_data_opts opts = {0}; errno_t ret; /* Parse command line. */ struct poptOption options[] = { {"start", ...
0
[ "CWE-78" ]
sssd
7ab83f97e1cbefb78ece17232185bdd2985f0bbe
244,307,340,454,690,280,000,000,000,000,000,000,000
22
TOOLS: replace system() with execvp() to avoid execution of user supplied command :relnote: A flaw was found in SSSD, where the sssctl command was vulnerable to shell command injection via the logs-fetch and cache-expire subcommands. This flaw allows an attacker to trick the root user into running a specially crafted ...
static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol, u8 address, u8 command, u8 *data, u8 length) { int ret = -EFAULT, i; u8 temp, sz = 0; if (!hc) { printk(KERN_ERR PREFIX "host controller is not configured\n"); return ret; } mutex_lock(&hc->lock); hc->done = false; if (smb_hc_read...
0
[ "CWE-200" ]
linux
43cdd1b716b26f6af16da4e145b6578f98798bf6
209,630,443,005,987,560,000,000,000,000,000,000,000
56
ACPI: sbshc: remove raw pointer from printk() message There's no need to be printing a raw kernel pointer to the kernel log at every boot. So just remove it, and change the whole message to use the correct dev_info() call at the same time. Reported-by: Wang Qize <wang_qize@venustech.com.cn> Cc: All applicable <stabl...
MonoReflectionMarshal* mono_reflection_marshal_from_marshal_spec (MonoDomain *domain, MonoClass *klass, MonoMarshalSpec *spec) { static MonoClass *System_Reflection_Emit_UnmanagedMarshalClass; MonoReflectionMarshal *minfo; MonoType *mtype; if (!System_Reflection_Emit_UnmanagedMarshalClass) { System_...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
139,105,036,594,940,680,000,000,000,000,000,000,000
46
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
get_vrrp_instance(const char *ifname, int vrid, int family) { element e; vrrp_t *vrrp; if (LIST_ISEMPTY(vrrp_data->vrrp)) return NULL; for (e = LIST_HEAD(vrrp_data->vrrp); e; ELEMENT_NEXT(e)) { vrrp = ELEMENT_DATA(e); if (vrrp->vrid == vrid && vrrp->family == family && !valid_path_cmp(IF_BASE_I...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
302,135,346,994,499,150,000,000,000,000,000,000,000
19
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
int ctrl_x_mode_files(void) { return ctrl_x_mode == CTRL_X_FILES; }
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
125,476,914,967,051,120,000,000,000,000,000,000,000
1
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
parse_int(char *line, int *result) { check_number_of_args(line, 1); if (sscanf(line, "%d", result) != 1) { command_parse_error(); return 0; } return 1; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
145,877,436,943,842,320,000,000,000,000,000,000,000
9
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
deep_count_stop (NautilusDirectory *directory) { NautilusFile *file; if (directory->details->deep_count_in_progress != NULL) { file = directory->details->deep_count_file; if (file != NULL) { g_assert (NAUTILUS_IS_FILE (file)); g_assert (file->details->directo...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
213,909,611,363,445,840,000,000,000,000,000,000,000
23
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
int mutt_ssl_starttls (CONNECTION* conn) { sslsockdata* ssldata; int maxbits; long ssl_options = 0; if (mutt_socket_has_buffered_input (conn)) { /* L10N: The server is not supposed to send data immediately after confirming STARTTLS. This warns the user that something weird is going ...
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
211,651,863,360,246,100,000,000,000,000,000,000,000
132
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
void CoreNetwork::restoreUserModes() { IrcUser *me_ = me(); Q_ASSERT(me_); disconnect(me_, SIGNAL(userModesSet(QString)), this, SLOT(restoreUserModes())); disconnect(me_, SIGNAL(userModesAdded(QString)), this, SLOT(restoreUserModes())); QString modesDelta = Core::userModes(userId(), networkId()); ...
0
[ "CWE-399" ]
quassel
b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8
290,937,469,621,600,900,000,000,000,000,000,000,000
37
Improve the message-splitting algorithm for PRIVMSG and CTCP This introduces a new message splitting algorithm based on QTextBoundaryFinder. It works by first starting with the entire message to be sent, encoding it, and checking to see if it is over the maximum message length. If it is, it uses QTBF to find the wor...
static void rds_start_mprds(struct rds_connection *conn) { int i; struct rds_conn_path *cp; if (conn->c_npaths > 1 && rds_addr_cmp(&conn->c_laddr, &conn->c_faddr) < 0) { for (i = 0; i < conn->c_npaths; i++) { cp = &conn->c_path[i]; rds_conn_path_connect_if_down(cp); } } }
0
[ "CWE-200", "CWE-909" ]
linux
7d0a06586b2686ba80c4a2da5f91cb10ffbea736
86,690,879,594,461,900,000,000,000,000,000,000,000
13
net/rds: Fix info leak in rds6_inc_info_copy() The rds6_inc_info_copy() function has a couple struct members which are leaking stack information. The ->tos field should hold actual information and the ->flags field needs to be zeroed out. Fixes: 3eb450367d08 ("rds: add type of service(tos) infrastructure") Fixes: b7...
XkbSendIndicatorMap(ClientPtr client, XkbIndicatorPtr indicators, xkbGetIndicatorMapReply * rep) { int length; CARD8 *map; register int i; register unsigned bit; if (rep->length > 0) { CARD8 *to; to = map = xallocarray(rep->length, 4); if (map) { ...
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
225,294,663,001,441,570,000,000,000,000,000,000,000
59
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
CC_ESC_WARN(ScanEnv* env, UChar *c) { if (onig_warn == onig_null_warn) return ; if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED) && IS_SYNTAX_BV(env->syntax, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC)) { UChar buf[WARN_BUFSIZE]; onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc, ...
0
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
185,128,773,113,825,230,000,000,000,000,000,000,000
14
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
static void tcp_store_ts_recent(struct tcp_sock *tp) { tp->rx_opt.ts_recent = tp->rx_opt.rcv_tsval; tp->rx_opt.ts_recent_stamp = get_seconds(); }
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
303,842,819,408,678,300,000,000,000,000,000,000,000
5
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, unsigned long address) { __bad_area_nosemaphore(regs, error_code, address, SEGV_MAPERR); }
0
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
301,676,879,942,181,500,000,000,000,000,000,000,000
5
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
bool ByteVector::operator>(const ByteVector &v) const { return v < *this; }
0
[ "CWE-189" ]
taglib
dcdf4fd954e3213c355746fa15b7480461972308
176,675,002,195,196,240,000,000,000,000,000,000,000
4
Avoid uint overflow in case the length + index is over UINT_MAX
PHP_METHOD(Phar, isBuffering) { PHAR_ARCHIVE_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_BOOL(phar_obj->arc.archive->donotflush); }
0
[ "CWE-416" ]
php-src
b2cf3f064b8f5efef89bb084521b61318c71781b
209,126,063,905,070,370,000,000,000,000,000,000,000
10
Fixed bug #68901 (use after free)
void ImmutableExecutorState::InitializePending(const Graph* graph, const ControlFlowInfo& cf_info) { for (auto& it : cf_info.unique_frame_names) { FrameInfo* finfo = EnsureFrameInfo(it); DCHECK_EQ(finfo->pending_counts.get(), nullptr); finfo->pending_counts =...
0
[ "CWE-476" ]
tensorflow
05cbebd3c6bb8f517a158b0155debb8df79017ff
33,510,825,612,976,174,000,000,000,000,000,000,000
28
Fix a NPE issue in invalid Exit op. Now it will report an error instead of crash. PiperOrigin-RevId: 404089902 Change-Id: Ia6ec55445ea70ad045a4d339d354959ad0618f2a
static void FVMenuContextualHelp(GWindow UNUSED(base), struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { help("fontview.html"); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
220,122,610,129,415,170,000,000,000,000,000,000,000
3
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
hermesBuiltinCopyRestArgs(void *, Runtime *runtime, NativeArgs args) { GCScopeMarkerRAII marker{runtime}; // Obtain the caller's stack frame. auto frames = runtime->getStackFrames(); auto it = frames.begin(); ++it; // Check for the extremely unlikely case where there is no caller frame. if (LLVM_UNLIKELY...
0
[ "CWE-787" ]
hermes
86543ac47e59c522976b5632b8bf9a2a4583c7d2
245,477,106,332,542,130,000,000,000,000,000,000,000
33
Added stack overflow check for hermes::vm:: hermesBuiltinApply Summary: This adds a missing check for stack overflow. Reviewed By: tmikov Differential Revision: D20104955 fbshipit-source-id: 1f37e23d2e28ebcd3aa4176d134b8418e7059ebd
Node *TY_(FindBody)( TidyDocImpl* doc ) { Node *node = ( doc ? doc->root.content : NULL ); while ( node && !nodeIsHTML(node) ) node = node->next; if (node == NULL) return NULL; node = node->content; while ( node && !nodeIsBODY(node) && !nodeIsFRAMESET(node) ) node = node->...
0
[ "CWE-119" ]
tidy-html5
c18f27a58792f7fbd0b30a0ff50d6b40a82f940d
166,446,529,331,180,700,000,000,000,000,000,000,000
30
Issue #217 - avoid len going negative, ever...
static void __attribute__((constructor)) init(void) { g_test_add_func("/utils/parse_bool", test_parse_bool); g_test_add_func("/utils/sc_is_expected_path", test_sc_is_expected_path); g_test_add_func("/utils/die", test_die); g_test_add_func("/utils/die_with_errno", test_die_with_errno); g_test_add_func("/utils/sc_no...
0
[ "CWE-94" ]
snapd
54e71e7750f73a28f5a47fe04dd058360e24c0e9
245,520,338,306,507,800,000,000,000,000,000,000,000
11
cmd/libsnap-confine-private: Defend against hardlink attacks When snap-confine goes to execute other helper binaries (snap-update-ns etc) via sc_open_snapd_tool(), these other binaries are located relative to the currently executing snap-confine process via /proc/self/exe. Since it is possible for regular users to har...
pdf_filter_DP(fz_context *ctx, pdf_processor *proc, const char *tag, pdf_obj *raw, pdf_obj *cooked) { pdf_filter_processor *p = (pdf_filter_processor*)proc; filter_flush(ctx, p, 0); if (p->chain->op_DP) p->chain->op_DP(ctx, p->chain, tag, raw, cooked); }
0
[ "CWE-125" ]
mupdf
97096297d409ec6f206298444ba00719607e8ba8
14,285,514,761,982,673,000,000,000,000,000,000,000
7
Bug 701292: Fix test for missing/empty string.
void release_fd(FileEntry *target) { --target->usecount; if (target->usecount == 0 && target->stale) { fd_cache_lru_.remove(target); close(target->fd); fd_cache_.erase(target->it); return; } // We use timer to close file descriptor and delete the entry from // cache. The...
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
216,003,711,385,023,980,000,000,000,000,000,000,000
13
Don't read too greedily
static int indirectblockRead(struct READER *reader, struct DATAOBJECT *dataobject, struct FRACTALHEAP *fractalheap, uint64_t iblock_size) { int size, nrows, max_dblock_rows, k, n, err; uint32_t filter_mask; uint64_t heap_header_address, block_offset, child_direct_block = 0, size_filtered, child_indirect_block...
0
[ "CWE-476", "CWE-787" ]
libmysofa
2e6fac6ab6156dae8e8c6f417741388084b70d6f
319,885,170,862,423,070,000,000,000,000,000,000,000
102
Fixed recursive function calls
void Http2Stream::Priority(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); Local<Context> context = env->context(); Http2Stream* stream; ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); Http2Priority priority(env, args[0], args[1], args[2]); bool silent = args[3...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
294,034,428,712,552,760,000,000,000,000,000,000,000
12
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
void vhost_poll_stop(struct vhost_poll *poll) { if (poll->wqh) { remove_wait_queue(poll->wqh, &poll->wait); poll->wqh = NULL; } }
0
[ "CWE-399" ]
linux
7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5
22,120,669,620,641,076,000,000,000,000,000,000,000
7
vhost: actually track log eventfd file While reviewing vhost log code, I found out that log_file is never set. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet). Cc: stable@vger.kernel.org Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
static inline void mmdrop(struct mm_struct *mm) { /* * The implicit full barrier implied by atomic_dec_and_test() is * required by the membarrier system call before returning to * user-space, after storing to rq->curr. */ if (unlikely(atomic_dec_and_test(&mm->mm_count))) __mmdrop(mm); }
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
327,407,004,698,112,970,000,000,000,000,000,000,000
10
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
static int check_attach_btf_id(struct bpf_verifier_env *env) { struct bpf_prog *prog = env->prog; struct bpf_prog *tgt_prog = prog->aux->dst_prog; struct bpf_attach_target_info tgt_info = {}; u32 btf_id = prog->aux->attach_btf_id; struct bpf_trampoline *tr; int ret; u64 key; if (prog->aux->sleepable && prog->t...
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
326,750,826,463,028,000,000,000,000,000,000,000,000
69
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
static int ext4_fill_flex_info(struct super_block *sb) { struct ext4_sb_info *sbi = EXT4_SB(sb); struct ext4_group_desc *gdp = NULL; ext4_group_t flex_group_count; ext4_group_t flex_group; int groups_per_flex = 0; size_t size; int i; sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex; groups_per_fl...
1
[ "CWE-703", "CWE-189" ]
linux
d50f2ab6f050311dbf7b8f5501b25f0bf64a439b
218,142,556,823,218,700,000,000,000,000,000,000,000
46
ext4: fix undefined behavior in ext4_fill_flex_info() Commit 503358ae01b70ce6909d19dd01287093f6b6271c ("ext4: avoid divide by zero when trying to mount a corrupted file system") fixes CVE-2009-4307 by performing a sanity check on s_log_groups_per_flex, since it can be set to a bogus value by an attacker. sbi->s_log_...
static int snd_seq_ioctl_remove_events(struct snd_seq_client *client, void __user *arg) { struct snd_seq_remove_events info; if (copy_from_user(&info, arg, sizeof(info))) return -EFAULT; /* * Input mostly not implemented XXX. */ if (info.remove_mode & SNDRV_SEQ_REMOVE_INPUT) { /* * No restri...
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
166,753,797,717,811,330,000,000,000,000,000,000,000
25
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
gpk_compute_signature(sc_card_t *card, const u8 *data, size_t data_len, u8 * out, size_t outlen) { struct gpk_private_data *priv = DRVDATA(card); sc_apdu_t apdu; u8 cardsig[1024/8]; int r; if (data_len > priv->sec_mod_len) { sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL, "Data length (%"SC_FORMAT_LEN_SIZE_T"u...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
142,690,004,137,654,490,000,000,000,000,000,000,000
44
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static void tcp_fixup_rcvbuf(struct sock *sk) { u32 mss = tcp_sk(sk)->advmss; int rcvmem; rcvmem = 2 * SKB_TRUESIZE(mss + MAX_TCP_HEADER) * tcp_default_init_rwnd(mss); /* Dynamic Right Sizing (DRS) has 2 to 3 RTT latency * Allow enough cushion so that sender is not limited by our window */ if (sysctl_tcp_...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
104,461,917,828,968,120,000,000,000,000,000,000,000
17
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) { int i, ret = 0; int eos_at_start = 1; s->ref = NULL; s->last_eos = s->eos; s->eos = 0; s->overlap = 0; /* split the input packet into NAL units, so we know the upper bound on the * number of slices in the fr...
0
[ "CWE-476" ]
FFmpeg
54655623a82632e7624714d7b2a3e039dc5faa7e
13,068,350,147,280,902,000,000,000,000,000,000,000
58
avcodec/hevcdec: Avoid only partly skiping duplicate first slices Fixes: NULL pointer dereference and out of array access Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432 Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304 This also fi...
bytes_to_hexstr(char *out, const guint8 *ad, guint32 len) { guint32 i; if (!ad) REPORT_DISSECTOR_BUG("Null pointer passed to bytes_to_hexstr()"); for (i = 0; i < len; i++) out = byte_to_hex(out, ad[i]); return out; }
0
[ "CWE-125" ]
wireshark
d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1
20,433,485,869,836,978,000,000,000,000,000,000,000
11
epan: Limit our bits in decode_bits_in_field. Limit the number of bits we process in decode_bits_in_field, otherwise we'll overrun our buffer. Fixes #16958.
void virDomainTPMDefFree(virDomainTPMDefPtr def) { if (!def) return; switch (def->type) { case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH: virDomainChrSourceDefClear(&def->data.passthrough.source); break; case VIR_DOMAIN_TPM_TYPE_EMULATOR: virDomainChrSourceDefClear(&def->data.emul...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
303,930,658,094,294,800,000,000,000,000,000,000,000
21
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static NTSTATUS check_spnego_blob_complete(struct smbd_server_connection *sconn, uint16 smbpid, uint16 vuid, DATA_BLOB *pblob) { struct pending_auth_data *pad = NULL; ASN1_DATA *data; size_t needed_len = 0; pad = get_pending_auth_data(sconn, smbpid); /* Ensure we have some data. */ if (pblob->le...
0
[ "CWE-119" ]
samba
9280051bfba337458722fb157f3082f93cbd9f2b
239,948,317,198,426,300,000,000,000,000,000,000,000
160
s3: Fix an uninitialized variable read Found by Laurent Gaffie <laurent.gaffie@gmail.com> Thanks for that, Volker Fix bug #7254 (An uninitialized variable read could cause an smbd crash).
set_str_utf16be(struct archive_write *a, unsigned char *p, const char *s, size_t l, uint16_t uf, enum vdc vdc) { size_t size, i; int onepad; if (s == NULL) s = ""; if (l & 0x01) { onepad = 1; l &= ~1; } else onepad = 0; if (vdc == VDC_UCS2) { struct iso9660 *iso9660 = a->format_data; if (archive_...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
9,801,851,712,767,350,000,000,000,000,000,000,000
49
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
component_transfer_render_child (RsvgNode *node, gpointer data) { struct component_transfer_closure *closure = data; RsvgNodeComponentTransferFunc *f; if (rsvg_node_get_type (node) != RSVG_NODE_TYPE_COMPONENT_TRANFER_FUNCTION) return TRUE; f = rsvg_rust_cnode_get_impl (node); if (f->chann...
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
75,812,751,802,445,190,000,000,000,000,000,000,000
18
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
request_response (GSLockPlug *plug, const char *prompt, gboolean visible) { int response; char *text; gs_lock_plug_set_sensitive (plug, TRUE); gs_lock_plug_enable_prompt (plug, prompt, visible); response = gs_lock_plug_run (plug); ...
0
[ "CWE-362" ]
gnome-screensaver
ab08cc93f2dc6223c8c00bfa1ca4f2d89069dbe0
248,811,768,678,537,500,000,000,000,000,000,000,000
21
Work around x errors by asking dialog to die on cancel Basically, what is happening is that gnome-screensaver-dialog exits after the 5th failed attempt at unlocking the screen, but before the shake animation finishes. If the timing is slightly unlucky, this results in gnome-screensaver accessing X resources that have ...
static void sched_deliver_remote(const char *recipient, struct caldav_sched_param *sparam, struct sched_data *sched_data) { int r; if (sparam->flags == SCHEDTYPE_REMOTE) { /* Use iMIP */ r = imip_send(sched_data->itip); if (!r) { sched_data->status = sched_data->ischedule ? REQSTAT_SENT : S...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
176,726,415,731,400,930,000,000,000,000,000,000,000
71
HTTP: don't overrun buffer when parsing strings with sscanf()
static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *iocb, const struct iovec *iov, loff_t offset, unsigned long nr_segs) { int seg; int i; size_t size; unsigned long addr; unsigned blocksize_mask = root->sectorsize - 1; ssize_t retval = -EINVAL; loff_t end = offset; if (offset &...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
296,222,910,254,810,720,000,000,000,000,000,000,000
41
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
xps_deobfuscate_font_resource(xps_context_t *ctx, xps_part_t *part) { byte buf[33]; byte key[16]; char *p; int i; p = strrchr(part->name, '/'); if (!p) p = part->name; for (i = 0; i < 32 && *p; p++) { if (isxdigit(*p)) buf[i++] = *p; } buf[i] = 0; ...
0
[ "CWE-125" ]
ghostpdl
3ee55637480d5e319a5de0481b01c3346855cbc9
109,194,235,768,765,010,000,000,000,000,000,000,000
33
Bug 698050: xps: bounds check offset for requested cmap table
TfLiteRegistration* Register_RANK() { static TfLiteRegistration r = {nullptr, nullptr, rank::Prepare, rank::Eval}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
195,198,581,790,694,560,000,000,000,000,000,000,000
4
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
template<typename t> CImgList(const CImgList<t>& list, const bool is_shared):_width(0),_allocated_width(0),_data(0) { assign(list._width); cimglist_for(*this,l) _data[l].assign(list[l],is_shared);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
299,472,598,837,412,500,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo) { FILE *stream = stdout; const char *ptr = writeinfo; char *stringp = NULL; long longinfo; double doubleinfo; while(ptr && *ptr) { if('%' == *ptr) { if('%' == ptr[1]) { /* an escaped %-letter */ fputc('%',...
1
[ "CWE-200", "CWE-119" ]
curl
1890d59905414ab84a35892b2e45833654aa5c13
89,276,144,604,101,340,000,000,000,000,000,000,000
263
tool_writeout: fixed a buffer read overrun on --write-out If a % ended the statement, the string's trailing NUL would be skipped and memory past the end of the buffer would be accessed and potentially displayed as part of the --write-out output. Added tests 1440 and 1441 to check for this kind of condition. Reported-...
compressUncompressSubset(const unsigned short raw[], int n) { // Test various subsets of the data set Array <char> compressed (3 * n + 4 * 65536); Array <unsigned short> uncompressed (n); int maxOffset = 16; if (n <= maxOffset) { maxOffset = n-1; } for (int offset=1; offset<maxOff...
0
[ "CWE-190" ]
openexr
51a92d67f53c08230734e74564c807043cbfe41e
31,071,620,916,136,274,000,000,000,000,000,000,000
35
check for valid Huf code lengths (#849) * check for valid Huf code lengths * test non-fast huf decoder in testHuf Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
void Curl_cookie_clearsess(struct CookieInfo *cookies) { struct Cookie *first, *curr, *next, *prev = NULL; unsigned int i; if(!cookies) return; for(i = 0; i < COOKIE_HASH_SIZE; i++) { if(!cookies->cookies[i]) continue; first = curr = prev = cookies->cookies[i]; for(; curr; curr = next)...
0
[]
curl
48d7064a49148f03942380967da739dcde1cdc24
267,250,984,803,245,800,000,000,000,000,000,000,000
35
cookie: apply limits - Send no more than 150 cookies per request - Cap the max length used for a cookie: header to 8K - Cap the max number of received Set-Cookie: headers to 50 Bug: https://curl.se/docs/CVE-2022-32205.html CVE-2022-32205 Reported-by: Harry Sintonen Closes #9048
int cil_resolve_call2(struct cil_tree_node *current, void *extra_args) { struct cil_call *new_call = current->data; int rc = SEPOL_ERR; enum cil_sym_index sym_index = CIL_SYM_UNKNOWN; struct cil_list_item *item; if (new_call->args == NULL) { rc = SEPOL_OK; goto exit; } cil_list_for_each(item, new_call->arg...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
207,576,920,328,496,800,000,000,000,000,000,000,000
107
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
void task_clear_jobctl_trapping(struct task_struct *task) { if (unlikely(task->jobctl & JOBCTL_TRAPPING)) { task->jobctl &= ~JOBCTL_TRAPPING; smp_mb(); /* advised by wake_up_bit() */ wake_up_bit(&task->jobctl, JOBCTL_TRAPPING_BIT); } }
0
[ "CWE-119", "CWE-787" ]
linux
4ea77014af0d6205b05503d1c7aac6eace11d473
66,912,035,191,533,980,000,000,000,000,000,000,000
8
kernel/signal.c: avoid undefined behaviour in kill_something_info When running kill(72057458746458112, 0) in userspace I hit the following issue. UBSAN: Undefined behaviour in kernel/signal.c:1462:11 negation of -2147483648 cannot be represented in type 'int': CPU: 226 PID: 9849 Comm: test Tainted: G B ...
int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len) { const void *zero_page = (const void *) __va(page_to_phys(ZERO_PAGE(0))); return kvm_write_guest_page(kvm, gfn, zero_page, offset, len); }
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
337,123,867,647,836,830,000,000,000,000,000,000,000
6
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
static void MSLUnparsedEntityDeclaration(void *context,const xmlChar *name, const xmlChar *public_id,const xmlChar *system_id,const xmlChar *notation) { MSLInfo *msl_info; /* What to do when an unparsed entity declaration is parsed. */ (void) LogMagickEvent(CoderEvent,GetMagickModule(), " SAX.un...
0
[ "CWE-772", "CWE-787" ]
ImageMagick
e793eb203e5e0f91f5037aed6585e81b1e27395b
128,217,046,164,999,650,000,000,000,000,000,000,000
19
https://github.com/ImageMagick/ImageMagick/issues/636
virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr sourcenode, virDomainHostdevSubsysSCSIPtr def, xmlXPathContextPtr ctxt) { int auth_secret_usage = -1; xmlNodePtr cur; virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc = &def...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
143,791,181,707,320,200,000,000,000,000,000,000,000
69
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
void unregister_pernet_device(struct pernet_operations *ops) { down_write(&pernet_ops_rwsem); if (&ops->list == first_device) first_device = first_device->next; unregister_pernet_operations(ops); up_write(&pernet_ops_rwsem); }
0
[ "CWE-200", "CWE-190", "CWE-326" ]
linux
355b98553789b646ed97ad801a619ff898471b92
249,634,246,863,326,800,000,000,000,000,000,000,000
8
netns: provide pure entropy for net_hash_mix() net_hash_mix() currently uses kernel address of a struct net, and is used in many places that could be used to reveal this address to a patient attacker, thus defeating KASLR, for the typical case (initial net namespace, &init_net is not dynamically allocated) I believe ...
std::string Box_colr::dump(Indent& indent) const { std::ostringstream sstr; sstr << Box::dump(indent); sstr << indent << "colour_type: " << to_fourcc(get_color_profile_type()) << "\n"; if (m_color_profile) { sstr << m_color_profile->dump(indent); } else { sstr << "no color profile\n"; } retur...
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
137,504,168,138,509,870,000,000,000,000,000,000,000
16
force fraction to a limited resolution to finally solve those pesky numerical edge cases
rad_cvt_string(const void *data, size_t len) { char *s; s = malloc(len + 1); if (s != NULL) { memcpy(s, data, len); s[len] = '\0'; } return s; }
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
289,388,928,132,233,800,000,000,000,000,000,000,000
11
Fix a security issue in radius_get_vendor_attr(). The underlying rad_get_vendor_attr() function assumed that it would always be given valid VSA data. Indeed, the buffer length wasn't even passed in; the assumption was that the length field within the VSA structure would be valid. This could result in denial of servic...
last_status( int morewin) // pretend there are two or more windows { // Don't make a difference between horizontal or vertical split. last_status_rec(topframe, (p_ls == 2 || (p_ls == 1 && (morewin || !ONE_WINDOW)))); }
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
258,384,181,052,466,780,000,000,000,000,000,000,000
7
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
static int write_reftable_entry(BlockDriverState *bs, int rt_index) { BDRVQcowState *s = bs->opaque; uint64_t buf[RT_ENTRIES_PER_SECTOR]; int rt_start_index; int i, ret; rt_start_index = rt_index & ~(RT_ENTRIES_PER_SECTOR - 1); for (i = 0; i < RT_ENTRIES_PER_SECTOR; i++) { buf[i] = cpu_...
0
[ "CWE-190" ]
qemu
b106ad9185f35fc4ad669555ad0e79e276083bd7
193,306,901,921,951,400,000,000,000,000,000,000,000
28
qcow2: Don't rely on free_cluster_index in alloc_refcount_block() (CVE-2014-0147) free_cluster_index is only correct if update_refcount() was called from an allocation function, and even there it's brittle because it's used to protect unfinished allocations which still have a refcount of 0 - if it moves in the wrong p...
_copyOpExpr(const OpExpr *from) { OpExpr *newnode = makeNode(OpExpr); COPY_SCALAR_FIELD(opno); COPY_SCALAR_FIELD(opfuncid); COPY_SCALAR_FIELD(opresulttype); COPY_SCALAR_FIELD(opretset); COPY_SCALAR_FIELD(opcollid); COPY_SCALAR_FIELD(inputcollid); COPY_NODE_FIELD(args); COPY_LOCATION_FIELD(location); retu...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
31,760,944,565,749,683,000,000,000,000,000,000,000
15
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static TT_F26Dot6 Free_Project( EXEC_OPS TT_F26Dot6 Vx, TT_F26Dot6 Vy ) { THROW_PATENTED; return 0; }
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
188,203,429,265,055,360,000,000,000,000,000,000,000
5
Bug 698024: bounds check zone pointer in Ins_MIRP()
GF_Box *dec3_New() { ISOM_DECL_BOX_ALLOC(GF_AC3ConfigBox, GF_ISOM_BOX_TYPE_DAC3); tmp->cfg.is_ec3 = 1; return (GF_Box *)tmp;
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
52,400,115,724,438,150,000,000,000,000,000,000,000
6
prevent dref memleak on invalid input (#1183)
static int wbinvd_interception(struct vcpu_svm *svm) { return kvm_emulate_wbinvd(&svm->vcpu); }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
145,142,136,160,834,220,000,000,000,000,000,000,000
4
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
server_client_check_exit(struct client *c) { if (!(c->flags & CLIENT_EXIT)) return; if (EVBUFFER_LENGTH(c->stdin_data) != 0) return; if (EVBUFFER_LENGTH(c->stdout_data) != 0) return; if (EVBUFFER_LENGTH(c->stderr_data) != 0) return; if (c->flags & CLIENT_ATTACHED) notify_client("client-detached", c); ...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
87,358,231,897,013,440,000,000,000,000,000,000,000
17
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
static StringFileInfo* Pe_r_bin_pe_parse_string_file_info(struct PE_(r_bin_pe_obj_t)* bin, PE_DWord* curAddr) { StringFileInfo* stringFileInfo = calloc (1, sizeof(*stringFileInfo)); if (!stringFileInfo) { bprintf ("Warning: calloc (StringFileInfo)\n"); return NULL; } PE_DWord startAddr = *curAddr; if (r_buf_...
0
[ "CWE-125" ]
radare2
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
231,669,911,177,884,860,000,000,000,000,000,000,000
89
Fix crash in pe
static void ehci_trace_qh(EHCIQueue *q, hwaddr addr, EHCIqh *qh) { /* need three here due to argument count limits */ trace_usb_ehci_qh_ptrs(q, addr, qh->next, qh->current_qtd, qh->next_qtd, qh->altnext_qtd); trace_usb_ehci_qh_fields(addr, get_field(qh...
0
[]
qemu
791f97758e223de3290592d169f8e6339c281714
154,590,544,220,569,840,000,000,000,000,000,000,000
17
usb: ehci: fix memory leak in ehci_init_transfer In ehci_init_transfer function, if the 'cpage' is bigger than 4, it doesn't free the 'p->sgl' once allocated previously thus leading a memory leak issue. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog...
compare_by_display_name (NautilusFile *file_1, NautilusFile *file_2) { const char *name_1, *name_2; const char *key_1, *key_2; gboolean sort_last_1, sort_last_2; int compare; name_1 = nautilus_file_peek_display_name (file_1); name_2 = nautilus_file_peek_display_name (file_2); sort_last_1 = name_1[0] == SORT_LA...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
299,127,310,593,778,350,000,000,000,000,000,000,000
25
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
/* }}} */ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option) { int type; long conf; char *value; int value_len; PspellConfig *config; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &conf, &value, &value_len) == FAILURE) { return; } if (strlen(value) != value_len) { RE...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
50,883,300,875,326,450,000,000,000,000,000,000,000
30
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
PyRun_AnyFileFlags(FILE *fp, const char *name, PyCompilerFlags *flags) { return PyRun_AnyFileExFlags(fp, name, 0, flags); }
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
229,374,823,252,210,300,000,000,000,000,000,000,000
4
bpo-35766: Merge typed_ast back into CPython (GH-11645)
POINTER_LARGE_UPDATE* update_read_pointer_large(rdpUpdate* update, wStream* s) { POINTER_LARGE_UPDATE* pointer = calloc(1, sizeof(POINTER_LARGE_UPDATE)); if (!pointer) goto fail; if (!_update_read_pointer_large(s, pointer)) goto fail; return pointer; fail: free_pointer_large_update(update->context, pointer)...
0
[ "CWE-125" ]
FreeRDP
f8890a645c221823ac133dbf991f8a65ae50d637
217,792,033,951,710,570,000,000,000,000,000,000,000
15
Fixed #6005: Bounds checks in update_read_bitmap_data
static int illegal_highdma(struct net_device *dev, struct sk_buff *skb) { #ifdef CONFIG_HIGHMEM int i; if (!(dev->features & NETIF_F_HIGHDMA)) { for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; if (PageHighMem(skb_frag_page(frag))) return 1; } } if (PC...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
331,415,503,578,756,580,000,000,000,000,000,000,000
27
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
static void io_req_complete_post32(struct io_kiocb *req, s32 res, u32 cflags, u64 extra1, u64 extra2) { struct io_ring_ctx *ctx = req->ctx; spin_lock(&ctx->completion_lock); __io_req_complete_post32(req, res, cflags, extra1, extra2); io_commit_cqring(ctx); spin_unlock(&ctx->completion_lock); io_cqring_ev_...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
38,180,207,102,371,640,000,000,000,000,000,000,000
11
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...
static int snd_rawmidi_control_ioctl(struct snd_card *card, struct snd_ctl_file *control, unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; switch (cmd) { case SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE: { int device; if (get_user(device, (int __user *)argp))...
0
[ "CWE-415" ]
linux
39675f7a7c7e7702f7d5341f1e0d01db746543a0
26,700,936,021,791,650,000,000,000,000,000,000,000
44
ALSA: rawmidi: Change resized buffers atomically The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the current code is racy. For example, the sequencer client may write to buffer while it being resized. As a simple workaround, let's switch to the resized buffer inside the stream runtime lock. Reported...
void free_(FLAC__StreamEncoder *encoder) { unsigned i, channel; FLAC__ASSERT(0 != encoder); if(encoder->protected_->metadata) { free(encoder->protected_->metadata); encoder->protected_->metadata = 0; encoder->protected_->num_metadata_blocks = 0; } for(i = 0; i < encoder->protected_->channels; i++) { if(0 ...
0
[]
flac
c06a44969c1145242a22f75fc8fb2e8b54c55303
74,580,203,147,702,660,000,000,000,000,000,000,000
80
flac : Fix for https://sourceforge.net/p/flac/bugs/425/ * flac/encode.c : Validate num_tracks field of cuesheet. * libFLAC/stream_encoder.c : Add check for a NULL pointer. * flac/encode.c : Improve bounds checking. Closes: https://sourceforge.net/p/flac/bugs/425/
void update_ogg_metadata_(FLAC__StreamEncoder *encoder) { /* the # of bytes in the 1st packet that precede the STREAMINFO */ static const unsigned FIRST_OGG_PACKET_STREAMINFO_PREFIX_LENGTH = FLAC__OGG_MAPPING_PACKET_TYPE_LENGTH + FLAC__OGG_MAPPING_MAGIC_LENGTH + FLAC__OGG_MAPPING_VERSION_MAJOR_LENGTH + FLAC__...
0
[]
flac
c06a44969c1145242a22f75fc8fb2e8b54c55303
120,539,026,884,334,680,000,000,000,000,000,000,000
187
flac : Fix for https://sourceforge.net/p/flac/bugs/425/ * flac/encode.c : Validate num_tracks field of cuesheet. * libFLAC/stream_encoder.c : Add check for a NULL pointer. * flac/encode.c : Improve bounds checking. Closes: https://sourceforge.net/p/flac/bugs/425/
friend bool operator!=(const TensorKey& t1, const TensorKey& t2) { return !(t1 == t2); }
0
[ "CWE-122", "CWE-787" ]
tensorflow
1b85a28d395dc91f4d22b5f9e1e9a22e92ccecd6
328,849,407,076,987,700,000,000,000,000,000,000,000
3
Fix TensorKey hash function. The original hash function only used total estimated `AllocatedBytes()`, which (a) is an estimate per tensor, and (b) is a very poor hash function for constants (e.g. `int32_t`). It also tried to access individual tensor bytes through `tensor.data()` of size `AllocatedBytes()`. This led t...
static int sctp_getsockopt_maxburst(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_assoc_value params; struct sctp_sock *sp; struct sctp_association *asoc; if (len == sizeof(int)) { pr_warn("Use of int in max_burst socket option deprecated\n"); pr_warn("Use str...
0
[ "CWE-20" ]
linux
726bc6b092da4c093eb74d13c07184b18c1af0f1
311,229,029,645,180,350,000,000,000,000,000,000,000
40
net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS Building sctp may fail with: In function ‘copy_from_user’, inlined from ‘sctp_getsockopt_assoc_stats’ at net/sctp/socket.c:5656:20: arch/x86/include/asm/uaccess_32.h:211:26: error: call to ‘copy_from_user_overflow’ declared with attribute error: c...
_XF86BigfontFreeNop ( XExtData *extension) { return 0; }
0
[ "CWE-120" ]
libx11
8d2e02ae650f00c4a53deb625211a0527126c605
86,261,982,195,459,300,000,000,000,000,000,000,000
5
Reject string longer than USHRT_MAX before sending them on the wire The X protocol uses CARD16 values to represent the length so this would overflow. CVE-2021-31535 Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
void WebContents::OnPaint(const gfx::Rect& dirty_rect, const SkBitmap& bitmap) { Emit("paint", dirty_rect, gfx::Image::CreateFrom1xBitmap(bitmap)); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
220,597,528,174,310,530,000,000,000,000,000,000,000
3
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
GF_Err bxml_box_read(GF_Box *s, GF_BitStream *bs) { GF_BinaryXMLBox *ptr = (GF_BinaryXMLBox *)s; ptr->data_length = (u32)(ptr->size); ptr->data = (char*)gf_malloc(sizeof(char)*ptr->data_length); if (!ptr->data) return GF_OUT_OF_MEM; gf_bs_read_data(bs, ptr->data, ptr->data_length); return GF_OK; }
0
[ "CWE-401", "CWE-787" ]
gpac
ec64c7b8966d7e4642d12debb888be5acf18efb9
334,122,825,164,525,400,000,000,000,000,000,000,000
10
fixed #1786 (fuzz)
static int ucma_set_option_ib(struct ucma_context *ctx, int optname, void *optval, size_t optlen) { int ret; switch (optname) { case RDMA_OPTION_IB_PATH: ret = ucma_set_ib_path(ctx, optval, optlen); break; default: ret = -ENOSYS; } return ret; }
0
[ "CWE-416", "CWE-703" ]
linux
cb2595c1393b4a5211534e6f0a0fbad369e21ad8
317,546,053,405,074,500,000,000,000,000,000,000,000
15
infiniband: fix a possible use-after-free bug ucma_process_join() will free the new allocated "mc" struct, if there is any error after that, especially the copy_to_user(). But in parallel, ucma_leave_multicast() could find this "mc" through idr_find() before ucma_process_join() frees it, since it is already published...