func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int setup_netfront_single(struct netfront_queue *queue)
{
int err;
err = xenbus_alloc_evtchn(queue->info->xbdev, &queue->tx_evtchn);
if (err < 0)
goto fail;
err = bind_evtchn_to_irqhandler_lateeoi(queue->tx_evtchn,
xennet_interrupt, 0,
queue->info->netdev->name,
queue);
if (err < 0)
... | 0 | [] | linux | f63c2c2032c2e3caad9add3b82cc6e91c376fd26 | 197,010,507,734,847,050,000,000,000,000,000,000,000 | 25 | xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses()
The commit referenced below moved the invocation past the "next" label,
without any explanation. In fact this allows misbehaving backends undue
control over the domain the frontend runs in, as earlier detected errors
require the skb to not ... |
void RGWDeleteObjTags::pre_exec()
{
rgw_bucket_object_pre_exec(s);
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 129,203,043,932,426,520,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
krb5_gss_verify_mic(minor_status, context_handle,
message_buffer, token_buffer,
qop_state)
OM_uint32 *minor_status;
gss_ctx_id_t context_handle;
gss_buffer_t message_buffer;
gss_buffer_t token_buffer;
gss_qop_t *qop_sta... | 0 | [
"CWE-125"
] | krb5 | fb99962cbd063ac04c9a9d2cc7c75eab73f3533d | 194,616,681,095,757,320,000,000,000,000,000,000,000 | 16 | Handle invalid RFC 1964 tokens [CVE-2014-4341...]
Detect the following cases which would otherwise cause invalid memory
accesses and/or integer underflow:
* An RFC 1964 token being processed by an RFC 4121-only context
[CVE-2014-4342]
* A header with fewer than 22 bytes after the token ID or an
incomplete checks... |
int lh_table_length(struct lh_table *t)
{
return t->count;
} | 0 | [
"CWE-119",
"CWE-310"
] | json-c | 64e36901a0614bf64a19bc3396469c66dcd0b015 | 16,146,647,506,721,523,000,000,000,000,000,000,000 | 4 | Patch to address the following issues:
* CVE-2013-6371: hash collision denial of service
* CVE-2013-6370: buffer overflow if size_t is larger than int |
static void evtchn_2l_bind_to_cpu(struct irq_info *info, unsigned cpu)
{
clear_bit(info->evtchn, BM(per_cpu(cpu_evtchn_mask, info->cpu)));
set_bit(info->evtchn, BM(per_cpu(cpu_evtchn_mask, cpu)));
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 179,289,920,458,571,840,000,000,000,000,000,000,000 | 5 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
static int igmp_mc_seq_open(struct inode *inode, struct file *file)
{
return seq_open_net(inode, file, &igmp_mc_seq_ops,
sizeof(struct igmp_mc_iter_state));
} | 0 | [
"CWE-399",
"CWE-703",
"CWE-369"
] | linux | a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27 | 196,933,623,440,049,430,000,000,000,000,000,000,000 | 5 | igmp: Avoid zero delay when receiving odd mixture of IGMP queries
Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
behavior on v3 query during v2-compatibility mode') added yet another
case for query parsing, which can result in max_delay = 0. Substitute
a value of 1, as in the usual v3 case.
Rep... |
void snro_box_del(GF_Box *s)
{
GF_SeqOffHintEntryBox *snro = (GF_SeqOffHintEntryBox *)s;
gf_free(snro);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 41,191,849,405,526,460,000,000,000,000,000,000,000 | 5 | fixed #1587 |
SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
struct timespec __user *, interval)
{
struct task_struct *p;
unsigned int time_slice;
unsigned long flags;
struct rq *rq;
int retval;
struct timespec t;
if (pid < 0)
return -EINVAL;
retval = -ESRCH;
rcu_read_lock();
p = find_process_by_pid(pid);
if (!p... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 184,119,745,725,430,250,000,000,000,000,000,000,000 | 36 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
int register_gifconf(unsigned int family, gifconf_func_t * gifconf)
{
if (family >= NPROTO)
return -EINVAL;
gifconf_list[family] = gifconf;
return 0;
} | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 84,797,081,009,516,360,000,000,000,000,000,000,000 | 7 | [IPv4/IPv6]: UFO Scatter-gather approach
Attached is kernel patch for UDP Fragmentation Offload (UFO) feature.
1. This patch incorporate the review comments by Jeff Garzik.
2. Renamed USO as UFO (UDP Fragmentation Offload)
3. udp sendfile support with UFO
This patches uses scatter-gather feature of skb to generate l... |
static int sctp_getsockopt_assoc_stats(struct sock *sk, int len,
char __user *optval,
int __user *optlen)
{
struct sctp_assoc_stats sas;
struct sctp_association *asoc = NULL;
/* User must provide at least the assoc id */
if (len < sizeof(sctp_assoc_t))
return -EINVAL;
/* Allow the struct ... | 0 | [
"CWE-20"
] | linux | 726bc6b092da4c093eb74d13c07184b18c1af0f1 | 127,160,945,980,517,500,000,000,000,000,000,000,000 | 58 | 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... |
static int bmp_gobble(jas_stream_t *in, long n)
{
while (--n >= 0) {
if (jas_stream_getc(in) == EOF) {
return -1;
}
}
return 0;
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 299,526,442,829,608,630,000,000,000,000,000,000,000 | 9 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
void GC_err_printf(const char *format, ...)
{
char buf[BUFSZ + 1];
GC_PRINTF_FILLBUF(buf, format);
GC_err_puts(buf);
} | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 30,330,415,899,270,455,000,000,000,000,000,000,000 | 7 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
static pj_bool_t on_connect_complete(pj_ssl_sock_t *ssock,
pj_status_t status)
{
struct tls_transport *tls;
pj_ssl_sock_info ssl_info;
pj_sockaddr addr, *tp_addr;
pjsip_tp_state_callback state_cb;
pj_bool_t is_shutdown;
char local_addr_buf[PJ_INET6_ADDRSTRLEN+10];
char remote_addr_b... | 0 | [
"CWE-362",
"CWE-703"
] | pjproject | d5f95aa066f878b0aef6a64e60b61e8626e664cd | 17,085,759,796,475,397,000,000,000,000,000,000,000 | 229 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without... |
unsigned evaluate_lpc_subframe_(
FLAC__StreamEncoder *encoder,
const FLAC__int32 signal[],
FLAC__int32 residual[],
FLAC__uint64 abs_residual_partition_sums[],
unsigned raw_bits_per_partition[],
const FLAC__real lp_coeff[],
unsigned blocksize,
unsigned subframe_bps,
unsigned order,
unsigned qlp_coeff_precision... | 0 | [] | flac | c06a44969c1145242a22f75fc8fb2e8b54c55303 | 108,231,563,715,188,370,000,000,000,000,000,000,000 | 84 | flac : Fix for https://sourceforge.net/p/flac/bugs/425/
* flac/encode.c : Validate num_tracks field of cuesheet.
* libFLAC/stream_encoder.c : Add check for a NULL pointer.
* flac/encode.c : Improve bounds checking.
Closes: https://sourceforge.net/p/flac/bugs/425/ |
str_alloc(VALUE klass)
{
NEWOBJ(str, struct RString);
OBJSETUP(str, klass, T_STRING);
str->as.heap.ptr = 0;
str->as.heap.len = 0;
str->as.heap.aux.capa = 0;
return (VALUE)str;
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 130,691,049,628,606,970,000,000,000,000,000,000,000 | 11 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
evbuffer_drain(struct evbuffer *buf, size_t len)
{
struct evbuffer_chain *chain, *next;
size_t remaining, old_len;
int result = 0;
EVBUFFER_LOCK(buf);
old_len = buf->total_len;
if (old_len == 0)
goto done;
if (buf->freeze_start) {
result = -1;
goto done;
}
if (len >= old_len && !HAS_PINNED_R(buf)) {
... | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 92,734,653,928,523,960,000,000,000,000,000,000,000 | 68 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
void unregister_asymmetric_key_parser(struct asymmetric_key_parser *parser)
{
down_write(&asymmetric_key_parsers_sem);
list_del(&parser->link);
up_write(&asymmetric_key_parsers_sem);
pr_notice("Asymmetric key parser '%s' unregistered\n", parser->name);
} | 0 | [
"CWE-476"
] | linux | c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81 | 153,729,179,576,784,580,000,000,000,000,000,000,000 | 8 | KEYS: Remove key_type::match in favour of overriding default by match_preparse
A previous patch added a ->match_preparse() method to the key type. This is
allowed to override the function called by the iteration algorithm.
Therefore, we can just set a default that simply checks for an exact match of
the key descripti... |
check_DEBUG_RECIRC(const struct ofpact_null *a OVS_UNUSED,
const struct ofpact_check_params *cp OVS_UNUSED)
{
return 0;
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 4,558,845,576,337,138,000,000,000,000,000,000,000 | 5 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
set_sofo(slang_T *lp, char_u *from, char_u *to)
{
int i;
garray_T *gap;
char_u *s;
char_u *p;
int c;
int *inp;
if (has_mbyte)
{
// Use "sl_sal" as an array with 256 pointers to a list of wide
// characters. The index is the low byte of the character.
// The list contains from-to... | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 271,048,036,589,403,770,000,000,000,000,000,000,000 | 82 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
set_array(const char *var, bool reset, const char **vals)
{
struct tbl *vp, *vq;
mksh_uari_t i = 0, j = 0;
const char *ccp = var;
char *cp = NULL;
size_t n;
/* to get local array, use "local foo; set -A foo" */
n = strlen(var);
if (n > 0 && var[n - 1] == '+') {
/* append mode */
reset = false;
strndupx(c... | 0 | [] | mksh | de53d2df1c3b812c262cc1bddbfe0b3bfc25c14b | 233,366,227,755,343,840,000,000,000,000,000,000,000 | 76 | SECURITY: do not permit += from environment either
this makes our environment filter/sanitisation complete |
static bool check_selective_cr0_intercepted(struct vcpu_svm *svm,
unsigned long val)
{
unsigned long cr0 = svm->vcpu.arch.cr0;
bool ret = false;
u64 intercept;
intercept = svm->nested.intercept;
if (!is_guest_mode(&svm->vcpu) ||
(!(intercept & (1ULL << INTERCEPT_SELECTIVE_CR0))))
return false;
... | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 38,248,748,357,108,120,000,000,000,000,000,000,000 | 23 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... |
static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc)
{
struct sk_buff *skb = NULL;
int type;
if (!pmc) {
for_each_mc_mclock(idev, pmc) {
if (pmc->mca_flags & MAF_NOREPORT)
continue;
if (pmc->mca_sfcount[MCAST_EXCLUDE])
type = MLD2_MODE_IS_EXCLUDE;
else
type = MLD2_MODE_I... | 0 | [
"CWE-703"
] | linux | 2d3916f3189172d5c69d33065c3c21119fe539fc | 158,292,290,944,490,300,000,000,000,000,000,000,000 | 25 | ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report()
While investigating on why a synchronize_net() has been added recently
in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report()
might drop skbs in some cases.
Discussion about removing synchronize_net() from ipv6_mc_down()
will ha... |
static uint64_t msix_pba_mmio_read(void *opaque, hwaddr addr,
unsigned size)
{
PCIDevice *dev = opaque;
if (dev->msix_vector_poll_notifier) {
unsigned vector_start = addr * 8;
unsigned vector_end = MIN(addr + size * 8, dev->msix_entries_nr);
dev->msix_v... | 0 | [] | qemu | 43b11a91dd861a946b231b89b7542856ade23d1b | 174,724,699,091,120,360,000,000,000,000,000,000,000 | 12 | msix: implement pba write (but read-only)
qpci_msix_pending() writes on pba region, causing qemu to SEGV:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fba8c0 (LWP 25882)]
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ()
#1 0x00005555556556c5 in memor... |
int path_match(const char *path, int nr, char **match)
{
int i;
int pathlen = strlen(path);
for (i = 0; i < nr; i++) {
char *s = match[i];
int len = strlen(s);
if (!len || len > pathlen)
continue;
if (memcmp(path + pathlen - len, s, len))
continue;
if (pathlen > len && path[pathlen - len - 1] != '/... | 0 | [] | git | 73bb33a94ec67a53e7d805b12ad9264fa25f4f8d | 297,748,315,295,326,700,000,000,000,000,000,000,000 | 20 | daemon: Strictly parse the "extra arg" part of the command
Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon")
git daemon enters an infinite loop and never terminates if a client
hides any extra arguments in the initial request line which is not
exactly "\0host=blah\0".
Since that change, a client m... |
int avpriv_unlock_avformat(void)
{
if (lockmgr_cb) {
if ((*lockmgr_cb)(&avformat_mutex, AV_LOCK_RELEASE))
return -1;
}
return 0;
} | 0 | [
"CWE-703"
] | FFmpeg | e5c7229999182ad1cef13b9eca050dba7a5a08da | 145,795,187,326,455,330,000,000,000,000,000,000,000 | 8 | avcodec/utils: set AVFrame format unconditional
Fixes inconsistency and out of array accesses
Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
nfs_request_add_commit_list(struct nfs_page *req, struct list_head *dst,
struct nfs_commit_info *cinfo)
{
set_bit(PG_CLEAN, &(req)->wb_flags);
spin_lock(cinfo->lock);
nfs_list_add_request(req, dst);
cinfo->mds->ncommit++;
spin_unlock(cinfo->lock);
if (!cinfo->dreq) {
inc_zone_page_state(req->wb_page, NR_... | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 238,097,381,956,064,380,000,000,000,000,000,000,000 | 16 | NFS: Allow nfs_updatepage to extend a write under additional circumstances
Currently nfs_updatepage allows a write to be extended to cover a full
page only if we don't have a byte range lock lock on the file... but if
we have a write delegation on the file or if we have the whole file
locked for writing then we should... |
static ssize_t phys_device_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct memory_block *mem = to_memory_block(dev);
return sprintf(buf, "%d\n", mem->phys_device);
} | 1 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 21,595,806,770,085,465,000,000,000,000,000,000,000 | 6 | 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... |
long do_handle_open(int mountdirfd,
struct file_handle __user *ufh, int open_flag)
{
long retval = 0;
struct path path;
struct file *file;
int fd;
retval = handle_to_path(mountdirfd, ufh, &path);
if (retval)
return retval;
fd = get_unused_fd_flags(open_flag);
if (fd < 0) {
path_put(&path);
return ... | 0 | [
"CWE-362"
] | linux | 161f873b89136eb1e69477c847d5a5033239d9ba | 332,532,761,186,119,770,000,000,000,000,000,000,000 | 29 | vfs: read file_handle only once in handle_to_path
We used to read file_handle twice. Once to get the amount of extra
bytes, and once to fetch the entire structure.
This may be problematic since we do size verifications only after the
first read, so if the number of extra bytes changes in userspace between
the first ... |
e_mail_config_ews_autodiscover_new (EMailConfigServiceBackend *backend)
{
g_return_val_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend), NULL);
return g_object_new (
E_TYPE_MAIL_CONFIG_EWS_AUTODISCOVER,
"backend", backend, NULL);
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 236,373,640,013,420,200,000,000,000,000,000,000,000 | 8 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
rsRetVal rsCStrSetSzStr(cstr_t *pThis, uchar *pszNew)
{
rsCHECKVALIDOBJECT(pThis, OIDrsCStr);
free(pThis->pBuf);
free(pThis->pszBuf);
if(pszNew == NULL) {
pThis->iStrLen = 0;
pThis->iBufSize = 0;
pThis->pBuf = NULL;
pThis->pszBuf = NULL;
} else {
pThis->iStrLen = strlen((char*)pszNew);
pThis->iBufSize... | 0 | [
"CWE-189"
] | rsyslog | 6bad782f154b7f838c7371bf99c13f6dc4ec4101 | 249,756,231,902,040,670,000,000,000,000,000,000,000 | 28 | bugfix: abort if imfile reads file line of more than 64KiB
Thanks to Peter Eisentraut for reporting and analysing this problem.
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=221 |
uECC_VLI_API uECC_word_t uECC_vli_equal(const uECC_word_t *left,
const uECC_word_t *right,
wordcount_t num_words) {
uECC_word_t diff = 0;
wordcount_t i;
for (i = num_words - 1; i >= 0; --i) {
diff |= (left[i] ^ right[i])... | 0 | [
"CWE-415"
] | micro-ecc | 1b5f5cea5145c96dd8791b9b2c41424fc74c2172 | 215,805,286,862,006,200,000,000,000,000,000,000,000 | 10 | Fix for #168 |
QString Utils::String::fromDouble(double n, int precision)
{
/* HACK because QString rounds up. Eg QString::number(0.999*100.0, 'f' ,1) == 99.9
** but QString::number(0.9999*100.0, 'f' ,1) == 100.0 The problem manifests when
** the number has more digits after the decimal than we want AND the digit after
... | 0 | [
"CWE-20",
"CWE-79"
] | qBittorrent | 6ca3e4f094da0a0017cb2d483ec1db6176bb0b16 | 77,897,451,418,820,040,000,000,000,000,000,000,000 | 11 | Add Utils::String::toHtmlEscaped |
juniper_mlppp_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, register const u_char *p)
{
struct juniper_l2info_t l2info;
l2info.pictype = DLT_JUNIPER_MLPPP;
if (juniper_parse_header(ndo, p, h, &l2info) == 0)
return l2info.header_len;
/* supp... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 1dcd10aceabbc03bf571ea32b892c522cbe923de | 176,696,491,399,142,400,000,000,000,000,000,000,000 | 55 | CVE-2017-12897/ISO CLNS: Use ND_TTEST() for the bounds checks in isoclns_print().
This fixes a buffer over-read discovered by Kamil Frankowicz.
Don't pass the remaining caplen - that's too hard to get right, and we
were getting it wrong in at least one case; just use ND_TTEST().
Add a test using the capture file sup... |
geometry_type get_geometry_type() { return geom_type; }; | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 258,317,329,211,254,300,000,000,000,000,000,000,000 | 1 | 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... |
static ssize_t _extract_entropy(struct entropy_store *r, void *buf,
size_t nbytes, int fips)
{
ssize_t ret = 0, i;
__u8 tmp[EXTRACT_SIZE];
unsigned long flags;
while (nbytes) {
extract_buf(r, tmp);
if (fips) {
spin_lock_irqsave(&r->lock, flags);
if (!memcmp(tmp, r->last_data, EXTRACT_SIZE))
pani... | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 150,481,972,366,840,530,000,000,000,000,000,000,000 | 29 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
DEFUN(reshape, RESHAPE, "Re-render document")
{
Currentbuf->need_reshape = TRUE;
reshapeBuffer(Currentbuf);
displayBuffer(Currentbuf, B_FORCE_REDRAW);
} | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 111,240,544,787,235,160,000,000,000,000,000,000,000 | 6 | Make temporary directory safely when ~/.w3m is unwritable |
static fz_buffer *deflatebuf(fz_context *ctx, const unsigned char *p, size_t n)
{
fz_buffer *buf;
uLongf csize;
int t;
uLong longN = (uLong)n;
unsigned char *data;
size_t cap;
if (n != (size_t)longN)
fz_throw(ctx, FZ_ERROR_GENERIC, "Buffer too large to deflate");
cap = compressBound(longN);
data = fz_mallo... | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 57,982,630,010,236,990,000,000,000,000,000,000,000 | 25 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
int64_t qmp_guest_fsfreeze_thaw(Error **err)
{
int ret;
FsMountList mounts;
FsMount *mount;
int fd, i = 0, logged;
Error *local_err = NULL;
QTAILQ_INIT(&mounts);
build_fs_mount_list(&mounts, &local_err);
if (error_is_set(&local_err)) {
error_propagate(err, local_err);
re... | 0 | [
"CWE-264"
] | qemu | c689b4f1bac352dcfd6ecb9a1d45337de0f1de67 | 313,675,717,181,614,960,000,000,000,000,000,000,000 | 54 | qga: set umask 0077 when daemonizing (CVE-2013-2007)
The qemu guest agent creates a bunch of files with insecure permissions
when started in daemon mode. For example:
-rw-rw-rw- 1 root root /var/log/qemu-ga.log
-rw-rw-rw- 1 root root /var/run/qga.state
-rw-rw-rw- 1 root root /var/log/qga-fsfreeze-hook.log
In a... |
static int dccp_feat_clone_sp_val(dccp_feat_val *fval, u8 const *val, u8 len)
{
fval->sp.len = len;
if (fval->sp.len > 0) {
fval->sp.vec = kmemdup(val, len, gfp_any());
if (fval->sp.vec == NULL) {
fval->sp.len = 0;
return -ENOBUFS;
}
}
return 0;
} | 0 | [
"CWE-401"
] | linux | 1d3ff0950e2b40dc861b1739029649d03f591820 | 212,957,181,043,621,120,000,000,000,000,000,000,000 | 12 | dccp: Fix memleak in __feat_register_sp
If dccp_feat_push_change fails, we forget free the mem
which is alloced by kmemdup in dccp_feat_clone_sp_val.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e8ef967a54f4 ("dccp: Registration routines for changing feature values")
Reviewed-by: Mukesh Ojha <mojha@codeaurora.o... |
struct sk_buff *build_skb(void *data, unsigned int frag_size)
{
struct sk_buff *skb = __build_skb(data, frag_size);
if (skb && frag_size) {
skb->head_frag = 1;
if (page_is_pfmemalloc(virt_to_head_page(data)))
skb->pfmemalloc = 1;
}
return skb;
} | 0 | [
"CWE-703",
"CWE-125"
] | linux | 8605330aac5a5785630aec8f64378a54891937cc | 47,841,075,695,298,760,000,000,000,000,000,000,000 | 11 | tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs
__sock_recv_timestamp can be called for both normal skbs (for
receive timestamps) and for skbs on the error queue (for transmit
timestamps).
Commit 1c885808e456
(tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING)
assumes any skb passed to __sock_recv_timest... |
proto_init(GSList *register_all_plugin_protocols_list,
GSList *register_all_plugin_handoffs_list,
register_cb cb,
gpointer client_data)
{
proto_cleanup_base();
proto_names = g_hash_table_new(g_str_hash, g_str_equal);
proto_short_names = g_hash_table_new(g_str_hash, g_str_equal);
proto_filter_na... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 39,577,682,126,550,525,000,000,000,000,000,000,000 | 79 | 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. |
camel_imapx_server_get_tagprefix (CamelIMAPXServer *is)
{
g_return_val_if_fail (CAMEL_IS_IMAPX_SERVER (is), 0);
return is->priv->tagprefix;
} | 0 | [] | evolution-data-server | f26a6f672096790d0bbd76903db4c9a2e44f116b | 128,990,234,400,747,520,000,000,000,000,000,000,000 | 6 | [IMAPx] 'STARTTLS not supported' error ignored
When a user has setup the STARTTLS encryption method, but the server doesn't
support it, then an error should be shown to the user, instead of using
unsecure connection. There had been two bugs in the existing code which
prevented this error from being used and the failur... |
help_command()
{
static char *helpbuf = NULL;
static char *prompt = NULL;
static int toplevel = 1;
int base; /* index of first char AFTER help string */
int len; /* length of current help string */
TBOOLEAN more_help;
TBOOLEAN only; /* TRUE if only printing subtopics */
TBOOLEAN sub... | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 254,280,608,325,153,750,000,000,000,000,000,000,000 | 131 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
int snd_ctl_remove(struct snd_card *card, struct snd_kcontrol *kcontrol)
{
return __snd_ctl_remove(card, kcontrol, true);
} | 0 | [
"CWE-416",
"CWE-125"
] | linux | 6ab55ec0a938c7f943a4edba3d6514f775983887 | 262,023,919,663,327,850,000,000,000,000,000,000,000 | 4 | ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()
Since the user can control the arguments provided to the kernel by the
ioctl() system call, an out-of-bounds bug occurs when the 'id->name'
provided by the user does not end with '\0'.
The following log can reveal it:
[ 10.002313] BUG: KASAN: stack-out-... |
float CLASS find_green (int bps, int bite, int off0, int off1)
{
UINT64 bitbuf=0;
int vbits, col, i, c;
ushort img[2][2064];
double sum[] = {0, 0};
if(width > 2064) return 0.f; // too wide
FORC(2) {
fseek (ifp, c ? off1:off0, SEEK_SET);
for (vbits=col=0; col < width; col++) {
for (vbits -= bp... | 0 | [
"CWE-125",
"CWE-787"
] | LibRaw | fd6330292501983ac75fe4162275794b18445bd9 | 158,395,802,917,839,990,000,000,000,000,000,000,000 | 25 | Secunia 81800#1: samsumg_load_raw
Secunia 81800#2: find_green
Secunia 81800#3: rollei_load_raw
remove_trailing_spaces: isspace() does not works right with signed non-latin chars
Secunia 81800#5/6: nikon_coolscan_load_raw
Secunia 81800#4: rollei_load_raw |
bool MkvWriter::Seekable() const { return true; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 121,164,482,464,020,530,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
void kvm_inject_nmi(struct kvm_vcpu *vcpu)
{
atomic_inc(&vcpu->arch.nmi_queued);
kvm_make_request(KVM_REQ_NMI, vcpu);
} | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 27,023,941,283,694,475,000,000,000,000,000,000,000 | 5 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
int __init iriap_init(void)
{
struct ias_object *obj;
struct iriap_cb *server;
__u8 oct_seq[6];
__u16 hints;
/* Allocate master array */
iriap = hashbin_new(HB_LOCK);
if (!iriap)
return -ENOMEM;
/* Object repository - defined in irias_object.c */
irias_objects = hashbin_new(HB_LOCK);
if (!irias_objects) {... | 0 | [] | linux-2.6 | d370af0ef7951188daeb15bae75db7ba57c67846 | 132,772,171,793,030,750,000,000,000,000,000,000,000 | 54 | irda: validate peer name and attribute lengths
Length fields provided by a peer for names and attributes may be longer
than the destination array sizes. Validate lengths to prevent stack
buffer overflows.
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <da... |
static void display_update(struct DisplayState *ds, int x, int y, int w, int h)
{
qemu_spice_display_update(&sdpy, x, y, w, h);
} | 0 | [] | qemu-kvm | 5ff4e36c804157bd84af43c139f8cd3a59722db9 | 315,636,946,022,027,670,000,000,000,000,000,000,000 | 4 | qxl: async io support using new spice api
Some of the QXL port i/o commands are waiting for the spice server to
complete certain actions. Add async versions for these commands, so we
don't block the vcpu while the spice server processses the command.
Instead the qxl device will raise an IRQ when done.
The async comm... |
virtual ~YAMLParser() {} | 0 | [
"CWE-476"
] | opencv | 5691d998ead1d9b0542bcfced36c2dceb3a59023 | 245,801,949,065,026,870,000,000,000,000,000,000,000 | 1 | core(persistence): added null ptr checks |
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi,
unsigned long arg)
{
cd_dbg(CD_DO_IOCTL, "entering CDROM_SELECT_DISC\n");
if (!CDROM_CAN(CDC_SELECT_DISC))
return -ENOSYS;
if (arg != CDSL_CURRENT && arg != CDSL_NONE) {
if (arg >= cdi->capacity)
return -EINVAL;
}
/*
* ->select_disc is... | 0 | [
"CWE-200"
] | linux | e4f3aa2e1e67bb48dfbaaf1cad59013d5a5bc276 | 84,870,786,149,087,900,000,000,000,000,000,000,000 | 24 | cdrom: fix improper type cast, which can leat to information leak.
There is another cast from unsigned long to int which causes
a bounds check to fail with specially crafted input. The value is
then used as an index in the slot array in cdrom_slot_status().
This issue is similar to CVE-2018-16658 and CVE-2018-10940.
... |
irc_nick_default_ban_mask (struct t_irc_nick *nick)
{
const char *ptr_ban_mask;
char *pos_hostname, user[128], ident[128], *res, *temp;
if (!nick)
return NULL;
ptr_ban_mask = weechat_config_string (irc_config_network_ban_mask_default);
pos_hostname = (nick->host) ? strchr (nick->host, '@'... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 224,592,380,849,208,750,000,000,000,000,000,000,000 | 52 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
static int show_smap(struct seq_file *m, void *v, int is_pid)
{
struct vm_area_struct *vma = v;
struct mem_size_stats mss;
struct mm_walk smaps_walk = {
.pmd_entry = smaps_pte_range,
.mm = vma->vm_mm,
.private = &mss,
};
memset(&mss, 0, sizeof mss);
/* mmap_sem is held in m_start */
walk_page_vma(vma, &sm... | 0 | [
"CWE-200"
] | linux | ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce | 149,333,550,553,502,700,000,000,000,000,000,000,000 | 51 | pagemap: do not leak physical addresses to non-privileged userspace
As pointed by recent post[1] on exploiting DRAM physical imperfection,
/proc/PID/pagemap exposes sensitive information which can be used to do
attacks.
This disallows anybody without CAP_SYS_ADMIN to read the pagemap.
[1] http://googleprojectzero.bl... |
my_bool acl_init(bool dont_read_acl_tables)
{
THD *thd;
my_bool return_val;
DBUG_ENTER("acl_init");
acl_cache= new hash_filo(ACL_CACHE_SIZE, 0, 0,
(my_hash_get_key) acl_entry_get_key,
(my_hash_free_key) free,
&my_charset_utf8_bin... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 193,646,391,565,098,400,000,000,000,000,000,000,000 | 46 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
mark_fill_rect_add3_common(int w, int h, byte *gs_restrict dst_ptr, byte *gs_restrict src, int num_comp, int num_spots, int first_blend_spot,
byte src_alpha, int rowstride, int planestride, bool additive, pdf14_device *pdev, gs_blend_mode_t blend_mode,
bool overprint, gx_color_index drawn_... | 0 | [
"CWE-476"
] | ghostpdl | 7870f4951bcc6a153f317e3439e14d0e929fd231 | 92,535,692,777,323,280,000,000,000,000,000,000,000 | 42 | Bug 701795: Segv due to image mask issue |
DecodeDirect() {type_width = sizeof(Chr);} | 0 | [
"CWE-125"
] | aspell | de29341638833ba7717bd6b5e6850998454b044b | 310,197,503,319,641,670,000,000,000,000,000,000,000 | 1 | Don't allow null-terminated UCS-2/4 strings using the original API.
Detect if the encoding is UCS-2/4 and the length is -1 in affected API
functions and refuse to convert the string. If the string ends up
being converted somehow, abort with an error message in DecodeDirect
and ConvDirect. To convert a null terminate... |
static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct tun_struct *tun = netdev_priv(dev);
int txq = skb->queue_mapping;
struct tun_file *tfile;
u32 numqueues = 0;
rcu_read_lock();
tfile = rcu_dereference(tun->tfiles[txq]);
numqueues = ACCESS_ONCE(tun->numqueues);
/* Drop packet... | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 175,468,749,306,573,100,000,000,000,000,000,000,000 | 77 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
long Track::Create(Segment* pSegment, const Info& info, long long element_start,
long long element_size, Track*& pResult) {
if (pResult)
return -1;
Track* const pTrack =
new (std::nothrow) Track(pSegment, element_start, element_size);
if (pTrack == NULL)
return -1; // generic e... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 33,139,912,341,508,000,000,000,000,000,000,000,000 | 21 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
static int selinux_kernel_read_file(struct file *file,
enum kernel_read_file_id id,
bool contents)
{
int rc = 0;
switch (id) {
case READING_MODULE:
rc = selinux_kernel_module_from_file(contents ? file : NULL);
break;
default:
break;
}
return rc;
} | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 104,131,381,901,967,720,000,000,000,000,000,000,000 | 16 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
static void move_right(char *buf, char *end, unsigned len, unsigned spaces)
{
size_t size;
if (buf >= end) /* nowhere to put anything */
return;
size = end - buf;
if (size <= spaces) {
memset(buf, ' ', size);
return;
}
if (len) {
if (len > size - spaces)
len = size - spaces;
memmove(buf + spaces, buf... | 0 | [
"CWE-200"
] | linux | ad67b74d2469d9b82aaa572d76474c95bc484d57 | 295,938,557,085,566,750,000,000,000,000,000,000,000 | 17 | printk: hash addresses printed with %p
Currently there exist approximately 14 000 places in the kernel where
addresses are being printed using an unadorned %p. This potentially
leaks sensitive information regarding the Kernel layout in memory. Many
of these calls are stale, instead of fixing every call lets hash the
a... |
cmd_readkey (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
int rc;
unsigned char *cert = NULL;
size_t ncert, n;
ksba_cert_t kc = NULL;
ksba_sexp_t p;
unsigned char *pk;
size_t pklen;
if ((rc = open_card (ctrl, NULL)))
return rc;
line = xstrdup (line); /* Need a co... | 1 | [] | gnupg | b0b3803e8c2959dd67ca96debc54b5c6464f0d41 | 317,911,316,520,292,400,000,000,000,000,000,000,000 | 72 | scd: Avoid double-free on error condition in scd
* scd/command.c (cmd_readkey): avoid double-free of cert
--
When ksba_cert_new() fails, cert will be double-freed.
Debian-Bug-Id: 773471
Original patch changed by wk to do the free only at leave. |
static void memory_region_add_subregion_common(MemoryRegion *mr,
hwaddr offset,
MemoryRegion *subregion)
{
assert(!subregion->container);
subregion->container = mr;
subregion->addr = offset;
subregion->end = of... | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 323,539,973,321,270,070,000,000,000,000,000,000,000 | 10 | Fix crash when mapping a big memory and calling uc_close |
static sctp_disposition_t sctp_sf_violation_paramlen(
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands) {
char err_str[] = "The following parameter had invalid length:";
return sctp_sf_abor... | 0 | [] | linux | bbd0d59809f923ea2b540cbd781b32110e249f6e | 113,350,091,769,342,320,000,000,000,000,000,000,000 | 11 | [SCTP]: Implement the receive and verification of AUTH chunk
This patch implements the receive path needed to process authenticated
chunks. Add ability to process the AUTH chunk and handle edge cases
for authenticated COOKIE-ECHO as well.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David ... |
static void GetMaximumPixelList(PixelList *pixel_list,MagickPixelPacket *pixel)
{
register SkipList
*list;
register ssize_t
channel;
size_t
color,
maximum;
ssize_t
count;
unsigned short
channels[ListChannels];
/*
Find the maximum value for each of the color.
*/
for (chan... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | 91e58d967a92250439ede038ccfb0913a81e59fe | 67,664,672,109,522,870,000,000,000,000,000,000,000 | 42 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
static int kvm_pv_clock_pairing(struct kvm_vcpu *vcpu, gpa_t paddr,
unsigned long clock_type)
{
struct kvm_clock_pairing clock_pairing;
struct timespec64 ts;
u64 cycle;
int ret;
if (clock_type != KVM_CLOCK_PAIRING_WALLCLOCK)
return -KVM_EOPNOTSUPP;
if (!kvm_get_walltime_and_clockread(&ts, &cycle))
... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 135,439,155,995,476,720,000,000,000,000,000,000,000 | 27 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
KeyInfo *sqlite3KeyInfoAlloc(sqlite3 *db, int N, int X){
int nExtra = (N+X)*(sizeof(CollSeq*)+1) - sizeof(CollSeq*);
KeyInfo *p = sqlite3DbMallocRawNN(db, sizeof(KeyInfo) + nExtra);
if( p ){
p->aSortFlags = (u8*)&p->aColl[N+X];
p->nKeyField = (u16)N;
p->nAllField = (u16)(N+X);
p->enc = ENC(db);
... | 0 | [
"CWE-20"
] | sqlite | e59c562b3f6894f84c715772c4b116d7b5c01348 | 13,321,369,099,390,699,000,000,000,000,000,000,000 | 16 | Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list.
FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba |
static inline void aio_run_iocbs(struct kioctx *ctx)
{
int requeue;
spin_lock_irq(&ctx->ctx_lock);
requeue = __aio_run_iocbs(ctx);
spin_unlock_irq(&ctx->ctx_lock);
if (requeue)
aio_queue_work(ctx);
} | 0 | [
"CWE-190"
] | linux-2.6 | 75e1c70fc31490ef8a373ea2a4bea2524099b478 | 70,481,056,607,617,540,000,000,000,000,000,000,000 | 11 | aio: check for multiplication overflow in do_io_submit
Tavis Ormandy pointed out that do_io_submit does not do proper bounds
checking on the passed-in iocb array:
if (unlikely(nr < 0))
return -EINVAL;
if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))
retu... |
static int binder_translate_fd_array(struct binder_fd_array_object *fda,
struct binder_buffer_object *parent,
struct binder_transaction *t,
struct binder_thread *thread,
struct binder_transaction *in_reply_to)
{
binder_size_t fdi, fd_buf_size, num_installed_fds;
int target_fd;
uin... | 0 | [
"CWE-362"
] | linux | 5eeb2ca02a2f6084fc57ae5c244a38baab07033a | 203,302,265,528,243,870,000,000,000,000,000,000 | 57 | 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... |
xfs_rw_ilock_demote(
struct xfs_inode *ip,
int type)
{
xfs_ilock_demote(ip, type);
if (type & XFS_IOLOCK_EXCL)
mutex_unlock(&VFS_I(ip)->i_mutex);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8d0207652cbe27d1f962050737848e5ad4671958 | 180,731,944,530,009,600,000,000,000,000,000,000,000 | 8 | ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <viro@z... |
isControlFrame(ws_ctx_t *wsctx)
{
return 0 != (wsctx->header.opcode & 0x08);
} | 0 | [
"CWE-787"
] | libvncserver | 0cf1400c61850065de590d403f6d49e32882fd76 | 70,389,238,106,715,580,000,000,000,000,000,000,000 | 4 | fix crash because of unaligned accesses in hybiReadAndDecode() |
static void check_registration_keywords(hook_user_register_check_t *hdata)
{
if (hdata->approved || !anope_flags_compat)
{
return;
}
if (!strcasecmp(hdata->account, "LIST") || !strcasecmp(hdata->account, "CLEAR") || !strcasecmp(hdata->account, "MODIFY"))
{
command_fail(hdata->si, fault_badparams, "The nick \2... | 0 | [
"CWE-284"
] | atheme | c597156adc60a45b5f827793cd420945f47bc03b | 227,754,738,516,853,200,000,000,000,000,000,000,000 | 13 | chanserv/flags: make Anope FLAGS compatibility an option
Previously, ChanServ FLAGS behavior could be modified by registering or
dropping the keyword nicks "LIST", "CLEAR", and "MODIFY".
Now, a configuration option is available that when turned on (default),
disables registration of these keyword nicks and enables thi... |
}
static JSValue js_sys_htonl(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
s64 val;
if (!argc) return GF_JS_EXCEPTION(ctx);
if (JS_ToInt64(ctx, &val, argv[0])) return GF_JS_EXCEPTION(ctx);
return JS_NewInt32(ctx, gf_htonl((u32) val)); | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 277,859,307,235,645,800,000,000,000,000,000,000,000 | 7 | fixed #2138 |
GF_Err tssy_box_dump(GF_Box *a, FILE * trace)
{
GF_TimeStampSynchronyBox *p = (GF_TimeStampSynchronyBox *)a;
gf_isom_box_dump_start(a, "TimeStampSynchronyBox", trace);
gf_fprintf(trace, "timestamp_sync=\"%d\">\n", p->timestamp_sync);
gf_isom_box_dump_done("TimeStampSynchronyBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 23,607,938,323,640,550,000,000,000,000,000,000,000 | 8 | fixed #2138 |
void snd_seq_queue_client_leave(int client)
{
int i;
struct snd_seq_queue *q;
/* delete own queues from queue list */
for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
if ((q = queue_list_remove(i, client)) != NULL)
queue_delete(q);
}
/* remove cells from existing queues -
* they are not owned by this client
... | 0 | [
"CWE-362"
] | linux | 3567eb6af614dac436c4b16a8d426f9faed639b3 | 207,664,890,797,600,540,000,000,000,000,000,000,000 | 25 | ALSA: seq: Fix race at timer setup and close
ALSA sequencer code has an open race between the timer setup ioctl and
the close of the client. This was triggered by syzkaller fuzzer, and
a use-after-free was caught there as a result.
This patch papers over it by adding a proper queue->timer_mutex lock
around the timer... |
static zend_object *phar_convert_to_other(phar_archive_data *source, int convert, char *ext, php_uint32 flags) /* {{{ */
{
phar_archive_data *phar;
phar_entry_info *entry, newentry;
zend_object *ret;
/* invalidate phar cache */
PHAR_G(last_phar) = NULL;
PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL;
phar ... | 0 | [
"CWE-20"
] | php-src | 1e9b175204e3286d64dfd6c9f09151c31b5e099a | 17,730,875,877,829,031,000,000,000,000,000,000,000 | 112 | Fix bug #71860: Require valid paths for phar filenames |
static int __tipc_add_link_prop(struct sk_buff *skb,
struct tipc_nl_compat_msg *msg,
struct tipc_link_config *lc)
{
switch (msg->cmd) {
case TIPC_CMD_SET_LINK_PRI:
return nla_put_u32(skb, TIPC_NLA_PROP_PRIO, ntohl(lc->value));
case TIPC_CMD_SET_LINK_TOL:
return nla_put_u32(skb, TIPC_NLA_PROP_TOL, ntohl(l... | 0 | [
"CWE-200"
] | net | 5d2be1422e02ccd697ccfcd45c85b4a26e6178e2 | 263,869,630,309,543,000,000,000,000,000,000,000,000 | 15 | tipc: fix an infoleak in tipc_nl_compat_link_dump
link_info.str is a char array of size 60. Memory after the NULL
byte is not initialized. Sending the whole object out can cause
a leak.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net> |
gs_grab_get_mouse (GSGrab *grab,
GdkWindow *window,
GdkScreen *screen,
gboolean hide_cursor)
{
GdkGrabStatus status;
GdkCursor *cursor;
g_return_val_if_fail (window != NULL, FALSE);
g_return_val_if_fail (screen != NULL, FA... | 1 | [] | gnome-screensaver | f93a22c175090cf02e80bc3ee676b53f1251f685 | 138,739,027,667,141,330,000,000,000,000,000,000,000 | 28 | Nullify grab window variables when windows are destroyed
If we don't do this then there is a time period where the
grab window variables contain dangling pointers which can
cause crashes.
Part of fix for
https://bugzilla.gnome.org/show_bug.cgi?id=609789 |
gdev_pdf_put_params_impl(gx_device * dev, const gx_device_pdf * save_dev, gs_param_list * plist)
{
int ecode, code;
gx_device_pdf *pdev = (gx_device_pdf *) dev;
float cl = (float)pdev->CompatibilityLevel;
bool locked = pdev->params.LockDistillerParams, ForOPDFRead;
gs_param_name param_name;
pde... | 1 | [] | ghostpdl | c3476dde7743761a4e1d39a631716199b696b880 | 268,026,836,832,346,350,000,000,000,000,000,000,000 | 428 | Bug 699656: Handle LockDistillerParams not being a boolean
This caused a function call commented as "Can't fail" to fail, and resulted
in memory correuption and a segfault. |
Curl_http_output_auth(struct Curl_easy *data,
struct connectdata *conn,
const char *request,
Curl_HttpReq httpreq,
const char *path,
bool proxytunnel) /* TRUE if this is the request setting
... | 0 | [] | curl | 48d7064a49148f03942380967da739dcde1cdc24 | 233,588,953,008,837,340,000,000,000,000,000,000,000 | 81 | cookie: apply limits
- Send no more than 150 cookies per request
- Cap the max length used for a cookie: header to 8K
- Cap the max number of received Set-Cookie: headers to 50
Bug: https://curl.se/docs/CVE-2022-32205.html
CVE-2022-32205
Reported-by: Harry Sintonen
Closes #9048 |
static void ms_adpcm_run_pull (_AFmoduleinst *module)
{
ms_adpcm_data *d = (ms_adpcm_data *) module->modspec;
AFframecount frames2read = module->outc->nframes;
AFframecount nframes = 0;
int i, framesPerBlock, blockCount;
ssize_t blocksRead, bytesDecoded;
framesPerBlock = d->framesPerBlock;
assert(module->outc... | 0 | [
"CWE-119"
] | audiofile | e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd | 149,711,718,563,730,900,000,000,000,000,000,000,000 | 53 | Fix decoding of multi-channel ADPCM audio files. |
static GF_DownloadManager *gf_fs_get_download_manager(GF_FilterSession *fs)
{
if (!fs->download_manager) {
fs->download_manager = gf_dm_new(fs);
gf_dm_set_auth_callback(fs->download_manager, gf_fsess_get_user_pass, fs);
}
return fs->download_manager;
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 188,134,886,750,551,170,000,000,000,000,000,000,000 | 9 | fixed crashes for very long path - cf #1908 |
static int bmdma_prepare_buf(IDEDMA *dma, int is_write)
{
BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma);
IDEState *s = bmdma_active_if(bm);
PCIDevice *pci_dev = PCI_DEVICE(bm->pci_dev);
struct {
uint32_t addr;
uint32_t size;
} prd;
int l, len;
pci_dma_sglist_init(&s->sg, ... | 1 | [
"CWE-399"
] | qemu | 3251bdcf1c67427d964517053c3d185b46e618e8 | 336,489,759,539,782,200,000,000,000,000,000,000,000 | 41 | ide: Correct handling of malformed/short PRDTs
This impacts both BMDMA and AHCI HBA interfaces for IDE.
Currently, we confuse the difference between a PRDT having
"0 bytes" and a PRDT having "0 complete sectors."
When we receive an incomplete sector, inconsistent error checking
leads to an infinite loop wherein the c... |
static int lookup_start(AvahiSRBLookup *l) {
assert(l);
assert(!(l->flags & AVAHI_LOOKUP_USE_WIDE_AREA) != !(l->flags & AVAHI_LOOKUP_USE_MULTICAST));
assert(!l->wide_area && !l->multicast);
if (l->flags & AVAHI_LOOKUP_USE_WIDE_AREA) {
if (!(l->wide_area = avahi_wide_area_lookup_new(l->record_... | 0 | [] | avahi | 9d31939e55280a733d930b15ac9e4dda4497680c | 28,646,348,190,261,133,000,000,000,000,000,000,000 | 20 | Fix NULL pointer crashes from #175
avahi-daemon is crashing when running "ping .local".
The crash is due to failing assertion from NULL pointer.
Add missing NULL pointer checks to fix it.
Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd |
no_prefix (const char *s)
{
static char buffer[2048];
static char *p = buffer;
char *cp = p;
int size = 3 + strlen (s) + 1; /* "no-STRING\0" */
assert(p + size <= buffer + sizeof (buffer));
cp[0] = 'n', cp[1] = 'o', cp[2] = '-';
strcpy (cp + 3, s);
p += size;
return cp;
} | 0 | [
"CWE-200"
] | wget | c125d24762962d91050d925fbbd9e6f30b2302f8 | 296,598,188,887,172,200,000,000,000,000,000,000,000 | 14 | Don't use extended attributes (--xattr) by default
* src/init.c (defaults): Set enable_xattr to false by default
* src/main.c (print_help): Reverse option logic of --xattr
* doc/wget.texi: Add description for --xattr
Users may not be aware that the origin URL and Referer are saved
including credentials, and possibly ... |
diff_mark_adjust_tp(
tabpage_T *tp,
int idx,
linenr_T line1,
linenr_T line2,
long amount,
long amount_after)
{
diff_T *dp;
diff_T *dprev;
diff_T *dnext;
int i;
int inserted, deleted;
int n, off;
linenr_T last;
linenr_T lnum_deleted = line1; // lnum of remainin... | 1 | [
"CWE-787"
] | vim | c101abff4c6756db4f5e740fde289decb9452efa | 301,020,465,168,183,440,000,000,000,000,000,000,000 | 258 | patch 8.2.5164: invalid memory access after diff buffer manipulations
Problem: Invalid memory access after diff buffer manipulations.
Solution: Use zero offset when change removes all lines in a diff block. |
AsyncWrap* JSStream::GetAsyncWrap() {
return static_cast<AsyncWrap*>(this);
} | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 84,209,979,187,633,500,000,000,000,000,000,000,000 | 3 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
static CImg<T> row_vector(const T& a0, const T& a1, const T& a2, const T& a3,
const T& a4, const T& a5, const T& a6, const T& a7,
const T& a8, const T& a9, const T& a10, const T& a11) {
CImg<T> r(12,1);
r[0] = a0; r[1] = a1; r[2] = a2; r[3] = a... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 149,354,222,699,840,760,000,000,000,000,000,000,000 | 8 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn)
{
kvm_pfn_t pfn;
pfn = gfn_to_pfn(kvm, gfn);
return kvm_pfn_to_page(pfn);
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 31,974,712,814,445,183,000,000,000,000,000,000,000 | 8 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
bool Item_name_const::fix_fields(THD *thd, Item **ref)
{
if ((!value_item->fixed &&
value_item->fix_fields(thd, &value_item)) ||
(!name_item->fixed &&
name_item->fix_fields(thd, &name_item)) ||
!value_item->const_item() ||
!name_item->const_item())
{
my_error(ER_RESERVED_SYNTAX, ... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 124,095,997,849,460,080,000,000,000,000,000,000,000 | 22 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
char* TTF_FontFaceFamilyName(const TTF_Font *font)
{
return font->face->family_name; | 0 | [
"CWE-190",
"CWE-787"
] | SDL_ttf | db1b41ab8bde6723c24b866e466cad78c2fa0448 | 8,524,172,480,292,757,000,000,000,000,000,000,000 | 4 | More integer overflow (see bug #187)
Make sure that 'width + alignment' doesn't overflow, otherwise
it could create a SDL_Surface of 'width' but with wrong 'pitch' |
int RGWPostObj_ObjStore::get_params()
{
if (s->expect_cont) {
/* OK, here it really gets ugly. With POST, the params are embedded in the
* request body, so we need to continue before being able to actually look
* at them. This diverts from the usual request flow. */
dump_continue(s);
s->expect_c... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 72,846,600,140,565,270,000,000,000,000,000,000,000 | 43 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
asmlinkage long compat_sys_keyctl(u32 option,
u32 arg2, u32 arg3, u32 arg4, u32 arg5)
{
switch (option) {
case KEYCTL_GET_KEYRING_ID:
return keyctl_get_keyring_ID(arg2, arg3);
case KEYCTL_JOIN_SESSION_KEYRING:
return keyctl_join_session_keyring(compat_ptr(arg2));
case KEYCTL_UPDATE:
return keyctl_upda... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 268,313,528,653,306,400,000,000,000,000,000,000,000 | 68 | 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... |
struct file *get_mm_exe_file(struct mm_struct *mm)
{
struct file *exe_file;
/* We need mmap_sem to protect against races with removal of
* VM_EXECUTABLE vmas */
down_read(&mm->mmap_sem);
exe_file = mm->exe_file;
if (exe_file)
get_file(exe_file);
up_read(&mm->mmap_sem);
return exe_file;
} | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 52,006,991,306,691,380,000,000,000,000,000,000,000 | 13 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
TYPED_TEST(MultiProtocolTest, StructA) {
StructA oldObject = makeStructALike<StructA>();
tablebased::StructA newObject = makeStructALike<tablebased::StructA>();
EXPECT_COMPATIBLE_PROTOCOL(oldObject, newObject, TypeParam);
} | 0 | [
"CWE-763"
] | fbthrift | bfda1efa547dce11a38592820916db01b05b9339 | 36,739,644,127,911,320,000,000,000,000,000,000,000 | 5 | Fix handling of invalid union data in table-based serializer
Summary:
Fix handling of invalid union data in the table-based serializer. Previously if the input contained duplicate union data, previous active member of the union was overwritten without calling the destructor of the old object, potentially causing a mem... |
static long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
loff_t length)
{
struct fuse_file *ff = file->private_data;
struct inode *inode = file_inode(file);
struct fuse_inode *fi = get_fuse_inode(inode);
struct fuse_conn *fc = ff->fc;
FUSE_ARGS(args);
struct fuse_fallocate_in inarg = {
.f... | 0 | [
"CWE-399",
"CWE-835"
] | linux | 3ca8138f014a913f98e6ef40e939868e1e9ea876 | 223,170,017,547,609,730,000,000,000,000,000,000,000 | 75 | fuse: break infinite loop in fuse_fill_write_pages()
I got a report about unkillable task eating CPU. Further
investigation shows, that the problem is in the fuse_fill_write_pages()
function. If iov's first segment has zero length, we get an infinite
loop, because we never reach iov_iter_advance() call.
Fix this by c... |
intrusive_ptr<Expression> ExpressionDateToString::optimize() {
_date = _date->optimize();
if (_timeZone) {
_timeZone = _timeZone->optimize();
}
if (_onNull) {
_onNull = _onNull->optimize();
}
if (_format) {
_format = _format->optimize();
}
if (ExpressionConstan... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 32,211,252,133,739,987,000,000,000,000,000,000,000 | 22 | SERVER-49404 Enforce additional checks in $arrayToObject |
irc_server_get_prefix_mode_for_char (struct t_irc_server *server,
char prefix_char)
{
const char *prefix_modes;
int index;
if (server)
{
prefix_modes = irc_server_get_prefix_modes (server);
index = irc_server_get_prefix_char_index (server, prefix_cha... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 2,303,094,212,938,095,300,000,000,000,000,000,000 | 16 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
int32_t ByteArray::Get(int32_t index,
byte_t* b,
int32_t offset,
int32_t length) {
assert(b);
if (index < 0 || index >= filled_length_) {
return 0;
}
int32_t actual_length = std::min<int32_t>(length, filled_length_ - index);
return Inter... | 0 | [
"CWE-119",
"CWE-703"
] | sfntly | c56b85408bab232efd7e650f0994272a174e3b92 | 101,919,997,414,200,600,000,000,000,000,000,000,000 | 11 | Add a bounds check to ByteArray::Get(). |
_dbus_getpid (void)
{
return getpid ();
} | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 106,438,922,936,810,100,000,000,000,000,000,000,000 | 4 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
int f2fs_merge_page_bio(struct f2fs_io_info *fio)
{
struct bio *bio = *fio->bio;
struct page *page = fio->encrypted_page ?
fio->encrypted_page : fio->page;
if (!f2fs_is_valid_blkaddr(fio->sbi, fio->new_blkaddr,
__is_meta_io(fio) ? META_GENERIC : DATA_GENERIC))
return -EFSCORRUPTED;
trace_f2fs_submit_page_... | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 264,270,761,729,494,520,000,000,000,000,000,000,000 | 41 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.