func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
TEST_F(QueryPlannerTest, RootedOrOfAndCollapseTwoScansButNotThird) {
addIndex(BSON("a" << 1 << "b" << 1));
addIndex(BSON("c" << 1 << "d" << 1));
runQuery(fromjson("{$or: [{a: 1, b: 2}, {c: 3, d: 4}, {a: 1, b: 2}]}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolu... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 28,195,936,180,963,260,000,000,000,000,000,000,000 | 14 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
set_mdic(E1000State *s, int index, uint32_t val)
{
uint32_t data = val & E1000_MDIC_DATA_MASK;
uint32_t addr = ((val & E1000_MDIC_REG_MASK) >> E1000_MDIC_REG_SHIFT);
if ((val & E1000_MDIC_PHY_MASK) >> E1000_MDIC_PHY_SHIFT != 1) // phy #
val = s->mac_reg[MDIC] | E1000_MDIC_ERROR;
else if (val & ... | 0 | [
"CWE-120"
] | qemu | b0d9ffcd0251161c7c92f94804dcf599dfa3edeb | 255,134,714,438,188,600,000,000,000,000,000,000,000 | 32 | e1000: Discard packets that are too long if !SBP and !LPE
The e1000_receive function for the e1000 needs to discard packets longer than
1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes
this behavior and allocates memory based on this assumption.
Signed-off-by: Michael Contreras <michael@inet... |
static ZEND_COLD void php_message_handler_for_zend(zend_long message, const void *data)
{
switch (message) {
case ZMSG_FAILED_INCLUDE_FOPEN:
php_error_docref("function.include", E_WARNING, "Failed opening '%s' for inclusion (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
... | 0 | [] | php-src | 9a07245b728714de09361ea16b9c6fcf70cb5685 | 247,843,377,794,090,630,000,000,000,000,000,000,000 | 79 | Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash |
static void rng_egd_opened(RngBackend *b, Error **errp)
{
RngEgd *s = RNG_EGD(b);
if (s->chr_name == NULL) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"chardev", "a valid character device");
return;
}
s->chr = qemu_chr_find(s->chr_name);
if (s->chr == NULL) ... | 0 | [
"CWE-119"
] | qemu | 60253ed1e6ec6d8e5ef2efe7bf755f475dce9956 | 260,174,818,000,925,500,000,000,000,000,000,000,000 | 26 | rng: add request queue support to rng-random
Requests are now created in the RngBackend parent class and the
code path is shared by both rng-egd and rng-random.
This commit fixes the rng-random implementation which processed
only one request at a time and simply discarded all but the most
recent one. In the guest thi... |
static inline int page_is_allowed(unsigned long pfn)
{
return devmem_is_allowed(pfn);
} | 0 | [
"CWE-200",
"CWE-732"
] | linux | a4866aa812518ed1a37d8ea0c881dc946409de94 | 67,620,641,637,627,830,000,000,000,000,000,000,000 | 4 | mm: Tighten x86 /dev/mem with zeroing reads
Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is
disallowed. However, on x86, the first 1MB was always allowed for BIOS
and similar things, regardless of it actually being System RAM. It was
possible for heap to end up getting allocated in low 1MB RAM, and ... |
static int io_files_update_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe)
{
if (unlikely(req->flags & (REQ_F_FIXED_FILE | REQ_F_BUFFER_SELECT)))
return -EINVAL;
if (sqe->ioprio || sqe->rw_flags)
return -EINVAL;
req->files_update.offset = READ_ONCE(sqe->off);
req->files_update.nr_args = READ_ONC... | 0 | [
"CWE-416"
] | linux | 6d816e088c359866f9867057e04f244c608c42fe | 93,122,407,896,677,630,000,000,000,000,000,000,000 | 15 | io_uring: hold 'ctx' reference around task_work queue + execute
We're holding the request reference, but we need to go one higher
to ensure that the ctx remains valid after the request has finished.
If the ring is closed with pending task_work inflight, and the
given io_kiocb finishes sync during issue, then we need a... |
static void bpf_prog_ksym_node_add(struct bpf_prog_aux *aux)
{
WARN_ON_ONCE(!list_empty(&aux->ksym_lnode));
list_add_tail_rcu(&aux->ksym_lnode, &bpf_kallsyms);
latch_tree_insert(&aux->ksym_tnode, &bpf_tree, &bpf_tree_ops);
} | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 298,953,524,475,842,030,000,000,000,000,000,000,000 | 6 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
static int mark_source_chains(const struct xt_table_info *newinfo,
unsigned int valid_hooks, void *entry0,
unsigned int *offsets)
{
unsigned int hook;
/* No recursion; use packet counter to save back ptrs (reset
* to 0 as we leave), and comefrom to save source hook bitmask.
*/
for (hook = 0; h... | 0 | [
"CWE-476"
] | linux | 57ebd808a97d7c5b1e1afb937c2db22beba3c1f8 | 298,603,863,520,918,700,000,000,000,000,000,000,000 | 90 | netfilter: add back stackpointer size checks
The rationale for removing the check is only correct for rulesets
generated by ip(6)tables.
In iptables, a jump can only occur to a user-defined chain, i.e.
because we size the stack based on number of user-defined chains we
cannot exceed stack size.
However, the underlyi... |
Comp_creator *comp_eq_creator(bool invert)
{
return invert?(Comp_creator *)&ne_creator:(Comp_creator *)&eq_creator;
} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 332,429,498,561,897,480,000,000,000,000,000,000,000 | 4 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
xmlParseReference(xmlParserCtxtPtr ctxt) {
xmlEntityPtr ent;
xmlChar *val;
int was_checked;
xmlNodePtr list = NULL;
xmlParserErrors ret = XML_ERR_OK;
if (RAW != '&')
return;
/*
* Simple case of a CharRef
*/
if (NXT(1) == '#') {
int i = 0;
xmlChar out[10];
int hex ... | 1 | [
"CWE-119"
] | libxml2 | 23f05e0c33987d6605387b300c4be5da2120a7ab | 111,657,334,277,237,680,000,000,000,000,000,000,000 | 398 | Detect excessive entities expansion upon replacement
If entities expansion in the XML parser is asked for,
it is possble to craft relatively small input document leading
to excessive on-the-fly content generation.
This patch accounts for those replacement and stop parsing
after a given threshold. it can be bypassed as... |
static int htab_lru_map_delete_elem(struct bpf_map *map, void *key)
{
struct bpf_htab *htab = container_of(map, struct bpf_htab, map);
struct hlist_nulls_head *head;
struct bucket *b;
struct htab_elem *l;
unsigned long flags;
u32 hash, key_size;
int ret;
WARN_ON_ONCE(!rcu_read_lock_held() && !rcu_read_lock_tra... | 0 | [
"CWE-787"
] | bpf | c4eb1f403243fc7bbb7de644db8587c03de36da6 | 175,865,174,838,957,100,000,000,000,000,000,000,000 | 35 | bpf: Fix integer overflow involving bucket_size
In __htab_map_lookup_and_delete_batch(), hash buckets are iterated
over to count the number of elements in each bucket (bucket_size).
If bucket_size is large enough, the multiplication to calculate
kvmalloc() size could overflow, resulting in out-of-bounds write
as repor... |
md_decode_utf8_before__(MD_CTX* ctx, OFF off)
{
if(!IS_UTF8_LEAD1(CH(off-1))) {
if(off > 1 && IS_UTF8_LEAD2(CH(off-2)) && IS_UTF8_TAIL(CH(off-1)))
return (((unsigned int)CH(off-2) & 0x1f) << 6) |
(((unsigned int)CH(off-1) & 0x3f) << 0);
if(... | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 88,952,176,290,720,870,000,000,000,000,000,000,000 | 21 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
static inline unsigned int ScaleQuantumToMap(const Quantum quantum)
{
if (quantum < 0.0)
return(0UL);
if ((quantum/65537) >= (Quantum) MaxMap)
return((unsigned int) MaxMap);
#if !defined(MAGICKCORE_HDRI_SUPPORT)
return((unsigned int) ((quantum+MagickULLConstant(32768))/
MagickULLConstant(65537)));
#el... | 1 | [
"CWE-190"
] | ImageMagick | 95d4e94e0353e503b71a53f5e6fad173c7c70c90 | 165,753,079,613,469,030,000,000,000,000,000,000,000 | 13 | https://github.com/ImageMagick/ImageMagick/issues/1751 |
static void gfar_configure_coalescing(struct gfar_private *priv,
unsigned long tx_mask, unsigned long rx_mask)
{
struct gfar __iomem *regs = priv->gfargrp[0].regs;
u32 __iomem *baddr;
if (priv->mode == MQ_MG_MODE) {
int i = 0;
baddr = ®s->txic0;
for_each_set_bit(i, &tx_mask, priv->num_tx_queues)... | 0 | [] | linux | d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f | 227,070,464,228,105,640,000,000,000,000,000,000,000 | 35 | gianfar: fix jumbo packets+napi+rx overrun crash
When using jumbo packets and overrunning rx queue with napi enabled,
the following sequence is observed in gfar_add_rx_frag:
| lstatus | | skb |
t | lstatus, size, flags | first | len, data_len, *... |
md5sum (uint8_t *buf, int len, int n_print_chars, struct gc_arena *gc)
{
uint8_t digest[MD5_DIGEST_LENGTH];
const md_kt_t *md5_kt = md_kt_get("MD5");
md_full(md5_kt, buf, len, digest);
return format_hex (digest, MD5_DIGEST_LENGTH, n_print_chars, gc);
} | 0 | [
"CWE-200"
] | openvpn | 11d21349a4e7e38a025849479b36ace7c2eec2ee | 126,354,122,131,948,100,000,000,000,000,000,000,000 | 9 | Use constant time memcmp when comparing HMACs in openvpn_decrypt.
Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Gert Doering <gert@greenie.muc.de> |
void dvvC_box_del(GF_Box *s)
{
GF_DOVIConfigurationBox *ptr = (GF_DOVIConfigurationBox*)s;
gf_free(ptr); | 0 | [
"CWE-476"
] | gpac | 586e817dcd531bb3e75438390f1f753cfe6e940a | 76,152,780,438,305,350,000,000,000,000,000,000,000 | 5 | fixed #2046 |
static struct vm_area_struct* hugetlb_vma(unsigned long addr, struct mm_walk *walk)
{
struct vm_area_struct *vma;
/* We don't need vma lookup at all. */
if (!walk->hugetlb_entry)
return NULL;
VM_BUG_ON(!rwsem_is_locked(&walk->mm->mmap_sem));
vma = find_vma(walk->mm, addr);
if (vma && vma->vm_start <= addr && ... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 6,562,129,362,867,093,000,000,000,000,000,000,000 | 15 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
PHP_FUNCTION(imageaffinematrixget)
{
double affine[6];
long type;
zval *options = NULL;
zval **tmp;
int res = GD_FALSE, i;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|z", &type, &options) == FAILURE) {
return;
}
switch((gdAffineStandardMatrix)type) {
case GD_AFFINE_TRANSLATE:
case GD_AFFINE... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 55,437,959,031,759,210,000,000,000,000,000,000,000 | 94 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
static int xudc_ep_enable(struct usb_ep *_ep,
const struct usb_endpoint_descriptor *desc)
{
struct xusb_ep *ep;
struct xusb_udc *udc;
unsigned long flags;
int ret;
if (!_ep || !desc || desc->bDescriptorType != USB_DT_ENDPOINT) {
pr_debug("%s: bad ep or descriptor\n", __func__);
return -EINVAL;
}
ep = ... | 0 | [
"CWE-20",
"CWE-129"
] | linux | 7f14c7227f342d9932f9b918893c8814f86d2a0d | 126,760,523,812,844,640,000,000,000,000,000,000,000 | 27 | USB: gadget: validate endpoint index for xilinx udc
Assure that host may not manipulate the index to point
past endpoint array.
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
void CairoOutputDev::fill(GfxState *state) {
if (inType3Char) {
GfxGray gray;
state->getFillGray(&gray);
if (colToDbl(gray) > 0.5)
return;
}
doPath (cairo, state, state->getPath());
cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
cairo_set_source (cairo, fill_pattern);
LOG(printf... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 152,998,970,959,350,000,000,000,000,000,000,000,000 | 25 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
CImg<T>& _draw_triangle(int x0, int y0,
int x1, int y1,
int x2, int y2,
const tc *const color, const float opacity,
const float brightness) {
if (y0>y1) cimg::swap(x0,x1,y0,y1);
if (y0>y2) cim... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 161,983,053,970,461,180,000,000,000,000,000,000,000 | 32 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
rgw_user& operator=(const string& str) {
from_str(str);
return *this;
} | 0 | [
"CWE-617"
] | ceph | b3118cabb8060a8cc6a01c4e8264cb18e7b1745a | 121,595,045,176,184,570,000,000,000,000,000,000,000 | 4 | rgw: Remove assertions in IAM Policy
A couple of them could be triggered by user input.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com> |
static inline void cil_reset_level(struct cil_level *level)
{
cil_reset_cats(level->cats);
} | 0 | [
"CWE-416"
] | selinux | f34d3d30c8325e4847a6b696fe7a3936a8a361f3 | 50,903,987,015,025,170,000,000,000,000,000,000,000 | 4 | libsepol/cil: Destroy classperms list when resetting classpermission
Nicolas Iooss reports:
A few months ago, OSS-Fuzz found a crash in the CIL compiler, which
got reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title
is misleading, or is caused by another issue that conflicts with... |
static int perf_event_set_bpf_prog(struct perf_event *event, u32 prog_fd)
{
return -ENOENT;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 214,372,141,949,163,150,000,000,000,000,000,000,000 | 4 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
static inline void set_max_mapnr(unsigned long limit)
{
max_mapnr = limit;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 219,340,613,684,851,540,000,000,000,000,000,000,000 | 4 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static inline void update_rice(APERice *rice, unsigned int x)
{
int lim = rice->k ? (1 << (rice->k + 4)) : 0;
rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
if (rice->ksum < lim)
rice->k--;
else if (rice->ksum >= (1 << (rice->k + 5)))
rice->k++;
} | 0 | [
"CWE-125"
] | FFmpeg | ba4beaf6149f7241c8bd85fe853318c2f6837ad0 | 178,771,668,790,897,500,000,000,000,000,000,000,000 | 10 | avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
void h2_task_register_hooks(void)
{
/* This hook runs on new connections before mod_ssl has a say.
* Its purpose is to prevent mod_ssl from touching our pseudo-connections
* for streams.
*/
ap_hook_pre_connection(h2_task_pre_conn,
NULL, mod_ssl, APR_HOOK_FIRST);
/* ... | 0 | [
"CWE-444"
] | mod_h2 | 825de6a46027b2f4c30d7ff5a0c8b852d639c207 | 266,432,574,604,670,200,000,000,000,000,000,000,000 | 28 | * Fixed keepalives counter on slave connections. |
const char * pgpValString(pgpValType type, uint8_t val)
{
pgpValTbl tbl = pgpValTable(type);
return (tbl != NULL) ? pgpValStr(tbl, val) : NULL;
} | 0 | [
"CWE-347",
"CWE-284"
] | rpm | bd36c5dc9fb6d90c46fbfed8c2d67516fc571ec8 | 260,021,051,801,338,700,000,000,000,000,000,000,000 | 5 | Validate and require subkey binding signatures on PGP public keys
All subkeys must be followed by a binding signature by the primary key
as per the OpenPGP RFC, enforce the presence and validity in the parser.
The implementation is as kludgey as they come to work around our
simple-minded parser structure without touc... |
static int futex_lock_pi_atomic(u32 __user *uaddr, struct futex_hash_bucket *hb,
union futex_key *key,
struct futex_pi_state **ps,
struct task_struct *task, int set_waiters)
{
int lock_taken, ret, ownerdied = 0;
u32 uval, newval, curval, vpid = task_pid_vnr(task);
retry:
ret = lock_taken = 0;
/*
* T... | 0 | [
"CWE-20"
] | linux | 6f7b0a2a5c0fb03be7c25bd1745baa50582348ef | 226,046,048,458,255,200,000,000,000,000,000,000,000 | 102 | futex: Forbid uaddr == uaddr2 in futex_wait_requeue_pi()
If uaddr == uaddr2, then we have broken the rule of only requeueing
from a non-pi futex to a pi futex with this call. If we attempt this,
as the trinity test suite manages to do, we miss early wakeups as
q.key is equal to key2 (because they are the same uaddr). ... |
_gnutls_compressed2ciphertext (gnutls_session_t session,
opaque * cipher_data, int cipher_size,
gnutls_datum_t compressed,
content_type_t _type, int random_pad)
{
uint8_t MAC[MAX_HASH_SIZE];
uint16_t c_length;
uint8_t pad;
int length, ret;
digest_hd_st td;
uint8_t type = _type;... | 0 | [
"CWE-189"
] | gnutls | bc8102405fda11ea00ca3b42acc4f4bce9d6e97b | 318,365,991,089,350,070,000,000,000,000,000,000,000 | 122 | Fix GNUTLS-SA-2008-1 security vulnerabilities.
See http://www.gnu.org/software/gnutls/security.html for updates. |
void teecore_init_pub_ram(void)
{
vaddr_t s;
vaddr_t e;
/* get virtual addr/size of NSec shared mem allcated from teecore */
core_mmu_get_mem_by_type(MEM_AREA_NSEC_SHM, &s, &e);
if (s >= e || s & SMALL_PAGE_MASK || e & SMALL_PAGE_MASK)
panic("invalid PUB RAM");
/* extra check: we could rely on core_mmu_get_... | 0 | [
"CWE-20",
"CWE-787"
] | optee_os | 95f36d661f2b75887772ea28baaad904bde96970 | 226,993,062,084,274,730,000,000,000,000,000,000,000 | 25 | core: tee_mmu_check_access_rights() check all pages
Prior to this patch tee_mmu_check_access_rights() checks an address in
each page of a supplied range. If both the start and length of that
range is unaligned the last page in the range is sometimes not checked.
With this patch the first address of each page in the ra... |
int transfer_args_to_stack(struct linux_binprm *bprm,
unsigned long *sp_location)
{
unsigned long index, stop, sp;
int ret = 0;
stop = bprm->p >> PAGE_SHIFT;
sp = *sp_location;
for (index = MAX_ARG_PAGES - 1; index >= stop; index--) {
unsigned int offset = index == stop ? bprm->p & ~PAGE_MASK : 0;
char... | 0 | [] | linux | 98da7d08850fb8bdeb395d6368ed15753304aa0c | 75,473,438,931,731,820,000,000,000,000,000,000,000 | 25 | fs/exec.c: account for argv/envp pointers
When limiting the argv/envp strings during exec to 1/4 of the stack limit,
the storage of the pointers to the strings was not included. This means
that an exec with huge numbers of tiny strings could eat 1/4 of the stack
limit in strings and then additional space would be lat... |
match_option(name, opt, dowild)
char *name;
option_t *opt;
int dowild;
{
int (*match) __P((char *, char **, int));
if (dowild != (opt->type == o_wild))
return 0;
if (!dowild)
return strcmp(name, opt->name) == 0;
match = (int (*) __P((char *, char **, int))) opt->addr;
return (*match)(name, NULL, 0... | 0 | [
"CWE-415",
"CWE-119"
] | ppp | 7658e8257183f062dc01f87969c140707c7e52cb | 102,178,496,090,557,470,000,000,000,000,000,000,000 | 14 | pppd: Eliminate potential integer overflow in option parsing
When we are reading in a word from an options file, we maintain a count
of the length we have seen so far in 'len', which is an int. When len
exceeds MAXWORDLEN - 1 (i.e. 1023) we cease storing characters in the
buffer but we continue to increment len. Sin... |
check_signature_token(const char *digest,
ssize_t digest_len,
directory_token_t *tok,
crypto_pk_t *pkey,
int flags,
const char *doctype)
{
char *signed_digest;
size_t keysize;
const int check_authority = ... | 0 | [
"CWE-119"
] | tor | d978216dea6b21ac38230a59d172139185a68dbd | 149,091,783,817,350,800,000,000,000,000,000,000,000 | 49 | Fix parsing bug with unecognized token at EOS
In get_token(), we could read one byte past the end of the
region. This is only a big problem in the case where the region
itself is (a) potentially hostile, and (b) not explicitly
nul-terminated.
This patch fixes the underlying bug, and also makes sure that the
one remai... |
static int lua_apr_touch(lua_State *L)
{
request_rec *r;
const char *path;
apr_status_t status;
apr_time_t mtime;
r = ap_lua_check_request_rec(L, 1);
luaL_checktype(L, 2, LUA_TSTRING);
path = lua_tostring(L, 2);
mtime = (apr_time_t)luaL_optnumber(L, 3, (lua_Number)apr_t... | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 14,545,167,335,924,496,000,000,000,000,000,000,000 | 15 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
array_init(&EX_T(opline->result.u.var).tmp_var);
if (IS_CONST == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CONST != IS_UNUSED
} else {
return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONS... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 235,581,908,152,815,100,000,000,000,000,000,000,000 | 13 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void WebContents::RendererUnresponsive(
content::WebContents* source,
content::RenderWidgetHost* render_widget_host,
base::RepeatingClosure hang_monitor_restarter) {
Emit("unresponsive");
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 59,044,440,273,357,310,000,000,000,000,000,000,000 | 6 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
unset_addr_list_end(UnsetAddrList* list)
{
if (IS_NOT_NULL(list->us))
xfree(list->us);
} | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 242,735,156,147,038,040,000,000,000,000,000,000,000 | 5 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
ZCNoteEncryption::Ciphertext SproutNotePlaintext::encrypt(ZCNoteEncryption& encryptor,
const uint256& pk_enc
) const
{
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
ss << (*this);
ZCNoteEncryption::Plain... | 0 | [
"CWE-755",
"CWE-787"
] | zcash | c1fbf8ab5d73cff5e1f45236995857c75ba4128d | 145,442,750,558,529,520,000,000,000,000,000,000,000 | 15 | Ignore exceptions when deserializing note plaintexts |
static struct sk_buff *codel_dequeue_func(struct codel_vars *cvars,
void *ctx)
{
struct ieee80211_local *local;
struct txq_info *txqi;
struct fq *fq;
struct fq_flow *flow;
txqi = ctx;
local = vif_to_sdata(txqi->txq.vif)->local;
fq = &local->fq;
if (cvars == &txqi->def_cvars)
flow = &txqi->tin.default... | 0 | [
"CWE-476"
] | linux | bddc0c411a45d3718ac535a070f349be8eca8d48 | 35,735,403,632,707,093,000,000,000,000,000,000,000 | 19 | mac80211: Fix NULL ptr deref for injected rate info
The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx
queue") moved the code to validate the radiotap header from
ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is
possible to share more code with the new Tx queue selecti... |
R_API bool r_io_bank_read_at(RIO *io, const ut32 bankid, ut64 addr, ut8 *buf, int len) {
RIOBank *bank = r_io_bank_get (io, bankid);
r_return_val_if_fail (io && bank, false);
RIOSubMap fake_sm;
memset (&fake_sm, 0x00, sizeof(RIOSubMap));
fake_sm.itv.addr = addr;
fake_sm.itv.size = len;
RRBNode *node;
if (bank->... | 0 | [
"CWE-416"
] | radare2 | b5cb90b28ec71fda3504da04e3cc94a362807f5e | 242,218,984,007,154,400,000,000,000,000,000,000,000 | 39 | Prefer memleak over usaf in io.bank's rbtree bug ##crash
* That's a workaround, proper fix will come later
* Reproducer: bins/fuzzed/iobank-crash
* Reported by Akyne Choi via huntr.dev |
static int core_check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
{
int rv = OK;
while (s) {
if (check_errorlog_dir(ptemp, s) != OK)
rv = !OK;
s = s->next;
}
return rv;
} | 0 | [
"CWE-416",
"CWE-284"
] | httpd | 4cc27823899e070268b906ca677ee838d07cf67a | 312,833,448,504,841,480,000,000,000,000,000,000,000 | 10 | core: Disallow Methods' registration at run time (.htaccess), they may be
used only if registered at init time (httpd.conf).
Calling ap_method_register() in children processes is not the right scope
since it won't be shared for all requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7... |
X509 *d2i_X509_bio(BIO *bp, X509 **x509)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509), bp, x509);
} | 0 | [
"CWE-310"
] | openssl | 684400ce192dac51df3d3e92b61830a6ef90be3e | 141,121,115,672,983,560,000,000,000,000,000,000,000 | 4 | Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. t... |
bool Item::cache_const_expr_analyzer(uchar **arg)
{
bool *cache_flag= (bool*)*arg;
if (!*cache_flag)
{
Item *item= real_item();
/*
Cache constant items unless it's a basic constant, constant field or
a subselect (they use their own cache).
*/
if (const_item() &&
!(basic_const_i... | 1 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 113,515,258,404,427,050,000,000,000,000,000,000,000 | 26 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
tensorflow::gtl::FlatMap<string, AttrToInputsMap*>* GetAllAttrToInputsMaps() {
static auto* all_attr_to_input_maps =
new tensorflow::gtl::FlatMap<string, AttrToInputsMap*>;
return all_attr_to_input_maps;
} | 0 | [
"CWE-476",
"CWE-908"
] | tensorflow | 237822b59fc504dda2c564787f5d3ad9c4aa62d9 | 215,037,411,398,488,870,000,000,000,000,000,000,000 | 5 | Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types.
When iterating through the tensor to extract shape values, an underlying missing kernel
(`StridedSlice` for quantized types) causes an error, which then results in a `nullptr`
being passed to `ParseDimensionValue()`, causing a segfault.
The... |
FLAC_API FLAC__bool FLAC__stream_decoder_get_decode_position(const FLAC__StreamDecoder *decoder, FLAC__uint64 *position)
{
FLAC__ASSERT(0 != decoder);
FLAC__ASSERT(0 != decoder->private_);
FLAC__ASSERT(0 != position);
#if FLAC__HAS_OGG
if(decoder->private_->is_ogg)
return false;
#endif
if(0 == decoder->private_... | 0 | [
"CWE-119"
] | flac | 5b3033a2b355068c11fe637e14ac742d273f076e | 1,947,341,262,094,333,500,000,000,000,000,000,000 | 21 | src/libFLAC/stream_decoder.c : Fix buffer read overflow.
This is CVE-2014-8962.
Reported-by: Michele Spagnuolo,
Google Security Team <mikispag@google.com> |
finish_verify_padata(void *arg, krb5_error_code code,
krb5_kdcpreauth_modreq modreq, krb5_pa_data **e_data,
krb5_authdata **authz_data)
{
struct padata_state *state = arg;
const char *emsg;
krb5_boolean typed_e_data_flag;
assert(state);
*state->modreq_ptr =... | 0 | [
"CWE-617"
] | krb5 | 94e5eda5bb94d1d44733a49c3d9b6d1e42c74def | 127,414,802,438,621,520,000,000,000,000,000,000,000 | 75 | Remove incorrect KDC assertion
The assertion in return_enc_padata() is reachable because
kdc_make_s4u2self_rep() may have previously added encrypted padata.
It is no longer necessary because the code uses add_pa_data_element()
instead of allocating a new list.
CVE-2018-20217:
In MIT krb5 1.8 or later, an authenticat... |
int samdb_result_effective_badPwdCount(struct ldb_context *sam_ldb,
TALLOC_CTX *mem_ctx,
struct ldb_dn *domain_dn,
const struct ldb_message *user_msg)
{
struct timeval tv_now = timeval_current();
NTTIME now = timeval_to_nttime(&tv_now);
int64_t lockOutObservationWindow;
struct ldb_r... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 270,636,988,260,846,040,000,000,000,000,000,000,000 | 30 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
display_open(gx_device * dev)
{
gx_device_display *ddev = (gx_device_display *) dev;
int ccode;
/* Erase these, in case we are opening a copied device. */
ddev->mdev = NULL;
ddev->pBitmap = NULL;
ddev->ulBitmapSize = 0;
/* Allow device to be opened "disabled" without a callback. */
/* ... | 0 | [] | ghostpdl | 1ef5f08f2c2e27efa978f0010669ff22355c385f | 29,123,859,990,243,150,000,000,000,000,000,000,000 | 63 | Fix display device DisplayFormat=16#a0800 (Separation mode) broken by f2cf6829
The ICC profile checking needs to be told that the device supports_devn, so
add a spec_op proc to return true when in separation mode, and add a proc for
fill_rectangle_hl_color so that fillpage will work in Separation mode.
This was fixed... |
static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs)
{
struct scatterlist sg;
struct virtio_net_ctrl_mq s;
struct net_device *dev = vi->dev;
if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ))
return 0;
s.virtqueue_pairs = cpu_to_virtio16(vi->vdev, queue_pairs);
sg_init_one(... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39 | 197,162,291,354,941,740,000,000,000,000,000,000,000 | 26 | virtio-net: drop NETIF_F_FRAGLIST
virtio declares support for NETIF_F_FRAGLIST, but assumes
that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
always true with a fraglist.
A longer fraglist in the skb will make the call to skb_to_sgvec overflow
the sg array, leading to memory corruption.
Drop NETIF_F_FRA... |
static int hidg_bind(struct usb_configuration *c, struct usb_function *f)
{
struct usb_ep *ep;
struct f_hidg *hidg = func_to_hidg(f);
struct usb_string *us;
struct device *device;
int status;
dev_t dev;
/* maybe allocate device-global string IDs, and patch descriptors */
us = usb_gstrings_attach(c->cdev... | 0 | [
"CWE-703",
"CWE-667",
"CWE-189"
] | linux | 072684e8c58d17e853f8e8b9f6d9ce2e58d2b036 | 155,988,994,055,716,410,000,000,000,000,000,000,000 | 105 | USB: gadget: f_hid: fix deadlock in f_hidg_write()
In f_hidg_write() the write_spinlock is acquired before calling
usb_ep_queue() which causes a deadlock when dummy_hcd is being used.
This is because dummy_queue() callbacks into f_hidg_req_complete() which
tries to acquire the same spinlock. This is (part of) the back... |
cdata_read (cdata_t *cd, guint8 res_data, gint comptype,
GDataInputStream *in, GCancellable *cancellable, GError **error)
{
gboolean success = FALSE;
int ret, zret = Z_OK;
gint compression = comptype & GCAB_COMPRESSION_MASK;
gsize buf_sz;
guint8 *buf = NULL;
guint32 datacsum;
gu... | 0 | [
"CWE-787"
] | gcab | bd2abee5f0a9b5cbe3a1ab1f338c4fb8f6ca797b | 60,618,931,803,306,570,000,000,000,000,000,000,000 | 149 | Do not crash when ncbytes is larger than the buffer size
This fixes CVE-2018-5345 |
static void test_fetch_bigint()
{
int rc;
myheader("test_fetch_bigint");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_fetch");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE test_bind_fetch(c1 bigint, \
c2 bigint, \
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 326,109,849,913,578,540,000,000,000,000,000,000,000 | 21 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
virDomainDefHasOldStyleUEFI(const virDomainDef *def)
{
return def->os.loader &&
def->os.loader->type == VIR_DOMAIN_LOADER_TYPE_PFLASH;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 261,361,221,991,688,100,000,000,000,000,000,000,000 | 5 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
sort_regions (struct rsvd_region *rsvd_region, int max)
{
int j;
/* simple bubble sorting */
while (max--) {
for (j = 0; j < max; ++j) {
if (rsvd_region[j].start > rsvd_region[j+1].start) {
struct rsvd_region tmp;
tmp = rsvd_region[j];
rsvd_region[j] = rsvd_region[j + 1];
rsvd_region[j + 1] = t... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4dcc29e1574d88f4465ba865ed82800032f76418 | 236,334,520,852,303,070,000,000,000,000,000,000,000 | 16 | [IA64] Workaround for RSE issue
Problem: An application violating the architectural rules regarding
operation dependencies and having specific Register Stack Engine (RSE)
state at the time of the violation, may result in an illegal operation
fault and invalid RSE state. Such faults may initiate a cascade of
repeated ... |
static void xhci_mfwrap_update(XHCIState *xhci)
{
const uint32_t bits = USBCMD_RS | USBCMD_EWE;
uint32_t mfindex, left;
int64_t now;
if ((xhci->usbcmd & bits) == bits) {
now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
mfindex = ((now - xhci->mfindex_start) / 125000) & 0x3fff;
left ... | 0 | [
"CWE-835"
] | qemu | 96d87bdda3919bb16f754b3d3fd1227e1f38f13c | 236,195,357,666,699,300,000,000,000,000,000,000,000 | 15 | xhci: guard xhci_kick_epctx against recursive calls
Track xhci_kick_epctx processing being active in a variable. Check the
variable before calling xhci_kick_epctx from xhci_kick_ep. Add an
assert to make sure we don't call recursively into xhci_kick_epctx.
Cc: 1653384@bugs.launchpad.net
Fixes: 94b037f2a451b3dc855f9... |
Crow(Ts&&... ts):
middlewares_(make_middleware_tuple(std::forward<Ts>(ts)...))
{} | 0 | [
"CWE-416"
] | Crow | fba01dc76d6ea940ad7c8392e8f39f9647241d8e | 330,493,161,290,758,650,000,000,000,000,000,000,000 | 3 | Prevent HTTP pipelining which Crow doesn't support. |
bool check_valid_path(const char *path, size_t len)
{
size_t prefix= my_strcspn(files_charset_info, path, path + len, FN_DIRSEP);
return prefix < len;
} | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 309,318,623,512,409,660,000,000,000,000,000,000,000 | 5 | MDEV-26323 use-after-poison issue of MariaDB server |
int tty_prepare_flip_string_flags(struct tty_struct *tty,
unsigned char **chars, char **flags, size_t size)
{
int space = tty_buffer_request_room(tty, size);
if (likely(space)) {
struct tty_buffer *tb = tty->buf.tail;
*chars = tb->char_buf_ptr + tb->used;
*flags = tb->flag_buf_ptr + tb->used;
tb->used += s... | 1 | [] | linux | c56a00a165712fd73081f40044b1e64407bb1875 | 270,866,869,149,248,030,000,000,000,000,000,000,000 | 12 | tty: hold lock across tty buffer finding and buffer filling
tty_buffer_request_room is well protected, but while after it returns,
it releases the port->lock. tty->buf.tail might be modified
by either irq handler or other threads. The patch adds more protection
by holding the lock across tty buffer finding and buffer... |
static int bogus_option_value(char *val, const char *s)
{
if (val) {
ntfs_log_error("'%s' option shouldn't have value.\n", s);
return -1;
}
return 0;
} | 0 | [
"CWE-200"
] | ntfs-3g | 7f81935f32e58e8fec22bc46683b1b067469405f | 218,252,744,737,798,230,000,000,000,000,000,000,000 | 8 | Returned an error code when the --help or --version options are used
Accepting --help or --version options may leave the ntfs-3g process in an
unclean state, so reject them while processing options. Also reject
them in libfuse-lite. |
virtual bool find_item_processor(uchar *arg) { return this == (void *) arg; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 269,336,683,719,373,220,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
bson_iter_init_find_w_len (bson_iter_t *iter, /* INOUT */
const bson_t *bson, /* IN */
const char *key, /* IN */
int keylen) /* IN */
{
BSON_ASSERT (iter);
BSON_ASSERT (bson);
BSON_ASSERT (key);
return bson_iter_in... | 0 | [
"CWE-125"
] | mongo-c-driver | 0d9a4d98bfdf4acd2c0138d4aaeb4e2e0934bd84 | 69,979,806,079,320,410,000,000,000,000,000,000,000 | 12 | Fix for CVE-2018-16790 -- Verify bounds before binary length read.
As reported here: https://jira.mongodb.org/browse/CDRIVER-2819,
a heap overread occurs due a failure to correctly verify data
bounds.
In the original check, len - o returns the data left including the
sizeof(l) we just read. Instead, the comparison sh... |
static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
#define WriteRunlengthPacket(image,pixel,length,p) \
{ \
if ((image->alpha_trait != UndefinedPixelTrait) && (length != 0) && \
(GetPixelAlpha(image,p) == (Quantum) TransparentAlpha)) \
{ \
q=P... | 0 | [
"CWE-399",
"CWE-401"
] | ImageMagick | 35ccb468ee2dcbe8ce9cf1e2f1957acc27f54c34 | 135,169,483,867,381,290,000,000,000,000,000,000,000 | 1,121 | https://github.com/ImageMagick/ImageMagick/issues/1601 |
TfLiteStatus Subgraph::CheckTensorIndices(const char* label, const int* indices,
int length) {
// Making sure kTfLiteOptionalTensor is not re-defined to something other than
// -1.
static_assert(kTfLiteOptionalTensor == -1,
"kTfLiteOptionalTensor should be... | 0 | [
"CWE-20",
"CWE-787"
] | tensorflow | d58c96946b2880991d63d1dacacb32f0a4dfa453 | 50,966,818,403,412,800,000,000,000,000,000,000,000 | 24 | [tflite] Ensure inputs and outputs don't overlap.
If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen.
PiperOrigin-RevId: 332522916
Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a |
archive_seek_data(struct archive *_a, int64_t offset, int whence)
{
struct archive_read *a = (struct archive_read *)_a;
archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_DATA,
"archive_seek_data_block");
if (a->format->seek_data == NULL) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_PROGRAMMER,
... | 0 | [
"CWE-125"
] | libarchive | e6c9668f3202215ddb71617b41c19b6f05acf008 | 131,773,174,906,760,330,000,000,000,000,000,000,000 | 15 | Add a check to archive_read_filter_consume to reject any
attempts to move the file pointer by a negative amount.
Note: Either this or commit 3865cf2 provides a fix for
Issue 394. |
static inline void range_dec_normalize(APEContext *ctx)
{
while (ctx->rc.range <= BOTTOM_VALUE) {
ctx->rc.buffer <<= 8;
if(ctx->ptr < ctx->data_end) {
ctx->rc.buffer += *ctx->ptr;
ctx->ptr++;
} else {
ctx->error = 1;
}
ctx->rc.low = (ctx... | 0 | [
"CWE-125"
] | FFmpeg | ba4beaf6149f7241c8bd85fe853318c2f6837ad0 | 232,543,740,394,047,250,000,000,000,000,000,000,000 | 14 | avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static void srpt_free_ioctx_ring(struct srpt_ioctx **ioctx_ring,
struct srpt_device *sdev, int ring_size,
int dma_size, enum dma_data_direction dir)
{
int i;
for (i = 0; i < ring_size; ++i)
srpt_free_ioctx(sdev, ioctx_ring[i], dma_size, dir);
kfree(ioctx_ring);
} | 0 | [
"CWE-200",
"CWE-476"
] | linux | 51093254bf879bc9ce96590400a87897c7498463 | 291,130,893,555,158,400,000,000,000,000,000,000,000 | 10 | IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.
This patch fixes the following kernel crash:
BUG: unable to handle kernel NULL pointer... |
static u32 ieee80211_idle_on(struct ieee80211_local *local)
{
if (local->hw.conf.flags & IEEE80211_CONF_IDLE)
return 0;
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
wiphy_debug(local->hw.wiphy, "device now idle\n");
#endif
drv_flush(local, false);
local->hw.conf.flags |= IEEE80211_CONF_IDLE;
return IEEE80211_CONF_CHA... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 25,290,499,396,430,337,000,000,000,000,000,000,000 | 14 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
pdf14_clist_text_begin(gx_device * dev, gs_gstate * pgs,
const gs_text_params_t * text, gs_font * font,
gx_path * path, const gx_device_color * pdcolor,
const gx_clip_path * pcpath, gs_memory_t * memory,
gs_text_enum_t ** ppenum)
{
pdf14_clist_devi... | 0 | [
"CWE-416"
] | ghostpdl | 90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb | 326,776,795,463,455,920,000,000,000,000,000,000,000 | 28 | Bug 697456. Dont create new ctx when pdf14 device reenabled
This bug had yet another weird case where the user created a
file that pushed the pdf14 device twice. We were in that case,
creating a new ctx and blowing away the original one with out
proper clean up. To avoid, only create a new one when we need it. |
TEST_F(QueryPlannerTest, MaxMinSort) {
addIndex(BSON("a" << 1));
// Run an empty query, sort {a: 1}, max/min arguments.
runQueryFull(BSONObj(),
fromjson("{a: 1}"),
BSONObj(),
0,
0,
BSONObj(),
fromjson("{a:... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 171,731,007,345,135,020,000,000,000,000,000,000,000 | 16 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
dissect_kafka_describe_config_request_resource(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset, kafka_api_version_t api_version)
{
proto_item *subti, *subsubti;
proto_tree *subtree, *subsubtree;
subtree = proto_tree_add_subtree(tree, tvb, offset, -1,... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 264,833,465,214,849,580,000,000,000,000,000,000,000 | 22 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
void gdImageSkewY (gdImagePtr dst, gdImagePtr src, int uCol, int iOffset, double dWeight, int clrBack)
{
typedef int (*FuncPtr)(gdImagePtr, int, int);
int i, iYPos=0, r, g, b, a;
FuncPtr f;
int pxlOldLeft, pxlLeft=0, pxlSrc;
if (src->trueColor) {
f = gdImageGetTrueColorPixel;
} else {
f = gdImageGetPixel;
}... | 0 | [
"CWE-119"
] | php-src | feba44546c27b0158f9ac20e72040a224b918c75 | 61,096,628,204,917,740,000,000,000,000,000,000,000 | 78 | Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()). |
GF_Box *paen_New()
{
ISOM_DECL_BOX_ALLOC(FDPartitionEntryBox, GF_ISOM_BOX_TYPE_PAEN);
return (GF_Box *)tmp;
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 23,805,025,693,019,960,000,000,000,000,000,000,000 | 5 | fixed 2 possible heap overflows (inc. #1088) |
void intel_engine_get_instdone(const struct intel_engine_cs *engine,
struct intel_instdone *instdone)
{
struct drm_i915_private *i915 = engine->i915;
const struct sseu_dev_info *sseu = &engine->gt->info.sseu;
struct intel_uncore *uncore = engine->uncore;
u32 mmio_base = engine->mmio_base;
int slice;
int... | 0 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 63,551,151,119,629,150,000,000,000,000,000,000,000 | 68 | drm/i915/guc: Update to use firmware v49.0.1
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer d... |
tiff_from_name(gx_device_xps *dev, const char *name, int big_endian, bool usebigtiff)
{
char mode[5] = "w";
int modelen = 1;
TIFF *t;
tifs_io_xps *tiffio;
gs_memory_t *mem = dev->memory->non_gc_memory;
char *filename;
if (big_endian)
mode[modelen++] = 'b';
else
mode[mode... | 0 | [] | ghostpdl | 94d8955cb7725eb5f3557ddc02310c76124fdd1a | 149,778,113,550,834,160,000,000,000,000,000,000,000 | 44 | Bug 701818: better handling of error during PS/PDF image
In the xps device, if an error occurred after xps_begin_image() but before
xps_image_end_image(), *if* the Postscript had called 'restore' as part of the
error handling, the image enumerator would have been freed (by the restore)
despite the xps device still hol... |
TfLiteStatus EvalType<bool>(TfLiteContext* context, TfLiteNode* node,
OpContext* op_context, ReduceType reduce_type) {
switch (reduce_type) {
case kAny:
return EvalLogic<bool>(context, node, op_context, false,
[](const bool current, const bool in) -> ... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 68,151,283,907,820,850,000,000,000,000,000,000,000 | 13 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
xsltTestCompMatchList(xsltTransformContextPtr ctxt, xmlNodePtr node,
xsltCompMatchPtr comp) {
int ret;
if ((ctxt == NULL) || (node == NULL))
return(-1);
while (comp != NULL) {
ret = xsltTestCompMatch(ctxt, comp, node, NULL, NULL);
if (ret == 1)
return(1);
comp = comp->next;
}
... | 0 | [
"CWE-125"
] | libxslt | fe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b | 265,426,618,051,515,900,000,000,000,000,000,000,000 | 14 | Fix some case of pattern parsing errors
We could accidentally hit an off by one string array access
due to improper loop exit when parsing patterns |
static void vhost_vdpa_va_unmap(struct vhost_vdpa *v, u64 start, u64 last)
{
struct vhost_dev *dev = &v->vdev;
struct vhost_iotlb *iotlb = dev->iotlb;
struct vhost_iotlb_map *map;
struct vdpa_map_file *map_file;
while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) {
map_file = (struct vdpa_map_fi... | 0 | [
"CWE-190"
] | linux | 870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0 | 239,884,941,801,409,000,000,000,000,000,000,000,000 | 14 | vdpa: clean up get_config_size ret value handling
The return type of get_config_size is size_t so it makes
sense to change the type of the variable holding its result.
That said, this already got taken care of (differently, and arguably
not as well) by commit 3ed21c1451a1 ("vdpa: check that offsets are
within bounds"... |
set_dlen(E1000State *s, int index, uint32_t val)
{
s->mac_reg[index] = val & 0xfff80;
} | 0 | [
"CWE-120"
] | qemu | b0d9ffcd0251161c7c92f94804dcf599dfa3edeb | 303,992,468,340,719,260,000,000,000,000,000,000,000 | 4 | e1000: Discard packets that are too long if !SBP and !LPE
The e1000_receive function for the e1000 needs to discard packets longer than
1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes
this behavior and allocates memory based on this assumption.
Signed-off-by: Michael Contreras <michael@inet... |
static int irda_sendmsg_ultra(struct socket *sock, struct msghdr *msg,
size_t len)
{
struct sock *sk = sock->sk;
struct irda_sock *self;
__u8 pid = 0;
int bound = 0;
struct sk_buff *skb;
int err;
pr_debug("%s(), len=%zd\n", __func__, len);
err = -EINVAL;
if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_... | 0 | [] | net | 79462ad02e861803b3840cc782248c7359451cd9 | 96,617,722,591,971,060,000,000,000,000,000,000,000 | 92 | net: add validation for the socket syscall protocol argument
郭永刚 reported that one could simply crash the kernel as root by
using a simple program:
int socket_fd;
struct sockaddr_in addr;
addr.sin_port = 0;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_family = 10;
socket_fd = socket(10,3,0x40000000);
connect(s... |
void ext4_mark_bitmap_end(int start_bit, int end_bit, char *bitmap)
{
int i;
if (start_bit >= end_bit)
return;
ext4_debug("mark end bits +%d through +%d used\n", start_bit, end_bit);
for (i = start_bit; i < ((start_bit + 7) & ~7UL); i++)
ext4_set_bit(i, bitmap);
if (i < end_bit)
memset(bitmap + (i >> 3), 0... | 0 | [] | linux | 7dac4a1726a9c64a517d595c40e95e2d0d135f6f | 174,161,412,388,917,300,000,000,000,000,000,000,000 | 13 | ext4: add validity checks for bitmap block numbers
An privileged attacker can cause a crash by mounting a crafted ext4
image which triggers a out-of-bounds read in the function
ext4_valid_block_bitmap() in fs/ext4/balloc.c.
This issue has been assigned CVE-2018-1093.
BugLink: https://bugzilla.kernel.org/show_bug.cgi... |
int SSL_set_purpose(SSL *s, int purpose)
{
return X509_VERIFY_PARAM_set_purpose(s->param, purpose);
} | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 169,892,239,500,492,490,000,000,000,000,000,000,000 | 4 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
void address_space_destroy_dispatch(AddressSpace *as)
{
AddressSpaceDispatch *d = as->dispatch;
atomic_rcu_set(&as->dispatch, NULL);
if (d) {
call_rcu(d, address_space_dispatch_free, rcu);
}
} | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 198,094,522,771,363,320,000,000,000,000,000,000,000 | 9 | exec: Respect as_tranlsate_internal length clamp
address_space_translate_internal will clamp the *plen length argument
based on the size of the memory region being queried. The iommu walker
logic in addresss_space_translate was ignoring this by discarding the
post fn call value of *plen. Fix by just always using *plen... |
void process_node(const FeatureMap& f_map,
std::vector<int32>* output_node_ids,
std::vector<float>* output_gains,
std::vector<int32>* output_feature_dimensions,
std::vector<int32>* output_thresholds,
std::vector<float>... | 0 | [
"CWE-125",
"CWE-369"
] | tensorflow | e84c975313e8e8e38bb2ea118196369c45c51378 | 66,915,012,457,507,650,000,000,000,000,000,000,000 | 123 | In tf.raw_ops.BoostedTreesSparseCalculateBestFeatureSplit, limit stat_dim in stats_summary_indices to under stats_dims in stats_summary_shape
PiperOrigin-RevId: 387171191
Change-Id: I83ca8a75b22aa78c037e8b98779da6cced16bfaa |
static int pptp_connect(struct triton_md_handler_t *h)
{
struct sockaddr_in addr;
socklen_t size = sizeof(addr);
int sock;
struct pptp_conn_t *conn;
while(1) {
sock = accept(h->fd, (struct sockaddr *)&addr, &size);
if (sock < 0) {
if (errno == EAGAIN)
return 0;
log_error("pptp: accept failed: %s\n"... | 0 | [
"CWE-787"
] | accel-ppp | a0b8bfc4e74ff31b15ccfa6c626e3bbc591ba98f | 116,901,543,894,248,100,000,000,000,000,000,000,000 | 103 | Fix post_msg implementation bug
I think the error handling code of `post_msg` is wrongly implemented due to coding typo. The `EPIPE` should be also considered and then return -1, just like `PPTP_write`:
https://github.com/xebd/accel-ppp/blob/1b8711cf75a7c278d99840112bc7a396398e0205/accel-pppd/ctrl/pptp/pptp.c#L539-L5... |
rsvg_node_set_atts (RsvgNode * node, RsvgHandle * ctx, RsvgPropertyBag * atts)
{
node->set_atts (node, ctx, atts);
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 49,162,365,197,618,070,000,000,000,000,000,000,000 | 4 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
ASN1_TIME* X509_get_notBefore(X509* x)
{
if (x) return x->GetBefore();
return 0;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 190,994,624,102,764,460,000,000,000,000,000,000,000 | 5 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static int compat_rawv6_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, unsigned int optlen)
{
switch (level) {
case SOL_RAW:
break;
case SOL_ICMPV6:
if (inet_sk(sk)->inet_num != IPPROTO_ICMPV6)
return -EOPNOTSUPP;
return rawv6_seticmpfilter(sk, level, optname, optval, optlen... | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 317,644,580,249,153,620,000,000,000,000,000,000,000 | 19 | inet: prevent leakage of uninitialized memory to user in recv syscalls
Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called wit... |
bool HttpsUpstream::push_enabled() const { return false; } | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 56,654,941,923,434,280,000,000,000,000,000,000,000 | 1 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
xml_start(struct archive_read *a, const char *name, struct xmlattr_list *list)
{
struct xar *xar;
struct xmlattr *attr;
xar = (struct xar *)(a->format->data);
#if DEBUG
fprintf(stderr, "xml_sta:[%s]\n", name);
for (attr = list->first; attr != NULL; attr = attr->next)
fprintf(stderr, " attr:\"%s\"=\"%s\"\n",... | 0 | [
"CWE-125"
] | libarchive | fa7438a0ff4033e4741c807394a9af6207940d71 | 65,503,048,165,100,380,000,000,000,000,000,000,000 | 279 | Do something sensible for empty strings to make fuzzers happy. |
int StreamBase::WriteString(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
CHECK(args[0]->IsObject());
CHECK(args[1]->IsString());
Local<Object> req_wrap_obj = args[0].As<Object>();
Local<String> string = args[1].As<String>();
Local<Object> send_handle_obj;
i... | 0 | [
"CWE-416"
] | node | 4f8772f9b731118628256189b73cd202149bbd97 | 92,093,283,735,125,220,000,000,000,000,000,000,000 | 104 | src: retain pointers to WriteWrap/ShutdownWrap
Avoids potential use-after-free when wrap req's are synchronously
destroyed.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103
PR-URL: https://github.com/nodejs-private/... |
dup_point_edwards (mpi_point_t result, mpi_point_t point, mpi_ec_t ctx)
{
#define X1 (point->x)
#define Y1 (point->y)
#define Z1 (point->z)
#define X3 (result->x)
#define Y3 (result->y)
#define Z3 (result->z)
#define B (ctx->t.scratch[0])
#define C (ctx->t.scratch[1])
#define D (ctx->t.scratch[2])
#define E (ctx->t.scr... | 0 | [
"CWE-200"
] | libgcrypt | 88e1358962e902ff1cbec8d53ba3eee46407851a | 55,343,068,444,775,840,000,000,000,000,000,000,000 | 72 | ecc: Constant-time multiplication for Weierstrass curve.
* mpi/ec.c (_gcry_mpi_ec_mul_point): Use simple left-to-right binary
method for Weierstrass curve when SCALAR is secure. |
int platform_pm_thaw(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;
if (!drv)
return 0;
if (drv->pm) {
if (drv->pm->thaw)
ret = drv->pm->thaw(dev);
} else {
ret = platform_legacy_resume(dev);
}
return ret;
} | 0 | [
"CWE-362",
"CWE-284"
] | linux | 6265539776a0810b7ce6398c27866ddb9c6bd154 | 117,063,454,973,791,910,000,000,000,000,000,000,000 | 17 | driver core: platform: fix race condition with driver_override
The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.
Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive... |
try_open_stat_done (SoupSession *session,
SoupMessage *msg,
gpointer user_data)
{
GVfsJob *job = G_VFS_JOB (user_data);
GVfsBackend *backend = job->backend_data;
GFileType target_type;
SoupURI *uri;
gboolean res;
if (msg->status_code != 207)
{
ht... | 0 | [] | gvfs | f81ff2108ab3b6e370f20dcadd8708d23f499184 | 90,361,289,982,822,630,000,000,000,000,000,000,000 | 38 | dav: don't unescape the uri twice
path_equal tries to unescape path before comparing. Unfortunately
this function is used also for already unescaped paths. Therefore
unescaping can fail. This commit reverts changes which was done in
commit 50af53d and unescape just uris, which aren't unescaped yet.
https://bugzilla.g... |
void KrecipesView::actionRecipe( int recipeID, int action )
{
//FIXME: Don't use magic numbers, use enums instead
switch ( action ) {
case 0: //Show
{
showRecipe( recipeID );
break;
}
case 1: // Edit
{
if ( !inputPanel->everythingSaved() )
{
switch ( KMessageBox::questionYesNoCancel( this,
... | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 162,885,095,553,894,280,000,000,000,000,000,000,000 | 75 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
void ReadAlignment(OpKernelConstruction* context,
bool* left_align_superdiagonal,
bool* left_align_subdiagonal) {
string align;
OP_REQUIRES_OK(context, context->GetAttr("align", &align));
*left_align_superdiagonal = align == "LEFT_LEFT" || align == "LEFT_RIGHT";
*left_alig... | 0 | [
"CWE-476",
"CWE-125"
] | tensorflow | 482da92095c4d48f8784b1f00dda4f81c28d2988 | 106,758,376,125,997,640,000,000,000,000,000,000,000 | 9 | Ensure non-empty padding_value input to tf.raw_ops.MatrixDiagPartV2, if a padding_value is input
PiperOrigin-RevId: 388314614
Change-Id: If0b51ad58d5d8543a6be6ce8f42ae4755c80d55f |
GF_Err stsd_on_child_box(GF_Box *s, GF_Box *a)
{
GF_UnknownBox *def;
if (!a) return GF_OK;
if (gf_box_valid_in_parent(a, "stsd")) {
return GF_OK;
}
switch (a->type) {
//unknown sample description: we need a specific box to handle the data ref index
//rather than a default box ...
case GF_ISOM_BOX_TYPE_UNKNOW... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 133,641,221,244,488,130,000,000,000,000,000,000,000 | 25 | fixed #1587 |
MagickExport MagickBooleanType IsHighDynamicRangeImage(const Image *image,
ExceptionInfo *exception)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
(void) image;
(void) exception;
return(MagickFalse);
#else
CacheView
*image_view;
MagickBooleanType
status;
ssize_t
y;
assert(image != (Image *) NUL... | 0 | [
"CWE-665"
] | ImageMagick | ee3dae8624e69261760754442827aea4d0254a6f | 308,074,899,192,056,030,000,000,000,000,000,000,000 | 75 | https://github.com/ImageMagick/ImageMagick/issues/1522 |
setAfter(int length, const TranslationTableHeader *table, int pos, const InString *input,
TranslationTableCharacterAttributes *afterAttributes) {
widechar after;
if ((pos + length + 2) < input->length && input->chars[pos + 1] == ENDSEGMENT)
after = input->chars[pos + 2];
else
after = (pos + length < input->len... | 0 | [
"CWE-125"
] | liblouis | 5e4089659bb49b3095fa541fa6387b4c40d7396e | 72,381,743,487,351,550,000,000,000,000,000,000,000 | 9 | Fix a buffer overflow
Fixes #635
Thanks to HongxuChen for reporting it |
irc_server_xfer_send_accept_resume_cb (const void *pointer, void *data,
const char *signal,
const char *type_data,
void *signal_data)
{
struct t_infolist *infolist;
struct t_irc_server *ptr_serve... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 64,140,441,076,790,380,000,000,000,000,000,000,000 | 47 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.