func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void FUNC(pred_angular_0)(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int c_idx, int mode) { FUNC(pred_angular)(src, top, left, stride, c_idx, mode, 1 << 2); }
0
[ "CWE-703" ]
FFmpeg
dfefc9097e9b4bb20442e65454a40043bd189b3d
4,628,007,204,762,225,400,000,000,000,000,000,000
6
avcodec/hevcpred_template: also initialize top[-1] for constrained intra prediction Fixes out of array read Fixes: 387713a12dc5cfa27fcb4178084ce1ea-asan_stack-oob_131176a_1182_cov_3861068719_CAINIT_C_SHARP_3.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at...
static int shash_default_export(struct shash_desc *desc, void *out) { memcpy(out, shash_desc_ctx(desc), crypto_shash_descsize(desc->tfm)); return 0; }
0
[ "CWE-787" ]
linux
af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1
153,527,069,332,899,830,000,000,000,000,000,000,000
5
crypto: hmac - require that the underlying hash algorithm is unkeyed Because the HMAC template didn't check that its underlying hash algorithm is unkeyed, trying to use "hmac(hmac(sha3-512-generic))" through AF_ALG or through KEYCTL_DH_COMPUTE resulted in the inner HMAC being used without having been keyed, resulting ...
int security_genfs_sid(const char *fstype, char *path, u16 orig_sclass, u32 *sid) { int len; u16 sclass; struct genfs *genfs; struct ocontext *c; int rc, cmp = 0; while (path[0] == '/' && path[1] == '/') path++; read_lock(&policy_rwlock); sclass = unmap_class(orig_sclass); *sid ...
0
[ "CWE-20" ]
linux
2172fa709ab32ca60e86179dc67d0857be8e2c98
165,825,767,182,836,070,000,000,000,000,000,000,000
52
SELinux: Fix kernel BUG on empty security contexts. Setting an empty security context (length=0) on a file will lead to incorrectly dereferencing the type and other fields of the security context structure, yielding a kernel BUG. As a zero-length security context is never valid, just reject all such security contexts...
int vmx_set_efer(struct kvm_vcpu *vcpu, u64 efer) { struct vcpu_vmx *vmx = to_vmx(vcpu); struct vmx_uret_msr *msr = vmx_find_uret_msr(vmx, MSR_EFER); /* Nothing to do if hardware doesn't support EFER. */ if (!msr) return 0; vcpu->arch.efer = efer; if (efer & EFER_LMA) { vm_entry_controls_setbit(to_vmx(vcpu)...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
329,058,359,701,893,000,000,000,000,000,000,000,000
21
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
**/ CImg<T>& operator/=(const char *const expression) { return div((+*this)._fill(expression,true,1,0,0,"operator/=",this));
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
247,499,069,078,650,900,000,000,000,000,000,000,000
3
.
static void invalidate_and_set_dirty(MemoryRegion *mr, hwaddr addr, hwaddr length) { }
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
227,122,332,161,295,200,000,000,000,000,000,000,000
4
Fix crash when mapping a big memory and calling uc_close
void auth_spa_init(auth_instance *ablock) {}
0
[ "CWE-125" ]
exim
57aa14b216432be381b6295c312065b2fd034f86
295,511,098,189,415,540,000,000,000,000,000,000,000
1
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
static void intel_pmu_disable_event(struct perf_event *event) { struct hw_perf_event *hwc = &event->hw; struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); if (unlikely(hwc->idx == INTEL_PMC_IDX_FIXED_BTS)) { intel_pmu_disable_bts(); intel_pmu_drain_bts_buffer(); return; } cpuc->intel_ctrl_guest_ma...
0
[ "CWE-20", "CWE-401" ]
linux
f1923820c447e986a9da0fc6bf60c1dccdf0408e
133,156,277,407,567,780,000,000,000,000,000,000,000
31
perf/x86: Fix offcore_rsp valid mask for SNB/IVB The valid mask for both offcore_response_0 and offcore_response_1 was wrong for SNB/SNB-EP, IVB/IVB-EP. It was possible to write to reserved bit and cause a GP fault crashing the kernel. This patch fixes the problem by correctly marking the reserved bits in the valid m...
sctp_disposition_t sctp_sf_eat_data_fast_4_4(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *chunk = arg; int error; if (!sctp_vtag_verify(chunk, asoc)) { sctp_add_cmd_sf(c...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
173,741,903,749,252,200,000,000,000,000,000,000,000
54
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
void mwifiex_rotate_priolists(struct mwifiex_private *priv, struct mwifiex_ra_list_tbl *ra, int tid) { struct mwifiex_adapter *adapter = priv->adapter; struct mwifiex_bss_prio_tbl *tbl = adapter->bss_prio_tbl; struct mwifiex_tid_tbl *tid_ptr = &priv->wmm.tid_tbl_ptr[tid]; spin_lock_bh(&tbl[priv->bss_prio...
0
[ "CWE-787" ]
linux
3a9b153c5591548612c3955c9600a98150c81875
126,975,392,854,195,780,000,000,000,000,000,000,000
25
mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status() mwifiex_ret_wmm_get_status() calls memcpy() without checking the destination size.Since the source is given from remote AP which contains illegal wmm elements , this may trigger a heap buffer overflow. Fix it by putting the length check before call...
TEST(RoleGraphTest, AddPrivileges) { RoleName roleA("roleA", "dbA"); RoleGraph graph; ASSERT_OK(graph.createRole(roleA)); // Test adding a single privilege ActionSet actions; actions.addAction(ActionType::find); ASSERT_OK(graph.addPrivilegeToRole(roleA, Privilege(dbAResource, actions))); ...
0
[ "CWE-863" ]
mongo
521e56b407ac72bc69a97a24d1253f51a5b6e81b
285,737,758,314,243,100,000,000,000,000,000,000,000
51
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON
int ssl3_get_new_session_ticket(SSL *s) { int ok, al, ret = 0, ticklen; long n; const unsigned char *p; unsigned char *d; unsigned long ticket_lifetime_hint; n = s->method->ssl_get_message(s, SSL3_ST_CR_SESSION_TICKET_A, SSL3...
0
[]
openssl
ab650f07a0dabc01a4410f8f702c3cea7932da62
262,837,327,370,754,840,000,000,000,000,000,000,000
107
Avoid KCI attack for GOST Russian GOST ciphersuites are vulnerable to the KCI attack because they use long-term keys to establish the connection when ssl client authorization is on. This change brings the GOST implementation into line with the latest specs in order to avoid the attack. It should not break backwards co...
const uchar *unpack(uchar* to, const uchar *from, const uchar *from_end, uint param_data __attribute__((unused))) { return unpack_int32(to, from, from_end); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
257,794,445,173,794,300,000,000,000,000,000,000,000
5
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
countAllSwitchActions (union SWF_ACTION *actions, union SWF_ACTION *pre) { int i,j=1; if (actions->SWF_ACTIONRECORD.ActionCode==SWFACTION_IF && pre->SWF_ACTIONRECORD.ActionCode==SWFACTION_STRICTEQUALS ) { for(i=0; i < ((struct SWF_ACTIONIF*)actions)->numActions; i++) { j+=countAllSwitchActions(&((struct SWF_A...
0
[ "CWE-119", "CWE-125" ]
libming
da9d86eab55cbf608d5c916b8b690f5b76bca462
9,645,481,100,813,161,000,000,000,000,000,000,000
13
decompileAction: Prevent heap buffer overflow and underflow with using OpCode
longlong Field_medium::val_int(void) { ASSERT_COLUMN_MARKED_FOR_READ; long j= unsigned_flag ? (long) uint3korr(ptr) : sint3korr(ptr); return (longlong) j; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
117,459,542,329,150,340,000,000,000,000,000,000,000
6
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
R_API int U(r_bin_java_utf8_cp_set)(RBinJavaObj * bin, ut16 idx, const ut8 * buffer, ut32 len) { RBinJavaCPTypeObj *cp_obj = r_bin_java_get_item_from_bin_cp_list (bin, idx); if (!cp_obj) { return false; } eprintf ("Writing %d byte(s) (%s)\n", len, buffer); // r_bin_java_check_reset_cp_obj(cp_obj, R_BIN_JAVA_CP_I...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
130,970,780,896,076,790,000,000,000,000,000,000,000
23
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static void io_destruct_skb(struct sk_buff *skb) { struct io_ring_ctx *ctx = skb->sk->sk_user_data; if (ctx->io_wq) io_wq_flush(ctx->io_wq); unix_destruct_scm(skb); }
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
241,626,237,975,752,050,000,000,000,000,000,000,000
9
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
static ASS_Style *handle_selective_style_overrides(ASS_Renderer *render_priv, ASS_Style *rstyle) { // The script style is the one the event was declared with. ASS_Style *script = render_priv->track->styles + render_priv->state.event->Sty...
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
197,465,056,128,687,950,000,000,000,000,000,000,000
99
Fix line wrapping mode 0/3 bugs This fixes two separate bugs: a) Don't move a linebreak into the first symbol. This results in a empty line at the front, which does not help to equalize line lengths at all. Instead, merge line with the second one. b) When moving a linebreak into a symbol that already is a break...
static void write_array(bytearray_t * bplist, node_t* node, hashtable_t* ref_table, uint8_t dict_param_size) { uint64_t idx = 0; uint8_t *buff = NULL; node_t* cur = NULL; uint64_t i = 0; uint64_t size = node_n_children(node); uint8_t marker = BPLIST_ARRAY | (size < 15 ? size : 0xf); byte_a...
0
[ "CWE-770" ]
libplist
26061aac4ec75e7a4469a9aab9a424716223e5c4
149,994,977,156,935,910,000,000,000,000,000,000,000
36
bplist: Check for invalid offset_size in bplist trailer
static int skb_prepare_for_shift(struct sk_buff *skb) { return skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC); }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
220,363,602,768,168,130,000,000,000,000,000,000,000
4
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
static int usb_device_post_load(void *opaque, int version_id) { USBDevice *dev = opaque; if (dev->state == USB_STATE_NOTATTACHED) { dev->attached = 0; } else { dev->attached = 1; } if (dev->setup_index < 0 || dev->setup_len < 0 || dev->setup_index >= sizeof(dev->data...
0
[ "CWE-119" ]
qemu
9f8e9895c504149d7048e9fc5eb5cbb34b16e49a
161,547,349,075,987,990,000,000,000,000,000,000,000
17
usb: sanity check setup_index+setup_len in post_load CVE-2013-4541 s->setup_len and s->setup_index are fed into usb_packet_copy as size/offset into s->data_buf, it's possible for invalid state to exploit this to load arbitrary data. setup_len and setup_index should be checked to make sure they are not negative. Cc:...
static inline int xfrm_replay_verify_len(struct xfrm_replay_state_esn *replay_esn, struct nlattr *rp) { struct xfrm_replay_state_esn *up; int ulen; if (!replay_esn || !rp) return 0; up = nla_data(rp); ulen = xfrm_replay_state_esn_len(up); /* Check the overall length and the internal bitmap length to av...
0
[ "CWE-284" ]
linux
f843ee6dd019bcece3e74e76ad9df0155655d0df
138,303,508,869,529,020,000,000,000,000,000,000,000
24
xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder Kees Cook has pointed out that xfrm_replay_state_esn_len() is subject to wrapping issues. To ensure we are correctly ensuring that the two ESN structures are the same size compare both the overall size as reported by xfrm_replay_state_esn_len() and the inter...
int cgroup_migrate_prepare_dst(struct cgroup_mgctx *mgctx) { struct css_set *src_cset, *tmp_cset; lockdep_assert_held(&cgroup_mutex); /* look up the dst cset for each src cset and link it to src */ list_for_each_entry_safe(src_cset, tmp_cset, &mgctx->preloaded_src_csets, mg_preload_node) { struct css_set *...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
310,694,263,887,906,300,000,000,000,000,000,000,000
48
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
static const char *fault_name(unsigned int esr) { const struct fault_info *inf = fault_info + (esr & 63); return inf->name; }
0
[ "CWE-241", "CWE-19" ]
linux
5a0fdfada3a2aa50d7b947a2e958bf00cbe0d830
123,279,069,454,946,780,000,000,000,000,000,000,000
5
Revert "arm64: Introduce execute-only page access permissions" This reverts commit bc07c2c6e9ed125d362af0214b6313dca180cb08. While the aim is increased security for --x memory maps, it does not protect against kernel level reads. Until SECCOMP is implemented for arm64, revert this patch to avoid giving a false idea o...
PHP_FUNCTION(imagefilltoborder) { zval *IM; long x, y, border, col; gdImagePtr im; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM, &x, &y, &border, &col) == FAILURE) { return; } ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd); gdImageFillToBorder(im, x, y, border, col); RETUR...
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
258,572,456,488,866,270,000,000,000,000,000,000,000
14
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
adv_error adv_png_write_idat( unsigned pix_width, unsigned pix_height, unsigned pix_pixel, const uint8* pix_ptr, int pix_pixel_pitch, int pix_scanline_pitch, adv_bool fast, adv_fz* f, unsigned* count) { uint8* z_ptr; uint8* r_ptr; unsigned char filter; unsigned long z_size; unsigned res_size; const uint8* p; ...
0
[ "CWE-119" ]
advancecomp
78a56b21340157775be2462a19276b4d31d2bd01
83,636,091,875,155,860,000,000,000,000,000,000,000
115
Fix a buffer overflow caused by invalid images
static inline int range_get_symbol(APEContext *ctx, const uint16_t counts[], const uint16_t counts_diff[]) { int symbol, cf; cf = range_decode_culshift(ctx, 16); if(cf > 65492){ symbol= cf - 65535 + 63; range_decode_upda...
0
[ "CWE-125" ]
FFmpeg
ba4beaf6149f7241c8bd85fe853318c2f6837ad0
307,519,742,930,657,200,000,000,000,000,000,000,000
22
avcodec/apedec: Fix integer overflow Fixes: out of array access Fixes: PoC.ape and others Found-by: Bingchang, Liu@VARAS of IIE Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
HttpTransact::delete_warning_value(HTTPHdr* to_warn, HTTPWarningCode warning_code) { int w_code = (int) warning_code; MIMEField *field = to_warn->field_find(MIME_FIELD_WARNING, MIME_LEN_WARNING);; // Loop over the values to see if we need to do anything if (field) { HdrCsvIter iter; int valid; int...
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
275,686,853,118,758,340,000,000,000,000,000,000,000
53
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
CModule::EModRet CModule::OnUserCTCPReply(CString& sTarget, CString& sMessage) { return CONTINUE; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
142,327,137,734,237,520,000,000,000,000,000,000,000
3
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
qtdemux_parse_svq3_stsd_data (GstQTDemux * qtdemux, GNode * stsd, guint8 ** gamma, GstBuffer ** seqh) { guint8 *_gamma = NULL; GstBuffer *_seqh = NULL; guint8 *stsd_data = stsd->data; guint32 length = QT_UINT32 (stsd_data); guint16 version; if (length < 32) { GST_WARNING_OBJECT (qtdemux, "stsd too ...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
72,316,829,004,530,370,000,000,000,000,000,000,000
90
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
OJPEGCleanup(TIFF* tif) { OJPEGState* sp=(OJPEGState*)tif->tif_data; if (sp!=0) { tif->tif_tagmethods.vgetfield=sp->vgetparent; tif->tif_tagmethods.vsetfield=sp->vsetparent; tif->tif_tagmethods.printdir=sp->printdir; if (sp->qtable[0]!=0) _TIFFfree(sp->qtable[0]); if (sp->qtable[1]!=0) _TIFFfree(sp->...
0
[ "CWE-369" ]
libtiff
43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec
58,300,934,456,643,400,000,000,000,000,000,000,000
45
* libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. Reported by Agostino Sarubbo. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611
spool_dname(const uschar * purpose, uschar * subdir) { return string_sprintf("%s/%s/%s/%s", spool_directory, queue_name, purpose, subdir); }
0
[ "CWE-78" ]
exim
7ea1237c783e380d7bdb86c90b13d8203c7ecf26
70,949,443,896,862,390,000,000,000,000,000,000,000
5
Events: raise msg:fail:internal & msg:complete for -Mrm. Bug 2310
archive_write_disk_set_acls(struct archive *a, int fd, const char *name, struct archive_acl *abstract_acl, __LA_MODE_T mode) { int ret = ARCHIVE_OK; #if !ARCHIVE_ACL_LIBRICHACL (void)mode; /* UNUSED */ #endif #if ARCHIVE_ACL_LIBRICHACL if ((archive_acl_types(abstract_acl) & ARCHIVE_ENTRY_ACL_TYPE_NFS4) !...
1
[ "CWE-59", "CWE-61" ]
libarchive
fba4f123cc456d2b2538f811bb831483bf336bad
218,137,983,324,131,330,000,000,000,000,000,000,000
37
Fix handling of symbolic link ACLs On Linux ACLs on symbolic links are not supported. We must avoid calling acl_set_file() on symbolic links as their targets are modified instead. While here, do not try to set default ACLs on non-directories. Fixes #1565
unsigned int issue_flags, u32 slot_index) __must_hold(&req->ctx->uring_lock) { struct io_ring_ctx *ctx = req->ctx; bool needs_switch = false; struct io_fixed_file *file_slot; int ret; if (file->f_op == &io_uring_fops) return -EBADF; if (!ctx->file_data) return -ENXIO; if (slot_index >= ctx->nr_user_fi...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
48,139,833,952,574,940,000,000,000,000,000,000,000
47
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
void ping_rcv(struct sk_buff *skb) { struct sock *sk; struct net *net = dev_net(skb->dev); struct icmphdr *icmph = icmp_hdr(skb); /* We assume the packet has already been checked by icmp_rcv */ pr_debug("ping_rcv(skb=%p,id=%04x,seq=%04x)\n", skb, ntohs(icmph->un.echo.id), ntohs(icmph->un.echo.sequence)); /*...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
296,545,169,221,069,600,000,000,000,000,000,000,000
25
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
gboolean menu_cache_dir_is_visible(MenuCacheDir *dir) { return ((dir->flags & FLAG_IS_NODISPLAY) == 0); }
0
[ "CWE-20" ]
menu-cache
56f66684592abf257c4004e6e1fff041c64a12ce
337,859,212,417,880,750,000,000,000,000,000,000,000
4
Fix potential access violation, use runtime user dir instead of tmp dir. Note: it limits libmenu-cache compatibility to menu-cached >= 0.7.0.
get_nth_entry(qf_list_T *qfl, int errornr, int *new_qfidx) { qfline_T *qf_ptr = qfl->qf_ptr; int qf_idx = qfl->qf_index; // New error number is less than the current error number while (errornr < qf_idx && qf_idx > 1 && qf_ptr->qf_prev != NULL) { --qf_idx; qf_ptr = qf_ptr->qf_prev; } // ...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
190,763,563,376,661,400,000,000,000,000,000,000,000
22
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
static __inline VOID CalculateIpChecksum(IPv4Header *pIpHeader) { pIpHeader->ip_xsum = 0; pIpHeader->ip_xsum = CheckSumCalculatorFlat(pIpHeader, IP_HEADER_LENGTH(pIpHeader)); }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
319,788,967,155,919,530,000,000,000,000,000,000,000
5
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static int sftp_enqueue(sftp_session sftp, sftp_message msg) { sftp_request_queue queue = NULL; sftp_request_queue ptr; queue = request_queue_new(msg); if (queue == NULL) { return -1; } ssh_log(sftp->session, SSH_LOG_PACKET, "Queued msg type %d id %d", msg->id, msg->packet_type); if(sft...
0
[]
libssh
4d8420f3282ed07fc99fc5e930c17df27ef1e9b2
195,973,143,209,959,800,000,000,000,000,000,000,000
25
sftp: Fix bug in sftp_mkdir not returning on error. resolves: #84 (cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44)
ofputil_decode_meter_stats(struct ofpbuf *msg, struct ofputil_meter_stats *ms, struct ofpbuf *bands) { const struct ofp13_meter_stats *oms; enum ofperr err; /* Pull OpenFlow headers for the first call. */ if (!msg->header) { ofpraw_pull_asse...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
318,807,658,067,580,200,000,000,000,000,000,000,000
40
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 kvm_destroy_vm(struct kvm *kvm) { int i; struct mm_struct *mm = kvm->mm; kvm_arch_sync_events(kvm); spin_lock(&kvm_lock); list_del(&kvm->vm_list); spin_unlock(&kvm_lock); kvm_free_irq_routing(kvm); for (i = 0; i < KVM_NR_BUSES; i++) kvm_io_bus_destroy(kvm->buses[i]); kvm_coalesced_mmio_free(kvm)...
0
[ "CWE-20" ]
linux
338c7dbadd2671189cec7faf64c84d01071b3f96
316,700,496,769,190,340,000,000,000,000,000,000,000
26
KVM: Improve create VCPU parameter (CVE-2013-4587) In multiple functions the vcpu_id is used as an offset into a bitfield. Ag malicious user could specify a vcpu_id greater than 255 in order to set or clear bits in kernel memory. This could be used to elevate priveges in the kernel. This patch verifies that the vcp...
virDomainSmartcardDefParseXML(virDomainXMLOptionPtr xmlopt, xmlNodePtr node, xmlXPathContextPtr ctxt, unsigned int flags) { xmlNodePtr cur; virDomainSmartcardDefPtr def; size_t i; g_autofree char *mode = NULL; ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
186,625,510,674,457,740,000,000,000,000,000,000,000
126
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
Returns new DateTime object */ PHP_FUNCTION(date_create_immutable) { zval *timezone_object = NULL; char *time_str = NULL; int time_str_len = 0; zval datetime_object; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO!", &time_str, &time_str_len, &timezone_objec...
0
[]
php-src
bb057498f7457e8b2eba98332a3bad434de4cf12
303,441,937,677,650,170,000,000,000,000,000,000,000
18
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().
void nedpmalloc_stats(nedpool *p) THROWSPEC { int n; if(!p) { p=&syspool; if(!syspool.threads) InitPool(&syspool, 0, -1); } for(n=0; p->m[n]; n++) { mspace_malloc_stats(p->m[n]); } }
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
319,525,131,271,072,180,000,000,000,000,000,000,000
9
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
static int output_configure(AACContext *ac, uint8_t layout_map[MAX_ELEM_ID * 4][3], int tags, enum OCStatus oc_type, int get_new_frame) { AVCodecContext *avctx = ac->avctx; int i, channels = 0, ret; uint64_t layout = 0; if (ac->oc[1].layout_map !=...
0
[ "CWE-703" ]
FFmpeg
6e42ccb9dbc13836cd52cda594f819d17af9afa2
117,875,289,815,901,850,000,000,000,000,000,000,000
48
avcodec/aacdec: Fix pulse position checks in decode_pulses() Fixes out of array read Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
void fp_lshd(fp_int *a, int x) { int y; /* move up and truncate as required */ y = MIN(a->used + x - 1, (int)(FP_SIZE-1)); /* store new size */ a->used = y + 1; /* move digits */ for (; y >= x; y--) { a->dp[y] = a->dp[y-x]; } /* zero lower digits */ for (; y >= 0; y--...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
90,415,939,252,247,550,000,000,000,000,000,000,000
23
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
int set_final_arp(unsigned char *buf, unsigned char *mymac) { if(buf == NULL) return -1; //shifted by 10bytes to set source IP as target IP :) buf[0] = 0x08; // IP buf[1] = 0x00; buf[2] = 0x06; //hardware size buf[3] = 0x04; //protocol size buf[4] = 0x00; buf[5] = 0x01; //reque...
0
[ "CWE-787" ]
aircrack-ng
091b153f294b9b695b0b2831e65936438b550d7b
55,443,359,765,806,240,000,000,000,000,000,000,000
21
Aireplay-ng: Fixed tcp_test stack overflow (Closes #14 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2417 28c6078b-6c39-48e3-add9-af49d547ecab
int kgdb_has_hit_break(unsigned long addr) { int i; for (i = 0; i < KGDB_MAX_BREAKPOINTS; i++) { if (kgdb_break[i].state == BP_ACTIVE && kgdb_break[i].bpt_addr == addr) return 1; } return 0; }
0
[ "CWE-787" ]
linux
eadb2f47a3ced5c64b23b90fd2a3463f63726066
219,589,613,989,615,000,000,000,000,000,000,000,000
11
lockdown: also lock down previous kgdb use KGDB and KDB allow read and write access to kernel memory, and thus should be restricted during lockdown. An attacker with access to a serial port (for example, via a hypervisor console, which some cloud vendors provide over the network) could trigger the debugger so it is i...
static int svm_check_intercept(struct kvm_vcpu *vcpu, struct x86_instruction_info *info, enum x86_intercept_stage stage) { struct vcpu_svm *svm = to_svm(vcpu); int vmexit, ret = X86EMUL_CONTINUE; struct __x86_intercept icpt_info; struct vmcb *vmcb = svm->vmcb; if (info->intercept >= ARRAY_SIZE...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
130,077,607,650,841,600,000,000,000,000,000,000,000
120
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
static void wait_sync(struct vrend_fence *fence) { struct vrend_context *ctx = fence->ctx; do_wait(fence, /* can_block */ true); mtx_lock(&vrend_state.fence_mutex); if (vrend_state.use_async_fence_cb) { vrend_renderer_check_queries_locked(); /* to be able to call free_fence_locked without lock...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
100,460,182,677,145,230,000,000,000,000,000,000,000
27
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>
static inline unsigned int frame_vector_count(struct frame_vector *vec) { return vec->nr_frames; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
175,436,022,896,917,020,000,000,000,000,000,000,000
4
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 ...
rack_input(VALUE self) { return req_rack_input((agooReq)DATA_PTR(self)); }
0
[ "CWE-444", "CWE-61" ]
agoo
23d03535cf7b50d679a60a953a0cae9519a4a130
5,765,510,856,541,788,000,000,000,000,000,000,000
3
Remote addr (#99) * REMOTE_ADDR added * Ready for merge
static int resolve_remote_submodule_branch(int argc, const char **argv, const char *prefix) { const char *ret; struct strbuf sb = STRBUF_INIT; if (argc != 2) die("submodule--helper remote-branch takes exactly one arguments, got %d", argc); ret = remote_submodule_branch(argv[1]); if (!ret) die("submodule %s ...
0
[ "CWE-88" ]
git
98afac7a7cefdca0d2c4917dd8066a59f7088265
4,788,190,212,082,394,000,000,000,000,000,000,000
16
submodule--helper: use "--" to signal end of clone options When we clone a submodule, we call "git clone $url $path". But there's nothing to say that those components can't begin with a dash themselves, confusing git-clone into thinking they're options. Let's pass "--" to make it clear what we expect. There's no test...
main( int argc, char ** argv) { int c; char *command; application_argument_t argument; int i; char *gnutar_onefilesystem_value = NULL; char *gnutar_sparse_value = NULL; char *gnutar_atimepreserve_value = NULL; char *gnutar_checkdevice_value = NULL; char *gnutar_no_unquote_va...
0
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
63,468,657,925,037,290,000,000,000,000,000,000,000
442
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
export_mime_file (int parent_fd, const char *name, struct stat *stat_buf, char **target, GCancellable *cancellable, GError **error) { glnx_autofd int desktop_fd = -1; g_autofree char *tmpfile_name = g_...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
214,837,559,753,146,120,000,000,000,000,000,000,000
43
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
doemit(p, op, opnd) register struct parse *p; sop op; size_t opnd; { /* avoid making error situations worse */ if (p->error != 0) return; /* deal with oversize operands ("can't happen", more or less) */ assert(opnd < 1<<OPSHIFT); /* deal with undersized strip */ if (p->slen >= p->ssize) enlarge(p, (p->ssize...
0
[]
php-src
124fb22a13fafa3648e4e15b4f207c7096d8155e
187,563,937,187,563,260,000,000,000,000,000,000,000
20
Fixed bug #68739 #68740 #68741
void *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) { return (CRYPTO_get_ex_data(&s->ex_data, idx)); }
0
[ "CWE-362" ]
openssl
939b4960276b040fc0ed52232238fcc9e2e9ec21
111,190,116,284,050,970,000,000,000,000,000,000,000
4
Fix race condition in NewSessionTicket If a NewSessionTicket is received by a multi-threaded client when attempting to reuse a previous ticket then a race condition can occur potentially leading to a double free of the ticket data. CVE-2015-1791 This also fixes RT#3808 where a session ID is changed for a session alr...
void elv_rqhash_add(struct request_queue *q, struct request *rq) { struct elevator_queue *e = q->elevator; BUG_ON(ELV_ON_HASH(rq)); hash_add(e->hash, &rq->hash, rq_hash_key(rq)); rq->rq_flags |= RQF_HASHED; }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
71,903,602,043,436,080,000,000,000,000,000,000,000
8
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
static void io_close_finish(struct io_wq_work **workptr) { struct io_kiocb *req = container_of(*workptr, struct io_kiocb, work); struct io_kiocb *nxt = NULL; /* Invoked with files, we need to do the close */ if (req->work.files) { int ret; ret = filp_close(req->close.put_file, req->work.files); if (ret < 0)...
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
89,082,447,974,301,410,000,000,000,000,000,000,000
21
io_uring: grab ->fs as part of async preparation This passes it in to io-wq, so it assumes the right fs_struct when executing async work that may need to do lookups. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe <axboe@kernel.dk>
void btd_add_conn_fail_cb(btd_conn_fail_cb func) { conn_fail_list = g_slist_append(conn_fail_list, func); }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
181,826,926,822,892,340,000,000,000,000,000,000,000
4
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static void sha1_update(SHA_CTX *c, const void *data, size_t len) { const unsigned char *ptr = data; size_t res; if ((res = c->num)) { res = SHA_CBLOCK - res; if (len < res) res = len; SHA1_Update(c, ptr, res); ptr += res; len -= res; } res = len...
0
[ "CWE-310" ]
openssl
4159f311671cf3bac03815e5de44681eb758304a
297,042,516,500,626,600,000,000,000,000,000,000,000
30
Check that we have enough padding characters. Reviewed-by: Emilia Käsper <emilia@openssl.org> CVE-2016-2107 MR: #2572
static void ext4_dx_csum_set(struct inode *inode, struct ext4_dir_entry *dirent) { struct dx_countlimit *c; struct dx_tail *t; int count_offset, limit, count; if (!EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb, EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) return; c = get_dx_countlimit(inode, dirent, &count_offset); i...
0
[ "CWE-399" ]
linux
0e9a9a1ad619e7e987815d20262d36a2f95717ca
316,234,808,266,209,770,000,000,000,000,000,000,000
26
ext4: avoid hang when mounting non-journal filesystems with orphan list When trying to mount a file system which does not contain a journal, but which does have a orphan list containing an inode which needs to be truncated, the mount call with hang forever in ext4_orphan_cleanup() because ext4_orphan_del() will return...
static int doCreateImage(struct nc_state_t *nc, ncMetadata * pMeta, char *instanceId, char *volumeId, char *remoteDev) { // sanity checking if (instanceId == NULL || remoteDev == NULL || volumeId == NULL) { LOGERROR("[%s][%s] called with invalid parameters\n", ((instanceId == NULL) ? "UNKNOWN" : instanc...
0
[]
eucalyptus
c252889a46f41b4c396b89e005ec89836f2524be
52,489,404,628,272,550,000,000,000,000,000,000,000
51
Input validation, shellout hardening on back-end - validating bucketName and bucketPath in BundleInstance - validating device name in Attach and DetachVolume - removed some uses of system() and popen() Fixes EUCA-7572, EUCA-7520
static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { AVIContext *avi = s->priv_data; AVStream *st; int i, index; int64_t pos, pos_min; AVIStream *ast; /* Does not matter which stream is requested dv in avi has the * stream...
0
[ "CWE-200" ]
FFmpeg
a5d849b149ca67ced2d271dc84db0bc95a548abb
87,337,764,488,576,940,000,000,000,000,000,000,000
116
avformat/avidec: Limit formats in gab2 to srt and ass/ssa This prevents part of one exploit leading to an information leak Found-by: Emil Lerner and Pavel Cheremushkin Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static int sock_no_open(struct inode *irrelevant, struct file *dontcare) { return -ENXIO; }
0
[]
linux-2.6
644595f89620ba8446cc555be336d24a34464950
41,691,311,071,061,515,000,000,000,000,000,000,000
4
compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct timeval and struct timespec to userspace in net/socket.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
TPMS_SIG_SCHEME_RSAPSS_Unmarshal(TPMS_SIG_SCHEME_RSAPSS *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = TPMS_SCHEME_HASH_Unmarshal(target, buffer, size); } return rc; }
0
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
155,024,790,735,865,920,000,000,000,000,000,000,000
9
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static int null_callback(int ok, X509_STORE_CTX *e) { return ok; }
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
85,555,447,301,007,440,000,000,000,000,000,000,000
4
Backport OCSP fixes.
nfs_closedir(struct inode *inode, struct file *filp) { put_nfs_open_dir_context(file_inode(filp), filp->private_data); return 0; }
0
[ "CWE-909" ]
linux
ac795161c93699d600db16c1a8cc23a65a1eceaf
295,315,991,215,351,320,000,000,000,000,000,000,000
5
NFSv4: Handle case where the lookup of a directory fails If the application sets the O_DIRECTORY flag, and tries to open a regular file, nfs_atomic_open() will punt to doing a regular lookup. If the server then returns a regular file, we will happily return a file descriptor with uninitialised open state. The fix is ...
static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k, OPJ_BYTE * p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t * p_manager ) { OPJ_UINT32 i; OPJ_UINT32 l_nb_comp; OPJ_UI...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
104,698,189,175,354,640,000,000,000,000,000,000,000
427
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
DEFUN(adBmark, ADD_BOOKMARK, "Add current page to bookmarks") { Str tmp; FormList *request; tmp = Sprintf("mode=panel&cookie=%s&bmark=%s&url=%s&title=%s" #ifdef USE_M17N "&charset=%s" #endif , (Str_form_quote(localCookie()))->ptr, (Str_form_quote(Strnew_charp(BookmarkFile)))->ptr, (...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
177,048,605,966,866,070,000,000,000,000,000,000,000
28
Make temporary directory safely when ~/.w3m is unwritable
static int fbo_emulate_get_event_status_notification(struct tcmu_device *dev, uint8_t *cdb, struct iovec *iovec, size_t iov_cnt, uint8_t *sense) { struct fbo_state *state = tcmu_get_dev_private(dev); uint8_t class_req = cdb[4]; uint16_t alloc_len = tcmu_get_xfer_length(cdb...
0
[ "CWE-200" ]
tcmu-runner
8cf8208775022301adaa59c240bb7f93742d1329
304,733,481,616,711,540,000,000,000,000,000,000,000
78
removed all check_config callback implementations to avoid security issues see github issue #194 qcow.c contained an information leak, could test for existance of any file in the system file_example.c and file_optical.c allow also to test for existance of any file, plus to temporarily create empty new files anywhere...
static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { switch (hdev->product) { case USB_DEVICE_ID_KYE_ERGO_525V: /* the fixups that need to be done: * - change led usage page to button for extra buttons * - report size 8 count 1 must be size 1 count 8 for button *...
0
[ "CWE-119", "CWE-787" ]
linux
4ab25786c87eb20857bbb715c3ae34ec8fd6a214
164,685,102,845,919,440,000,000,000,000,000,000,000
61
HID: fix a couple of off-by-ones There are a few very theoretical off-by-one bugs in report descriptor size checking when performing a pre-parsing fixup. Fix those. Cc: stable@vger.kernel.org Reported-by: Ben Hawkes <hawkes@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jir...
static struct kiocb *__aio_get_req(struct kioctx *ctx) { struct kiocb *req = NULL; struct aio_ring *ring; int okay = 0; req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL); if (unlikely(!req)) return NULL; req->ki_flags = 0; req->ki_users = 2; req->ki_key = 0; req->ki_ctx = ctx; req->ki_cancel = NULL; req->...
0
[ "CWE-190" ]
linux-2.6
75e1c70fc31490ef8a373ea2a4bea2524099b478
194,147,877,586,789,020,000,000,000,000,000,000,000
42
aio: check for multiplication overflow in do_io_submit Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                retu...
static int hi3660_stub_clk_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct resource *res; unsigned int i; int ret; /* Use mailbox client without blocking */ stub_clk_chan.cl.dev = dev; stub_clk_chan.cl.tx_done = NULL; stub_clk_chan.cl.tx_block = false; stub_clk_chan.cl.knows_txdo...
0
[ "CWE-476" ]
linux
9903e41ae1f5d50c93f268ca3304d4d7c64b9311
275,956,339,678,410,400,000,000,000,000,000,000,000
36
clk: hisilicon: hi3660:Fix potential NULL dereference in hi3660_stub_clk_probe() platform_get_resource() may return NULL, add proper check to avoid potential NULL dereferencing. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = platform_get_resource(pdev, t, n); + if ...
Links *PDFDoc::getLinks(int page) { Page *p = getPage(page); if (!p) { return new Links (nullptr); } return p->getLinks(); }
0
[ "CWE-20" ]
poppler
9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f
86,828,090,556,638,590,000,000,000,000,000,000,000
7
PDFDoc::setup: Fix return value At that point xref can have gone wrong since extractPDFSubtype() can have caused a reconstruct that broke stuff so instead of unconditionally returning true, return xref->isOk() Fixes #706
get_thr_arg(void) { thr_arg *res; (void)pthread_mutex_lock(&arg_mut); if(first == NULL) (void)pthread_cond_wait(&arg_cond, &arg_mut); if((res = first) != NULL) if((first = first->next) == NULL) last = NULL; (void)pthread_mutex_unlock(&arg_mut); if(first != NULL) ...
0
[]
pound
a0c52c542ca9620a96750f9877b26bf4c84aef1b
148,292,078,513,438,620,000,000,000,000,000,000,000
15
SSL Compression Disable patch for 2.6f This patch disables SSL/TLS compression entirely. There is no config option. This prevents CRIME attacks against SSL. Note that HTTP compression is still an option. Test your server at https://www.ssllabs.com/ssldb/ Original patch by Hereward Cooper <coops@fawk.eu> Openssl 0...
PG::RecoveryCtx OSD::create_context() { ObjectStore::Transaction *t = new ObjectStore::Transaction; C_Contexts *on_applied = new C_Contexts(cct); C_Contexts *on_safe = new C_Contexts(cct); map<int, map<spg_t,pg_query_t> > *query_map = new map<int, map<spg_t, pg_query_t> >; map<int,vector<pair<pg_notify_t,...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
62,358,410,647,190,020,000,000,000,000,000,000,000
15
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static size_t bpf_ringbuf_rec_pg_off(struct bpf_ringbuf *rb, struct bpf_ringbuf_hdr *hdr) { return ((void *)hdr - (void *)rb) >> PAGE_SHIFT; }
0
[ "CWE-787" ]
bpf
4b81ccebaeee885ab1aa1438133f2991e3a2b6ea
174,448,510,031,159,900,000,000,000,000,000,000,000
5
bpf, ringbuf: Deny reserve of buffers larger than ringbuf A BPF program might try to reserve a buffer larger than the ringbuf size. If the consumer pointer is way ahead of the producer, that would be successfully reserved, allowing the BPF program to read or write out of the ringbuf allocated area. Reported-by: Ryota...
_outForeignScan(StringInfo str, const ForeignScan *node) { WRITE_NODE_TYPE("FOREIGNSCAN"); _outScanInfo(str, (const Scan *) node); WRITE_NODE_FIELD(fdw_exprs); WRITE_NODE_FIELD(fdw_private); WRITE_BOOL_FIELD(fsSystemCol); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
317,663,337,410,112,650,000,000,000,000,000,000,000
10
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 udf_do_extend_final_block(struct inode *inode, struct extent_position *last_pos, struct kernel_long_ad *last_ext, uint32_t final_block_len) { struct super_block *sb = inode->i_sb; uint32_t added_bytes; added_bytes = final_block_len - (last_ext->extLength & (sb->s_bl...
0
[ "CWE-476" ]
linux
7fc3b7c2981bbd1047916ade327beccb90994eee
334,537,366,371,509,850,000,000,000,000,000,000,000
16
udf: Fix NULL ptr deref when converting from inline format udf_expand_file_adinicb() calls directly ->writepage to write data expanded into a page. This however misses to setup inode for writeback properly and so we can crash on inode->i_wb dereference when submitting page for IO like: BUG: kernel NULL pointer dere...
int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns) { if (name == NULL || strcmp((char*)node->name, name) == 0) { if (ns) { xmlNsPtr nsPtr = attr_find_ns(node); if (nsPtr) { return (strcmp((char*)nsPtr->href, ns) == 0); } else { return FALSE; } } return TRUE; } return FALSE; }
1
[ "CWE-476" ]
php-src
3c939e3f69955d087e0bb671868f7267dfb2a502
104,103,891,196,833,960,000,000,000,000,000,000,000
15
Fix bug #80672 - Null Dereference in SoapClient
resp_print_string_error_integer(netdissect_options *ndo, register const u_char *bp, int length) { int length_cur = length, len, ret_len; const u_char *bp_ptr; /* bp points to the op; skip it */ SKIP_OPCODE(bp, length_cur); bp_ptr = bp; /* * bp now prints past the (+-;) opcode, so it's poi...
0
[ "CWE-399", "CWE-835" ]
tcpdump
db24063b01cba8e9d4d88b7d8ac70c9000c104e4
292,614,157,063,784,500,000,000,000,000,000,000,000
33
CVE-2017-12989/RESP: Make sure resp_get_length() advances the pointer for invalid lengths. Make sure that it always sends *endp before returning and that, for invalid lengths where we don't like a character in the length string, what it sets *endp to is past the character in question, so we don't run the risk of infin...
inline double factorial(const int n) { if (n<0) return cimg::type<double>::nan(); if (n<2) return 1; double res = 2; for (int i = 3; i<=n; ++i) res*=i; return res; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
178,114,574,045,420,650,000,000,000,000,000,000,000
7
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static struct transform *dce110_transform_create( struct dc_context *ctx, uint32_t inst) { struct dce_transform *transform = kzalloc(sizeof(struct dce_transform), GFP_KERNEL); if (!transform) return NULL; dce_transform_construct(transform, ctx, inst, &xfm_regs[inst], &xfm_shift, &xfm_mask); return &tran...
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
291,771,261,773,992,280,000,000,000,000,000,000,000
14
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
int nntp_check_children(struct Mailbox *m, const char *msgid) { if (!m) return -1; struct NntpMboxData *mdata = m->mdata; struct ChildCtx cc; char buf[256]; int rc; void *hc = NULL; if (!mdata || !mdata->adata) return -1; if (mdata->first_message > mdata->last_loaded) return 0; /* init ...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
48,224,279,277,100,300,000,000,000,000,000,000,000
65
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) { xmlDictPtr dict = NULL; size_t depth = 0; if (cur == NULL) return; if (doc != NULL) dict = doc->dict; while (1) { xmlElementContentPtr parent; while ((cur->c1 != NULL) || (cur->c2 != NULL)) { ...
0
[ "CWE-416" ]
libxml2
652dd12a858989b14eed4e84e453059cd3ba340e
7,755,593,718,308,526,000,000,000,000,000,000,000
57
[CVE-2022-23308] Use-after-free of ID and IDREF attributes If a document is parsed with XML_PARSE_DTDVALID and without XML_PARSE_NOENT, the value of ID attributes has to be normalized after potentially expanding entities in xmlRemoveID. Otherwise, later calls to xmlGetID can return a pointer to previously freed memory...
const char *get_body_utf8_str() { return m_body_utf8; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
158,114,567,786,936,450,000,000,000,000,000,000,000
4
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static void sock_def_error_report(struct sock *sk) { struct socket_wq *wq; rcu_read_lock(); wq = rcu_dereference(sk->sk_wq); if (skwq_has_sleeper(wq)) wake_up_interruptible_poll(&wq->wait, POLLERR); sk_wake_async(sk, SOCK_WAKE_IO, POLL_ERR); rcu_read_unlock(); }
0
[ "CWE-119", "CWE-787" ]
linux
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
325,069,207,605,518,470,000,000,000,000,000,000,000
11
net: avoid signed overflows for SO_{SND|RCV}BUFFORCE CAP_NET_ADMIN users should not be allowed to set negative sk_sndbuf or sk_rcvbuf values, as it can lead to various memory corruptions, crashes, OOM... Note that before commit 82981930125a ("net: cleanups in sock_setsockopt()"), the bug was even more serious, since ...
bool Item_func_in::fix_for_row_comparison_using_bisection(THD *thd) { if (unlikely(!(array= new (thd->mem_root) in_row(thd, arg_count-1, 0)))) return true; cmp_item_row *cmp= &((in_row*)array)->tmp; if (cmp->prepare_comparators(thd, func_name(), this, 0)) return true; fix_in_vector(); return false; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
316,277,100,380,900,200,000,000,000,000,000,000,000
10
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
const string name() override { return "get_bucket_location"; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
318,571,781,729,468,500,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
ioat3_prep_pqxor(struct dma_chan *chan, dma_addr_t dst, dma_addr_t *src, unsigned int src_cnt, size_t len, unsigned long flags) { unsigned char scf[src_cnt]; dma_addr_t pq[2]; memset(scf, 0, src_cnt); pq[0] = dst; flags |= DMA_PREP_PQ_DISABLE_Q; pq[1] = dst; /* specify valid address for disabled result */ r...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
315,259,454,720,181,950,000,000,000,000,000,000,000
17
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static int cipso_v4_map_lvl_ntoh(const struct cipso_v4_doi *doi_def, u32 net_lvl, u32 *host_lvl) { struct cipso_v4_std_map_tbl *map_tbl; switch (doi_def->type) { case CIPSO_V4_MAP_PASS: *host_lvl = net_lvl; return 0; case CIPSO_V4_MAP_TRANS: map_tbl = doi_def->map.std; if (net_lvl < map_tbl->lvl....
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
256,457,558,395,924,400,000,000,000,000,000,000,000
22
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...
bool PostgreSqlStorage::mergeBuffersPermanently(const UserId &user, const BufferId &bufferId1, const BufferId &bufferId2) { QSqlDatabase db = logDb(); if (!db.transaction()) { qWarning() << "PostgreSqlStorage::mergeBuffersPermanently(): cannot start transaction!"; qWarning() << " -" << qPrintabl...
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
231,910,280,239,956,430,000,000,000,000,000,000,000
49
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
static void use_in_memory_ccache(void) { setenv(KRB5_ENV_CCNAME, "MEMORY:cliconnect", 1); }
0
[ "CWE-94" ]
samba
94295b7aa22d2544af5323bca70d3dcb97fd7c64
257,121,085,063,636,900,000,000,000,000,000,000,000
3
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>
void growRing() { if (size_ < capacity_) { return; } const size_t new_capacity = capacity_ * 2; auto new_ring = std::make_unique<SlicePtr[]>(new_capacity); for (size_t i = 0; i < new_capacity; i++) { ASSERT(new_ring[i] == nullptr); } size_t src = start_; size_t dst = 0; ...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
166,071,270,409,658,200,000,000,000,000,000,000,000
25
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid) { int r = 0; struct hash_cell *hc; if (!md) return -ENXIO; mutex_lock(&dm_hash_cells_mutex); hc = dm_get_mdptr(md); if (!hc || hc->md != md) { r = -ENXIO; goto out; } if (name) strcpy(name, hc->name); if (uuid) strcpy(uuid...
0
[ "CWE-787" ]
linux
4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a
315,606,020,692,791,360,000,000,000,000,000,000,000
25
dm ioctl: fix out of bounds array access when no devices If there are not any dm devices, we need to zero the "dev" argument in the first structure dm_name_list. However, this can cause out of bounds write, because the "needed" variable is zero and len may be less than eight. Fix this bug by reporting DM_BUFFER_FULL_...
static u16 _usb_read16_sync(struct rtl_priv *rtlpriv, u32 addr) { return (u16)_usb_read_sync(rtlpriv, addr, 2); }
0
[ "CWE-400", "CWE-401" ]
linux
3f93616951138a598d930dcaec40f2bfd9ce43bb
288,189,653,575,056,970,000,000,000,000,000,000,000
4
rtlwifi: prevent memory leak in rtl_usb_probe In rtl_usb_probe if allocation for usb_data fails the allocated hw should be released. In addition the allocated rtlpriv->usb_data should be released on error handling path. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeau...
static bool generate_permissions_token( AccessPermissionsHandle& handle) { Property property; PermissionsToken& token = handle->permissions_token_; token.class_id("DDS:Access:Permissions:1.0"); property.name("dds.perm_ca.sn"); property.value() = handle->sn; property.propagate(true); ...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
89,462,732,703,751,560,000,000,000,000,000,000,000
19
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static void expire_mount_list(struct list_head *graveyard, struct list_head *mounts) { struct mnt_namespace *ns; struct vfsmount *mnt; while (!list_empty(graveyard)) { LIST_HEAD(umounts); mnt = list_first_entry(graveyard, struct vfsmount, mnt_expire); list_del_init(&mnt->mnt_expire); /* don't do anything i...
0
[ "CWE-269" ]
linux-2.6
ee6f958291e2a768fd727e7a67badfff0b67711a
299,130,282,394,315,000,000,000,000,000,000,000,000
27
check privileges before setting mount propagation There's a missing check for CAP_SYS_ADMIN in do_change_type(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torva...
MergeAttributes(List *schema, List *supers, char relpersistence, List **supOids, List **supconstr, int *supOidCount) { ListCell *entry; List *inhSchema = NIL; List *parentOids = NIL; List *constraints = NIL; int parentsWithOids = 0; bool have_bogus_defaults = false; int child_attno; static N...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
253,193,393,811,886,700,000,000,000,000,000,000,000
496
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...