func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
TEST_F(QueryPlannerTest, ElemMatchNestedOrNotIndexed) {
addIndex(BSON("a.b" << 1));
runQuery(fromjson("{c: 1, a: {$elemMatch: {b: 3, $or: [{c: 4}, {c: 5}]}}}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {node: {ixscan: {pattern: {'a.b... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 133,139,018,347,922,450,000,000,000,000,000,000,000 | 10 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
pk_transaction_emit_property_changed (PkTransaction *transaction,
const gchar *property_name,
GVariant *property_value)
{
GVariantBuilder builder;
GVariantBuilder invalidated_builder;
/* build the dict */
g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
g_variant_builder_i... | 0 | [
"CWE-287"
] | PackageKit | 7e8a7905ea9abbd1f384f05f36a4458682cd4697 | 44,845,058,922,642,710,000,000,000,000,000,000,000 | 25 | Do not set JUST_REINSTALL on any kind of auth failure
If we try to continue the auth queue when it has been cancelled (or failed)
then we fall upon the obscure JUST_REINSTALL transaction flag which only the
DNF backend actually verifies.
Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem. |
void* Elf_(r_bin_elf_free)(ELFOBJ* bin) {
int i;
if (!bin) {
return NULL;
}
free (bin->phdr);
free (bin->shdr);
free (bin->strtab);
free (bin->dyn_buf);
free (bin->shstrtab);
free (bin->dynstr);
//free (bin->strtab_section);
if (bin->imports_by_ord) {
for (i = 0; i<bin->imports_by_ord_size; i++) {
fre... | 0 | [
"CWE-125"
] | radare2 | c6d0076c924891ad9948a62d89d0bcdaf965f0cd | 184,094,687,066,999,800,000,000,000,000,000,000,000 | 37 | Fix #8731 - Crash in ELF parser with negative 32bit number |
static bool __stratum_send(struct pool *pool, char *s, ssize_t len)
{
SOCKETTYPE sock = pool->sock;
ssize_t ssent = 0;
if (opt_protocol)
applog(LOG_DEBUG, "SEND: %s", s);
strcat(s, "\n");
len++;
while (len > 0 ) {
struct timeval timeout = {0, 0};
ssize_t sent;
fd_set wd;
FD_ZERO(&wd);
FD_SET(sock,... | 0 | [
"CWE-119",
"CWE-787"
] | bfgminer | c80ad8548251eb0e15329fc240c89070640c9d79 | 147,807,223,058,916,220,000,000,000,000,000,000,000 | 40 | Stratum: extract_sockaddr: Truncate overlong addresses rather than stack overflow
Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this! |
static int test_remove(struct libmnt_test *ts, int argc, char *argv[])
{
if (argc < 2)
return -1;
return update(argv[1], NULL, 0);
} | 0 | [
"CWE-399"
] | util-linux | 84ed14022e7d3d121bbcab60ebad11ed38d691b0 | 336,839,725,009,145,300,000,000,000,000,000,000,000 | 6 | libmount: more robust mtab and utab update (CVE-2011-1676, CVE-2011-1677)
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Changes:
- always use temporary file
- use fflush() for the temporary file
- check fprintf() return value
Signed-off-by: Karel Zak <kzak@redhat.com> |
WChangeSize(p, w, h)
struct win *p;
int w, h;
{
int wok = 0;
struct canvas *cv;
if (p->w_layer.l_cvlist == 0)
{
/* window not displayed -> works always */
ChangeWindowSize(p, w, h, p->w_histheight);
return;
}
for (cv = p->w_layer.l_cvlist; cv; cv = cv->c_lnext)
{
display = c... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 110,245,474,088,977,900,000,000,000,000,000,000,000 | 46 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
static struct sk_buff *sfb_peek(struct Qdisc *sch)
{
struct sfb_sched_data *q = qdisc_priv(sch);
struct Qdisc *child = q->qdisc;
return child->ops->peek(child);
} | 0 | [
"CWE-330"
] | linux | 55667441c84fa5e0911a0aac44fb059c15ba6da2 | 163,953,531,914,844,070,000,000,000,000,000,000,000 | 7 | net/flow_dissector: switch to siphash
UDP IPv6 packets auto flowlabels are using a 32bit secret
(static u32 hashrnd in net/core/flow_dissector.c) and
apply jhash() over fields known by the receivers.
Attackers can easily infer the 32bit secret and use this information
to identify a device and/or user, since this 32bi... |
smtp_server_connection_alloc(struct smtp_server *server,
const struct smtp_server_settings *set,
int fd_in, int fd_out,
const struct smtp_server_callbacks *callbacks,
void *context)
{
struct smtp_server_connection *conn;
pool_t pool;
pool = pool_alloconly_create("smtp server", 1024);... | 0 | [
"CWE-77"
] | core | 321c339756f9b2b98fb7326359d1333adebb5295 | 141,894,813,687,326,560,000,000,000,000,000,000,000 | 153 | lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability.
The input handler kept reading more commands even though the input was locked by
the STARTTLS command, thereby causing it to read the command pipelined beyond
STARTTLS. This causes a STARTTLS command injection vulerability. |
static int nfc_genl_rcv_nl_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
struct netlink_notify *n = ptr;
struct urelease_work *w;
if (event != NETLINK_URELEASE || n->protocol != NETLINK_GENERIC)
goto out;
pr_debug("NETLINK_URELEASE event from id %d\n", n->portid);
w = kmalloc(sizeo... | 0 | [] | linux | 4071bf121d59944d5cd2238de0642f3d7995a997 | 267,739,586,087,407,530,000,000,000,000,000,000,000 | 21 | NFC: netlink: fix sleep in atomic bug when firmware download timeout
There are sleep in atomic bug that could cause kernel panic during
firmware download process. The root cause is that nlmsg_new with
GFP_KERNEL parameter is called in fw_dnld_timeout which is a timer
handler. The call trace is shown below:
BUG: sleep... |
static bool svm_get_nested_state_pages(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
if (WARN_ON(!is_guest_mode(vcpu)))
return true;
if (!vcpu->arch.pdptrs_from_userspace &&
!nested_npt_enabled(svm) && is_pae_paging(vcpu))
/*
* Reload the guest's PDPTRs since after a migration
* the ... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 333,903,908,369,885,000,000,000,000,000,000,000,000 | 27 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
static void insert_hash(struct audit_chunk *chunk)
{
struct list_head *list = chunk_hash(chunk->watch.inode);
list_add_rcu(&chunk->hash, list);
} | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 57,937,008,914,569,650,000,000,000,000,000,000,000 | 5 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
static int __io_async_cancel(struct io_cancel_data *cd,
struct io_uring_task *tctx,
unsigned int issue_flags)
{
bool all = cd->flags & (IORING_ASYNC_CANCEL_ALL|IORING_ASYNC_CANCEL_ANY);
struct io_ring_ctx *ctx = cd->ctx;
struct io_tctx_node *node;
int ret, nr = 0;
do {
ret = io_try_cancel(tctx, ... | 0 | [
"CWE-193"
] | linux | 47abea041f897d64dbd5777f0cf7745148f85d75 | 55,946,925,674,620,330,000,000,000,000,000,000,000 | 34 | io_uring: fix off-by-one in sync cancelation file check
The passed in index should be validated against the number of registered
files we have, it needs to be smaller than the index value to avoid going
one beyond the end.
Fixes: 78a861b94959 ("io_uring: add sync cancelation API through io_uring_register()")
Reported... |
void ieee80211_sta_pspoll(struct ieee80211_sta *pubsta)
{
struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
if (test_sta_flag(sta, WLAN_STA_SP))
return;
if (!test_sta_flag(sta, WLAN_STA_PS_DRIVER))
ieee80211_sta_ps_deliver_poll_response(sta);
else
set_sta_flag(sta, WLAN_STA_PSPOLL);
} | 0 | [] | linux | 588f7d39b3592a36fb7702ae3b8bdd9be4621e2f | 296,452,859,701,543,100,000,000,000,000,000,000,000 | 12 | mac80211: drop robust management frames from unknown TA
When receiving a robust management frame, drop it if we don't have
rx->sta since then we don't have a security association and thus
couldn't possibly validate the frame.
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com> |
void proto_unregister(struct proto *prot)
{
mutex_lock(&proto_list_mutex);
release_proto_idx(prot);
list_del(&prot->node);
mutex_unlock(&proto_list_mutex);
kmem_cache_destroy(prot->slab);
prot->slab = NULL;
req_prot_cleanup(prot->rsk_prot);
if (prot->twsk_prot != NULL && prot->twsk_prot->twsk_slab != NULL) {... | 0 | [
"CWE-119",
"CWE-787"
] | linux | b98b0bc8c431e3ceb4b26b0dfc8db509518fb290 | 90,420,165,398,856,400,000,000,000,000,000,000,000 | 18 | net: avoid signed overflows for SO_{SND|RCV}BUFFORCE
CAP_NET_ADMIN users should not be allowed to set negative
sk_sndbuf or sk_rcvbuf values, as it can lead to various memory
corruptions, crashes, OOM...
Note that before commit 82981930125a ("net: cleanups in
sock_setsockopt()"), the bug was even more serious, since ... |
static WC_INLINE int IsSigAlgoECDSA(int algoOID)
{
/* ECDSA sigAlgo must not have ASN1 NULL parameters */
if (algoOID == CTC_SHAwECDSA || algoOID == CTC_SHA256wECDSA ||
algoOID == CTC_SHA384wECDSA || algoOID == CTC_SHA512wECDSA) {
return 1;
}
return 0;
} | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 131,238,601,321,496,670,000,000,000,000,000,000,000 | 10 | OCSP: improve handling of OCSP no check extension |
static void snippet_add_content(struct snippet_context *ctx,
struct snippet_data *target,
const unsigned char *data, size_t size,
size_t *count_r)
{
i_assert(target != NULL);
if (size >= 3 &&
((data[0] == 0xEF && data[1] == 0xBB && data[2] == 0xBF) ||
(data[0] == 0xBF && data[1] == 0xBB && da... | 1 | [
"CWE-20"
] | core | 3a55f35c208b5fd3d52c0a6272bd5b8717a2ae54 | 137,396,597,788,333,420,000,000,000,000,000,000,000 | 37 | lib-mail: message_snippet_generate() - Fix potential crash when input ends with '>'
This happens only when the mail was large enough and full enough with
whitespace that message-parser returned multiple blocks before the snippet
was finished.
Broken by 74063ed8219d055489d5233b0c02a59886d2078c |
threshold_16_SSE_unaligned(byte *contone_ptr, byte *thresh_ptr, byte *ht_data)
{
__m128i input1;
__m128i input2;
int result_int;
byte *sse_data;
const unsigned int mask1 = 0x80808080;
__m128i sign_fix = _mm_set_epi32(mask1, mask1, mask1, mask1);
sse_data = (byte*) &(result_int);
/* Load... | 0 | [
"CWE-119"
] | ghostpdl | 362ec9daadb9992b0def3520cd1dc6fa52edd1c4 | 128,511,820,694,986,880,000,000,000,000,000,000,000 | 25 | Fix bug 697459 Buffer overflow in fill_threshold_buffer
There was an overflow check for ht_buffer size, but none for the larger
threshold_buffer. Note that this file didn't fail on Windows because the
combination of the ht_buffer and the size of the (miscalculated due to
overflow) threshold_buffer would have exceeded ... |
read_timeout(void *arg)
{
FILE *f;
double temp, comp;
f = fopen(filename, "r");
if (f && fscanf(f, "%lf", &temp) == 1) {
comp = get_tempcomp(temp);
if (fabs(comp) <= MAX_COMP) {
comp = LCL_SetTempComp(comp);
DEBUG_LOG("tempcomp updated to %f for %f", comp, temp);
if (logfileid != ... | 1 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 56,903,675,889,499,250,000,000,000,000,000,000,000 | 35 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
concat_authorization_data(krb5_context context,
krb5_authdata **first, krb5_authdata **second,
krb5_authdata ***output)
{
register int i, j;
register krb5_authdata **ptr, **retdata;
/* count up the entries */
i = 0;
if (first)
for (ptr = f... | 0 | [
"CWE-476"
] | krb5 | 93b4a6306a0026cf1cc31ac4bd8a49ba5d034ba7 | 60,380,108,898,503,580,000,000,000,000,000,000,000 | 44 | Fix S4U2Self KDC crash when anon is restricted
In validate_as_request(), when enforcing restrict_anonymous_to_tgt,
use client.princ instead of request->client; the latter is NULL when
validating S4U2Self requests.
CVE-2016-3120:
In MIT krb5 1.9 and later, an authenticated attacker can cause krb5kdc
to dereference a ... |
struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
{
struct sk_buff_fclones *fclones = container_of(skb,
struct sk_buff_fclones,
skb1);
struct sk_buff *n;
if (skb_orphan_frags(skb, gfp_mask))
return NULL;
if (skb->fclone == SKB_FCLONE_ORIG &&
atomic_read(&fclones->fcl... | 0 | [
"CWE-703",
"CWE-125"
] | linux | 8605330aac5a5785630aec8f64378a54891937cc | 66,247,929,440,166,895,000,000,000,000,000,000,000 | 28 | 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... |
static struct fib6_node *fib6_node_lookup_1(struct fib6_node *root,
struct lookup_args *args)
{
struct fib6_node *fn;
__be32 dir;
if (unlikely(args->offset == 0))
return NULL;
/*
* Descend on a tree
*/
fn = root;
for (;;) {
struct fib6_node *next;
dir = addr_bit_set(args->addr, fn->fn_bit)... | 0 | [
"CWE-755"
] | linux | 7b09c2d052db4b4ad0b27b97918b46a7746966fa | 94,320,823,331,848,120,000,000,000,000,000,000,000 | 66 | ipv6: fix a typo in fib6_rule_lookup()
Yi Ren reported an issue discovered by syzkaller, and bisected
to the cited commit.
Many thanks to Yi, this trivial patch does not reflect the patient
work that has been done.
Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic")
Signed-off-by: Eric Du... |
static int snd_usb_fasttrackpro_boot_quirk(struct usb_device *dev)
{
int err;
if (dev->actconfig->desc.bConfigurationValue == 1) {
dev_info(&dev->dev,
"Fast Track Pro switching to config #2\n");
/* This function has to be available by the usb core module.
* if it is not avialable the boot quirk has to b... | 0 | [] | sound | 0f886ca12765d20124bd06291c82951fd49a33be | 330,285,657,966,872,760,000,000,000,000,000,000,000 | 26 | ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk()
create_fixed_stream_quirk() may cause a NULL-pointer dereference by
accessing the non-existing endpoint when a USB device with a malformed
USB descriptor is used.
This patch avoids it simply by adding a sanity check of bNumEndpoints
before the acces... |
ExprResolveGroup(struct xkb_context *ctx, const ExprDef *expr,
xkb_layout_index_t *group_rtrn)
{
bool ok;
int result;
ok = ExprResolveIntegerLookup(ctx, expr, &result, SimpleLookup,
groupNames);
if (!ok)
return false;
if (result <= 0 || re... | 0 | [
"CWE-400",
"CWE-703"
] | libxkbcommon | 1f9d1248c07cda8aaff762429c0dce146de8632a | 267,082,919,564,806,700,000,000,000,000,000,000,000 | 20 | xkbcomp: fix stack overflow when evaluating boolean negation
The expression evaluator would go into an infinite recursion when
evaluating something like this as a boolean: `!True`. Instead of
recursing to just `True` and negating, it recursed to `!True` itself
again.
Bug inherited from xkbcomp.
Caught with the afl f... |
static void gic_set_irq_11mpcore(GICState *s, int irq, int level,
int cm, int target)
{
if (level) {
GIC_DIST_SET_LEVEL(irq, cm);
if (GIC_DIST_TEST_EDGE_TRIGGER(irq) || GIC_DIST_TEST_ENABLED(irq, cm)) {
DPRINTF("Set %d pending mask %x\n", irq, target);
... | 0 | [
"CWE-787"
] | qemu | edfe2eb4360cde4ed5d95bda7777edcb3510f76a | 7,995,802,234,284,553,000,000,000,000,000,000,000 | 13 | hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
Per the ARM Generic Interrupt Controller Architecture specification
(document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit,
not 10:
- 4.3 Distributor register descriptions
- 4.3.15 Software Generated Interrupt Register, GICD_SG
- Table 4-2... |
static int ath6kl_usb_alloc_pipe_resources(struct ath6kl_usb_pipe *pipe,
int urb_cnt)
{
struct ath6kl_urb_context *urb_context;
int status = 0, i;
INIT_LIST_HEAD(&pipe->urb_list_head);
init_usb_anchor(&pipe->urb_submitted);
for (i = 0; i < urb_cnt; i++) {
urb_context = kzalloc(sizeof(struct ath6kl_urb_... | 0 | [
"CWE-476"
] | linux | 39d170b3cb62ba98567f5c4f40c27b5864b304e5 | 262,161,230,818,220,880,000,000,000,000,000,000,000 | 35 | ath6kl: fix a NULL-ptr-deref bug in ath6kl_usb_alloc_urb_from_pipe()
The `ar_usb` field of `ath6kl_usb_pipe_usb_pipe` objects
are initialized to point to the containing `ath6kl_usb` object
according to endpoint descriptors read from the device side, as shown
below in `ath6kl_usb_setup_pipe_resources`:
for (i = 0; i <... |
static ssize_t __nr_hugepages_store_common(bool obey_mempolicy,
struct hstate *h, int nid,
unsigned long count, size_t len)
{
int err;
nodemask_t nodes_allowed, *n_mask;
if (hstate_is_gigantic(h) && !gigantic_page_runtime_supported())
return -EINVAL;
if (nid == NUMA_NO_NODE) {
/*
* global h... | 0 | [
"CWE-362"
] | linux | 17743798d81238ab13050e8e2833699b54e15467 | 110,107,334,009,436,100,000,000,000,000,000,000,000 | 32 | mm/hugetlb: fix a race between hugetlb sysctl handlers
There is a race between the assignment of `table->data` and write value
to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on
the other thread.
CPU0: CPU1:
proc_sys_write
... |
file_s_fnmatch(int argc, VALUE *argv, VALUE obj)
{
VALUE pattern, path;
VALUE rflags;
int flags;
if (rb_scan_args(argc, argv, "21", &pattern, &path, &rflags) == 3)
flags = NUM2INT(rflags);
else
flags = 0;
StringValue(pattern);
FilePathStringValue(path);
if (flags & FNM_EXTGLOB) {
s... | 1 | [] | ruby | a0a2640b398cffd351f87d3f6243103add66575b | 232,136,107,297,225,570,000,000,000,000,000,000,000 | 33 | Fix for wrong fnmatch patttern
* dir.c (file_s_fnmatch): ensure that pattern does not contain a
NUL character. https://hackerone.com/reports/449617 |
static inline void paravirt_arch_dup_mmap(struct mm_struct *oldmm,
struct mm_struct *mm)
{
PVOP_VCALL2(mmu.dup_mmap, oldmm, mm);
} | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 118,262,721,889,420,900,000,000,000,000,000,000,000 | 5 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
static inline struct mem_cgroup *page_memcg(struct page *page)
{
return NULL;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 303,324,914,710,647,740,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 void tg3_mdio_start(struct tg3 *tp)
{
tp->mi_mode &= ~MAC_MI_MODE_AUTO_POLL;
tw32_f(MAC_MI_MODE, tp->mi_mode);
udelay(80);
if (tg3_flag(tp, MDIOBUS_INITED) &&
tg3_asic_rev(tp) == ASIC_REV_5785)
tg3_mdio_config_5785(tp);
} | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 100,503,020,020,148,900,000,000,000,000,000,000,000 | 10 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
static int __bprm_mm_init(struct linux_binprm *bprm)
{
int err;
struct vm_area_struct *vma = NULL;
struct mm_struct *mm = bprm->mm;
bprm->vma = vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
if (!vma)
return -ENOMEM;
down_write(&mm->mmap_sem);
vma->vm_mm = mm;
/*
* Place the stack at the largest st... | 0 | [
"CWE-362"
] | linux | 8b01fc86b9f425899f8a3a8fc1c47d73c2c20543 | 234,055,343,652,164,400,000,000,000,000,000,000,000 | 41 | fs: take i_mutex during prepare_binprm for set[ug]id executables
This prevents a race between chown() and execve(), where chowning a
setuid-user binary to root would momentarily make the binary setuid
root.
This patch was mostly written by Linus Torvalds.
Signed-off-by: Jann Horn <jann@thejh.net>
Signed-off-by: Linu... |
add_FID(i_ctx_t *i_ctx_p, ref * fp /* t_dictionary */ , gs_font * pfont,
gs_ref_memory_t *imem)
{
ref fid;
make_tav(&fid, t_fontID,
a_readonly | imemory_space(imem) | imemory_new_mask(imem),
pstruct, (void *)pfont);
return (i_ctx_p ? idict_put_string(fp, "FID", &fid) :
... | 0 | [
"CWE-704"
] | ghostpdl | 548bb434e81dadcc9f71adf891a3ef5bea8e2b4e | 259,270,077,005,979,470,000,000,000,000,000,000,000 | 11 | PS interpreter - add some type checking
These were 'probably' safe anyway, since they mostly treat the objects
as integers without checking, which at least can't result in a crash.
Nevertheless, we ought to check.
The return from comparedictkeys could be wrong if one of the keys had
a value which was not an array, i... |
static void nfs4_xdr_enc_rename(struct rpc_rqst *req, struct xdr_stream *xdr,
const void *data)
{
const struct nfs_renameargs *args = data;
struct compound_hdr hdr = {
.minorversion = nfs4_xdr_minorversion(&args->seq_args),
};
encode_compound_hdr(xdr, req, &hdr);
encode_sequence(xdr, &args->seq_args, &hdr);... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 313,073,862,523,986,300,000,000,000,000,000,000,000 | 16 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
mod_attr_define(mrb_state *mrb, mrb_value mod, mrb_value (*accessor)(mrb_state *, mrb_value), mrb_sym (*access_name)(mrb_state *, mrb_sym))
{
struct RClass *c = mrb_class_ptr(mod);
const mrb_value *argv;
mrb_int argc, i;
int ai;
mrb_get_args(mrb, "*", &argv, &argc);
ai = mrb_gc_arena_save(mrb);
for (i=0;... | 0 | [
"CWE-787"
] | mruby | b1d0296a937fe278239bdfac840a3fd0e93b3ee9 | 95,130,237,505,716,950,000,000,000,000,000,000,000 | 28 | class.c: clear method cache after `remove_method`. |
FilterFactoryMap::const_iterator findUpgradeCaseInsensitive(const FilterFactoryMap& upgrade_map,
absl::string_view upgrade_type) {
for (auto it = upgrade_map.begin(); it != upgrade_map.end(); ++it) {
if (StringUtil::CaseInsensitiveCompare()(it->first, up... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 224,621,065,538,894,130,000,000,000,000,000,000,000 | 9 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int copy_string(struct archive_read* a, int len, int dist) {
struct rar5* rar = get_context(a);
const uint64_t cmask = rar->cstate.window_mask;
const uint64_t write_ptr = rar->cstate.write_ptr +
rar->cstate.solid_offset;
int i;
if (rar->cstate.window_buf == NULL)
return ARCHIVE_FATAL;
/* The unpac... | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 63,208,947,997,904,700,000,000,000,000,000,000,000 | 27 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
sg_common_write(Sg_fd * sfp, Sg_request * srp,
unsigned char *cmnd, int timeout, int blocking)
{
int k, at_head;
Sg_device *sdp = sfp->parentdp;
sg_io_hdr_t *hp = &srp->header;
srp->data.cmd_opcode = cmnd[0]; /* hold opcode of command */
hp->status = 0;
hp->masked_status = 0;
hp->msg_status = 0;
hp->info = 0... | 0 | [
"CWE-119"
] | linux | bf33f87dd04c371ea33feb821b60d63d754e3124 | 208,362,822,898,756,140,000,000,000,000,000,000,000 | 50 | scsi: sg: check length passed to SG_NEXT_CMD_LEN
The user can control the size of the next command passed along, but the
value passed to the ioctl isn't checked against the usable max command
size.
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Chang <dpf@google.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.co... |
GF_Box *trak_New()
{
ISOM_DECL_BOX_ALLOC(GF_TrackBox, GF_ISOM_BOX_TYPE_TRAK);
return (GF_Box *)tmp; | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 132,375,517,637,139,900,000,000,000,000,000,000,000 | 5 | prevent dref memleak on invalid input (#1183) |
static int __init parse_rodata(char *arg)
{
return strtobool(arg, &rodata_enabled);
} | 0 | [] | linux | 15122ee2c515a253b0c66a3e618bc7ebe35105eb | 292,566,749,155,750,570,000,000,000,000,000,000,000 | 4 | arm64: Enforce BBM for huge IO/VMAP mappings
ioremap_page_range doesn't honour break-before-make and attempts to put
down huge mappings (using p*d_set_huge) over the top of pre-existing
table entries. This leads to us leaking page table memory and also gives
rise to TLB conflicts and spurious aborts, which have been s... |
static int mov_write_tfrf_tag(AVIOContext *pb, MOVMuxContext *mov,
MOVTrack *track, int entry)
{
int n = track->nb_frag_info - 1 - entry, i;
int size = 8 + 16 + 4 + 1 + 16*n;
static const uint8_t uuid[] = {
0xd4, 0x80, 0x7e, 0xf2, 0xca, 0x39, 0x46, 0x95,
0x8e, 0... | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 337,904,717,244,195,400,000,000,000,000,000,000,000 | 34 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
static bool tcp_nagle_check(bool partial, const struct tcp_sock *tp,
int nonagle)
{
return partial &&
((nonagle & TCP_NAGLE_CORK) ||
(!nonagle && tp->packets_out && tcp_minshall_check(tp)));
} | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 286,901,450,575,194,440,000,000,000,000,000,000,000 | 7 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
ismode_w(const wchar_t *start, const wchar_t *end, int *permset)
{
const wchar_t *p;
if (start >= end)
return (0);
p = start;
*permset = 0;
while (p < end) {
switch (*p++) {
case L'r': case L'R':
*permset |= ARCHIVE_ENTRY_ACL_READ;
break;
case L'w': case L'W':
*permset |= ARCHIVE_ENTRY_ACL_WRITE;... | 0 | [
"CWE-476"
] | libarchive | 15bf44fd2c1ad0e3fd87048b3fcc90c4dcff1175 | 287,783,309,549,417,960,000,000,000,000,000,000,000 | 27 | Skip 0-length ACL fields
Currently, it is possible to create an archive that crashes bsdtar
with a malformed ACL:
Program received signal SIGSEGV, Segmentation fault.
archive_acl_from_text_l (acl=<optimised out>, text=0x7e2e92 "", want_type=<optimised out>, sc=<optimised out>) at libarchive/archive_acl.c:1726
1726 ... |
static Reinst *emit(Reprog *prog, int opcode)
{
Reinst *inst = prog->end++;
inst->opcode = opcode;
inst->n = 0;
inst->c = 0;
inst->cc = NULL;
inst->x = inst->y = NULL;
return inst;
} | 0 | [
"CWE-703",
"CWE-674"
] | mujs | 160ae29578054dc09fd91e5401ef040d52797e61 | 321,605,466,382,150,360,000,000,000,000,000,000,000 | 10 | Issue #162: Check stack overflow during regexp compilation.
Only bother checking during the first compilation pass that counts
the size of the program. |
header_cache_t *nntp_hcache_open(struct NntpData *nntp_data)
{
struct Url url;
char file[PATH_MAX];
if (!nntp_data->nserv || !nntp_data->nserv->cacheable ||
!nntp_data->nserv->conn || !nntp_data->group ||
!(nntp_data->newsrc_ent || nntp_data->subscribed || SaveUnsubscribed))
{
return NULL;
}
... | 0 | [
"CWE-119",
"CWE-787"
] | neomutt | 6296f7153f0c9d5e5cd3aaf08f9731e56621bdd3 | 1,695,834,195,095,676,800,000,000,000,000,000,000 | 17 | Set length modifiers for group and desc
nntp_add_group parses a line controlled by the connected nntp server.
Restrict the maximum lengths read into the stack buffers group, and
desc. |
struct nfc_se *nfc_find_se(struct nfc_dev *dev, u32 se_idx)
{
struct nfc_se *se;
list_for_each_entry(se, &dev->secure_elements, list)
if (se->idx == se_idx)
return se;
return NULL;
} | 0 | [] | linux | 3e3b5dfcd16a3e254aab61bd1e8c417dd4503102 | 28,765,896,531,555,140,000,000,000,000,000,000,000 | 10 | NFC: reorder the logic in nfc_{un,}register_device
There is a potential UAF between the unregistration routine and the NFC
netlink operations.
The race that cause that UAF can be shown as below:
(FREE) | (USE)
nfcmrvl_nci_unregister_dev | nfc_genl_dev_up
nci_close_device |
nci... |
ByteVector &ByteVector::replace(const ByteVector &pattern, const ByteVector &with)
{
if(pattern.size() == 0 || pattern.size() > size())
return *this;
const uint withSize = with.size();
const uint patternSize = pattern.size();
int offset = 0;
if(withSize == patternSize) {
// I think this case might b... | 0 | [
"CWE-189"
] | taglib | dcdf4fd954e3213c355746fa15b7480461972308 | 26,261,867,392,398,430,000,000,000,000,000,000,000 | 64 | Avoid uint overflow in case the length + index is over UINT_MAX |
static int su3000_identify_state(struct usb_device *udev,
struct dvb_usb_device_properties *props,
struct dvb_usb_device_description **desc,
int *cold)
{
info("%s", __func__);
*cold = 0;
return 0;
} | 0 | [
"CWE-476",
"CWE-119"
] | linux | 606142af57dad981b78707234cfbd15f9f7b7125 | 154,290,980,471,884,400,000,000,000,000,000,000,000 | 10 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... |
static MagickBooleanType WriteOneJNGImage(MngInfo *mng_info,
const ImageInfo *image_info,Image *image)
{
Image
*jpeg_image;
ImageInfo
*jpeg_image_info;
int
unique_filenames;
MagickBooleanType
logging,
status;
size_t
length;
unsigned char
*blob,
chunk[80],
*p;
u... | 0 | [
"CWE-835"
] | ImageMagick6 | 9eda4b36a8695e4a0cd27bea28b9c173c68a01ec | 313,211,455,340,796,100,000,000,000,000,000,000,000 | 569 | Fixed infinite loop (#1095). |
uint32_t smb1cli_req_seqnum(struct tevent_req *req)
{
struct smbXcli_req_state *state =
tevent_req_data(req,
struct smbXcli_req_state);
return state->smb1.seqnum;
} | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 60,697,085,277,469,100,000,000,000,000,000,000,000 | 8 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
TfLiteStatus Subgraph::AddNodeWithParameters(
const std::vector<int>& inputs, const std::vector<int>& outputs,
const std::vector<int>& intermediates, const char* init_data,
size_t init_data_size, void* builtin_data,
const TfLiteRegistration* registration, int* node_index) {
std::unique_ptr<void, declt... | 1 | [
"CWE-20",
"CWE-787"
] | tensorflow | d58c96946b2880991d63d1dacacb32f0a4dfa453 | 235,526,692,593,501,700,000,000,000,000,000,000,000 | 63 | [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 |
const char *lj_debug_uvname(GCproto *pt, uint32_t idx)
{
const uint8_t *p = proto_uvinfo(pt);
lua_assert(idx < pt->sizeuv);
if (!p) return "";
if (idx) while (*p++ || --idx) ;
return (const char *)p;
} | 0 | [
"CWE-125"
] | LuaJIT | e296f56b825c688c3530a981dc6b495d972f3d01 | 330,623,531,118,087,100,000,000,000,000,000,000,000 | 8 | Call error function on rethrow after trace exit. |
eap_input(unit, inp, inlen)
int unit;
u_char *inp;
int inlen;
{
eap_state *esp = &eap_states[unit];
u_char code, id;
int len;
/*
* Parse header (code, id and length). If packet too short,
* drop it.
*/
if (inlen < EAP_HEADERLEN) {
error("EAP: packet too short: %d < %d", inlen, EAP_HEADERLEN);
return;
... | 0 | [
"CWE-120",
"CWE-787"
] | ppp | 8d7970b8f3db727fe798b65f3377fe6787575426 | 281,698,668,037,436,600,000,000,000,000,000,000,000 | 51 | pppd: Fix bounds check in EAP code
Given that we have just checked vallen < len, it can never be the case
that vallen >= len + sizeof(rhostname). This fixes the check so we
actually avoid overflowing the rhostname array.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Paul Mackerras <paulus... |
static void clusterip_tg_destroy(const struct xt_tgdtor_param *par)
{
const struct ipt_clusterip_tgt_info *cipinfo = par->targinfo;
/* if no more entries are referencing the config, remove it
* from the list and destroy the proc entry */
clusterip_config_entry_put(cipinfo->config);
clusterip_config_put(cipinfo-... | 0 | [
"CWE-120"
] | linux-2.6 | 961ed183a9fd080cf306c659b8736007e44065a5 | 46,091,060,368,745,280,000,000,000,000,000,000,000 | 12 | netfilter: ipt_CLUSTERIP: fix buffer overflow
'buffer' string is copied from userspace. It is not checked whether it is
zero terminated. This may lead to overflow inside of simple_strtoul().
Changli Gao suggested to copy not more than user supplied 'size' bytes.
It was introduced before the git epoch. Files "ipt_C... |
empathy_adium_info_get_available_variants (GHashTable *info)
{
GPtrArray *variants;
const gchar *path;
gchar *dirpath;
GDir *dir;
variants = tp_asv_get_boxed (info, "AvailableVariants", G_TYPE_PTR_ARRAY);
if (variants != NULL) {
return variants;
}
variants = g_ptr_array_new_with_free_func (g_free);
tp_asv_... | 0 | [
"CWE-79"
] | empathy | 739aca418457de752be13721218aaebc74bd9d36 | 280,137,232,346,788,870,000,000,000,000,000,000,000 | 46 | theme_adium_append_message: escape alias before displaying it
Not doing so can lead to nasty HTML injection from hostile users.
https://bugzilla.gnome.org/show_bug.cgi?id=662035 |
validate_nonempty_seq(asdl_seq *seq, const char *what, const char *owner)
{
if (asdl_seq_LEN(seq))
return 1;
PyErr_Format(PyExc_ValueError, "empty %s on %s", what, owner);
return 0;
} | 0 | [
"CWE-125"
] | cpython | a4d78362397fc3bced6ea80fbc7b5f4827aec55e | 264,136,294,366,083,300,000,000,000,000,000,000,000 | 7 | bpo-36495: Fix two out-of-bounds array reads (GH-12641)
Research and fix by @bradlarsen. |
strcat_capa_from_static(UChar* dest, UChar* dest_end,
const UChar* src, const UChar* src_end, size_t capa)
{
UChar* r;
r = (UChar* )xmalloc(capa + 1);
CHECK_NULL_RETURN(r);
onig_strcpy(r, dest, dest_end);
onig_strcpy(r + (dest_end - dest), src, src_end);
return r;
} | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 333,649,525,275,776,570,000,000,000,000,000,000,000 | 11 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
C_MgrProxyCommand(Monitor *mon, MonOpRequestRef op, uint64_t s)
: mon(mon), op(op), size(s) { } | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 227,277,607,290,344,870,000,000,000,000,000,000,000 | 2 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
Tracing::Span& ConnectionManagerImpl::ActiveStreamFilterBase::activeSpan() {
if (parent_.active_span_) {
return *parent_.active_span_;
} else {
return Tracing::NullSpan::instance();
}
} | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 334,823,268,270,681,080,000,000,000,000,000,000,000 | 7 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
static bool uid_in_group(uid_t uid, gid_t gid)
{
char **tmp;
struct passwd *pwd = getpwuid(uid);
if (!pwd)
return FALSE;
if (pwd->pw_gid == gid)
return TRUE;
struct group *grp = getgrgid(gid);
if (!(grp && grp->gr_mem))
return FALSE;
for (tmp = grp->gr_mem; *tmp !... | 0 | [
"CWE-22"
] | libreport | 239c4f7d1f47265526b39ad70106767d00805277 | 233,431,559,139,962,100,000,000,000,000,000,000,000 | 27 | dd: harden functions against directory traversal issues
Test correctness of all accessed dump dir files in all dd* functions.
Before this commit, the callers were allowed to pass strings like
"../../etc/shadow" in the filename argument of all dd* functions.
Related: #1214457
Signed-off-by: Jakub Filak <jfilak@redhat... |
void lodepng_info_init(LodePNGInfo* info)
{
lodepng_color_mode_init(&info->color);
info->interlace_method = 0;
info->compression_method = 0;
info->filter_method = 0;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
info->background_defined = 0;
info->background_r = info->background_g = info->background_b = 0;
Lod... | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 191,298,624,702,096,300,000,000,000,000,000,000,000 | 19 | Fixed #5645: realloc return handling |
static void virgl_cmd_context_destroy(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_ctx_destroy cd;
VIRTIO_GPU_FILL_CMD(cd);
trace_virtio_gpu_cmd_ctx_destroy(cd.hdr.ctx_id);
virgl_renderer_context_destroy(cd.hdr.ctx_id);
} | 0 | [] | qemu | 2fe760554eb3769d70f608a158474f728ba45ba6 | 269,921,892,699,206,960,000,000,000,000,000,000,000 | 10 | virtio-gpu: check max_outputs only
The scanout id should not be above the configured num_scanouts.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-5-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
void MDSDaemon::tick()
{
// reschedule
reset_tick();
// Call through to subsystems' tick functions
if (mds_rank) {
mds_rank->tick();
}
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 320,758,393,738,300,740,000,000,000,000,000,000,000 | 10 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
static int am_handle_paos_reply(request_rec *r)
{
int rc;
char *post_data;
LassoServer *server;
LassoLogin *login;
char *relay_state = NULL;
int i, err;
/* Make sure that this is a POST request. */
if(r->method_number != M_POST) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
... | 0 | [] | mod_auth_mellon | 6bdda9170a8f1757dabc5b109958657417728018 | 112,559,665,553,079,050,000,000,000,000,000,000,000 | 76 | Fix segmentation fault when receiving badly formed logout message.
If the logout message is badly formed, we won't get the entityID in
`logout->parent.remote_providerID`. If we call `apr_hash_get()` with a
null pointer, it will cause a segmentation fault.
Add a check to validate that the entityID is correctly set. |
GF_Err pdin_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i;
GF_ProgressiveDownloadBox *ptr = (GF_ProgressiveDownloadBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
for (i=0; i<ptr->count; i++) {
gf_bs_write_u32(bs, ptr->rates[i]);
gf_bs_write_u32(bs, ptr->times[i]);
}
return GF_OK; | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 276,852,930,935,993,500,000,000,000,000,000,000,000 | 13 | prevent dref memleak on invalid input (#1183) |
static void check_file(char *basename)
{
gdImagePtr im;
char *buffer;
size_t size;
size = read_test_file(&buffer, basename);
im = gdImageCreateFromTiffPtr(size, (void *) buffer);
gdTestAssert(im == NULL);
free(buffer);
} | 0 | [
"CWE-125"
] | libgd | 4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae | 95,986,976,186,911,380,000,000,000,000,000,000,000 | 11 | Fix invalid read in gdImageCreateFromTiffPtr()
tiff_invalid_read.tiff is corrupt, and causes an invalid read in
gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit
is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case,
dynamicGetbuf() is called with a negative dp->pos, bu... |
void CModule::CancelJobs(const std::set<CModuleJob*>& sJobs) {
set<CJob*> sPlainJobs(sJobs.begin(), sJobs.end());
// Destructor calls UnlinkJob and removes the jobs from m_sJobs
CThreadPool::Get().cancelJobs(sPlainJobs);
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 92,148,593,264,721,320,000,000,000,000,000,000,000 | 6 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
encode_constant (MonoDynamicImage *assembly, MonoObject *val, guint32 *ret_type) {
char blob_size [64];
char *b = blob_size;
char *p, *box_val;
char* buf;
guint32 idx = 0, len = 0, dummy = 0;
#ifdef ARM_FPU_FPA
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
guint32 fpa_double [2];
guint32 *fpa_p;
#endif
#endif
p = buf =... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 181,529,580,785,672,000,000,000,000,000,000,000,000 | 103 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
flatpak_dir_install (FlatpakDir *self,
gboolean no_pull,
gboolean no_deploy,
gboolean no_static_deltas,
gboolean reinstall,
gboolean app_hint,
... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 1,423,650,616,973,415,600,000,000,000,000,000,000 | 158 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
Item_datetime_literal_for_invalid_dates(THD *thd,
const Datetime *ltime, uint dec_arg)
:Item_datetime_literal(thd, ltime, dec_arg)
{
maybe_null= false;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 75,753,499,467,449,810,000,000,000,000,000,000,000 | 6 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
nv_ctrlg(cmdarg_T *cap)
{
if (VIsual_active) // toggle Selection/Visual mode
{
VIsual_select = !VIsual_select;
may_trigger_modechanged();
showmode();
}
else if (!checkclearop(cap->oap))
// print full name if count given or :cd used
fileinfo((int)cap->count0, FALSE, TRUE);
} | 0 | [
"CWE-416"
] | vim | e2fa213cf571041dbd04ab0329303ffdc980678a | 189,149,062,782,715,980,000,000,000,000,000,000,000 | 12 | patch 8.2.5024: using freed memory with "]d"
Problem: Using freed memory with "]d".
Solution: Copy the pattern before searching. |
int dsdb_modify(struct ldb_context *ldb, const struct ldb_message *message,
uint32_t dsdb_flags)
{
struct ldb_request *req;
int ret;
ret = ldb_build_mod_req(&req, ldb, ldb,
message,
NULL,
NULL,
ldb_op_default_callback,
NULL);
if (ret != LDB_SUCCESS) return ret;
ret = dsdb_request_add_contr... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 206,362,142,901,172,700,000,000,000,000,000,000,000 | 26 | 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... |
static int iee80211_tdls_have_ht_peers(struct ieee80211_sub_if_data *sdata)
{
struct sta_info *sta;
bool result = false;
rcu_read_lock();
list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) {
if (!sta->sta.tdls || sta->sdata != sdata || !sta->uploaded ||
!test_sta_flag(sta, WLAN_STA_AUTHORIZED) ||
... | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 335,501,357,372,589,550,000,000,000,000,000,000 | 19 | mac80211: handle deauthentication/disassociation from TDLS peer
When receiving a deauthentication/disassociation frame from a TDLS
peer, a station should not disconnect the current AP, but only
disable the current TDLS link if it's enabled.
Without this change, a TDLS issue can be reproduced by following the
steps as... |
bool LEX::sp_for_loop_condition(THD *thd, const Lex_for_loop_st &loop)
{
Item_splocal *args[2];
for (uint i= 0 ; i < 2; i++)
{
sp_variable *src= i == 0 ? loop.m_index : loop.m_target_bound;
args[i]= new (thd->mem_root)
Item_splocal(thd, &sp_rcontext_handler_local,
... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 190,476,410,586,168,900,000,000,000,000,000,000,000 | 21 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
ex_update(exarg_T *eap)
{
if (curbufIsChanged())
(void)do_write(eap);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 96,377,542,313,731,030,000,000,000,000,000,000,000 | 5 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
get_flp_value(buf_T *buf)
{
if (buf->b_p_flp == NULL || *buf->b_p_flp == NUL)
return p_flp;
return buf->b_p_flp;
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | 652dee448618589de5528a9e9a36995803f5557a | 195,447,143,108,773,430,000,000,000,000,000,000,000 | 6 | patch 8.2.4245: ":retab 0" may cause illegal memory access
Problem: ":retab 0" may cause illegal memory access.
Solution: Limit the value of 'tabstop' to 10000. |
double Field_newdate::val_real(void)
{
ASSERT_COLUMN_MARKED_FOR_READ;
return (double) Field_newdate::val_int();
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 257,703,914,881,327,270,000,000,000,000,000,000,000 | 5 | 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... |
gdLayerOverlay (int dst, int src)
{
int a1, a2;
a1 = gdAlphaMax - gdTrueColorGetAlpha(dst);
a2 = gdAlphaMax - gdTrueColorGetAlpha(src);
return ( ((gdAlphaMax - a1*a2/gdAlphaMax) << 24) +
(gdAlphaOverlayColor( gdTrueColorGetRed(src), gdTrueColorGetRed(dst), gdRedMax ) << 16) +
(gdAlphaOverlayColor( gdTrueColorGe... | 0 | [
"CWE-119"
] | php-src | feba44546c27b0158f9ac20e72040a224b918c75 | 96,171,849,966,077,220,000,000,000,000,000,000,000 | 11 | Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()). |
static ssize_t bfq_low_latency_store(struct elevator_queue *e,
const char *page, size_t count)
{
struct bfq_data *bfqd = e->elevator_data;
unsigned long __data;
int ret;
ret = bfq_var_store(&__data, (page));
if (ret)
return ret;
if (__data > 1)
__data = 1;
if (__data == 0 && bfqd->low_latency != ... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 104,084,270,119,240,540,000,000,000,000,000,000,000 | 19 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
static bool login_via_cert(PgSocket *client)
{
struct tls *tls = client->sbuf.tls;
struct tls_cert *cert;
struct tls_cert_dname *subj;
if (!tls) {
disconnect_client(client, true, "TLS connection required");
return false;
}
if (tls_get_peer_cert(client->sbuf.tls, &cert, NULL) < 0 || !cert) {
disconnect_clie... | 0 | [
"CWE-287",
"CWE-284"
] | pgbouncer | 7ca3e5279d05fceb1e8a043c6f5b6f58dea3ed38 | 26,901,960,394,923,580,000,000,000,000,000,000,000 | 39 | Remove too early set of auth_user
When query returns 0 rows (user not found),
this user stays as login user...
Should fix #69. |
encode_tlv_table_mappings(struct ofpbuf *b, struct ovs_list *mappings)
{
struct ofputil_tlv_map *map;
LIST_FOR_EACH (map, list_node, mappings) {
struct nx_tlv_map *nx_map;
nx_map = ofpbuf_put_zeros(b, sizeof *nx_map);
nx_map->option_class = htons(map->option_class);
nx_map->opt... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 93,129,851,636,753,420,000,000,000,000,000,000,000 | 14 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
void sctp_v6_del_protocol(void)
{
inet6_del_protocol(&sctpv6_protocol, IPPROTO_SCTP);
unregister_inet6addr_notifier(&sctp_inet6addr_notifier);
} | 0 | [
"CWE-310"
] | net | 95ee62083cb6453e056562d91f597552021e6ae7 | 153,425,144,632,427,340,000,000,000,000,000,000,000 | 5 | net: sctp: fix ipv6 ipsec encryption bug in sctp_v6_xmit
Alan Chester reported an issue with IPv6 on SCTP that IPsec traffic is not
being encrypted, whereas on IPv4 it is. Setting up an AH + ESP transport
does not seem to have the desired effect:
SCTP + IPv4:
22:14:20.809645 IP (tos 0x2,ECT(0), ttl 64, id 0, offse... |
BOOL windows_ctrl_handler(DWORD fdwCtrlType)
{
switch (fdwCtrlType)
{
case CTRL_C_EVENT:
case CTRL_BREAK_EVENT:
handle_ctrlc_signal(SIGINT);
/* Indicate that signal has beed handled. */
return TRUE;
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
handle_quit_sign... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 116,565,101,787,367,600,000,000,000,000,000,000,000 | 17 | 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... |
static void rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig)
{
struct rfcomm_dev *dev = dlc->owner;
if (!dev)
return;
BT_DBG("dlc %p dev %p v24_sig 0x%02x", dlc, dev, v24_sig);
if ((dev->modem_status & TIOCM_CD) && !(v24_sig & RFCOMM_V24_DV)) {
if (dev->port.tty && !C_CLOCAL(dev->port.tty))
tty_... | 0 | [
"CWE-200"
] | linux | f9432c5ec8b1e9a09b9b0e5569e3c73db8de432a | 276,509,280,496,824,780,000,000,000,000,000,000,000 | 19 | Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST)
The RFCOMM code fails to initialize the two padding bytes of struct
rfcomm_dev_list_req inserted for alignment before copying it to
userland. Additionally there are two padding bytes in each instance of
struct rfcomm_dev_info. The ioctl() that for disclosure... |
_rsvg_css_hand_normalize_length (const RsvgLength * in, gdouble pixels_per_inch,
gdouble width_or_height, gdouble font_size)
{
if (in->factor == '\0')
return in->length;
else if (in->factor == 'p')
return in->length * width_or_height;
else if (in->factor == '... | 0 | [
"CWE-20"
] | librsvg | d83e426fff3f6d0fa6042d0930fb70357db24125 | 327,543,577,694,601,400,000,000,000,000,000,000,000 | 16 | io: Use XML_PARSE_NONET
We don't want to load resources off the net.
Bug #691708. |
httpRead2(http_t *http, /* I - HTTP connection */
char *buffer, /* I - Buffer for data */
size_t length) /* I - Maximum number of bytes */
{
ssize_t bytes; /* Bytes read */
#ifdef HAVE_LIBZ
DEBUG_printf(("httpRead2(http=%p, buffer=%p, length=" CUPS_LLFMT ") coding=%d data_encoding=%d data_rem... | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 266,266,149,795,889,800,000,000,000,000,000,000,000 | 198 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
void bn_sqr_comba8(BN_ULONG *r, const BN_ULONG *a)
{
BN_ULONG c1,c2,c3;
c1=0;
c2=0;
c3=0;
sqr_add_c(a,0,c1,c2,c3);
r[0]=c1;
c1=0;
sqr_add_c2(a,1,0,c2,c3,c1);
r[1]=c2;
c2=0;
sqr_add_c(a,1,c3,c1,c2);
sqr_add_c2(a,2,0,c3,c1,c2);
r[2]=c3;
c3=0;
sqr_add_c2(a,3,0,c1,c2,c3);
sqr_add_c2(a,2,1,c1,c2,c3);
r[3]... | 0 | [
"CWE-310"
] | openssl | a7a44ba55cb4f884c6bc9ceac90072dea38e66d0 | 136,244,921,358,634,130,000,000,000,000,000,000,000 | 74 | Fix for CVE-2014-3570 (with minor bn_asm.c revamp).
Reviewed-by: Emilia Kasper <emilia@openssl.org> |
Item *Item_sum_udf_str::copy_or_same(THD* thd)
{
return new (thd->mem_root) Item_sum_udf_str(thd, this);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 170,308,688,662,488,550,000,000,000,000,000,000,000 | 4 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
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; hook < NF_INET_NUMHOOKS... | 0 | [
"CWE-787"
] | linux | b29c457a6511435960115c0f548c4360d5f4801d | 98,217,830,454,979,840,000,000,000,000,000,000,000 | 82 | netfilter: x_tables: fix compat match/target pad out-of-bound write
xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.
Remove this code and zero the entire blob beforehand.
Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp... |
static char *tls_socket_get_peer_name(struct socket_context *sock, TALLOC_CTX *mem_ctx)
{
struct tls_context *tls = talloc_get_type(sock->private_data, struct tls_context);
return socket_get_peer_name(tls->socket, mem_ctx);
} | 0 | [] | samba | 22af043d2f20760f27150d7d469c7c7b944c6b55 | 167,345,559,247,091,780,000,000,000,000,000,000,000 | 5 | CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file (key.pem)
If the tls key is not owned by root or has not mode 0600 samba will not
start up.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Baumbach <bb@s... |
static int tg3_mem_rx_acquire(struct tg3 *tp)
{
unsigned int i, limit;
limit = tp->rxq_cnt;
/* If RSS is enabled, we need a (dummy) producer ring
* set on vector zero. This is the true hw prodring.
*/
if (tg3_flag(tp, ENABLE_RSS))
limit++;
for (i = 0; i < limit; i++) {
struct tg3_napi *tnapi = &tp->nap... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 60,951,230,090,791,830,000,000,000,000,000,000,000 | 41 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
int netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code)
{
struct netlink_set_err_data info;
struct hlist_node *node;
struct sock *sk;
int ret = 0;
info.exclude_sk = ssk;
info.pid = pid;
info.group = group;
/* sk->sk_err wants a positive error value */
info.code = -code;
read_lock(&nl_table_lock)... | 0 | [] | linux-2.6 | 16e5726269611b71c930054ffe9b858c1cea88eb | 209,653,306,038,774,500,000,000,000,000,000,000,000 | 21 | af_unix: dont send SCM_CREDENTIALS by default
Since commit 7361c36c5224 (af_unix: Allow credentials to work across
user and pid namespaces) af_unix performance dropped a lot.
This is because we now take a reference on pid and cred in each write(),
and release them in read(), usually done from another process,
eventua... |
spnego_gss_wrap_size_limit(
OM_uint32 *minor_status,
const gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
OM_uint32 req_output_size,
OM_uint32 *max_input_size)
{
OM_uint32 ret;
spnego_gss_ctx_id_t sc = (spnego_gss_ctx_id_t)context_handle;
if (sc->ctx_handle == GSS_C_NO_CONTEXT)
return (... | 0 | [
"CWE-18",
"CWE-763"
] | krb5 | b51b33f2bc5d1497ddf5bd107f791c101695000d | 96,874,969,248,965,370,000,000,000,000,000,000,000 | 22 | Fix SPNEGO context aliasing bugs [CVE-2015-2695]
The SPNEGO mechanism currently replaces its context handle with the
mechanism context handle upon establishment, under the assumption that
most GSS functions are only called after context establishment. This
assumption is incorrect, and can lead to aliasing violations ... |
static char **fill_envp(struct dhcp_packet *packet)
{
int envc;
int i;
char **envp, **curr;
const char *opt_name;
uint8_t *temp;
uint8_t overload = 0;
#define BITMAP unsigned
#define BBITS (sizeof(BITMAP) * 8)
#define BMASK(i) (1 << (i & (sizeof(BITMAP) * 8 - 1)))
#define FOUND_OPTS(i) (found_opts[(unsigned)i / ... | 1 | [
"CWE-125"
] | busybox | 74d9f1ba37010face4bd1449df4d60dd84450b06 | 16,379,697,809,689,600,000,000,000,000,000,000,000 | 135 | udhcpc: when decoding DHCP_SUBNET, ensure it is 4 bytes long
function old new delta
udhcp_run_script 795 801 +6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> |
f_cosh(typval_T *argvars, typval_T *rettv)
{
float_T f = 0.0;
rettv->v_type = VAR_FLOAT;
if (get_float_arg(argvars, &f) == OK)
rettv->vval.v_float = cosh(f);
else
rettv->vval.v_float = 0.0;
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 114,616,925,685,029,170,000,000,000,000,000,000,000 | 10 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static int tftp_read_data(struct tftp_session *spt, uint32_t block_nr,
uint8_t *buf, int len)
{
int bytes_read = 0;
if (spt->fd < 0) {
spt->fd = open(spt->filename, O_RDONLY | O_BINARY);
}
if (spt->fd < 0) {
return -1;
}
if (len) {
if (lseek(s... | 0 | [] | libslirp | 3f17948137155f025f7809fdc38576d5d2451c3d | 22,834,260,929,243,480,000,000,000,000,000,000,000 | 23 | tftp: check tftp_input buffer size
Fixes: CVE-2021-3595
Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/46
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> |
static inline int should_follow_link(struct nameidata *nd, struct path *link,
int follow,
struct inode *inode, unsigned seq)
{
if (likely(!d_is_symlink(link->dentry)))
return 0;
if (!follow)
return 0;
/* make sure that d_is_symlink above matches inode */
if (nd->flags & LOOKUP_RCU) {
if (rea... | 0 | [
"CWE-284"
] | linux | 9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca | 6,733,374,793,926,959,000,000,000,000,000,000,000 | 15 | vfs: rename: check backing inode being equal
If a file is renamed to a hardlink of itself POSIX specifies that rename(2)
should do nothing and return success.
This condition is checked in vfs_rename(). However it won't detect hard
links on overlayfs where these are given separate inodes on the overlayfs
layer.
Over... |
read_indent(const char *input, int indent, int size, int in_index, int *out_index, char *output)
{
int k = 0, j;
while (in_index < size) {
if (input[in_index] == ' ') {
k++;
} else if (input[in_index] == '\t') {
/* RFC 6020 6.1.3 tab character is treated as 8 space chara... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 205,042,427,006,769,280,000,000,000,000,000,000,000 | 30 | yang parser BUGFIX double free
Fixes #742 |
snmp_out_toggle_options_usage(const char *lead, FILE * outf)
{
fprintf(outf, "%s0: print leading 0 for single-digit hex characters\n", lead);
fprintf(outf, "%sa: print all strings in ascii format\n", lead);
fprintf(outf, "%sb: do not break OID indexes down\n", lead);
fprintf(outf, "%se: print enums ... | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 194,776,689,532,331,480,000,000,000,000,000,000,000 | 26 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
int dev_close_many(struct list_head *head, bool unlink)
{
struct net_device *dev, *tmp;
/* Remove the devices that don't need to be closed */
list_for_each_entry_safe(dev, tmp, head, close_list)
if (!(dev->flags & IFF_UP))
list_del_init(&dev->close_list);
__dev_close_many(head);
list_for_each_entry_safe(de... | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 301,822,555,546,934,500,000,000,000,000,000,000,000 | 20 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out)
{
_gdImageWBMPCtx(image, fg, out);
} | 0 | [
"CWE-415"
] | php-src | 089f7c0bc28d399b0420aa6ef058e4c1c120b2ae | 234,098,661,658,716,050,000,000,000,000,000,000,000 | 4 | Sync with upstream
Even though libgd/libgd#492 is not a relevant bug fix for PHP, since
the binding doesn't use the `gdImage*Ptr()` functions at all, we're
porting the fix to stay in sync here. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.