func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
safe_atoi_base(const char *str, int *val, int base) { char *endptr; long v; assert(base == 10 || base == 16 || base == 8); errno = 0; v = strtol(str, &endptr, base); if (errno > 0) return false; if (str == endptr) return false; if (*str != '\0' && *endptr != '\0') return false; if (v > INT_MAX || v < ...
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
101,089,516,181,203,820,000,000,000,000,000,000,000
22
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
int mutt_add_to_rx_list (RX_LIST **list, const char *s, int flags, BUFFER *err) { RX_LIST *t, *last = NULL; REGEXP *rx; if (!s || !*s) return 0; if (!(rx = mutt_compile_regexp (s, flags))) { snprintf (err->data, err->dsize, "Bad regexp: %s\n", s); return -1; } /* check to make sure the item...
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
280,884,709,054,743,400,000,000,000,000,000,000,000
44
use a 64-bit random value in temporary filenames. closes #3158
static void Ins_SRP0( INS_ARG ) { CUR.GS.rp0 = (Int)(args[0]); }
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
108,112,181,394,136,900,000,000,000,000,000,000,000
4
Bug 698024: bounds check zone pointer in Ins_MIRP()
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin, const char *pass, ENGINE *e, const char *key_descrip) { BIO *key=NULL; EVP_PKEY *pkey=NULL; PW_CB_DATA cb_data; cb_data.password = pass; cb_data.prompt_info = file; if (file == NULL && (!maybe_stdin || format == FORMAT_ENGINE)) {...
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
263,049,891,944,103,930,000,000,000,000,000,000,000
106
Add Next Protocol Negotiation.
mtab_is_writable() { int fd; /* Should we write to /etc/mtab upon an update? Probably not if it is a symlink to /proc/mounts, since that would create a file /proc/mounts in case the proc filesystem is not mounted. */ if (mtab_is_a_symlink()) return 0; fd = open(_PATH_MOUNTED, O_RDWR | O_CREAT, 0644)...
0
[ "CWE-399" ]
util-linux
4b39b6aefd5dd8ac68a92adc650dc13d5d54d704
247,518,377,983,800,240,000,000,000,000,000,000,000
17
mount: use fflush() and temporary file for mtab updates (CVE-2011-1089) http://thread.gmane.org/gmane.comp.security.oss.general/4374 Changes: - force mount(8) to use /etc/mtab.tmp file every time. The original code used the tmp file for remount/move operations only. - call and check fflush() return code for...
QPDFObjectHandle::parseInternal(PointerHolder<InputSource> input, std::string const& object_description, QPDFTokenizer& tokenizer, bool& empty, StringDecrypter* decrypter, QPDF* context, bool ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
269,251,793,394,057,500,000,000,000,000,000,000,000
406
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
void DumpMemory (void *mem, int size) { unsigned char str[20]; unsigned char *m = mem; int i,j; for (j = 0; j < size / 8; j++) { memset (str,0,sizeof str); for (i = 0; i < 8; i++) { if (m[i] > ' ' && m[i] <= '~') str[i]=m[i]; else str[i]='.'; } Dump ("0x%08p %02x %02x %02x %02x %02x %02x...
0
[ "CWE-119", "CWE-787" ]
VeraCrypt
f30f9339c9a0b9bbcc6f5ad38804af39db1f479e
54,329,372,569,708,840,000,000,000,000,000,000,000
23
Windows: fix low severity vulnerability in driver that allowed reading 3 bytes of kernel stack memory (with a rare possibility of 25 additional bytes). Reported by Tim Harrison.
struct tty_driver *__tty_alloc_driver(unsigned int lines, struct module *owner, unsigned long flags) { struct tty_driver *driver; unsigned int cdevs = 1; int err; if (!lines || (flags & TTY_DRIVER_UNNUMBERED_NODE && lines > 1)) return ERR_PTR(-EINVAL); driver = kzalloc(sizeof(struct tty_driver), GFP_KERNEL);...
0
[ "CWE-200", "CWE-362" ]
linux
5c17c861a357e9458001f021a7afa7aab9937439
18,177,056,994,750,158,000,000,000,000,000,000,000
56
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) ioctl(TIOCGETD) retrieves the line discipline id directly from the ldisc because the line discipline id (c_line) in termios is untrustworthy; userspace may have set termios via ioctl(TCSETS*) without actually changing the line discipline via ioctl(TIOCSETD). However...
explicit TrivialResolver(TfLiteRegistration* constant_return = nullptr) : constant_return_(constant_return) {}
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
99,401,992,987,963,460,000,000,000,000,000,000,000
2
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
e_plugin_lib_enable (EPlugin *ep, gint enable) { if (loaded) return 0; loaded = TRUE; if (enable) { bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); } return 0; }
0
[]
evolution
a9fb511ced4cfaffb7109e58a9db66e6279e309c
315,699,933,395,802,260,000,000,000,000,000,000,000
13
bug #641069 - tnef plugin vulnerabilities Resolves directory traversal and buffer overflow vulnerabilities.
MYSQL *mthd_my_real_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket, unsigned long client_flag) { char buff[NAME_LEN+USERNAME_LENGTH+100]; char *end, *end_pkt, *host_info; MA_PVIO_CINFO cinfo= {NULL, NULL, 0, -1, NULL}; ...
0
[ "CWE-20" ]
mariadb-connector-c
2759b87d72926b7c9b5426437a7c8dd15ff57945
214,451,806,802,445,070,000,000,000,000,000,000,000
376
sanity checks for client-supplied OK packet content reported by Matthias Kaiser, Apple Information Security
static struct sctp_cookie_param *sctp_pack_cookie( const struct sctp_endpoint *ep, const struct sctp_association *asoc, const struct sctp_chunk *init_chunk, int *cookie_len, const __u8 *raw_addrs, int addrs_len) { struct sctp_signed_cookie *cookie; struct sctp_cookie_param *retval; int heade...
0
[ "CWE-704" ]
linux
a2d859e3fc97e79d907761550dbc03ff1b36479c
326,528,723,025,052,600,000,000,000,000,000,000,000
85
sctp: account stream padding length for reconf chunk sctp_make_strreset_req() makes repeated calls to sctp_addto_chunk() which will automatically account for padding on each call. inreq and outreq are already 4 bytes aligned, but the payload is not and doing SCTP_PAD4(a + b) (which _sctp_make_chunk() did implicitly he...
static bool scsi_disk_req_check_error(SCSIDiskReq *r, int ret, bool acct_failed) { if (r->req.io_canceled) { scsi_req_cancel_complete(&r->req); return true; } if (ret < 0) { return scsi_handle_rw_error(r, ret, acct_failed); } return false; }
0
[ "CWE-193" ]
qemu
b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8
97,274,189,569,818,630,000,000,000,000,000,000,000
13
hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands This avoids an off-by-one read of 'mode_sense_valid' buffer in hw/scsi/scsi-disk.c:mode_sense_page(). Fixes: CVE-2021-3930 Cc: qemu-stable@nongnu.org Reported-by: Alexander Bulekov <alxndr@bu.edu> Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa...
void RoleGraph::_createBuiltinRolesForDBIfNeeded(StringData dbname) { _createBuiltinRoleIfNeeded(RoleName(BUILTIN_ROLE_READ, dbname)); _createBuiltinRoleIfNeeded(RoleName(BUILTIN_ROLE_READ_WRITE, dbname)); _createBuiltinRoleIfNeeded(RoleName(BUILTIN_ROLE_USER_ADMIN, dbname)); _createBuiltinRoleIfNeeded(...
0
[ "CWE-20" ]
mongo
865eccaf35aca29d1b71764d50227cdf853752d0
186,958,521,791,708,450,000,000,000,000,000,000,000
24
SERVER-36263 Bypassing operation validation in applyOps should require special privilege
static void hufClearDecTable(HufDec *hdecod) // io: (allocated by caller) // decoding table [HUF_DECSIZE] { for (int i = 0; i < HUF_DECSIZE; i++) { hdecod[i].len = 0; hdecod[i].lit = 0; hdecod[i].p = NULL; } // memset(hdecod, 0, sizeof(HufDec) * HUF_DECSIZE); }
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
93,394,179,971,720,170,000,000,000,000,000,000,000
10
Make line_no with too large value(2**20) invalid. Fixes #124
static long ioctl_stop(struct fsl_hv_ioctl_stop __user *p) { struct fsl_hv_ioctl_stop param; /* Get the parameters from the user */ if (copy_from_user(&param, p, sizeof(struct fsl_hv_ioctl_stop))) return -EFAULT; param.ret = fh_partition_stop(param.partition); if (copy_to_user(&p->ret, &param.ret, sizeof(__u3...
0
[ "CWE-190" ]
linux
6a024330650e24556b8a18cc654ad00cfecf6c6c
146,627,056,292,180,920,000,000,000,000,000,000,000
15
drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl The "param.count" value is a u64 thatcomes from the user. The code later in the function assumes that param.count is at least one and if it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR. Also the addition can have an integer over...
void ciEnv::report_failure(const char* reason) { EventCompilationFailure event; if (event.should_commit()) { event.set_compileId(compile_id()); event.set_failureMessage(reason); event.commit(); } }
0
[]
jdk11u
6c0ba0785a2f0900be301f72764cf4dcfa720991
296,273,931,897,328,720,000,000,000,000,000,000,000
8
8281859: Improve class compilation Reviewed-by: mbaesken Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
static void apic_sync_pv_eoi_from_guest(struct kvm_vcpu *vcpu, struct kvm_lapic *apic) { int vector; /* * PV EOI state is derived from KVM_APIC_PV_EOI_PENDING in host * and KVM_PV_EOI_ENABLED in guest memory as follows: * * KVM_APIC_PV_EOI_PENDING is unset: * -> host disabled PV EOI. * KVM_APIC_PV_E...
0
[ "CWE-476" ]
linux
00b5f37189d24ac3ed46cb7f11742094778c46ce
170,913,280,847,856,050,000,000,000,000,000,000,000
22
KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast() When kvm_irq_delivery_to_apic_fast() is called with APIC_DEST_SELF shorthand, 'src' must not be NULL. Crash the VM with KVM_BUG_ON() instead of crashing the host. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <...
static int uuid_cmp(const void *a, const void *b) { const sdp_record_t *rec = a; const uuid_t *uuid = b; return sdp_uuid_cmp(&rec->svclass, uuid); }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
87,715,727,258,678,140,000,000,000,000,000,000,000
7
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static void kvm_destroy_vm(struct kvm *kvm) { int i; struct mm_struct *mm = kvm->mm; kvm_uevent_notify_change(KVM_EVENT_DESTROY_VM, kvm); kvm_destroy_vm_debugfs(kvm); kvm_arch_sync_events(kvm); mutex_lock(&kvm_lock); list_del(&kvm->vm_list); mutex_unlock(&kvm_lock); kvm_arch_pre_destroy_vm(kvm); kvm_free_ir...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
80,475,832,577,748,455,000,000,000,000,000,000,000
38
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...
std::codecvt_base::result do_in( std::mbstate_t& state, const char* from, const char* from_end, const char*& from_next, wchar_t* to, wchar_t* to_end, wchar_t*& to_next ) const { try { customcodecvt_do_conversion<char, wchar_t>(state, from, from_end, from_next, to, to_end, to_next); } ...
0
[ "CWE-200" ]
wesnoth
f8914468182e8d0a1551b430c0879ba236fe4d6d
11,221,835,396,102,620,000,000,000,000,000,000,000
19
Disallow inclusion of .pbl files from WML (bug #23504) Note that this will also cause Lua wesnoth.have_file() to return false on .pbl files.
static void qeth_unregister_dbf_views(void) { int x; for (x = 0; x < QETH_DBF_INFOS; x++) { debug_unregister(qeth_dbf[x].id); qeth_dbf[x].id = NULL; } }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
248,200,968,885,237,160,000,000,000,000,000,000,000
8
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
CopyAttributeOutCSV(CopyState cstate, char *string, bool use_quote, bool single_attr) { char *ptr; char *start; char c; char delimc = cstate->delim[0]; char quotec = cstate->quote[0]; char escapec = cstate->escape[0]; /* force quoting if it matches null_print (before conversion!) */ if (!use_quo...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
96,992,485,378,832,240,000,000,000,000,000,000,000
80
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
static int copy_to_user_tmpl(struct xfrm_policy *xp, struct sk_buff *skb) { struct xfrm_user_tmpl vec[XFRM_MAX_DEPTH]; int i; if (xp->xfrm_nr == 0) return 0; for (i = 0; i < xp->xfrm_nr; i++) { struct xfrm_user_tmpl *up = &vec[i]; struct xfrm_tmpl *kp = &xp->xfrm_vec[i]; memcpy(&up->id, &kp->id, sizeof(u...
1
[ "CWE-200" ]
linux
1f86840f897717f86d523a13e99a447e6a5d2fa5
228,746,177,153,740,600,000,000,000,000,000,000,000
27
xfrm_user: fix info leak in copy_to_user_tmpl() The memory used for the template copy is a local stack variable. As struct xfrm_user_tmpl contains multiple holes added by the compiler for alignment, not initializing the memory will lead to leaking stack bytes to userland. Add an explicit memset(0) to avoid the info le...
MagickPrivate void XComponentTerminus(void) { DestroyXResources(); }
0
[]
ImageMagick
f391a5f4554fe47eb56d6277ac32d1f698572f0e
275,996,772,940,926,260,000,000,000,000,000,000,000
4
https://github.com/ImageMagick/ImageMagick/issues/1531
skip_grep_pat(exarg_T *eap) { char_u *p = eap->arg; if (*p != NUL && (eap->cmdidx == CMD_vimgrep || eap->cmdidx == CMD_lvimgrep || eap->cmdidx == CMD_vimgrepadd || eap->cmdidx == CMD_lvimgrepadd || grep_internal(eap->cmdidx))) { p = skip_vimgrep_pat(p, NULL, NULL); if (p == NULL) p = eap->arg;...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
179,931,959,232,143,170,000,000,000,000,000,000,000
15
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
static void __init acpi_sci_ioapic_setup(u8 bus_irq, u16 polarity, u16 trigger, u32 gsi) { if (trigger == 0) /* compatible SCI trigger is level */ trigger = 3; if (polarity == 0) /* compatible SCI polarity is low */ polarity = 3; /* Command-line over-ride via acpi_sci= */ if (acpi_sci_flags & ACPI_MADT_TRIGGE...
0
[ "CWE-120" ]
linux
dad5ab0db8deac535d03e3fe3d8f2892173fa6a4
9,147,851,179,900,714,000,000,000,000,000,000,000
25
x86/acpi: Prevent out of bound access caused by broken ACPI tables The bus_irq argument of mp_override_legacy_irq() is used as the index into the isa_irq_to_gsi[] array. The bus_irq argument originates from ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI tables, but is nowhere sanity checked. Th...
StoreCatalogInheritance1(Oid relationId, Oid parentOid, int16 seqNumber, Relation inhRelation) { TupleDesc desc = RelationGetDescr(inhRelation); Datum values[Natts_pg_inherits]; bool nulls[Natts_pg_inherits]; ObjectAddress childobject, parentobject; HeapTuple tuple; /* * Make the pg_inherits entry...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
187,865,281,634,314,930,000,000,000,000,000,000,000
53
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 __poll_t unix_dgram_poll(struct file *file, struct socket *sock, poll_table *wait) { struct sock *sk = sock->sk, *other; unsigned int writable; __poll_t mask; sock_poll_wait(file, sock, wait); mask = 0; /* exceptional events? */ if (sk->sk_err || !skb_queue_empty_lockless(&sk->sk_error_queue)) ...
0
[]
net
35306eb23814444bd4021f8a1c3047d3cb0c8b2b
163,719,357,030,516,000,000,000,000,000,000,000,000
57
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred. In order to fix this issue, this patch adds a new spinlock that needs to be used whenever these fields are read o...
void hinf_box_del(GF_Box *s) { GF_HintInfoBox *hinf = (GF_HintInfoBox *)s; gf_free(hinf); }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
12,418,329,693,921,734,000,000,000,000,000,000,000
5
fixed #1587
static int bcm_sock_no_ioctlcmd(struct socket *sock, unsigned int cmd, unsigned long arg) { /* no ioctls for socket layer -> hand it down to NIC layer */ return -ENOIOCTLCMD; }
0
[ "CWE-362" ]
linux
d5f9023fa61ee8b94f37a93f08e94b136cf1e463
119,636,542,292,698,920,000,000,000,000,000,000,000
6
can: bcm: delay release of struct bcm_op after synchronize_rcu() can_rx_register() callbacks may be called concurrently to the call to can_rx_unregister(). The callbacks and callback data, though, are protected by RCU and the struct sock reference count. So the callback data is really attached to the life of sk, mean...
std::string Magick::Image::formatExpression(const std::string expression) { char *text; std::string text_string; GetPPException; modifyImage(); text=InterpretImageProperties(imageInfo(),image(),expression.c_str(), exceptionInfo); if (text != (char *) NULL) { text_string=std::string(t...
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
63,617,604,902,077,890,000,000,000,000,000,000,000
20
Added missing return to avoid use after free.
void set_key_image(const uchar *buff, uint length) { Field_bit::store((char*) buff, length, &my_charset_bin); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
112,595,525,146,169,400,000,000,000,000,000,000,000
2
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
unsigned int _save_pandore_header_length(unsigned int id, unsigned int *dims, const unsigned int colorspace) const { unsigned int nbdims = 0; if (id==2 || id==3 || id==4) { dims[0] = 1; dims[1] = _width; nbdims = 2; } if (id==5 || id==6 || id==7) { dims[0] = 1; dims[1] = _hei...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
80,890,217,043,240,220,000,000,000,000,000,000,000
28
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
auth_spa_client( auth_instance *ablock, /* authenticator block */ void * sx, /* connection */ int timeout, /* command timeout */ uschar *buffer, /* buffer for reading response */ int buffsize) /* size of buffer */ { ...
0
[ "CWE-125" ]
exim
57aa14b216432be381b6295c312065b2fd034f86
332,029,193,468,060,100,000,000,000,000,000,000,000
100
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
home_address_ber (EContact *card) { return address_ber (card, E_CONTACT_ADDRESS_LABEL_HOME); }
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
55,921,766,360,516,630,000,000,000,000,000,000,000
4
Bug 796174 - strcat() considered unsafe for buffer overflow
gst_qtdemux_handle_src_query (GstPad * pad, GstObject * parent, GstQuery * query) { gboolean res = FALSE; GstQTDemux *qtdemux = GST_QTDEMUX (parent); GST_LOG_OBJECT (pad, "%s query", GST_QUERY_TYPE_NAME (query)); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION:{ GstFormat fmt; g...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
339,923,156,615,442,800,000,000,000,000,000,000,000
114
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
static void create_certinfo(struct curl_certinfo *ci, zval *listcode) { int i; if (ci) { zval certhash; for (i=0; i<ci->num_of_certs; i++) { struct curl_slist *slist; array_init(&certhash); for (slist = ci->certinfo[i]; slist; slist = slist->next) { int len; char s[64]; char *tmp; strn...
0
[ "CWE-119", "CWE-787" ]
php-src
72dbb7f416160f490c4e9987040989a10ad431c7
258,739,841,248,974,550,000,000,000,000,000,000,000
29
Fix bug #72674 - check both curl_escape and curl_unescape
int qeth_snmp_command(struct qeth_card *card, char __user *udata) { struct qeth_cmd_buffer *iob; struct qeth_ipa_cmd *cmd; struct qeth_snmp_ureq *ureq; int req_len; struct qeth_arp_query_info qinfo = {0, }; int rc = 0; QETH_CARD_TEXT(card, 3, "snmpcmd"); if (card->info.guestlan) return -EOPNOTSUPP; if ((!...
1
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
286,992,662,636,395,000,000,000,000,000,000,000,000
52
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
isuuencodebegin(const char *line) { if(line[0] != 'b') /* quick check */ return 0; if(strlen(line) < 10) return 0; return (strncasecmp(line, "begin ", 6) == 0) && isdigit(line[6]) && isdigit(line[7]) && isdigit(line[8]) && (line[9] == ' '); }
0
[ "CWE-125" ]
clamav-devel
586a5180287262070637c8943f2f7efd652e4a2c
22,859,709,502,463,427,000,000,000,000,000,000,000
12
bb11797 - fix invalid read in fuzzed mail file.
storageStateReload(void) { if (!driver) return -1; storageDriverLock(); virStoragePoolObjLoadAllState(driver->pools, driver->stateDir); virStoragePoolObjLoadAllConfigs(driver->pools, driver->configDir, ...
0
[]
libvirt
447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87
315,620,220,028,992,630,000,000,000,000,000,000,000
16
storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath 'virStoragePoolObjListSearch' returns a locked and refed object, thus we must release it on ACL permission failure. Fixes: 7aa0e8c0cb8 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318 Signed-off-by: Peter Krempa <pkrempa@redhat.co...
TPMS_QUOTE_INFO_Marshal(TPMS_QUOTE_INFO *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPML_PCR_SELECTION_Marshal(&source->pcrSelect, buffer, size); written += TPM2B_DIGEST_Marshal(&source->pcrDigest, buffer, size); return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
163,192,603,943,875,520,000,000,000,000,000,000,000
8
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
get_session_command_for_file (GdmSession *self, const char *file, char **command) { GKeyFile *key_file; GError *error; char *exec; gboolean ret; gboolean res; exec = NULL; ret =...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
82,686,063,900,586,990,000,000,000,000,000,000,000
71
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
check_rpcsec_auth(struct svc_req *rqstp) { gss_ctx_id_t ctx; krb5_context kctx; OM_uint32 maj_stat, min_stat; gss_name_t name; krb5_principal princ; int ret, success; krb5_data *c1, *c2, *realm; gss_buffer_desc gss_str; kadm5_server_handle_t handle; size_t slen; ch...
1
[ "CWE-284" ]
krb5
6609658db0799053fbef0d7d0aa2f1fd68ef32d8
329,184,784,358,973,360,000,000,000,000,000,000,000
69
Fix kadmind server validation [CVE-2014-9422] [MITKRB5-SA-2015-001] In kadmind's check_rpcsec_auth(), use data_eq_string() instead of strncmp() to check components of the server principal, so that we don't erroneously match left substrings of "kadmin", "history", or the realm. ticket: 8057 (new) target_version: 1.13....
replace_character(int c) { int n = State; State = MODE_REPLACE; ins_char(c); State = n; // Backup to the replaced character. dec_cursor(); }
0
[ "CWE-122" ]
vim
c249913edc35c0e666d783bfc21595cf9f7d9e0d
299,333,030,178,995,150,000,000,000,000,000,000,000
10
patch 9.0.0483: illegal memory access when replacing in virtualedit mode Problem: Illegal memory access when replacing in virtualedit mode. Solution: Check for replacing NUL after Tab.
static int sony_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) { struct sony_sc *sc = hid_get_drvdata(hdev); if (sc->quirks & BUZZ_CONTROLLER) { unsigned int key = usage->hid & HID_USAGE; if ((usage->hid & HID_USAGE_P...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
63,106,395,377,901,990,000,000,000,000,000,000,000
45
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
NamespaceString CommandHelpers::parseNsCollectionRequired(StringData dbname, const BSONObj& cmdObj) { // Accepts both BSON String and Symbol for collection name per SERVER-16260 // TODO(kangas) remove Symbol support in MongoDB 3.0 after Ruby driver audit...
1
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
20,188,976,598,242,661,000,000,000,000,000,000,000
14
SERVER-38275 ban find explain with UUID
bool Item_cache_row::setup(THD *thd, Item *item) { example= item; null_value= true; if (!values && allocate(thd, item->cols())) return 1; for (uint i= 0; i < item_count; i++) { Item *el= item->element_index(i); Item_cache *tmp; if (!(tmp= values[i]= Item_cache::get_cache(thd, el))) retu...
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
105,647,522,184,093,560,000,000,000,000,000,000,000
17
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
void OSD::handle_signal(int signum) { assert(signum == SIGINT || signum == SIGTERM); derr << "*** Got signal " << sig_str(signum) << " ***" << dendl; shutdown(); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
190,631,868,828,311,530,000,000,000,000,000,000,000
6
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static ssize_t local_preadv(FsContext *ctx, V9fsFidOpenState *fs, const struct iovec *iov, int iovcnt, off_t offset) { #ifdef CONFIG_PREADV return preadv(fs->fd, iov, iovcnt, offset); #else int err = lseek(fs->fd, offset, SEEK_SET); if (err == -1) { ...
0
[ "CWE-732" ]
qemu
9c6b899f7a46893ab3b671e341a2234e9c0c060e
160,455,963,974,436,480,000,000,000,000,000,000,000
15
9pfs: local: set the path of the export root to "." The local backend was recently converted to using "at*()" syscalls in order to ensure all accesses happen below the shared directory. This requires that we only pass relative paths, otherwise the dirfd argument to the "at*()" syscalls is ignored and the path is treat...
void red_stream_set_core_interface(RedStream *stream, SpiceCoreInterfaceInternal *core) { red_stream_remove_watch(stream); stream->priv->core = core; }
0
[]
spice
95a0cfac8a1c8eff50f05e65df945da3bb501fc9
79,869,533,689,169,710,000,000,000,000,000,000,000
5
With OpenSSL 1.0.2 and earlier: disable client-side renegotiation. Fixed issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
COMPAT_SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags, const struct compat_itimerspec __user *, utmr, struct compat_itimerspec __user *, otmr) { struct itimerspec new, old; int ret; if (get_compat_itimerspec(&new, utmr)) return -EFAULT; ret = do_timerfd_settime(ufd, flags, &new, &old); if (ret) ret...
0
[ "CWE-416" ]
linux
1e38da300e1e395a15048b0af1e5305bd91402f6
153,483,407,161,507,670,000,000,000,000,000,000,000
16
timerfd: Protect the might cancel mechanism proper The handling of the might_cancel queueing is not properly protected, so parallel operations on the file descriptor can race with each other and lead to list corruptions or use after free. Protect the context for these operations with a seperate lock. The wait queue ...
ipv6_sanity_check(const struct ovs_16aligned_ip6_hdr *nh, size_t size) { uint16_t plen; if (OVS_UNLIKELY(size < sizeof *nh)) { return false; } plen = ntohs(nh->ip6_plen); if (OVS_UNLIKELY(plen + IPV6_HEADER_LEN > size)) { return false; } /* Jumbo Payload option not supporte...
1
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
153,894,113,101,579,000,000,000,000,000,000,000,000
19
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...
CImg<T>& sort(const bool is_increasing=true, const char axis=0) { if (is_empty()) return *this; CImg<uintT> perm; switch (cimg::lowercase(axis)) { case 0 : _quicksort(0,size() - 1,perm,is_increasing,false); break; case 'x' : { perm.assign(_width); get_cr...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
304,349,705,006,840,300,000,000,000,000,000,000,000
39
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
usm_free_user(struct usmUser *user) { if (user == NULL) return NULL; SNMP_FREE(user->engineID); SNMP_FREE(user->name); SNMP_FREE(user->secName); SNMP_FREE(user->cloneFrom); SNMP_FREE(user->userPublicString); SNMP_FREE(user->authProtocol); SNMP_FREE(user->privProtocol); if (...
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
169,147,114,075,120,040,000,000,000,000,000,000,000
55
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
DeepTiledInputFile::numYTiles (int ly) const { if (ly < 0 || ly >= _data->numYLevels) { THROW (IEX_NAMESPACE::ArgExc, "Error calling numYTiles() on image " "file \"" << _data->_streamData->is->fileName() << "\" " "(Argument is not in valid range)."...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
310,775,164,759,078,300,000,000,000,000,000,000,000
11
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
TfLiteStatus UseDynamicOutputTensors(TfLiteContext* context, TfLiteNode* node) { for (int i = 0; i < NumOutputs(node); ++i) { TfLiteTensor* tensor; TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, i, &tensor)); SetTensorToDynamic(tensor); } return kTfLiteOk; }
0
[ "CWE-369" ]
tensorflow
b22786e7e9b7bdb6a56936ff29cc7e9968d7bc1d
10,693,417,081,546,260,000,000,000,000,000,000,000
8
Prevent division by 0 PiperOrigin-RevId: 370998952 Change-Id: I6b1d49079624ee1447d2d9b53a8976fb356cc8f5
int rsa_rsaes_oaep_decrypt( rsa_context *ctx, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, int mode, const unsigned char *label, size_t label_len, size_t *olen, ...
0
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
154,083,154,403,240,990,000,000,000,000,000,000,000
88
RSA blinding on CRT operations to counter timing attacks
static void vmxnet3_handle_command(VMXNET3State *s, uint64_t cmd) { s->last_command = cmd; switch (cmd) { case VMXNET3_CMD_GET_PERM_MAC_HI: VMW_CBPRN("Set: Get upper part of permanent MAC"); break; case VMXNET3_CMD_GET_PERM_MAC_LO: VMW_CBPRN("Set: Get lower part of permanent MA...
0
[ "CWE-416" ]
qemu
6c352ca9b4ee3e1e286ea9e8434bd8e69ac7d0d8
85,726,765,564,078,300,000,000,000,000,000,000,000
88
net: vmxnet3: check for device_active before write Vmxnet3 device emulator does not check if the device is active, before using it for write. It leads to a use after free issue, if the vmxnet3_io_bar0_write routine is called after the device is deactivated. Add check to avoid it. Reported-by: Li Qiang <liqiang6-s@360...
static struct usb_function *gprinter_alloc(struct usb_function_instance *fi) { struct printer_dev *dev; struct f_printer_opts *opts; opts = container_of(fi, struct f_printer_opts, func_inst); mutex_lock(&opts->lock); if (opts->minor >= minors) { mutex_unlock(&opts->lock); return ERR_PTR(-ENOENT); } dev = ...
1
[ "CWE-416" ]
linux
e8d5f92b8d30bb4ade76494490c3c065e12411b1
131,662,882,343,041,580,000,000,000,000,000,000,000
55
usb: gadget: function: printer: fix use-after-free in __lock_acquire Fix this by increase object reference count. BUG: KASAN: use-after-free in __lock_acquire+0x3fd4/0x4180 kernel/locking/lockdep.c:3831 Read of size 8 at addr ffff8880683b0018 by task syz-executor.0/3377 CPU: 1 PID: 3377 Comm: syz-executor.0 Not tain...
static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, fmode_t fmode, int flags, struct iattr *sattr, struct rpc_cred *cred, struct nfs4_state **res) { struct nfs4_state_owner *sp; struct nfs4_state *state = NULL; struct nfs_server *server = NFS_SERVER(dir); struct nfs4_opendata *opendata; i...
0
[ "CWE-703", "CWE-189" ]
linux
20e0fa98b751facf9a1101edaefbc19c82616a68
305,842,489,426,485,260,000,000,000,000,000,000,000
62
Fix length of buffer copied in __nfs4_get_acl_uncached _copy_from_pages() used to copy data from the temporary buffer to the user passed buffer is passed the wrong size parameter when copying data. res.acl_len contains both the bitmap and acl lenghts while acl_len contains the acl length after adjusting for the bitmap...
(CirrusVGAState *s, uint32_t dstaddr, const uint8_t *src, int dstpitch, int srcpitch, int bltwidth, int bltheight) { uint32_t addr; int x, y, pattern_y, pattern_pitch, pattern_x; unsigned int col; const uint8_t *src1; #if DEPTH == 24 int skipleft = s->vga.gr[0x2f] & 0x1f; #els...
1
[ "CWE-119" ]
qemu
ffaf857778286ca54e3804432a2369a279e73aa7
42,752,845,339,937,180,000,000,000,000,000,000,000
51
cirrus: stop passing around src pointers in the blitter Does basically the same as "cirrus: stop passing around dst pointers in the blitter", just for the src pointer instead of the dst pointer. For the src we have to care about cputovideo blits though and fetch the data from s->cirrus_bltbuf instead of vga memory. ...
DEFINE_TEST(test_read_format_rar5_different_window_size) { char buf[4096]; PROLOGUE("test_read_format_rar5_different_window_size.rar"); /* Return codes of those calls are ignored, because this sample file * is invalid. However, the unpacker shouldn't produce any SIGSEGV * errors during processing. */ (void) a...
0
[ "CWE-20", "CWE-125" ]
libarchive
94821008d6eea81e315c5881cdf739202961040a
248,519,686,301,330,500,000,000,000,000,000,000,000
20
RAR5 reader: reject files that declare invalid header flags One of the fields in RAR5's base block structure is the size of the header. Some invalid files declare a 0 header size setting, which can confuse the unpacker. Minimum header size for RAR5 base blocks is 7 bytes (4 bytes for CRC, and 3 bytes for the rest), so...
static int i40e_config_rss_aq(struct i40e_vsi *vsi, const u8 *seed, u8 *lut, u16 lut_size) { struct i40e_pf *pf = vsi->back; struct i40e_hw *hw = &pf->hw; int ret = 0; if (seed) { struct i40e_aqc_get_set_rss_key_data *seed_dw = (struct i40e_aqc_get_set_rss_key_data *)seed; ret = i40e_aq_set_rss_key...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
302,449,845,971,889,800,000,000,000,000,000,000,000
33
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
static void lsr_read_line_increment_type(GF_LASeRCodec *lsr, SVG_Number *li, const char *name) { u32 val; GF_LSR_READ_INT(lsr, val, 1, "choice"); if (val==1) { GF_LSR_READ_INT(lsr, val, 1, "type"); if (val==1) li->type=SVG_NUMBER_INHERIT; else li->type=SVG_NUMBER_AUTO; } else { li->value = lsr_read_fixed_16...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
193,192,067,775,158,600,000,000,000,000,000,000,000
12
fixed #2213
static struct gfxinfo *php_handle_png (php_stream * stream TSRMLS_DC) { struct gfxinfo *result = NULL; unsigned char dim[9]; /* Width: 4 bytes * Height: 4 bytes * Bit depth: 1 byte * Color type: 1 byte * Compression method: 1 byte * Filter method: 1 byte * Interlac...
0
[]
php-src
87829c09a1d9e39bee994460d7ccf19dd20eda14
174,366,490,431,999,250,000,000,000,000,000,000,000
25
Fix #70052: getimagesize() fails for very large and very small WBMP Very large WBMP (width or height greater than 2**31-1) cause an overflow and circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12 bytes) cause a read error and are not recognized. This patch fixes both bugs.
static void enable_extra_target_match(struct libmnt_table *tb) { char *cn = NULL; const char *tgt = NULL, *mnt = NULL; struct libmnt_fs *fs; /* * Check if match pattern is mountpoint, if not use the * real mountpoint. */ if (flags & FL_NOCACHE) tgt = get_match(COL_TARGET); else { tgt = cn = mnt_resolve...
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
310,281,998,215,346,080,000,000,000,000,000,000,000
27
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
add_durable_context(struct kvec *iov, unsigned int *num_iovec, struct cifs_open_parms *oparms, bool use_persistent) { struct smb2_create_req *req = iov[0].iov_base; unsigned int num = *num_iovec; if (use_persistent) { if (oparms->reconnect) return add_durable_reconnect_v2_context(iov, num_iovec, ...
0
[ "CWE-476" ]
linux
cabfb3680f78981d26c078a26e5c748531257ebb
191,465,842,444,227,350,000,000,000,000,000,000,000
32
CIFS: Enable encryption during session setup phase In order to allow encryption on SMB connection we need to exchange a session key and generate encryption and decryption keys. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
void Item::init_make_send_field(Send_field *tmp_field, enum enum_field_types field_type_arg) { tmp_field->db_name= ""; tmp_field->org_table_name= ""; tmp_field->org_col_name= empty_clex_str; tmp_field->table_name= ""; tmp_field->col_name= name; tmp_field->flags= ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
111,097,992,142,433,830,000,000,000,000,000,000,000
17
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static void uvc_stream_delete(struct uvc_streaming *stream) { if (stream->async_wq) destroy_workqueue(stream->async_wq); mutex_destroy(&stream->mutex); usb_put_intf(stream->intf); kfree(stream->format); kfree(stream->header.bmaControls); kfree(stream); }
0
[ "CWE-269" ]
linux
68035c80e129c4cfec659aac4180354530b26527
28,666,930,626,399,464,000,000,000,000,000,000,000
13
media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors Way back in 2017, fuzzing the 4.14-rc2 USB stack with syzkaller kicked up the following WARNING from the UVC chain scanning code: | list_add double add: new=ffff880069084010, prev=ffff880069084010, | next=ffff880067d22298. | ----------...
static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) { struct hid_debug_list *list = file->private_data; poll_wait(file, &list->hdev->debug_wait, wait); if (!kfifo_is_empty(&list->hid_debug_fifo)) return EPOLLIN | EPOLLRDNORM; if (!list->hdev->debug) return EPOLLERR | EPOLLHUP; return 0;...
0
[ "CWE-835" ]
linux
13054abbaa4f1fd4e6f3b4b63439ec033b4c8035
166,035,379,927,591,670,000,000,000,000,000,000,000
11
HID: debug: fix the ring buffer implementation Ring buffer implementation in hid_debug_event() and hid_debug_events_read() is strange allowing lost or corrupted data. After commit 717adfdaf147 ("HID: debug: check length before copy_to_user()") it is possible to enter an infinite loop in hid_debug_events_read() by prov...
static void cmd_anal_opcode(RCore *core, const char *input) { int l, len = core->blocksize; ut32 tbs = core->blocksize; switch (input[0]) { case 's': // "aos" case 'j': // "aoj" case 'e': // "aoe" case 'r': { int count = 1; int obs = core->blocksize; if (input[1] && input[2]) { l = (int)r_num_get (core...
0
[ "CWE-125", "CWE-787" ]
radare2
a1bc65c3db593530775823d6d7506a457ed95267
129,712,958,575,895,960,000,000,000,000,000,000,000
119
Fix #12375 - Crash in bd+ao (#12382)
mm_answer_pam_free_ctx(int sock, Buffer *m) { debug3("%s", __func__); (sshpam_device.free_ctx)(sshpam_ctxt); buffer_clear(m); mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m); auth_method = "keyboard-interactive"; auth_submethod = "pam"; return (sshpam_authok == sshpam_ctxt); }
1
[ "CWE-284", "CWE-264" ]
openssh-portable
5e75f5198769056089fb06c4d738ab0e5abc66f7
75,955,826,626,241,740,000,000,000,000,000,000,000
11
set sshpam_ctxt to NULL after free Avoids use-after-free in monitor when privsep child is compromised. Reported by Moritz Jodeit; ok dtucker@
brcmf_cfg80211_get_station_ibss(struct brcmf_if *ifp, struct station_info *sinfo) { struct wiphy *wiphy = ifp->drvr->wiphy; struct brcmf_scb_val_le scbval; struct brcmf_pktcnt_le pktcnt; s32 err; u32 rate; u32 rssi; /* Get the current tx rate */ err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_RATE, &rate); i...
0
[ "CWE-787" ]
linux
1b5e2423164b3670e8bc9174e4762d297990deff
180,946,899,711,888,800,000,000,000,000,000,000,000
47
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:...
xsltPrecomputeStylesheet(xsltStylesheetPtr style, xmlNodePtr cur) { xmlNodePtr deleteNode, styleelem; int internalize = 0; if ((style == NULL) || (cur == NULL)) return; if ((cur->doc != NULL) && (style->dict != NULL) && (cur->doc->dict == style->dict)) internalize = 1; else ...
0
[]
libxslt
7089a62b8f133b42a2981cf1f920a8b3fe9a8caa
310,090,025,677,564,600,000,000,000,000,000,000,000
199
Crash compiling stylesheet with DTD * libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation process could get seriously wrong
static CharDriverState *qemu_chr_open_null(const char *id, ChardevBackend *backend, ChardevReturn *ret, Error **errp) { CharDriverState *chr; ChardevCommon *common = backend->u.null.d...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
202,206,209,256,714,970,000,000,000,000,000,000,000
16
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static void io_mem_free(void *ptr) { struct page *page; if (!ptr) return; page = virt_to_head_page(ptr); if (put_page_testzero(page)) free_compound_page(page);
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
79,269,127,335,648,610,000,000,000,000,000,000,000
11
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri) { zval *id, *docp = NULL; xmlDoc *newdocp; xsltStylesheetPtr sheetp; int ret, uri_len; char *uri; xsl_object *intern; id = getThis(); intern = (xsl_object *)zend_object_store_get_object(id TSRMLS_CC); sheetp = (xsltStylesheetPtr) intern->ptr; if (zend_parse_...
1
[]
php-src
1744be2d17befc69bf00033993f4081852a747d6
259,957,913,616,695,200,000,000,000,000,000,000,000
27
Fix for bug #69782
static void gen_shifti(DisasContext *s1, int op, TCGMemOp ot, int d, int c) { switch(op) { case OP_ROL: gen_rot_rm_im(s1, ot, d, c, 0); break; case OP_ROR: gen_rot_rm_im(s1, ot, d, c, 1); break; case OP_SHL: case OP_SHL1: gen_shift_rm_im(s1, ot, d, c, 0, 0); ...
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
270,908,036,991,642,430,000,000,000,000,000,000,000
26
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
static int proc_getdriver(struct usb_dev_state *ps, void __user *arg) { struct usbdevfs_getdriver gd; struct usb_interface *intf; int ret; if (copy_from_user(&gd, arg, sizeof(gd))) return -EFAULT; intf = usb_ifnum_to_if(ps->dev, gd.interface); if (!intf || !intf->dev.driver) ret = -ENODATA; else { strlcpy...
0
[ "CWE-200" ]
linux
681fef8380eb818c0b845fca5d2ab1dcbab114ee
17,027,496,285,527,300,000,000,000,000,000,000,000
18
USB: usbfs: fix potential infoleak in devio The stack object “ci” has a total size of 8 bytes. Its last 3 bytes are padding bytes which are not initialized and leaked to userland via “copy_to_user”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ecma_date_hour_from_time (ecma_number_t time) /**< time value */ { JERRY_ASSERT (!ecma_number_is_nan (time)); int32_t time_in_day = ecma_date_time_in_day_from_time (time); return (int32_t) (time_in_day / ECMA_DATE_MS_PER_HOUR); } /* ecma_date_hour_from_time */
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
236,069,951,263,907,150,000,000,000,000,000,000
8
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static int dgram_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { struct dgram_sock *ro = dgram_sk(sk); int val, len; if (level != SOL_IEEE802154) return -EOPNOTSUPP; if (get_user(len, optlen)) return -EFAULT; len = min_t(unsigned int, len, sizeof(int)); ...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
56,766,875,837,190,910,000,000,000,000,000,000,000
29
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
static int sg_get_timeout(struct request_queue *q) { return q->sg_timeout / (HZ / USER_HZ); }
0
[ "CWE-399" ]
linux-2.6
f2f1fa78a155524b849edf359e42a3001ea652c0
117,712,159,797,224,130,000,000,000,000,000,000,000
4
Enforce a minimum SG_IO timeout There's no point in having too short SG_IO timeouts, since if the command does end up timing out, we'll end up through the reset sequence that is several seconds long in order to abort the command that timed out. As a result, shorter timeouts than a few seconds simply do not make sense...
void ssh_mac_update(ssh_mac_ctx ctx, const void *data, unsigned long len) { gcry_md_write(ctx->ctx,data,len); }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
328,987,119,812,987,350,000,000,000,000,000,000,000
3
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
static MagickBooleanType EncodeImage(const ImageInfo *image_info,Image *image, const size_t data_size,ExceptionInfo *exception) { #define MaxCode(number_bits) ((one << (number_bits))-1) #define MaxHashTable 5003 #define MaxGIFBits 12UL #define MaxGIFTable (1UL << MaxGIFBits) #define GIFOutputCode(code) \ { \ /*...
0
[ "CWE-200" ]
ImageMagick
9fd10cf630832b36a588c1545d8736539b2f1fb5
285,998,488,003,389,600,000,000,000,000,000,000,000
276
https://github.com/ImageMagick/ImageMagick/issues/592
gx_dc_pattern2_save_dc( const gx_device_color * pdevc, gx_device_color_saved * psdc ) { gs_pattern2_instance_t * pinst = (gs_pattern2_instance_t *)pdevc->ccolor.pattern; psdc->type = pdevc->type; psdc->colors.pattern2.id = pinst->pattern_id; psdc->colors.pattern2.shfill = pinst->shfill; }
0
[ "CWE-704" ]
ghostpdl
693baf02152119af6e6afd30bb8ec76d14f84bbf
51,287,763,904,151,340,000,000,000,000,000,000,000
10
PS interpreter - check the Implementation of a Pattern before use Bug #700141 "Type confusion in setpattern" As the bug thread says, we were not checking that the Implementation of a pattern dictionary was a structure type, leading to a crash when we tried to treat it as one. Here we make the st_pattern1_instance an...
copy_move_directory (CopyMoveJob *copy_job, GFile *src, GFile **dest, gboolean same_fs, gboolean create_dest, char **parent_dest_fs_type, SourceInfo *sour...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
108,714,464,773,613,640,000,000,000,000,000,000,000
273
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...
static void tx3g_dump_style_nobox(FILE * trace, GF_StyleRecord *rec, u32 *shift_offset, u32 so_count) { gf_fprintf(trace, "<Style "); if (rec->startCharOffset || rec->endCharOffset) tx3g_print_char_offsets(trace, rec->startCharOffset, rec->endCharOffset, shift_offset, so_count); gf_fprintf(trace, "styles=\""); i...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
134,421,040,656,372,460,000,000,000,000,000,000,000
18
fixed #2138
int endBlockingModAutoIndex(request_rec *r) { RequestNote *note = getRequestNote(r); if (note != 0 && hasModAutoIndex()) { r->handler = note->handlerBeforeModAutoIndex; } return DECLINED; }
0
[ "CWE-59" ]
passenger
9dda49f4a3ebe9bafc48da1bd45799f30ce19566
310,460,550,960,863,100,000,000,000,000,000,000,000
7
Fixed a problem with graceful web server restarts. This problem was introduced in 4.0.6 during the attempt to fix issue #910.
int kvm_emulate_halt(struct kvm_vcpu *vcpu) { ++vcpu->stat.halt_exits; KVMTRACE_0D(HLT, vcpu, handler); if (irqchip_in_kernel(vcpu->kvm)) { vcpu->arch.mp_state = KVM_MP_STATE_HALTED; return 1; } else { vcpu->run->exit_reason = KVM_EXIT_HLT; return 0; } }
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
175,988,959,916,864,740,000,000,000,000,000,000,000
12
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
static unsigned long long __cpu_clock(int cpu) { unsigned long long now; unsigned long flags; struct rq *rq; /* * Only call sched_clock() if the scheduler has already been * initialized (some code might call cpu_clock() very early): */ if (unlikely(!scheduler_running)) return 0; local_irq_save(flags); ...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
218,803,688,785,794,100,000,000,000,000,000,000,000
21
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
static int nntp_msg_close(struct Context *ctx, struct Message *msg) { return mutt_file_fclose(&msg->fp); }
0
[ "CWE-20" ]
neomutt
9e927affe3a021175f354af5fa01d22657c20585
297,636,185,039,854,800,000,000,000,000,000,000,000
4
Add alloc fail check in nntp_fetch_headers
static inline void avg_tpel_pixels_mc10_c(uint8_t *dst, const uint8_t *src, int stride, int width, int height){ int i,j; for (i=0; i < height; i++) { for (j=0; j < width; j++) { dst[j] = (dst[j] + ((683*(2*src[j] + src[j+1] + 1)) >> 11) + 1) >> 1; } src += stride; dst += stride; ...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
286,896,208,181,716,100,000,000,000,000,000,000,000
10
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
void AOClient::pktWtCe(AreaData* area, int argc, QStringList argv, AOPacket packet) { if (is_wtce_blocked) { sendServerMessage("You are blocked from using the judge controls."); return; } if (QDateTime::currentDateTime().toSecsSinceEpoch() - last_wtce_time <= 5) return; last_wtce...
0
[ "CWE-703", "CWE-129" ]
akashi
5566cdfedddef1f219aee33477d9c9690bf2f78b
56,546,807,258,898,090,000,000,000,000,000,000,000
12
Fix out of bounds crash on evidence
static bool __head check_la57_support(unsigned long physaddr) { return false; }
0
[ "CWE-703" ]
linux
96e8fc5818686d4a1591bb6907e7fdb64ef29884
187,250,512,886,607,570,000,000,000,000,000,000,000
4
x86/xen: Use clear_bss() for Xen PV guests Instead of clearing the bss area in assembly code, use the clear_bss() function. This requires to pass the start_info address as parameter to xen_start_kernel() in order to avoid the xen_start_info being zeroed again. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-of...
addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId, const XML_Char *uri, BINDING **bindingsPtr) { static const XML_Char xmlNamespace[] = {ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, ...
1
[ "CWE-668" ]
libexpat
a2fe525e660badd64b6c557c2b1ec26ddc07f6e4
271,163,481,122,620,100,000,000,000,000,000,000,000
137
lib: Protect against malicious namespace declarations (CVE-2022-25236)
OPJ_BOOL opj_j2k_set_decoded_components(opj_j2k_t *p_j2k, OPJ_UINT32 numcomps, const OPJ_UINT32* comps_indices, opj_event_mgr_t * p_manager) { OPJ_UINT32 i; OPJ_BOOL* already_mapped; if (...
0
[ "CWE-20" ]
openjpeg
73fdf28342e4594019af26eb6a347a34eceb6296
16,171,148,331,746,542,000,000,000,000,000,000,000
58
opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only)
static inline void flags_to_str_internal(uint32_t flags, char *flagstr) { size_t i, len = 0; size_t map_size; char *p; p = flagstr; memset(p, 0, FLAGMAPSTR_MAXLEN); map_size = sizeof(msgflagmap) / sizeof(struct MsgFlagMap); for (i = 0; i < map_size && len < FLAGMAPSTR_MAXLEN; i++) { ...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
281,839,941,336,614,100,000,000,000,000,000,000,000
23
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
test_parse_content_disposition (void) { unsigned i; static const struct { const char *hdrval; const char *filename; bool result; } test_array[] = { { "filename=\"file.ext\"", "file.ext", true }, { "attachment; filename=\"file.ext\"", "file.ext", true }, { "attachment; filename=\"file.ext\"...
0
[ "CWE-119" ]
wget
d892291fb8ace4c3b734ea5125770989c215df3f
81,545,211,258,431,570,000,000,000,000,000,000,000
38
Fix stack overflow in HTTP protocol handling (CVE-2017-13089) * src/http.c (skip_short_body): Return error on negative chunk size Reported-by: Antti Levomäki, Christian Jalio, Joonas Pihlaja from Forcepoint Reported-by: Juhani Eronen from Finnish National Cyber Security Centre
static bool too_many_pipe_buffers_soft(struct user_struct *user) { return pipe_user_pages_soft && atomic_long_read(&user->pipe_bufs) >= pipe_user_pages_soft; }
0
[ "CWE-399" ]
linux
759c01142a5d0f364a462346168a56de28a80f52
208,586,679,899,182,700,000,000,000,000,000,000,000
5
pipe: limit the per-user amount of pages allocated in pipes On no-so-small systems, it is possible for a single process to cause an OOM condition by filling large pipes with data that are never read. A typical process filling 4000 pipes with 1 MB of data will use 4 GB of memory. On small systems it may be tricky to se...