func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int mbedtls_ssl_handle_message_type( mbedtls_ssl_context *ssl ) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; /* * Handle particular types of records */ if( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE ) { if( ( ret = mbedtls_ssl_prepare_handshake_record( ssl ) ) != 0 ) {...
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
243,549,094,227,498,700,000,000,000,000,000,000,000
133
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
void hns_ppe_set_tso_enable(struct hns_ppe_cb *ppe_cb, u32 value) { dsaf_set_dev_bit(ppe_cb, PPEV2_CFG_TSO_EN_REG, 0, !!value); }
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
104,028,890,765,162,600,000,000,000,000,000,000,000
4
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...
**/ inline bool is_file(const char *const path) { if (!path || !*path) return false; std::FILE *const file = cimg::std_fopen(path,"rb"); if (!file) return false; cimg::fclose(file); return !is_directory(path);
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
307,699,143,280,549,520,000,000,000,000,000,000,000
7
.
void SelectTrueCoords(const RuntimeShape& input_condition_shape, const D* input_condition_data, T* output_data) { const size_t size = input_condition_shape.FlatSize(); if (size == 0) { // Dimension is zero, in which case we don't need to output. return; } const size_t cond_rank = i...
0
[ "CWE-125" ]
tensorflow
595a65a3e224a0362d7e68c2213acfc2b499a196
114,433,219,586,969,020,000,000,000,000,000,000,000
30
Return a TFLite error if gather_nd will result in reading invalid memory PiperOrigin-RevId: 463054033
smb2_copy_fs_info_to_kstatfs(struct smb2_fs_full_size_info *pfs_inf, struct kstatfs *kst) { kst->f_bsize = le32_to_cpu(pfs_inf->BytesPerSector) * le32_to_cpu(pfs_inf->SectorsPerAllocationUnit); kst->f_blocks = le64_to_cpu(pfs_inf->TotalAllocationUnits); kst->f_bfree = kst->f_bavail = le64_to_cpu(pfs...
0
[ "CWE-416", "CWE-200" ]
linux
6a3eb3360667170988f8a6477f6686242061488a
83,469,575,415,240,810,000,000,000,000,000,000,000
10
cifs: Fix use-after-free in SMB2_write There is a KASAN use-after-free: BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580 Read of size 8 at addr ffff8880b6a8e450 by task ln/4196 Should not release the 'req' because it will use in the trace. Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de...
idna_to_unicode_internal (char *utf8in, uint32_t * out, size_t * outlen, int flags) { int rc; char tmpout[64]; size_t utf8len = strlen (utf8in) + 1; size_t addlen = 0; /* * ToUnicode consists of the following steps: * * 1. If the sequence contains any code points outside the ASCII range * (0...
0
[ "CWE-119" ]
libidn
58c721ac2dc96bccd737f3f544f3a22a50477bbf
19,705,595,335,614,270,000,000,000,000,000,000,000
117
libidn: Fix crash in idna_to_unicode_8z8z and idna_to_unicode_8zlz.
static int pdiag_put_fanout(struct packet_sock *po, struct sk_buff *nlskb) { int ret = 0; mutex_lock(&fanout_mutex); if (po->fanout) { u32 val; val = (u32)po->fanout->id | ((u32)po->fanout->type << 16); ret = nla_put_u32(nlskb, PACKET_DIAG_FANOUT, val); } mutex_unlock(&fanout_mutex); return ret; }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
281,719,284,032,959,250,000,000,000,000,000,000,000
15
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
void blk_start_plug(struct blk_plug *plug) { struct task_struct *tsk = current; /* * If this is a nested plug, don't actually assign it. */ if (tsk->plug) return; INIT_LIST_HEAD(&plug->mq_list); INIT_LIST_HEAD(&plug->cb_list); plug->rq_count = 0; plug->multiple_queues = false; /* * Store ordering sho...
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
85,271,815,753,413,070,000,000,000,000,000,000,000
21
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...
qboolean FS_CreatePath (char *OSPath) { char *ofs; char path[MAX_OSPATH]; // make absolutely sure that it can't back up the path // FIXME: is c: allowed??? if ( strstr( OSPath, ".." ) || strstr( OSPath, "::" ) ) { Com_Printf( "WARNING: refusing to create relative path \"%s\"\n", OSPath ); return qtrue; } ...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
24,823,145,811,283,775,000,000,000,000,000,000,000
34
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
switch (recv_into_rbuf (h)) { case -1: SET_NEXT_STATE (%.DEAD); return 0; case 1: save_reply_state (h); SET_NEXT_STATE (%.READY); return 0; case 0: length = be32toh (h->sbuf.sr.structured_reply.length); offset = be64toh (h->sbuf.sr.payload.offset_data.offset); assert (cmd); /* guarantee...
1
[]
libnbd
2c1987fc23d6d0f537edc6d4701e95a2387f7917
250,599,717,843,561,500,000,000,000,000,000,000,000
23
lib: Fix stack corruption with structured reply containing negative offset. Because of improper bounds checking, when receiving a structured reply some offset/lengths sent by the server could cause libnbd to execute arbitrary code under control of a malicious server. A structured reply segment containing (for example...
*/ void xmlXPathMultValues(xmlXPathParserContextPtr ctxt) { xmlXPathObjectPtr arg; double val; arg = valuePop(ctxt); if (arg == NULL) XP_ERROR(XPATH_INVALID_OPERAND); val = xmlXPathCastToNumber(arg); xmlXPathReleaseObject(ctxt->context, arg); CAST_TO_NUMBER; CHECK_TYPE(XPATH_NUMBER);
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
121,209,562,948,492,490,000,000,000,000,000,000,000
13
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
static inline int vhost_put_used(struct vhost_virtqueue *vq, struct vring_used_elem *head, int idx, int count) { return vhost_copy_to_user(vq, vq->used->ring + idx, head, count * sizeof(*head)); }
0
[ "CWE-120" ]
linux
060423bfdee3f8bc6e2c1bac97de24d5415e2bc4
131,150,067,313,415,290,000,000,000,000,000,000,000
7
vhost: make sure log_num < in_num The code assumes log_num < in_num everywhere, and that is true as long as in_num is incremented by descriptor iov count, and log_num by 1. However this breaks if there's a zero sized descriptor. As a result, if a malicious guest creates a vring desc with desc.len = 0, it may cause th...
push_read_cb (GObject *source, GAsyncResult *res, gpointer user_data) { PushHandle *handle = user_data; GError *error = NULL; gssize n; n = g_input_stream_read_finish (handle->in, res, &error); /* Ignore this read if we've subsequently been restarted. */ if (handle->read_status != PUSH_READ_STATUS_NONE) ...
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
323,851,504,030,836,600,000,000,000,000,000,000,000
58
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
static int nfs_readdir_search_array(struct nfs_readdir_descriptor *desc) { struct nfs_cache_array *array; int status; array = kmap_atomic(desc->page); if (desc->dir_cookie == 0) status = nfs_readdir_search_for_pos(array, desc); else status = nfs_readdir_search_for_cookie(array, desc); if (status == -EAGAIN...
0
[ "CWE-909" ]
linux
ac795161c93699d600db16c1a8cc23a65a1eceaf
184,916,844,703,403,300,000,000,000,000,000,000,000
20
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 ...
display_loclists_list (struct dwarf_section * section, unsigned char ** start_ptr, unsigned int debug_info_entry, dwarf_vma offset, dwarf_vma base_address, unsigned char ** vstart_ptr, int has...
0
[ "CWE-269" ]
binutils-gdb
e98e7d9a70dcc987bff0e925f20b78cd4a2979ed
162,093,510,555,375,060,000,000,000,000,000,000,000
206
Fix NULL pointer indirection when parsing corrupt DWARF data. PR 29290 * dwarf.c (read_and_display_attr_value): Check that debug_info_p is set before dereferencing it.
static ssize_t ca8210_test_int_user_read( struct file *filp, char __user *buf, size_t len, loff_t *offp ) { int i, cmdlen; struct ca8210_priv *priv = filp->private_data; unsigned char *fifo_buffer; unsigned long bytes_not_copied; if (filp->f_flags & O_NONBLOCK) { /* Non-blocking mode */ if ...
0
[ "CWE-400", "CWE-401" ]
linux
6402939ec86eaf226c8b8ae00ed983936b164908
230,462,937,350,207,770,000,000,000,000,000,000,000
53
ieee802154: ca8210: prevent memory leak In ca8210_probe the allocated pdata needs to be assigned to spi_device->dev.platform_data before calling ca8210_get_platform_data. Othrwise when ca8210_get_platform_data fails pdata cannot be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lor...
bool ZrtpQueue::sendSASRelayPacket(uint8_t* sh, std::string render) { if (zrtpEngine != NULL) return zrtpEngine->sendSASRelayPacket(sh, render); else return false; }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
227,242,497,117,728,460,000,000,000,000,000,000,000
7
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1, stats_section_t *hashes, uint32_t flags) { uint16_t e_magic; /* DOS signature ("MZ") */ uint16_t nsections; uint32_t e_lfanew; /* address of new exe header */ struct pe_image_file_hdr file_hdr; union { struct pe_image_optional_hdr64 opt64;...
0
[ "CWE-119", "CWE-787" ]
clamav-devel
fc3794a54d2affe5770c1f876484a871c783e91e
175,514,391,216,243,760,000,000,000,000,000,000,000
279
Merge fix from security/bb11155 branch
static void dma_pte_free_pagetable(struct dmar_domain *domain, unsigned long start_pfn, unsigned long last_pfn, int retain_level) { BUG_ON(!domain_pfn_supported(domain, start_pfn)); BUG_ON(!domain_pfn_supported(domain, last_pfn)); BUG_ON(start_pfn > last_pfn); dma_pte_clear_range(domain, start...
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
45,913,582,721,308,360,000,000,000,000,000,000,000
21
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...
e_util_win32_initialize (void) { gchar module_filename[2048 + 1]; DWORD chars; /* Reduce risks */ { typedef BOOL (WINAPI *t_SetDllDirectoryA) (LPCSTR lpPathName); t_SetDllDirectoryA p_SetDllDirectoryA; p_SetDllDirectoryA = GetProcAddress ( GetModuleHandle ("kernel32.dll"), "SetDllDirectoryA"); if (...
0
[ "CWE-295" ]
evolution-data-server
6672b8236139bd6ef41ecb915f4c72e2a052dba5
211,454,282,557,783,940,000,000,000,000,000,000,000
75
Let child source with 'none' authentication method use collection source authentication That might be the same as having set NULL authentication method. Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
static u64 cpu_rt_period_read_uint(struct cgroup_subsys_state *css, struct cftype *cft) { return sched_group_rt_period(css_tg(css)); }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
296,435,912,280,298,900,000,000,000,000,000,000,000
5
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
get_light_color (RsvgNodeLightSource * source, vector3 color, gdouble x1, gdouble y1, gdouble z, cairo_matrix_t *affine, RsvgDrawingCtx * ctx) { double base, angle, x, y; vector3 s; vector3 L; vector3 output; double sx, sy, sz, spx, spy, spz; if (source->type != SPOTLIGHT) ...
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
149,783,439,892,267,190,000,000,000,000,000,000,000
49
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info, struct btrfs_pending_snapshot *pending) { struct btrfs_key key; struct btrfs_root_item *new_root_item; struct btrfs_root *tree_root = fs_info->tree_root; struct btrfs_root *root = pending->root...
1
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
80,554,735,165,937,820,000,000,000,000,000,000,000
229
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 u_char *mesg_read_sec (G_List *target_list, u_char *section, int count, u_char *mesg, int mesg_len) { char *fn = "mesg_read_sec()"; G_List *rc_list, *gl; u_char buf[MAX_PACKET]; u_char *msg_end, *rp; int i; if (T.debug > 4) syslog (LOG_DEBUG, "%s: start", fn); /* initialize */ rc_list = list...
0
[ "CWE-330" ]
totd
afd8a10a6a21f82a70940d1b43cff48143250399
75,151,651,144,760,530,000,000,000,000,000,000,000
155
Patch provided by Gabor Lencse for generating better randomized mesg IDs.
int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags) { BIO *cmsbio; int ret = 0; if (!(cmsbio = CMS_dataInit(cms, dcont))) { CMSerr(CMS_F_CMS_FINAL, ERR_R_MALLOC_FAILURE); return 0; } SMIME_crlf_copy(data, cmsbio, flags); (void)BIO_flush(cmsbio); ...
0
[ "CWE-399" ]
openssl
dd90a91d8771fd1ad5083fd46a2b3da16a587757
216,222,141,215,481,550,000,000,000,000,000,000,000
26
Fix infinite loop in CMS Fix loop in do_free_upto if cmsbio is NULL: this will happen when attempting to verify and a digest is not recognised. Reported by Johannes Bauer. CVE-2015-1792 Reviewed-by: Matt Caswell <matt@openssl.org>
static void FVMenuCenter(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) { FontViewBase *fv = (FontViewBase *) GDrawGetUserData(gw); FVMetricsCenter(fv,mi->mid==MID_Center); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
276,592,384,462,505,250,000,000,000,000,000,000,000
4
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static void MP4_FreeBox_rdrf( MP4_Box_t *p_box ) { FREENULL( p_box->data.p_rdrf->psz_ref ); }
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
26,638,808,305,303,620,000,000,000,000,000,000,000
4
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 ...
BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock, int, level, int, optname, char *, optval, int, optlen) { struct sock *sk = bpf_sock->sk; int ret = 0; int val; if (!sk_fullsock(sk)) return -EINVAL; if (level == SOL_SOCKET) { if (optlen != sizeof(int)) return -EINVAL; val = *((int *)o...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
233,504,412,149,394,900,000,000,000,000,000,000,000
133
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
static void ip_do_redirect(struct dst_entry *dst, struct sock *sk, struct sk_buff *skb) { struct rtable *rt; struct flowi4 fl4; const struct iphdr *iph = (const struct iphdr *) skb->data; struct net *net = dev_net(skb->dev); int oif = skb->dev->ifindex; u8 tos = RT_TOS(iph->tos); u8 prot = iph->protocol; u32 ma...
0
[ "CWE-476" ]
linux
bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205
33,768,578,311,779,750,000,000,000,000,000,000,000
16
net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set Syzkaller hit 'general protection fault in fib_dump_info' bug on commit 4.13-rc5.. Guilty file: net/ipv4/fib_semantics.c kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked...
static int get_width(const FieldMatchContext *fm, const AVFrame *f, int plane) { return plane ? FF_CEIL_RSHIFT(f->width, fm->hsub) : f->width; }
0
[ "CWE-119", "CWE-787" ]
FFmpeg
e43a0a232dbf6d3c161823c2e07c52e76227a1bc
262,387,628,277,153,780,000,000,000,000,000,000,000
4
avfilter: fix plane validity checks Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static int vcpu_mmio_read(struct kvm_vcpu *vcpu, gpa_t addr, int len, void *v) { int handled = 0; int n; do { n = min(len, 8); if (!(vcpu->arch.apic && !kvm_iodevice_read(&vcpu->arch.apic->dev, addr, n, v)) && kvm_io_bus_read(vcpu->kvm, KVM_MMIO_BUS, addr, n, v)) break; trace_kvm_mmio(KVM_TRA...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
125,358,952,292,988,390,000,000,000,000,000,000,000
20
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { Mpeg4DecContext *ctx = avctx->priv_data; MpegEncContext *s = &ctx->m; /* divx 5.01+ bitstream reorder stuff */ /* Since this clobbers the input buffer and hwaccel codecs still need the * data during hwaccel->end_f...
0
[ "CWE-476" ]
FFmpeg
2aa9047486dbff12d9e040f917e5f799ed2fd78b
172,915,193,758,728,750,000,000,000,000,000,000,000
48
avcodec/mpeg4videodec: Check read profile before setting it Fixes: null pointer dereference Fixes: ffmpeg_crash_7.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
bool RequestParser::ParseMultipartContent(const char* data, std::size_t length) { pending_data_.append(data, length); if (!content_length_parsed_ || content_length_ == kInvalidLength) { // Invalid content length (syntax error). return false; } while (true) { ...
0
[ "CWE-22" ]
webcc
55a45fd5039061d5cc62e9f1b9d1f7e97a15143f
214,166,936,496,931,500,000,000,000,000,000,000,000
109
fix static file serving security issue; fix url path encoding issue
static int sctp_wait_for_sndbuf(struct sctp_association *asoc, long *timeo_p, size_t msg_len) { struct sock *sk = asoc->base.sk; int err = 0; long current_timeo = *timeo_p; DEFINE_WAIT(wait); pr_debug("%s: asoc:%p, timeo:%ld, msg_len:%zu\n", __func__, asoc, *timeo_p, msg_len); /* Increment the associatio...
0
[ "CWE-415" ]
linux
dfcb9f4f99f1e9a49e43398a7bfbf56927544af1
107,953,011,182,005,500,000,000,000,000,000,000,000
58
sctp: deny peeloff operation on asocs with threads sleeping on it commit 2dcab5984841 ("sctp: avoid BUG_ON on sctp_wait_for_sndbuf") attempted to avoid a BUG_ON call when the association being used for a sendmsg() is blocked waiting for more sndbuf and another thread did a peeloff operation on such asoc, moving it to ...
double psnr(jas_matrix_t *x, jas_matrix_t *y, int depth) { double m; double p; m = msen(x, y, 2); p = ((1 << depth) - 1); return 20.0 * log10(p / sqrt(m)); }
0
[ "CWE-119" ]
jasper
65536647d380571d1a9a6c91fa03775fb5bbd256
169,397,767,554,428,200,000,000,000,000,000,000,000
8
A new experimental memory allocator has been introduced. The allocator is experimental in the sense that its API is not considered stable and the allocator may change or disappear entirely in future versions of the code. This new allocator tracks how much memory is being used by jas_malloc and friends. A maximum upp...
DirectFunctionCall2Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2) { FunctionCallInfoData fcinfo; Datum result; InitFunctionCallInfoData(fcinfo, NULL, 2, collation, NULL, NULL); fcinfo.arg[0] = arg1; fcinfo.arg[1] = arg2; fcinfo.argnull[0] = false; fcinfo.argnull[1] = false; result = (*func) (&...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
187,300,133,488,948,100,000,000,000,000,000,000,000
20
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
static int reply_command(CONF *conf, char *section, char *engine, char *queryfile, char *passin, char *inkey, char *signer, char *chain, const char *policy, char *in, int token_in, char *out, int token_out, int text) { int ret = 0; TS_RESP *response = NULL; BIO *in_bio = NULL; BIO *query_bio = NU...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
170,582,924,765,607,050,000,000,000,000,000,000,000
87
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
TPM2B_ECC_PARAMETER_Marshal(TPM2B_ECC_PARAMETER *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPM2B_Marshal(&source->b, sizeof(source->t.buffer), buffer, size); // libtpms changed return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
204,854,462,399,480,100,000,000,000,000,000,000,000
6
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static inline void add_full(struct kmem_cache_node *n, struct page *page) {}
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
119,862,067,370,410,340,000,000,000,000,000,000,000
1
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
int cil_resolve_nametypetransition(struct cil_tree_node *current, void *extra_args) { struct cil_args_resolve *args = extra_args; struct cil_nametypetransition *nametypetrans = current->data; struct cil_symtab_datum *src_datum = NULL; struct cil_symtab_datum *tgt_datum = NULL; struct cil_symtab_datum *obj_datum = ...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
14,458,994,879,066,217,000,000,000,000,000,000,000
58
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
read_name(uschar *name, int max, uschar *s, uschar *extras) { int ptr = 0; while (*s != 0 && (isalnum(*s) || Ustrchr(extras, *s) != NULL)) { if (ptr < max-1) name[ptr++] = *s; s++; } name[ptr] = 0; return s; }
0
[ "CWE-189" ]
exim
7685ce68148a083d7759e78d01aa5198fc099c44
241,841,072,227,515,160,000,000,000,000,000,000,000
11
Only expand integers for integer math once
Status explain(OperationContext* opCtx, const std::string& dbname, const BSONObj& cmdObj, ExplainOptions::Verbosity verbosity, BSONObjBuilder* out) const override { const NamespaceString nss(parseNsCollectionRequired(dbname, cmdObj)...
0
[ "CWE-20" ]
mongo
5c7c6729c37514760fd34da462b6961a2e385417
193,970,686,841,911,500,000,000,000,000,000,000,000
84
SERVER-38275 ban explain with UUID
void streamIteratorRemoveEntry(streamIterator *si, streamID *current) { unsigned char *lp = si->lp; int64_t aux; /* We do not really delete the entry here. Instead we mark it as * deleted flagging it, and also incrementing the count of the * deleted entries in the listpack header. * * W...
0
[ "CWE-125", "CWE-704" ]
redis
c04082cf138f1f51cedf05ee9ad36fb6763cafc6
284,283,223,657,578,540,000,000,000,000,000,000,000
39
Abort in XGROUP if the key is not a stream
int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm, struct mutex **tfm_mutex, char *cipher_name) { struct ecryptfs_key_tfm *key_tfm; int rc = 0; (*tfm) = NULL; (*tfm_mutex) = NULL; mutex_lock(&key_tfm_list_mutex); if (!ecryptfs_tfm_exists(cipher_name, &key_tfm))...
0
[ "CWE-189" ]
linux-2.6
8faece5f906725c10e7a1f6caf84452abadbdc7b
48,300,268,947,505,970,000,000,000,000,000,000,000
25
eCryptfs: Allocate a variable number of pages for file headers When allocating the memory used to store the eCryptfs header contents, a single, zeroed page was being allocated with get_zeroed_page(). However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche...
PyRun_AnyFileEx(FILE *fp, const char *name, int closeit) { return PyRun_AnyFileExFlags(fp, name, closeit, NULL); }
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
129,475,883,962,247,580,000,000,000,000,000,000,000
4
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static inline void set_done(struct v4l2l_buffer *buffer) { buffer->buffer.flags &= ~V4L2_BUF_FLAG_QUEUED; buffer->buffer.flags |= V4L2_BUF_FLAG_DONE; }
0
[ "CWE-787" ]
v4l2loopback
64a216af4c09c9ba9326057d7e78994271827eff
328,720,905,111,957,870,000,000,000,000,000,000,000
5
add explicit format specifier to printf() invocations CWE-134
int event_has_hard_overrides(char *str) { // look for \pos and \move tags inside {...} // mirrors get_next_char, but is faster and doesn't change any global state while (*str) { if (str[0] == '\\' && str[1] != '\0') { str += 2; } else if (str[0] == '{') { str++; ...
0
[]
libass
6835731c2fe4164a0c50bc91d12c43b2a2b4e799
32,680,410,879,642,844,000,000,000,000,000,000,000
26
parse_tags: don't recurse for nested \t() This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4892 (stack overflow on deeply nested \t()). This is possible because parentheses do not nest and the first ')' terminates the whole tag. Thus something like \t(\t(\t(\t(\t() can be read in a simple loop with no...
explicit NonMaxSuppressionV3Op(OpKernelConstruction* context) : OpKernel(context) {}
0
[ "CWE-369", "CWE-681" ]
tensorflow
b5cdbf12ffcaaffecf98f22a6be5a64bb96e4f58
47,386,596,063,724,720,000,000,000,000,000,000,000
2
Prevent overflow due to integer conversion to unsigned. PiperOrigin-RevId: 387738045 Change-Id: Id7e95bc07e02df1c66b72bd09f389608c87bdebe
static void dcc_chat_passive(CHAT_DCC_REC *dcc) { IPADDR own_ip; int port; GIOChannel *handle; char host[MAX_IP_LEN]; g_return_if_fail(IS_DCC_CHAT(dcc)); if (dcc->addrstr[0] == '\0' || dcc->starttime != 0 || dcc->handle != NULL) { /* already sent a chat request / already chatting */ return; } handle...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
35,022,013,046,608,085,000,000,000,000,000,000,000
30
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
sf_perror (SNDFILE *sndfile) { SF_PRIVATE *psf ; int errnum ; if (sndfile == NULL) { errnum = sf_errno ; } else { VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 0) ; errnum = psf->error ; } ; fprintf (stderr, "%s\n", sf_error_number (errnum)) ; return SFE_NO_ERROR ; } /* sf_perror */
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
199,916,942,052,514,200,000,000,000,000,000,000,000
15
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
static vpx_codec_err_t decoder_init(vpx_codec_ctx_t *ctx, vpx_codec_priv_enc_mr_cfg_t *data) { // This function only allocates space for the vpx_codec_alg_priv_t // structure. More memory may be required at the time the stream // information becomes known. (void)data; if (...
0
[ "CWE-125" ]
libvpx
0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88
65,497,771,396,299,580,000,000,000,000,000,000,000
24
vp9: fix OOB read in decoder_peek_si_internal Profile 1 or 3 bitstreams may require 11 bytes for the header in the intra-only case. Additionally add a check on the bit reader's error handler callback to ensure it's non-NULL before calling to avoid future regressions. This has existed since at least (pre-1.4.0): 09bf...
static unsigned int cduty_tx_s_duty_cycle(struct cx23885_dev *dev, unsigned int duty_cycle) { u32 n; n = DIV_ROUND_CLOSEST(duty_cycle * 100, 625); /* 16ths of 100% */ if (n != 0) n--; if (n > 15) n = 15; cx23888_ir_write4(dev, CX23888_IR_CDUTY_REG, n); return DIV_ROUND_CLOSEST((n + 1) * 100, 16); }
0
[ "CWE-400", "CWE-401" ]
linux
a7b2df76b42bdd026e3106cf2ba97db41345a177
238,811,225,949,549,100,000,000,000,000,000,000,000
12
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
static void cd_data_to_raw(uint8_t *buf, int lba) { /* sync bytes */ buf[0] = 0x00; memset(buf + 1, 0xff, 10); buf[11] = 0x00; buf += 12; /* MSF */ lba_to_msf(buf, lba); buf[3] = 0x01; /* mode 1 data */ buf += 4; /* data */ buf += 2048; /* XXX: ECC not computed */ mem...
0
[]
qemu
ce560dcf20c14194db5ef3b9fc1ea592d4e68109
249,789,976,721,771,000,000,000,000,000,000,000,000
16
ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be ...
size_t olm_clear_pk_signing(OlmPkSigning *sign) { /* Clear the memory backing the signing */ olm::unset(sign, sizeof(OlmPkSigning)); /* Initialise a fresh signing object in case someone tries to use it */ new(sign) OlmPkSigning(); return sizeof(OlmPkSigning); }
0
[ "CWE-787" ]
olm
ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b
107,584,605,466,662,730,000,000,000,000,000,000,000
7
olm_pk_decrypt: Ensure inputs are of correct length.
void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) { struct vfs_fsp_data *head; head = (struct vfs_fsp_data *)vfs_memctx_fsp_extension(handle, fsp); if (head != NULL) { return EXT_DATA_AREA(head); } return NULL; }
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
195,582,723,175,832,770,000,000,000,000,000,000,000
11
Fix bug 7104 - "wide links" and "unix extensions" are incompatible. Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow t...
buf_contents_changed(buf_T *buf) { buf_T *newbuf; int differ = TRUE; linenr_T lnum; aco_save_T aco; exarg_T ea; // Allocate a buffer without putting it in the buffer list. newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY); if (newbuf == NULL) return TRUE; // Force the 'fil...
0
[ "CWE-416" ]
vim
9b4a80a66544f2782040b641498754bcb5b8d461
289,666,338,446,909,520,000,000,000,000,000,000,000
50
patch 8.2.4281: using freed memory with :lopen and :bwipe Problem: Using freed memory with :lopen and :bwipe. Solution: Do not use a wiped out buffer.
void CL_ServersResponsePacket( const netadr_t* from, msg_t *msg, qboolean extended ) { int i, j, count, total; netadr_t addresses[MAX_SERVERSPERPACKET]; int numservers; byte* buffptr; byte* buffend; Com_Printf("CL_ServersResponsePacket\n"); if (cls.numglobalservers == -1) { // state to detect lack...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
222,723,440,777,737,700,000,000,000,000,000,000,000
115
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
TRIO_PUBLIC int trio_vcprintf TRIO_ARGS4((stream, closure, format, args), trio_outstream_t stream, trio_pointer_t closure, TRIO_CONST char* format, va_list args) { trio_custom_t data; assert(VALID(stream)); assert(VALID(format)); da...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
148,737,285,420,195,330,000,000,000,000,000,000,000
13
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
compat_sys_open(const char __user *filename, int flags, int mode) { return do_sys_open(AT_FDCWD, filename, flags, mode); }
0
[]
linux-2.6
822191a2fa1584a29c3224ab328507adcaeac1ab
165,293,405,992,623,400,000,000,000,000,000,000,000
4
[PATCH] skip data conversion in compat_sys_mount when data_page is NULL OpenVZ Linux kernel team has found a problem with mounting in compat mode. Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode leads to oops: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp...
void tcp_close(struct sock *sk, long timeout) { struct sk_buff *skb; int data_was_unread = 0; int state; lock_sock(sk); sk->sk_shutdown = SHUTDOWN_MASK; if (sk->sk_state == TCP_LISTEN) { tcp_set_state(sk, TCP_CLOSE); /* Special case. */ inet_csk_listen_stop(sk); goto adjudge_to_death; } /* We need...
0
[ "CWE-400", "CWE-119", "CWE-703" ]
linux
baff42ab1494528907bf4d5870359e31711746ae
230,309,867,494,532,350,000,000,000,000,000,000,000
158
net: Fix oops from tcp_collapse() when using splice() tcp_read_sock() can have a eat skbs without immediately advancing copied_seq. This can cause a panic in tcp_collapse() if it is called as a result of the recv_actor dropping the socket lock. A userspace program that splices data from a socket to either another soc...
FLAC__bool FLAC__bitreader_clear(FLAC__BitReader *br) { br->words = br->bytes = 0; br->consumed_words = br->consumed_bits = 0; return true; }
0
[ "CWE-125" ]
flac
2e7931c27eb15e387da440a37f12437e35b22dd4
139,718,985,315,512,560,000,000,000,000,000,000,000
6
libFLAC/bitreader.c: Fix out-of-bounds read Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069 Testcase: fuzzer_decoder-5670265022840832
static int rtnl_bridge_notify(struct net_device *dev, u16 flags) { struct net *net = dev_net(dev); struct net_device *br_dev = netdev_master_upper_dev_get(dev); struct sk_buff *skb; int err = -EOPNOTSUPP; skb = nlmsg_new(bridge_nlmsg_size(), GFP_ATOMIC); if (!skb) { err = -ENOMEM; goto errout; } if ((!fla...
0
[ "CWE-399" ]
linux-2.6
84d73cd3fb142bf1298a8c13fd4ca50fd2432372
44,500,027,464,265,020,000,000,000,000,000,000,000
35
rtnl: fix info leak on RTM_GETLINK request for VF devices Initialize the mac address buffer with 0 as the driver specific function will probably not fill the whole buffer. In fact, all in-kernel drivers fill only ETH_ALEN of the MAX_ADDR_LEN bytes, i.e. 6 of the 32 possible bytes. Therefore we currently leak 26 bytes ...
static inline int alarmtimer_rtc_interface_setup(void) { return 0; }
0
[ "CWE-190" ]
linux
5f936e19cc0ef97dbe3a56e9498922ad5ba1edef
128,858,585,174,656,190,000,000,000,000,000,000,000
1
alarmtimer: Prevent overflow for relative nanosleep Air Icy reported: UBSAN: Undefined behaviour in kernel/time/alarmtimer.c:811:7 signed integer overflow: 1529859276030040771 + 9223372036854775807 cannot be represented in type 'long long int' Call Trace: alarm_timer_nsleep+0x44c/0x510 kernel/time/alarmtim...
static int mxf_read_source_clip(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset) { MXFStructuralComponent *source_clip = arg; switch(tag) { case 0x0202: source_clip->duration = avio_rb64(pb); break; case 0x1201: source_clip->start_position = avio_rb64(p...
0
[ "CWE-703" ]
FFmpeg
f173cdfe669556aa92857adafe60cbe5f2aa1210
263,474,589,766,672,060,000,000,000,000,000,000,000
21
avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array() Fixes: 20170829A.mxf Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 900f39692ca0337a98a7cf047e4e2611071810c...
QString JlCompress::extractFile(QuaZip &zip, QString fileName, QString fileDest) { if(!zip.open(QuaZip::mdUnzip)) { return QString(); } // Estraggo il file if (fileDest.isEmpty()) fileDest = fileName; if (!extractFile(&zip,fileName,fileDest)) { return QString(); } /...
0
[ "CWE-22" ]
quazip
5d2fc16a1976e5bf78d2927b012f67a2ae047a98
83,105,726,250,718,790,000,000,000,000,000,000,000
21
Fixed the Zip Slip vulnerability in JlCompress When extracting a file with a dangerous path like "../evil.exe" from a ZIP archive with JlCompress::extractDir(), the target file would be created outside of the target directory, potentially even overwriting an existing file there.
void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, psched_time_t expires) { ktime_t time; if (test_bit(__QDISC_STATE_DEACTIVATED, &qdisc_root_sleeping(wd->qdisc)->state)) return; wd->qdisc->flags |= TCQ_F_THROTTLED; time = ktime_set(0, 0); time = ktime_add_ns(time, PSCHED_TICKS2NS(expires)); hrtim...
0
[ "CWE-909" ]
linux-2.6
16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b
161,468,696,673,118,790,000,000,000,000,000,000,000
13
tc: Fix unitialized kernel memory leak Three bytes of uninitialized kernel memory are currently leaked to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param) { X509_VERIFY_PARAM_free(ctx->param); ctx->param = param; }
0
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
59,529,908,596,676,990,000,000,000,000,000,000,000
5
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
AuthorizationSession::AuthorizationSession(AuthzSessionExternalState* externalState) { _externalState.reset(externalState); }
0
[ "CWE-264" ]
mongo
c5ad04549e40b1069029026081d9324e9e06156c
26,672,821,537,799,670,000,000,000,000,000,000,000
3
SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user. Uncorrected, this can cause replica set heartbeats to stall behind operations that hold the read lock for a long time.
static MagickBooleanType SGIDecode(const size_t bytes_per_pixel, ssize_t number_packets,unsigned char *packets,ssize_t number_pixels, unsigned char *pixels) { register unsigned char *p, *q; size_t pixel; ssize_t count; p=packets; q=pixels; if (bytes_per_pixel == 2) { for ( ;...
0
[ "CWE-119" ]
ImageMagick
ce98a7acbcfca7f0a178f4b1e7b957e419e0cc99
46,579,690,489,696,190,000,000,000,000,000,000,000
88
https://github.com/ImageMagick/ImageMagick/issues/301
static int _hostfs_fdatasync(oe_fd_t* desc) { int ret = -1; file_t* file = _cast_file(desc); if (!file) OE_RAISE_ERRNO(OE_EINVAL); if (oe_syscall_fdatasync_ocall(&ret, file->host_fd) != OE_OK) OE_RAISE_ERRNO(OE_EINVAL); done: return ret; }
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
128,053,900,031,296,320,000,000,000,000,000,000,000
14
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
int TNEFGetKey(TNEFStruct *TNEF, WORD *key) { if (TNEF->IO.ReadProc(&(TNEF->IO), sizeof(WORD), 1, key) < 1) { if (TNEF->Debug >= 1) printf("Error reading Key\n"); return YTNEF_ERROR_READING_DATA; } *key = SwapWord((BYTE *)key, sizeof(WORD)); DEBUG1(TNEF->Debug, 2, "Key = 0x%X", *key); DEBUG1(TN...
0
[ "CWE-399", "CWE-125" ]
ytnef
3cb0f914d6427073f262e1b2b5fd973e3043cdf7
99,576,046,576,753,260,000,000,000,000,000,000,000
12
BugFix - Potential OOB with Fields of Size 0 Thanks to @hannob for contributing a malformed TNEF stream with a Version field of size 0. Now such files will return an error indicating invalid data.
propagate_error (GMarkupParseContext *context, GError **dest, GError *src) { if (context->flags & G_MARKUP_PREFIX_ERROR_POSITION) g_prefix_error (&src, _("Error on line %d char %d: "), context->line_number, ...
0
[ "CWE-476" ]
glib
fccef3cc822af74699cca84cd202719ae61ca3b9
245,355,583,077,196,750,000,000,000,000,000,000,000
14
gmarkup: Fix crash in error handling path for closing elements If something which looks like a closing tag is left unfinished, but isn’t paired to an opening tag in the document, the error handling code would do a null pointer dereference. Avoid that, at the cost of introducing a new translatable error message. Inclu...
teardown (Test *test, gconstpointer data) { g_object_unref (test->auth); }
0
[]
cockpit
c51f6177576d7e12614c64d316cf0b67addd17c9
44,023,293,624,857,060,000,000,000,000,000,000,000
5
ws: Fix bug parsing invalid base64 headers The len parameter to g_base64_decode_inplace() is a inout parameter, and needs to be initialized. Lets just use the simpler g_base64_decode() function. This fixes a segfault. Closes #10819
explicit SparseFillEmptyRowsGradOp(OpKernelConstruction* context) : OpKernel(context) {}
0
[ "CWE-476", "CWE-703" ]
tensorflow
faa76f39014ed3b5e2c158593b1335522e573c7f
97,662,346,035,741,460,000,000,000,000,000,000,000
2
Fix heap-buffer-overflow issue with `tf.raw_ops.SparseFillEmptyRows`. PiperOrigin-RevId: 372009178 Change-Id: Ia1a9e9691ecaa072f32fb39a0887b2aabd399210
static void rsi_switch_channel(struct rsi_hw *adapter, struct ieee80211_vif *vif) { struct rsi_common *common = adapter->priv; struct ieee80211_channel *channel; if (common->iface_down) return; if (!vif) return; channel = vif->bss_conf.chandef.chan; if (!channel) return; rsi_band_check(common...
0
[ "CWE-416" ]
linux
abd39c6ded9db53aa44c2540092bdd5fb6590fa8
49,657,447,112,588,330,000,000,000,000,000,000,000
20
rsi: add fix for crash during assertions Observed crash in some scenarios when assertion has occurred, this is because hw structure is freed and is tried to get accessed in some functions where null check is already present. So, avoided the crash by making the hw to NULL after freeing. Signed-off-by: Sanjay Konduri <...
static SLJIT_INLINE void count_match(compiler_common *common) { DEFINE_COMPILER; OP2(SLJIT_SUB | SLJIT_SET_Z, COUNT_MATCH, 0, COUNT_MATCH, 0, SLJIT_IMM, 1); add_jump(compiler, &common->calllimit, JUMP(SLJIT_ZERO)); }
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
294,579,727,080,266,730,000,000,000,000,000,000,000
7
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
static inline void io_req_work_drop_env(struct io_kiocb *req) { if (req->work.mm) { mmdrop(req->work.mm); req->work.mm = NULL; } if (req->work.creds) { put_cred(req->work.creds); req->work.creds = NULL; } }
1
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
317,144,349,525,634,330,000,000,000,000,000,000,000
11
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>
int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx) { return security_ops->xfrm_policy_alloc_security(ctxp, sec_ctx); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
146,092,227,818,291,590,000,000,000,000,000,000,000
4
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...
static int assess_notify_access( const struct security_assessor *a, const struct security_info *info, const void *data, uint64_t *ret_badness, char **ret_description) { assert(ret_badness); assert(ret_description); ...
0
[ "CWE-269" ]
systemd
9d880b70ba5c6ca83c82952f4c90e86e56c7b70c
106,592,384,516,548,900,000,000,000,000,000,000,000
15
analyze: check for RestrictSUIDSGID= in "systemd-analyze security" And let's give it a heigh weight, since it pretty much can be used for bad things only.
static inline char *tcp_ca_get_name_by_key(u32 key, char *buffer) { return NULL; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
47,230,874,520,990,200,000,000,000,000,000,000,000
4
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
void MainWindow::resetVideoModeMenu() { // Change selected Video Mode back to Settings for (const auto action : m_profileGroup->actions()) { if (action->data().toString() == Settings.playerProfile()) { action->setChecked(true); break; } } }
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
185,784,718,885,969,670,000,000,000,000,000,000,000
10
fix upgrade check is not using TLS correctly
radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; struct hstate *h = hstate_file(file); struct vm_unmapped_area_info info; if (unlikely(addr > mm->context.ad...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
126,038,796,111,229,980,000,000,000,000,000,000,000
46
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 void bmc_device_id_handler(struct ipmi_smi *intf, struct ipmi_recv_msg *msg) { int rv; if ((msg->addr.addr_type != IPMI_SYSTEM_INTERFACE_ADDR_TYPE) || (msg->msg.netfn != IPMI_NETFN_APP_RESPONSE) || (msg->msg.cmd != IPMI_GET_DEVICE_ID_CMD)) { dev_warn(intf->si_dev, "invalid device_id msg: add...
0
[ "CWE-416", "CWE-284" ]
linux
77f8269606bf95fcb232ee86f6da80886f1dfae8
83,757,956,360,405,220,000,000,000,000,000,000,000
30
ipmi: fix use-after-free of user->release_barrier.rda When we do the following test, we got oops in ipmi_msghandler driver while((1)) do service ipmievd restart & service ipmievd restart done --------------------------------------------------------------- [ 294.230186] Unable to handle kernel paging request at virt...
RList *MACH0_(get_segments)(RBinFile *bf) { struct MACH0_(obj_t) *bin = bf->o->bin_obj; RList *list = r_list_newf ((RListFree)r_bin_section_free); size_t i, j; /* for core files */ if (bin->nsegs > 0) { struct MACH0_(segment_command) *seg; for (i = 0; i < bin->nsegs; i++) { seg = &bin->segs[i]; if (!seg...
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
240,962,953,785,407,900,000,000,000,000,000,000,000
73
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
virDomainHostdevSubsysPCIOrigStatesDefParseXML(xmlNodePtr node, virDomainHostdevOrigStatesPtr def) { xmlNodePtr cur; cur = node->children; while (cur != NULL) { if (cur->type == XML_ELEMENT_NODE) { if (virXMLNodeNameEqual(cur, "unbind")) { ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
244,156,226,953,962,800,000,000,000,000,000,000,000
26
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static int nr_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer) { struct full_sockaddr_ax25 *sax = (struct full_sockaddr_ax25 *)uaddr; struct sock *sk = sock->sk; struct nr_sock *nr = nr_sk(sk); lock_sock(sk); if (peer != 0) { if (sk->sk_state != TCP_ESTABLISHED) { release_sock(...
0
[ "CWE-200" ]
linux-2.6
f6b97b29513950bfbf621a83d85b6f86b39ec8db
135,792,446,410,806,660,000,000,000,000,000,000,000
29
netrom: Fix nr_getname() leak nr_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
int get_partition_id_key_sub(partition_info *part_info, uint32 *part_id) { longlong func_value; *part_id= get_part_id_key(part_info->table->file, part_info->subpart_field_array, part_info->num_subparts, &func_value); return FALSE...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
148,098,480,044,862,810,000,000,000,000,000,000,000
9
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
int RemoveSectionType(int SectionType) { int a; int retval = FALSE; for (a=0;a<SectionsRead-1;a++){ if (Sections[a].Type == SectionType){ // Free up this section free (Sections[a].Data); // Move succeding sections back by one to close space in array. ...
0
[ "CWE-787" ]
jhead
b8d78e5ec982e86cdd70ebfc1ebbb2273c982eea
178,338,112,380,450,000,000,000,000,000,000,000,000
18
Same error as previous checking in different function
static int dcbnl_cee_get(struct net_device *netdev, struct nlmsghdr *nlh, u32 seq, struct nlattr **tb, struct sk_buff *skb) { const struct dcbnl_rtnl_ops *ops = netdev->dcbnl_ops; if (!ops) return -EOPNOTSUPP; return dcbnl_cee_fill(skb, netdev); }
0
[ "CWE-399" ]
linux-2.6
29cd8ae0e1a39e239a3a7b67da1986add1199fc0
257,759,909,225,233,200,000,000,000,000,000,000,000
10
dcbnl: fix various netlink info leaks The dcb netlink interface leaks stack memory in various places: * perm_addr[] buffer is only filled at max with 12 of the 32 bytes but copied completely, * no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand, so we're leaking up to 58 bytes for ieee_ets structs...
metadata_show(struct mddev *mddev, char *page) { if (mddev->persistent) return sprintf(page, "%d.%d\n", mddev->major_version, mddev->minor_version); else if (mddev->external) return sprintf(page, "external:%s\n", mddev->metadata_type); else return sprintf(page, "none\n"); }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
264,779,353,185,327,600,000,000,000,000,000,000,000
10
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...
asmlinkage long sys_oabi_sendmsg(int fd, struct msghdr __user *msg, unsigned flags) { struct sockaddr __user *addr; int msg_namelen; sa_family_t sa_family; if (msg && get_user(msg_namelen, &msg->msg_namelen) == 0 && msg_namelen == 112 && get_user(addr, &msg->msg_name) == 0 && get_user(sa_family,...
0
[ "CWE-703", "CWE-189" ]
linux
0f22072ab50cac7983f9660d33974b45184da4f9
19,913,189,395,536,173,000,000,000,000,000,000,000
25
ARM: 6891/1: prevent heap corruption in OABI semtimedop When CONFIG_OABI_COMPAT is set, the wrapper for semtimedop does not bound the nsops argument. A sufficiently large value will cause an integer overflow in allocation size, followed by copying too much data into the allocated buffer. Fix this by restricting nsop...
static int rtw_wx_get_sens(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { wrqu->sens.value = 0; wrqu->sens.fixed = 0; /* no auto select */ wrqu->sens.disabled = 1; return 0; }
0
[ "CWE-787" ]
linux
74b6b20df8cfe90ada777d621b54c32e69e27cd7
77,685,715,463,585,170,000,000,000,000,000,000,000
9
staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan() This code has a check to prevent read overflow but it needs another check to prevent writing beyond the end of the ->ssid[] array. Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16") Signed-off-by: Dan Carpenter <dan.carpenter@o...
static int decode_slice(MpegEncContext *s) { const int part_mask = s->partitioned_frame ? (ER_AC_END | ER_AC_ERROR) : 0x7F; const int mb_size = 16 >> s->avctx->lowres; int ret; s->last_resync_gb = s->gb; s->first_slice_line = 1; s->resync_mb_x = s->mb_x; s...
0
[ "CWE-20", "CWE-617" ]
FFmpeg
bd27a9364ca274ca97f1df6d984e88a0700fb235
286,034,035,408,253,080,000,000,000,000,000,000,000
228
avcodec/mpeg4videodec: Remove use of FF_PROFILE_MPEG4_SIMPLE_STUDIO as indicator of studio profile The profile field is changed by code inside and outside the decoder, its not a reliable indicator of the internal codec state. Maintaining it consistency with studio_profile is messy. Its easier to just avoid it and use ...
static int http_connect(URLContext *h, const char *path, const char *local_path, const char *hoststr, const char *auth, const char *proxyauth, int *new_location) { HTTPContext *s = h->priv_data; int post, err; char headers[HTTP_HEADERS_SIZE] = ""; char *au...
1
[ "CWE-119", "CWE-787" ]
FFmpeg
2a05c8f813de6f2278827734bf8102291e7484aa
197,196,946,650,009,750,000,000,000,000,000,000,000
164
http: make length/offset-related variables unsigned. Fixes #5992, reported and found by Paul Cher <paulcher@icloud.com>.
static inline int _bcf1_sync_alleles(const bcf_hdr_t *hdr, bcf1_t *line, int nals) { line->d.shared_dirty |= BCF1_DIRTY_ALS; line->n_allele = nals; hts_expand(char*, line->n_allele, line->d.m_allele, line->d.allele); char *als = line->d.als; int n = 0; while (n<nals) { line->d.alle...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
12,261,321,972,986,448,000,000,000,000,000,000,000
33
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
e1000e_get_reg_index_with_offset(const uint16_t *mac_reg_access, hwaddr addr) { uint16_t index = (addr & 0x1ffff) >> 2; return index + (mac_reg_access[index] & 0xfffe); }
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
49,608,063,807,336,460,000,000,000,000,000,000,000
5
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
static int ntop_syslog(lua_State* vm) { #ifndef WIN32 char *msg; bool is_error; ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TBOOLEAN)) return(CONST_LUA_ERROR); if(ntop_lua_check(vm, __FUNCTION__, 2, LUA_TSTRING)) return(CONST_LUA_ERROR)...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
220,867,279,139,389,450,000,000,000,000,000,000,000
18
Security fix: prevents empty host from being used
DEFUN (clear_ip_bgp_as_ipv4_soft, clear_ip_bgp_as_ipv4_soft_cmd, "clear ip bgp <1-65535> ipv4 (unicast|multicast) soft", CLEAR_STR IP_STR BGP_STR "Clear peers with the AS number\n" "Address family\n" "Address Family Modifier\n" "Address Family Modifier\n" ...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
206,767,486,122,373,350,000,000,000,000,000,000,000
19
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
parse_marker (IOBUF inp, int pkttype, unsigned long pktlen) { (void) pkttype; if (pktlen != 3) goto fail; if (iobuf_get (inp) != 'P') { pktlen--; goto fail; } if (iobuf_get (inp) != 'G') { pktlen--; goto fail; } if (iobuf_get (inp) != 'P') { pktlen--; ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
290,966,980,207,622,070,000,000,000,000,000,000,000
37
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static int wcd9335_codec_enable_mclk(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kc, int event) { struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); switch (event) { case SND_SOC_DAPM_PRE_PMU: return _wcd9335_codec_enable_mclk(comp, true); case SND_SOC_DAPM_POST_PMD: return _...
0
[]
sound
a54988113985ca22e414e132054f234fc8a92604
56,301,958,375,731,110,000,000,000,000,000,000,000
14
wcd9335: fix a incorrect use of kstrndup() In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup(). However, according to doc: "Note: Use kmemdup_nul() instead if the size is known exactly." So we should use kmemdup_nul() here instead of kstrndup(). Signed-off-by: Gen Zhang <blackgod016574@gmail.com> ...