func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
const char *arch_vma_name(struct vm_area_struct *vma) { if (vma->vm_flags & VM_MPX) return "[mpx]"; return NULL; }
0
[ "CWE-254" ]
tip
8b8addf891de8a00e4d39fc32f93f7c5eb8feceb
251,643,696,494,343,360,000,000,000,000,000,000,000
6
x86/mm/32: Enable full randomization on i386 and X86_32 Currently on i386 and on X86_64 when emulating X86_32 in legacy mode, only the stack and the executable are randomized but not other mmapped files (libraries, vDSO, etc.). This patch enables randomization for the libraries, vDSO and mmap requests on i386 and in X...
gerbv_gdk_draw_prim4(GdkPixmap *pixmap, GdkGC *gc, gerbv_simplified_amacro_t *s, double scale, gint x, gint y) { const int exposure_idx = 0; const int nuf_points_idx = 1; const int first_x_idx = 2; const int first_y_idx = 3; const int rotext_idx = 4; GdkGC *local_gc = gdk_gc_new(pixmap);...
0
[ "CWE-703" ]
gerbv
b2c2f8da851f2ac8079a91ce9d498d87ff96abcf
238,406,610,008,361,300,000,000,000,000,000,000,000
53
Avoid direct access on array of unknown size Be requiring a `gerbv_simplified_amacro_t` the `dgk_draw_amacro_funcs` can be sure of the length of the parameter array.
static loff_t ext4_max_size(int blkbits, int has_huge_files) { loff_t res; loff_t upper_limit = MAX_LFS_FILESIZE; /* small i_blocks in vfs inode? */ if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) { /* * CONFIG_LBD is not enabled implies the inode * i_block represent total blocks in 512 bytes * 3...
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
68,732,918,806,681,300,000,000,000,000,000,000,000
30
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
bool OSD::require_same_or_newer_map(OpRequestRef& op, epoch_t epoch, bool is_fast_dispatch) { const Message *m = op->get_req(); dout(15) << "require_same_or_newer_map " << epoch << " (i am " << osdmap->get_epoch() << ") " << m << dendl; assert(osd_lock.is_locked()); // do they have a newer map? ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
118,203,816,038,578,470,000,000,000,000,000,000,000
29
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 ...
/* {{{ date_interval_write_property */ void date_interval_write_property(zval *object, zval *member, zval *value, const zend_literal *key TSRMLS_DC) { php_interval_obj *obj; zval tmp_member, tmp_value; if (member->type != IS_STRING) { tmp_member = *member; zval_copy_ctor(&tmp_member); convert_to_string(&tmp...
0
[]
php-src
bb057498f7457e8b2eba98332a3bad434de4cf12
221,320,268,953,123,700,000,000,000,000,000,000,000
54
Fix #70277: new DateTimeZone($foo) is ignoring text after null byte The DateTimeZone constructors are not binary safe. They're parsing the timezone as string, but discard the length when calling timezone_initialize(). This patch adds a tz_len parameter and a respective check to timezone_initialize().
static int pause_interception(struct vcpu_svm *svm) { kvm_vcpu_on_spin(&(svm->vcpu)); return 1; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
4,836,304,354,143,589,000,000,000,000,000,000,000
5
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
static int pagemap_open(struct inode *inode, struct file *file) { struct mm_struct *mm; mm = proc_mem_open(inode, PTRACE_MODE_READ); if (IS_ERR(mm)) return PTR_ERR(mm); file->private_data = mm; return 0; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
72,458,865,415,856,990,000,000,000,000,000,000,000
10
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static long btrfs_ioctl_qgroup_limit(struct file *file, void __user *arg) { struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; struct btrfs_ioctl_qgroup_limit_args *sa; struct btrfs_trans_handle *trans; int ret; int err; u64 qgroupid; if (!capable(CAP_SYS_ADMIN)) return -EPERM; ret = mnt_want_...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
110,052,720,515,573,500,000,000,000,000,000,000,000
47
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
static int do_md_run(struct mddev *mddev) { int err; err = md_run(mddev); if (err) goto out; err = bitmap_load(mddev); if (err) { bitmap_destroy(mddev); goto out; } md_wakeup_thread(mddev->thread); md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */ set_capacity(mddev->gendisk, mdd...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
23,390,413,649,820,464,000,000,000,000,000,000,000
23
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
PHP_FUNCTION(imagepsbbox) { zval *fnt; long sz = 0, sp = 0, wd = 0; char *str; int i, space = 0, add_width = 0, char_width, amount_kern; int cur_x, cur_y, dx, dy; int x1, y1, x2, y2, x3, y3, x4, y4; int *f_ind; int str_len, per_char = 0; int argc = ZEND_NUM_ARGS(); double angle = 0, sin_a = 0, cos_a = 0; BBo...
0
[ "CWE-20" ]
php-src
f7d7befae8bcc2db0093f8adaa9f72eeb7ad891e
252,385,764,565,180,600,000,000,000,000,000,000,000
95
Fix #69719 - more checks for nulls in paths
static int handle_apic_write(struct kvm_vcpu *vcpu) { unsigned long exit_qualification = vmx_get_exit_qual(vcpu); /* * APIC-write VM-Exit is trap-like, KVM doesn't need to advance RIP and * hardware has done any necessary aliasing, offset adjustments, etc... * for the access. I.e. the correct value has alread...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
329,024,781,338,263,700,000,000,000,000,000,000,000
16
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
MagickPrivate void XConfigureImageColormap(Display *display, XResourceInfo *resource_info,XWindows *windows,Image *image, ExceptionInfo *exception) { Colormap colormap; /* Make standard colormap. */ XSetCursorState(display,windows,MagickTrue); XCheckRefreshWindows(display,windows); XMakeStandar...
0
[]
ImageMagick
f391a5f4554fe47eb56d6277ac32d1f698572f0e
250,270,357,787,596,570,000,000,000,000,000,000,000
26
https://github.com/ImageMagick/ImageMagick/issues/1531
int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher) { int i; PKCS7_ENC_CONTENT *ec; i = OBJ_obj2nid(p7->type); switch (i) { case NID_pkcs7_signedAndEnveloped: ec = p7->d.signed_and_enveloped->enc_data; break; case NID_pkcs7_enveloped: ec = p7->d.enveloped->enc_data...
0
[]
openssl
c0334c2c92dd1bc3ad8138ba6e74006c3631b0f9
104,443,224,112,714,380,000,000,000,000,000,000,000
29
PKCS#7: avoid NULL pointer dereferences with missing content In PKCS#7, the ASN.1 content component is optional. This typically applies to inner content (detached signatures), however we must also handle unexpected missing outer content correctly. This patch only addresses functions reachable from parsing, decryption...
int xt_compat_target_to_user(const struct xt_entry_target *t, void __user **dstptr, unsigned int *size) { const struct xt_target *target = t->u.kernel.target; struct compat_xt_entry_target __user *ct = *dstptr; int off = xt_compat_target_offset(target); u_int16_t tsize = t->u.user.target_size - off; if (c...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
336,623,696,937,716,060,000,000,000,000,000,000,000
26
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
bool current_chrooted(void) { /* Does the current process have a non-standard root */ struct path ns_root; struct path fs_root; bool chrooted; /* Find the namespace root */ ns_root.mnt = &current->nsproxy->mnt_ns->root->mnt; ns_root.dentry = ns_root.mnt->mnt_root; path_get(&ns_root); while (d_mountpoint(ns_ro...
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
266,022,792,574,853,580,000,000,000,000,000,000,000
23
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
static void launch(OpKernelContext* context, const Tensor& tensor_in, const Tensor& tensor_out, const Tensor& out_backprop, const std::array<int64, 3>& window, const std::array<int64, 3>& stride, const std::array<int64, 3>& out, ...
0
[ "CWE-369", "CWE-787" ]
tensorflow
63c6a29d0f2d692b247f7bf81f8732d6442fad09
312,974,173,120,240,960,000,000,000,000,000,000,000
13
Add missing validation, prevent heap OOB PiperOrigin-RevId: 372246723 Change-Id: I1a454a643810e77d7d14821b342098c56a09fbbf
void DecimalQuantity::roundToMagnitude(int32_t magnitude, RoundingMode roundingMode, UErrorCode& status) { roundToMagnitude(magnitude, roundingMode, false, status); }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
7,863,299,307,286,831,000,000,000,000,000,000,000
3
ICU-20246 Fixing another integer overflow in number parsing.
static int __init enforcing_setup(char *str) { unsigned long enforcing; if (!kstrtoul(str, 0, &enforcing)) selinux_enforcing = enforcing ? 1 : 0; return 1; }
0
[ "CWE-264" ]
linux
7b0d0b40cd78cadb525df760ee4cac151533c2b5
143,813,309,782,618,770,000,000,000,000,000,000,000
7
selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID. If the callee SID is bounded by the caller SID, then allowing the transition to occur poses no risk of privilege escalation and we can therefore safely allow the transition to occur. Add this exemption for both the case where a transition was explicitl...
static int log_unresolvable_specifier(const char *filename, unsigned line) { static bool notified = false; /* In system mode, this is called when /etc is not fully initialized (e.g. * in a chroot environment) where some specifiers are unresolvable. In user * mode, this is called when ...
0
[ "CWE-59" ]
systemd
5579f85663d10269e7ac7464be6548c99cea4ada
22,786,210,084,164,024,000,000,000,000,000,000,000
20
tmpfiles: refuse to chown()/chmod() files which are hardlinked, unless protected_hardlinks sysctl is on Let's add some extra safety. Fixes: #7736
FastHufDecoder::FastHufDecoder (const char *&table, int numBytes, int minSymbol, int maxSymbol, int rleSymbol) : _rleSymbol (rleSymbol), _numSymbols (0), _minCodeLength (255), _maxCodeLength (0), _idToSymbol (0) { // // List of symbols that we find with non-zero code ...
1
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
331,472,092,367,774,640,000,000,000,000,000,000,000
205
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, gfp_t gfp_mask) { int i, osize = skb_end_offset(skb); int size = osize + nhead + ntail; long off; u8 *data; BUG_ON(nhead < 0); if (skb_shared(skb)) BUG(); size = SKB_DATA_ALIGN(size); if (skb_pfmemalloc(skb)) gfp_mask |= __GFP_MEMAL...
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
27,684,087,234,831,463,000,000,000,000,000,000,000
83
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) { struct udp_sock *up = udp_sk(sk); int rc; int is_udplite = IS_UDPLITE(sk); /* * Charge it to the socket, dropping if the queue is full. */ if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) goto drop; nf_reset(skb); if (static_key_false(&udp_en...
0
[ "CWE-358" ]
linux
197c949e7798fbf28cfadc69d9ca0c2abbf93191
30,408,503,897,426,147,000,000,000,000,000,000,000
114
udp: properly support MSG_PEEK with truncated buffers Backport of this upstream commit into stable kernels : 89c22d8c3b27 ("net: Fix skb csum races when peeking") exposed a bug in udp stack vs MSG_PEEK support, when user provides a buffer smaller than skb payload. In this case, skb_copy_and_csum_datagram_iovec(skb, s...
int LibRaw::unpack_thumb(void) { CHECK_ORDER_LOW(LIBRAW_PROGRESS_IDENTIFY); CHECK_ORDER_BIT(LIBRAW_PROGRESS_THUMB_LOAD); #define THUMB_SIZE_CHECKT(A) \ do { \ if (INT64(A) > 1024ULL * 1024ULL * LIBRAW_MAX_THUMBNAIL_MB) throw LIBRAW_EXCEPTION_IO_CORRUPT; \ if (INT64(A) > 0 && INT64(A) < 64ULL) thr...
0
[ "CWE-20", "CWE-125" ]
LibRaw
20ad21c0d87ca80217aee47533d91e633ce1864d
116,451,175,367,412,640,000,000,000,000,000,000,000
330
Thumbnail size range check
int main_configure(char *arg1, char *arg2) { int cmdline_status; log_flush(LOG_MODE_BUFFER); cmdline_status=options_cmdline(arg1, arg2); if(cmdline_status) { /* cannot proceed */ log_flush(LOG_MODE_ERROR); return cmdline_status; } options_free(1); /* free the defaults */ opt...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
288,465,246,539,739,470,000,000,000,000,000,000,000
52
stunnel-5.57
void PacketBypassCallback(Packet *p) { /* Don't try to bypass if flow is already out or * if we have failed to do it once */ int state = SC_ATOMIC_GET(p->flow->flow_state); if ((state == FLOW_STATE_LOCAL_BYPASSED) || (state == FLOW_STATE_CAPTURE_BYPASSED)) { return; } if (p-...
0
[ "CWE-20" ]
suricata
11f3659f64a4e42e90cb3c09fcef66894205aefe
81,098,152,808,977,860,000,000,000,000,000,000,000
16
teredo: be stricter on what to consider valid teredo Invalid Teredo can lead to valid DNS traffic (or other UDP traffic) being misdetected as Teredo. This leads to false negatives in the UDP payload inspection. Make the teredo code only consider a packet teredo if the encapsulated data was decoded without any 'invali...
GF_Box *reftype_box_new() { ISOM_DECL_BOX_ALLOC(GF_TrackReferenceTypeBox, GF_ISOM_BOX_TYPE_REFT); return (GF_Box *)tmp;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
65,921,841,006,252,890,000,000,000,000,000,000,000
5
fixed #1587
size_t HTTPSession::sendAbort(HTTPTransaction* txn, ErrorCode statusCode) noexcept { // Ask the codec to generate an abort indicator for the transaction. // Depending on the protocol, this may be a no-op. // Schedule a network write to send out whatever egress we might // have queu...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
211,404,484,388,076,040,000,000,000,000,000,000,000
27
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
create_unpeer_node( address_node *addr ) { unpeer_node * my_node; u_int u; char * pch; my_node = emalloc_zero(sizeof(*my_node)); /* * From the parser's perspective an association ID fits into * its generic T_String definition of a name/address "address". * We treat all valid 16-bit numbers as associati...
0
[ "CWE-20" ]
ntp
52e977d79a0c4ace997e5c74af429844da2f27be
329,268,829,283,945,550,000,000,000,000,000,000,000
32
[Bug 1773] openssl not detected during ./configure. [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
static int selinux_msg_queue_msgsnd(struct msg_queue *msq, struct msg_msg *msg, int msqflg) { struct ipc_security_struct *isec; struct msg_security_struct *msec; struct common_audit_data ad; u32 sid = current_sid(); int rc; isec = msq->q_perm.security; msec = msg->security; /* * First time through, need to ...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
87,549,784,765,003,180,000,000,000,000,000,000,000
42
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
read_viminfo_bufferlist( vir_T *virp, int writing) { char_u *tab; linenr_T lnum; colnr_T col; buf_T *buf; char_u *sfname; char_u *xline; // Handle long line and escaped characters. xline = viminfo_readstring(virp, 1, FALSE); // don't read in if there are files on the comma...
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
25,102,452,108,995,280,000,000,000,000,000,000,000
52
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
static bool check_fields(THD *thd, List<Item> &items, bool update_view) { Item *item; if (update_view) { List_iterator<Item> it(items); Item_field *field; while ((item= it++)) { if (!(field= item->field_for_view_update())) { /* item has name, because it comes from VIEW SELECT l...
0
[ "CWE-617" ]
server
ecb6f9c894d3ebafeff1c6eb3b65cd248062296f
39,429,150,178,113,893,000,000,000,000,000,000,000
47
MDEV-28095 crash in multi-update and implicit grouping disallow implicit grouping in multi-update. explicit GROUP BY is not allowed by the grammar.
process_cmd_makestep(CMD_Request *msg, char *line) { msg->command = htons(REQ_MAKESTEP); }
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
293,220,785,634,672,450,000,000,000,000,000,000,000
4
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
static int phar_dir_flush(php_stream *stream TSRMLS_DC) /* {{{ */ { return EOF; }
0
[ "CWE-824" ]
php-src
9649ca1630433473a307d015ba1a79a4a7a779f5
243,122,459,051,288,780,000,000,000,000,000,000,000
4
Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()
void RGWCORSConfiguration::dump() { unsigned loop = 1; unsigned num_rules = rules.size(); dout(10) << "Number of rules: " << num_rules << dendl; for(list<RGWCORSRule>::iterator it = rules.begin(); it!= rules.end(); ++it, loop++) { dout(10) << " <<<<<<< Rule " << loop << " >>>>>>> " << dendl; (*it)...
0
[ "CWE-113" ]
ceph
46817f30cee60bc5df8354ab326762e7c783fe2c
192,514,885,335,508,100,000,000,000,000,000,000,000
10
rgw: sanitize newlines in s3 CORSConfiguration's ExposeHeader the values in the <ExposeHeader> element are sent back to clients in a Access-Control-Expose-Headers response header. if the values are allowed to have newlines in them, they can be used to inject arbitrary response headers this issue only affects s3, whic...
static apr_byte_t oidc_session_pass_tokens(request_rec *r, oidc_cfg *cfg, oidc_session_t *session, apr_byte_t *needs_save) { apr_byte_t pass_headers = oidc_cfg_dir_pass_info_in_headers(r); apr_byte_t pass_envvars = oidc_cfg_dir_pass_info_in_envvars(r); apr_byte_t pass_base64url = oidc_cfg_dir_pass_info_base64url(...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
35,420,045,755,229,517,000,000,000,000,000,000,000
62
Add a function to escape Javascript characters
static void Ins_SHC( INS_ARG ) { TGlyph_Zone zp; Int refp; TT_F26Dot6 dx, dy; Long contour, i; Int first_point, last_point; contour = args[0]; if ( BOUNDS( args[0], CUR.pts.n_contours ) ) { #if 0 /* A workaround for the Ghostscript bu...
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
61,634,330,113,726,050,000,000,000,000,000,000,000
40
Bug 698024: bounds check zone pointer in Ins_MIRP()
static int StreamTcpTest24(void) { StreamTcpThread stt; TcpSession ssn; Packet *p = SCMalloc(SIZE_OF_PACKET); FAIL_IF (p == NULL); Flow f; TCPHdr tcph; uint8_t packet[1460] = ""; ThreadVars tv; PacketQueue pq; memset(&pq,0,sizeof(PacketQueue)); StreamTcpUTInit(&stt.ra_ctx); ...
0
[]
suricata
843d0b7a10bb45627f94764a6c5d468a24143345
132,260,323,895,739,700,000,000,000,000,000,000,000
63
stream: support RST getting lost/ignored In case of a valid RST on a SYN, the state is switched to 'TCP_CLOSED'. However, the target of the RST may not have received it, or may not have accepted it. Also, the RST may have been injected, so the supposed sender may not actually be aware of the RST that was sent in it's ...
static int process_one_ticket(struct ceph_auth_client *ac, struct ceph_crypto_key *secret, void **p, void *end, void *dbuf, void *ticket_buf) { struct ceph_x_info *xi = ac->private; int type; u8 tkt_struct_v, blob_struct_v; struct ceph_x_ticket_handler *th; void *dp, *dend; int dlen; c...
1
[ "CWE-399", "CWE-119" ]
linux
c27a3e4d667fdcad3db7b104f75659478e0c68d8
45,283,683,275,985,410,000,000,000,000,000,000,000
114
libceph: do not hard code max auth ticket len We hard code cephx auth ticket buffer size to 256 bytes. This isn't enough for any moderate setups and, in case tickets themselves are not encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but ceph_decode_copy() doesn't - it's just a memcpy() wrapper). S...
static int xfrm_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, const struct xfrm_migrate *m, int num_migrate, const struct xfrm_kmaddress *k, const struct xfrm_encap_tmpl *encap) { struct net *net = &init_net; struct sk_buff *skb; int err; skb = nlmsg_new(xfrm_migrate_msgsiz...
0
[ "CWE-125" ]
linux
b805d78d300bcf2c83d6df7da0c818b0fee41427
299,008,033,401,660,270,000,000,000,000,000,000,000
20
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard PC (i440FX + P...
double Item_sum_udf_float::val_real() { my_bool tmp_null_value; double res; DBUG_ASSERT(fixed == 1); DBUG_ENTER("Item_sum_udf_float::val"); DBUG_PRINT("info",("result_type: %d arg_count: %d", args[0]->result_type(), arg_count)); res= udf.val(&tmp_null_value); null_value= tmp_null_value; DBUG_RET...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
95,408,825,581,656,450,000,000,000,000,000,000,000
12
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
byte* MemIo::mmap(bool /*isWriteable*/) { return p_->data_; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
91,838,804,076,794,770,000,000,000,000,000,000,000
4
Fix https://github.com/Exiv2/exiv2/issues/55
int linuxMadvFreeForkBugCheck(void) { int ret, pipefd[2] = { -1, -1 }; pid_t pid; char *p = NULL, *q; int bug_found = 0; long page_size = sysconf(_SC_PAGESIZE); long map_size = 3 * page_size; /* Create a memory map that's in our full control (not one used by the allocator). */ p = mmap(...
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
231,034,070,508,800,860,000,000,000,000,000,000,000
94
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
TfLiteStatus TanhEval(TfLiteContext* context, TfLiteNode* node) { OpData* data = reinterpret_cast<OpData*>(node->user_data); const TfLiteTensor* input = GetInput(context, node, 0); TfLiteTensor* output = GetOutput(context, node, 0); switch (input->type) { case kTfLiteFloat32: { if (kernel_type == kRef...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
293,349,426,063,162,180,000,000,000,000,000,000,000
70
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
i40e_status i40e_set_partition_bw_setting(struct i40e_pf *pf) { struct i40e_aqc_configure_partition_bw_data bw_data; i40e_status status; /* Set the valid bit for this PF */ bw_data.pf_valid_bits = cpu_to_le16(BIT(pf->hw.pf_id)); bw_data.max_bw[pf->hw.pf_id] = pf->max_bw & I40E_ALT_BW_VALUE_MASK; bw_data.min_bw[p...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
179,099,471,383,352,950,000,000,000,000,000,000,000
15
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>
int ClientConnectionImpl::onHeadersComplete() { // Handle the case where the client is closing a kept alive connection (by sending a 408 // with a 'Connection: close' header). In this case we just let response flush out followed // by the remote close. if (!pending_response_.has_value() && !resetStreamCalled())...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
69,975,606,193,831,380,000,000,000,000,000,000,000
66
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static void disk_add_events(struct gendisk *disk) { if (!disk->ev) return; /* FIXME: error handling */ if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_events_attrs) < 0) pr_warn("%s: failed to create sysfs files for events\n", disk->disk_name); mutex_lock(&disk_events_mutex); list_add_tail(&disk->ev...
0
[ "CWE-416" ]
linux-stable
77da160530dd1dc94f6ae15a981f24e5f0021e84
244,444,273,869,921,080,000,000,000,000,000,000,000
20
block: fix use-after-free in seq file I got a KASAN report of use-after-free: ================================================================== BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508 Read of size 8 by task trinity-c1/315 ======================================...
static inline void megasas_remove_scsi_device(struct scsi_device *sdev) { sdev_printk(KERN_INFO, sdev, "SCSI device is removed\n"); scsi_remove_device(sdev); scsi_device_put(sdev); }
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
43,827,846,905,598,980,000,000,000,000,000,000,000
6
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
GF_Err schm_box_read(GF_Box *s, GF_BitStream *bs) { GF_SchemeTypeBox *ptr = (GF_SchemeTypeBox *)s; ISOM_DECREASE_SIZE(ptr, 8); ptr->scheme_type = gf_bs_read_u32(bs); ptr->scheme_version = gf_bs_read_u32(bs); if (ptr->size && (ptr->flags & 0x000001)) { u32 len = (u32) (ptr->size); ptr->URI = (char*)gf_malloc(...
1
[ "CWE-703" ]
gpac
f19668964bf422cf5a63e4dbe1d3c6c75edadcbb
88,810,831,687,747,630,000,000,000,000,000,000,000
16
fixed #1879
decode_OFPAT_RAW11_SET_VLAN_PCP(uint8_t pcp, enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out) { return decode_set_vlan_pcp(pcp, false, out); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
240,654,568,623,639,400,000,000,000,000,000,000,000
6
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static void ResponseV8ToCpp(v8::Isolate* isolate, TRI_v8_global_t const* v8g, GeneralRequest* request, v8::Handle<v8::Object> const res, GeneralResponse* response) { v8::Local<v8::Context> context = isolate->GetCurrentContext(); TRI...
0
[ "CWE-918" ]
arangodb
d7b35a6884c6b2802d34d79fb2a79fb2c9ec2175
333,318,989,931,367,570,000,000,000,000,000,000,000
359
[APM-78] Disable installation from remote URL (#15292) (#15343) * [APM-78] Disable installation from remote URL (#15292) * Update CHANGELOG * Fix clang-format Co-authored-by: Vadim <vadim@arangodb.com>
check_sparse_region (struct tar_sparse_file *file, off_t beg, off_t end) { if (!lseek_or_error (file, beg)) return false; while (beg < end) { size_t bytes_read; size_t rdsize = BLOCKSIZE < end - beg ? BLOCKSIZE : end - beg; char diff_buffer[BLOCKSIZE]; bytes_read = safe_read (file-...
1
[]
tar
c15c42ccd1e2377945fd0414eca1a49294bff454
269,443,994,545,968,350,000,000,000,000,000,000,000
32
Fix CVE-2018-20482 * NEWS: Update. * src/sparse.c (sparse_dump_region): Handle short read condition. (sparse_extract_region,check_data_region): Fix dumped_size calculation. Handle short read condition. (pax_decode_header): Fix dumped_size calculation. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likew...
bson_iter_utf8 (const bson_iter_t *iter, /* IN */ uint32_t *length) /* OUT */ { BSON_ASSERT (iter); if (ITER_TYPE (iter) == BSON_TYPE_UTF8) { if (length) { *length = bson_iter_utf8_len_unsafe (iter); } return (const char *) (iter->raw + iter->d2); } if (l...
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
189,942,977,299,322,600,000,000,000,000,000,000,000
19
CDRIVER-2269 Check for zero string length in codewscope
static request_rec *ap_lua_check_request_rec(lua_State *L, int index) { request_rec *r; luaL_checkudata(L, index, "Apache2.Request"); r = (request_rec *) lua_unboxpointer(L, index); return r; }
0
[ "CWE-20" ]
httpd
78eb3b9235515652ed141353d98c239237030410
78,908,708,005,363,890,000,000,000,000,000,000,000
7
*) SECURITY: CVE-2015-0228 (cve.mitre.org) mod_lua: A maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash. [Edward Lu <Chaosed0 gmail.com>] Discovered by Guido Vranken <guidovranken gmail.com> Submitted by: Edward Lu Committed by: covener git-svn-id...
static int svm_hardware_enable(void) { struct svm_cpu_data *sd; uint64_t efer; struct desc_struct *gdt; int me = raw_smp_processor_id(); rdmsrl(MSR_EFER, efer); if (efer & EFER_SVME) return -EBUSY; if (!has_svm()) { pr_err("%s: err EOPNOTSUPP on %d\n", __func__, me); return -EINVAL; } sd = per_cpu(svm...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
329,982,062,553,558,000,000,000,000,000,000,000,000
75
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
static void svm_set_efer(struct kvm_vcpu *vcpu, u64 efer) { vcpu->arch.efer = efer; if (!npt_enabled && !(efer & EFER_LMA)) efer &= ~EFER_LME; to_svm(vcpu)->vmcb->save.efer = efer | EFER_SVME; mark_dirty(to_svm(vcpu)->vmcb, VMCB_CR); }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
124,498,625,386,778,970,000,000,000,000,000,000,000
9
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
nm_utils_hw_addr_gen_random_eth(const char *current_mac_address, const char *generate_mac_address_mask) { struct ether_addr bin_addr; nm_utils_random_bytes(&bin_addr, ETH_ALEN); _hw_addr_eth_complete(&bin_addr, current_mac_address, generate_mac_address_mask); return nm_u...
0
[ "CWE-20" ]
NetworkManager
420784e342da4883f6debdfe10cde68507b10d27
285,143,194,393,418,500,000,000,000,000,000,000,000
9
core: fix crash in nm_wildcard_match_check() It's not entirely clear how to treat %NULL. Clearly "match.interface-name=eth0" should not match with an interface %NULL. But what about "match.interface-name=!eth0"? It's now implemented that negative matches still succeed against %NULL. What about "match.interface-name=*"...
static char *php_replace_in_subject(zval *regex, zval *replace, zval **subject, int *result_len, int limit, int is_callable_replace, int *replace_count TSRMLS_DC) { zval **regex_entry, **replace_entry = NULL, *replace_value, empty_replace; char *subject_value, *result; int subject_len; /* M...
1
[]
php-src
03964892c054d0c736414c10b3edc7a40318b975
22,067,705,360,812,600,000,000,000,000,000,000,000
84
Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
lldpd_alloc_hardware(struct lldpd *cfg, char *name, int index) { struct lldpd_hardware *hardware; log_debug("alloc", "allocate a new local port (%s)", name); if ((hardware = (struct lldpd_hardware *) calloc(1, sizeof(struct lldpd_hardware))) == NULL) return NULL; /* Clone default local port */ if (lldpd_clo...
0
[ "CWE-617", "CWE-703" ]
lldpd
9221b5c249f9e4843f77c7f888d5705348d179c0
303,503,696,529,611,800,000,000,000,000,000,000,000
35
protocols: don't use assert on paths that can be reached Malformed packets should not make lldpd crash. Ensure we can handle them by not using assert() in this part.
check_owner_password_V4(std::string& user_password, std::string const& owner_password, QPDF::EncryptionData const& data) { // Algorithm 3.7 from the PDF 1.7 Reference Manual unsigned char key[OU_key_bytes_V4]; compute_O_rc4_key(user_password, owner_password, ...
1
[ "CWE-125" ]
qpdf
dea704f0ab7f625e1e7b3f9a1110b45b63157317
96,640,725,703,256,150,000,000,000,000,000,000,000
22
Pad keys to avoid memory errors (fixes #147)
gdImagePtr Scale(const gdImagePtr src, const unsigned int src_width, const unsigned int src_height, const gdImagePtr dst, const unsigned int new_width, const unsigned int new_height) { gdImagePtr tmp_im; tmp_im = gdImageCreateTrueColor(new_width, src_height); if (tmp_im == NULL) { return NULL; } _gdScaleHoriz(s...
0
[ "CWE-125" ]
libgd
4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a
31,616,142,447,294,783,000,000,000,000,000,000,000
15
Fixed memory overrun bug in gdImageScaleTwoPass _gdContributionsCalc would compute a window size and then adjust the left and right positions of the window to make a window within that size. However, it was storing the values in the struct *before* it made the adjustment. This change fixes that.
int vmci_transport_send_wrote(struct sock *sk) { return vmci_transport_send_control_pkt( sk, VMCI_TRANSPORT_PACKET_TYPE_WROTE, 0, 0, NULL, VSOCK_PROTO_INVALID, VMCI_INVALID_HANDLE); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
63,226,532,929,028,950,000,000,000,000,000,000,000
7
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...
int RGWSwiftWebsiteHandler::error_handler(const int err_no, std::string* const error_content) { const auto& ws_conf = s->bucket_info.website_conf; if (can_be_website_req() && ! ws_conf.error_doc.empty()) { set_req_state_err(s, err_no); return serve_errordoc(s->err....
0
[ "CWE-617" ]
ceph
f44a8ae8aa27ecef69528db9aec220f12492810e
317,578,339,399,558,800,000,000,000,000,000,000,000
13
rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name checking for empty name avoids later assertion in RGWObjectCtx::set_atomic Fixes: CVE-2021-3531 Reviewed-by: Casey Bodley <cbodley@redhat.com> Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b...
static void f4(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { if (ev == MG_EV_HTTP_MSG) { struct mg_http_message *hm = (struct mg_http_message *) ev_data; mg_printf(c, "HTTP/1.0 200 OK\n\n%.*s/%s", (int) hm->uri.len, hm->uri.ptr, fn_data); c->is_draining = 1; } }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
316,239,512,833,134,570,000,000,000,000,000,000,000
8
Protect against the directory traversal in mg_upload()
static void ip_cmsg_recv_retopts(struct msghdr *msg, struct sk_buff *skb) { unsigned char optbuf[sizeof(struct ip_options) + 40]; struct ip_options * opt = (struct ip_options *)optbuf; if (IPCB(skb)->opt.optlen == 0) return; if (ip_options_echo(opt, skb)) { msg->msg_flags |= MSG_CTRUNC; return; } ip_optio...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
239,295,385,993,668,120,000,000,000,000,000,000,000
16
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
xfs_attr3_leaf_write_verify( struct xfs_buf *bp) { struct xfs_mount *mp = bp->b_target->bt_mount; struct xfs_buf_log_item *bip = bp->b_fspriv; struct xfs_attr3_leaf_hdr *hdr3 = bp->b_addr; if (!xfs_attr3_leaf_verify(bp)) { xfs_buf_ioerror(bp, EFSCORRUPTED); xfs_verifier_error(bp); return; } if (!xfs_sb_v...
0
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
53,280,716,893,753,700,000,000,000,000,000,000,000
21
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
update_stats_wait_end(struct cfs_rq *cfs_rq, struct sched_entity *se) { schedstat_set(se->wait_max, max(se->wait_max, rq_of(cfs_rq)->clock - se->wait_start)); schedstat_set(se->wait_count, se->wait_count + 1); schedstat_set(se->wait_sum, se->wait_sum + rq_of(cfs_rq)->clock - se->wait_start); schedstat_set(se-...
0
[]
linux-2.6
6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
18,845,777,036,793,590,000,000,000,000,000,000,000
9
sched: simplify sched_slice() Use the existing calc_delta_mine() calculation for sched_slice(). This saves a divide and simplifies the code because we share it with the other /cfs_rq->load users. It also improves code size: text data bss dec hex filename 42659 2740 144 45543 b1e...
QPDF::setAttemptRecovery(bool val) { this->attempt_recovery = val; }
0
[ "CWE-399", "CWE-835" ]
qpdf
701b518d5c56a1449825a3a37a716c58e05e1c3e
76,334,038,844,464,040,000,000,000,000,000,000,000
4
Detect recursion loops resolving objects (fixes #51) During parsing of an object, sometimes parts of the object have to be resolved. An example is stream lengths. If such an object directly or indirectly points to the object being parsed, it can cause an infinite loop. Guard against all cases of re-entrant resolution ...
rdp_send_fonts(uint16 seq) { STREAM s; s = rdp_init_data(8); out_uint16(s, 0); /* number of fonts */ out_uint16_le(s, 0); /* pad? */ out_uint16_le(s, seq); /* unknown */ out_uint16_le(s, 0x32); /* entry size */ s_mark_end(s); rdp_send_data(s, RDP_DATA_PDU_FONT2); }
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
231,001,930,612,183,530,000,000,000,000,000,000,000
14
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
Item_temptable_field(THD *thd, Name_resolution_context *context_arg, Field *field) : Item_field(thd, context_arg, field) {}
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
162,815,584,377,717,960,000,000,000,000,000,000,000
2
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
void netif_carrier_on(struct net_device *dev) { if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) { linkwatch_fire_event(dev); if (netif_running(dev)) __netdev_watchdog_up(dev); } }
0
[ "CWE-399" ]
linux-2.6
2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0
96,962,758,511,145,800,000,000,000,000,000,000,000
8
[NET]: Add preemption point in qdisc_run The qdisc_run loop is currently unbounded and runs entirely in a softirq. This is bad as it may create an unbounded softirq run. This patch fixes this by calling need_resched and breaking out if necessary. It also adds a break out if the jiffies value changes since that woul...
bool operator<=(const const_iterator &rhs) const { return !(*this > rhs); }
0
[ "CWE-416", "CWE-703" ]
hermes
d86e185e485b6330216dee8e854455c694e3a36e
113,372,828,316,493,320,000,000,000,000,000,000,000
3
Fix a bug in transient object property assignment and getUTF16Ref Summary: The returned `UTF16Ref` from `StringView::getUTF16Ref` can be invalidated by appending more contents to the same allocator. This case was encountered in `transientObjectPutErrorMessage`, resulting in using free'd memory. Reviewed By: tmikov D...
void qeth_qdio_output_handler(struct ccw_device *ccwdev, unsigned int qdio_error, int __queue, int first_element, int count, unsigned long card_ptr) { struct qeth_card *card = (struct qeth_card *) card_ptr; struct qeth_qdio_out_q *queue = card->qdio.out_qs[__queue]; struct qeth_qdio_out_buffer *buffer; i...
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
8,132,550,790,936,425,000,000,000,000,000,000,000
71
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...
int my_csr_reader( const char* i_csr_file_in, unsigned int** o_row_idx, unsigned int** o_column_idx, REALTYPE** o_values, unsigned int* o_row_count, unsigned int* o_colu...
0
[ "CWE-119", "CWE-787" ]
libxsmm
151481489192e6d1997f8bde52c5c425ea41741d
15,387,491,477,935,882,000,000,000,000,000,000,000
112
Issue #287: made CSR/CSC readers more robust against invalid input (case #1).
R_API int r_bin_java_resolve_cp_idx_print_summary(RBinJavaObj *BIN_OBJ, int idx) { RBinJavaCPTypeObj *item = NULL; if (BIN_OBJ && BIN_OBJ->cp_count < 1) { return false; } item = (RBinJavaCPTypeObj *) r_bin_java_get_item_from_bin_cp_list (BIN_OBJ, idx); if (item) { ((RBinJavaCPTypeMetas *) item->metas->type_i...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
220,098,421,718,490,800,000,000,000,000,000,000,000
15
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
int MemIo::getb() { if (p_->idx_ >= p_->size_) { p_->eof_ = true; return EOF; } return p_->data_[p_->idx_++]; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
121,645,741,719,739,070,000,000,000,000,000,000,000
8
Fix https://github.com/Exiv2/exiv2/issues/55
move_reading_point(struct archive_read *a, uint64_t offset) { struct xar *xar; xar = (struct xar *)(a->format->data); if (xar->offset - xar->h_base != offset) { /* Seek forward to the start of file contents. */ int64_t step; step = offset - (xar->offset - xar->h_base); if (step > 0) { step = __archive_r...
0
[ "CWE-125" ]
libarchive
fa7438a0ff4033e4741c807394a9af6207940d71
151,914,031,248,073,040,000,000,000,000,000,000,000
28
Do something sensible for empty strings to make fuzzers happy.
add_default_permissions (FlatpakContext *app_context) { flatpak_context_set_session_bus_policy (app_context, "org.freedesktop.portal.*", FLATPAK_POLICY_TALK); }
0
[ "CWE-20" ]
flatpak
902fb713990a8f968ea4350c7c2a27ff46f1a6c4
119,895,423,526,262,390,000,000,000,000,000,000,000
6
Use seccomp to filter out TIOCSTI ioctl This would otherwise let the sandbox add input to the controlling tty.
httpFieldValue(const char *name) /* I - String name */ { int i; /* Looping var */ for (i = 0; i < HTTP_FIELD_MAX; i ++) if (!_cups_strcasecmp(name, http_fields[i])) return ((http_field_t)i); return (HTTP_FIELD_UNKNOWN); }
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
312,725,103,446,329,840,000,000,000,000,000,000,000
11
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
int digest_password(THD *thd, LEX_USER *user_record) { /* Empty passwords stay empty */ if (user_record->password.length == 0) return 0; #if defined(HAVE_OPENSSL) /* Transform password into a password hash */ if (user_record->plugin.str == sha256_password_plugin_name.str) { char *buff= (char ...
1
[]
mysql-server
475dcde2c7856dd0050b967099a86c087d94f32f
70,076,127,673,717,810,000,000,000,000,000,000,000
58
Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD Description: my_crypt_genhash depends on the length of plaintext password. Longer the password, more is the time required to produce the transformation. An unusually large password may consume considerable amount of time...
static void run(const char *name, const char *prio, int resume[], int rounds) { pid_t child; int retval, sockets[2], status = 0; success("\ntesting %s\n\n", name); retval = socketpair(AF_UNIX, SOCK_STREAM, 0, sockets); if (retval == -1) { perror("socketpair"); fail("socketpair failed"); return; } child ...
0
[]
gnutls
c2646aeee94e71cb15c90a3147cf3b5b0ca158ca
286,894,061,962,220,180,000,000,000,000,000,000,000
32
stek: differentiate initial state from valid time window of TOTP There was a confusion in the TOTP implementation in stek.c. When the mechanism is initialized at the first time, it records the timestamp but doesn't initialize the key. This removes the timestamp recording at the initialization phase, so the key is pr...
static int nfs4_delay(long *timeout, bool interruptible) { if (interruptible) return nfs4_delay_interruptible(timeout); return nfs4_delay_killable(timeout); }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
263,132,535,877,160,730,000,000,000,000,000,000,000
6
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 void srpt_cm_drep_recv(struct ib_cm_id *cm_id) { pr_info("Received InfiniBand DREP message for cm_id %p.\n", cm_id); srpt_drain_channel(cm_id); }
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
244,855,622,690,619,600,000,000,000,000,000,000,000
5
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
void kvm_put_kvm(struct kvm *kvm) { if (refcount_dec_and_test(&kvm->users_count)) kvm_destroy_vm(kvm);
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
158,845,649,831,627,160,000,000,000,000,000,000,000
5
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static int ssl_security_cert_sig(SSL *s, SSL_CTX *ctx, X509 *x, int op) { /* Lookup signature algorithm digest */ int secbits, nid, pknid; /* Don't check signature if self signed */ if ((X509_get_extension_flags(x) & EXFLAG_SS) != 0) return 1; if (!X509_get_signature_info(x, &nid, &pknid, &s...
0
[ "CWE-476" ]
openssl
5235ef44b93306a14d0b6c695b13c64b16e1fdec
331,617,192,545,386,350,000,000,000,000,000,000,000
17
Fix SSL_check_chain() The function SSL_check_chain() can be used by applications to check that a cert and chain is compatible with the negotiated parameters. This could be useful (for example) from the certificate callback. Unfortunately this function was applying TLSv1.2 sig algs rules and did not work correctly if T...
has_sequence_privilege_id(PG_FUNCTION_ARGS) { Oid sequenceoid = PG_GETARG_OID(0); text *priv_type_text = PG_GETARG_TEXT_P(1); Oid roleid; AclMode mode; AclResult aclresult; char relkind; roleid = GetUserId(); mode = convert_sequence_priv_string(priv_type_text); relkind = get_rel_relkind(sequenceoid);...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
16,950,508,964,412,783,000,000,000,000,000,000,000
24
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
ip_cancel_eval(argc, argv, self) int argc; VALUE *argv; VALUE self; { VALUE retval; if (rb_scan_args(argc, argv, "01", &retval) == 0) { retval = Qnil; } if (ip_cancel_eval_core(get_ip(self)->ip, retval, 0) == TCL_OK) { return Qtrue; } else { return Qfalse; } }
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
168,124,083,081,842,820,000,000,000,000,000,000,000
16
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
int llhttp__internal__c_mul_add_status_code( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp, int match) { /* Multiplication overflow */ if (state->status_code > 0xffff / 10) { return 1; } state->status_code *= 10; /* Addition overflow */ if (match >= 0...
0
[ "CWE-444" ]
node
641f786bb1a1f6eb1ff8750782ed939780f2b31a
110,629,756,616,098,290,000,000,000,000,000,000,000
30
http: unset `F_CHUNKED` on new `Transfer-Encoding` Duplicate `Transfer-Encoding` header should be a treated as a single, but with original header values concatenated with a comma separator. In the light of this, even if the past `Transfer-Encoding` ended with `chunked`, we should be not let the `F_CHUNKED` to leak int...
connection_ap_fail_onehop(const char *failed_digest, cpath_build_state_t *build_state) { entry_connection_t *entry_conn; char digest[DIGEST_LEN]; smartlist_t *conns = get_connection_array(); SMARTLIST_FOREACH_BEGIN(conns, connection_t *, conn) { if (conn->marked_for_close || ...
0
[ "CWE-532" ]
tor
80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9
332,722,878,584,189,960,000,000,000,000,000,000,000
35
Log warning when connecting to soon-to-be-deprecated v2 onions.
ArgParser::argPreserveUnreferencedResources() { o.preserve_unreferenced_page_resources = true; }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
243,896,634,078,250,630,000,000,000,000,000,000,000
4
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 ...
ofputil_count_port_stats(const struct ofp_header *oh) { struct ofpbuf b = ofpbuf_const_initializer(oh, ntohs(oh->length)); ofpraw_pull_assert(&b); for (size_t n = 0; ; n++) { struct ofputil_port_stats ps; if (ofputil_decode_port_stats(&ps, &b)) { return n; } } }
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
128,795,434,911,060,760,000,000,000,000,000,000,000
12
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static void snd_dragonfly_quirk_db_scale(struct usb_mixer_interface *mixer, struct snd_kcontrol *kctl) { /* Approximation using 10 ranges based on output measurement on hw v1.2. * This seems close to the cubic mapping e.g. alsamixer uses. */ static const DECLARE_TLV_DB_RANGE(scale, 0, 1, TLV_DB_MINMAX_ITE...
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
305,515,515,661,939,930,000,000,000,000,000,000,000
23
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...
void esp_transfer_data(SCSIRequest *req, uint32_t len) { ESPState *s = req->hba_private; assert(!s->do_cmd); trace_esp_transfer_data(s->dma_left, s->ti_size); s->async_len = len; s->async_buf = scsi_req_get_buf(req); if (s->dma_left) { esp_do_dma(s); } else if (s->dma_counter != 0 &...
0
[ "CWE-787" ]
qemu
926cde5f3e4d2504ed161ed0cb771ac7cad6fd11
168,260,236,915,117,600,000,000,000,000,000,000,000
16
scsi: esp: make cmdbuf big enough for maximum CDB size While doing DMA read into ESP command buffer 's->cmdbuf', it could write past the 's->cmdbuf' area, if it was transferring more than 16 bytes. Increase the command buffer size to 32, which is maximum when 's->do_cmd' is set, and add a check on 'len' to avoid OOB ...
static void add_protected_variable(char *varname TSRMLS_DC) /* {{{ */ { int dummy = 1; normalize_protected_variable(varname TSRMLS_CC); zend_hash_add(&PG(rfc1867_protected_variables), varname, strlen(varname)+1, &dummy, sizeof(int), NULL); }
0
[ "CWE-399" ]
php-src
4605d536d23b00813d11cc906bb48d39bdcf5f25
33,776,232,729,214,474,000,000,000,000,000,000,000
7
Fixed bug #69364 - use smart_str to assemble strings
static int safe_directory_cb(const char *key, const char *value, void *d) { struct safe_directory_data *data = d; if (strcmp(key, "safe.directory")) return 0; if (!value || !*value) { data->is_safe = 0; } else if (!strcmp(value, "*")) { data->is_safe = 1; } else { const char *interpolated = NULL; if (...
0
[ "CWE-22" ]
git
3b0bf2704980b1ed6018622bdf5377ec22289688
168,449,156,355,216,030,000,000,000,000,000,000,000
23
setup: tighten ownership checks post CVE-2022-24765 8959555cee7 (setup_git_directory(): add an owner check for the top-level directory, 2022-03-02), adds a function to check for ownership of repositories using a directory that is representative of it, and ways to add exempt a specific repository from said check if nee...
scanner_append_hole (parser_context_t *context_p, scanner_context_t *scanner_context_p) { scanner_literal_pool_t *literal_pool_p = scanner_context_p->active_literal_pool_p; lexer_lit_location_t *literal_p; literal_p = (lexer_lit_location_t *) parser_list_append (context_p, &literal_pool_p->literal_pool); lite...
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
133,669,785,491,083,450,000,000,000,000,000,000,000
12
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 MP4_ReadBox_sidx( stream_t *p_stream, MP4_Box_t *p_box ) { MP4_READBOX_ENTER( MP4_Box_data_sidx_t ); MP4_Box_data_sidx_t *p_sidx_data = p_box->data.p_sidx; MP4_GETVERSIONFLAGS( p_sidx_data ); MP4_GET4BYTES( p_sidx_data->i_reference_ID ); MP4_GET4BYTES( p_sidx_data->i_timescale ); ...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
11,261,486,116,549,042,000,000,000,000,000,000,000
57
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
delete_conn(struct conn *conn) { free(conn->nat_info); free(conn->alg); free(conn); }
0
[ "CWE-400" ]
ovs
abd7a457652e6734902720fe6a5dddb3fc0d1e3b
260,665,299,184,679,750,000,000,000,000,000,000,000
6
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...
int ldb_val_string_cmp(const struct ldb_val *v, const char *str) { size_t len = strlen(str); if (len != v->length) { return len - v->length; } return strncmp((const char *)v->data, str, len); }
0
[ "CWE-200" ]
samba
7efe8182c165fbf17d2f88c173527a7a554e214b
286,341,927,577,986,900,000,000,000,000,000,000,000
8
CVE-2022-32746 ldb: Add flag to mark message element values as shared When making a shallow copy of an ldb message, mark the message elements of the copy as sharing their values with the message elements in the original message. This flag value will be heeded in the next commit. BUG: https://bugzilla.samba.org/show_...
int x509parse_crl( x509_crl *chain, const unsigned char *buf, size_t buflen ) { int ret; size_t len; unsigned char *p, *end; x509_crl *crl; #if defined(POLARSSL_PEM_C) size_t use_len; pem_context pem; #endif crl = chain; /* * Check for valid input */ if( crl == NULL || bu...
0
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
245,576,464,706,492,870,000,000,000,000,000,000,000
286
RSA blinding on CRT operations to counter timing attacks
static NTSTATUS cli_tdis_recv(struct tevent_req *req) { return tevent_req_simple_recv_ntstatus(req); }
0
[ "CWE-94" ]
samba
94295b7aa22d2544af5323bca70d3dcb97fd7c64
261,969,878,195,329,970,000,000,000,000,000,000,000
4
CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860 Signed-off-by: Stefan Metzmacher <metze@samba.org>