func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static inline int deliver_skb(struct sk_buff *skb,
struct packet_type *pt_prev,
struct net_device *orig_dev)
{
atomic_inc(&skb->users);
return pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
} | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 146,249,961,655,868,470,000,000,000,000,000,000,000 | 7 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
Nef_polyhedron_2<T,Items,Mark> operator*(const Nef_polyhedron_2<T,Items,Mark>& N1) const
{ return intersection(N1); } | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 183,449,439,459,646,300,000,000,000,000,000,000,000 | 2 | Fix Nef_2 and Nef_S2 IO |
static int fsck_walk_tree(struct tree *tree, void *data, struct fsck_options *options)
{
struct tree_desc desc;
struct name_entry entry;
int res = 0;
const char *name;
if (parse_tree(tree))
return -1;
name = get_object_name(options, &tree->object);
if (init_tree_desc_gently(&desc, tree->buffer, tree->size))
... | 0 | [
"CWE-20",
"CWE-88",
"CWE-522"
] | git | a124133e1e6ab5c7a9fef6d0e6bcb084e3455b46 | 111,686,034,728,200,080,000,000,000,000,000,000,000 | 45 | fsck: detect submodule urls starting with dash
Urls with leading dashes can cause mischief on older
versions of Git. We should detect them so that they can be
rejected by receive.fsckObjects, preventing modern versions
of git from being a vector by which attacks can spread.
Signed-off-by: Jeff King <peff@peff.net>
Si... |
MONGO_EXPORT const char *bson_iterator_value( const bson_iterator *i ) {
const char *t = i->cur + 1;
t += strlen( t ) + 1;
return t;
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 50,195,699,689,351,410,000,000,000,000,000,000,000 | 5 | don't mix up int and size_t (first pass to fix that) |
static void gen_bndck(CPUX86State *env, DisasContext *s, int modrm,
TCGCond cond, TCGv_i64 bndv)
{
TCGv ea = gen_lea_modrm_1(gen_lea_modrm_0(env, s, modrm));
tcg_gen_extu_tl_i64(cpu_tmp1_i64, ea);
if (!CODE64(s)) {
tcg_gen_ext32u_i64(cpu_tmp1_i64, cpu_tmp1_i64);
}
tcg_... | 0 | [
"CWE-94"
] | qemu | 30663fd26c0307e414622c7a8607fbc04f92ec14 | 110,247,521,638,849,600,000,000,000,000,000,000,000 | 13 | tcg/i386: Check the size of instruction being translated
This fixes the bug: 'user-to-root privesc inside VM via bad translation
caching' reported by Jann Horn here:
https://bugs.chromium.org/p/project-zero/issues/detail?id=1122
Reviewed-by: Richard Henderson <rth@twiddle.net>
CC: Peter Maydell <peter.maydell@linaro.... |
static void setup_msrs(struct vcpu_vmx *vmx)
{
int save_nmsrs, index;
save_nmsrs = 0;
#ifdef CONFIG_X86_64
if (is_long_mode(&vmx->vcpu)) {
index = __find_msr_index(vmx, MSR_SYSCALL_MASK);
if (index >= 0)
move_msr_up(vmx, index, save_nmsrs++);
index = __find_msr_index(vmx, MSR_LSTAR);
if (index >= 0)
m... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 124,781,021,059,645,160,000,000,000,000,000,000,000 | 37 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
static inline void Process_ipfix_data(exporter_ipfix_domain_t *exporter, void *data_flowset, FlowSource_t *fs, input_translation_t *table ){
uint64_t sampling_rate;
uint32_t size_left;
uint8_t *in, *out;
int i;
char *string;
size_left = GET_FLOWSET_LENGTH(data_flowset) - 4; // -4 for data flowset header... | 1 | [] | nfdump | ff0e855bd1f51bed9fc5d8559c64d3cfb475a5d8 | 281,396,550,086,306,320,000,000,000,000,000,000,000 | 358 | Fix security issues in netflow_v9.c and ipfix.c |
delete_property (GsmXSMPClient *client,
const char *name)
{
int index;
SmProp *prop;
prop = find_property (client, name, &index);
if (!prop) {
return;
}
#if 0
/* This is wrong anyway; we can't unconditionally run the current
... | 0 | [
"CWE-125",
"CWE-835"
] | gnome-session | b0dc999e0b45355314616321dbb6cb71e729fc9d | 233,590,985,075,961,400,000,000,000,000,000,000,000 | 27 | [gsm] Delay the creation of the GsmXSMPClient until it really exists
We used to create the GsmXSMPClient before the XSMP connection is really
accepted. This can lead to some issues, though. An example is:
https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting:
"What is happening is that a new client (probabl... |
hns_nic_select_queue(struct net_device *ndev, struct sk_buff *skb,
void *accel_priv, select_queue_fallback_t fallback)
{
struct ethhdr *eth_hdr = (struct ethhdr *)skb->data;
struct hns_nic_priv *priv = netdev_priv(ndev);
/* fix hardware broadcast/multicast packets queue loopback */
if (!AE_IS_VER1(priv->ene... | 0 | [
"CWE-416"
] | linux | 27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2 | 34,522,158,935,805,593,000,000,000,000,000,000,000 | 13 | net: hns: Fix a skb used after free bug
skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK,
which cause hns_nic_net_xmit to use a freed skb.
BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940...
[17659.112635] alloc_debug_processing+0x18c/0x1a0
[17659.117208] __slab_alloc+0x52c/0x... |
static inline void kvm_arch_start_assignment(struct kvm *kvm)
{
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 38,530,539,227,004,370,000,000,000,000,000,000,000 | 3 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
static bool regs_sipr(struct pt_regs *regs)
{
unsigned long sipr = MMCRA_SIPR;
if (ppmu->flags & PPMU_HAS_SIER)
return !!(regs->dar & SIER_SIPR);
if (ppmu->flags & PPMU_ALT_SIPR)
sipr = POWER6_MMCRA_SIPR;
return !!(regs->dsisr & sipr);
} | 0 | [
"CWE-476"
] | linux | 60b7ed54a41b550d50caf7f2418db4a7e75b5bdc | 317,636,508,210,867,350,000,000,000,000,000,000,000 | 12 | powerpc/perf: Fix crash in perf_instruction_pointer() when ppmu is not set
On systems without any specific PMU driver support registered, running
perf record causes Oops.
The relevant portion from call trace:
BUG: Kernel NULL pointer dereference on read at 0x00000040
Faulting instruction address: 0xc0021f0c
Oo... |
static int hidinput_scale_battery_capacity(struct hid_device *dev,
int value)
{
if (dev->battery_min < dev->battery_max &&
value >= dev->battery_min && value <= dev->battery_max)
value = ((value - dev->battery_min) * 100) /
(dev->battery_max - dev->battery_min);
return value;
} | 0 | [
"CWE-787"
] | linux | 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 | 190,071,065,416,543,520,000,000,000,000,000,000,000 | 10 | HID: core: Sanitize event code and type when mapping input
When calling into hid_map_usage(), the passed event code is
blindly stored as is, even if it doesn't fit in the associated bitmap.
This event code can come from a variety of sources, including devices
masquerading as input devices, only a bit more "programmab... |
FLAC_API FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples)
{
unsigned i, j = 0, channel;
const unsigned channels = encoder->protected_->channels, blocksize = encoder->protected_->blocksize;
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != encod... | 0 | [] | flac | c06a44969c1145242a22f75fc8fb2e8b54c55303 | 240,736,684,605,330,960,000,000,000,000,000,000,000 | 58 | flac : Fix for https://sourceforge.net/p/flac/bugs/425/
* flac/encode.c : Validate num_tracks field of cuesheet.
* libFLAC/stream_encoder.c : Add check for a NULL pointer.
* flac/encode.c : Improve bounds checking.
Closes: https://sourceforge.net/p/flac/bugs/425/ |
void ConfigureBuiltinOp(BuiltinOperator op) {
switch (op) {
case BuiltinOperator_EQUAL: {
SetBuiltinOp(op, BuiltinOptions_EqualOptions,
CreateEqualOptions(builder_).Union());
break;
}
case BuiltinOperator_NOT_EQUAL: {
SetBuiltinOp(op, BuiltinOptions_N... | 0 | [
"CWE-20",
"CWE-703"
] | tensorflow | a989426ee1346693cc015792f11d715f6944f2b8 | 340,193,660,528,142,530,000,000,000,000,000,000,000 | 35 | Improve to cover scale value greater than one
PiperOrigin-RevId: 433050921 |
void kvm_arch_irq_bypass_del_producer(struct irq_bypass_consumer *cons,
struct irq_bypass_producer *prod)
{
int ret;
struct kvm_kernel_irqfd *irqfd =
container_of(cons, struct kvm_kernel_irqfd, consumer);
if (!kvm_x86_ops->update_pi_irte) {
WARN_ON(irqfd->producer != NULL);
return;
}
WARN_ON(irqf... | 0 | [
"CWE-369"
] | linux | 0185604c2d82c560dab2f2933a18f797e74ab5a8 | 106,575,127,551,718,020,000,000,000,000,000,000,000 | 26 | KVM: x86: Reload pit counters for all channels when restoring state
Currently if userspace restores the pit counters with a count of 0
on channels 1 or 2 and the guest attempts to read the count on those
channels, then KVM will perform a mod of 0 and crash. This will ensure
that 0 values are converted to 65536 as per... |
EIGEN_STRONG_INLINE bool operator<(const QInt32 a, const QInt32 b) {
return a.value < b.value;
} | 0 | [
"CWE-908",
"CWE-787"
] | tensorflow | ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2 | 194,785,532,770,582,350,000,000,000,000,000,000,000 | 3 | Default initialize fixed point Eigen types.
In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN.
PiperOrigin-RevId: 344101137
Change-Id: I14555fd... |
static int MP4_ReadBox_dvc1( stream_t *p_stream, MP4_Box_t *p_box )
{
MP4_Box_data_dvc1_t *p_dvc1;
MP4_READBOX_ENTER( MP4_Box_data_dvc1_t );
p_dvc1 = p_box->data.p_dvc1;
MP4_GET1BYTE( p_dvc1->i_profile_level ); /* profile is on 4bits, level 3bits */
uint8_t i_profile = (p_dvc1->i_profile_level & 0... | 0 | [
"CWE-120",
"CWE-191",
"CWE-787"
] | vlc | 2e7c7091a61aa5d07e7997b393d821e91f593c39 | 310,088,267,225,246,250,000,000,000,000,000,000,000 | 33 | demux: mp4: fix buffer overflow in parsing of string boxes.
We ensure that pbox->i_size is never smaller than 8 to avoid an
integer underflow in the third argument of the subsequent call to
memcpy. We also make sure no truncation occurs when passing values
derived from the 64 bit integer p_box->i_size to arguments of ... |
static int csnmp_oid_to_string(char *buffer, size_t buffer_size,
oid_t const *o) {
char oid_str[MAX_OID_LEN][16];
char *oid_str_ptr[MAX_OID_LEN];
for (size_t i = 0; i < o->oid_len; i++) {
ssnprintf(oid_str[i], sizeof(oid_str[i]), "%lu", (unsigned long)o->oid[i]);
oid_str_pt... | 0 | [
"CWE-415"
] | collectd | d16c24542b2f96a194d43a73c2e5778822b9cb47 | 284,549,316,121,607,500,000,000,000,000,000,000,000 | 13 | snmp plugin: Fix double free of request PDU
snmp_sess_synch_response() always frees request PDU, in both case of request
error and success. If error condition occurs inside of `while (status == 0)`
loop, double free of `req` happens.
Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org> |
static DWORD WINAPI printer_thread_func(LPVOID arg)
{
IRP* irp;
PRINTER_DEVICE* printer_dev = (PRINTER_DEVICE*)arg;
HANDLE obj[] = { printer_dev->event, printer_dev->stopEvent };
UINT error = CHANNEL_RC_OK;
while (1)
{
DWORD rc = WaitForMultipleObjects(2, obj, FALSE, INFINITE);
if (rc == WAIT_FAILED)
{
... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 42,399,884,841,417,290,000,000,000,000,000,000,000 | 46 | Fixed oob read in irp_write and similar |
static void remove_listitem(struct mailboxlist *remitem)
{
struct mailboxlist *item;
struct mailboxlist *previtem = NULL;
for (item = open_mailboxes; item; item = item->next) {
if (item == remitem) {
if (previtem)
previtem->next = item->next;
else
... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 124,616,540,318,120,160,000,000,000,000,000,000,000 | 26 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
__acquires(&fc->lock)
{
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_inode *fi = get_fuse_inode(inode);
struct fuse_req *req;
while (fi->writectr >= 0 && !list_empty(&fi->queued_writes)) {
req = list_entry(fi->queued_writes.next, struct fuse_req, list);
list_del_init(&req->list);
fuse_send_writep... | 0 | [] | linux-2.6 | 0bd87182d3ab18a32a8e9175d3f68754c58e3432 | 317,166,085,803,135,600,000,000,000,000,000,000,000 | 12 | fuse: fix kunmap in fuse_ioctl_copy_user
Looks like another victim of the confusing kmap() vs kmap_atomic() API
differences.
Reported-by: Todor Gyumyushev <yodor1@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Cc: stable@kern... |
void ProtocolV1::reset_security()
{
ldout(cct, 5) << __func__ << dendl;
// clean up state internal variables and states
if (state == CONNECTING_SEND_CONNECT_MSG) {
if (authorizer) {
delete authorizer;
}
authorizer = nullptr;
}
} | 0 | [
"CWE-294"
] | ceph | 4c11203122d729c832a645c9e3f5092db4963840 | 164,784,531,740,280,580,000,000,000,000,000,000,000 | 12 | msg/async/ProtocolV1: resurrect "implement cephx_*require_version options"
This was added in commit 9bcbc2a3621f ("mon,msg: implement
cephx_*_require_version options") and inadvertently dropped in
commit e6f043f7d2dc ("msgr/async: huge refactoring of protocol V1").
As a result, service daemons don't enforce cephx_requ... |
void io_wq_destroy(struct io_wq *wq)
{
int i;
set_bit(IO_WQ_BIT_EXIT, &wq->state);
if (wq->manager)
kthread_stop(wq->manager);
rcu_read_lock();
for (i = 0; i < wq->nr_wqes; i++) {
struct io_wqe *wqe = wq->wqes[i];
if (!wqe)
continue;
io_wq_for_each_worker(wqe, io_wq_worker_wake, NULL);
}
rcu_read_u... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 181,100,840,129,549,460,000,000,000,000,000,000,000 | 25 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
static string getRubberWhaleFrame2() { return getDataDir() + "optflow/RubberWhale2.png"; } | 0 | [
"CWE-125",
"CWE-369"
] | opencv | d1615ba11a93062b1429fce9f0f638d1572d3418 | 325,964,619,752,440,680,000,000,000,000,000,000,000 | 1 | video:fixed DISOpticalFlow segfault from small img |
void MainWindow::onProducerChanged()
{
MLT.refreshConsumer();
if (playlist() && MLT.producer() && MLT.producer()->is_valid()
&& MLT.producer()->get_int(kPlaylistIndexProperty))
m_playlistDock->setUpdateButtonEnabled(true);
} | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 21,278,940,653,295,440,000,000,000,000,000,000,000 | 7 | fix upgrade check is not using TLS correctly |
encodePtr get_encoder_ex(sdlPtr sdl, const char *nscat, int len)
{
encodePtr enc;
if ((enc = zend_hash_str_find_ptr(&SOAP_GLOBAL(defEnc), (char*)nscat, len)) != NULL) {
return enc;
} else if (sdl && sdl->encoders && (enc = zend_hash_str_find_ptr(sdl->encoders, (char*)nscat, len)) != NULL) {
return enc;
}
retu... | 0 | [
"CWE-476"
] | php-src | 3c939e3f69955d087e0bb671868f7267dfb2a502 | 316,927,788,152,040,800,000,000,000,000,000,000,000 | 11 | Fix bug #80672 - Null Dereference in SoapClient |
static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
struct sigaction *sa)
{
switch(regs->u_regs[UREG_I0]) {
case ERESTART_RESTARTBLOCK:
case ERESTARTNOHAND:
no_system_call_restart:
regs->u_regs[UREG_I0] = EINTR;
regs->psr |= PSR_C;
break;
case ERESTARTSYS:
if (!(sa->sa_fl... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 214,040,588,444,819,600,000,000,000,000,000,000,000 | 20 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
GF_Err fiin_on_child_box(GF_Box *s, GF_Box *a, Bool is_rem)
{
FDItemInformationBox *ptr = (FDItemInformationBox *)s;
switch(a->type) {
case GF_ISOM_BOX_TYPE_PAEN:
BOX_FIELD_LIST_ASSIGN(partition_entries)
return GF_OK;
case GF_ISOM_BOX_TYPE_SEGR:
BOX_FIELD_ASSIGN(session_info, FDSessionGroupBox)
return GF_O... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 285,044,339,428,277,500,000,000,000,000,000,000,000 | 16 | fixed #1757 |
dup_obj_with_new_offset(VALUE obj, int of)
{
volatile VALUE dup = dup_obj_as_complex(obj);
{
get_d1(dup);
set_of(dat, of);
}
return dup;
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 323,678,770,818,053,500,000,000,000,000,000,000,000 | 9 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
Status updateAuthzDocuments(OperationContext* txn,
const NamespaceString& collectionName,
const BSONObj& query,
const BSONObj& updatePattern,
bool upsert,
bool multi,
... | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 45,306,060,310,596,570,000,000,000,000,000,000,000 | 36 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
int closefrm(TABLE *table)
{
int error=0;
DBUG_ENTER("closefrm");
DBUG_PRINT("enter", ("table: %p", table));
if (table->db_stat)
error=table->file->ha_close();
table->alias.free();
if (table->expr_arena)
table->expr_arena->free_items();
if (table->field)
{
for (Field **ptr=table->field ; *p... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 205,057,879,028,961,740,000,000,000,000,000,000,000 | 33 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
static inline int sock_recvfrom(php_netstream_data_t *sock, char *buf, size_t buflen, int flags,
zend_string **textaddr,
struct sockaddr **addr, socklen_t *addrlen
)
{
int ret;
int want_addr = textaddr || addr;
if (want_addr) {
php_sockaddr_storage sa;
socklen_t sl = sizeof(sa);
ret = recvfrom(sock->soc... | 0 | [
"CWE-20",
"CWE-918"
] | php-src | bab0b99f376dac9170ac81382a5ed526938d595a | 25,903,311,340,178,000,000,000,000,000,000,000,000 | 32 | Detect invalid port in xp_socket parse ip address
For historical reasons, fsockopen() accepts the port and hostname
separately: fsockopen('127.0.0.1', 80)
However, with the introdcution of stream transports in PHP 4.3,
it became possible to include the port in the hostname specifier:
fsockopen('127.0.0.1:80')
Or mor... |
int __net_init ip_vs_control_net_init(struct net *net)
{
int idx;
struct netns_ipvs *ipvs = net_ipvs(net);
rwlock_init(&ipvs->rs_lock);
/* Initialize rs_table */
for (idx = 0; idx < IP_VS_RTAB_SIZE; idx++)
INIT_LIST_HEAD(&ipvs->rs_table[idx]);
INIT_LIST_HEAD(&ipvs->dest_trash);
atomic_set(&ipvs->ftpsvc_coun... | 0 | [
"CWE-200"
] | linux | 2d8a041b7bfe1097af21441cb77d6af95f4f4680 | 121,350,224,209,121,200,000,000,000,000,000,000,000 | 36 | ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing... |
static int network_config_set_buffer_size (const oconfig_item_t *ci) /* {{{ */
{
int tmp;
if ((ci->values_num != 1)
|| (ci->values[0].type != OCONFIG_TYPE_NUMBER))
{
WARNING ("network plugin: The `MaxPacketSize' config option needs exactly "
"one numeric argument.");
return (-1);
}
tmp ... | 0 | [
"CWE-119",
"CWE-787"
] | collectd | b589096f907052b3a4da2b9ccc9b0e2e888dfc18 | 57,365,372,418,327,860,000,000,000,000,000,000,000 | 17 | network plugin: Fix heap overflow in parse_packet().
Emilien Gaspar has identified a heap overflow in parse_packet(), the
function used by the network plugin to parse incoming network packets.
This is a vulnerability in collectd, though the scope is not clear at
this point. At the very least specially crafted network... |
static void megasas_command_complete(SCSIRequest *req, uint32_t status,
size_t resid)
{
MegasasCmd *cmd = req->hba_private;
uint8_t cmd_status = MFI_STAT_OK;
trace_megasas_command_complete(cmd->index, status, resid);
if (req->io_canceled) {
return;
}
... | 0 | [
"CWE-401"
] | qemu | 765a707000e838c30b18d712fe6cb3dd8e0435f3 | 108,544,704,048,807,570,000,000,000,000,000,000,000 | 36 | megasas: fix guest-triggered memory leak
If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd
will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory.
Avoid this by returning only the status from map_dcmd, and loading
cmd->iov_size in the caller.
Reported-by: Li Qiang <liqiang6-s@360.c... |
S3BootScriptSaveStall (
IN UINTN Duration
)
{
UINT8 Length;
UINT8 *Script;
EFI_BOOT_SCRIPT_STALL ScriptStall;
Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_STALL));
Script = S3BootScriptGetEntryAddAddress (Length);
if (Script == NULL) ... | 0 | [
"CWE-787"
] | edk2 | 322ac05f8bbc1bce066af1dabd1b70ccdbe28891 | 134,467,361,196,349,150,000,000,000,000,000,000,000 | 27 | MdeModulePkg/PiDxeS3BootScriptLib: Fix potential numeric truncation (CVE-2019-14563)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2001
For S3BootScriptLib APIs:
S3BootScriptSaveIoWrite
S3BootScriptSaveMemWrite
S3BootScriptSavePciCfgWrite
S3BootScriptSavePciCfg2Write
S3BootScriptSaveSmbusExecute
S3BootScriptSav... |
static int autofs_protocol(int dev_autofs_fd, int ioctl_fd) {
uint32_t major, minor;
struct autofs_dev_ioctl param;
assert(dev_autofs_fd >= 0);
assert(ioctl_fd >= 0);
init_autofs_dev_ioctl(¶m);
param.ioctlfd = ioctl_fd;
if (ioctl(dev_autofs_fd, AUTOFS_DEV_I... | 0 | [
"CWE-362"
] | systemd | e7d54bf58789545a9eb0b3964233defa0b007318 | 139,870,682,762,295,400,000,000,000,000,000,000,000 | 26 | automount: ack automount requests even when already mounted (#5916)
If a process accesses an autofs filesystem while systemd is in the
middle of starting the mount unit on top of it, it is possible for the
autofs_ptype_missing_direct request from the kernel to be received after
the mount unit has been fully started... |
static double filter_cosine(const double x)
{
if ((x >= -1.0) && (x <= 1.0)) return ((cos(x * M_PI) + 1.0)/2.0);
return 0;
} | 0 | [
"CWE-119"
] | php-src | 4bb422343f29f06b7081323844d9b52e1a71e4a5 | 201,465,736,032,206,770,000,000,000,000,000,000,000 | 6 | Fix bug #70976: fix boundary check on gdImageRotateInterpolated |
sprint_realloc_description(u_char ** buf, size_t * buf_len,
size_t * out_len, int allow_realloc,
oid * objid, size_t objidlen, int width)
{
struct tree *tp = get_tree(objid, objidlen, tree_head);
struct tree *subtree = tree_head;
int pos, len;
... | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 325,688,283,515,425,730,000,000,000,000,000,000,000 | 108 | 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. |
SYSCALL_DEFINE5(add_key, const char __user *, _type,
const char __user *, _description,
const void __user *, _payload,
size_t, plen,
key_serial_t, ringid)
{
key_ref_t keyring_ref, key_ref;
char type[32], *description;
void *payload;
long ret;
bool vm;
ret = -EINVAL;
if (plen > 1024 * 1024 - 1)
goto er... | 0 | [
"CWE-476"
] | linux-2.6 | 9d1ac65a9698513d00e5608d93fca0c53f536c14 | 269,481,619,305,409,950,000,000,000,000,000,000,000 | 80 | KEYS: Fix RCU no-lock warning in keyctl_session_to_parent()
There's an protected access to the parent process's credentials in the middle
of keyctl_session_to_parent(). This results in the following RCU warning:
===================================================
[ INFO: suspicious rcu_dereference_check() usage.... |
unicode_fixup_string(char *str, const char *fromcode)
{
uint8_t *ret;
size_t len;
if (!str)
return NULL;
len = strlen(str);
/* String is valid UTF-8 */
if (!u8_check((uint8_t *)str, len))
{
if (len >= 3)
{
/* Check for and strip byte-order mark */
if (memcmp("\xef\xbb\xbf", str, 3) =... | 0 | [
"CWE-416"
] | owntone-server | 246d8ae0cef27377e5dfe9ee3ad87e864d6b6266 | 99,253,827,903,832,800,000,000,000,000,000,000,000 | 33 | [misc] Fix use-after-free in net_bind()
Thanks to Ba Jinsheng for reporting this bug |
int _gnutls_ciphertext2compressed(gnutls_session_t session,
opaque * compress_data,
int compress_size,
gnutls_datum_t ciphertext, uint8 type)
{
uint8 MAC[MAX_HASH_SIZE];
uint16 c_length;
uint8 pad;
int length;
mac_hd_t td;
uint16 blocksize;
int ret, i, pad_failed = 0;
u... | 0 | [] | gnutls | 7ad6162573ba79a4392c63b453ad0220ca6c5ace | 158,496,975,013,272,960,000,000,000,000,000,000,000 | 156 | added an extra check while checking the padding. |
static void sdhci_sysbus_realize(DeviceState *dev, Error **errp)
{
ERRP_GUARD();
SDHCIState *s = SYSBUS_SDHCI(dev);
SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
sdhci_common_realize(s, errp);
if (*errp) {
return;
}
if (s->dma_mr) {
s->dma_as = &s->sysbus_dma_as;
address... | 0 | [
"CWE-119"
] | qemu | dfba99f17feb6d4a129da19d38df1bcd8579d1c3 | 331,270,406,429,036,100,000,000,000,000,000,000,000 | 23 | hw/sd/sdhci: Fix DMA Transfer Block Size field
The 'Transfer Block Size' field is 12-bit wide.
See section '2.2.2. Block Size Register (Offset 004h)' in datasheet.
Two different bug reproducer available:
- https://bugs.launchpad.net/qemu/+bug/1892960
- https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Fsdhc... |
void Item_cond::print(String *str, enum_query_type query_type)
{
List_iterator_fast<Item> li(list);
Item *item;
if ((item=li++))
item->print_parenthesised(str, query_type, precedence());
while ((item=li++))
{
str->append(' ');
str->append(func_name());
str->append(' ');
item->print_parenth... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 130,685,382,731,460,160,000,000,000,000,000,000,000 | 14 | 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 ... |
is_for_bus (Header *header)
{
return g_strcmp0 (header->destination, "org.freedesktop.DBus") == 0;
} | 0 | [
"CWE-284",
"CWE-436"
] | flatpak | 52346bf187b5a7f1c0fe9075b328b7ad6abe78f6 | 183,805,843,596,492,220,000,000,000,000,000,000,000 | 4 | Fix vulnerability in dbus proxy
During the authentication all client data is directly forwarded
to the dbus daemon as is, until we detect the BEGIN command after
which we start filtering the binary dbus protocol.
Unfortunately the detection of the BEGIN command in the proxy
did not exactly match the detection in the ... |
ngx_mail_auth_login_password(ngx_mail_session_t *s, ngx_connection_t *c)
{
ngx_str_t *arg;
arg = s->args.elts;
#if (NGX_DEBUG_MAIL_PASSWD)
ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0,
"mail auth login password: \"%V\"", &arg[0]);
#endif
s->passwd.data = ngx_pnalloc(c->pool,
... | 0 | [
"CWE-284",
"CWE-295"
] | nginx | 173f16f736c10eae46cd15dd861b04b82d91a37a | 88,057,743,640,151,700,000,000,000,000,000,000,000 | 30 | Mail: max_errors directive.
Similarly to smtpd_hard_error_limit in Postfix and smtp_max_unknown_commands
in Exim, specifies the number of errors after which the connection is closed. |
crm_trigger_dispatch(GSource * source, GSourceFunc callback, gpointer userdata)
{
int rc = TRUE;
crm_trigger_t *trig = (crm_trigger_t *) source;
if(trig->running) {
/* Wait until the existing job is complete before starting the next one */
return TRUE;
}
trig->trigger = FALSE;
... | 0 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 168,071,717,942,556,240,000,000,000,000,000,000,000 | 21 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
static int get_int32_le(QEMUFile *f, void *pv, size_t size)
{
int32_t *cur = pv;
int32_t loaded;
qemu_get_sbe32s(f, &loaded);
if (loaded <= *cur) {
*cur = loaded;
return 0;
}
return -EINVAL;
} | 1 | [
"CWE-119"
] | qemu | d2ef4b61fe6d33d2a5dcf100a9b9440de341ad62 | 280,621,577,750,592,840,000,000,000,000,000,000,000 | 12 | vmstate: fix buffer overflow in target-arm/machine.c
CVE-2013-4531
cpreg_vmstate_indexes is a VARRAY_INT32. A negative value for
cpreg_vmstate_array_len will cause a buffer overflow.
VMSTATE_INT32_LE was supposed to protect against this
but doesn't because it doesn't validate that input is
non-negative.
Fix this ma... |
static void iscsi_prep_lun_reset_pdu(struct scsi_cmnd *sc, struct iscsi_tm *hdr)
{
memset(hdr, 0, sizeof(*hdr));
hdr->opcode = ISCSI_OP_SCSI_TMFUNC | ISCSI_OP_IMMEDIATE;
hdr->flags = ISCSI_TM_FUNC_LOGICAL_UNIT_RESET & ISCSI_FLAG_TM_FUNC_MASK;
hdr->flags |= ISCSI_FLAG_CMD_FINAL;
int_to_scsilun(sc->device->lun, &hdr... | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 47,585,427,862,712,540,000,000,000,000,000,000,000 | 9 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
{
unsigned long flags;
spin_lock_irqsave(&list->lock, flags);
__skb_queue_tail(list, newsk);
spin_unlock_irqrestore(&list->lock, flags);
} | 0 | [
"CWE-416"
] | net | 36d5fe6a000790f56039afe26834265db0a3ad4c | 90,521,869,443,457,000,000,000,000,000,000,000,000 | 8 | core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the caller... |
int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
{
if (r == NULL || s == NULL)
return 0;
BN_clear_free(sig->r);
BN_clear_free(sig->s);
sig->r = r;
sig->s = s;
return 1;
} | 0 | [
"CWE-125"
] | openssl | 94d23fcff9b2a7a8368dfe52214d5c2569882c11 | 190,286,918,061,206,630,000,000,000,000,000,000,000 | 10 | Fix EC_GROUP_new_from_ecparameters to check the base length
Check that there's at least one byte in params->base before trying to
read it.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
CtPtr ProtocolV2::send_auth_request(std::vector<uint32_t> &allowed_methods) {
ldout(cct, 20) << __func__ << " peer_type " << (int)connection->peer_type
<< " auth_client " << messenger->auth_client << dendl;
ceph_assert(messenger->auth_client);
bufferlist bl;
vector<uint32_t> preferred_modes;
auto am = aut... | 0 | [
"CWE-323"
] | ceph | 47c7e623546a7a33bd6bbddfb899fa9c9a40f40a | 269,534,916,901,961,200,000,000,000,000,000,000,000 | 31 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... |
static void scsi_block_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
SCSIDiskClass *sdc = SCSI_DISK_BASE_CLASS(klass);
sc->realize = scsi_block_realize;
sc->alloc_req = scsi_block_new_request;
sc->pa... | 0 | [
"CWE-193"
] | qemu | b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8 | 232,551,903,951,363,160,000,000,000,000,000,000,000 | 17 | hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().
Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa... |
free_identity(Identity *id)
{
sshkey_free(id->key);
free(id->provider);
free(id->comment);
free(id->sk_provider);
free(id);
} | 0 | [
"CWE-399",
"CWE-415"
] | openssh-portable | e04fd6dde16de1cdc5a4d9946397ff60d96568db | 211,442,298,050,001,100,000,000,000,000,000,000,000 | 8 | upstream: factor SSH_AGENT_CONSTRAIN_EXTENSION parsing into its own
function and remove an unused variable; ok dtucker@
OpenBSD-Commit-ID: e1a938657fbf7ef0ba5e73b30365734a0cc96559 |
static HashTable* wsdl_message(sdlCtx *ctx, xmlChar* message_name)
{
xmlNodePtr trav, part, message = NULL, tmp;
HashTable* parameters = NULL;
char *ctype;
ctype = strrchr((char*)message_name,':');
if (ctype == NULL) {
ctype = (char*)message_name;
} else {
++ctype;
}
if ((tmp = zend_hash_str_find_ptr(&ctx-... | 1 | [
"CWE-476"
] | php-src | 3c939e3f69955d087e0bb671868f7267dfb2a502 | 86,326,547,923,151,170,000,000,000,000,000,000,000 | 66 | Fix bug #80672 - Null Dereference in SoapClient |
static struct ip_tunnel **__ipip6_bucket(struct sit_net *sitn,
struct ip_tunnel_parm *parms)
{
__be32 remote = parms->iph.daddr;
__be32 local = parms->iph.saddr;
unsigned h = 0;
int prio = 0;
if (remote) {
prio |= 2;
h ^= HASH(remote);
}
if (local) {
prio |= 1;
h ^= HASH(local);
}
return &sitn->tunn... | 0 | [
"CWE-399"
] | linux-2.6 | 36ca34cc3b8335eb1fe8bd9a1d0a2592980c3f02 | 305,936,646,403,244,700,000,000,000,000,000,000,000 | 18 | sit: Add missing kfree_skb() on pskb_may_pull() failure.
Noticed by Paul Marks <paul@pmarks.net>.
Signed-off-by: David S. Miller <davem@davemloft.net> |
PJ_DEF(pj_status_t) pjsip_dlg_try_inc_lock(pjsip_dialog *dlg)
{
pj_status_t status;
PJ_LOG(6,(dlg->obj_name,"Entering pjsip_dlg_try_inc_lock(), sess_count=%d",
dlg->sess_count));
status = pj_grp_lock_tryacquire(dlg->grp_lock_);
if (status != PJ_SUCCESS) {
PJ_LOG(6,(dlg->obj_name, "pjsip_dlg_tr... | 0 | [
"CWE-297",
"CWE-295"
] | pjproject | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | 202,128,129,952,611,100,000,000,000,000,000,000,000 | 20 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved |
int nfs4_set_rw_stateid(nfs4_stateid *stateid,
const struct nfs_open_context *ctx,
const struct nfs_lock_context *l_ctx,
fmode_t fmode)
{
return nfs4_select_rw_stateid(ctx->state, fmode, l_ctx, stateid, NULL);
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 174,982,644,593,267,200,000,000,000,000,000,000,000 | 7 | 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... |
event_name2nr(char_u *start, char_u **end)
{
char_u *p;
int i;
int len;
/* the event name ends with end of line, '|', a blank or a comma */
for (p = start; *p && !VIM_ISWHITE(*p) && *p != ',' && *p != '|'; ++p)
;
for (i = 0; event_names[i].name != NULL; ++i)
{
len = (int)STRLEN(event_na... | 0 | [
"CWE-200",
"CWE-668"
] | vim | 5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8 | 220,130,923,095,802,770,000,000,000,000,000,000,000 | 22 | patch 8.0.1263: others can read the swap file if a user is careless
Problem: Others can read the swap file if a user is careless with his
primary group.
Solution: If the group permission allows for reading but the world
permissions doesn't, make sure the group is right. |
static u8 ath6kl_usb_get_logical_pipe_num(struct ath6kl_usb *ar_usb,
u8 ep_address, int *urb_count)
{
u8 pipe_num = ATH6KL_USB_PIPE_INVALID;
switch (ep_address) {
case ATH6KL_USB_EP_ADDR_APP_CTRL_IN:
pipe_num = ATH6KL_USB_PIPE_RX_CTRL;
*urb_count = RX_URB_COUNT;
break;
case ATH6KL_USB_EP_ADDR_APP_DATA... | 0 | [
"CWE-476"
] | linux | 39d170b3cb62ba98567f5c4f40c27b5864b304e5 | 102,985,247,605,507,000,000,000,000,000,000,000,000 | 45 | 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 <... |
int parse_syscall_archs(char **l, Set **archs) {
_cleanup_set_free_ Set *_archs;
char **s;
int r;
assert(l);
assert(archs);
r = set_ensure_allocated(&_archs, NULL);
if (r < 0)
return r;
STRV_FOREACH(s, l) {
uint32_t a;
... | 0 | [
"CWE-269"
] | systemd | 3c27973b13724ede05a06a5d346a569794cda433 | 222,683,686,137,351,870,000,000,000,000,000,000,000 | 28 | seccomp: introduce seccomp_restrict_suid_sgid() for blocking chmod() for suid/sgid files |
static unsigned int multi_get_mctrl(struct sb_uart_port *port)
{
struct mp_port *mtpt = (struct mp_port *)port;
unsigned char status;
unsigned int ret;
status = serial_in(mtpt, UART_MSR);
ret = 0;
if (status & UART_MSR_DCD)
ret |= TIOCM_CAR;
if (status & UART_MSR_RI)
ret |= TIOCM_RNG;
if (status & UART_MS... | 0 | [
"CWE-200"
] | linux | a8b33654b1e3b0c74d4a1fed041c9aae50b3c427 | 302,904,257,288,722,580,000,000,000,000,000,000,000 | 19 | Staging: sb105x: info leak in mp_get_count()
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Li... |
static void gen_vector_table16(TrueMotion1Context *s, const uint8_t *sel_vector_table)
{
int len, i, j;
unsigned char delta_pair;
for (i = 0; i < 1024; i += 4)
{
len = *sel_vector_table++ / 2;
for (j = 0; j < len; j++)
{
delta_pair = *sel_vector_table++;
... | 0 | [
"CWE-703"
] | FFmpeg | 2240e2078d53d3cfce8ff1dda64e58fa72038602 | 138,616,133,510,485,100,000,000,000,000,000,000,000 | 20 | truemotion1: check the header size
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org |
bool InferenceContext::MergeInputHandleShapesAndTypes(
int idx, const std::vector<ShapeAndType>& shapes_and_types) {
if (input_handle_shapes_and_types_[idx] == nullptr) {
input_handle_shapes_and_types_[idx].reset(
new std::vector<ShapeAndType>(shapes_and_types));
return true;
}
return MergeHan... | 0 | [
"CWE-190"
] | tensorflow | acd56b8bcb72b163c834ae4f18469047b001fadf | 236,666,343,402,225,600,000,000,000,000,000,000,000 | 10 | Fix security vulnerability with SpaceToBatchNDOp.
PiperOrigin-RevId: 445527615 |
static uint64_t sysbus_esp_mem_read(void *opaque, hwaddr addr,
unsigned int size)
{
SysBusESPState *sysbus = opaque;
ESPState *s = ESP(&sysbus->esp);
uint32_t saddr;
saddr = addr >> sysbus->it_shift;
return esp_reg_read(s, saddr);
} | 0 | [
"CWE-476"
] | qemu | 0db895361b8a82e1114372ff9f4857abea605701 | 135,491,216,168,165,130,000,000,000,000,000,000,000 | 10 | esp: always check current_req is not NULL before use in DMA callbacks
After issuing a SCSI command the SCSI layer can call the SCSIBusInfo .cancel
callback which resets both current_req and current_dev to NULL. If any data
is left in the transfer buffer (async_len != 0) then the next TI (Transfer
Information) command ... |
static void set_cpu_sd_state_idle(int cpu)
{
struct sched_domain *sd;
rcu_read_lock();
sd = rcu_dereference(per_cpu(sd_llc, cpu));
if (!sd || sd->nohz_idle)
goto unlock;
sd->nohz_idle = 1;
atomic_dec(&sd->shared->nr_busy_cpus);
unlock:
rcu_read_unlock();
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 36,274,503,933,273,025,000,000,000,000,000,000,000 | 15 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
long long stringToIntWithRadix(const char *s,
int forceRadix, //!< if radix=0, autodetect
bool *hasError, //!< If nonzero, set to whether there was an error or not
const char **endOfInteger //!< If nonzero, this is set to the point at which the integer finished in the strin... | 0 | [
"CWE-119",
"CWE-787"
] | Espruino | 0a7619875bf79877907205f6bee08465b89ff10b | 216,361,928,189,008,500,000,000,000,000,000,000,000 | 38 | Fix strncat/cpy bounding issues (fix #1425) |
static inline int crypto_ccm_check_iv(const u8 *iv)
{
/* 2 <= L <= 8, so 1 <= L' <= 7. */
if (1 > iv[0] || iv[0] > 7)
return -EINVAL;
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3b30460c5b0ed762be75a004e924ec3f8711e032 | 108,720,687,070,266,200,000,000,000,000,000,000,000 | 8 | crypto: ccm - move cbcmac input off the stack
Commit f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver")
refactored the CCM driver to allow separate implementations of the
underlying MAC to be provided by a platform. However, in doing so, it
moved some data from the linear region to the stack, which violat... |
static MagickBooleanType WritePS3MaskImage(const ImageInfo *image_info,
Image *image,const CompressionType compression)
{
char
buffer[MaxTextExtent];
Image
*mask_image;
MagickBooleanType
status;
MagickOffsetType
offset,
start,
stop;
MemoryInfo
*pixel_info;
register ssize_t... | 0 | [
"CWE-401"
] | ImageMagick6 | 451d0e4aadb17f16d15006aed379b71714d04a5d | 118,719,101,280,229,090,000,000,000,000,000,000,000 | 186 | Fixed memory leaks reported in ImageMagick/ImageMagick#1557. |
TPM_ECC_CURVE_Unmarshal(TPM_ECC_CURVE *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
TPM_ECC_CURVE orig_target = *target; // libtpms added
if (rc == TPM_RC_SUCCESS) {
rc = UINT16_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
switch (*target) {
case TPM_ECC_... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 189,011,939,784,433,430,000,000,000,000,000,000,000 | 27 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
void LIRGenerator::do_CheckCast(CheckCast* x) {
LIRItem obj(x->obj(), this);
CodeEmitInfo* patching_info = NULL;
if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check() && !x->is_invokespecial_receiver_check())) {
// must do this before locking the destination register as an oo... | 0 | [] | jdk17u | 268c0159253b3de5d72eb826ef2329b27bb33fea | 160,343,580,992,813,190,000,000,000,000,000,000,000 | 36 | 8272014: Better array indexing
Reviewed-by: thartmann
Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f |
int nci_send_cmd(struct nci_dev *ndev, __u16 opcode, __u8 plen, const void *payload)
{
struct nci_ctrl_hdr *hdr;
struct sk_buff *skb;
pr_debug("opcode 0x%x, plen %d\n", opcode, plen);
skb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + plen), GFP_KERNEL);
if (!skb) {
pr_err("no memory for command\n");
return -ENO... | 0 | [] | linux | 48b71a9e66c2eab60564b1b1c85f4928ed04e406 | 88,350,161,487,484,000,000,000,000,000,000,000,000 | 29 | NFC: add NCI_UNREG flag to eliminate the race
There are two sites that calls queue_work() after the
destroy_workqueue() and lead to possible UAF.
The first site is nci_send_cmd(), which can happen after the
nci_close_device as below
nfcmrvl_nci_unregister_dev | nfc_genl_dev_up
nci_close_device |
f... |
void RGWGetRequestPayment::pre_exec()
{
rgw_bucket_object_pre_exec(s);
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 275,701,621,380,726,070,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static int digi_port_remove(struct usb_serial_port *port)
{
struct digi_port *priv;
priv = usb_get_serial_port_data(port);
kfree(priv);
return 0;
} | 0 | [
"CWE-703"
] | linux | 5a07975ad0a36708c6b0a5b9fea1ff811d0b0c1f | 111,157,834,655,289,550,000,000,000,000,000,000,000 | 9 | USB: digi_acceleport: do sanity checking for the number of ports
The driver can be crashed with devices that expose crafted descriptors
with too few endpoints.
See: http://seclists.org/bugtraq/2016/Mar/61
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
[johan: fix OOB endpoint check and add error messages ]
Cc: stab... |
read_tree_node(
FILE *fd,
char_u *byts,
idx_T *idxs,
int maxidx, // size of arrays
idx_T startidx, // current index in "byts" and "idxs"
int prefixtree, // TRUE for reading PREFIXTREE
int maxprefcondnr) // maximum for <prefcondnr>
{
int len;
int i;
int n;
... | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 277,863,249,094,870,320,000,000,000,000,000,000,000 | 110 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
static void au1200fb_update_fbinfo(struct fb_info *fbi)
{
/* FIX!!!! This also needs to take the window pixel format into account!!! */
/* Update var-dependent FB info */
if (panel_is_color(panel)) {
if (fbi->var.bits_per_pixel <= 8) {
/* palettized */
fbi->fix.visual = FB_VISUAL_PSEUDOCOLOR;
fbi->fix.li... | 0 | [
"CWE-119",
"CWE-189",
"CWE-703"
] | linux | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | 106,207,935,234,476,050,000,000,000,000,000,000,000 | 26 | Fix a few incorrectly checked [io_]remap_pfn_range() calls
Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that
really should use the vm_iomap_memory() helper. This trivially converts
two of them to the helper, and comments about why the third one really
needs to continue to use remap_pfn_range(), ... |
static int sctp_init_sock(struct sock *sk)
{
struct net *net = sock_net(sk);
struct sctp_sock *sp;
pr_debug("%s: sk:%p\n", __func__, sk);
sp = sctp_sk(sk);
/* Initialize the SCTP per socket area. */
switch (sk->sk_type) {
case SOCK_SEQPACKET:
sp->type = SCTP_SOCKET_UDP;
break;
case SOCK_STREAM:
sp->ty... | 1 | [
"CWE-362",
"CWE-703"
] | linux | 2d45a02d0166caf2627fe91897c6ffc3b19514c4 | 255,968,143,192,293,700,000,000,000,000,000,000,000 | 137 | sctp: fix ASCONF list handling
->auto_asconf_splist is per namespace and mangled by functions like
sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization.
Also, the call to inet_sk_copy_descendant() was backuping
->auto_asconf_list through the copy but was not honoring
->do_auto_asconf, which could l... |
void ff_er_add_slice(ERContext *s, int startx, int starty,
int endx, int endy, int status)
{
const int start_i = av_clip(startx + starty * s->mb_width, 0, s->mb_num - 1);
const int end_i = av_clip(endx + endy * s->mb_width, 0, s->mb_num);
const int start_xy = s->mb_index2xy[star... | 0 | [
"CWE-20",
"CWE-617"
] | FFmpeg | bd27a9364ca274ca97f1df6d984e88a0700fb235 | 290,067,499,895,728,360,000,000,000,000,000,000,000 | 69 | avcodec/mpeg4videodec: Remove use of FF_PROFILE_MPEG4_SIMPLE_STUDIO as indicator of studio profile
The profile field is changed by code inside and outside the decoder,
its not a reliable indicator of the internal codec state.
Maintaining it consistency with studio_profile is messy.
Its easier to just avoid it and use ... |
int ClientConnectionImpl::onBeginHeaders(const nghttp2_frame* frame) {
// The client code explicitly does not currently support push promise.
RELEASE_ASSERT(frame->hd.type == NGHTTP2_HEADERS, "");
RELEASE_ASSERT(frame->headers.cat == NGHTTP2_HCAT_RESPONSE ||
frame->headers.cat == NGHTTP2_HCAT... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 172,177,931,963,412,400,000,000,000,000,000,000,000 | 14 | 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... |
xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
const xmlChar *URI, int line, int nsNr, int tlen) {
const xmlChar *name;
size_t curLength;
GROW;
if ((RAW != '<') || (NXT(1) != '/')) {
xmlFatalErr(ctxt, XML_ERR_LTSLASH_REQUIRED, NULL);
return;
}
SKIP(2);
curL... | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 329,903,679,262,593,570,000,000,000,000,000,000,000 | 71 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
struct file *do_filp_open(int dfd, const char *pathname,
int open_flag, int mode, int acc_mode)
{
struct file *filp;
struct nameidata nd;
int error;
struct path path, save;
struct dentry *dir;
int count = 0;
int will_truncate;
int flag = open_to_namei_flags(open_flag);
/*
* O_SYNC is implemented as __O_SY... | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 251,759,347,479,740,600,000,000,000,000,000,000,000 | 300 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
static int __usb_audio_resume(struct usb_interface *intf, bool reset_resume)
{
struct snd_usb_audio *chip = usb_get_intfdata(intf);
struct snd_usb_stream *as;
struct usb_mixer_interface *mixer;
struct list_head *p;
int err = 0;
if (chip == (void *)-1L)
return 0;
if (--chip->num_suspended_intf)
return 0;
a... | 0 | [
"CWE-416"
] | sound | 5f8cf712582617d523120df67d392059eaf2fc4b | 144,597,088,833,928,510,000,000,000,000,000,000,000 | 43 | ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c
If a USB sound card reports 0 interfaces, an error condition is triggered
and the function usb_audio_probe errors out. In the error path, there was a
use-after-free vulnerability where the memory object of the card was first
freed, followed by... |
bus_allow_mechanism_cb (GDBusAuthObserver *observer,
const gchar *mechanism,
G_GNUC_UNUSED gpointer user_data)
{
if (g_strcmp0 (mechanism, "EXTERNAL") == 0)
return TRUE;
return FALSE;
} | 0 | [
"CWE-862"
] | ibus | 3d442dbf936d197aa11ca0a71663c2bc61696151 | 46,338,364,745,380,420,000,000,000,000,000,000,000 | 8 | bus: Implement GDBusAuthObserver callback
ibus uses a GDBusServer with G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS,
and doesn't set a GDBusAuthObserver, which allows anyone who can connect
to its AF_UNIX socket to authenticate and be authorized to send method calls.
It also seems to use an abstract AF_UNIX sock... |
static inline double argtod(struct arg arg)
{
double value;
mystrtod(&arg.start, &value);
return value;
} | 0 | [] | libass | 6835731c2fe4164a0c50bc91d12c43b2a2b4e799 | 181,839,401,440,647,200,000,000,000,000,000,000,000 | 6 | parse_tags: don't recurse for nested \t()
This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4892
(stack overflow on deeply nested \t()).
This is possible because parentheses do not nest and the first ')'
terminates the whole tag. Thus something like \t(\t(\t(\t(\t() can be
read in a simple loop with no... |
static void mark_object(struct object *obj, const char *name, void *data)
{
update_progress(data);
} | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 48,362,764,667,858,170,000,000,000,000,000,000,000 | 4 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
template<typename t>
CImg<T>& cross(const CImg<t>& img) {
if (_width!=1 || _height<3 || img._width!=1 || img._height<3)
throw CImgInstanceException(_cimg_instance
"cross(): Instance and/or specified image (%u,%u,%u,%u,%p) are not 3d vectors.",
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 193,312,829,185,147,900,000,000,000,000,000,000,000 | 13 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void suspend_discovery(struct btd_adapter *adapter)
{
struct mgmt_cp_stop_discovery cp;
DBG("");
adapter->discovery_suspended = true;
/*
* If there are no clients discovering right now, then there is
* also nothing to suspend.
*/
if (!adapter->discovery_list)
return;
/*
* In case of being ins... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 335,578,029,120,633,570,000,000,000,000,000,000,000 | 35 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
int main(int argc, char * * argv)
{
int ret = 0;
int pid;
struct sigaction sa;
char buf[1500];
ssize_t n;
int s_ssdp = -1; /* udp socket receiving ssdp packets */
#ifdef ENABLE_IPV6
int s_ssdp6 = -1; /* udp socket receiving ssdp packets IPv6*/
#else /* ENABLE_IPV6 */
#define s_ssdp6 (-1)
#endif /* ENABLE_IPV6 */... | 0 | [
"CWE-416"
] | miniupnp | cd506a67e174a45c6a202eff182a712955ed6d6f | 210,152,608,514,650,760,000,000,000,000,000,000,000 | 423 | updateDevice() remove element from the list when realloc fails |
int enc_untrusted_chown(const char *pathname, uid_t owner, gid_t group) {
return EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_chown,
pathname, owner, group);
} | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 131,086,650,013,742,300,000,000,000,000,000,000,000 | 4 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
njs_promise_perform_all_handler(njs_vm_t *vm, njs_iterator_args_t *args,
njs_value_t *value, int64_t index)
{
njs_int_t ret;
njs_array_t *array;
njs_value_t arguments[2], next;
njs_function_t *on_fulfilled;
njs_promise_capability... | 0 | [
"CWE-416",
"CWE-703"
] | njs | 31ed93a5623f24ca94e6d47e895ba735d9d97d46 | 119,913,398,542,685,200,000,000,000,000,000,000,000 | 57 | Fixed aggregation methods of Promise ctor with array-like object.
Previously, while iterating over an array-like object the methods may be
resolved with INVALID values. INVALID value is a special internal type which
should never be visible by ordinary functions.
The fix is to ensure that absent elements are represent... |
parse_update_branches (parser_context_t *context_p, /**< context */
uint8_t *byte_code_p) /**< byte code */
{
parser_mem_page_t *page_p = context_p->byte_code.first_p;
parser_mem_page_t *prev_page_p = NULL;
parser_mem_page_t *last_page_p = context_p->byte_code.last_p;
size_t last_position... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 153,737,536,688,546,830,000,000,000,000,000,000,000 | 130 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
delete_sig_subpkt (subpktarea_t *area, sigsubpkttype_t reqtype )
{
int buflen;
sigsubpkttype_t type;
byte *buffer, *bufstart;
size_t n;
size_t unused = 0;
int okay = 0;
if( !area )
return 0;
buflen = area->len;
buffer = area->data;
for(;;) {
if( !buflen ) {
okay = ... | 1 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 28,775,845,127,243,907,000,000,000,000,000,000,000 | 64 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
bool wsrep_sst_donor_check(sys_var *, THD *, set_var *) { return 0; } | 0 | [
"CWE-77"
] | percona-xtradb-cluster | 8a338477c9184dd0e03a5c661e9c3a79456de8a4 | 46,650,270,005,489,870,000,000,000,000,000,000,000 | 1 | PXC-3392: Donor uses invalid SST methods |
WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
const int argc,const char **argv,Image **images,ExceptionInfo *exception)
{
ChannelType
channel;
const char
*option;
ImageInfo
*mogrify_info;
MagickStatusType
status;
QuantizeInfo
*quantize_info;
register ssize_t... | 0 | [
"CWE-399",
"CWE-401"
] | ImageMagick6 | bb812022d0bc12107db215c981cab0b1ccd73d91 | 49,198,323,224,382,170,000,000,000,000,000,000,000 | 1,117 | https://github.com/ImageMagick/ImageMagick/issues/1623 |
static void adjustlocalvars (LexState *ls, int nvars) {
FuncState *fs = ls->fs;
int reglevel = luaY_nvarstack(fs);
int i;
for (i = 0; i < nvars; i++) {
int vidx = fs->nactvar++;
Vardesc *var = getlocalvardesc(fs, vidx);
var->vd.ridx = reglevel++;
var->vd.pidx = registerlocalvar(ls, fs, var->vd.n... | 0 | [
"CWE-125"
] | lua | 1f3c6f4534c6411313361697d98d1145a1f030fa | 304,693,836,985,605,600,000,000,000,000,000,000,000 | 11 | Bug: Lua can generate wrong code when _ENV is <const> |
rb_fiddle_handle_sym(VALUE self, VALUE sym)
{
struct dl_handle *fiddle_handle;
TypedData_Get_Struct(self, struct dl_handle, &fiddle_handle_data_type, fiddle_handle);
if( ! fiddle_handle->open ){
rb_raise(rb_eFiddleError, "closed handle");
}
return fiddle_handle_sym(fiddle_handle->ptr, StringValue... | 1 | [
"CWE-20"
] | ruby | 339e11a7f178312d937b7c95dd3115ce7236597a | 190,741,470,672,350,650,000,000,000,000,000,000,000 | 11 | merge revision(s): 53153 and 23405@ruby_1_9_1
* ext/fiddle/handle.c: check tainted string arguments.
Patch provided by tenderlove and nobu.
* test/fiddle/test_handle.rb (class TestHandle): add test for above.
* ext/dl/handle.c (rb_dlhandle_initialize): prohibits DL::dlopen
with a tainted name of library.
... |
md_decode_utf16le__(const CHAR* str, SZ str_size, SZ* p_size)
{
if(IS_UTF16_SURROGATE_HI(str[0])) {
if(1 < str_size && IS_UTF16_SURROGATE_LO(str[1])) {
if(p_size != NULL)
*p_size = 2;
return UTF16_DECODE_SURROGATE(str[0], str[1]);
... | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 288,608,391,681,143,900,000,000,000,000,000,000,000 | 14 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
DnsTransaction* dns_transaction_free(DnsTransaction *t) {
DnsQueryCandidate *c;
DnsZoneItem *i;
DnsTransaction *z;
if (!t)
return NULL;
log_debug("Freeing transaction %" PRIu16 ".", t->id);
dns_transaction_close_connection(t);
dns_transaction_st... | 0 | [
"CWE-416"
] | systemd | 904dcaf9d4933499f8334859f52ea8497f2d24ff | 171,002,696,821,453,360,000,000,000,000,000,000,000 | 58 | resolved: take particular care when detaching DnsServer from its default stream
DnsStream and DnsServer have a symbiotic relationship: one DnsStream is
the current "default" stream of the server (and thus reffed by it), but
each stream also refs the server it is connected to. This cyclic
dependency can result in weird... |
static size_t fuse_send_write(struct fuse_req *req, struct fuse_io_priv *io,
loff_t pos, size_t count, fl_owner_t owner)
{
struct file *file = io->file;
struct fuse_file *ff = file->private_data;
struct fuse_conn *fc = ff->fc;
struct fuse_write_in *inarg = &req->misc.write.in;
fuse_write_fill(req, ff, po... | 0 | [
"CWE-399",
"CWE-835"
] | linux | 3ca8138f014a913f98e6ef40e939868e1e9ea876 | 296,772,524,715,061,320,000,000,000,000,000,000,000 | 21 | fuse: break infinite loop in fuse_fill_write_pages()
I got a report about unkillable task eating CPU. Further
investigation shows, that the problem is in the fuse_fill_write_pages()
function. If iov's first segment has zero length, we get an infinite
loop, because we never reach iov_iter_advance() call.
Fix this by c... |
int cil_gen_ioportcon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node)
{
enum cil_syntax syntax[] = {
CIL_SYN_STRING,
CIL_SYN_STRING | CIL_SYN_LIST,
CIL_SYN_STRING | CIL_SYN_LIST,
CIL_SYN_END
};
int syntax_len = sizeof(syntax)/sizeof(*syntax);
int rc = SEPOL_ERR;
stru... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 161,897,962,088,052,190,000,000,000,000,000,000,000 | 71 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.