func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
UTFstring::UTFstring() :_Length(0) ,_Data(NULL) {}
0
[ "CWE-200", "CWE-703" ]
libebml
ababb64e0c792ad2a314245233db0833ba12036b
150,264,838,117,896,540,000,000,000,000,000,000,000
4
EbmlUnicodeString: don't read beyond end of string The conversion from an UTF-8 encoded string into a wchar_t one was reading from beyond the end of the source buffer if the length indicated by a UTF-8 character's first byte exceeds the number of bytes actually present afterwards. Fixes the issue reported as Cisco TA...
static int find_body_sid_by_offset(MXFContext *mxf, int64_t offset) { // we look for partition where the offset is placed int a, b, m; int64_t this_partition; a = -1; b = mxf->partitions_count; while (b - a > 1) { m = (a + b) >> 1; this_partition = mxf->partitions[m].th...
0
[ "CWE-125" ]
FFmpeg
bab0716c7f4793ec42e05a5aa7e80d82a0dd4e75
89,149,896,163,478,020,000,000,000,000,000,000,000
22
avformat/mxfdec: Fix av_log context Fixes: out of array access Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static int ucma_event_handler(struct rdma_cm_id *cm_id, struct rdma_cm_event *event) { struct ucma_event *uevent; struct ucma_context *ctx = cm_id->context; int ret = 0; uevent = kzalloc(sizeof(*uevent), GFP_KERNEL); if (!uevent) return event->event == RDMA_CM_EVENT_CONNECT_REQUEST; mutex_lock(&ctx->...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
106,709,190,686,081,540,000,000,000,000,000,000,000
53
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
int set_endian(struct task_struct *tsk, unsigned int val) { struct pt_regs *regs = tsk->thread.regs; if ((val == PR_ENDIAN_LITTLE && !cpu_has_feature(CPU_FTR_REAL_LE)) || (val == PR_ENDIAN_PPC_LITTLE && !cpu_has_feature(CPU_FTR_PPC_LE))) return -EINVAL; if (regs == NULL) return -EINVAL; if (val == PR_EN...
0
[ "CWE-20" ]
linux
621b5060e823301d0cba4cb52a7ee3491922d291
42,992,463,748,359,450,000,000,000,000,000,000,000
20
powerpc/tm: Fix crash when forking inside a transaction When we fork/clone we currently don't copy any of the TM state to the new thread. This results in a TM bad thing (program check) when the new process is switched in as the kernel does a tmrechkpt with TEXASR FS not set. Also, since R1 is from userspace, we trig...
static int LogInfoCompare(const void *x,const void *y) { const LogInfo **p, **q; p=(const LogInfo **) x, q=(const LogInfo **) y; if (LocaleCompare((*p)->path,(*q)->path) == 0) return(LocaleCompare((*p)->name,(*q)->name)); return(LocaleCompare((*p)->path,(*q)->path)); }
0
[ "CWE-476" ]
ImageMagick
107ce8577e818cf4801e5a59641cb769d645cc95
31,527,013,847,694,330,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1224
TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { if (tuple[index].has_value()) { return Status(errors::InvalidArgument( "The tensor for index '", index, "' for key '", key.scalar<int64>()(), "' was already initialized '", dtypes_.size(), "'.")); } return Status::OK(); }
1
[ "CWE-125", "CWE-824" ]
tensorflow
532f5c5a547126c634fefd43bbad1dc6417678ac
167,017,391,182,203,330,000,000,000,000,000,000,000
9
Prevent nullptr deref in validation of indexes in map ops. PiperOrigin-RevId: 387738023 Change-Id: I83d18d36a7b82ffd2a40b5124a4e5b4c72238f27
xfs_inode_item_destroy( xfs_inode_t *ip) { kmem_zone_free(xfs_ili_zone, ip->i_itemp); }
0
[ "CWE-19" ]
linux
fc0561cefc04e7803c0f6501ca4f310a502f65b8
146,256,973,636,191,540,000,000,000,000,000,000,000
5
xfs: optimise away log forces on timestamp updates for fdatasync xfs: timestamp updates cause excessive fdatasync log traffic Sage Weil reported that a ceph test workload was writing to the log on every fdatasync during an overwrite workload. Event tracing showed that the only metadata modification being made was the...
void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) { r[ 8]=bn_mul_words( &(r[0]),a,8,b[0]); r[ 9]=bn_mul_add_words(&(r[1]),a,8,b[1]); r[10]=bn_mul_add_words(&(r[2]),a,8,b[2]); r[11]=bn_mul_add_words(&(r[3]),a,8,b[3]); r[12]=bn_mul_add_words(&(r[4]),a,8,b[4]); r[13]=bn_mul_add_words(&(r[5]),a,8,b[5]); ...
1
[ "CWE-310" ]
openssl
a7a44ba55cb4f884c6bc9ceac90072dea38e66d0
146,978,304,991,942,760,000,000,000,000,000,000,000
11
Fix for CVE-2014-3570 (with minor bn_asm.c revamp). Reviewed-by: Emilia Kasper <emilia@openssl.org>
static void InvertPerspectiveCoefficients(const double *coeff, double *inverse) { /* From "Digital Image Warping" by George Wolberg, page 53 */ double determinant; determinant=PerceptibleReciprocal(coeff[0]*coeff[4]-coeff[3]*coeff[1]); inverse[0]=determinant*(coeff[4]-coeff[7]*coeff[5]); inverse[1]=determi...
0
[]
ImageMagick6
4eafab89a2742865d770857a9d7434993f65ae6b
124,115,713,518,591,870,000,000,000,000,000,000,000
16
https://github.com/ImageMagick/ImageMagick/issues/3331
static gboolean listener_event(GIOChannel *channel, GIOCondition condition, gpointer user_data) { GDHCPClient *dhcp_client = user_data; struct sockaddr_in dst_addr = { 0 }; struct dhcp_packet packet = { 0 }; struct dhcpv6_packet *packet6 = NULL; uint8_t *message_type = NULL, *client_id = NULL, *option, *s...
0
[]
connman
a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1
10,665,046,121,646,894,000,000,000,000,000,000,000
378
gdhcp: Avoid leaking stack data via unitiialized variable Fixes: CVE-2021-26676
static int change_compar(const void *a, const void *b) { struct index_change *ac = (struct index_change *)a; struct index_change *bc = (struct index_change *)b; if (ac->record.recno > bc->record.recno) return 1; if (ac->record.recno < bc->record.recno) return -1; return 0; }
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
54,370,544,000,018,300,000,000,000,000,000,000,000
11
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
~RGWPutObj_CB() override {}
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
230,693,653,542,174,420,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 <...
static inline void dn_socket_format_entry(struct seq_file *seq, struct sock *sk) { struct dn_scp *scp = DN_SK(sk); char buf1[DN_ASCBUF_LEN]; char buf2[DN_ASCBUF_LEN]; char local_object[DN_MAXOBJL+3]; char remote_object[DN_MAXOBJL+3]; dn_printable_object(&scp->addr, local_object); dn_printable_object(&scp->peer,...
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
115,703,679,569,209,960,000,000,000,000,000,000,000
33
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
void idle_timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) { auto conn = static_cast<Connection *>(w->data); auto dconn = static_cast<HttpDownstreamConnection *>(conn->data); if (w == &conn->rt && !conn->expired_rt()) { return; } if (LOG_ENABLED(INFO)) { DCLOG(INFO, dconn) << "Idle connecti...
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
12,366,978,510,448,887,000,000,000,000,000,000,000
15
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd, unsigned long addr, unsigned long end, pte_fn_t fn, void *data) { pte_t *pte; int err; pgtable_t token; spinlock_t *uninitialized_var(ptl); pte = (mm == &init_mm) ? pte_alloc_kernel(pmd, addr) : pte_alloc_map_lock(mm, pmd, addr,...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
305,375,986,115,267,230,000,000,000,000,000,000,000
33
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static int btrfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { struct inode *inode = dentry->d_inode; u32 blocksize = inode->i_sb->s_blocksize; generic_fillattr(inode, stat); stat->dev = BTRFS_I(inode)->root->anon_dev; stat->blksize = PAGE_CACHE_SIZE; stat->blocks = (ALIGN(inode_...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
310,594,359,579,232,420,000,000,000,000,000,000,000
13
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 void test05(char const* infile, char const* password, char const* outfile, char const* outfile2) { qpdf_read(qpdf, infile, password); qpdf_init_write(qpdf, outfile); qpdf_set_static_ID(qpdf, QPDF_TRUE); qpdf_set_linearization(qpdf, QPDF_TRUE); qpdf_write(qpdf); report_error...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
302,759,259,339,589,370,000,000,000,000,000,000,000
12
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
jas_image_t *jp2_decode(jas_stream_t *in, char *optstr) { jp2_box_t *box; int found; jas_image_t *image; jp2_dec_t *dec; bool samedtype; int dtype; unsigned int i; jp2_cmap_t *cmapd; jp2_pclr_t *pclrd; jp2_cdef_t *cdefd; unsigned int channo; int newcmptno; int_fast32_t *lutents; #if 0 jp2_cdefchan_t *cdef...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
44,250,030,437,075,600,000,000,000,000,000,000,000
346
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
Bool gf_isom_is_adobe_protection_media(GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex) { GF_TrackBox *trak; GF_ProtectionSchemeInfoBox *sinf; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return GF_FALSE; sinf = isom_get_sinf_entry(trak, sampleDescriptionIndex, GF_ISOM_...
0
[ "CWE-476" ]
gpac
3b84ffcbacf144ce35650df958432f472b6483f8
92,485,721,768,477,340,000,000,000,000,000,000,000
18
fixed #1735
TEST_F(QueryPlannerTest, NegationTopLevel) { addIndex(BSON("a" << 1)); runQuerySortProj(fromjson("{a: {$ne: 1}}"), BSONObj(), BSONObj()); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{fetch: {filter: null, node: {ixscan: {pattern: {a:1}, " ...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
168,192,228,741,273,650,000,000,000,000,000,000,000
11
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) { dccp_feat_val fval; if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) return -EINVAL; /* Avoid negotiating alien CCIDs by only advertising support...
0
[ "CWE-401" ]
linux
1d3ff0950e2b40dc861b1739029649d03f591820
222,948,741,261,746,530,000,000,000,000,000,000,000
23
dccp: Fix memleak in __feat_register_sp If dccp_feat_push_change fails, we forget free the mem which is alloced by kmemdup in dccp_feat_clone_sp_val. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: e8ef967a54f4 ("dccp: Registration routines for changing feature values") Reviewed-by: Mukesh Ojha <mojha@codeaurora.o...
GF_Err tpay_Read(GF_Box *s, GF_BitStream *bs) { GF_TPAYBox *ptr = (GF_TPAYBox *)s; ptr->nbBytes = gf_bs_read_u32(bs); return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
241,319,335,733,695,700,000,000,000,000,000,000,000
6
prevent dref memleak on invalid input (#1183)
static void cleanupandexit(int status) { unloadimage(); exit(status); }
0
[ "CWE-119" ]
jasper
65536647d380571d1a9a6c91fa03775fb5bbd256
225,410,645,248,226,000,000,000,000,000,000,000,000
5
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...
void dm_internal_resume(struct mapped_device *md) { mutex_lock(&md->suspend_lock); __dm_internal_resume(md); mutex_unlock(&md->suspend_lock); }
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
283,789,085,562,112,600,000,000,000,000,000,000,000
6
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum) { struct map_struct *buf; OFF_T i, len = st_p->st_size; md_context m; int32 remainder; int fd; memset(sum, 0, MAX_DIGEST_LEN); fd = do_open(fname, O_RDONLY, 0); if (fd == -1) return; buf = map_file(fd, len, MAX_MAP_SIZE, CSUM_CHUNK)...
1
[ "CWE-354" ]
rsync
7b8a4ecd6ff9cdf4e5d3850ebf822f1e989255b3
280,061,352,554,544,200,000,000,000,000,000,000,000
59
Handle archaic checksums properly.
int btrfs_scrub_cancel(struct btrfs_fs_info *fs_info) { mutex_lock(&fs_info->scrub_lock); if (!atomic_read(&fs_info->scrubs_running)) { mutex_unlock(&fs_info->scrub_lock); return -ENOTCONN; } atomic_inc(&fs_info->scrub_cancel_req); while (atomic_read(&fs_info->scrubs_running)) { mutex_unlock(&fs_info->scrub...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
300,010,178,746,309,770,000,000,000,000,000,000,000
20
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
onig_get_callout_data_by_callout_args(OnigCalloutArgs* args, int callout_num, int slot, OnigType* type, OnigValue* val) { return onig_get_callout_data(args->regex, args->msa->mp, callout_num, slot, type, val); }
0
[ "CWE-125" ]
oniguruma
d3e402928b6eb3327f8f7d59a9edfa622fec557b
289,428,250,456,752,060,000,000,000,000,000,000,000
7
fix heap-buffer-overflow
static int ovl_set_timestamps(struct dentry *upperdentry, struct kstat *stat) { struct iattr attr = { .ia_valid = ATTR_ATIME | ATTR_MTIME | ATTR_ATIME_SET | ATTR_MTIME_SET, .ia_atime = stat->atime, .ia_mtime = stat->mtime, }; return notify_change(upperdentry, &attr, NULL); }
0
[ "CWE-399" ]
linux
ab79efab0a0ba01a74df782eb7fa44b044dae8b5
26,502,056,373,172,230,000,000,000,000,000,000,000
11
ovl: fix dentry reference leak In ovl_copy_up_locked(), newdentry is leaked if the function exits through out_cleanup as this just to out after calling ovl_cleanup() - which doesn't actually release the ref on newdentry. The out_cleanup segment should instead exit through out2 as certainly newdentry leaks - and possi...
_tiffUnmapProc(thandle_t hdata, tdata_t base, toff_t size) { TRACE(("_tiffUnMapProc\n")); (void)hdata; (void)base; (void)size; }
0
[ "CWE-787" ]
Pillow
3fee28eb9479bf7d59e0fa08068f9cc4a6e2f04c
137,301,462,780,591,220,000,000,000,000,000,000,000
6
Incorrect error code checking in TiffDecode.c * since Pillow 8.1.0 * CVE-2021-25289
int imap_sync_mailbox(struct Mailbox *m, bool expunge, bool close) { if (!m) return -1; struct Email **emails = NULL; int oldsort; int rc; int check; struct ImapAccountData *adata = imap_adata_get(m); struct ImapMboxData *mdata = imap_mdata_get(m); if (adata->state < IMAP_SELECTED) { mutt_d...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
222,286,176,111,647,140,000,000,000,000,000,000,000
206
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>
file_recursive_delete_thread (GSimpleAsyncResult *simple, GObject *object, GCancellable *cancellable) { GError *error = NULL; e_file_recursive_delete_sync (G_FILE (object), cancellable, &error); if (error != NULL) g_simple_async_result_take_error (simpl...
0
[ "CWE-295" ]
evolution-data-server
6672b8236139bd6ef41ecb915f4c72e2a052dba5
208,387,519,726,087,070,000,000,000,000,000,000,000
11
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
gs_image_t_init_mask_adjust(gs_image_t * pim, bool write_1s, bool adjust) { gs_image_t_init(pim, NULL); if (write_1s) pim->Decode[0] = 1, pim->Decode[1] = 0; else pim->Decode[0] = 0, pim->Decode[1] = 1; pim->adjust = adjust; }
0
[]
ghostpdl
cffb5712bc10c2c2f46adf311fc74aaae74cb784
102,069,548,430,588,640,000,000,000,000,000,000,000
9
Commit a9a58bb95 was incorrect, clearing some values that it shouldn't The penum->rect values were cleared, and this didn't cover all uses of gx_image_enum_alloc. Also, return *ppenum NULL if alloc fails in case the caller doesn't check the return code. Also, if we fail the enum_begin, free the enum and set *pinfo to ...
void NumberFormatTest::Test13763_FieldPositionIteratorOffset() { IcuTestErrorCode status(*this, "Test13763_FieldPositionIteratorOffset"); FieldPositionIterator fpi; UnicodeString result(u"foo\U0001F4FBbar"); // 8 code units LocalPointer<NumberFormat> nf(NumberFormat::createInstance("en", status), status...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
27,895,512,503,102,210,000,000,000,000,000,000,000
17
ICU-20246 Fixing another integer overflow in number parsing.
static const struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family) { struct xfrm_state_afinfo *afinfo; const struct xfrm_type **typemap; const struct xfrm_type *type; int modload_attempted = 0; retry: afinfo = xfrm_state_get_afinfo(family); if (unlikely(afinfo == NULL)) return NULL; typemap = afinf...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
29,277,405,414,782,448,000,000,000,000,000,000,000
27
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
void testcompressDecompressWithUncommonParams( Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl::CompressionLevel comp_level, Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl::CompressionStrategy comp_strategy, int64_t window_bits, uint64_t memory_level) { Buf...
0
[]
envoy
cb4ef0b09200c720dfdb07e097092dd105450343
34,352,699,184,603,820,000,000,000,000,000,000,000
39
decompressors: stop decompressing upon excessive compression ratio (#733) Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com> Co-authored-by: Ryan Hamilton <rch@google.com> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int sctp_v6_available(union sctp_addr *addr, struct sctp_sock *sp) { int type; struct net *net = sock_net(&sp->inet.sk); const struct in6_addr *in6 = (const struct in6_addr *)&addr->v6.sin6_addr; type = ipv6_addr_type(in6); if (IPV6_ADDR_ANY == type) return 1; if (type == IPV6_ADDR_MAPPED) { if (sp &&...
0
[ "CWE-241" ]
linux
fdcee2cbb8438702ea1b328fb6e0ac5e9a40c7f8
147,818,683,036,392,040,000,000,000,000,000,000,000
21
sctp: do not inherit ipv6_{mc|ac|fl}_list from parent SCTP needs fixes similar to 83eaddab4378 ("ipv6/dccp: do not inherit ipv6_mc_list from parent"), otherwise bad things can happen. Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Andrey Konovalov <andreyknvl@google.com> Tested-by: Andrey Konovalov <a...
parse_http_url(const char *headers, char **url) { char *s, *start, *tmp; s = (char *)eat_whitespace_no_nl(headers); if (!*s) return -1; s = (char *)find_whitespace(s); /* get past GET/POST */ if (!*s) return -1; s = (char *)eat_whitespace_no_nl(s); if (!*s) return -1; start = s; /* this is it, assuming...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
98,232,343,823,063,360,000,000,000,000,000,000,000
37
Fix assertion failure in tor_timegm. Fixes bug 6811.
setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) { DTD * const dtd = parser->m_dtd; /* save one level of indirection */ const XML_Char *name; for (name = elementType->name; *name; name++) { if (*name == XML_T(ASCII_COLON)) { PREFIX *prefix; const XML_Char *s; for (s = elem...
1
[ "CWE-611" ]
libexpat
11f8838bf99ea0a6f0b76f9760c43704d00c4ff6
251,842,892,383,111,660,000,000,000,000,000,000,000
28
xmlparse.c: Fix extraction of namespace prefix from XML name (#186)
static int wrap_nettle_mac_fast(gnutls_mac_algorithm_t algo, const void *nonce, size_t nonce_size, const void *key, size_t key_size, const void *text, size_t text_size, void *digest) { struct nettle_mac_ctx ctx; int ret; ret = _mac_ctx_init(algo, &ctx); if (ret < 0) return gnutls_assert_val(ret);...
0
[ "CWE-476" ]
gnutls
3db352734472d851318944db13be73da61300568
120,783,918,135,093,820,000,000,000,000,000,000,000
27
wrap_nettle_hash_fast: avoid calling _update with zero-length input As Nettle's hash update functions internally call memcpy, providing zero-length input may cause undefined behavior. Signed-off-by: Daiki Ueno <ueno@gnu.org>
qtdemux_find_stream (GstQTDemux * qtdemux, guint32 id) { QtDemuxStream *stream; gint i; /* check */ if (G_UNLIKELY (!id)) { GST_DEBUG_OBJECT (qtdemux, "invalid track id 0"); return NULL; } /* try to get it fast and simple */ if (G_LIKELY (id <= qtdemux->n_streams)) { stream = qtdemux->stream...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
276,250,599,709,091,130,000,000,000,000,000,000,000
31
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC); if (IS_CV =...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
105,580,453,705,026,370,000,000,000,000,000,000,000
15
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
void ipc_rmid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp) { int lid = ipcid_to_idx(ipcp->id); idr_remove(&ids->ipcs_idr, lid); ids->in_use--; ipcp->deleted = 1; return; }
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
302,688,751,345,834,200,000,000,000,000,000,000,000
12
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) { return gTrue; }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
334,042,172,305,215,330,000,000,000,000,000,000,000
3
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static unsigned long __init usemap_size(unsigned long zone_start_pfn, unsigned long zonesize) { unsigned long usemapsize; zonesize += zone_start_pfn & (pageblock_nr_pages-1); usemapsize = roundup(zonesize, pageblock_nr_pages); usemapsize = usemapsize >> pageblock_order; usemapsize *= NR_PAGEBLOCK_BITS; usemapsiz...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
158,435,979,949,607,960,000,000,000,000,000,000,000
12
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
av_cold int avcodec_close(AVCodecContext *avctx) { int ret; if (!avctx) return 0; ret = ff_lock_avcodec(avctx); if (ret < 0) return ret; if (avcodec_is_open(avctx)) { FramePool *pool = avctx->internal->pool; int i; if (CONFIG_FRAME_THREAD_ENCODER && ...
0
[ "CWE-703" ]
FFmpeg
e5c7229999182ad1cef13b9eca050dba7a5a08da
142,465,078,548,251,650,000,000,000,000,000,000,000
46
avcodec/utils: set AVFrame format unconditional Fixes inconsistency and out of array accesses Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
LanLinkProvider::~LanLinkProvider() { }
0
[ "CWE-400", "CWE-703" ]
kdeconnect-kde
4fbd01a3d44a0bcca888c49a77ec7cfd10e113d7
103,059,754,354,513,700,000,000,000,000,000,000,000
3
Limit identity packets to 8KiB Healthy identity packages shouldn't be that big and we don't want to allow systems around us to send us ever humongous packages that will just leave us without any memory. Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
WandExport void DrawPathCurveToRelative(DrawingWand *wand,const double x1, const double y1,const double x2,const double y2,const double x,const double y) { assert(wand != (DrawingWand *) NULL); assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,Ge...
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
61,665,113,895,266,990,000,000,000,000,000,000,000
9
https://github.com/ImageMagick/ImageMagick/issues/716
static char *remove_context_options(char *opts) { char *begin = NULL, *end = NULL, *p; int open_quote = 0, changed = 0; if (!opts) return NULL; opts = xstrdup(opts); for (p = opts; p && *p; p++) { if (!begin) begin = p; /* begin of the option item */ if (*p == '"') open_quote ^= 1; /* reverse the s...
0
[ "CWE-399" ]
util-linux
4b39b6aefd5dd8ac68a92adc650dc13d5d54d704
16,931,076,328,635,466,000,000,000,000,000,000,000
48
mount: use fflush() and temporary file for mtab updates (CVE-2011-1089) http://thread.gmane.org/gmane.comp.security.oss.general/4374 Changes: - force mount(8) to use /etc/mtab.tmp file every time. The original code used the tmp file for remount/move operations only. - call and check fflush() return code for...
static int https_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks) { if(conn->handler->flags & PROTOPT_SSL) { struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET]; if(!numsocks) return GETSOCK_BLANK; if(connssl->connecting...
0
[ "CWE-284" ]
curl
79b9d5f1a42578f807a6c94914bc65cbaa304b6d
109,262,952,992,311,000,000,000,000,000,000,000,000
23
http_done: close Negotiate connections when done When doing HTTP requests Negotiate authenticated, the entire connnection may become authenticated and not just the specific HTTP request which is otherwise how HTTP works, as Negotiate can basically use NTLM under the hood. curl was not adhering to this fact but would a...
static long aio_read_events_ring(struct kioctx *ctx, struct io_event __user *event, long nr) { struct aio_ring *ring; unsigned head, tail, pos; long ret = 0; int copy_ret; mutex_lock(&ctx->ring_lock); /* Access to ->ring_pages here is protected by ctx->ring_lock. */ ring = kmap_atomic(ctx->ring_pages[0]);...
0
[ "CWE-200" ]
linux
edfbbf388f293d70bf4b7c0bc38774d05e6f711a
287,546,001,307,144,900,000,000,000,000,000,000,000
67
aio: fix kernel memory disclosure in io_getevents() introduced in v3.10 A kernel memory disclosure was introduced in aio_read_events_ring() in v3.10 by commit a31ad380bed817aa25f8830ad23e1a0480fef797. The changes made to aio_read_events_ring() failed to correctly limit the index into ctx->ring_pages[], allowing an at...
std::string AsyncSSLSocket::getSSLClientExts() const { if (!parseClientHello_) { return ""; } return folly::join(":", clientHelloInfo_->clientHelloExtensions_); }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
286,130,350,314,023,300,000,000,000,000,000,000,000
6
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
CMYK_table_init (void) { g_mutex_lock (&Tables_Mutex); if (CMYK_Tab == NULL) { int v, k, i; double k1; /* tab[k * 256 + v] = v * k / 255.0 */ CMYK_Tab = g_new (unsigned char, 256 * 256); i = 0; for (k = 0; k <= 255; k++) { k1 = (double) k / 255.0; for (v = 0; v <= 255; v++) CMYK_Tab[i++] =...
0
[ "CWE-787" ]
gthumb
4faa5ce2358812d23a1147953ee76f59631590ad
334,545,127,962,585,000,000,000,000,000,000,000,000
21
jpeg loader: do not scan more than output_height lines
static void tcg_register_iommu_notifier(CPUState *cpu, IOMMUMemoryRegion *iommu_mr, int iommu_idx) { /* Make sure this CPU has an IOMMU notifier registered for this * IOMMU/IOMMU index combination, so that we can flush its TLB ...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
124,827,358,384,721,900,000,000,000,000,000,000,000
47
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
create_ctas_internal(List *attrList, IntoClause *into) { CreateStmt *create = makeNode(CreateStmt); bool is_matview; char relkind; Datum toast_options; static char *validnsps[] = HEAP_RELOPT_NAMESPACES; ObjectAddress intoRelationAddr; /* This code supports both CREATE TABLE AS and CREATE MATERIALIZED VIEW */...
0
[ "CWE-94" ]
postgres
b9b21acc766db54d8c337d508d0fe2f5bf2daab0
304,732,700,875,796,600,000,000,000,000,000,000,000
64
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
QPDFNumberTreeObjectHelper::updateMap(QPDFObjectHandle oh) { if (this->m->seen.count(oh.getObjGen())) { return; } this->m->seen.insert(oh.getObjGen()); QPDFObjectHandle nums = oh.getKey("/Nums"); if (nums.isArray()) { int nitems = nums.getArrayNItems(); int i = 0; ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
330,061,330,789,430,250,000,000,000,000,000,000,000
34
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static int bad_file_fasync(int fd, struct file *filp, int on) { return -EIO; }
0
[]
linux-2.6
be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8
53,122,623,547,760,735,000,000,000,000,000,000,000
4
[PATCH] fix memory corruption from misinterpreted bad_inode_ops return values CVE-2006-5753 is for a case where an inode can be marked bad, switching the ops to bad_inode_ops, which are all connected as: static int return_EIO(void) { return -EIO; } #define EIO_ERROR ((void *) (return_EIO)) static struct ino...
f_foreground(typval_T *argvars UNUSED, typval_T *rettv UNUSED) { #ifdef FEAT_GUI if (gui.in_use) gui_mch_set_foreground(); #else # ifdef WIN32 win32_set_foreground(); # endif #endif }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
14,767,808,679,628,313,000,000,000,000,000,000,000
11
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
CImg<T>& _load_pandore(std::FILE *const file, const char *const filename) { #define __cimg_load_pandore_case(nbdim,nwidth,nheight,ndepth,ndim,stype) \ cimg::fread(dims,nbdim,nfile); \ if (endian) cimg::invert_endianness(dims,nbdim); \ if ((ulongT)nwidth*nheight*ndepth*ndim>fsiz) \ ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
99,525,769,303,486,820,000,000,000,000,000,000,000
204
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void UpdateDownloader::Run() { // no initialization to do, so signal readiness immediately SignalReady(); try { const std::wstring tmpdir = CreateUniqueTempDirectory(); Settings::WriteConfigValue("UpdateTempDir", tmpdir); UpdateDownloadSink sink(*this, tmpdir); DownloadFile(m_a...
0
[ "CWE-426", "CWE-401" ]
winsparkle
bb454857348245a7397f9e4fbb3a902f4ac25913
175,249,448,600,659,600,000,000,000,000,000,000,000
21
Verify UpdateTempDir isn't maliciously modified Don't just delete the stored updates temporary directory on launch, but validate the registry key to ensure it is in an expected location and follows WinSparkle's naming convention. This is to prevent malicious users from modifying this registry key and forcing the host ...
Status RoleGraph::getBSONForRole(RoleGraph* graph, const RoleName& roleName, mutablebson::Element result) try { if (!graph->roleExists(roleName)) { return Status(ErrorCodes::RoleNotFound, mongoutils::str::stream() << rol...
1
[ "CWE-863" ]
mongo
fb87cc88ecb5d300f14cda7bc238d7d5132118f5
201,647,173,021,413,020,000,000,000,000,000,000,000
38
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON (cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b) (cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36)
R_API const char *r_sub_str_lchr(const char *str, int start, int end, char chr) { do { end--; } while (str[end] != chr && end >= start); return str[end] == chr ? &str[end] : NULL; }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
154,853,244,714,094,360,000,000,000,000,000,000,000
6
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
e_ews_connection_queue_request (EEwsConnection *cnc, ESoapMessage *msg, EEwsResponseCallback cb, gint pri, GCancellable *cancellable, GSimpleAsyncResult *simple...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
207,726,247,583,904,380,000,000,000,000,000,000,000
37
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
evdev_pointer_notify_physical_button(struct evdev_device *device, uint64_t time, int button, enum libinput_button_state state) { if (evdev_middlebutton_filter_button(device, time, button, state)) return; evdev_pointer_notify_button(device, time, ...
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
278,120,661,332,728,800,000,000,000,000,000,000,000
16
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id) { struct snd_mem_list *mem; snd_assert(dmab, return 0); mutex_lock(&list_mutex); list_for_each_entry(mem, &mem_list_head, list) { if (mem->id == id && (mem->buffer.dev.dev == NULL || dmab->dev.dev == NULL || ! memcmp(&mem...
0
[]
linux-2.6
ccec6e2c4a74adf76ed4e2478091a311b1806212
24,278,265,303,315,020,000,000,000,000,000,000,000
24
Convert snd-page-alloc proc file to use seq_file Use seq_file for the proc file read/write of snd-page-alloc module. This automatically fixes bugs in the old proc code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
bool LEX::call_statement_start(THD *thd, const LEX_CSTRING *name1, const LEX_CSTRING *name2) { sp_name *spname= make_sp_name(thd, name1, name2); return unlikely(!spname) || call_statement_start(thd, spname); }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
156,782,003,510,372,930,000,000,000,000,000,000,000
6
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...
sf_read_short (SNDFILE *sndfile, short *ptr, sf_count_t len) { SF_PRIVATE *psf ; sf_count_t count, extra ; VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ; if (psf->file.mode == SFM_WRITE) { psf->error = SFE_NOT_READMODE ; return 0 ; } ; if (len % psf->sf.channels) { psf->error = SFE_BAD_READ_ALIGN ; ...
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
43,306,780,556,430,570,000,000,000,000,000,000,000
45
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 int piv_init(sc_card_t *card) { int r = 0; piv_private_data_t * priv = NULL; sc_apdu_t apdu; unsigned long flags; unsigned long ext_flags; u8 yubico_version_buf[3]; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); /* continue the matching get a lock and the priv */ r = piv_match_card_continued(card); ...
0
[]
OpenSC
456ac566938a1da774db06126a2fa6c0cba514b3
334,112,506,709,135,930,000,000,000,000,000,000,000
179
PIV Improved parsing of data from the card Based on Fuzz testing, many of the calls to sc_asn1_find_tag were replaced with sc_asn1_read_tag. The input is also tested that the expected tag is the first byte. Additional tests are also add. sc_asn1_find_tag will skip 0X00 or 0Xff if found. NIST sp800-73-x specs do not ...
void server_connect_init(SERVER_REC *server) { const char *str; g_return_if_fail(server != NULL); MODULE_DATA_INIT(server); server->type = module_get_uniq_id("SERVER", 0); server_ref(server); server->nick = g_strdup(server->connrec->nick); if (server->connrec->username == NULL || *server->connrec->username ==...
0
[ "CWE-20" ]
irssi-proxy
85bbc05b21678e80423815d2ef1dfe26208491ab
210,905,660,024,377,620,000,000,000,000,000,000,000
29
Check if an SSL certificate matches the hostname of the server we are connecting to git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564
static unsigned long shmem_default_max_blocks(void) { return totalram_pages / 2; }
0
[ "CWE-400" ]
linux-2.6
14fcc23fdc78e9d32372553ccf21758a9bd56fa1
175,049,067,355,501,960,000,000,000,000,000,000,000
4
tmpfs: fix kernel BUG in shmem_delete_inode SuSE's insserve initscript ordering program hits kernel BUG at mm/shmem.c:814 on 2.6.26. It's using posix_fadvise on directories, and the shmem_readpage method added in 2.6.23 is letting POSIX_FADV_WILLNEED allocate useless pages to a tmpfs directory, incrementing i_blocks ...
String *Item_func_min_max::val_str(String *str) { DBUG_ASSERT(fixed == 1); if (Item_func_min_max::cmp_type() == TIME_RESULT) return val_string_from_date(str); switch (Item_func_min_max::result_type()) { case INT_RESULT: return val_string_from_int(str); case DECIMAL_RESULT: return val_string_from_d...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
256,153,310,021,087,450,000,000,000,000,000,000,000
43
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) { struct sock *sk; struct sk_buff *skb_copy = NULL; BT_DBG("hdev %p len %d", hdev, skb->len); read_lock(&hci_sk_list.lock); sk_for_each(sk, &hci_sk_list.head) { struct sk_buff *nskb; if (sk->sk_state != BT_BOUND || hci_pi(sk)->hdev != hdev) ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
306,433,400,497,383,570,000,000,000,000,000,000,000
56
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
Mutex_sentry(mysql_mutex_t *mutex) : m_mutex(mutex) { if (m_mutex) mysql_mutex_lock(mutex); }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
22,712,733,413,090,320,000,000,000,000,000,000,000
6
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
void nghttp2_stream_write::MemoryInfo(MemoryTracker* tracker) const { if (req_wrap != nullptr) tracker->TrackField("req_wrap", req_wrap->GetAsyncWrap()); tracker->TrackField("buf", buf); }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
143,940,250,341,727,130,000,000,000,000,000,000,000
5
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
void js_promise_rejection_tracker(JSContext *ctx, JSValueConst promise, JSValueConst reason, JS_BOOL is_handled, void *opaque) { if (!is_handled) { GF_LOG(GF_LOG_WARNING, GF_LOG_CONSOLE, ("Possibly unhandled promise rejection: ")); js_dump_error_exc(ctx, reason); }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
67,466,030,168,291,555,000,000,000,000,000,000,000
7
fixed #2138
SCTP_STATIC int sctp_stream_listen(struct sock *sk, int backlog) { struct sctp_sock *sp = sctp_sk(sk); struct sctp_endpoint *ep = sp->ep; /* If backlog is zero, disable listening. */ if (!backlog) { if (sctp_sstate(sk, CLOSED)) return 0; sctp_unhash_endpoint(ep); sk->sk_state = SCTP_SS_CLOSED; } if (s...
0
[ "CWE-476" ]
linux
ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d
228,694,808,299,570,600,000,000,000,000,000,000,000
36
[SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message In current implementation, LKSCTP does receive buffer accounting for data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do accounting for data in frag_list when data is fragmented. In addition, LKSCTP doesn't do accounting for data in ...
void CoreNetwork::resetPersistentModes() { _requestedUserModes = QString('-'); Core::setUserModes(userId(), networkId(), QString()); }
0
[ "CWE-399" ]
quassel
b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8
307,980,358,246,795,170,000,000,000,000,000,000,000
5
Improve the message-splitting algorithm for PRIVMSG and CTCP This introduces a new message splitting algorithm based on QTextBoundaryFinder. It works by first starting with the entire message to be sent, encoding it, and checking to see if it is over the maximum message length. If it is, it uses QTBF to find the wor...
static char *mapLookup(Dt_t * nm, char *name) { namev_t *objp = dtmatch(nm, name); if (objp) return objp->unique_name; else return 0; }
0
[ "CWE-476" ]
graphviz
839085f8026afd6f6920a0c31ad2a9d880d97932
149,193,181,439,427,880,000,000,000,000,000,000,000
8
attempted fix for null pointer deference on malformed input
OperatorCreate(const char *operatorName, Oid operatorNamespace, Oid leftTypeId, Oid rightTypeId, Oid procedureId, List *commutatorName, List *negatorName, Oid restrictionId, Oid joinId, bool canMerge, bool canHash) { Relation pg_operator_desc; HeapTuple tup;...
0
[ "CWE-94" ]
postgres
5919bb5a5989cda232ac3d1f8b9d90f337be2077
137,407,906,031,403,020,000,000,000,000,000,000,000
242
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
slhc_remember(struct slcompress *comp, unsigned char *icp, int isize) { printk(KERN_DEBUG "Called IP function on non IP-system: slhc_remember"); return -EINVAL; }
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
114,224,638,932,747,720,000,000,000,000,000,000,000
5
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
void l2cap_conn_put(struct l2cap_conn *conn) { kref_put(&conn->ref, l2cap_conn_free); }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
123,197,573,221,683,830,000,000,000,000,000,000,000
4
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params) { struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_wsec_key *key; s32 val; s32 wsec; s32 err; u8 keybuf[8]; bool ext_key; brcmf_dbg(TRACE, "Ente...
0
[ "CWE-787" ]
linux
1b5e2423164b3670e8bc9174e4762d297990deff
233,806,901,683,701,040,000,000,000,000,000,000,000
107
brcmfmac: assure SSID length from firmware is limited The SSID length as received from firmware should not exceed IEEE80211_MAX_SSID_LEN as that would result in heap overflow. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by:...
void prepareLuaClient(void) { /* Select the right DB in the context of the Lua client */ selectDb(server.lua_client,server.lua_caller->db->id); server.lua_client->resp = 2; /* Default is RESP2, scripts can change it. */ /* If we are in MULTI context, flag Lua client as CLIENT_MULTI. */ if (server.l...
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
310,933,803,242,502,740,000,000,000,000,000,000,000
10
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
static inline int l2cap_disconnect_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) { struct l2cap_disconn_rsp *rsp = (struct l2cap_disconn_rsp *) data; u16 dcid, scid; struct l2cap_chan *chan; if (cmd_len != sizeof(*rsp)) return -EPROTO; scid = __le16_to_cpu...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
187,098,564,989,629,650,000,000,000,000,000,000,000
38
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
static int compat_raw_setsockopt(struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen) { if (level != SOL_RAW) return compat_ip_setsockopt(sk, level, optname, optval, optlen); return do_raw_setsockopt(sk, level, optname, optval, optlen); }
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
94,944,064,761,004,300,000,000,000,000,000,000,000
7
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...
static void percent_rankInvFunc( sqlite3_context *pCtx, int nArg, sqlite3_value **apArg ){ struct CallCount *p; UNUSED_PARAMETER(nArg); assert( nArg==0 ); UNUSED_PARAMETER(apArg); p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p)); p->nStep++; }
0
[ "CWE-476" ]
sqlite
75e95e1fcd52d3ec8282edb75ac8cd0814095d54
319,175,852,327,167,320,000,000,000,000,000,000,000
11
When processing constant integer values in ORDER BY clauses of window definitions (see check-in [7e4809eadfe99ebf]) be sure to fully disable the constant value to avoid an invalid pointer dereference if the expression is ever duplicated. This fixes a crash report from Yongheng and Rui. FossilOrigin-Name: 1ca0bd982ab11...
void LEX::start(THD *thd_arg) { DBUG_ENTER("LEX::start"); DBUG_PRINT("info", ("This: %p thd_arg->lex: %p", this, thd_arg->lex)); thd= unit.thd= thd_arg; stmt_lex= this; // default, should be rewritten for VIEWs And CTEs DBUG_ASSERT(!explain); builtin_select.lex_start(this); lex_options= 0; context_st...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
241,242,934,801,930,020,000,000,000,000,000,000,000
107
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...
vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; uint64_t features = msg->payload.u64; uint64_t vhost_features = 0; struct rte_vdpa_device *vdpa_dev; int did = -1; rte_vhost_driver_get_features(dev->ifname, &vhost_features)...
0
[ "CWE-190" ]
dpdk
d87f1a1cb7b666550bb53e39c1d85d9f7b861e6f
109,662,247,924,202,840,000,000,000,000,000,000,000
79
vhost: support inflight info sharing This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Signed-off-by: Lin Li <lilin24@baidu.com> Signed-off-by: Xun Ni <nixun@baidu.com> Signed-off-by: Yu Zhang <zhangyu31@b...
process_cmd_manual(CMD_Request *msg, const char *line) { const char *p; p = line; if (!*p) { return 0; } else if (!strcmp(p, "off")) { msg->data.manual.option = htonl(0); } else if (!strcmp(p, "on")) { msg->data.manual.option = htonl(1); } else if (!strcmp(p, "reset")) { msg->data.manual.o...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
275,053,065,076,514,440,000,000,000,000,000,000,000
21
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
void set_chroma_subsampling_horz(uint64_t chroma_subsampling_horz) { chroma_subsampling_horz_ = chroma_subsampling_horz; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
72,088,567,746,931,820,000,000,000,000,000,000,000
3
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static int ext4_valid_extent(struct inode *inode, struct ext4_extent *ext) { ext4_fsblk_t block = ext4_ext_pblock(ext); int len = ext4_ext_get_actual_len(ext); if (len == 0) return 0; return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, len); }
0
[ "CWE-362" ]
linux-2.6
dee1f973ca341c266229faa5a1a5bb268bed3531
114,110,740,226,231,370,000,000,000,000,000,000,000
9
ext4: race-condition protection for ext4_convert_unwritten_extents_endio We assumed that at the time we call ext4_convert_unwritten_extents_endio() extent in question is fully inside [map.m_lblk, map->m_len] because it was already split during submission. But this may not be true due to a race between writeback vs fa...
ends_excmd2(char_u *cmd_start UNUSED, char_u *cmd) { int c = *cmd; if (c == NUL || c == '|' || c == '\n') return TRUE; #ifdef FEAT_EVAL if (in_vim9script()) // # starts a comment, #{ might be a mistake, #{{ can start a fold return c == '#' && (cmd[1] != '{' || cmd[2] == '{') && (cmd == cmd_start |...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
84,435,835,588,639,480,000,000,000,000,000,000,000
14
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
ff_layout_send_layouterror(struct pnfs_layout_segment *lseg) { struct pnfs_layout_hdr *lo = lseg->pls_layout; struct nfs42_layout_error *errors; LIST_HEAD(head); if (!nfs_server_capable(lo->plh_inode, NFS_CAP_LAYOUTERROR)) return; ff_layout_fetch_ds_ioerr(lo, &lseg->pls_range, &head, -1); if (list_empty(&head)...
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
335,481,760,751,968,100,000,000,000,000,000,000,000
37
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
static inline void native_write_ldt_entry(struct desc_struct *ldt, int entry, const void *desc) { memcpy(&ldt[entry], desc, 8); }
0
[ "CWE-119" ]
linux-2.6
5ac37f87ff18843aabab84cf75b2f8504c2d81fe
142,440,315,865,880,090,000,000,000,000,000,000,000
5
x86: fix ldt limit for 64 bit Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor. Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
ngx_mail_auth(ngx_mail_session_t *s, ngx_connection_t *c) { s->args.nelts = 0; if (s->buffer->pos == s->buffer->last) { s->buffer->pos = s->buffer->start; s->buffer->last = s->buffer->start; } s->state = 0; if (c->read->timer_set) { ngx_del_timer(c->read); } s->lo...
0
[ "CWE-284", "CWE-295" ]
nginx
173f16f736c10eae46cd15dd861b04b82d91a37a
34,639,683,070,570,464,000,000,000,000,000,000,000
19
Mail: max_errors directive. Similarly to smtpd_hard_error_limit in Postfix and smtp_max_unknown_commands in Exim, specifies the number of errors after which the connection is closed.
void t_cpp_generator::generate_constructor_helper(ofstream& out, t_struct* tstruct, bool is_exception, bool is_move) { std::string tmp_name = tmp("other"); indent(o...
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
15,562,535,097,243,919,000,000,000,000,000,000,000
42
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
static int inet6_create(struct net *net, struct socket *sock, int protocol) { struct inet_sock *inet; struct ipv6_pinfo *np; struct sock *sk; struct list_head *p; struct inet_protosw *answer; struct proto *answer_prot; unsigned char answer_flags; char answer_no_check; int try_loading_module = 0; int err; if...
0
[]
linux-2.6
2e761e0532a784816e7e822dbaaece8c5d4be14d
275,603,282,633,753,400,000,000,000,000,000,000,000
157
ipv6 netns: init net is used to set bindv6only for new sock The bindv6only is tuned via sysctl. It is already on a struct net and per-net sysctls allow for its modification (ipv6_sysctl_net_init). Despite this the value configured in the init net is used for the rest of them. Signed-off-by: Pavel Emelyanov <xemul@op...
static BOOL try_open_clipboard(HWND hwnd) { size_t x; for (x = 0; x < 10; x++) { if (OpenClipboard(hwnd)) return TRUE; Sleep(10); } return FALSE; }
0
[ "CWE-20" ]
FreeRDP
0d79670a28c0ab049af08613621aa0c267f977e9
111,053,376,672,747,820,000,000,000,000,000,000,000
11
Fixed missing input checks for file contents request reported by Valentino Ricotta (Thalium)
vba_read_project_strings(int fd, int big_endian) { unsigned char *buf = NULL; uint16_t buflen = 0; int ret = 0; for(;;) { off_t offset; uint16_t length; char *name; if(!read_uint16(fd, &length, big_endian)) break; if (length < 6) { lseek(fd, -2, SEEK_CUR); break; } if(length > buflen) { ...
1
[ "CWE-399" ]
clamav-devel
d21fb8d975f8c9688894a8cef4d50d977022e09f
143,502,632,929,613,950,000,000,000,000,000,000,000
69
libclamav/vba_extract.c: fix error path double free (bb#2486)
static int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason) { BT_DBG("hcon %p reason %d", hcon, reason); if (hcon->type != ACL_LINK) return 0; l2cap_conn_del(hcon, bt_err(reason)); return 0; }
0
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
82,131,203,364,906,320,000,000,000,000,000,000,000
11
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
Status Extend(GraphDef&& graph) override { return errors::Unimplemented("Session::Extend()"); }
0
[ "CWE-20", "CWE-703" ]
tensorflow
adf095206f25471e864a8e63a0f1caef53a0e3a6
288,246,716,626,795,270,000,000,000,000,000,000,000
3
Validate `NodeDef`s from `FunctionDefLibrary` of a `GraphDef`. We already validated `NodeDef`s from a `GraphDef` but missed validating those from the `FunctionDefLibrary`. Thus, some maliciously crafted models could evade detection and cause denial of service due to a `CHECK`-fail. PiperOrigin-RevId: 332536309 Change...