func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
reallocarray(void *p, size_t n, size_t m) { if (m && n > SIZE_MAX / m) { errno = ENOMEM; return NULL; } return realloc(p, n * m); }
0
[ "CWE-476", "CWE-284" ]
samurai
e84b6d99c85043fa1ba54851ee500540ec206918
237,384,978,945,607,570,000,000,000,000,000,000,000
8
util: Check for NULL string in writefile This check was there previously, but was removed in f549b757 with the addition of a check during parse that every rule has rspfile if and only if it has rspfile_content. However, this fails to consider the possibility of those variables coming from the edge or global environmen...
void WebContents::GrantOriginAccess(const GURL& url) { content::ChildProcessSecurityPolicy::GetInstance()->GrantCommitOrigin( web_contents()->GetMainFrame()->GetProcess()->GetID(), url::Origin::Create(url)); }
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
182,017,686,633,757,460,000,000,000,000,000,000,000
5
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
static int __must_push_back(struct multipath *m) { return (m->queue_if_no_path != m->saved_queue_if_no_path && dm_noflush_suspending(m->ti)); }
0
[ "CWE-284", "CWE-264" ]
linux
ec8013beddd717d1740cfefb1a9b900deef85462
133,570,179,457,347,700,000,000,000,000,000,000,000
5
dm: do not forward ioctls from logical volumes to the underlying device A logical volume can map to just part of underlying physical volume. In this case, it must be treated like a partition. Based on a patch from Alasdair G Kergon. Cc: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Paolo ...
extern "C" void enc_set_dispatch_syscall(syscall_dispatch_callback callback) { global_syscall_callback = callback; }
0
[ "CWE-125" ]
asylo
90d7619e9dd99bcdb6cd28c7649d741d254d9a1a
276,845,005,921,981,220,000,000,000,000,000,000,000
3
Add sysno check in MessageReader The sysno in MessageReader is interpreted from the Message header passed from the host. A malicious Message header may provide a modified sysno to bypass the validation, and overwrites enclave memory. This change adds a check for sysno to make sure it matches the expected value. This ...
void zrevrangebyscoreCommand(client *c) { genericZrangebyscoreCommand(c,1); }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
194,523,379,918,615,500,000,000,000,000,000,000,000
3
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
TEST(BitTestMatchExpression, DoesNotMatchBinary2) { BSONArray bas = BSON_ARRAY(21 << 22 << 23 << 24 << 25); BSONArray bac = BSON_ARRAY(20 << 23 << 21); std::vector<uint32_t> bitPositionsSet = bsonArrayToBitPositions(bas); std::vector<uint32_t> bitPositionsClear = bsonArrayToBitPositions(bac); BSONO...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
276,481,503,870,426,000,000,000,000,000,000,000,000
33
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static apr_byte_t oidc_restore_proto_state(request_rec *r, oidc_cfg *c, const char *state, json_t **proto_state) { oidc_debug(r, "enter"); /* clean expired state cookies to avoid pollution */ oidc_clean_expired_state_cookies(r, c); const char *cookieName = oidc_get_state_cookie_name(r, state); /* get the sta...
0
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
85,482,806,249,884,280,000,000,000,000,000,000,000
57
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
gsm_xsmp_client_new (IceConn ice_conn) { GsmXSMPClient *xsmp; xsmp = g_object_new (GSM_TYPE_XSMP_CLIENT, "ice-connection", ice_conn, NULL); return GSM_CLIENT (xsmp); }
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
273,656,155,650,059,100,000,000,000,000,000,000,000
10
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) { Image *image, *image2=NULL, *rotated_image; register Quantum *q; unsigned int status; MATHeader MATLAB_HDR; size_t size; size_t CellType; QuantumInfo *quantum_info; ImageInfo *clone_info; int i; ssize_t ldblk; u...
1
[ "CWE-772", "CWE-401" ]
ImageMagick
79e5dbcdd1fc2f714f9bae548bc55d5073f3ed20
72,024,865,733,456,730,000,000,000,000,000,000,000
500
...
int dev_vprintk_emit(int level, const struct device *dev, const char *fmt, va_list args) { char hdr[128]; size_t hdrlen; hdrlen = create_syslog_header(dev, hdr, sizeof(hdr)); return vprintk_emit(0, level, hdrlen ? hdr : NULL, hdrlen, fmt, args); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
210,235,479,476,488,930,000,000,000,000,000,000,000
10
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static int vivid_fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) { struct vivid_dev *dev = (struct vivid_dev *) info->par; dprintk(dev, 1, "vivid_fb_check_var\n"); return _vivid_fb_check_var(var, dev); }
0
[ "CWE-200" ]
linux-next
eda98796aff0d9bf41094b06811f5def3b4c333c
310,709,112,481,419,720,000,000,000,000,000,000,000
7
[media] media/vivid-osd: fix info leak in ioctl The vivid_fb_ioctl() code fails to initialize the 16 _reserved bytes of struct fb_vblank after the ->hcount member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Salva Peiró <speirofr@gmail.com> Signed-off-by: Hans Verkuil...
void free_all_replace(){ free_replace(); free_replace_regex(); free_replace_column(); }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
329,915,056,383,564,370,000,000,000,000,000,000,000
5
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
Magick::Image Magick::Image::mask(const PixelMask type) const { MagickCore::Image *image; GetPPException; image = GetImageMask(constImage(),type,exceptionInfo); ThrowImageException; if (image == (MagickCore::Image *) NULL) return(Magick::Image()); else return(Magick::Image(image)); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
33,920,978,263,523,850,000,000,000,000,000,000,000
14
Added missing return to avoid use after free.
u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags) { /* * 7 extra bytes are necessary to achieve proper functionality * of implement() working on 8 byte chunks */ int len = hid_report_len(report) + 7; return kmalloc(len, flags); }
0
[ "CWE-125" ]
linux
50220dead1650609206efe91f0cc116132d59b3f
293,313,721,135,634,930,000,000,000,000,000,000,000
11
HID: core: prevent out-of-bound readings Plugging a Logitech DJ receiver with KASAN activated raises a bunch of out-of-bound readings. The fields are allocated up to MAX_USAGE, meaning that potentially, we do not have enough fields to fit the incoming values. Add checks and silence KASAN. Signed-off-by: Benjamin Tis...
connection_edge_flushed_some(edge_connection_t *conn) { switch (conn->base_.state) { case AP_CONN_STATE_OPEN: if (! conn->base_.linked) { note_user_activity(approx_time()); } FALLTHROUGH; case EXIT_CONN_STATE_OPEN: sendme_connection_edge_consider_sending(conn); break; ...
0
[ "CWE-532" ]
tor
80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9
82,571,434,612,704,240,000,000,000,000,000,000,000
15
Log warning when connecting to soon-to-be-deprecated v2 onions.
int X509_PURPOSE_set(int *p, int purpose) { if(X509_PURPOSE_get_by_id(purpose) == -1) { X509V3err(X509V3_F_X509_PURPOSE_SET, X509V3_R_INVALID_PURPOSE); return 0; } *p = purpose; return 1; }
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
133,727,678,271,797,850,000,000,000,000,000,000,000
9
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
static void qxl_exit_vga_mode(PCIQXLDevice *d) { if (d->mode != QXL_MODE_VGA) { return; } trace_qxl_exit_vga_mode(d->id); graphic_console_set_hwops(d->ssd.dcl.con, &qxl_ops, d); update_displaychangelistener(&d->ssd.dcl, GUI_REFRESH_INTERVAL_IDLE); vga_dirty_log_stop(&d->vga); qxl_des...
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
185,804,945,324,400,700,000,000,000,000,000,000,000
11
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
nfsd_svc(int nrservs, struct net *net) { int error; bool nfsd_up_before; struct nfsd_net *nn = net_generic(net, nfsd_net_id); mutex_lock(&nfsd_mutex); dprintk("nfsd: creating service\n"); nrservs = max(nrservs, 0); nrservs = min(nrservs, NFSD_MAXSERVS); error = 0; if (nrservs == 0 && nn->nfsd_serv == NULL) ...
0
[ "CWE-20" ]
linux
e6838a29ecb484c97e4efef9429643b9851fba6e
99,899,342,108,429,650,000,000,000,000,000,000,000
43
nfsd: check for oversized NFSv2/v3 arguments A client can append random data to the end of an NFSv2 or NFSv3 RPC call without our complaining; we'll just stop parsing at the end of the expected data and ignore the rest. Encoded arguments and replies are stored together in an array of pages, and if a call is too large...
void IDLParserErrorContext::appendGenericCommandArguments( const BSONObj& commandPassthroughFields, const std::vector<StringData>& knownFields, BSONObjBuilder* builder) { for (const auto& element : commandPassthroughFields) { StringData name = element.fieldNameStringData(); // Include ...
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
273,153,193,440,836,560,000,000,000,000,000,000,000
15
SERVER-38275 ban find explain with UUID
theme_adium_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { EmpathyThemeAdium *theme = EMPATHY_THEME_ADIUM (object); EmpathyThemeAdiumPriv *priv = GET_PRIV (object); switch (param_id) { case PROP_ADIUM_DATA: g_assert (priv->data == NULL); p...
0
[ "CWE-79" ]
empathy
739aca418457de752be13721218aaebc74bd9d36
229,041,121,909,157,540,000,000,000,000,000,000,000
21
theme_adium_append_message: escape alias before displaying it Not doing so can lead to nasty HTML injection from hostile users. https://bugzilla.gnome.org/show_bug.cgi?id=662035
rfbGetTightClientData(rfbClientPtr cl) { rfbTightClientPtr rtcp = (rfbTightClientPtr) rfbGetExtensionClientData(cl, &tightVncFileTransferExtension); if(rtcp == NULL) { rfbLog("Extension client data is null, closing the connection !\n"); rfbCloseClient(cl); } return rtcp; }
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
144,890,253,143,733,460,000,000,000,000,000,000,000
12
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
void mutt_set_mtime (const char* from, const char* to) { struct utimbuf utim; struct stat st; if (stat (from, &st) != -1) { utim.actime = st.st_mtime; utim.modtime = st.st_mtime; utime (to, &utim); } }
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
230,199,179,073,875,980,000,000,000,000,000,000,000
12
use a 64-bit random value in temporary filenames. closes #3158
bool isValidEncodedBinaryContent( const std::string& s) { if (s.size() % 4 != 0) { return false; } bool equalSeen = false; for (auto it = s.begin(); it != s.end(); it++) { if (*it == '=') { equalSeen = true; } else if (equalSeen || !isValidEncodedBinaryContentChar(*it)) { return fals...
0
[ "CWE-787" ]
proxygen
2f07985bef9fbae124cc63e5c0272e32da4fdaec
182,412,590,742,892,460,000,000,000,000,000,000,000
18
Fix SEGV in StructuredHeaders::decodeBase64 Summary: The existing code can potentially cause a SEGV due to an out of bounds write. This fixes CVE-2019-11921. Reviewed By: knekritz Differential Revision: D12983120 fbshipit-source-id: 1d48063595c8d518fd8afcbc941de260af7e37fd
rad_create_request(struct rad_handle *h, int code) { int i; h->request[POS_CODE] = code; h->request[POS_IDENT] = ++h->ident; /* Create a random authenticator */ for (i = 0; i < LEN_AUTH; i += 2) { long r; TSRMLS_FETCH(); r = php_rand(TSRMLS_C); h->request[POS_AUTH+i] = (unsigned char) r; h->request[PO...
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
201,308,735,075,757,830,000,000,000,000,000,000,000
19
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...
static int __init i8042_init(void) { struct platform_device *pdev; int err; dbg_init(); err = i8042_platform_init(); if (err) return err; err = i8042_controller_check(); if (err) goto err_platform_exit; pdev = platform_create_bundle(&i8042_driver, i8042_probe, NULL, 0, NULL, 0); if (IS_ERR(pdev)) { e...
0
[ "CWE-476" ]
linux
340d394a789518018f834ff70f7534fc463d3226
136,335,456,149,037,900,000,000,000,000,000,000,000
30
Input: i8042 - fix crash at boot time The driver checks port->exists twice in i8042_interrupt(), first when trying to assign temporary "serio" variable, and second time when deciding whether it should call serio_interrupt(). The value of port->exists may change between the 2 checks, and we may end up calling serio_int...
static bool set_nr_and_not_polling(struct task_struct *p) { set_tsk_need_resched(p); return true; }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
208,784,708,949,517,670,000,000,000,000,000,000,000
5
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static uint64_t pxa2xx_rtc_read(void *opaque, hwaddr addr, unsigned size) { PXA2xxRTCState *s = (PXA2xxRTCState *) opaque; switch (addr) { case RTTR: return s->rttr; case RTSR: return s->rtsr; case RTAR: return s->rtar; case RDAR1: ...
0
[ "CWE-119" ]
qemu
caa881abe0e01f9931125a0977ec33c5343e4aa7
258,483,283,165,290,140,000,000,000,000,000,000,000
48
pxa2xx: avoid buffer overrun on incoming migration CVE-2013-4533 s->rx_level is read from the wire and used to determine how many bytes to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the length of s->rx_fifo[] the buffer can be overrun with arbitrary data from the wire. Fix this by validating rx_leve...
static void vmcs12_save_pending_event(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { u32 idt_vectoring; unsigned int nr; if (vcpu->arch.exception.injected) { nr = vcpu->arch.exception.nr; idt_vectoring = nr | VECTORING_INFO_VALID_MASK; if (kvm_exception_is_soft(nr)) { vmcs12->vm_exit_instructio...
0
[ "CWE-863" ]
kvm
acff78477b9b4f26ecdf65733a4ed77fe837e9dc
47,933,287,769,383,000,000,000,000,000,000,000,000
41
KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887) The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a result, we discovered the potential for a buggy or malicious L1 to get access to L0's x2APIC MSRs, via an L2, as follo...
fst_set_iface(struct fst_card_info *card, struct fst_port_info *port, struct ifreq *ifr) { sync_serial_settings sync; int i; if (ifr->ifr_settings.size != sizeof (sync)) { return -ENOMEM; } if (copy_from_user (&sync, ifr->ifr_settings.ifs_ifsu.sync, sizeof (sync))) { return -EFAULT; } if (sync...
0
[ "CWE-399" ]
linux
96b340406724d87e4621284ebac5e059d67b2194
23,495,120,430,694,580,000,000,000,000,000,000,000
73
farsync: fix info leak in ioctl The fst_get_iface() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. ...
add_compile_string_length(UChar* s ARG_UNUSED, int mb_len, int str_len, regex_t* reg ARG_UNUSED, int ignore_case) { int len; int op = select_str_opcode(mb_len, str_len, ignore_case); len = SIZE_OPCODE; if (op == OP_EXACTMBN) len += SIZE_LENGTH; if (IS_NEED_STR_LEN_OP_EXACT(op)) ...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
255,504,022,753,524,500,000,000,000,000,000,000,000
15
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
static int walk_pgd_range(unsigned long addr, unsigned long end, struct mm_walk *walk) { pgd_t *pgd; unsigned long next; int err = 0; pgd = pgd_offset(walk->mm, addr); do { next = pgd_addr_end(addr, end); if (pgd_none_or_clear_bad(pgd)) { if (walk->pte_hole) err = walk->pte_hole(addr, next, walk);...
0
[ "CWE-200", "CWE-703" ]
linux
373c4557d2aa362702c4c2d41288fb1e54990b7c
192,689,350,511,614,100,000,000,000,000,000,000,000
25
mm/pagewalk.c: report holes in hugetlb ranges This matters at least for the mincore syscall, which will otherwise copy uninitialized memory from the page allocator to userspace. It is probably also a correctness error for /proc/$pid/pagemap, but I haven't tested that. Removing the `walk->hugetlb_entry` condition in ...
static int wcd9335_codec_enable_dec(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kc, int event) { struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); unsigned int decimator; char *dec_adc_mux_name = NULL; char *widget_name = NULL; char *wname; int ret = 0, amic_n; u16 tx_vol_ctl_reg, pwr...
0
[]
sound
a54988113985ca22e414e132054f234fc8a92604
268,684,834,129,060,300,000,000,000,000,000,000,000
132
wcd9335: fix a incorrect use of kstrndup() In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup(). However, according to doc: "Note: Use kmemdup_nul() instead if the size is known exactly." So we should use kmemdup_nul() here instead of kstrndup(). Signed-off-by: Gen Zhang <blackgod016574@gmail.com> ...
check_setuid(void) { if (getuid() && !geteuid()) { printf("This mount.cifs program has been built with the " "ability to run as a setuid root program disabled.\n" "mount.cifs has not been well audited for security " "holes. Therefore the Samba team does not recommend " "installing it as a setuid root pro...
0
[ "CWE-59" ]
samba
a0c31ec1c8d1220a5884e40d9ba6b191a04a24d5
3,906,085,102,117,260,000,000,000,000,000,000,000
13
mount.cifs: don't allow it to be run as setuid root program mount.cifs has been the subject of several "security" fire drills due to distributions installing it as a setuid root program. This program has not been properly audited for security and the Samba team highly recommends that it not be installed as a setuid ro...
static pj_status_t decode_uint64_attr(pj_pool_t *pool, const pj_uint8_t *buf, const pj_stun_msg_hdr *msghdr, void **p_attr) { pj_stun_uint64_attr *attr; PJ_UNUSED_ARG(msghdr); /* Create the attribute */ attr = PJ_POOL_ZALLOC_T(pool, pj_stun_uint64_attr); GETATTRHDR...
0
[ "CWE-191" ]
pjproject
15663e3f37091069b8c98a7fce680dc04bc8e865
291,298,291,274,815,600,000,000,000,000,000,000,000
23
Merge pull request from GHSA-2qpg-f6wf-w984
static void dn_dev_check_default(struct net_device *dev) { spin_lock(&dndev_lock); if (dev == decnet_default_device) { decnet_default_device = NULL; } else { dev = NULL; } spin_unlock(&dndev_lock); if (dev) dev_put(dev); }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
191,466,872,573,528,500,000,000,000,000,000,000,000
13
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
long lsqrt (long n) { long result = (long) sqrt ((double) n); return result; }
0
[ "CWE-119" ]
php-src
e7f2356665c2569191a946b6fc35b437f0ae1384
91,998,677,324,421,650,000,000,000,000,000,000,000
5
Fix #66387: Stack overflow with imagefilltoborder The stack overflow is caused by the recursive algorithm in combination with a very large negative coordinate passed to gdImageFillToBorder(). As there is already a clipping for large positive coordinates to the width and height of the image, it seems to be consequent t...
Formattable::adoptArray(Formattable* array, int32_t count) { dispose(); fType = kArray; fValue.fArrayAndCount.fArray = array; fValue.fArrayAndCount.fCount = count; }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
317,129,436,643,845,180,000,000,000,000,000,000,000
7
ICU-20246 Fixing another integer overflow in number parsing.
static inline void ok_jpg_consume_bits(ok_jpg_decoder *decoder, int num_bits) { decoder->input_buffer_bit_count -= num_bits; }
0
[ "CWE-787" ]
ok-file-formats
a9cc1711dd4ed6a215038f1c5c03af0ef52c3211
270,404,238,748,474,580,000,000,000,000,000,000,000
3
ok_jpg: Fix invalid DHT (#11)
static void vrend_shader_dump(struct vrend_shader *shader) { const char *prefix = pipe_shader_to_prefix(shader->sel->type); if (shader->sel->tmp_buf) vrend_printf("%s: %d TGSI:\n%s\n", prefix, shader->id, shader->sel->tmp_buf); vrend_printf("%s: %d GLSL:\n", prefix, shader->id); strarray_dump_with_li...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
280,499,653,361,731,300,000,000,000,000,000,000,000
10
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
GF_Box *saiz_box_new() { ISOM_DECL_BOX_ALLOC(GF_SampleAuxiliaryInfoSizeBox, GF_ISOM_BOX_TYPE_SAIZ); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
99,066,775,579,824,130,000,000,000,000,000,000,000
5
fixed #2255
bool kvm_inject_emulated_page_fault(struct kvm_vcpu *vcpu, struct x86_exception *fault) { struct kvm_mmu *fault_mmu; WARN_ON_ONCE(fault->vector != PF_VECTOR); fault_mmu = fault->nested_page_fault ? vcpu->arch.mmu : vcpu->arch.walk_mmu; /* * Invalidate the TLB entry for the faulting address, ...
0
[ "CWE-476" ]
linux
fee060cd52d69c114b62d1a2948ea9648b5131f9
232,065,658,245,002,500,000,000,000,000,000,000,000
39
KVM: x86: avoid calling x86 emulator without a decoded instruction Whenever x86_decode_emulated_instruction() detects a breakpoint, it returns the value that kvm_vcpu_check_breakpoint() writes into its pass-by-reference second argument. Unfortunately this is completely bogus because the expected outcome of x86_decode...
static void h2_do_shutw(struct h2s *h2s) { struct h2c *h2c = h2s->h2c; struct wait_event *sw = &h2s->wait_event; if (h2s->st == H2_SS_HLOC || h2s->st == H2_SS_ERROR || h2s->st == H2_SS_CLOSED) return; if (h2s->flags & H2_SF_HEADERS_SENT) { /* we can cleanly close using an empty data frame only after headers *...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
134,072,164,685,695,410,000,000,000,000,000,000,000
56
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
int EncryptionUtil::encrypt(EncryptionMode mode, const unsigned char* source, uint32_t source_length, const unsigned char* key, uint32_t key_length, const char* iv_str, bool padding, unsigned char* encrypt) { const EVP_CIPHER* cipher = get_evp_type(mode); ...
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
304,371,626,811,386,200,000,000,000,000,000,000,000
33
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
static void tcp_measure_rcv_mss(struct sock *sk, const struct sk_buff *skb) { struct inet_connection_sock *icsk = inet_csk(sk); const unsigned int lss = icsk->icsk_ack.last_seg_size; unsigned int len; icsk->icsk_ack.last_seg_size = 0; /* skb->len may jitter because of SACKs, even if peer * sends good full-size...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
270,845,588,333,409,470,000,000,000,000,000,000,000
50
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
dns_zone_getidlein(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone)); return (zone->idlein); }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
41,115,944,655,407,886,000,000,000,000,000,000,000
5
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
static PHP_INI_MH(OnSetPrecision) { zend_long i; ZEND_ATOL(i, ZSTR_VAL(new_value)); if (i >= 0) { EG(precision) = i; return SUCCESS; } else { return FAILURE; } }
0
[]
php-src
9a07245b728714de09361ea16b9c6fcf70cb5685
250,736,614,098,264,450,000,000,000,000,000,000,000
12
Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash
static int channel_send_eof(LIBSSH2_CHANNEL *channel) { LIBSSH2_SESSION *session = channel->session; unsigned char packet[5]; /* packet_type(1) + channelno(4) */ int rc; _libssh2_debug(session, LIBSSH2_TRACE_CONN, "Sending EOF on channel %lu/%lu", channel->local.id, channel->remot...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
190,904,009,816,243,900,000,000,000,000,000,000,000
24
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
g_tls_connection_base_is_dtls (GTlsConnectionBase *tls) { GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls); return priv->base_socket != NULL; }
0
[ "CWE-295" ]
glib-networking
29513946809590c4912550f6f8620468f9836d94
252,538,542,286,092,170,000,000,000,000,000,000,000
6
Return bad identity error if identity is unset When the server-identity property of GTlsClientConnection is unset, the documentation sasy we need to fail the certificate verification with G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise, it's easy for applications to fail to specify server identity....
find_alternate_tgs(kdc_realm_t *kdc_active_realm, krb5_principal princ, krb5_db_entry **server_ptr, const char **status) { krb5_error_code retval; krb5_principal *plist = NULL, *pl2; krb5_data tmp; krb5_db_entry *server = NULL; *server_ptr = NULL; assert(is_cross_tgs_principa...
0
[ "CWE-20" ]
krb5
4c023ba43c16396f0d199e2df1cfa59b88b62acc
306,643,111,538,644,420,000,000,000,000,000,000,000
47
KDC null deref due to referrals [CVE-2013-1417] An authenticated remote client can cause a KDC to crash by making a valid TGS-REQ to a KDC serving a realm with a single-component name. The process_tgs_req() function dereferences a null pointer because an unusual failure condition causes a helper function to return suc...
QPDFObjectHandle::TokenFilter::writeToken(QPDFTokenizer::Token const& token) { std::string value = token.getRawValue(); write(value.c_str(), value.length()); }
0
[ "CWE-399", "CWE-674" ]
qpdf
b4d6cf6836ce025ba1811b7bbec52680c7204223
155,419,372,529,563,190,000,000,000,000,000,000,000
5
Limit depth of nesting in direct objects (fixes #202) This fixes CVE-2018-9918.
static int clgi_interception(struct vcpu_svm *svm) { int ret; if (nested_svm_check_permissions(svm)) return 1; ret = kvm_skip_emulated_instruction(&svm->vcpu); disable_gif(svm); /* After a CLGI no interrupts should come */ if (!kvm_vcpu_apicv_active(&svm->vcpu)) svm_clear_vintr(svm); return ret; }
0
[ "CWE-835" ]
linux
e72436bc3a5206f95bb384e741154166ddb3202e
73,403,548,654,382,810,000,000,000,000,000,000,000
17
KVM: SVM: avoid infinite loop on NPF from bad address When a nested page fault is taken from an address that does not have a memslot associated to it, kvm_mmu_do_page_fault returns RET_PF_EMULATE (via mmu_set_spte) and kvm_mmu_page_fault then invokes svm_need_emulation_on_page_fault. The default answer there is to re...
uint8_t werr_to_dns_err(WERROR werr) { if (W_ERROR_EQUAL(WERR_OK, werr)) { return DNS_RCODE_OK; } else if (W_ERROR_EQUAL(DNS_ERR(FORMAT_ERROR), werr)) { return DNS_RCODE_FORMERR; } else if (W_ERROR_EQUAL(DNS_ERR(SERVER_FAILURE), werr)) { return DNS_RCODE_SERVFAIL; } else if (W_ERROR_EQUAL(DNS_ERR(NAME_ERROR),...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
109,207,997,378,770,220,000,000,000,000,000,000,000
32
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
void prhd_box_del(GF_Box *s) { gf_free(s);
0
[ "CWE-476", "CWE-787" ]
gpac
b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8
127,234,853,587,209,360,000,000,000,000,000,000,000
4
fixed #1757
mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) { unsigned int hook; /* No recursion; use packet counter to save back ptrs (reset to 0 as we leave), and comefrom to save source hook bitmask */ for (hook = 0; hook < NF_INET_NUMHOOKS; hook++) { unsigned int p...
0
[ "CWE-284", "CWE-264" ]
linux
ce683e5f9d045e5d67d1312a42b359cb2ab2a13c
85,947,973,400,315,510,000,000,000,000,000,000,000
115
netfilter: x_tables: check for bogus target offset We're currently asserting that targetoff + targetsize <= nextoff. Extend it to also check that targetoff is >= sizeof(xt_entry). Since this is generic code, add an argument pointing to the start of the match/target, we can then derive the base structure size from the...
R_API RBinJavaCPTypeObj *r_bin_java_methodref_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) { ut8 tag = buffer[0]; RBinJavaCPTypeObj *obj = NULL; int quick_check = 0; quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_METHODREF, tag, sz, "MethodRef"); if (quick_check > 0) { return obj; } obj = (RBinJavaCPTyp...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
173,100,955,778,188,970,000,000,000,000,000,000,000
19
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static int adis_update_scan_mode_burst(struct iio_dev *indio_dev, const unsigned long *scan_mask) { struct adis *adis = iio_device_get_drvdata(indio_dev); unsigned int burst_length; u8 *tx; /* All but the timestamp channel */ burst_length = (indio_dev->num_channels - 1) * sizeof(u16); burst_length += adis->burs...
1
[ "CWE-400", "CWE-401" ]
linux
9c0530e898f384c5d279bfcebd8bb17af1105873
119,923,245,273,073,470,000,000,000,000,000,000,000
36
iio: imu: adis16400: fix memory leak In adis_update_scan_mode_burst, if adis->buffer allocation fails release the adis->xfer. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
void PreloadCudnnLibrary(cudnnStatus_t (*version_check_fn)(), absl::string_view sub_library) { cudnnStatus_t status = version_check_fn(); if (status != CUDNN_STATUS_SUCCESS) { VLOG(1) << "Could not pre-initialize cuDNN sub-library " << sub_library << ". Error: " << cudnnGet...
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
164,778,959,280,088,980,000,000,000,000,000,000,000
8
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
int sr_tray_move(struct cdrom_device_info *cdi, int pos) { Scsi_CD *cd = cdi->handle; struct packet_command cgc; memset(&cgc, 0, sizeof(struct packet_command)); cgc.cmd[0] = GPCMD_START_STOP_UNIT; cgc.cmd[4] = (pos == 0) ? 0x03 /* close */ : 0x02 /* eject */ ; cgc.data_direction = DMA_NONE; cgc.timeout = IOCTL_...
0
[ "CWE-119", "CWE-787" ]
linux
f7068114d45ec55996b9040e98111afa56e010fe
145,228,871,710,982,960,000,000,000,000,000,000,000
12
sr: pass down correctly sized SCSI sense buffer We're casting the CDROM layer request_sense to the SCSI sense buffer, but the former is 64 bytes and the latter is 96 bytes. As we generally allocate these on the stack, we end up blowing up the stack. Fix this by wrapping the scsi_execute() call with a properly sized s...
GetLongAdLsn ( IN UDF_VOLUME_INFO *Volume, IN UDF_LONG_ALLOCATION_DESCRIPTOR *LongAd, OUT UINT64 *Lsn ) { UDF_PARTITION_DESCRIPTOR *PartitionDesc; PartitionDesc = GetPdFromLongAd (Volume, LongAd); if (PartitionDesc == NULL) { DEBUG (( DEBUG...
0
[]
edk2
b9ae1705adfdd43668027a25a2b03c2e81960219
153,100,454,926,669,170,000,000,000,000,000,000,000
24
MdeModulePkg/UdfDxe: Refine boundary checks for file/path name string REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828 The commit refines the boundary checks for file/path name string to prevent possible buffer overrun. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: ...
int sm_resume_sweeps(p_fm_config_conx_hdlt hdl, fm_mgr_type_t mgr, int argc, char *argv[]) { fm_mgr_config_errno_t res; fm_msg_ret_code_t ret_code; if((res = fm_mgr_simple_query(hdl, FM_ACT_GET, FM_DT_RESUME_SWEEPS, mgr, 0, NULL, &ret_code)) != FM_CONF_OK) { fprintf(stderr, "sm_pause_sweeps: Failed to retrieve ...
0
[ "CWE-362" ]
opa-fm
c5759e7b76f5bf844be6c6641cc1b356bbc83869
152,069,974,129,896,460,000,000,000,000,000,000,000
16
Fix scripts and code that use well-known tmp files.
int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle, struct inode *inode, struct ext4_ext_path *path) { int err; WARN_ON(!rwsem_is_locked(&EXT4_I(inode)->i_data_sem)); if (path->p_bh) { ext4_extent_block_csum_set(inode, ext_block_hdr(path->p_bh)); /* path points to block */ err ...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
11,758,868,899,767,730,000,000,000,000,000,000,000
17
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
static void asf_reset_header(AVFormatContext *s) { ASFContext *asf = s->priv_data; ASFStream *asf_st; int i; asf->packet_size_left = 0; asf->packet_flags = 0; asf->packet_property = 0; asf->packet_timestamp = 0; asf->packet_segsizetype = 0; asf->packet_se...
0
[ "CWE-400", "CWE-399", "CWE-703" ]
FFmpeg
afc9c683ed9db01edb357bc8c19edad4282b3a97
128,904,814,328,386,480,000,000,000,000,000,000,000
32
avformat/asfdec: Fix DoS in asf_build_simple_index() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
export_pamenv (void) { char **env; /* This is a copy but don't care to free as we exec later anyways. */ env = pam_getenvlist (pamh); while (env && *env) { if (putenv (*env) != 0) err (EXIT_FAILURE, NULL); env++; } }
0
[ "CWE-362" ]
util-linux
dffab154d29a288aa171ff50263ecc8f2e14a891
256,065,245,885,412,150,000,000,000,000,000,000,000
13
su: properly clear child PID Reported-by: Tobias Stöckmann <tobias@stoeckmann.org> Signed-off-by: Karel Zak <kzak@redhat.com>
int hci_uart_init_ready(struct hci_uart *hu) { if (!test_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags)) return -EALREADY; schedule_work(&hu->init_ready); return 0; }
0
[ "CWE-416" ]
linux
56897b217a1d0a91c9920cb418d6b3fe922f590a
198,526,899,984,133,740,000,000,000,000,000,000,000
9
Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto() task A: task B: hci_uart_set_proto flush_to_ldisc - p->open(hu) -> h5_open //alloc h5 - receive_buf - set_bit HCI_UART_PROTO_READY - tty_port_default_receive_buf - hci_uar...
mmcl_alt_merge(MinMaxCharLen* to, MinMaxCharLen* alt) { if (to->min > alt->min) { to->min = alt->min; to->min_is_sure = alt->min_is_sure; } else if (to->min == alt->min) { if (alt->min_is_sure != FALSE) to->min_is_sure = TRUE; } if (to->max < alt->max) to->max = alt->max; }
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
93,354,220,205,845,650,000,000,000,000,000,000,000
13
#207: Out-of-bounds write
int HevcUnit::deserialize() { m_reader.setBuffer(m_nalBuffer, m_nalBuffer + m_nalBufferLen); try { m_reader.skipBit(); nal_unit_type = m_reader.getBits(6); nuh_layer_id = m_reader.getBits(6); nuh_temporal_id_plus1 = m_reader.getBits(3); if (nuh_temporal_id_plus1 == 0 ...
0
[ "CWE-22" ]
tsMuxer
3763dd34755a8944d903aa19578fa22cd3734165
83,971,226,041,786,540,000,000,000,000,000,000,000
19
Fix Buffer Overflow Fixes issue #509.
_equalRangeTblEntry(const RangeTblEntry *a, const RangeTblEntry *b) { COMPARE_SCALAR_FIELD(rtekind); COMPARE_SCALAR_FIELD(relid); COMPARE_SCALAR_FIELD(relkind); COMPARE_NODE_FIELD(subquery); COMPARE_SCALAR_FIELD(security_barrier); COMPARE_SCALAR_FIELD(jointype); COMPARE_NODE_FIELD(joinaliasvars); COMPARE_NODE_F...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
36,415,873,628,191,734,000,000,000,000,000,000,000
31
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 void nr_set_lockdep_key(struct net_device *dev) { lockdep_set_class(&dev->addr_list_lock, &nr_netdev_addr_lock_key); netdev_for_each_tx_queue(dev, nr_set_lockdep_one, NULL); }
0
[ "CWE-200" ]
linux-2.6
f6b97b29513950bfbf621a83d85b6f86b39ec8db
89,196,988,500,212,120,000,000,000,000,000,000,000
5
netrom: Fix nr_getname() leak nr_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
void set_changes_to_non_trans_temp_table() { changes_to_non_trans_temp_table_flag= TRUE; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
7,879,017,474,803,846,000,000,000,000,000,000,000
4
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
CImgList<T>& assign(const CImg<t>& img, const bool is_shared=false) { assign(1); _data[0].assign(img,is_shared); return *this; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
64,857,635,531,511,300,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void build_zonelists(pg_data_t *pgdat) { int node, local_node; struct zoneref *zonerefs; int nr_zones; local_node = pgdat->node_id; zonerefs = pgdat->node_zonelists[ZONELIST_FALLBACK]._zonerefs; nr_zones = build_zonerefs_node(pgdat, zonerefs); zonerefs += nr_zones; /* * Now we build the zonelist so ...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
234,373,120,727,271,250,000,000,000,000,000,000,000
36
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
GF_Err urn_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_DataEntryURNBox *ptr = (GF_DataEntryURNBox *)s; e = gf_isom_full_box_write(s, bs); if (e) return e; //the flag set indicates we have a string (WE HAVE TO for URLs) if ( !(ptr->flags & 1)) { //to check, the spec says: First name, then location if (p...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
147,454,162,522,598,200,000,000,000,000,000,000,000
19
prevent dref memleak on invalid input (#1183)
void rfbClientConnectionGone(rfbClientPtr cl) { int i; if (cl->prev) cl->prev->next = cl->next; else rfbClientHead = cl->next; if (cl->next) cl->next->prev = cl->prev; TimerFree(cl->alrTimer); TimerFree(cl->deferredUpdateTimer); TimerFree(cl->updateTimer); TimerFree(cl->congestionTimer); ...
0
[ "CWE-787" ]
turbovnc
cea98166008301e614e0d36776bf9435a536136e
9,536,156,368,717,779,000,000,000,000,000,000,000
73
Server: Fix two issues identified by ASan 1. If the TLSPlain and X509Plain security types were both disabled, then rfbOptPamAuth() would overflow the name field in the secTypes structure when testing the "none" security type, since the name of that security type has less than five characters. This issue was ...
asmlinkage long compat_sys_sendmsg(int fd, struct compat_msghdr __user *msg, unsigned int flags) { if (flags & MSG_CMSG_COMPAT) return -EINVAL; return __sys_sendmsg(fd, (struct msghdr __user *)msg, flags | MSG_CMSG_COMPAT); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
325,213,352,063,927,840,000,000,000,000,000,000,000
6
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
**/ CImg<T>& cut(const T& min_value, const T& max_value) { if (is_empty()) return *this; const T a = min_value<max_value?min_value:max_value, b = min_value<max_value?max_value:min_value; cimg_openmp_for(*this,cimg::cut(*ptr,a,b),32768); return *this;
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
131,661,472,887,417,600,000,000,000,000,000,000,000
6
.
translate_table(struct net *net, struct xt_table_info *newinfo, void *entry0, const struct ipt_replace *repl) { struct xt_percpu_counter_alloc_state alloc_state = { 0 }; struct ipt_entry *iter; unsigned int *offsets; unsigned int i; int ret = 0; newinfo->size = repl->size; newinfo->number = repl->num_entries;...
0
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
197,233,034,335,347,550,000,000,000,000,000,000,000
84
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags) { Relation rel; Oid reloid; LOCKMODE lockmode; /* * Determine the lock type we need. First, scan to see if target relation * is a result relation. If not, check if it's a FOR UPDATE/FOR SHARE * relation. In either of those cases, we got t...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
53,494,436,371,056,230,000,000,000,000,000,000,000
49
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 pfkey_send_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport) { struct sk_buff *skb; struct sadb_msg *hdr; struct sadb_sa *sa; struct sadb_address *addr; struct sadb_x_nat_t_port *n_port; int sockaddr_size; int size; __u8 satype = (x->id.proto == IPPROTO_ESP ? SADB_SATYPE_ESP : 0...
0
[]
linux
096f41d3a8fcbb8dde7f71379b1ca85fe213eded
80,132,853,516,090,990,000,000,000,000,000,000,000
109
af_key: Fix sadb_x_ipsecrequest parsing The parsing of sadb_x_ipsecrequest is broken in a number of ways. First of all we're not verifying sadb_x_ipsecrequest_len. This is needed when the structure carries addresses at the end. Worse we don't even look at the length when we parse those optional addresses. The migra...
u32 gf_isom_get_sample_description_count(GF_ISOFile *the_file, u32 trackNumber) { GF_TrackBox *trak; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return 0; return gf_list_count(trak->Media->information->sampleTable->SampleDescription->child_boxes); }
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
196,808,811,176,782,700,000,000,000,000,000,000,000
8
fixed #1706
Linker* PackLinuxElf32mipsel::newLinker() const { return new ElfLinkerMipsLE(); }
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
325,166,423,043,657,860,000,000,000,000,000,000
4
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
void vnc_disconnect_finish(VncState *vs) { int i; vnc_jobs_join(vs); /* Wait encoding jobs */ vnc_lock_output(vs); vnc_qmp_event(vs, QAPI_EVENT_VNC_DISCONNECTED); buffer_free(&vs->input); buffer_free(&vs->output); qapi_free_VncClientInfo(vs->info); vnc_zlib_clear(vs); vnc_tight_...
0
[ "CWE-772" ]
qemu
d3b0db6dfea6b3a9ee0d96aceb796bdcafa84314
261,477,927,794,964,600,000,000,000,000,000,000,000
52
vnc: Set default kbd delay to 10ms The current VNC default keyboard delay is 1ms. With that we're constantly typing faster than the guest receives keyboard events from an XHCI attached USB HID device. The default keyboard delay time in the input layer however is 10ms. I don't know how that number came to be, but empi...
ostream& operator<<(ostream& out, const mon_rwxa_t& p) { if (p == MON_CAP_ANY) return out << "*"; if (p & MON_CAP_R) out << "r"; if (p & MON_CAP_W) out << "w"; if (p & MON_CAP_X) out << "x"; return out; }
0
[ "CWE-285" ]
ceph
a2acedd2a7e12d58af6db35edbd8a9d29c557578
153,250,778,027,677,680,000,000,000,000,000,000,000
13
mon/config-key: limit caps allowed to access the store Henceforth, we'll require explicit `allow` caps for commands, or for the config-key service. Blanket caps are no longer allowed for the config-key service, except for 'allow *'. (for luminous and mimic, we're also ensuring MonCap's parser is able to understand fo...
http_client_check_response_cb (SoupSession *session, SoupMessage *msg, gpointer user_data) { GError *error; CheckData *data = user_data; GTlsCertificateFlags cert_flags; gboolean op_res; gboolean using_https; error = NULL; op_res = FALSE; if (msg->status_code == SOUP_STATUS_CANCELLED) goto out; ...
0
[ "CWE-310" ]
gnome-online-accounts
ecad8142e9ac519b9fc74b96dcb5531052bbffe1
53,173,691,288,234,670,000,000,000,000,000,000,000
43
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
static struct sctp_transport *sctp_trans_elect_tie(struct sctp_transport *trans1, struct sctp_transport *trans2) { if (trans1->error_count > trans2->error_count) { return trans2; } else if (trans1->error_count == trans2->error_count && ktime_after(trans2->last_time_heard, trans1->last_time_h...
0
[ "CWE-20", "CWE-241" ]
linux
d3217b15a19a4779c39b212358a5c71d725822ee
84,349,997,115,868,160,000,000,000,000,000,000,000
13
sctp: Fix sk_ack_backlog wrap-around problem Consider the scenario: For a TCP-style socket, while processing the COOKIE_ECHO chunk in sctp_sf_do_5_1D_ce(), after it has passed a series of sanity check, a new association would be created in sctp_unpack_cookie(), but afterwards, some processing maybe failed, and sctp_as...
zzip_disk_findmatch(ZZIP_DISK * disk, char *filespec, struct zzip_disk_entry *after, zzip_fnmatch_fn_t compare, int flags) { struct zzip_disk_entry *entry = (! after ? zzip_disk_findfirst(disk) : zzip_disk_findnext(disk, after)); if (!...
0
[]
zziplib
72ec933663f738d8e166979aa7fd5590b2104a07
223,610,903,468,133,930,000,000,000,000,000,000,000
30
need to check on endbuf for stored files #15
UpdateDownloader::UpdateDownloader(const Appcast& appcast) : Thread("WinSparkle updater"), m_appcast(appcast) { }
0
[ "CWE-426", "CWE-401" ]
winsparkle
bb454857348245a7397f9e4fbb3a902f4ac25913
148,917,922,093,173,030,000,000,000,000,000,000,000
5
Verify UpdateTempDir isn't maliciously modified Don't just delete the stored updates temporary directory on launch, but validate the registry key to ensure it is in an expected location and follows WinSparkle's naming convention. This is to prevent malicious users from modifying this registry key and forcing the host ...
static void sixaxis_parse_report(struct sony_sc *sc, u8 *rd, int size) { static const u8 sixaxis_battery_capacity[] = { 0, 1, 25, 50, 75, 100 }; unsigned long flags; int offset; u8 cable_state, battery_capacity, battery_charging; /* * The sixaxis is charging if the battery value is 0xee * and it is fully char...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
313,956,937,980,990,820,000,000,000,000,000,000,000
49
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...
static void f_parser (lua_State *L, void *ud) { LClosure *cl; struct SParser *p = cast(struct SParser *, ud); int c = zgetc(p->z); /* read first character */ if (c == LUA_SIGNATURE[0]) { checkmode(L, p->mode, "binary"); cl = luaU_undump(L, p->z, p->name); } else { checkmode(L, p->mode, "text");...
0
[ "CWE-416", "CWE-125", "CWE-787" ]
lua
6298903e35217ab69c279056f925fb72900ce0b7
133,781,354,629,078,410,000,000,000,000,000,000,000
15
Keep minimum size when shrinking a stack When shrinking a stack (during GC), do not make it smaller than the initial stack size.
bool tq_push(struct thread_q *tq, void *data) { struct tq_ent *ent; bool rc = true; ent = (struct tq_ent *)calloc(1, sizeof(*ent)); if (!ent) return false; ent->data = data; INIT_LIST_HEAD(&ent->q_node); mutex_lock(&tq->mutex); if (!tq->frozen) { list_add_tail(&ent->q_node, &tq->q); } else { free(ent)...
0
[ "CWE-20", "CWE-703" ]
sgminer
910c36089940e81fb85c65b8e63dcd2fac71470c
195,487,465,452,700,030,000,000,000,000,000,000,000
24
stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime. Might have introduced a memory leak, don't have time to check. :( Should the other hex2bin()'s be checked? Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this.
void sig_nop(int){}
0
[ "CWE-399", "CWE-190" ]
lepton
6a5ceefac1162783fffd9506a3de39c85c725761
266,516,084,870,369,740,000,000,000,000,000,000,000
1
fix #111
rend_service_requires_uptime(rend_service_t *service) { int i; rend_service_port_config_t *p; for (i=0; i < smartlist_len(service->ports); ++i) { p = smartlist_get(service->ports, i); if (smartlist_contains_int_as_string(get_options()->LongLivedPorts, p->virtual_port)) ...
0
[ "CWE-532" ]
tor
09ea89764a4d3a907808ed7d4fe42abfe64bd486
144,459,333,313,212,230,000,000,000,000,000,000,000
13
Fix log-uninitialized-stack bug in rend_service_intro_established. Fixes bug 23490; bugfix on 0.2.7.2-alpha. TROVE-2017-008 CVE-2017-0380
static gboolean avdtp_suspend_resp(struct avdtp *session, struct avdtp_stream *stream, void *data, int size) { struct avdtp_local_sep *sep = stream->lsep; avdtp_sep_set_state(session, sep, AVDTP_STATE_OPEN); if (sep->cfm && sep->cfm->suspend) sep->cfm->suspend(session, sep, stream, NULL, sep->user_data...
0
[ "CWE-703" ]
bluez
7a80d2096f1b7125085e21448112aa02f49f5e9a
125,298,209,896,782,130,000,000,000,000,000,000,000
13
avdtp: Fix accepting invalid/malformed capabilities Check if capabilities are valid before attempting to copy them.
MSG_PROCESS_RETURN tls_process_certificate_request(SSL *s, PACKET *pkt) { int ret = MSG_PROCESS_ERROR; unsigned int list_len, ctype_num, i, name_len; X509_NAME *xn = NULL; const unsigned char *data; const unsigned char *namestart, *namebytes; STACK_OF(X509_NAME) *ca_sk = NULL; if ((ca_sk = ...
0
[ "CWE-476" ]
openssl
efbe126e3ebb9123ac9d058aa2bb044261342aaa
268,816,746,742,768,520,000,000,000,000,000,000,000
121
Fix missing NULL checks in CKE processing Reviewed-by: Rich Salz <rsalz@openssl.org>
static void nfs4_open_done(struct rpc_task *task, void *calldata) { struct nfs4_opendata *data = calldata; data->rpc_status = task->tk_status; if (!nfs4_sequence_process(task, &data->o_res.seq_res)) return; if (task->tk_status == 0) { if (data->o_res.f_attr->valid & NFS_ATTR_FATTR_TYPE) { switch (data->o_...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
22,700,097,922,930,470,000,000,000,000,000,000,000
30
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); zval *property_name = &opline->op2.u.constant; if (0) { MAKE_REAL_ZVAL_PTR(property_name); } i...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
273,787,767,800,917,370,000,000,000,000,000,000,000
25
- 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
static int kvm_ioctl_get_supported_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 __user *cpuid_arg) { struct kvm_cpuid2 cpuid; int r; r = -EFAULT; if (copy_from_user(&cpuid, cpuid_arg, sizeof(cpuid))) return r; r = kvm_get_hv_cpuid(vcpu, &cpuid, cpuid_arg->entries); if (r) return r; r = -EFAU...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
336,325,675,927,617,950,000,000,000,000,000,000,000
20
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
static void dentry_free(struct dentry *dentry) { WARN_ON(!hlist_unhashed(&dentry->d_u.d_alias)); if (unlikely(dname_external(dentry))) { struct external_name *p = external_name(dentry); if (likely(atomic_dec_and_test(&p->u.count))) { call_rcu(&dentry->d_u.d_rcu, __d_free_external); return; } } /* if den...
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
239,856,301,731,468,400,000,000,000,000,000,000,000
16
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
log_fatal_errno(int domain, const char *func, int line) { DPRINTF(E_FATAL, domain, "%s failed at line %d, error %d (%s)\n", func, line, errno, strerror(errno)); abort(); }
0
[ "CWE-416" ]
owntone-server
246d8ae0cef27377e5dfe9ee3ad87e864d6b6266
104,864,888,021,247,380,000,000,000,000,000,000,000
5
[misc] Fix use-after-free in net_bind() Thanks to Ba Jinsheng for reporting this bug
static unsigned rb_calculate_event_length(unsigned length) { struct ring_buffer_event event; /* Used only for sizeof array */ /* zero length can cause confusions */ if (!length) length++; if (length > RB_MAX_SMALL_DATA) length += sizeof(event.array[0]); length += RB_EVNT_HDR_SIZE; length = ALIGN(length, RB...
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
141,082,050,131,727,250,000,000,000,000,000,000,000
31
tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_...
void qmp_guest_file_close(int64_t handle, Error **errp) { GuestFileHandle *gfh = guest_file_handle_find(handle, errp); int ret; slog("guest-file-close called, handle: %" PRId64, handle); if (!gfh) { return; } ret = fclose(gfh->fh); if (ret == EOF) { error_setg_errno(errp, e...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
219,508,013,767,891,700,000,000,000,000,000,000,000
19
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...