func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
DEFUN (ipv6_nd_homeagent_config_flag, ipv6_nd_homeagent_config_flag_cmd, "ipv6 nd home-agent-config-flag", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Home Agent configuration flag\n") { struct interface *ifp; struct zebra_if *zif; ifp = (struct interface *) vty-...
0
[ "CWE-119", "CWE-787" ]
quagga
cfb1fae25f8c092e0d17073eaf7bd428ce1cd546
113,179,719,834,231,520,000,000,000,000,000,000,000
17
zebra: stack overrun in IPv6 RA receive code (CVE-2016-1245) The IPv6 RA code also receives ICMPv6 RS and RA messages. Unfortunately, by bad coding practice, the buffer size specified on receiving such messages mixed up 2 constants that in fact have different values. The code itself has: #define RTADV_MSG_SIZE 4096 ...
int ncp_modify_nfs_info(struct ncp_server *server, __u8 volnum, __le32 dirent, __u32 mode, __u32 rdev) { int result = 0; ncp_init_request(server); if (server->name_space[volnum] == NW_NS_NFS) { ncp_add_byte(server, 25); /* subfunction */ ncp_add_byte(server, server->name_space[volnum]); ncp_add_byt...
0
[ "CWE-119" ]
staging
4c41aa24baa4ed338241d05494f2c595c885af8f
152,250,148,512,379,960,000,000,000,000,000,000,000
24
staging: ncpfs: memory corruption in ncp_read_kernel() If the server is malicious then *bytes_read could be larger than the size of the "target" buffer. It would lead to memory corruption when we do the memcpy(). Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com> Signed-off-by: Dan Ca...
simple_cookie_read (void *cookie, void *buffer, size_t size) { assuan_fd_t sock = (assuan_fd_t)cookie; return read_server (sock, buffer, size); }
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
12,590,708,585,336,358,000,000,000,000,000,000,000
5
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
static int msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs __user *user_msrs, int (*do_msr)(struct kvm_vcpu *vcpu, unsigned index, u64 *data), int writeback) { struct kvm_msrs msrs; struct kvm_msr_entry *entries; int r, n; unsigned size; r = -EFAULT; if (copy_from_user(&msrs, user_msrs, sizeof msrs)) ...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
210,073,748,901,050,270,000,000,000,000,000,000,000
40
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock, struct msghdr *msg, size_t len) { struct sock_iocb *siocb = kiocb_to_siocb(kiocb); struct sock *sk = sock->sk; struct sock *other = NULL; struct sockaddr_un *sunaddr=msg->msg_name; int err,size; struct sk_buff *skb; int sent=0; s...
1
[ "CWE-399" ]
linux-2.6
5f23b734963ec7eaa3ebcd9050da0c9b7d143dd3
311,028,048,896,877,500,000,000,000,000,000,000,000
113
net: Fix soft lockups/OOM issues w/ unix garbage collector This is an implementation of David Miller's suggested fix in: https://bugzilla.redhat.com/show_bug.cgi?id=470201 It has been updated to use wait_event() instead of wait_event_interruptible(). Paraphrasing the description from the above report, it makes sen...
lzss_current_pointer(struct lzss *lzss) { return lzss_pointer_for_position(lzss, lzss->position); }
0
[ "CWE-119", "CWE-787" ]
libarchive
05caadc7eedbef471ac9610809ba683f0c698700
200,056,930,924,939,370,000,000,000,000,000,000,000
4
Issue 719: Fix for TALOS-CAN-154 A RAR file with an invalid zero dictionary size was not being rejected, leading to a zero-sized allocation for the dictionary storage which was then overwritten during the dictionary initialization. Thanks to the Open Source and Threat Intelligence project at Cisco for reporting this...
xfs_fileattr_set( struct user_namespace *mnt_userns, struct dentry *dentry, struct fileattr *fa) { struct xfs_inode *ip = XFS_I(d_inode(dentry)); struct xfs_mount *mp = ip->i_mount; struct xfs_trans *tp; struct xfs_dquot *pdqp = NULL; struct xfs_dquot *olddquot = NULL; int error; trace_xfs_ioctl_setattr(...
0
[ "CWE-125" ]
linux
983d8e60f50806f90534cc5373d0ce867e5aaf79
222,419,495,023,132,700,000,000,000,000,000,000,000
121
xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate The old ALLOCSP/FREESP ioctls in XFS can be used to preallocate space at the end of files, just like fallocate and RESVSP. Make the behavior consistent with the other ioctls. Reported-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Darric...
static int burl_normalize_basic_required (buffer *b, buffer *t) { const unsigned char * const s = (unsigned char *)b->ptr; const int used = (int)buffer_string_length(b); unsigned int n1, n2, x; int qs = -1; for (int i = 0; i < used; ++i) { if (!encoded_chars_http_uri_reqd[s[i]]) { ...
0
[ "CWE-190" ]
lighttpd1.4
32120d5b8b3203fc21ccb9eafb0eaf824bb59354
221,721,927,447,831,300,000,000,000,000,000,000,000
31
[core] fix abort in http-parseopts (fixes #2945) fix abort in server.http-parseopts with url-path-2f-decode enabled (thx stze) x-ref: "Security - SIGABRT during GET request handling with url-path-2f-decode enabled" https://redmine.lighttpd.net/issues/2945
static PixelList *AcquirePixelList(const size_t width,const size_t height) { PixelList *pixel_list; register ssize_t i; pixel_list=(PixelList *) AcquireMagickMemory(sizeof(*pixel_list)); if (pixel_list == (PixelList *) NULL) return(pixel_list); (void) memset((void *) pixel_list,0,sizeof(*pixel_l...
0
[ "CWE-119", "CWE-787" ]
ImageMagick6
91e58d967a92250439ede038ccfb0913a81e59fe
209,182,907,412,017,100,000,000,000,000,000,000,000
25
https://github.com/ImageMagick/ImageMagick/issues/1615
ReturnCode_t DataWriterImpl::wait_for_acknowledgments( const Duration_t& max_wait) { if (writer_ == nullptr) { return ReturnCode_t::RETCODE_NOT_ENABLED; } if (writer_->wait_for_all_acked(max_wait)) { return ReturnCode_t::RETCODE_OK; } return ReturnCode_t::RETCODE_ERR...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
319,376,672,320,695,870,000,000,000,000,000,000,000
14
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, int is_data, php_uint32 compression, char **error TSRMLS_DC) /* {{{ */ { char buf[512], *actual_alias = NULL, *p; phar_entry_info entry = {0}; size_t pos = 0, read, totalsize; tar_header *hdr; ...
1
[ "CWE-824" ]
php-src
9649ca1630433473a307d015ba1a79a4a7a779f5
85,355,024,285,873,480,000,000,000,000,000,000,000
483
Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()
relpTcpSetPrivKey(relpTcp_t *pThis, char *cert) { ENTER_RELPFUNC; RELPOBJ_assert(pThis, Tcp); free(pThis->privKeyFile); if(cert == NULL) { pThis->privKeyFile = NULL; } else { # ifdef HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION if((pThis->privKeyFile = strdup(cert)) == NULL) ABORT_FINALIZE(RELP_RET_OUT_...
0
[ "CWE-787" ]
librelp
2cfe657672636aa5d7d2a14cfcb0a6ab9d1f00cf
311,535,063,094,451,930,000,000,000,000,000,000,000
19
unify error message generation
void cprt_box_del(GF_Box *s) { GF_CopyrightBox *ptr = (GF_CopyrightBox *) s; if (ptr == NULL) return; if (ptr->notice) gf_free(ptr->notice); gf_free(ptr); }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
308,964,100,075,870,150,000,000,000,000,000,000,000
8
fixed #1587
class HuffmanCoder *Scan::DCHuffmanCoderOf(UBYTE idx) const { class HuffmanTemplate *t; ScanType sc = m_pFrame->ScanTypeOf(); assert(idx < 4); t = m_pHuffman->DCTemplateOf(m_ucDCTable[idx],sc,m_pFrame->PrecisionOf(), m_pFrame->HiddenPrecisionOf(),m_ucScanIndex); if (t == NULL)...
0
[ "CWE-476" ]
libjpeg
ea6315164b1649ff932a396b7600eac4bffcfaba
131,726,001,638,129,640,000,000,000,000,000,000,000
16
Added a check whether all components in a scan are actually present.
void handler::print_error(int error, myf errflag) { bool fatal_error= 0; DBUG_ENTER("handler::print_error"); DBUG_PRINT("enter",("error: %d",error)); if (ha_thd()->transaction_rollback_request) { /* Ensure this becomes a true error */ errflag&= ~(ME_WARNING | ME_NOTE); } int textno= -1; // impos...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
140,441,064,521,693,300,000,000,000,000,000,000,000
305
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
get_yank_register(int regname, int writing) { int i; int ret = FALSE; y_append = FALSE; if ((regname == 0 || regname == '"') && !writing && y_previous != NULL) { y_current = y_previous; return ret; } i = regname; if (VIM_ISDIGIT(i)) i -= '0'; else if (ASCII_ISLOWER(i)) i...
0
[ "CWE-122", "CWE-787" ]
vim
d25f003342aca9889067f2e839963dfeccf1fe05
25,707,645,302,127,360,000,000,000,000,000,000,000
48
patch 9.0.0011: reading beyond the end of the line with put command Problem: Reading beyond the end of the line with put command. Solution: Adjust the end mark position.
static bool set_up_field_array(TABLE *table, bool is_sub_part) { Field **ptr, *field, **field_array; uint num_fields= 0; uint size_field_array; uint i= 0; uint inx; partition_info *part_info= table->part_info; int result= FALSE; DBUG_ENTER("set_up_field_array"); ptr= tab...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
134,285,091,005,039,730,000,000,000,000,000,000,000
108
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
\param user_path Specified path, or \c 0 to get the path currently used. \param reinit_path Force path to be recalculated (may take some time). \return Path containing the \c wget binary. **/ inline const char *wget_path(const char *const user_path, const bool reinit_path) { static CI...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
142,033,814,528,181,160,000,000,000,000,000,000,000
29
.
list_headers (void *item, void *data) { struct add_header *hp = item; char *name = data; if (!name || strcmp (name, hp->name) == 0) { mu_printf ("%s: %s\n", hp->name, hp->value); } return 0; }
0
[]
mailutils
4befcfd015256c568121653038accbd84820198f
132,746,133,703,906,440,000,000,000,000,000,000,000
11
mail: disable compose escapes in non-interctive mode. * NEWS: Document changes. * doc/texinfo/programs/mail.texi: Document changes. * mail/send.c (mail_compose_send): Recognize escapes only in interactive mode.
void transport_attach(rdpTransport* transport, int sockfd) { transport->TcpIn->sockfd = sockfd; transport->SplitInputOutput = FALSE; transport->TcpOut = transport->TcpIn; }
0
[ "CWE-476", "CWE-125" ]
FreeRDP
0773bb9303d24473fe1185d85a424dfe159aff53
133,548,482,491,439,860,000,000,000,000,000,000,000
7
nla: invalidate sec handle after creation If sec pointer isn't invalidated after creation it is not possible to check if the upper and lower pointers are valid. This fixes a segfault in the server part if the client disconnects before the authentication was finished.
/* {{{ date_period_write_property */ static void date_period_write_property(zval *object, zval *member, zval *value, const zend_literal *key TSRMLS_DC) {
0
[]
php-src
bb057498f7457e8b2eba98332a3bad434de4cf12
336,369,259,774,129,600,000,000,000,000,000,000,000
4
Fix #70277: new DateTimeZone($foo) is ignoring text after null byte The DateTimeZone constructors are not binary safe. They're parsing the timezone as string, but discard the length when calling timezone_initialize(). This patch adds a tz_len parameter and a respective check to timezone_initialize().
void SSL_CTX::AddCA(x509* ca) { caList_.push_back(ca); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
62,020,614,460,868,660,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
void ecryptfs_destroy_mount_crypt_stat( struct ecryptfs_mount_crypt_stat *mount_crypt_stat) { struct ecryptfs_global_auth_tok *auth_tok, *auth_tok_tmp; if (!(mount_crypt_stat->flags & ECRYPTFS_MOUNT_CRYPT_STAT_INITIALIZED)) return; mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex); list_for_each_entry_s...
0
[ "CWE-703", "CWE-189" ]
linux
942080643bce061c3dd9d5718d3b745dcb39a8bc
289,278,878,954,108,250,000,000,000,000,000,000,000
20
eCryptfs: Remove buggy and unnecessary write in file name decode routine Dmitry Chernenkov used KASAN to discover that eCryptfs writes past the end of the allocated buffer during encrypted filename decoding. This fix corrects the issue by getting rid of the unnecessary 0 write when the current bit offset is 2. Signed...
static int ttwu_remote(struct task_struct *p, int wake_flags) { struct rq *rq; int ret = 0; rq = __task_rq_lock(p); if (p->on_rq) { /* check_preempt_curr() may use rq clock */ update_rq_clock(rq); ttwu_do_wakeup(rq, p, wake_flags); ret = 1; } __task_rq_unlock(rq); return ret; }
0
[ "CWE-200" ]
linux
4efbc454ba68def5ef285b26ebfcfdb605b52755
247,348,020,510,163,100,000,000,000,000,000,000,000
16
sched: Fix information leak in sys_sched_getattr() We're copying the on-stack structure to userspace, but forgot to give the right number of bytes to copy. This allows the calling process to obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent kernel memory). This fix copies only as much as we actually ...
int __fastcall Execute() { DebugAssert(StoredSessions); TProgramParams * Params = TProgramParams::Instance(); DebugAssert(Params); // do not flash message boxes on startup SetOnForeground(true); // let installer know, that some instance of application is running CreateMutex(NULL, False, AppNam...
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
184,616,045,281,605,960,000,000,000,000,000,000,000
541
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp) { struct fs_struct *fs = current->fs; if (!(unshare_flags & CLONE_FS) || !fs) return 0; /* don't need lock here; in the worst case we'll do useless copy */ if (fs->users == 1) return 0; *new_fsp = copy_fs_struct(fs); if (!*new_f...
0
[ "CWE-20" ]
linux
f106eee10038c2ee5b6056aaf3f6d5229be6dcdd
121,888,276,421,048,060,000,000,000,000,000,000,000
17
pids: fix fork_idle() to setup ->pids correctly copy_process(pid => &init_struct_pid) doesn't do attach_pid/etc. It shouldn't, but this means that the idle threads run with the wrong pids copied from the caller's task_struct. In x86 case the caller is either kernel_init() thread or keventd. In particular, this means...
static long keyring_read(const struct key *keyring, char __user *buffer, size_t buflen) { struct keyring_list *klist; struct key *key; size_t qty, tmp; int loop, ret; ret = 0; klist = keyring->payload.subscriptions; if (klist) { /* calculate how much data we could return */ qty = klist->nkeys * sizeof(...
0
[ "CWE-362" ]
linux-2.6
cea7daa3589d6b550546a8c8963599f7c1a3ae5c
240,824,219,059,102,500,000,000,000,000,000,000,000
49
KEYS: find_keyring_by_name() can gain access to a freed keyring find_keyring_by_name() can gain access to a keyring that has had its reference count reduced to zero, and is thus ready to be freed. This then allows the dead keyring to be brought back into use whilst it is being destroyed. The following timeline illus...
static int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uaddr, int __user *ulen) { int err; int len; err = get_user(len, ulen); if (err) return err; if (len > klen) len = klen; if (len < 0 || len > sizeof(struct sockaddr_storage)) return -EINVAL; if (len) { if (audit_sockaddr...
0
[]
linux-2.6
644595f89620ba8446cc555be336d24a34464950
36,869,192,503,190,854,000,000,000,000,000,000,000
25
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 int digi_startup_device(struct usb_serial *serial) { int i, ret = 0; struct digi_serial *serial_priv = usb_get_serial_data(serial); struct usb_serial_port *port; /* be sure this happens exactly once */ spin_lock(&serial_priv->ds_serial_lock); if (serial_priv->ds_device_started) { spin_unlock(&serial_pri...
0
[ "CWE-703" ]
linux
5a07975ad0a36708c6b0a5b9fea1ff811d0b0c1f
38,412,782,738,443,973,000,000,000,000,000,000,000
29
USB: digi_acceleport: do sanity checking for the number of ports The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum <ONeukum@suse.com> [johan: fix OOB endpoint check and add error messages ] Cc: stab...
int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size) { if (unlikely(IS_PRIVATE(inode))) return 0; return security_ops->inode_listsecurity(inode, buffer, buffer_size); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
248,799,844,515,478,550,000,000,000,000,000,000,000
6
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
void __fastcall RecordWrapperVersions(UnicodeString ConsoleVersion, UnicodeString DotNetVersion) { TUpdatesConfiguration Updates = WinConfiguration->Updates; if (!DotNetVersion.IsEmpty()) { Updates.DotNetVersion = DotNetVersion; } if (!ConsoleVersion.IsEmpty()) { Updates.ConsoleVersion = Co...
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
332,213,294,767,921,950,000,000,000,000,000,000,000
46
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
read_children(struct archive_read *a, struct file_info *parent) { struct iso9660 *iso9660; const unsigned char *b, *p; struct file_info *multi; size_t step, skip_size; iso9660 = (struct iso9660 *)(a->format->data); /* flush any remaining bytes from the last round to ensure * we're positioned */ if (iso9660->e...
1
[ "CWE-125" ]
libarchive
f9569c086ff29259c73790db9cbf39fe8fb9d862
12,266,832,105,269,800,000,000,000,000,000,000,000
121
iso9660: validate directory record length
static int php_iconv_stream_filter_append_bucket( php_iconv_stream_filter *self, php_stream *stream, php_stream_filter *filter, php_stream_bucket_brigade *buckets_out, const char *ps, size_t buf_len, size_t *consumed, int persistent TSRMLS_DC) { php_stream_bucket *new_bucket; char *out_buf = NULL; size_t o...
0
[ "CWE-835" ]
php-src
06d309fd7a917575d65c7a6f4f57b0e6bb0f9711
307,370,066,322,996,780,000,000,000,000,000,000,000
208
Fix bug #76249 - fail on invalid sequences
void evp(int nid, unsigned char *digest, int len, unsigned char *hash, unsigned int *hlen) { const EVP_MD *evp_md = nid_to_evpmd(nid); EVP_MD_CTX md; EVP_DigestInit(&md, evp_md); EVP_DigestUpdate(&md, digest, len); EVP_DigestFinal(&md, hash, hlen); }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
51,785,944,568,513,510,000,000,000,000,000,000,000
9
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...
void node_set_perf_attrs(unsigned int nid, struct node_hmem_attrs *hmem_attrs, unsigned access) { struct node_access_nodes *c; struct node *node; int i; if (WARN_ON_ONCE(!node_online(nid))) return; node = node_devices[nid]; c = node_init_node_access(node, access); if (!c) return; c->hmem_attrs = *hme...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
111,538,467,794,564,790,000,000,000,000,000,000,000
25
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
archive_strcat(struct archive_string *as, const void *p) { /* strcat is just strncat without an effective limit. * Assert that we'll never get called with a source * string over 16MB. * TODO: Review all uses of strcat in the source * and try to replace them with strncat(). */ return archive_strncat(as, p, ...
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
277,606,245,649,445,340,000,000,000,000,000,000,000
10
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
snmp_set_var_value(netsnmp_variable_list * vars, const void * value, size_t len) { int largeval = 1; /* * xxx-rks: why the unconditional free? why not use existing * memory, if len < vars->val_len ? */ if (vars->val.string && vars->val.string != vars->buf) { ...
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
159,133,552,913,117,910,000,000,000,000,000,000,000
211
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
int tls12_get_req_sig_algs(SSL *s, unsigned char *p) { size_t slen = sizeof(tls12_sigalgs); #ifdef OPENSSL_FIPS /* If FIPS mode don't include MD5 which is last */ if (FIPS_mode()) slen -= 2; #endif if (p) memcpy(p, tls12_sigalgs, slen); return (int)slen; }
0
[]
openssl
4817504d069b4c5082161b02a22116ad75f822b1
79,290,481,457,010,220,000,000,000,000,000,000,000
12
PR: 2658 Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Support for TLS/DTLS heartbeats.
*/ static bool bfq_bfqq_budget_timeout(struct bfq_queue *bfqq) { return time_is_before_eq_jiffies(bfqq->budget_timeout);
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
324,267,847,336,971,430,000,000,000,000,000,000,000
4
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
ofpacts_put_openflow_actions(const struct ofpact ofpacts[], size_t ofpacts_len, struct ofpbuf *openflow, enum ofp_version ofp_version) { const struct ofpact *a; size_t start_size = openflow->size; OFPACT_FOR_EACH (a, ofpacts, ofpacts_len) { ...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
160,890,755,089,581,530,000,000,000,000,000,000,000
12
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static int asepcos_set_security_attributes(sc_card_t *card, sc_file_t *file) { size_t i; const amode_entry_t *table; u8 buf[64], *p; int r = SC_SUCCESS; /* first check whether the security attributes in encoded form * are already set. If present use these */ if (file->sec_attr != NULL && file->sec_attr_...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
290,802,857,015,994,600,000,000,000,000,000,000,000
59
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
bit_write_BLd (Bit_Chain *dat, BITCODE_BLd value) { const BITCODE_BL l = value; if (l > 255) { bit_write_BB (dat, 0); bit_write_RL (dat, (BITCODE_RL)value); } else if (l == 0) bit_write_BB (dat, 2); else { bit_write_BB (dat, 1); bit_write_RC (dat, value); } }
0
[ "CWE-703", "CWE-125" ]
libredwg
95cc9300430d35feb05b06a9badf678419463dbe
58,137,837,671,416,000,000,000,000,000,000,000,000
16
encode: protect from stack under-flow From GH #178 fuzzing
static void vhost_scsi_release_cmd(struct se_cmd *se_cmd) { struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, struct vhost_scsi_cmd, tvc_se_cmd); struct se_session *se_sess = tv_cmd->tvc_nexus->tvn_se_sess; int i; if (tv_cmd->tvc_sgl_count) { for (i = 0; i < tv_cmd->tvc_sgl_count; i++) put_page(sg_page...
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
324,892,940,707,987,500,000,000,000,000,000,000,000
19
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
void j2k_dump_image_header(opj_image_t* img_header, OPJ_BOOL dev_dump_flag, FILE* out_stream) { char tab[2]; if (dev_dump_flag) { fprintf(stdout, "[DEV] Dump an image_header struct {\n"); tab[0] = '\0'; } else { fprintf(out_stream, "Image info {\n"); ...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
11,902,064,534,528,172,000,000,000,000,000,000,000
31
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
acl_fetch_http_first_req(struct proxy *px, struct session *s, void *l7, unsigned int opt, const struct arg *args, struct sample *smp) { if (!s) return 0; smp->type = SMP_T_BOOL; smp->data.uint = !(s->txn.flags & TX_NOT_FIRST); return 1; }
0
[]
haproxy
aae75e3279c6c9bd136413a72dafdcd4986bb89a
62,608,316,440,130,220,000,000,000,000,000,000,000
10
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
get_ancestral_uid (guint pid) { FILE *fp; char buf [80]; int ppid = 0; int uid = 0; gboolean got_ppid = 0; gboolean got_uid = 0; sprintf (buf, "/proc/%d/status", pid); fp = fopen (buf, "r"); if (!fp) return 0; while ((!got_ppid || !got_uid) && fgets (buf, sizeof (buf), fp)) { if (sscanf (...
0
[]
at-spi2-atk
e4f3eee2e137cd34cd427875365f458c65458164
169,382,305,865,807,380,000,000,000,000,000,000,000
30
Use XDG_RUNTIME_DIR to hold sockets, and do not make a world-writable dir If we use XDG_RUNTIME_DIR, then the directory should be owned by the appropriate user, so it should not need to be world-writable. Hopefully this won't break accessibility for administrative apps on some distro. https://bugzilla.gnome.org/show_...
parse_iso_time(const char *cp, time_t *t) { struct tm st_tm; unsigned int year=0, month=0, day=0, hour=0, minute=0, second=0; if (tor_sscanf(cp, "%u-%2u-%2u %2u:%2u:%2u", &year, &month, &day, &hour, &minute, &second) < 6) { char *esc = esc_for_log(cp); log_warn(LD_GENERAL, "ISO time %s was...
1
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
9,242,819,946,427,859,000,000,000,000,000,000,000
34
Fix assertion failure in tor_timegm. Fixes bug 6811.
static inline loff_t *io_kiocb_ppos(struct kiocb *kiocb) { return (kiocb->ki_filp->f_mode & FMODE_STREAM) ? NULL : &kiocb->ki_pos; }
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
300,520,060,159,203,170,000,000,000,000,000,000,000
4
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
bool journal_importer_eof(const JournalImporter *imp) { return imp->state == IMPORTER_STATE_EOF; }
0
[ "CWE-770" ]
systemd
ef4d6abe7c7fab6cbff975b32e76b09feee56074
17,010,907,758,606,830,000,000,000,000,000,000,000
3
journal-remote: set a limit on the number of fields in a message Existing use of E2BIG is replaced with ENOBUFS (entry too long), and E2BIG is reused for the new error condition (too many fields). This matches the change done for systemd-journald, hence forming the second part of the fix for CVE-2018-16865 (https://b...
static int jpeg_embed(Image *ifile, Image *ofile, Image *iptc) { unsigned int marker; unsigned int done = 0; unsigned int len; int inx; if (jpeg_transfer_1(ifile, ofile) != 0xFF) return 0; if (jpeg_transfer_1(ifile, ofile) != M_SOI) return 0; while (done == MagickFalse) { marker=(unsigned ...
0
[ "CWE-772" ]
ImageMagick
46382526a3f09cebf9f2af680fc55b2a668fcbef
202,282,744,626,897,320,000,000,000,000,000,000,000
71
https://github.com/ImageMagick/ImageMagick/issues/643
SCTP_STATIC int sctp_listen_start(struct sock *sk, int backlog) { struct sctp_sock *sp = sctp_sk(sk); struct sctp_endpoint *ep = sp->ep; struct crypto_hash *tfm = NULL; char alg[32]; /* Allocate HMAC for generating cookie. */ if (!sp->hmac && sp->sctp_hmac_alg) { sprintf(alg, "hmac(%s)", sp->sctp_hmac_alg); ...
0
[ "CWE-20" ]
linux
726bc6b092da4c093eb74d13c07184b18c1af0f1
16,037,306,528,925,180,000,000,000,000,000,000,000
45
net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS Building sctp may fail with: In function ‘copy_from_user’, inlined from ‘sctp_getsockopt_assoc_stats’ at net/sctp/socket.c:5656:20: arch/x86/include/asm/uaccess_32.h:211:26: error: call to ‘copy_from_user_overflow’ declared with attribute error: c...
template<typename t> CImg<T>& fill(const CImg<t>& values, const bool repeat_values=true) { if (is_empty() || !values) return *this; T *ptrd = _data, *ptre = ptrd + size(); for (t *ptrs = values._data, *ptrs_end = ptrs + values.size(); ptrs<ptrs_end && ptrd<ptre; ++ptrs) *(ptrd++) = (T)...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
219,523,588,900,322,200,000,000,000,000,000,000,000
8
Fix other issues in 'CImg<T>::load_bmp()'.
static void map_context_fields(const struct iovec *iovec, const char* context[]) { static const char * const context_field_names[] = { [CONTEXT_PID] = "COREDUMP_PID=", [CONTEXT_UID] = "COREDUMP_UID=", [CONTEXT_GID] = "COREDUMP_GID=", [CONTEXT_SIGN...
0
[ "CWE-770" ]
systemd
084eeb865ca63887098e0945fb4e93c852b91b0f
147,011,914,065,841,170,000,000,000,000,000,000,000
35
journald: do not store the iovec entry for process commandline on stack This fixes a crash where we would read the commandline, whose length is under control of the sending program, and then crash when trying to create a stack allocation for it. CVE-2018-16864 https://bugzilla.redhat.com/show_bug.cgi?id=1653855 The ...
int user_update(struct key *key, struct key_preparsed_payload *prep) { struct user_key_payload *zap = NULL; int ret; /* check the quota and attach the new data */ ret = key_payload_reserve(key, prep->datalen); if (ret < 0) return ret; /* attach the new data, displacing the old */ key->expiry = prep->expiry; ...
1
[ "CWE-20" ]
linux
363b02dab09b3226f3bd1420dad9c72b79a42a76
62,167,958,035,216,620,000,000,000,000,000,000,000
21
KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unione...
deny_refuse_all(struct comm_point* c, enum acl_access acl, struct worker* worker, struct comm_reply* repinfo, struct acl_addr* acladdr, int ede) { return deny_refuse(c, acl, acl_deny, acl_refuse, worker, repinfo, acladdr, ede); }
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
122,132,828,195,781,520,000,000,000,000,000,000,000
7
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
int set_user_sigmask(const sigset_t __user *umask, size_t sigsetsize) { sigset_t kmask; if (!umask) return 0; if (sigsetsize != sizeof(sigset_t)) return -EINVAL; if (copy_from_user(&kmask, umask, sizeof(sigset_t))) return -EFAULT; set_restore_sigmask(); current->saved_sigmask = current->blocked; set_curr...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
104,710,455,301,398,670,000,000,000,000,000,000,000
17
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
rxq_cq_to_ol_flags(volatile struct mlx5_cqe *cqe) { uint32_t ol_flags = 0; uint16_t flags = rte_be_to_cpu_16(cqe->hdr_type_etc); ol_flags = TRANSPOSE(flags, MLX5_CQE_RX_L3_HDR_VALID, PKT_RX_IP_CKSUM_GOOD) | TRANSPOSE(flags, MLX5_CQE_RX_L4_HDR_VALID, PKT_RX_L4_CKSUM_GOOD); return ol_flags; }
0
[]
dpdk-stable
ef311075d21b4f68c8ccfc46a00cda7c2a0bf4cc
116,778,797,268,739,220,000,000,000,000,000,000,000
14
net/mlx5: fix Rx queue recovery mechanism The local variables are getting inconsistent in data receiving routines after queue error recovery. Receive queue consumer index is getting wrong, need to reset one to the size of the queue (as RQ was fully replenished in recovery procedure). In MPRQ case, also the local cons...
SDB_API int sdb_disk_insert(Sdb* s, const char *key, const char *val) { struct cdb_make *c = &s->m; if (!key || !val) { return 0; } //if (!*val) return 0; //undefine variable if no value return cdb_make_add (c, key, strlen (key), val, strlen (val)); }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
310,661,981,557,654,720,000,000,000,000,000,000,000
8
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
const T& at(const int offset) const { if (is_empty()) throw CImgInstanceException(_cimg_instance "at(): Empty instance.", cimg_instance); return _at(offset); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
197,727,465,019,236,100,000,000,000,000,000,000,000
7
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int pcan_usb_fd_decode_buf(struct peak_usb_device *dev, struct urb *urb) { struct pcan_usb_fd_if *usb_if = pcan_usb_fd_dev_if(dev); struct net_device *netdev = dev->netdev; struct pucan_msg *rx_msg; u8 *msg_ptr, *msg_end; int err = 0; /* loop reading all the records from the incoming message */ msg_ptr =...
0
[ "CWE-908" ]
linux
30a8beeb3042f49d0537b7050fd21b490166a3d9
49,259,487,961,067,800,000,000,000,000,000,000,000
76
can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com> Reported-by: syzbot+513e4d0985298538bf9b@syzkaller.appspotmail.com Fixes: 0a25e1f4f...
xmlNewNsPropEatName(xmlNodePtr node, xmlNsPtr ns, xmlChar *name, const xmlChar *value) { if (name == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNewNsPropEatName : name == NULL\n"); #endif return(NULL); } return xmlNewPropInternal(node, ns, name, value, 1); ...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
78,682,999,453,853,240,000,000,000,000,000,000,000
13
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
struct gendisk *get_gendisk(dev_t devt, int *partno) { struct gendisk *disk = NULL; if (MAJOR(devt) != BLOCK_EXT_MAJOR) { struct kobject *kobj; kobj = kobj_lookup(bdev_map, devt, partno); if (kobj) disk = dev_to_disk(kobj_to_dev(kobj)); } else { struct hd_struct *part; spin_lock_bh(&ext_devt_lock); ...
0
[ "CWE-416" ]
linux-stable
77da160530dd1dc94f6ae15a981f24e5f0021e84
85,093,940,374,781,940,000,000,000,000,000,000,000
24
block: fix use-after-free in seq file I got a KASAN report of use-after-free: ================================================================== BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508 Read of size 8 by task trinity-c1/315 ======================================...
int m_copy(struct mbuf *n, struct mbuf *m, int off, int len) { if (len > M_FREEROOM(n)) return -1; memcpy((n->m_data + n->m_len), (m->m_data + off), len); n->m_len += len; return 0; }
0
[]
libslirp
93e645e72a056ec0b2c16e0299fc5c6b94e4ca17
190,503,668,056,517,500,000,000,000,000,000,000,000
9
Add mtod_check() Recent security issues demonstrate the lack of safety care when casting a mbuf to a particular structure type. At least, it should check that the buffer is large enough. The following patches will make use of this function. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
compile_length_option_node(EnclosureNode* node, regex_t* reg) { int tlen; OnigOptionType prev = reg->options; reg->options = node->o.options; tlen = compile_length_tree(NODE_ENCLOSURE_BODY(node), reg); reg->options = prev; if (tlen < 0) return tlen; if (IS_DYNAMIC_OPTION(prev ^ node->option)) { ret...
0
[ "CWE-476" ]
oniguruma
410f5916429e7d2920e1d4867388514f605413b8
20,271,422,682,122,957,000,000,000,000,000,000,000
18
fix #87: Read unknown address in onig_error_code_to_str()
do_accredit (GdmSessionWorker *worker) { GError *error; gboolean res; /* get kerberos tickets, setup group lists, etc */ error = NULL; res = gdm_session_worker_accredit_user (worker, &error); if (! res) { send_dbus_string_method (worker->priv->...
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
194,791,178,597,570,800,000,000,000,000,000,000,000
20
Store the face and dmrc files in a cache. Refer to bug #565151.
SYSCALL_DEFINE0(pause) { while (!signal_pending(current)) { __set_current_state(TASK_INTERRUPTIBLE); schedule(); } return -ERESTARTNOHAND; }
0
[ "CWE-119", "CWE-787" ]
linux
4ea77014af0d6205b05503d1c7aac6eace11d473
70,715,527,806,795,010,000,000,000,000,000,000,000
8
kernel/signal.c: avoid undefined behaviour in kill_something_info When running kill(72057458746458112, 0) in userspace I hit the following issue. UBSAN: Undefined behaviour in kernel/signal.c:1462:11 negation of -2147483648 cannot be represented in type 'int': CPU: 226 PID: 9849 Comm: test Tainted: G B ...
static int visor_calc_num_ports(struct usb_serial *serial) { int num_ports = (int)(long)(usb_get_serial_data(serial)); if (num_ports) usb_set_serial_data(serial, NULL); return num_ports; }
0
[ "CWE-703" ]
linux
cb3232138e37129e88240a98a1d2aba2187ff57c
29,269,182,604,605,390,000,000,000,000,000,000,000
9
USB: serial: visor: fix crash on detecting device without write_urbs The visor driver crashes in clie_5_attach() when a specially crafted USB device without bulk-out endpoint is detected. This fix adds a check that the device has proper configuration expected by the driver. Reported-by: Ralf Spenneberg <ralf@spennebe...
static int catc_tx_run(struct catc *catc) { int status; if (catc->is_f5u011) catc->tx_ptr = (catc->tx_ptr + 63) & ~63; catc->tx_urb->transfer_buffer_length = catc->tx_ptr; catc->tx_urb->transfer_buffer = catc->tx_buf[catc->tx_idx]; catc->tx_urb->dev = catc->usbdev; if ((status = usb_submit_urb(catc->tx_urb, ...
0
[ "CWE-20", "CWE-119" ]
linux
2d6a0e9de03ee658a9adc3bfb2f0ca55dff1e478
23,488,231,704,766,290,000,000,000,000,000,000,000
21
catc: Use heap buffer for memory size test 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") Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
static ssize_t runtime_enabled_show(struct device *dev, struct device_attribute *attr, char *buf) { if (dev->power.disable_depth && (dev->power.runtime_auto == false)) return sysfs_emit(buf, "disabled & forbidden\n"); if (dev->power.disable_depth) return sysfs_emit(buf, "disabled\n"); if (dev->power.runt...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
45,750,391,996,101,270,000,000,000,000,000,000,000
11
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static struct ippp_ccp_reset *isdn_ppp_ccp_reset_alloc(struct ippp_struct *is) { struct ippp_ccp_reset *r; r = kzalloc(sizeof(struct ippp_ccp_reset), GFP_KERNEL); if (!r) { printk(KERN_ERR "ippp_ccp: failed to allocate reset data" " structure - no mem\n"); return NULL; } printk(KERN_DEBUG "ippp_ccp: a...
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
259,866,042,277,063,200,000,000,000,000,000,000,000
13
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
static void pxa2xx_ssp_write(void *opaque, hwaddr addr, uint64_t value64, unsigned size) { PXA2xxSSPState *s = (PXA2xxSSPState *) opaque; uint32_t value = value64; switch (addr) { case SSCR0: s->sscr[0] = value & 0xc7ffffff; s->enable = value & SSCR0_SSE; ...
0
[ "CWE-119" ]
qemu
caa881abe0e01f9931125a0977ec33c5343e4aa7
269,925,070,441,672,250,000,000,000,000,000,000,000
90
pxa2xx: avoid buffer overrun on incoming migration CVE-2013-4533 s->rx_level is read from the wire and used to determine how many bytes to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the length of s->rx_fifo[] the buffer can be overrun with arbitrary data from the wire. Fix this by validating rx_leve...
static NAN_MODULE_INIT(Init) { Local<FunctionTemplate> tpl = Nan::New<FunctionTemplate>(New); tpl->SetClassName(Nan::New("AESGCMDecipher").ToLocalChecked()); tpl->InstanceTemplate()->SetInternalFieldCount(1); SetPrototypeMethod(tpl, "decrypt", Decrypt); SetPrototypeMethod(tpl, "free", Free); ...
0
[ "CWE-78" ]
ssh2
f763271f41320e71d5cbee02ea5bc6a2ded3ca21
324,906,210,076,168,530,000,000,000,000,000,000,000
14
examples,lib,test: switch to code rewrite For more information see: https://github.com/mscdex/ssh2/issues/935
R_API bool r_bin_file_set_cur_by_id(RBin *bin, ut32 bin_id) { RBinFile *bf = r_bin_file_find_by_id (bin, bin_id); return bf? r_bin_file_set_cur_binfile (bin, bf): false; }
0
[ "CWE-125" ]
radare2
193f4fe01d7f626e2ea937450f2e0c4604420e9d
88,873,692,662,238,320,000,000,000,000,000,000,000
4
Fix integer overflow in string search causing oobread ##crash * Reported by @greatergoodest via huntrdev * BountyID: 8a3dc5cb-08b3-4807-82b2-77f08c137a04 * Reproducer bfileovf
template<typename t> CImg<_cimg_Tt> operator%(const CImg<t>& img) const { return CImg<_cimg_Tt>(*this,false)%=img;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
261,063,311,522,818,630,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
mono_gc_get_mach_exception_thread (void) { return mach_exception_thread; }
0
[ "CWE-399", "CWE-264" ]
mono
8eb1189099e02372fd45ca1c67230eccf1edddc0
161,556,699,948,128,820,000,000,000,000,000,000,000
4
Implement a reference queue API. * gc.c: A reference queue allows one to queue callbcks for when objects are collected. It allows for safe cleanup of objects that can only be done when it is effectively collected. The major difference with regular finalization is that the collector makes sure the object was col...
TEST(GtOp, MatchesArrayValue) { BSONObj operand = BSON("$gt" << 5); GTMatchExpression gt("a", operand["$gt"]); ASSERT(gt.matchesBSON(BSON("a" << BSON_ARRAY(3 << 5.5)), NULL)); ASSERT(!gt.matchesBSON(BSON("a" << BSON_ARRAY(2 << 4)), NULL)); }
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
335,260,195,901,195,030,000,000,000,000,000,000,000
6
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
void iterateReverse(HeaderMap::ConstIterateCb cb) const override { HeaderMapImpl::iterateReverse(cb); }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
235,763,534,131,928,800,000,000,000,000,000,000,000
3
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
void Monitor::do_health_to_clog_interval() { // outputting to clog may have been disabled in the conf // since we were scheduled. if (!cct->_conf->mon_health_to_clog || cct->_conf->mon_health_to_clog_interval <= 0) return; dout(10) << __func__ << dendl; // do we have a cached value for next_clog_u...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
309,032,508,547,981,950,000,000,000,000,000,000,000
16
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 ...
void LibRaw::identify() { // clang-format off static const ushort canon[][11] = { // raw_width, raw_height, left_margin, top_margin, width_decrement, // height_decrement, mask01, mask03, mask11, // mask13, CFA_filters. { 1944, 1416, 0, 0, 48, 0 }, // 00 "PowerShot Pro90 IS" { 2144, 1560, 4, 8, ...
0
[ "CWE-787" ]
LibRaw
4feaed4dea636cee4fee010f615881ccf76a096d
211,540,252,267,248,320,000,000,000,000,000,000,000
1,041
limit loops to MIN(colors,4) in dng fields parser
static int test_dec2bn(void) { BIGNUM *bn = NULL; int st = 0; if (!TEST_int_eq(parsedecBN(&bn, "0"), 1) || !TEST_BN_eq_word(bn, 0) || !TEST_BN_eq_zero(bn) || !TEST_BN_le_zero(bn) || !TEST_BN_ge_zero(bn) || !TEST_BN_even(bn)) goto err; ...
0
[]
openssl
336923c0c8d705cb8af5216b29a205662db0d590
229,537,579,129,512,660,000,000,000,000,000,000,000
68
Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets bn_sqr_comba8 does for instance compute a wrong result for the value: a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45 The correct result is: r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f 9...
size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLevel) { return ZSTD_compressBegin_usingDict(cctx, NULL, 0, compressionLevel); }
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
25,909,862,149,907,575,000,000,000,000,000,000,000
4
fixed T36302429
BlockDriverState *bdrv_find(const char *name) { BlockDriverState *bs; QTAILQ_FOREACH(bs, &bdrv_states, device_list) { if (!strcmp(name, bs->device_name)) { return bs; } } return NULL; }
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
237,287,060,355,528,700,000,000,000,000,000,000,000
11
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
void change_notify_reply(struct smb_request *req, NTSTATUS error_code, uint32_t max_param, struct notify_change_buf *notify_buf, void (*reply_fn)(struct smb_request *req, NTSTATUS error_code, uint8_t *buf, size_t len)) { DATA_BLOB blob = data_blob_null; if (!NT_STATUS_IS_OK(error_code))...
0
[ "CWE-266" ]
samba
5dd4c789c13035b805fdd2c3a9c38721657b05b3
140,806,925,045,790,130,000,000,000,000,000,000,000
38
s3: smbd: Ensure change notifies can't get set unless the directory handle is open for SEC_DIR_LIST. Remove knownfail entry. CVE-2020-14318 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14434 Signed-off-by: Jeremy Allison <jra@samba.org>
bool Item_func_in::count_sargable_conds(void *arg) { ((SELECT_LEX*) arg)->cond_count++; return 0; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
314,261,173,117,875,780,000,000,000,000,000,000,000
5
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static int macsec_add_dev(struct net_device *dev, sci_t sci, u8 icv_len) { struct macsec_dev *macsec = macsec_priv(dev); struct macsec_secy *secy = &macsec->secy; macsec->stats = netdev_alloc_pcpu_stats(struct pcpu_secy_stats); if (!macsec->stats) return -ENOMEM; secy->tx_sc.stats = netdev_alloc_pcpu_stats(str...
0
[ "CWE-119" ]
net
5294b83086cc1c35b4efeca03644cf9d12282e5b
310,013,085,655,567,730,000,000,000,000,000,000,000
36
macsec: dynamically allocate space for sglist We call skb_cow_data, which is good anyway to ensure we can actually modify the skb as such (another error from prior). Now that we have the number of fragments required, we can safely allocate exactly that amount of memory. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80...
void ext4_ext_truncate(handle_t *handle, struct inode *inode) { struct super_block *sb = inode->i_sb; ext4_lblk_t last_block; int err = 0; /* * TODO: optimization is possible here. * Probably we need not scan at all, * because page truncation is enough. */ /* we have to know where to truncate from in cra...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
47,071,035,640,737,350,000,000,000,000,000,000,000
33
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
static int parse_comp_filter(xmlNodePtr root, struct calquery_filter *filter, struct error_t *error) { int ret = 0; xmlNodePtr node; /* Parse elements of filter */ for (node = root; node; node = node->next) { if (node->type == XML_ELEMENT_NODE) { if (!xmlStrcmp(node->name, BAD_CAST "comp-...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
15,281,530,387,075,640,000,000,000,000,000,000,000
107
HTTP: don't overrun buffer when parsing strings with sscanf()
static int JPEGInitializeLibJPEG( TIFF * tif, int decompress ) { JPEGState* sp = JState(tif); if(sp->cinfo_initialized) { if( !decompress && sp->cinfo.comm.is_decompressor ) TIFFjpeg_destroy( sp ); else if( decompress && !sp->cinfo.comm.is_decompressor ) TIFFjpeg_des...
0
[ "CWE-369" ]
libtiff
47f2fb61a3a64667bce1a8398a8fcb1b348ff122
243,284,652,985,818,700,000,000,000,000,000,000,000
40
* libtiff/tif_jpeg.c: avoid integer division by zero in JPEGSetupEncode() when horizontal or vertical sampling is set to 0. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653
inline double rand(const double val_max=1) { cimg::mutex(4); const double res = cimg::rand(val_max,&cimg::rng()); cimg::mutex(4,0); return res; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
43,482,057,747,348,650,000,000,000,000,000,000,000
6
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
gs_main_run_file(gs_main_instance * minst, const char *file_name, int user_errors, int *pexit_code, ref * perror_object) { ref initial_file; int code = gs_main_run_file_open(minst, file_name, &initial_file); if (code < 0) return code; return gs_main_interpret(minst, &initial_file, user_errors, ...
0
[]
ghostpdl
6d444c273da5499a4cd72f21cb6d4c9a5256807d
134,592,786,572,561,130,000,000,000,000,000,000,000
10
Bug 697178: Add a file permissions callback For the rare occasions when the graphics library directly opens a file (currently for reading), this allows us to apply any restrictions on file access normally applied in the interpteter.
static void ehci_trace_itd(EHCIState *s, hwaddr addr, EHCIitd *itd) { trace_usb_ehci_itd(addr, itd->next, get_field(itd->bufptr[1], ITD_BUFPTR_MAXPKT), get_field(itd->bufptr[2], ITD_BUFPTR_MULT), get_field(itd->bufptr[0], ITD_BUFPTR_EP), ...
0
[]
qemu
791f97758e223de3290592d169f8e6339c281714
208,457,578,329,343,940,000,000,000,000,000,000,000
8
usb: ehci: fix memory leak in ehci_init_transfer In ehci_init_transfer function, if the 'cpage' is bigger than 4, it doesn't free the 'p->sgl' once allocated previously thus leading a memory leak issue. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog...
B44Compressor::compress (const char *inPtr, int inSize, IMATH_NAMESPACE::Box2i range, const char *&outPtr) { // // Compress a block of pixel data: First copy the input pixels // from the input buffer into _tmpBuffer, rearranging them such // that blocks of 4x4 pixels of a single channel can...
0
[ "CWE-190" ]
openexr
eec0dba242bedd2778c973ae4af112107b33d9c9
210,648,989,228,312,270,000,000,000,000,000,000,000
239
fix undefined behavior: ignore unused bits in B44 mode detection (#832) Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static inline int tcp_v6_iif(const struct sk_buff *skb) { bool l3_slave = skb_l3mdev_slave(TCP_SKB_CB(skb)->header.h6.flags); return l3_slave ? skb->skb_iif : TCP_SKB_CB(skb)->header.h6.iif; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
254,978,030,109,518,230,000,000,000,000,000,000,000
6
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
static MagickPixelPacket **AcquirePixelThreadSet(const Image *images) { const Image *next; MagickPixelPacket **pixels; register ssize_t i, j; size_t columns, number_threads; number_threads=(size_t) GetMagickResourceLimit(ThreadResource); pixels=(MagickPixelPacket **) AcquireQuant...
1
[ "CWE-119", "CWE-787" ]
ImageMagick6
91e58d967a92250439ede038ccfb0913a81e59fe
210,810,438,114,672,100,000,000,000,000,000,000,000
36
https://github.com/ImageMagick/ImageMagick/issues/1615
SES_Close(struct sess *sp, enum sess_close reason) { int i; assert(reason > 0); assert(sp->fd > 0); i = close(sp->fd); assert(i == 0 || errno != EBADF); /* XXX EINVAL seen */ sp->fd = -(int)reason; ses_close_acct(reason); }
0
[ "CWE-617" ]
varnish-cache
2d8fc1a784a1e26d78c30174923a2b14ee2ebf62
74,098,939,198,399,600,000,000,000,000,000,000,000
11
Take sizeof pool_task into account when reserving WS in SES_Wait The assert on WS_ReserveSize() in ses_handle() can not trip because sizeof (struct pool_task) is less than sizeof (struct waited). But to safe guard against future problems if that were to change, this patch makes sure that the session workspace can hold...
int Field_bit::store(double nr) { return Field_bit::store((longlong) nr, FALSE); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
77,064,454,152,319,160,000,000,000,000,000,000,000
4
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
void vp8_deblock(VP8_COMMON *cm, YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *post, int q, int low_var_thresh, int flag) { double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065; int ppl = (int)(level + .5); const MODE_INFO *mode_info_context = cm->mi; int mb...
0
[ "CWE-20" ]
libvpx
52add5896661d186dec284ed646a4b33b607d2c7
134,486,515,203,072,930,000,000,000,000,000,000,000
56
VP8: Fix use-after-free in postproc. The pointer in vp8 postproc refers to show_frame_mi which is only updated on show frame. However, when there is a no-show frame which also changes the size (thus new frame buffers allocated), show_frame_mi is not updated with new frame buffer memory. Change the pointer in postproc...
static struct priority_group *parse_priority_group(struct dm_arg_set *as, struct multipath *m) { static struct dm_arg _args[] = { {1, 1024, "invalid number of paths"}, {0, 1024, "invalid number of selector args"} }; int r; unsigned i, nr_selector_args, nr_args; struct priority_group *pg; struct dm_t...
0
[ "CWE-284", "CWE-264" ]
linux
ec8013beddd717d1740cfefb1a9b900deef85462
337,965,475,239,288,100,000,000,000,000,000,000,000
72
dm: do not forward ioctls from logical volumes to the underlying device A logical volume can map to just part of underlying physical volume. In this case, it must be treated like a partition. Based on a patch from Alasdair G Kergon. Cc: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Paolo ...
SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr, size_t, msg_len, unsigned int __user *, u_msg_prio, const struct timespec __user *, u_abs_timeout) { struct timespec ts, *p = NULL; if (u_abs_timeout) { int res = prepare_timeout(u_abs_timeout, &ts); if (res) return res; p = &ts; }...
0
[ "CWE-416" ]
linux
f991af3daabaecff34684fd51fac80319d1baad1
125,509,002,066,452,970,000,000,000,000,000,000,000
13
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...
void Lua::lua_register_classes(lua_State *L, bool http_mode) { static const luaL_Reg _meta[] = { { NULL, NULL } }; int i; ntop_class_reg ntop_lua_reg[] = { { "interface", ntop_interface_reg }, { "ntop", ntop_reg }, {NULL, NULL} }; if(!L) return; luaopen_lsqlite3(L); for(i=0; n...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
232,885,960,574,159,600,000,000,000,000,000,000,000
51
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it