func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
bool Item_sp_variable::fix_fields_from_item(THD *thd, Item **, const Item *it) { m_thd= thd; /* NOTE: this must be set before any this_xxx() */ DBUG_ASSERT(it->fixed); max_length= it->max_length; decimals= it->decimals; unsigned_flag= it->unsigned_flag; with_param= 1; if (thd->lex->current_select && thd...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
46,536,210,447,879,390,000,000,000,000,000,000,000
17
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.
ext4_ext_binsearch_idx(struct inode *inode, struct ext4_ext_path *path, ext4_lblk_t block) { struct ext4_extent_header *eh = path->p_hdr; struct ext4_extent_idx *r, *l, *m; ext_debug("binsearch for %u(idx): ", block); l = EXT_FIRST_INDEX(eh) + 1; r = EXT_LAST_INDEX(eh); while (l <= r) { m = l + (r - l) /...
0
[ "CWE-362" ]
linux-2.6
dee1f973ca341c266229faa5a1a5bb268bed3531
1,673,519,444,685,081,600,000,000,000,000,000,000
53
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...
BGD_DECLARE(int) gdImageColorAllocate (gdImagePtr im, int r, int g, int b) { return gdImageColorAllocateAlpha (im, r, g, b, gdAlphaOpaque); }
0
[ "CWE-119", "CWE-787" ]
libgd
77f619d48259383628c3ec4654b1ad578e9eb40e
74,316,920,764,324,590,000,000,000,000,000,000,000
4
fix #215 gdImageFillToBorder stack-overflow when invalid color is used
libssh2_channel_flush_ex(LIBSSH2_CHANNEL *channel, int stream) { int rc; if(!channel) return LIBSSH2_ERROR_BAD_USE; BLOCK_ADJUST(rc, channel->session, _libssh2_channel_flush(channel, stream)); return rc; }
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
64,689,155,759,547,010,000,000,000,000,000,000,000
11
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
void CLASS foveon_load_camf() { unsigned type, wide, high, i, j, row, col, diff; ushort huff[258], vpred[2][2] = {{512,512},{512,512}}, hpred[2]; fseek (ifp, meta_offset, SEEK_SET); type = get4(); get4(); get4(); wide = get4(); high = get4(); if (type == 2) { fread (meta_data, 1, meta_length, ifp);...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
303,099,538,776,117,640,000,000,000,000,000,000,000
41
fixed two more problems found by fuzzer
static SECURITY_STATUS SEC_ENTRY kerberos_QueryContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void* pBuffer) { return kerberos_QueryContextAttributesA(phContext, ulAttribute, pBuffer); }
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
235,264,434,153,077,900,000,000,000,000,000,000,000
5
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
void test_checkout_nasty__dotcapitalgit_tree(void) { test_checkout_fails("refs/heads/dotcapitalgit_tree", ".GIT/foobar"); }
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
131,166,764,884,343,920,000,000,000,000,000,000,000
4
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
int ff_set_sar(AVCodecContext *avctx, AVRational sar) { int ret = av_image_check_sar(avctx->width, avctx->height, sar); if (ret < 0) { av_log(avctx, AV_LOG_WARNING, "ignoring invalid SAR: %d/%d\n", sar.num, sar.den); avctx->sample_aspect_ratio = (AVRational){ 0, 1 }; retu...
0
[ "CWE-787" ]
FFmpeg
2080bc33717955a0e4268e738acf8c1eeddbf8cb
80,678,128,754,104,140,000,000,000,000,000,000,000
14
avcodec/utils: correct align value for interplay Fixes out of array access Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void MACH0_(iterate_chained_fixups)(struct MACH0_(obj_t) *bin, ut64 limit_start, ut64 limit_end, ut32 event_mask, RFixupCallback callback, void * context) { int i = 0; for (; i < bin->nsegs; i++) { if (!bin->chained_starts[i]) { continue; } int page_size = bin->chained_starts[i]->page_size; if (page_size <...
1
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
324,910,062,053,814,640,000,000,000,000,000,000,000
209
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...
insert_file_id (struct stat const *st, enum file_id_type type) { __insert_file_id (st, type); }
0
[ "CWE-59" ]
patch
dce4683cbbe107a95f1f0d45fabc304acfb5d71a
227,199,721,750,449,070,000,000,000,000,000,000,000
4
Don't follow symlinks unless --follow-symlinks is given * src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, append_to_file): Unless the --follow-symlinks option is given, open files with the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing that consistently for input files. * src/u...
static bool nfs4_clear_cap_atomic_open_v1(struct nfs_server *server, int err, struct nfs4_exception *exception) { if (err != -EINVAL) return false; if (!(server->caps & NFS_CAP_ATOMIC_OPEN_V1)) return false; server->caps &= ~NFS_CAP_ATOMIC_OPEN_V1; exception->retry = 1; return true; }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
114,627,069,619,264,770,000,000,000,000,000,000,000
11
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
**/ CImg<T>& load_gzip_external(const char *const filename) { if (!filename) throw CImgIOException(_cimg_instance "load_gzip_external(): Specified filename is (null).", cimg_instance); cimg::fclose(cimg::fopen(filename,"rb")); // Ch...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
165,754,323,564,823,940,000,000,000,000,000,000,000
43
.
static void __devinit init_hrtimers_cpu(int cpu) { struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu); int i; spin_lock_init(&cpu_base->lock); lockdep_set_class(&cpu_base->lock, &cpu_base->lock_key); for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) cpu_base->clock_base[i].cpu_base = cpu_base; hrti...
0
[ "CWE-189" ]
linux-2.6
13788ccc41ceea5893f9c747c59bc0b28f2416c2
44,337,289,243,387,070,000,000,000,000,000,000,000
13
[PATCH] hrtimer: prevent overrun DoS in hrtimer_forward() hrtimer_forward() does not check for the possible overflow of timer->expires. This can happen on 64 bit machines with large interval values and results currently in an endless loop in the softirq because the expiry value becomes negative and therefor the timer...
*/ int dev_change_xdp_fd(struct net_device *dev, struct netlink_ext_ack *extack, int fd, u32 flags) { const struct net_device_ops *ops = dev->netdev_ops; enum bpf_netdev_command query; struct bpf_prog *prog = NULL; bpf_op_t bpf_op, bpf_chk; bool offload; int err; ASSERT_RTNL(); offload = flags & XDP_...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
299,472,131,672,891,040,000,000,000,000,000,000,000
54
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
void PrintHintUsage() { u32 i=0; gf_sys_format_help(helpout, help_flags, "# Hinting Options\n" "IsoMedia hinting consists in creating special tracks in the file that contain transport protocol specific information and optionally multiplexing information. These tracks are then used by the server to create the actual...
0
[ "CWE-476" ]
gpac
87afe070cd6866df7fe80f11b26ef75161de85e0
38,450,855,118,843,554,000,000,000,000,000,000,000
17
fixed #1734
qtdemux_parse_tree (GstQTDemux * qtdemux) { GNode *mvhd; GNode *trak; GNode *udta; GNode *mvex; GstClockTime duration; GNode *pssh; guint64 creation_time; GstDateTime *datetime = NULL; gint version; /* make sure we have a usable taglist */ if (!qtdemux->tag_list) { qtdemux->tag_list = gst_tag...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
184,073,519,885,563,100,000,000,000,000,000,000,000
146
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
asmlinkage int arm_syscall(int no, struct pt_regs *regs) { struct thread_info *thread = current_thread_info(); siginfo_t info; if ((no >> 16) != (__ARM_NR_BASE>> 16)) return bad_syscall(no, regs); switch (no & 0xffff) { case 0: /* branch through 0 */ info.si_signo = SIGSEGV; info.si_errno = 0; info.si_co...
1
[ "CWE-284", "CWE-264" ]
linux
a4780adeefd042482f624f5e0d577bf9cdcbb760
112,016,323,066,832,320,000,000,000,000,000,000,000
155
ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to prevent it from being used as a covert channel between two tasks. There are more and more applications coming to Windows RT, Wine could support them, but mostly they ...
njs_module_path(njs_vm_t *vm, const njs_str_t *dir, njs_module_info_t *info) { char *p; size_t length; njs_bool_t trail; char src[NJS_MAX_PATH + 1]; trail = 0; length = info->name.length; if (dir != NULL) { length += dir->length; if (length == 0) { ...
0
[ "CWE-787" ]
njs
ab1702c7af9959366a5ddc4a75b4357d4e9ebdc1
139,471,826,297,193,750,000,000,000,000,000,000,000
57
Fixed typo while calculating module path length. The issue was introduced in 77c398f26d7e (not released yet).
bool Virtual_tmp_table::init(uint field_count) { uint *blob_field; uchar *bitmaps; DBUG_ENTER("Virtual_tmp_table::init"); if (!multi_alloc_root(in_use->mem_root, &s, sizeof(*s), &field, (field_count + 1) * sizeof(Field*), &blob_field, (fiel...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
23,999,206,636,004,340,000,000,000,000,000,000,000
18
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static struct lo_data *lo_data(fuse_req_t req) { return (struct lo_data *)fuse_req_userdata(req); }
0
[]
qemu
6084633dff3a05d63176e06d7012c7e15aba15be
65,797,719,386,089,210,000,000,000,000,000,000,000
4
tools/virtiofsd: xattr name mappings: Add option Add an option to define mappings of xattr names so that the client and server filesystems see different views. This can be used to have different SELinux mappings as seen by the guest, to run the virtiofsd with less privileges (e.g. in a case where it can't set trusted/...
static inline void set_task_rq(struct task_struct *p, unsigned int cpu) { #ifdef CONFIG_FAIR_GROUP_SCHED p->se.cfs_rq = task_group(p)->cfs_rq[cpu]; p->se.parent = task_group(p)->se[cpu]; #endif #ifdef CONFIG_RT_GROUP_SCHED p->rt.rt_rq = task_group(p)->rt_rq[cpu]; p->rt.parent = task_group(p)->rt_se[cpu]; #endif }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
291,070,559,489,472,200,000,000,000,000,000,000,000
12
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
read_gif(Gif_Reader *grr, int read_flags, const char* landmark, Gif_ReadErrorHandler handler) { Gif_Stream *gfs; Gif_Image *gfi; Gif_Context gfc; int unknown_block_type = 0; if (gifgetc(grr) != 'G' || gifgetc(grr) != 'I' || gifgetc(grr) != 'F') return 0; (void)gifgetc(grr); (void)gifget...
1
[ "CWE-416" ]
gifsicle
81fd7823f6d9c85ab598bc850e40382068361185
117,685,919,978,235,230,000,000,000,000,000,000,000
135
Fix use-after-free problems reported in #114.
static void cc_init(void) { int i; if (is_cc_init) return; for (i = 0; i < CS_MAX; i++) cc_tab[i].valid = false; set_cc(CS_HSTEM, true, 2, true); set_cc(CS_VSTEM, true, 2, true); set_cc(CS_VMOVETO, true, 1, true); set_cc(CS_RLINETO, true, 2, true); set_cc(CS_HLINETO, true...
0
[ "CWE-119" ]
texlive-source
6ed0077520e2b0da1fd060c7f88db7b2e6068e4c
201,510,998,817,478,140,000,000,000,000,000,000,000
34
writet1 protection against buffer overflow git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751
ZSTD_encodeSequences_body( void* dst, size_t dstCapacity, FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, seqDef const* se...
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
210,247,028,153,812,460,000,000,000,000,000,000,000
90
fixed T36302429
TestDnsServer(Event::Dispatcher& dispatcher) : dispatcher_(dispatcher), record_ttl_(0), stream_info_(dispatcher.timeSource()) {}
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
25,791,392,838,462,715,000,000,000,000,000,000,000
2
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
PHP_FUNCTION(fmod) { double num1, num2; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &num1, &num2) == FAILURE) { return; } RETURN_DOUBLE(fmod(num1, num2)); }
0
[]
php-src
0d822f6df946764f3f0348b82efae2e1eaa83aa0
307,468,962,551,245,250,000,000,000,000,000,000,000
9
Bug #71201 round() segfault on 64-bit builds
tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma) { /* * flush_tlb_range() implementations that look at VM_HUGETLB (tile, * mips-4k) flush only large pages. * * flush_tlb_range() implementations that flush I-TLB also flush D-TLB * (tile, xtensa, arm), so it's ok to just add VM_EXEC to ...
0
[ "CWE-362" ]
linux
b67fbebd4cf980aecbcc750e1462128bffe8ae15
246,018,628,176,971,470,000,000,000,000,000,000,000
17
mmu_gather: Force tlb-flush VM_PFNMAP vmas Jann reported a race between munmap() and unmap_mapping_range(), where unmap_mapping_range() will no-op once unmap_vmas() has unlinked the VMA; however munmap() will not yet have invalidated the TLBs. Therefore unmap_mapping_range() will complete while there are still (stale...
static void setBitOfReversedStream(size_t* bitpointer, unsigned char* bitstream, unsigned char bit) { /*the current bit in bitstream may be 0 or 1 for this to work*/ if(bit == 0) { size_t pos = (*bitpointer) >> 3; bitstream[pos] &= (unsigned char)(~(1 << (7 - ((*bitpointer) & 0x7)))); } else { ...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
195,000,316,183,198,400,000,000,000,000,000,000,000
15
Fixed #5645: realloc return handling
GF_Err strk_AddBox(GF_Box *s, GF_Box *a) { GF_SubTrackBox *ptr = (GF_SubTrackBox *)s; if (!a) return GF_OK; switch (a->type) { case GF_ISOM_BOX_TYPE_STRI: if (ptr->info) ERROR_ON_DUPLICATED_BOX(a, ptr) ptr->info = (GF_SubTrackInformationBox *)a; return GF_OK; case GF_ISOM_BOX_TYPE_STRD: if (ptr->strd) ER...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
74,211,822,137,781,890,000,000,000,000,000,000,000
18
prevent dref memleak on invalid input (#1183)
static Image *ReadMIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define BZipMaxExtent(x) ((x)+((x)/100)+600) #define LZMAMaxExtent(x) ((x)+((x)/3)+128) #define ThrowMIFFException(exception,message) \ { \ if (quantum_info != (QuantumInfo *) NULL) \ quantum_info=DestroyQuantumInfo(quantum_i...
1
[ "CWE-772" ]
ImageMagick
4b352c0be410ad900469a079e389178f878aded8
234,753,711,832,752,280,000,000,000,000,000,000,000
1,299
https://github.com/ImageMagick/ImageMagick/issues/1191
void rgw::auth::s3::LDAPEngine::init(CephContext* const cct) { if (! cct->_conf->rgw_s3_auth_use_ldap || cct->_conf->rgw_ldap_uri.empty()) { return; } if (! ldh) { std::lock_guard<std::mutex> lck(mtx); if (! ldh) { const string& ldap_uri = cct->_conf->rgw_ldap_uri; const string& lda...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
51,733,031,682,983,600,000,000,000,000,000,000,000
25
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
batch_dict_exact(PicklerObject *self, PyObject *obj) { PyObject *key = NULL, *value = NULL; int i; Py_ssize_t dict_size, ppos = 0; const char mark_op = MARK; const char setitem_op = SETITEM; const char setitems_op = SETITEMS; assert(obj != NULL && PyDict_CheckExact(obj)); assert(self->...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
266,912,432,572,878,780,000,000,000,000,000,000,000
52
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
search_impl(i_ctx_t *i_ctx_p, bool forward) { os_ptr op = osp; os_ptr op1 = op - 1; uint size = r_size(op); uint count; byte *pat; byte *ptr; byte ch; int incr = forward ? 1 : -1; check_read_type(*op1, t_string); check_read_type(*op, t_string); if (size > r_size(op1)) { /* c...
1
[ "CWE-119", "CWE-787" ]
ghostpdl
5d499272b95a6b890a1397e11d20937de000d31b
249,132,726,675,055,930,000,000,000,000,000,000,000
46
Bug 702582, CVE 2020-15900 Memory Corruption in Ghostscript 9.52 Fix the 'rsearch' calculation for the 'post' size to give the correct size. Previous calculation would result in a size that was too large, and could underflow to max uint32_t. Also fix 'rsearch' to return the correct 'pre' string with empty string matc...
static void tcp_chr_update_read_handler(CharDriverState *chr, GMainContext *context, int tag) { TCPCharDriver *s = chr->opaque; if (!s->connected) { return; } remove_fd_in_watch(chr); if (s->ioc) { chr-...
1
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
30,165,151,661,296,556,000,000,000,000,000,000,000
18
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static umode_t efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n) { if (attr == &efi_attr_fw_vendor.attr) { if (efi_enabled(EFI_PARAVIRT) || efi.fw_vendor == EFI_INVALID_TABLE_ADDR) return 0; } else if (attr == &efi_attr_runtime.attr) { if (efi.runtime == EFI_INVALID_TABLE_ADDR...
0
[]
linux
1957a85b0032a81e6482ca4aab883643b8dae06e
297,200,526,554,415,500,000,000,000,000,000,000,000
17
efi: Restrict efivar_ssdt_load when the kernel is locked down efivar_ssdt_load allows the kernel to import arbitrary ACPI code from an EFI variable, which gives arbitrary code execution in ring 0. Prevent that when the kernel is locked down. Signed-off-by: Matthew Garrett <mjg59@google.com> Acked-by: Ard Biesheuvel <...
void rwpng_free_image8(png8_image *image) { free(image->indexed_data); image->indexed_data = NULL; free(image->row_pointers); image->row_pointers = NULL; rwpng_free_chunks(image->chunks); image->chunks = NULL; }
0
[ "CWE-190", "CWE-787" ]
pngquant
b7c217680cda02dddced245d237ebe8c383be285
115,684,127,560,978,150,000,000,000,000,000,000,000
11
Fix integer overflow in rwpng.h (CVE-2016-5735) Reported by Choi Jaeseung Found with Sparrow (http://ropas.snu.ac.kr/sparrow)
static void specialfunc(int key, int x, int y) { if (cmdopts.verbose) { fprintf(stderr, "specialfunc(%d, %d, %d)\n", key, x, y); } switch (key) { case GLUT_KEY_UP: { float panamount; panamount = (glutGetModifiers() & GLUT_ACTIVE_SHIFT) ? BIGPANAMOUNT : SMALLPANAMOUNT; pan(0.0, panamount * (gs.top...
0
[ "CWE-119" ]
jasper
65536647d380571d1a9a6c91fa03775fb5bbd256
184,678,367,388,274,930,000,000,000,000,000,000,000
47
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 FoFiTrueType::cvtEncoding(char **encoding, FoFiOutputFunc outputFunc, void *outputStream) { const char *name; GooString *buf; int i; (*outputFunc)(outputStream, "/Encoding 256 array\n", 20); if (encoding) { for (i = 0; i < 256; ++i) { if (!(name = encoding[i])) { name = "....
0
[ "CWE-125" ]
poppler
cdb7ad95f7c8fbf63ade040d8a07ec96467042fc
255,048,551,542,533,540,000,000,000,000,000,000,000
28
Fix malformed file crash in bug #85243
uint32_t readStructEnd() { T_VIRTUAL_CALL(); return readStructEnd_virt(); }
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
274,574,606,889,410,150,000,000,000,000,000,000,000
4
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
dissect_u3v_event_cmd(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length) { gint32 eventid; gint offset = startoffset; proto_item *item = NULL; /* Get event ID */ eventid = tvb_get_letohs(tvb, offset + 2); /* fill in Info column in Wireshark GUI */ ...
0
[ "CWE-476" ]
wireshark
2cb5985bf47bdc8bea78d28483ed224abdd33dc6
245,198,235,155,760,940,000,000,000,000,000,000,000
40
Make class "type" for USB conversations. USB dissectors can't assume that only their class type has been passed around in the conversation. Make explicit check that class type expected matches the dissector and stop/prevent dissection if there isn't a match. Bug: 12356 Change-Id: Ib23973a4ebd0fbb51952ffc118daf95e338...
int ip6_nd_hdr(struct sock *sk, struct sk_buff *skb, struct net_device *dev, struct in6_addr *saddr, struct in6_addr *daddr, int proto, int len) { struct ipv6_pinfo *np = inet6_sk(sk); struct ipv6hdr *hdr; int totlen; skb->protocol = htons(ETH_P_IPV6); skb->dev = dev; totlen = len + sizeof(struc...
0
[]
linux
e89e9cf539a28df7d0eb1d0a545368e9920b34ac
267,148,785,844,743,530,000,000,000,000,000,000,000
27
[IPv4/IPv6]: UFO Scatter-gather approach Attached is kernel patch for UDP Fragmentation Offload (UFO) feature. 1. This patch incorporate the review comments by Jeff Garzik. 2. Renamed USO as UFO (UDP Fragmentation Offload) 3. udp sendfile support with UFO This patches uses scatter-gather feature of skb to generate l...
static void try_to_free_low(struct hstate *h, unsigned long count, nodemask_t *nodes_allowed) { int i; if (hstate_is_gigantic(h)) return; for_each_node_mask(i, *nodes_allowed) { struct page *page, *next; struct list_head *freel = &h->hugepage_freelists[i]; list_for_each_entry_safe(page, next, freel, ...
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
311,464,808,039,807,800,000,000,000,000,000,000,000
23
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
static inline void Hq2X(const Image *source,const Quantum *pixels, Quantum *result,const size_t channels) { static const unsigned int Hq2XTable[] = { 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 15, 12, 5, 3, 17, 13, 4, 4, 6, 18, 4, 4, 6, 18, 5, 3, 12, 12, 5, 3, 1, 12, 4, 4, 6, 2, 4, 4, 6, 2, 5,...
0
[ "CWE-369" ]
ImageMagick
43539e67a47d2f8de832d33a5b26dc2a7a12294f
164,472,401,022,379,960,000,000,000,000,000,000,000
52
https://github.com/ImageMagick/ImageMagick/issues/1718
QPDFObjectHandle::getArrayAsVector() { assertArray(); return dynamic_cast<QPDF_Array*>(obj.getPointer())->getAsVector(); }
0
[ "CWE-835" ]
qpdf
afe0242b263a9e1a8d51dd81e42ab6de2e5127eb
59,477,140,172,045,020,000,000,000,000,000,000,000
5
Handle object ID 0 (fixes #99) This is CVE-2017-9208. The QPDF library uses object ID 0 internally as a sentinel to represent a direct object, but prior to this fix, was not blocking handling of 0 0 obj or 0 0 R as a special case. Creating an object in the file with 0 0 obj could cause various infinite loops. The PDF...
static bool get_new_nicname(char **dest, char *br, int pid, char **cnic) { char template[IFNAMSIZ]; snprintf(template, sizeof(template), "vethXXXXXX"); *dest = lxc_mkifname(template); if (!create_nic(*dest, br, pid, cnic)) { return false; } return true; }
0
[ "CWE-284", "CWE-862" ]
lxc
16af238036a5464ae8f2420ed3af214f0de875f9
338,721,134,348,801,400,000,000,000,000,000,000,000
11
CVE-2017-5985: Ensure target netns is caller-owned Before this commit, lxc-user-nic could potentially have been tricked into operating on a network namespace over which the caller did not hold privilege. This commit ensures that the caller is privileged over the network namespace by temporarily dropping privilege. L...
static inline bool dma_pte_present(struct dma_pte *pte) { return (pte->val & 3) != 0; }
0
[]
linux
fb58fdcd295b914ece1d829b24df00a17a9624bc
217,368,335,644,941,700,000,000,000,000,000,000,000
4
iommu/vt-d: Do not enable ATS for untrusted devices Currently Linux automatically enables ATS (Address Translation Service) for any device that supports it (and IOMMU is turned on). ATS is used to accelerate DMA access as the device can cache translations locally so there is no need to do full translation on IOMMU sid...
void Filter::onSoftPerTryTimeout(UpstreamRequest& upstream_request) { // Track this as a timeout for outlier detection purposes even though we didn't // cancel the request yet and might get a 2xx later. updateOutlierDetection(Upstream::Outlier::Result::LocalOriginTimeout, upstream_request, ...
0
[ "CWE-703" ]
envoy
f0bb2219112d8cdb4c4e8b346834f962925362ca
291,694,960,260,840,300,000,000,000,000,000,000,000
29
[1.20] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
TEST_F(GrpcHealthCheckerImplTest, DontReuseConnectionStreamReset) { setupNoReuseConnectionHC(); cluster_->prioritySet().getMockHostSet(0)->hosts_ = { makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())}; expectSessionCreate(); expectHealthcheckStart(0); EXPECT_CALL(event_logger_, logUnhealth...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
279,305,948,460,889,900,000,000,000,000,000,000,000
28
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static void virtio_gpu_text_update(void *opaque, console_ch_t *chardata) { }
0
[]
qemu
acfc4846508a02cc4c83aa27799fd74ac280bdb2
152,993,205,004,414,530,000,000,000,000,000,000,000
3
virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
gdm_session_worker_get_environment (GdmSessionWorker *worker) { GPtrArray *environment; environment = g_ptr_array_new (); g_hash_table_foreach (worker->priv->environment, (GHFunc) gdm_session_worker_fill_environment_array, environment)...
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
165,987,708,680,411,770,000,000,000,000,000,000,000
12
Store the face and dmrc files in a cache. Refer to bug #565151.
static int cardos_select_file(sc_card_t *card, const sc_path_t *in_path, sc_file_t **file) { int r; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); r = iso_ops->select_file(card, in_path, file); if (r >= 0 && file) parse_sec_attr((*file), (*file)->sec_attr, (*file)->sec_attr_len); LOG_FUNC_R...
0
[]
OpenSC
1252aca9f10771ef5ba8405e73cf2da50827958f
220,167,332,415,412,340,000,000,000,000,000,000,000
12
cardos: Correctly calculate the left bytes to avoid buffer overrun Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29912
_Unpickler_ResizeMemoList(UnpicklerObject *self, size_t new_size) { size_t i; assert(new_size > self->memo_size); PyObject **memo_new = self->memo; PyMem_RESIZE(memo_new, PyObject *, new_size); if (memo_new == NULL) { PyErr_NoMemory(); return -1; } self->memo = memo_new; ...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
311,742,344,233,109,000,000,000,000,000,000,000,000
18
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
static int add_recent_loose(const unsigned char *sha1, const char *path, void *data) { struct stat st; struct object *obj = lookup_object(sha1); if (obj && obj->flags & SEEN) return 0; if (stat(path, &st) < 0) { /* * It's OK if an object went away during our iteration; this * could be due to a si...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
27,312,645,451,475,810,000,000,000,000,000,000,000
25
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
static void acpi_unregister_gsi_ioapic(u32 gsi) { #ifdef CONFIG_X86_IO_APIC int irq; mutex_lock(&acpi_ioapic_lock); irq = mp_map_gsi_to_irq(gsi, 0, NULL); if (irq > 0) mp_unmap_irq(irq); mutex_unlock(&acpi_ioapic_lock); #endif }
0
[ "CWE-120" ]
linux
dad5ab0db8deac535d03e3fe3d8f2892173fa6a4
127,991,995,553,828,590,000,000,000,000,000,000,000
12
x86/acpi: Prevent out of bound access caused by broken ACPI tables The bus_irq argument of mp_override_legacy_irq() is used as the index into the isa_irq_to_gsi[] array. The bus_irq argument originates from ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI tables, but is nowhere sanity checked. Th...
int sched_group_set_shares(struct task_group *tg, unsigned long shares) { int i; unsigned long flags; /* * We can't change the weight of the root cgroup. */ if (!tg->se[0]) return -EINVAL; if (shares < MIN_SHARES) shares = MIN_SHARES; else if (shares > MAX_SHARES) shares = MAX_SHARES; mutex_lock(&sh...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
240,827,135,663,783,420,000,000,000,000,000,000,000
55
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo, bool remount) { char *this_char, *value, *rest; uid_t uid; gid_t gid; while (options != NULL) { this_char = options; for (;;) { /* * NUL-terminate this option: unfortunately, * mount options form a comma-separated ...
0
[ "CWE-399" ]
linux
5f00110f7273f9ff04ac69a5f85bb535a4fd0987
319,672,257,299,223,370,000,000,000,000,000,000,000
97
tmpfs: fix use-after-free of mempolicy object The tmpfs remount logic preserves filesystem mempolicy if the mpol=M option is not specified in the remount request. A new policy can be specified if mpol=M is given. Before this patch remounting an mpol bound tmpfs without specifying mpol= mount option in the remount re...
void sqlite3VdbeResolveLabel(Vdbe *v, int x){ Parse *p = v->pParse; int j = ADDR(x); assert( v->magic==VDBE_MAGIC_INIT ); assert( j<-p->nLabel ); assert( j>=0 ); #ifdef SQLITE_DEBUG if( p->db->flags & SQLITE_VdbeAddopTrace ){ printf("RESOLVE LABEL %d to %d\n", x, v->nOp); } #endif if( p->nLabelAlloc...
0
[ "CWE-755" ]
sqlite
8654186b0236d556aa85528c2573ee0b6ab71be3
243,609,484,412,957,360,000,000,000,000,000,000,000
18
When an error occurs while rewriting the parser tree for window functions in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set, and make sure that this shuts down any subsequent code generation that might depend on the transformations that were implemented. This fixes a problem discovered by the Y...
static void SerializeGltfTexture(Texture &texture, json &o) { if (texture.sampler > -1) { SerializeNumberProperty("sampler", texture.sampler, o); } if (texture.source > -1) { SerializeNumberProperty("source", texture.source, o); } if (texture.name.size()) { SerializeStringProperty("name", texture....
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
26,655,294,741,693,000,000,000,000,000,000,000,000
15
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
UrnState::start(HttpRequest * r, StoreEntry * e) { debugs(52, 3, "urnStart: '" << e->url() << "'" ); entry = e; request = r; entry->lock("UrnState::start"); setUriResFromRequest(r); if (urlres_r == NULL) return; auto urlEntry = storeGetPublic(urlres, Http::METHOD_GET); if (!u...
0
[ "CWE-401" ]
squid
47a085ff06598b64817875769022b8707a0af7db
178,930,101,574,740,580,000,000,000,000,000,000,000
38
Bug 5104: Memory leak in RFC 2169 response parsing (#778) A temporary parsing buffer was not being released when parsing completed.
void mutt_encode_path (char *dest, size_t dlen, const char *src) { char *p = safe_strdup (src); int rc = mutt_convert_string (&p, Charset, "utf-8", 0); strfcpy (dest, rc == 0 ? p : src, dlen); FREE (&p); }
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
222,864,818,313,716,670,000,000,000,000,000,000,000
7
use a 64-bit random value in temporary filenames. closes #3158
static Agraph_t *pop_subg(void) { Agraph_t *g; if (GSP == 0) { fprintf(stderr, "graphml2gv: Gstack underflow in graph parser\n"); exit(1); } g = Gstack[--GSP]; if (GSP > 0) G = Gstack[GSP - 1]; return g; }
0
[ "CWE-476" ]
graphviz
839085f8026afd6f6920a0c31ad2a9d880d97932
30,693,300,559,249,098,000,000,000,000,000,000,000
12
attempted fix for null pointer deference on malformed input
static int aio_setup_ring(struct kioctx *ctx) { struct aio_ring *ring; struct aio_ring_info *info = &ctx->ring_info; unsigned nr_events = ctx->max_reqs; unsigned long size; int nr_pages; /* Compensate for the ring buffer's head/tail overlap entry */ nr_events += 2; /* 1 is required, 2 for good luck */ size = ...
0
[ "CWE-190" ]
linux-2.6
75e1c70fc31490ef8a373ea2a4bea2524099b478
179,223,561,615,718,860,000,000,000,000,000,000,000
68
aio: check for multiplication overflow in do_io_submit Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                retu...
StreamDecoder& ConnectionManagerImpl::newStream(StreamEncoder& response_encoder, bool is_internally_created) { if (connection_idle_timer_) { connection_idle_timer_->disableTimer(); } ENVOY_CONN_LOG(debug, "new stream", read_callbacks_->connection()); ActiveSt...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
208,825,135,531,996,560,000,000,000,000,000,000,000
19
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
int ram_block_coordinated_discard_require(bool state) { int ret = 0; ram_block_discard_disable_mutex_lock(); if (!state) { ram_block_coordinated_discard_required_cnt--; } else if (ram_block_discard_disabled_cnt) { ret = -EBUSY; } else { ram_block_coordinated_discard_required...
0
[ "CWE-908" ]
qemu
418ade7849ce7641c0f7333718caf5091a02fd4c
330,520,760,594,630,700,000,000,000,000,000,000,000
15
softmmu: Always initialize xlat in address_space_translate_for_iotlb The bug is an uninitialized memory read, along the translate_fail path, which results in garbage being read from iotlb_to_section, which can lead to a crash in io_readx/io_writex. The bug may be fixed by writing any value with zero in ~TARGET_PAGE_M...
int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg) { const struct ioctl_handler *handler; struct snd_seq_client *client; client = clientptr(clientid); if (client == NULL) return -ENXIO; for (handler = ioctl_handlers; handler->cmd > 0; ++handler) { if (handler->cmd == cmd) return hand...
0
[ "CWE-416", "CWE-362" ]
linux
71105998845fb012937332fe2e806d443c09e026
288,179,016,469,097,540,000,000,000,000,000,000,000
18
ALSA: seq: Fix use-after-free at creating a port There is a potential race window opened at creating and deleting a port via ioctl, as spotted by fuzzing. snd_seq_create_port() creates a port object and returns its pointer, but it doesn't take the refcount, thus it can be deleted immediately by another thread. Meanwh...
void MD5_Final(unsigned char* hash, MD5_CTX* md5) { reinterpret_cast<TaoCrypt::MD5*>(md5->buffer)->Final(hash); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
60,619,726,522,717,080,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
bluetooth_client_get_device (BluetoothClient *client, const char *path) { BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client); GtkTreeIter iter; GDBusProxy *proxy; if (get_iter_from_path (priv->store, &iter, path) == FALSE) { return NULL; } gtk_tree_model_get (GTK_TREE_MODEL(priv...
0
[]
gnome-bluetooth
6b5086d42ea64d46277f3c93b43984f331d12f89
83,802,336,452,483,410,000,000,000,000,000,000,000
16
lib: Fix Discoverable being reset when turned off Work-around race in bluetoothd which would reset the discoverable flag if a timeout change was requested before discoverable finished being set to off: See https://bugzilla.redhat.com/show_bug.cgi?id=1602985
int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb) { struct ipv6_pinfo *np = inet6_sk(sk); struct inet6_skb_parm *opt = IP6CB(skb); if (np->rxopt.all) { if ((opt->hop && (np->rxopt.bits.hopopts || np->rxopt.bits.ohopopts)) || ((IPV6_FLOWINFO_MASK & *(__be32 *)skb_network_header(skb)) ...
0
[]
linux-2.6
2e761e0532a784816e7e822dbaaece8c5d4be14d
52,738,426,935,171,680,000,000,000,000,000,000,000
19
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...
cnt_transmit(struct worker *wrk, struct req *req) { struct boc *boc; uint16_t status; int sendbody, head; intmax_t clval; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req->transport, TRANSPORT_MAGIC); CHECK_OBJ_NOTNULL(req->objcore, OBJCORE_MAGIC); AZ(req->stale_o...
0
[ "CWE-212" ]
varnish-cache
bd7b3d6d47ccbb5e1747126f8e2a297f38e56b8c
233,120,562,688,409,100,000,000,000,000,000,000,000
87
Clear err_code and err_reason at start of request handling req->err_code and req->err_reason are set when going to synthetic handling. From there the resp.reason HTTP field is set from req->err_reason if set, or the generic code based on req->err_code is used if it was NULL. This patch clears these members so that a v...
int MethodHandles::find_MemberNames(KlassHandle k, Symbol* name, Symbol* sig, int mflags, KlassHandle caller, int skip, objArrayHandle results) { // %%% take caller into account! Thread* thread = Thread::cur...
0
[]
jdk8u
f14e35d20e1a4d0f507f05838844152f2242c6d3
161,945,484,591,221,170,000,000,000,000,000,000,000
113
8281866: Enhance MethodHandle invocations Reviewed-by: andrew Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
void sctp_assoc_del_peer(struct sctp_association *asoc, const union sctp_addr *addr) { struct list_head *pos; struct list_head *temp; struct sctp_transport *transport; list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { transport = list_entry(pos, struct sctp_transport, transports); if (sctp_c...
0
[ "CWE-287" ]
linux-2.6
add52379dde2e5300e2d574b172e62c6cf43b3d3
272,704,959,219,008,340,000,000,000,000,000,000,000
16
sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH If INIT-ACK is received with SupportedExtensions parameter which indicates that the peer does not support AUTH, the packet will be silently ignore, and sctp_process_init() do cleanup all of the transports in the association. When T1-Init timer is ex...
static int pn_backlog_rcv(struct sock *sk, struct sk_buff *skb) { int err = sock_queue_rcv_skb(sk, skb); if (err < 0) kfree_skb(skb); return err ? NET_RX_DROP : NET_RX_SUCCESS; }
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
74,519,092,560,859,760,000,000,000,000,000,000,000
8
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
static inline void free_chunk(struct audit_chunk *chunk) { call_rcu(&chunk->head, __free_chunk); }
1
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
232,660,666,733,245,280,000,000,000,000,000,000,000
4
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
void Compute(OpKernelContext* ctx) override { const Tensor& val = ctx->input(0); auto session_state = ctx->session_state(); OP_REQUIRES(ctx, session_state != nullptr, errors::FailedPrecondition( "GetSessionHandle called on null session state")); int64_t id = session...
0
[ "CWE-20", "CWE-703" ]
tensorflow
cff267650c6a1b266e4b4500f69fbc49cdd773c5
323,510,880,336,430,400,000,000,000,000,000,000,000
24
Fix tf.raw_ops.DeleteSessionTensor vulnerability with invalid `handle`. Check that `handle` input is actually a scalar before treating it as such. PiperOrigin-RevId: 445228994
prime_trust_anchor(struct module_qstate* qstate, struct val_qstate* vq, int id, struct trust_anchor* toprime) { struct module_qstate* newq = NULL; int ret = generate_request(qstate, id, toprime->name, toprime->namelen, LDNS_RR_TYPE_DNSKEY, toprime->dclass, BIT_CD, &newq, 0); if(newq && qstate->env->cfg->trust_an...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
131,785,875,584,389,000,000,000,000,000,000,000,000
32
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
void InstanceUtil::loadBootstrapConfig(envoy::config::bootstrap::v3::Bootstrap& bootstrap, const Options& options, ProtobufMessage::ValidationVisitor& validation_visitor, Api::Api& api) { const std::st...
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
56,297,176,491,095,890,000,000,000,000,000,000,000
35
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
Item_func_or_sum(THD *thd, Item_func_or_sum *item): Item_result_field(thd, item), Item_args(thd, item), Used_tables_and_const_cache(item) { }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
151,721,658,218,341,220,000,000,000,000,000,000,000
3
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, int force) /* {{{ */ { zend_execute_data *execute_data = EG(current_execute_data); while (execute_data && (!execute_data->func || !ZEND_USER_CODE(execute_data->func->common.type))) { execute_data = execute_data->prev_execute_data; } ...
0
[ "CWE-134" ]
php-src
b101a6bbd4f2181c360bd38e7683df4a03cba83e
133,562,586,571,695,900,000,000,000,000,000,000,000
40
Use format string
static void lp_attach (struct parport *port) { unsigned int i; switch (parport_nr[0]) { case LP_PARPORT_UNSPEC: case LP_PARPORT_AUTO: if (parport_nr[0] == LP_PARPORT_AUTO && port->probe_info[0].class != PARPORT_CLASS_PRINTER) return; if (lp_count == LP_NO) { printk(KERN_INFO "lp: ignoring parallel ...
0
[ "CWE-787" ]
linux
3e21f4af170bebf47c187c1ff8bf155583c9f3b1
116,872,138,336,984,320,000,000,000,000,000,000,000
29
char: lp: fix possible integer overflow in lp_setup() The lp_setup() code doesn't apply any bounds checking when passing "lp=none", and only in this case, resulting in an overflow of the parport_nr[] array. All versions in Git history are affected. Reported-By: Roee Hay <roee.hay@hcl.com> Cc: Ben Hutchings <ben@decad...
TEST_F(QueryPlannerTest, OrOfAnd4) { addIndex(BSON("a" << 1 << "b" << 1)); runQuery( fromjson("{$or: [{a:{$gt:1,$lt:5}, b:{$gt:0,$lt:3}, c:6}, " "{a:3, b:{$gt:1,$lt:2}, c:{$gt:0,$lt:10}}]}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolution...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
314,269,255,720,389,830,000,000,000,000,000,000,000
16
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
int setup_tests(void) { #ifdef OPENSSL_NO_SM2 TEST_note("SM2 is disabled."); #else ADD_TEST(sm2_crypt_test); ADD_TEST(sm2_sig_test); #endif return 1; }
0
[ "CWE-120" ]
openssl
59f5e75f3bced8fc0e130d72a3f582cf7b480b46
57,117,527,097,957,010,000,000,000,000,000,000,000
10
Correctly calculate the length of SM2 plaintext given the ciphertext Previously the length of the SM2 plaintext could be incorrectly calculated. The plaintext length was calculated by taking the ciphertext length and taking off an "overhead" value. The overhead value was assumed to have a "fixed" element of 10 bytes....
big5_mbc_to_code(const UChar* p, const UChar* end) { return onigenc_mbn_mbc_to_code(ONIG_ENCODING_BIG5, p, end); }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
257,643,886,653,998,460,000,000,000,000,000,000,000
4
onig-5.9.2
static int ipx_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer) { struct ipx_address *addr; struct sockaddr_ipx sipx; struct sock *sk = sock->sk; struct ipx_sock *ipxs = ipx_sk(sk); int rc; *uaddr_len = sizeof(struct sockaddr_ipx); lock_sock(sk); if (peer) { rc = -ENOTCONN; ...
0
[ "CWE-416" ]
linux
ee0d8d8482345ff97a75a7d747efc309f13b0d80
27,791,678,458,256,914,000,000,000,000,000,000,000
49
ipx: call ipxitf_put() in ioctl error path We should call ipxitf_put() if the copy_to_user() fails. Reported-by: 李强 <liqiang6-s@360.cn> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index) { if (index < 0) { return NULL; } return get_array_item(array, (size_t)index); }
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
4,046,838,043,036,896,400,000,000,000,000,000,000
9
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
void trim_whitespace(CHARSET_INFO *cs, LEX_STRING *str, uint *prefix_length) { /* TODO: This code assumes that there are no multi-bytes characters that can be considered white-space. */ *prefix_length= 0; while ((str->length > 0) && (my_isspace(cs, str->str[0]))) { (*prefix_length)++; str...
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
335,576,851,634,453,860,000,000,000,000,000,000,000
25
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
gpa_t kvm_mmu_gva_to_gpa_write(struct kvm_vcpu *vcpu, gva_t gva, u32 *error) { u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0; access |= PFERR_WRITE_MASK; return vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, access, error); }
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
73,833,411,671,435,550,000,000,000,000,000,000,000
6
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
voting_schedule_free(voting_schedule_t *voting_schedule_to_free) { if (!voting_schedule_to_free) return; tor_free(voting_schedule_to_free); }
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
116,112,019,823,432,270,000,000,000,000,000,000,000
6
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes, show_ip_bgp_vpnv4_all_neighbor_advertised_routes_cmd, "show ip bgp vpnv4 all neighbors A.B.C.D advertised-routes", SHOW_STR IP_STR BGP_STR "Display VPNv4 NLRI specific information\n" "Display information about all ...
0
[ "CWE-119" ]
quagga
a3bc7e9400b214a0f078fdb19596ba54214a1442
263,404,756,089,319,540,000,000,000,000,000,000,000
31
bgpd: Fix VU#270232, VPNv4 NLRI parser memcpys to stack on unchecked length Address CERT vulnerability report VU#270232, memcpy to stack data structure based on length field from packet data whose length field upper-bound was not properly checked. This likely allows BGP peers that are enabled to send Labeled-VPN SAFI...
static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight *lw) { u64 fact = scale_load_down(weight); int shift = WMULT_SHIFT; __update_inv_weight(lw); if (unlikely(fact >> 32)) { while (fact >> 32) { fact >>= 1; shift--; } } /* hint to use a 32x32->64 mul */ fact = (u64)(u32)f...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
16,709,096,062,591,054,000,000,000,000,000,000,000
24
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
void Compute(OpKernelContext* context) override { const Tensor& prefix = context->input(0); const Tensor& tensor_names = context->input(1); const Tensor& shape_and_slices = context->input(2); OP_REQUIRES(context, tensor_names.NumElements() == dtypes_.size(), errors::InvalidArgument("Go...
0
[ "CWE-476", "CWE-369" ]
tensorflow
9728c60e136912a12d99ca56e106b7cce7af5986
206,720,671,079,984,230,000,000,000,000,000,000,000
38
Ensure validation sticks in `save_restore_v2_ops.cc` PiperOrigin-RevId: 387924206 Change-Id: I6156842eb3230076b5812c0815f3e66bd5241454
TEST_P(HeaderIntegrationTest, TestRouteConfigVirtualHostAndRouteReplaceHeaderManipulation) { initializeFilter(HeaderMode::Replace, true); performRequest( Http::TestRequestHeaderMapImpl{ {":method", "GET"}, {":path", "/vhost-and-route"}, {":scheme", "http"}, {":authority...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
247,116,861,271,550,700,000,000,000,000,000,000,000
40
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int btrfs_dentry_delete(const struct dentry *dentry) { struct btrfs_root *root; struct inode *inode = dentry->d_inode; if (!inode && !IS_ROOT(dentry)) inode = dentry->d_parent->d_inode; if (inode) { root = BTRFS_I(inode)->root; if (btrfs_root_refs(&root->root_item) == 0) return 1; if (btrfs_ino...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
214,171,219,526,738,750,000,000,000,000,000,000,000
18
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...
int wm_SemUnlock(wm_Sem *s){ pthread_mutex_lock(&s->mutex); s->lockCount--; pthread_cond_signal(&s->cond); pthread_mutex_unlock(&s->mutex); return 0; }
0
[ "CWE-787" ]
wolfMQTT
84d4b53122e0fa0280c7872350b89d5777dabbb2
41,705,015,182,450,905,000,000,000,000,000,000,000
7
Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free
sunday_quick_search(regex_t* reg, const UChar* target, const UChar* target_end, const UChar* text, const UChar* text_end, const UChar* text_range) { const UChar *s, *t, *p, *end; const UChar *tail; int map_offset; end = text_range + (target_end - target); if (end > tex...
0
[ "CWE-125" ]
oniguruma
d3e402928b6eb3327f8f7d59a9edfa622fec557b
81,728,381,155,790,930,000,000,000,000,000,000,000
29
fix heap-buffer-overflow
add_durable_reconnect_v2_context(struct kvec *iov, unsigned int *num_iovec, struct cifs_open_parms *oparms) { struct smb2_create_req *req = iov[0].iov_base; unsigned int num = *num_iovec; /* indicate that we don't need to relock the file */ oparms->reconnect = false; iov[num].iov_base = create_reconnect_du...
0
[ "CWE-476" ]
linux
cabfb3680f78981d26c078a26e5c748531257ebb
190,908,990,991,703,900,000,000,000,000,000,000,000
24
CIFS: Enable encryption during session setup phase In order to allow encryption on SMB connection we need to exchange a session key and generate encryption and decryption keys. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
rdp_out_newpointer_caps(STREAM s) { out_uint16_le(s, RDP_CAPSET_POINTER); out_uint16_le(s, RDP_CAPLEN_NEWPOINTER); out_uint16_le(s, 1); /* Colour pointer */ out_uint16_le(s, 20); /* Cache size */ out_uint16_le(s, 20); /* Cache size for new pointers */ }
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
337,503,536,862,201,950,000,000,000,000,000,000,000
9
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
ambsdtar_backup( application_argument_t *argument) { int dumpin; char *cmd = NULL; char *qdisk; char *timestamps; int mesgf = 3; int indexf = 4; int outf; int data_out; int index_out; int index_err; char ...
1
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
293,446,969,001,343,140,000,000,000,000,000,000,000
182
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
static void pwc_frame_dumped(struct pwc_device *pdev) { pdev->vframes_dumped++; if (pdev->vframe_count < FRAME_LOWMARK) return; if (pdev->vframes_dumped < 20) PWC_DEBUG_FLOW("Dumping frame %d\n", pdev->vframe_count); else if (pdev->vframes_dumped == 20) PWC_DEBUG_FLOW("Dumping frame %d (last message)\n", ...
0
[ "CWE-399" ]
linux-2.6
85237f202d46d55c1bffe0c5b1aa3ddc0f1dce4d
70,839,021,204,016,750,000,000,000,000,000,000,000
12
USB: fix DoS in pwc USB video driver the pwc driver has a disconnect method that waits for user space to close the device. This opens up an opportunity for a DoS attack, blocking the USB subsystem and making khubd's task busy wait in kernel space. This patch shifts freeing resources to close if an opened device is dis...
cmsHANDLE CMSEXPORT cmsDictDup(cmsHANDLE hDict) { _cmsDICT* old_dict = (_cmsDICT*) hDict; cmsHANDLE hNew; cmsDICTentry *entry; _cmsAssert(old_dict != NULL); hNew = cmsDictAlloc(old_dict ->ContextID); if (hNew == NULL) return NULL; // Walk the list freeing all nodes entry = old_dict -...
0
[ "CWE-703" ]
Little-CMS
91c2db7f2559be504211b283bc3a2c631d6f06d9
147,388,573,364,882,360,000,000,000,000,000,000,000
26
Non happy-path fixes
static int maria_rollback(handlerton *hton __attribute__ ((unused)), THD *thd, bool all) { TRN *trn= THD_TRN; DBUG_ENTER("maria_rollback"); DBUG_ASSERT(trnman_has_locked_tables(trn) == 0); trnman_reset_locked_tables(trn, 0); /* statement or transaction ? */ if ((thd->variables.opt...
0
[ "CWE-400" ]
server
9e39d0ae44595dbd1570805d97c9c874778a6be8
85,433,052,726,546,800,000,000,000,000,000,000,000
19
MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields fix a debug assert to account for not opened temp tables