func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags) { struct sockaddr_un *sunaddr=(struct sockaddr_un *)uaddr; struct sock *sk = sock->sk; struct net *net = sock_net(sk); struct unix_sock *u = unix_sk(sk), *newu, *otheru; struct sock *newsk = NULL; struct...
0
[]
linux-2.6
6209344f5a3795d34b7f2c0061f49802283b6bdd
64,122,038,942,610,530,000,000,000,000,000,000,000
175
net: unix: fix inflight counting bug in garbage collector Previously I assumed that the receive queues of candidates don't change during the GC. This is only half true, nothing can be received from the queues (see comment in unix_gc()), but buffers could be added through the other half of the socket pair, which may s...
static int ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); struct blkcipher_walk walk; int err; blkcipher_walk_init(&walk, dst, src, nbytes); err = blkcipher_walk_vi...
0
[ "CWE-119", "CWE-787" ]
linux
ccfe8c3f7e52ae83155cb038753f4c75b774ca8a
59,850,319,500,817,700,000,000,000,000,000,000,000
27
crypto: aesni - fix memory usage in GCM decryption The kernel crypto API logic requires the caller to provide the length of (ciphertext || authentication tag) as cryptlen for the AEAD decryption operation. Thus, the cipher implementation must calculate the size of the plaintext output itself and cannot simply use cryp...
fr_window_get_file_list_from_path_list (FrWindow *window, GList *path_list, gboolean *has_dirs) { GtkTreeModel *model; GList *selections, *list, *scan; g_return_val_if_fail (window != NULL, NULL); model = GTK_TREE_MODEL (window->priv->list_store); selections = NULL; if (has_dirs != NULL) ...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
1,084,706,818,188,595,600,000,000,000,000,000,000
56
libarchive: sanitize filenames before extracting
Fty make_adaptor(F fn, R (F::*)(const SemanticValues &sv)) { return TypeAdaptor_csv<R>(fn); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
60,947,396,333,279,460,000,000,000,000,000,000,000
3
Fix #122
uint64_t dup_mig_bytes_transferred(void) { return acct_info.dup_pages * TARGET_PAGE_SIZE; }
0
[ "CWE-20" ]
qemu
0be839a2701369f669532ea5884c15bead1c6e08
174,594,535,454,155,350,000,000,000,000,000,000,000
4
migration: fix parameter validation on ram load During migration, the values read from migration stream during ram load are not validated. Especially offset in host_from_stream_offset() and also the length of the writes in the callers of said function. To fix this, we need to make sure that the [offset, offset + leng...
static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb) { return get_fuse_mount_super(sb)->fc; }
0
[ "CWE-834" ]
linux
775c5033a0d164622d9d10dd0f0a5531639ed3ed
31,965,575,041,249,676,000,000,000,000,000,000,000
4
fuse: fix live lock in fuse_iget() Commit 5d069dbe8aaf ("fuse: fix bad inode") replaced make_bad_inode() in fuse_iget() with a private implementation fuse_make_bad(). The private implementation fails to remove the bad inode from inode cache, so the retry loop with iget5_locked() finds the same bad inode and marks it ...
static int ext4_dquot_initialize(struct inode *inode, int type) { handle_t *handle; int ret, err; /* We may create quota structure so we need to reserve enough blocks */ handle = ext4_journal_start(inode, 2*EXT4_QUOTA_INIT_BLOCKS(inode->i_sb)); if (IS_ERR(handle)) return PTR_ERR(handle); ret = dquot_initialize...
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
231,286,468,988,779,650,000,000,000,000,000,000,000
15
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
void ext4_clear_inode(struct inode *inode) { invalidate_inode_buffers(inode); clear_inode(inode); dquot_drop(inode); ext4_discard_preallocations(inode); ext4_es_remove_extent(inode, 0, EXT_MAX_BLOCKS); if (EXT4_I(inode)->jinode) { jbd2_journal_release_jbd_inode(EXT4_JOURNAL(inode), EXT4_I(inode)->ji...
0
[]
linux
a45403b51582a87872927a3e0fc0a389c26867f1
129,394,012,205,932,560,000,000,000,000,000,000,000
15
ext4: always initialize the crc32c checksum driver The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mou...
__acquires(&hb->lock) { struct futex_hash_bucket *hb; hb = hash_futex(&q->key); /* * Increment the counter before taking the lock so that * a potential waker won't miss a to-be-slept task that is * waiting for the spinlock. This is safe as all queue_lock() * users end up calling queue_me(). Similarly, for...
0
[ "CWE-264", "CWE-269" ]
linux
e9c243a5a6de0be8e584c604d353412584b592f8
53,696,714,070,146,680,000,000,000,000,000,000,000
21
futex-prevent-requeue-pi-on-same-futex.patch futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1) If uaddr == uaddr2, then we have broken the rule of only requeueing from a non-pi futex to a pi futex with this call. If we attempt this, then dangling pointers may be left for rt_waiter resulting in an expl...
static void *ion_buffer_kmap_get(struct ion_buffer *buffer) { void *vaddr; if (buffer->kmap_cnt) { buffer->kmap_cnt++; return buffer->vaddr; } vaddr = buffer->heap->ops->map_kernel(buffer->heap, buffer); if (WARN_ONCE(vaddr == NULL, "heap->ops->map_kernel should return ERR_PTR on error")) return ERR_PTR(...
0
[ "CWE-416", "CWE-284" ]
linux
9590232bb4f4cc824f3425a6e1349afbe6d6d2b7
13,933,079,357,031,440,000,000,000,000,000,000,000
18
staging/android/ion : fix a race condition in the ion driver There is a use-after-free problem in the ion driver. This is caused by a race condition in the ion_ioctl() function. A handle has ref count of 1 and two tasks on different cpus calls ION_IOC_FREE simultaneously. cpu 0 cpu ...
_functor3d_float(const CImg<T>& pref):ref(pref) {}
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
184,589,876,002,738,840,000,000,000,000,000,000,000
1
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
uschar *dkim_exim_sign(int dkim_fd, uschar *dkim_private_key, uschar *dkim_domain, uschar *dkim_selector, uschar *dkim_canon, uschar *dkim_sign_headers) { int sep = 0; uschar *seen_items = NULL; int ...
0
[ "CWE-134" ]
exim
337e3505b0e6cd4309db6bf6062b33fa56e06cf8
251,170,533,386,113,600,000,000,000,000,000,000,000
188
Bugzilla #1106: Don't pass DKIM compound log line as format string
static void aes_decrypt(struct ssh_cipher_struct *cipher, void *in, void *out, unsigned long len) { AES_cbc_encrypt(in, out, len, cipher->key, cipher->IV, AES_DECRYPT); }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
221,869,331,866,841,540,000,000,000,000,000,000,000
4
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
hb_ot_layout_script_get_language_count (hb_ot_layout_t *layout, hb_ot_layout_table_type_t table_type, unsigned int script_index) { const Script &s = get_gsubgpos_table (layout, table_type).get_script (script_index); return s.get_lang_sys_count (); }
0
[]
pango
336bb3201096bdd0494d29926dd44e8cca8bed26
135,496,050,231,763,250,000,000,000,000,000,000,000
8
[HB] Remove all references to the old code!
mono_method_get_name (MonoMethod *method) { return method->name; }
0
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
97,697,285,417,733,890,000,000,000,000,000,000,000
4
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
static int ksmd_should_run(void) { return (ksm_run & KSM_RUN_MERGE) && !list_empty(&ksm_mm_head.mm_list); }
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
285,906,178,189,386,320,000,000,000,000,000,000,000
4
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
validate_arguments(arguments_ty args) { if (!validate_args(args->args)) return 0; if (args->vararg && args->vararg->annotation && !validate_expr(args->vararg->annotation, Load)) { return 0; } if (!validate_args(args->kwonlyargs)) return 0; if (args->kwarg && args-...
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
203,357,631,102,439,640,000,000,000,000,000,000,000
25
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
static inline struct shmem_sb_info *SHMEM_SB(struct super_block *sb) { return sb->s_fs_info; }
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
165,778,236,407,955,480,000,000,000,000,000,000,000
4
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code) { siginfo_t info; local_irq_enable(); info.si_signo = SIGILL; info.si_errno = 0; info.si_code = ILL_BADSTK; info.si_addr = NULL; if (notify_die(DIE_TRAP, "iret exception", regs, error_code, 32, SIGILL) == NOTIFY_STOP) return; do_trap(...
0
[ "CWE-400" ]
linux-stable-rt
e5d4e1c3ccee18c68f23d62ba77bda26e893d4f0
98,591,971,671,934,050,000,000,000,000,000,000,000
14
x86: Do not disable preemption in int3 on 32bit Preemption must be disabled before enabling interrupts in do_trap on x86_64 because the stack in use for int3 and debug is a per CPU stack set by th IST. But 32bit does not have an IST and the stack still belongs to the current task and there is no problem in scheduling ...
size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params* cctxParams, int compressionLevel) { if (!cctxParams) { return ERROR(GENERIC); } memset(cctxParams, 0, sizeof(*cctxParams)); cctxParams->compressionLevel = compressionLevel; cctxParams->fParams.contentSizeFlag = 1; return 0; }
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
96,889,186,583,688,000,000,000,000,000,000,000,000
7
fixed T36302429
static int pi_pre_block(struct kvm_vcpu *vcpu) { unsigned int dest; struct pi_desc old, new; struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); if (!kvm_arch_has_assigned_device(vcpu->kvm) || !irq_remapping_cap(IRQ_POSTING_CAP) || !kvm_vcpu_apicv_active(vcpu)) return 0; WARN_ON(irqs_disabled()); local_irq_...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
93,295,241,635,666,400,000,000,000,000,000,000,000
56
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8* buf, Py_ssize_t bytes) { UINT8* ptr; int framesize; int c, chunks, advance; int l, lines; int i, j, x = 0, y, ymax; /* If not even the chunk size is present, we'd better leave */ if (bytes < 4) return 0; /* We don't decode ...
0
[ "CWE-125", "CWE-787" ]
Pillow
a09acd0decd8a87ccce939d5ff65dab59e7d365b
303,061,285,771,598,330,000,000,000,000,000,000,000
188
Catch FLI buffer overrun
inline bool IsMerge(const NodeDef& node_def) { return node_def.op() == "Merge" || node_def.op() == "RefMerge" || node_def.op() == "_XlaMerge"; }
0
[ "CWE-125", "CWE-369", "CWE-908" ]
tensorflow
0cc38aaa4064fd9e79101994ce9872c6d91f816b
261,047,703,137,670,320,000,000,000,000,000,000,000
4
Prevent unitialized memory access in `GraphConstructor::MakeEdge` The `MakeEdge` implementation assumes that there exists an output at `output_index` of `src` node and an input at `input_index` of `dst` node. However, if this is not the case this results in accessing data out of bounds. Because we are accessing an arr...
DECLARESepPutFunc(putRGBAAseparate8bittile) { (void) img; (void) x; (void) y; while (h-- > 0) { UNROLL8(w, NOP, *cp++ = PACK4(*r++, *g++, *b++, *a++)); SKEW4(r, g, b, a, fromskew); cp += toskew; } }
0
[ "CWE-119" ]
libtiff
40a5955cbf0df62b1f9e9bd7d9657b0070725d19
244,830,503,823,343,500,000,000,000,000,000,000,000
9
* libtiff/tif_next.c: add new tests to check that we don't read outside of the compressed input stream buffer. * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height
static bool already_entry(RList *entries, ut64 vaddr) { RBinAddr *e; RListIter *iter; r_list_foreach (entries, iter, e) { if (e->vaddr == vaddr) { return true; } } return false; }
0
[ "CWE-125" ]
radare2
ead645853a63bf83d8386702cad0cf23b31d7eeb
42,931,178,562,851,080,000,000,000,000,000,000,000
10
fix #6857
bool DRW_Layer::parseDwg(DRW::Version version, dwgBuffer *buf, duint32 bs){ dwgBuffer sBuff = *buf; dwgBuffer *sBuf = buf; if (version > DRW::AC1018) {//2007+ sBuf = &sBuff; //separate buffer for strings } bool ret = DRW_TableEntry::parseDwg(version, buf, sBuf, bs); DRW_DBG("\n**********...
0
[ "CWE-191" ]
libdxfrw
fcd977cc7f8f6cc7f012e5b72d33cf7d77b3fa69
222,818,171,738,412,440,000,000,000,000,000,000,000
69
fixed heap use after free vulnerability CVE-2021-21900 as reported in TALOS-2021-1351 / CVE-2021-21900, DRW_TableEntry::parseCode had the potential to trigger an use after free exception with a malformed DXF file.
void mesh_list_remove(struct mesh_state* m, struct mesh_state** fp, struct mesh_state** lp) { if(m->next) m->next->prev = m->prev; else *lp = m->prev; if(m->prev) m->prev->next = m->next; else *fp = m->next; }
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
254,187,758,582,129,770,000,000,000,000,000,000,000
10
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
static int compat_siocshwtstamp(struct net *net, struct compat_ifreq __user *uifr32) { void __user *uptr; compat_uptr_t uptr32; struct ifreq __user *uifr; uifr = compat_alloc_user_space(sizeof(*uifr)); if (copy_in_user(uifr, uifr32, sizeof(struct compat_ifreq))) return -EFAULT; if (get_user(uptr32, &uifr32->i...
0
[]
linux-2.6
644595f89620ba8446cc555be336d24a34464950
82,719,512,002,167,520,000,000,000,000,000,000,000
20
compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct timeval and struct timespec to userspace in net/socket.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
static void win_update_buffer_size(curl_socket_t sockfd) { int result; ULONG ideal; DWORD ideallen; result = WSAIoctl(sockfd, SIO_IDEAL_SEND_BACKLOG_QUERY, 0, 0, &ideal, sizeof(ideal), &ideallen, 0, 0); if(result == 0) { setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (const c...
0
[ "CWE-200" ]
curl
7214288898f5625a6cc196e22a74232eada7861c
227,276,942,502,166,400,000,000,000,000,000,000,000
12
transfer: strip credentials from the auto-referer header field Added test 2081 to verify. CVE-2021-22876 Bug: https://curl.se/docs/CVE-2021-22876.html
_archive_write_disk_filter_bytes(struct archive *_a, int n) { struct archive_write_disk *a = (struct archive_write_disk *)_a; (void)n; /* UNUSED */ if (n == -1 || n == 0) return (a->total_bytes_written); return (-1); }
0
[ "CWE-59", "CWE-269" ]
libarchive
b41daecb5ccb4c8e3b2c53fd6147109fc12c3043
100,559,168,271,436,650,000,000,000,000,000,000,000
8
Do not follow symlinks when processing the fixup list Use lchmod() instead of chmod() and tell the remaining functions that the real file to be modified is a symbolic link. Fixes #1566
static void t_blosc_do_job(void *ctxt) { struct thread_context* thcontext = (struct thread_context*)ctxt; blosc2_context* context = thcontext->parent_context; int32_t cbytes; int32_t ntdest; int32_t tblocks; /* number of blocks per thread */ int32_t tblock; /* limit block on a t...
0
[ "CWE-787" ]
c-blosc2
c4c6470e88210afc95262c8b9fcc27e30ca043ee
80,393,219,724,171,170,000,000,000,000,000,000,000
193
Fixed asan heap buffer overflow when not enough space to write compressed block size.
static int opj_j2k_get_default_thread_count() { const char* num_threads_str = getenv("OPJ_NUM_THREADS"); int num_cpus; int num_threads; if (num_threads_str == NULL || !opj_has_thread_support()) { return 0; } num_cpus = opj_get_num_cpus(); if (strcmp(num_threads_str, "ALL_CPUS") == 0...
0
[ "CWE-20" ]
openjpeg
73fdf28342e4594019af26eb6a347a34eceb6296
4,117,467,979,993,469,000,000,000,000,000,000,000
24
opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only)
Formattable::operator=(const Formattable& source) { if (this != &source) { // Disposes the current formattable value/setting. dispose(); // Sets the correct data type for this value. fType = source.fType; switch (fType) { case kArray: // Sets ...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
131,604,157,412,294,010,000,000,000,000,000,000,000
53
ICU-20246 Fixing another integer overflow in number parsing.
\param last_frame Index of the last frame to read (can be higher than the actual number of frames, e.g. '~0U'). \param step_frame Step value for frame reading. \note If step_frame==0, the current video stream is forced to be released (without any frames read). **/ CImgList<T>& load_video(const...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
52,710,132,003,722,150,000,000,000,000,000,000,000
135
.
void dtls1_stop_timer(SSL *s) { /* Reset everything */ memset(&(s->d1->timeout), 0, sizeof(struct dtls1_timeout_st)); memset(&(s->d1->next_timeout), 0, sizeof(struct timeval)); s->d1->timeout_duration = 1; BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, &(s->d1->next_timeout)); /* Clear retransmiss...
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
42,059,013,253,122,510,000,000,000,000,000,000,000
10
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
move_files (CopyMoveJob *job, GList *fallbacks, const char *dest_fs_id, char **dest_fs_type, SourceInfo *source_info, TransferInfo *transfer_info) { CommonJob *common; GList *l; GFile *src; gboolean same_fs; int i; GdkPoint *point; gboolean skipped_file; MoveFileCopyFallback *fallback; ...
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
138,107,325,437,521,300,000,000,000,000,000,000,000
48
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
static struct passwd *getpw_str(const char *username, size_t len) { struct passwd *pw; char *username_z = xmemdupz(username, len); pw = getpwnam(username_z); free(username_z); return pw; }
0
[ "CWE-125" ]
git
11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d
214,740,796,241,363,050,000,000,000,000,000,000,000
8
is_ntfs_dotgit: use a size_t for traversing string We walk through the "name" string using an int, which can wrap to a negative value and cause us to read random memory before our array (e.g., by creating a tree with a name >2GB, since "int" is still 32 bits even on most 64-bit platforms). Worse, this is easy to trigg...
void CLASS sony_arw2_load_raw() { uchar *data, *dp; ushort pix[16]; int row, col, val, max, min, imax, imin, sh, bit, i; data = (uchar *) malloc (raw_width); merror (data, "sony_arw2_load_raw()"); #ifdef LIBRAW_LIBRARY_BUILD try { #endif for (row=0; row < height; row++) { #ifdef LIBRAW_LIBRARY_BUILD ...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
6,270,855,789,598,455,000,000,000,000,000,000,000
63
backported 0.15.4 datachecks
const CImg<T>& _save_ascii(std::FILE *const file, const char *const filename) const { if (!file && !filename) throw CImgArgumentException(_cimg_instance "save_ascii(): Specified filename is (null).", cimg_instance); std::FIL...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
141,705,488,490,578,550,000,000,000,000,000,000,000
15
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int __init binder_init(void) { int ret; char *device_name, *device_names, *device_tmp; struct binder_device *device; struct hlist_node *tmp; ret = binder_alloc_shrinker_init(); if (ret) return ret; atomic_set(&binder_transaction_log.cur, ~0U); atomic_set(&binder_transaction_log_failed.cur, ~0U); bi...
0
[ "CWE-362" ]
linux
5eeb2ca02a2f6084fc57ae5c244a38baab07033a
331,172,101,632,483,700,000,000,000,000,000,000,000
81
ANDROID: binder: synchronize_rcu() when using POLLFREE. To prevent races with ep_remove_waitqueue() removing the waitqueue at the same time. Reported-by: syzbot+a2a3c4909716e271487e@syzkaller.appspotmail.com Signed-off-by: Martijn Coenen <maco@android.com> Cc: stable <stable@vger.kernel.org> # 4.14+ Signed-off-by: Gr...
void ms_handle_fast_connect(Connection *con) override {}
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
46,418,869,212,484,730,000,000,000,000,000,000,000
1
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static ssize_t driver_override_store(struct device *_dev, struct device_attribute *attr, const char *buf, size_t count) { struct amba_device *dev = to_amba_device(_dev); char *driver_override, *old = dev->driver_override, *cp; /* We need to keep extra room for a newline */ if (count >= (PAGE_SIZE...
1
[ "CWE-415" ]
linux
6a7228d90d42bcacfe38786756ba62762b91c20a
163,886,536,362,716,930,000,000,000,000,000,000,000
30
ARM: amba: Fix race condition with driver_override The driver_override implementation is susceptible to a race condition when different threads are reading vs storing a different driver override. Add locking to avoid this race condition. Cfr. commits 6265539776a0810b ("driver core: platform: fix race condition with ...
static struct file *do_create(struct ipc_namespace *ipc_ns, struct inode *dir, struct path *path, int oflag, umode_t mode, struct mq_attr *attr) { const struct cred *cred = current_cred(); int ret; if (attr) { ret = mq_attr_ok(ipc_ns, attr); if (ret) return ERR_PTR(ret); /* store for use during creat...
0
[ "CWE-416" ]
linux
f991af3daabaecff34684fd51fac80319d1baad1
249,156,122,322,723,140,000,000,000,000,000,000,000
32
mqueue: fix a use-after-free in sys_mq_notify() The retry logic for netlink_attachskb() inside sys_mq_notify() is nasty and vulnerable: 1) The sock refcnt is already released when retry is needed 2) The fd is controllable by user-space because we already release the file refcnt so we when retry but the fd has bee...
static void picolcd_remove(struct hid_device *hdev) { struct picolcd_data *data = hid_get_drvdata(hdev); unsigned long flags; dbg_hid(PICOLCD_NAME " hardware remove...\n"); spin_lock_irqsave(&data->lock, flags); data->status |= PICOLCD_FAILED; spin_unlock_irqrestore(&data->lock, flags); picolcd_exit_devfs(data...
0
[ "CWE-119", "CWE-787" ]
linux
844817e47eef14141cf59b8d5ac08dd11c0a9189
68,082,446,536,082,560,000,000,000,000,000,000,000
37
HID: picolcd: sanity check report size in raw_event() callback The report passed to us from transport driver could potentially be arbitrarily large, therefore we better sanity-check it so that raw_data that we hold in picolcd_pending structure are always kept within proper bounds. Cc: stable@vger.kernel.org Reported-...
bool run(OperationContext* opCtx, const string& dbname, const BSONObj& cmdObj, BSONObjBuilder& result) { auth::CreateOrUpdateRoleArgs args; Status status = auth::parseCreateOrUpdateRoleCommands(cmdObj, "updateRole", dbname, &args); if (!status.isOK()) {...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
301,496,145,797,234,730,000,000,000,000,000,000,000
93
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
multi_process_signal(struct multi_context *m) { if (m->top.sig->signal_received == SIGUSR2) { struct status_output *so = status_open(NULL, 0, M_INFO, NULL, 0); multi_print_status(m, so, m->status_file_version); status_close(so); m->top.sig->signal_received = 0; return fal...
0
[ "CWE-362", "CWE-476" ]
openvpn
37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab
14,828,765,392,237,931,000,000,000,000,000,000,000
20
Fix illegal client float (CVE-2020-11810) There is a time frame between allocating peer-id and initializing data channel key (which is performed on receiving push request or on async push-reply) in which the existing peer-id float checks do not work right. If a "rogue" data channel packet arrives during that time fra...
xmlXPathCacheFreeObjectList(xmlPointerListPtr list) { int i; xmlXPathObjectPtr obj; if (list == NULL) return; for (i = 0; i < list->number; i++) { obj = list->items[i]; /* * Note that it is already assured that we don't need to * look out for namespace nodes in the node-set. */ if (obj->nodeset...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
116,271,883,164,195,480,000,000,000,000,000,000,000
26
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
CheckStatus(struct upnphttp * h) { if (GETFLAG(IPV6FCFWDISABLEDMASK)) { SoapError(h, 702, "FirewallDisabled"); return 0; } else if(GETFLAG(IPV6FCINBOUNDDISALLOWEDMASK)) { SoapError(h, 703, "InboundPinholeNotAllowed"); return 0; } else return 1; }
0
[ "CWE-476" ]
miniupnp
13585f15c7f7dc28bbbba1661efb280d530d114c
81,077,298,619,930,485,000,000,000,000,000,000,000
15
GetOutboundPinholeTimeout: check args
TEST_F(RenameCollectionTest, RenameDifferentDatabaseStayTempTrue) { _testRenameCollectionStayTemp(_opCtx.get(), _sourceNss, _targetNssDifferentDb, true, true); }
0
[ "CWE-20" ]
mongo
35c1b1f588f04926a958ad2fe4d9c59d79f81e8b
271,433,082,987,454,040,000,000,000,000,000,000,000
3
SERVER-35636 renameCollectionForApplyOps checks for complete namespace
static inline int vmcs_field_width(unsigned long field) { if (0x1 & field) /* the *_HIGH fields are all 32 bit */ return VMCS_FIELD_WIDTH_U32; return (field >> 13) & 0x3 ; }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
138,267,982,284,458,180,000,000,000,000,000,000,000
6
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
TEST_P(Http2CodecImplTest, InvalidRepeatContinueAllowed) { stream_error_on_invalid_http_messaging_ = true; initialize(); MockStreamCallbacks request_callbacks; request_encoder_->getStream().addCallbacks(request_callbacks); TestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_heade...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
49,938,333,678,741,210,000,000,000,000,000,000,000
30
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...
cin_iscomment(char_u *p) { return (p[0] == '/' && (p[1] == '*' || p[1] == '/')); }
0
[ "CWE-122", "CWE-787" ]
vim
2de9b7c7c8791da8853a9a7ca9c467867465b655
53,281,550,561,249,860,000,000,000,000,000,000,000
4
patch 8.2.3625: illegal memory access when C-indenting Problem: Illegal memory access when C-indenting. Solution: Also set the cursor column.
static int RsaPublicEncryptEx(const byte* in, word32 inLen, byte* out, word32 outLen, RsaKey* key, int rsa_type, byte pad_value, int pad_type, enum wc_HashType hash, int mgf, byte* label, word32 labelSz, int ...
0
[ "CWE-310", "CWE-787" ]
wolfssl
fb2288c46dd4c864b78f00a47a364b96a09a5c0f
225,574,288,206,540,570,000,000,000,000,000,000,000
113
RSA-PSS: Handle edge case with encoding message to hash When the key is small relative to the digest (1024-bit key, 64-byte hash, 61-byte salt length), the internal message to hash is larger than the output size. Allocate a buffer for the message when this happens.
static ssize_t ad5755_read_powerdown(struct iio_dev *indio_dev, uintptr_t priv, const struct iio_chan_spec *chan, char *buf) { struct ad5755_state *st = iio_priv(indio_dev); return sprintf(buf, "%d\n", (bool)(st->pwr_down & (1 << chan->channel))); }
0
[ "CWE-787" ]
linux
9d47964bfd471f0dd4c89f28556aec68bffa0020
113,186,737,134,896,100,000,000,000,000,000,000,000
8
iio: ad5755: fix off-by-one on devnr limit check The comparison for devnr limits is off-by-one, the current check allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact 0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds write to pdata->dac[devnr]. Fix this by replacing > with >= on the compariso...
inline void set_try_catch_handler_address(Address address) { try_catch_handler_address_ = address; }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
331,458,505,342,777,460,000,000,000,000,000,000,000
3
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
static void __io_req_aux_free(struct io_kiocb *req) { struct io_ring_ctx *ctx = req->ctx; kfree(req->io); if (req->file) { if (req->flags & REQ_F_FIXED_FILE) percpu_ref_put(&ctx->file_data->refs); else fput(req->file); } io_req_work_drop_env(req); }
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
238,673,823,611,871,600,000,000,000,000,000,000,000
14
io_uring: grab ->fs as part of async preparation This passes it in to io-wq, so it assumes the right fs_struct when executing async work that may need to do lookups. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe <axboe@kernel.dk>
static ssize_t regulator_uV_show(struct device *dev, struct device_attribute *attr, char *buf) { struct regulator_dev *rdev = dev_get_drvdata(dev); ssize_t ret; mutex_lock(&rdev->mutex); ret = sprintf(buf, "%d\n", _regulator_get_voltage(rdev)); mutex_unlock(&rdev->mutex); return ret; }
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
177,020,698,596,200,030,000,000,000,000,000,000,000
12
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
void LEX::fix_first_select_number() { SELECT_LEX *first= first_select_lex(); if (first && first->select_number != 1) { uint num= first->select_number; for (SELECT_LEX *sel= all_selects_list; sel; sel= sel->next_select_in_list()) { if (sel->select_number < num) sel->sele...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
107,303,055,013,362,260,000,000,000,000,000,000,000
16
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...
GF_Box *ctts_box_new() { ISOM_DECL_BOX_ALLOC(GF_CompositionOffsetBox, GF_ISOM_BOX_TYPE_CTTS); return (GF_Box *) tmp; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
72,110,933,179,847,810,000,000,000,000,000,000,000
5
fixed #1587
__ipip6_tunnel_locate_prl(struct ip_tunnel *t, __be32 addr) { struct ip_tunnel_prl_entry *p = (struct ip_tunnel_prl_entry *)NULL; for (p = t->prl; p; p = p->next) if (p->addr == addr) break; return p; }
0
[ "CWE-399" ]
linux-2.6
36ca34cc3b8335eb1fe8bd9a1d0a2592980c3f02
327,673,878,740,862,000,000,000,000,000,000,000,000
10
sit: Add missing kfree_skb() on pskb_may_pull() failure. Noticed by Paul Marks <paul@pmarks.net>. Signed-off-by: David S. Miller <davem@davemloft.net>
agoo_con_header_value(const char *header, int hlen, const char *key, int *vlen) { // Search for \r then check for \n and then the key followed by a :. Keep // trying until the end of the header. const char *h = header; const char *hend = header + hlen; const char *value; int klen = (int)strlen(...
0
[ "CWE-444", "CWE-61" ]
agoo
23d03535cf7b50d679a60a953a0cae9519a4a130
176,270,605,279,075,270,000,000,000,000,000,000,000
29
Remote addr (#99) * REMOTE_ADDR added * Ready for merge
static inline struct mcba_usb_ctx *mcba_usb_get_free_ctx(struct mcba_priv *priv, struct can_frame *cf) { int i = 0; struct mcba_usb_ctx *ctx = NULL; for (i = 0; i < MCBA_MAX_TX_URBS; i++) { if (priv->tx_context[i].ndx == MCBA_CTX_FREE) { ctx = &priv->tx_context[i]; ctx->ndx = i; if (cf) { ct...
0
[ "CWE-416" ]
linux
4d6636498c41891d0482a914dd570343a838ad79
284,540,721,356,437,320,000,000,000,000,000,000,000
30
can: mcba_usb: fix use-after-free on disconnect The driver was accessing its driver data after having freed it. Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer") Cc: stable <stable@vger.kernel.org> # 4.12 Cc: Remigiusz Kołłątaj <remigiusz.kollataj@mobica.com> Reported-by: syzbot+e2...
quantifiers_memory_node_info(Node* node) { int r = BODY_MAY_BE_EMPTY; switch (NODE_TYPE(node)) { case NODE_LIST: case NODE_ALT: { int v; do { v = quantifiers_memory_node_info(NODE_CAR(node)); if (v > r) r = v; } while (IS_NOT_NULL(node = NODE_CDR(node))); } break; ...
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
85,437,980,229,360,860,000,000,000,000,000,000,000
80
#207: Out-of-bounds write
static int pegasus_open(struct net_device *net) { pegasus_t *pegasus = netdev_priv(net); int res=-ENOMEM; if (pegasus->rx_skb == NULL) pegasus->rx_skb = __netdev_alloc_skb_ip_align(pegasus->net, PEGASUS_MTU, GFP_KERNEL); if (!pegasus->rx_skb) goto exit; res = set_registers(pegasus, ...
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
104,921,231,704,463,920,000,000,000,000,000,000,000
52
pegasus: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
static void des3_1_decrypt(struct ssh_cipher_struct *cipher, void *in, void *out, unsigned long len) { gcry_cipher_decrypt(cipher->key[2], out, len, in, len); gcry_cipher_encrypt(cipher->key[1], in, len, out, len); gcry_cipher_decrypt(cipher->key[0], out, len, in, len); }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
304,666,108,726,651,830,000,000,000,000,000,000,000
6
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
static int sixpack_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) { struct sixpack *sp = sp_get(tty); struct net_device *dev; unsigned int tmp, err; if (!sp) return -ENXIO; dev = sp->dev; switch(cmd) { case SIOCGIFNAME: err = copy_to_user((void __user *) arg, dev->name, ...
0
[ "CWE-416", "CWE-703" ]
linux
efe4186e6a1b54bf38b9e05450d43b0da1fd7739
232,395,298,798,252,740,000,000,000,000,000,000,000
59
drivers: hamradio: 6pack: fix UAF bug caused by mod_timer() When a 6pack device is detaching, the sixpack_close() will act to cleanup necessary resources. Although del_timer_sync() in sixpack_close() won't return if there is an active timer, one could use mod_timer() in sp_xmit_on_air() to wake up timer again by calli...
static void do_async_commit(struct work_struct *work) { struct btrfs_async_commit *ac = container_of(work, struct btrfs_async_commit, work.work); /* * We've got freeze protection passed with the transaction. * Tell lockdep about it. */ if (ac->newtrans->type < TRANS_JOIN_NOLOCK) rwsem_acquire_read( ...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
93,956,738,075,037,770,000,000,000,000,000,000,000
19
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...
EC_PRE_COMP *EC_ec_pre_comp_dup(EC_PRE_COMP *pre) { int i; if (pre != NULL) CRYPTO_UP_REF(&pre->references, &i, pre->lock); return pre; }
0
[ "CWE-327", "CWE-320" ]
openssl
b1d6d55ece1c26fa2829e2b819b038d7b6d692b4
331,197,833,610,993,700,000,000,000,000,000,000,000
7
Timing vulnerability in ECDSA signature generation (CVE-2018-0735) Preallocate an extra limb for some of the big numbers to avoid a reallocation that can potentially provide a side channel. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/7486) (cherry pick...
void completion_last_message_add(const char *nick) { g_return_if_fail(nick != NULL); last_msg_add(&global_lastmsgs, nick, TRUE, keep_privates_count); }
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
163,265,712,677,907,570,000,000,000,000,000,000,000
6
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
static OPJ_BOOL opj_t2_encode_packet(OPJ_UINT32 tileno, opj_tcd_tile_t * tile, opj_tcp_t * tcp, opj_pi_iterator_t *pi, OPJ_BYTE *dest, ...
0
[ "CWE-122" ]
openjpeg
00383e162ae2f8fc951f5745bf1011771acb8dce
252,839,985,253,632,700,000,000,000,000,000,000,000
334
pi.c: avoid out of bounds access with POC (refs https://github.com/uclouvain/openjpeg/issues/1293#issuecomment-737122836)
find_idlest_group(struct sched_domain *sd, struct task_struct *p, int this_cpu, int sd_flag) { struct sched_group *idlest = NULL, *group = sd->groups; struct sched_group *most_spare_sg = NULL; unsigned long min_runnable_load = ULONG_MAX; unsigned long this_runnable_load = ULONG_MAX; unsigned long min_avg_load ...
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
296,872,829,161,420,320,000,000,000,000,000,000,000
129
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
static int r_egg_append_bytes(REgg *egg, const ut8 *b, int len) { if (!r_egg_raw (egg, b, len)) { return false; } if (!r_buf_append_bytes (egg->bin, b, len)) { return false; } return true; }
0
[ "CWE-125" ]
radare2
e710401ebb4a892a87b0c709d709af8b5dcbbb01
338,423,352,414,111,570,000,000,000,000,000,000,000
11
patch #14211 heap buffer overflow in large ragg2 inputs. this should be refactored to use an RBuffer to enable dynamic resizing, but for now just patching it to bail out if we are about to overwrite the allocated statically sized buffer
static void set_emss(struct iwch_ep *ep, u16 opt) { PDBG("%s ep %p opt %u\n", __func__, ep, opt); ep->emss = T3C_DATA(ep->com.tdev)->mtus[G_TCPOPT_MSS(opt)] - 40; if (G_TCPOPT_TSTAMP(opt)) ep->emss -= 12; if (ep->emss < 128) ep->emss = 128; PDBG("emss=%d\n", ep->emss); }
0
[ "CWE-703" ]
linux
67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3
243,382,060,587,544,960,000,000,000,000,000,000,000
10
iw_cxgb3: Fix incorrectly returning error on success The cxgb3_*_send() functions return NET_XMIT_ values, which are positive integers values. So don't treat positive return values as an error. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off...
static inline int check_sticky(struct inode *dir, struct inode *inode) { if (!(dir->i_mode & S_ISVTX)) return 0; if (inode->i_uid == current->fsuid) return 0; if (dir->i_uid == current->fsuid) return 0; return !capable(CAP_FOWNER); }
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
205,374,947,786,262,460,000,000,000,000,000,000,000
10
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
void st_select_lex::init_select() { sj_nests.empty(); sj_subselects.empty(); group_list.empty(); if (group_list_ptrs) group_list_ptrs->clear(); type= 0; db= null_clex_str; having= 0; table_join_options= 0; in_sum_expr= with_wild= 0; options= 0; ftfunc_list_alloc.empty(); inner_sum_func_list=...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
336,604,049,194,283,100,000,000,000,000,000,000,000
44
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static int copy_all_tile_runs(void) { int x, y, n, m, i; int diffs = 0, ct; int in_run = 0, run = 0; int ntave = 0, ntcnt = 0; if (unixpw_in_progress) return 0; for (y=0; y < ntiles_y; y++) { for (x=0; x < ntiles_x + 1; x++) { n = x + y * ntiles_x; if (x != ntiles_x && tile_has_diff[n]) { in_run = ...
0
[ "CWE-862", "CWE-284", "CWE-732" ]
x11vnc
69eeb9f7baa14ca03b16c9de821f9876def7a36a
170,798,164,564,296,640,000,000,000,000,000,000,000
63
scan: limit access to shared memory segments to current user
static int selinux_inode_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags) { struct inode *inode = dentry->d_inode; struct inode_security_struct *isec = inode->i_security; struct superblock_security_struct *sbsec; struct common_audit_data ad; struct selinux_audit_da...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
323,921,473,225,816,200,000,000,000,000,000,000,000
55
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
void idr_init(struct idr *idp) { memset(idp, 0, sizeof(struct idr)); spin_lock_init(&idp->lock); }
0
[]
linux
2dcb22b346be7b7b7e630a8970d69cf3f1111ec1
67,789,985,058,558,960,000,000,000,000,000,000,000
5
idr: fix backtrack logic in idr_remove_all Currently idr_remove_all will fail with a use after free error if idr::layers is bigger than 2, which on 32 bit systems corresponds to items more than 1024. This is due to stepping back too many levels during backtracking. For simplicity let's assume that IDR_BITS=1 -> we h...
void __init xfrm_init(void) { register_pernet_subsys(&xfrm_net_ops); xfrm_dev_init(); xfrm_input_init(); #ifdef CONFIG_XFRM_ESPINTCP espintcp_init(); #endif }
0
[ "CWE-703" ]
linux
f85daf0e725358be78dfd208dea5fd665d8cb901
221,944,926,463,684,900,000,000,000,000,000,000,000
10
xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup() xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of pols[0]. This refcount can be dropped in xfrm_expand_policies() when xfrm_expand_policies() return error. pols[0]'s refcount is balanced in here. But xfrm_bundle_look...
_copyAlterRoleSetStmt(const AlterRoleSetStmt *from) { AlterRoleSetStmt *newnode = makeNode(AlterRoleSetStmt); COPY_STRING_FIELD(role); COPY_STRING_FIELD(database); COPY_NODE_FIELD(setstmt); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
251,463,808,956,165,650,000,000,000,000,000,000,000
10
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static inline bool kvm_guest_apic_has_interrupt(struct kvm_vcpu *vcpu) { return (is_guest_mode(vcpu) && kvm_x86_ops->guest_apic_has_interrupt && kvm_x86_ops->guest_apic_has_interrupt(vcpu)); }
0
[ "CWE-476" ]
linux
e97f852fd4561e77721bb9a4e0ea9d98305b1e93
77,629,039,362,241,130,000,000,000,000,000,000,000
6
KVM: X86: Fix scan ioapic use-before-initialization Reported by syzkaller: BUG: unable to handle kernel NULL pointer dereference at 00000000000001c8 PGD 80000003ec4da067 P4D 80000003ec4da067 PUD 3f7bfa067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 7 PID: 5059 Comm: debug Tainted: G OE 4.19.0-rc5 #16...
static void TIFFIgnoreTags(TIFF *tiff) { char *q; const char *p, *tags; Image *image; register ssize_t i; size_t count; TIFFFieldInfo *ignore; if (TIFFGetReadProc(tiff) != TIFFReadBlob) return; image=(Image *)TIFFClientdata(tiff); tags=GetImageArtifact(image,"tiff:...
0
[ "CWE-399", "CWE-772" ]
ImageMagick
256825d4eb33dc301496710d15cf5a7ae924088b
17,341,719,100,503,390,000,000,000,000,000,000,000
69
Fixed possible memory leak reported in #1206
smtp_server_connection_check_pipeline(struct smtp_server_connection *conn) { unsigned int pipeline = conn->command_queue_count; if (conn->command_queue_tail != NULL) { i_assert(pipeline > 0); if (conn->command_queue_tail->state == SMTP_SERVER_COMMAND_STATE_SUBMITTED_REPLY) pipeline--; } if (pipeline ...
0
[ "CWE-77" ]
core
321c339756f9b2b98fb7326359d1333adebb5295
212,753,611,687,428,880,000,000,000,000,000,000,000
19
lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability. The input handler kept reading more commands even though the input was locked by the STARTTLS command, thereby causing it to read the command pipelined beyond STARTTLS. This causes a STARTTLS command injection vulerability.
end_visual_mode_keep_button() { #ifdef FEAT_CLIPBOARD /* * If we are using the clipboard, then remember what was selected in case * we need to paste it somewhere while we still own the selection. * Only do this when the clipboard is already owned. Don't want to grab * the selection when hitting...
0
[ "CWE-122" ]
vim
a062006b9de0b2947ab5fb376c6e67ef92a8cd69
206,694,298,900,857,470,000,000,000,000,000,000,000
44
patch 8.2.3610: crash when ModeChanged triggered too early Problem: Crash when ModeChanged triggered too early. Solution: Trigger ModeChanged after setting VIsual.
static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb) { struct net *net = sock_net(skb->sk); struct xfrm_state_walk *walk = (struct xfrm_state_walk *) &cb->args[1]; struct xfrm_dump_info info; BUILD_BUG_ON(sizeof(struct xfrm_state_walk) > sizeof(cb->args) - sizeof(cb->args[0])); info.i...
0
[ "CWE-125" ]
linux
b805d78d300bcf2c83d6df7da0c818b0fee41427
332,043,475,142,043,120,000,000,000,000,000,000,000
43
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard PC (i440FX + P...
static void ip6gre_dellink(struct net_device *dev, struct list_head *head) { struct net *net = dev_net(dev); struct ip6gre_net *ign = net_generic(net, ip6gre_net_id); if (dev != ign->fb_tunnel_dev) unregister_netdevice_queue(dev, head); }
0
[ "CWE-125" ]
net
7892032cfe67f4bde6fc2ee967e45a8fbaf33756
320,567,254,740,206,640,000,000,000,000,000,000,000
8
ip6_gre: fix ip6gre_err() invalid reads Andrey Konovalov reported out of bound accesses in ip6gre_err() If GRE flags contains GRE_KEY, the following expression *(((__be32 *)p) + (grehlen / 4) - 1) accesses data ~40 bytes after the expected point, since grehlen includes the size of IPv6 headers. Let's use a "struct ...
static void BumpPixel(GifCtx *ctx) { /* Bump the current X position */ ++(ctx->curx); /* If we are at the end of a scan line, set curx back to the beginning * If we are interlaced, bump the cury to the appropriate spot, * otherwise, just increment it. */ if(ctx->curx == ctx->Width) { ctx->curx = 0; if(!ct...
0
[ "CWE-415" ]
libgd
553702980ae89c83f2d6e254d62cf82e204956d0
290,752,679,362,708,250,000,000,000,000,000,000,000
47
Fix #492: Potential double-free in gdImage*Ptr() Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we must not call `gdDPExtractData()`; otherwise a double-free would happen. Since `gdImage*Ctx()` are void functions, and we can't change that for BC reasons, we're introducing static helpers which ar...
TRIO_PUBLIC_STRING char* trio_duplicate_max TRIO_ARGS2((source, max), TRIO_CONST char* source, size_t max) { size_t length; assert(source); assert(max > 0); length = trio_length(source); if (length > max) { length = max; } return internal_duplicate_max(...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
288,294,821,821,241,750,000,000,000,000,000,000,000
15
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
static int hidpp_map_battery_level(int capacity) { if (capacity < 11) return POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL; /* * The spec says this should be < 31 but some devices report 30 * with brand new batteries and Windows reports 30 as "Good". */ else if (capacity < 30) return POWER_SUPPLY_CAPACITY_LEVEL_LOW...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
196,755,602,841,066,300,000,000,000,000,000,000,000
14
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
PHP_FUNCTION( msgfmt_parse ) { char *source; size_t source_len; MSG_FORMAT_METHOD_INIT_VARS; /* Parse parameters. */ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os", &object, MessageFormatter_ce_ptr, &source, &source_len ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, ...
0
[ "CWE-119" ]
php-src
95c4564f939c916538579ef63602a3cd31941c51
16,129,426,524,098,852,000,000,000,000,000,000,000
22
Fixed bug #73473: Stack Buffer Overflow in msgfmt_parse_message
static int compat_table_info(struct xt_table_info *info, struct xt_table_info *newinfo) { void *loc_cpu_entry; int i; if (!newinfo || !info) return -EINVAL; memset(newinfo, 0, sizeof(struct xt_table_info)); newinfo->size = info->size; newinfo->number = info->number; for (i = 0; i < NF_IP_NUMHOOKS; i++) { ...
0
[ "CWE-787" ]
linux
9fa492cdc160cd27ce1046cb36f47d3b2b1efa21
170,873,151,718,213,100,000,000,000,000,000,000,000
20
[NETFILTER]: x_tables: simplify compat API Split the xt_compat_match/xt_compat_target into smaller type-safe functions performing just one operation. Handle all alignment and size-related conversions centrally in these function instead of requiring each module to implement a full-blown conversion function. Replace ->c...
hfinfo_char_vals_format(const header_field_info *hfinfo, char buf[32], guint32 value) { /* Get the underlying BASE_ value */ int display = FIELD_DISPLAY(hfinfo->display); return hfinfo_char_value_format_display(display, buf, value); }
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
329,605,154,815,803,670,000,000,000,000,000,000,000
7
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
vte_sequence_handler_ic (VteTerminal *terminal, GValueArray *params) { struct vte_cursor_position save; VteScreen *screen; screen = terminal->pvt->screen; save = screen->cursor_current; _vte_terminal_insert_char(terminal, ' ', TRUE, TRUE); screen->cursor_current = save; }
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
322,327,760,951,651,280,000,000,000,000,000,000,000
13
fix bug #548272 svn path=/trunk/; revision=2365
static void savecursor(VTermState *state, int save) { if(save) { state->saved.pos = state->pos; state->saved.mode.cursor_visible = state->mode.cursor_visible; state->saved.mode.cursor_blink = state->mode.cursor_blink; state->saved.mode.cursor_shape = state->mode.cursor_shape; vterm_state_save...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
207,610,989,185,697,400,000,000,000,000,000,000,000
24
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
hphp_libxml_input_buffer(const char *URI, xmlCharEncoding enc) { if (s_libxml_errors->m_entity_loader_disabled) { return nullptr; } return __xmlParserInputBufferCreateFilename(URI, enc); }
0
[ "CWE-94" ]
hhvm
95f96e7287effe2fcdfb9a5338d1a7e4f55b083b
137,781,145,815,254,750,000,000,000,000,000,000,000
6
Fix libxml_disable_entity_loader() This wasn't calling requestInit and setting the libxml handler no null. So the first time an error came along it would reset the handler from no-op to reading again. This is a much better fix, we set our custom handler in requestInit and when libxml_disable_entity_loader we store th...
void hns_roce_exit(struct hns_roce_dev *hr_dev) { hns_roce_unregister_device(hr_dev); if (hr_dev->hw->hw_exit) hr_dev->hw->hw_exit(hr_dev); hns_roce_cleanup_bitmap(hr_dev); hns_roce_cleanup_hem(hr_dev); if (hr_dev->cmd_mod) hns_roce_cmd_use_polling(hr_dev); hr_dev->hw->cleanup_eq(hr_dev); hns_roce_cmd_clea...
0
[ "CWE-665" ]
kernel
72be029e947510dd6cbbbaf51879622af26e4200
82,939,744,810,260,480,000,000,000,000,000,000,000
18
RDMA/hns: Fix init resp when alloc ucontext (bsc#1104427 FATE#326416). suse-commit: 8e5436bc2806cbe952f043cc995804c188ce047a
static void hns_nic_adjust_link(struct net_device *ndev) { struct hns_nic_priv *priv = netdev_priv(ndev); struct hnae_handle *h = priv->ae_handle; int state = 1; if (ndev->phydev) { h->dev->ops->adjust_link(h, ndev->phydev->speed, ndev->phydev->duplex); state = ndev->phydev->link; } state = state && h-...
0
[ "CWE-416" ]
linux
27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
246,184,761,443,707,000,000,000,000,000,000,000,000
25
net: hns: Fix a skb used after free bug skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x...
GF_Err dinf_dump(GF_Box *a, FILE * trace) { GF_DataInformationBox *p; p = (GF_DataInformationBox *)a; gf_isom_box_dump_start(a, "DataInformationBox", trace); fprintf(trace, ">\n"); if (p->size) gf_isom_box_dump_ex(p->dref, trace, GF_ISOM_BOX_TYPE_DREF); gf_isom_box_dump_done("DataInformationBox", a, trace); r...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
137,039,439,973,427,800,000,000,000,000,000,000,000
12
fixed 2 possible heap overflows (inc. #1088)
vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *params) { GdkScreen *gscreen; VteScreen *screen; GValue *value; GtkWidget *widget; char buf[128]; long param, arg1, arg2; gint width, height; guint i; GtkAllocation allocation; widget = &terminal->widget; screen = terminal->pvt->s...
1
[]
vte
8b971a7b2c59902914ecbbc3915c45dd21530a91
112,569,028,621,208,800,000,000,000,000,000,000,000
220
Fix terminal title reporting Fixed CVE-2003-0070 again. See also http://marc.info/?l=bugtraq&m=104612710031920&w=2 . (cherry picked from commit 6042c75b5a6daa0e499e61c8e07242d890d38ff1)
cupsdFindCert(const char *certificate) /* I - Certificate */ { cupsd_cert_t *cert; /* Current certificate */ cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindCert(certificate=%s)", certificate); for (cert = Certs; cert != NULL; cert = cert->next) if (!ctcompare(certificate, cert->certificate)) { cups...
0
[ "CWE-284" ]
cups
0bc9dc4658c26920a3f66da7dd234be463ca572e
23,775,250,900,691,020,000,000,000,000,000,000,000
17
CVE-2022-26691: An incorrect comparison in local admin authentication