func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
load_gpm_library(SCREEN *sp)
{
sp->_mouse_gpm_found = FALSE;
if ((sp->_dlopen_gpm = dlopen(LIBGPM_SONAME, my_RTLD)) != 0) {
#if (defined(__GNUC__) && (__GNUC__ >= 5)) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
if (GET_DLSYM(gpm_fd) == 0 ||
GET_DLSY... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 189,491,207,667,112,000,000,000,000,000,000,000,000 | 23 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
static void br_multicast_start_querier(struct net_bridge *br)
{
struct net_bridge_port *port;
br_multicast_open(br);
list_for_each_entry(port, &br->port_list, list) {
if (port->state == BR_STATE_DISABLED ||
port->state == BR_STATE_BLOCKING)
continue;
__br_multicast_enable_port(port);
}
} | 0 | [
"CWE-20"
] | linux | c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1 | 142,239,984,877,390,180,000,000,000,000,000,000,000 | 14 | bridge: fix some kernel warning in multicast timer
Several people reported the warning: "kernel BUG at kernel/timer.c:729!"
and the stack trace is:
#7 [ffff880214d25c10] mod_timer+501 at ffffffff8106d905
#8 [ffff880214d25c50] br_multicast_del_pg.isra.20+261 at ffffffffa0731d25 [bridge]
#9 [ffff880214d25c80] br_mul... |
static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
{
u32 vmx_msr_low, vmx_msr_high;
u32 min, opt, min2, opt2;
u32 _pin_based_exec_control = 0;
u32 _cpu_based_exec_control = 0;
u32 _cpu_based_2nd_exec_control = 0;
u32 _vmexit_control = 0;
u32 _vmentry_control = 0;
memset(vmcs_conf, 0, sizeof(*vm... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 331,205,665,482,112,170,000,000,000,000,000,000,000 | 207 | 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... |
void AVC_RewriteESDescriptorEx(GF_MPEGVisualSampleEntryBox *avc, GF_MediaBox *mdia)
{
GF_AVCConfig *avcc, *svcc, *mvcc;
GF_BitRateBox *btrt = gf_isom_sample_entry_get_bitrate((GF_SampleEntryBox *)avc, GF_FALSE);
if (avc->emul_esd) gf_odf_desc_del((GF_Descriptor *)avc->emul_esd);
avc->emul_esd = gf_odf_desc_esd_new... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 273,183,135,662,456,900,000,000,000,000,000,000,000 | 66 | fix some exploitable overflows (#994, #997) |
void Compute(OpKernelContext* ctx) override {
const Tensor& shape_tensor = ctx->input(0);
const Tensor& means_tensor = ctx->input(1);
const Tensor& stddevs_tensor = ctx->input(2);
const Tensor& minvals_tensor = ctx->input(3);
const Tensor& maxvals_tensor = ctx->input(4);
OP_REQUIRES(
... | 0 | [
"CWE-125",
"CWE-824"
] | tensorflow | 5e52ef5a461570cfb68f3bdbbebfe972cb4e0fd8 | 320,463,600,272,774,050,000,000,000,000,000,000,000 | 107 | Fix breakage in parameterized_truncated_normal_op.cc
PiperOrigin-RevId: 372041718
Change-Id: Iff79e77a2bb27032423eefcb84211627b27dfe81 |
mysql_list_dbs(MYSQL *mysql, const char *wild)
{
char buff[255];
DBUG_ENTER("mysql_list_dbs");
append_wild(strmov(buff,"show databases"),buff+sizeof(buff),wild);
if (mysql_query(mysql,buff))
DBUG_RETURN(0);
DBUG_RETURN (mysql_store_result(mysql));
} | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 333,642,399,289,486,260,000,000,000,000,000,000,000 | 10 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... |
size_t rdbSaveStreamConsumers(rio *rdb, streamCG *cg) {
ssize_t n, nwritten = 0;
/* Number of consumers in this consumer group. */
if ((n = rdbSaveLen(rdb,raxSize(cg->consumers))) == -1) return -1;
nwritten += n;
/* Save each consumer. */
raxIterator ri;
raxStart(&ri,cg->consumers);
ra... | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 237,278,793,403,239,100,000,000,000,000,000,000,000 | 41 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
u32 fw_devlink_get_flags(void)
{
return fw_devlink_flags;
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 79,375,317,631,123,190,000,000,000,000,000,000,000 | 4 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
jas_image_t *ras_decode(jas_stream_t *in, char *optstr)
{
ras_hdr_t hdr;
ras_cmap_t cmap;
jas_image_t *image;
jas_image_cmptparm_t cmptparms[3];
jas_image_cmptparm_t *cmptparm;
int clrspc;
int numcmpts;
int i;
if (optstr) {
jas_eprintf("warning: ignoring RAS decoder options\n");
}
/* Read the header. */
... | 0 | [] | jasper | 411a4068f8c464e883358bf403a3e25158863823 | 102,823,769,148,886,160,000,000,000,000,000,000,000 | 83 | Fixed a few bugs in the RAS encoder and decoder where errors were tested
with assertions instead of being gracefully handled. |
void memslot_info_init(RedMemSlotInfo *info,
uint32_t num_groups, uint32_t num_slots,
uint8_t generation_bits,
uint8_t id_bits,
uint8_t internal_groupslot_id)
{
uint32_t i;
spice_assert(num_slots > 0);
spice_assert(... | 0 | [
"CWE-193"
] | spice | a4a16ac42d2f19a17e36556546aa94d5cd83745f | 285,897,595,472,487,930,000,000,000,000,000,000,000 | 30 | memslot: Fix off-by-one error in group/slot boundary check
RedMemSlotInfo keeps an array of groups, and each group contains an
array of slots. Unfortunately, these checks are off by 1, they check
that the index is greater or equal to the number of elements in the
array, while these arrays are 0 based. The check should... |
bjc_put_command(gp_file *file, char command, int count)
{ char tmp[3] = { '\033', '(', ' '};
tmp[2] = command;
gp_fwrite( tmp, 3, 1, file);
bjc_put_lo_hi(file, count);
} | 0 | [
"CWE-787"
] | ghostpdl | bf72f1a3dd5392ee8291e3b1518a0c2c5dc6ba39 | 254,891,809,712,975,540,000,000,000,000,000,000,000 | 6 | Fix valgrind problems with gdevbjca.c
2 problems here. Firstly, we could access off the end of a row
while looking for runs. Change the indexing to fix this.
Secondly, we could overrun our gamma tables due to unexpectedly
large values. Add some clamping. |
bool ConnectionManagerImpl::ActiveStream::handleDataIfStopAll(ActiveStreamFilterBase& filter,
Buffer::Instance& data,
bool& filter_streaming) {
if (filter.stoppedAll()) {
ASSERT(!filter.canI... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 62,475,750,586,022,460,000,000,000,000,000,000,000 | 12 | 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 OPJ_BOOL opj_j2k_write_qcc( opj_j2k_t *p_j2k,
OPJ_UINT32 p_comp_no,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{
... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 284,508,622,121,702,420,000,000,000,000,000,000,000 | 38 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
display_cu_index (struct dwarf_section *section, void *file ATTRIBUTE_UNUSED)
{
return process_cu_tu_index (section, 1);
} | 0 | [
"CWE-703"
] | binutils-gdb | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff | 99,194,234,928,945,960,000,000,000,000,000,000,000 | 4 | PR29370, infinite loop in display_debug_abbrev
The PR29370 testcase is a fuzzed object file with multiple
.trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev
sections are not a violation of the DWARF standard. The DWARF5
standard even gives an example of multiple .debug_abbrev sections
contained in group... |
static unsigned int __get_next_segno(struct f2fs_sb_info *sbi, int type)
{
/* if segs_per_sec is large than 1, we need to keep original policy. */
if (sbi->segs_per_sec != 1)
return CURSEG_I(sbi, type)->segno;
if (type == CURSEG_HOT_DATA || IS_NODESEG(type))
return 0;
if (SIT_I(sbi)->last_victim[ALLOC_NEXT])
... | 0 | [
"CWE-20"
] | linux | 638164a2718f337ea224b747cf5977ef143166a4 | 237,417,459,918,207,000,000,000,000,000,000,000,000 | 13 | f2fs: fix potential panic during fstrim
As Ju Hyung Park reported:
"When 'fstrim' is called for manual trim, a BUG() can be triggered
randomly with this patch.
I'm seeing this issue on both x86 Desktop and arm64 Android phone.
On x86 Desktop, this was caused during Ubuntu boot-up. I have a
cronjob installed which c... |
void vrend_set_num_sampler_views(struct vrend_context *ctx,
uint32_t shader_type,
uint32_t start_slot,
uint32_t num_sampler_views)
{
int last_slot = start_slot + num_sampler_views;
int i;
for (i = last_slot; i <... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 75,970,536,514,675,930,000,000,000,000,000,000,000 | 13 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
static size_t p_read(void *fd, void *buf, size_t len) {
(void) fd, (void) buf, (void) len;
return 0;
} | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 264,951,393,609,206,660,000,000,000,000,000,000,000 | 4 | Protect against the directory traversal in mg_upload() |
int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen)
{
if (c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH)
return EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_KEY_LENGTH, keylen, NULL);
if (c->key_len == keylen)
return 1;
if ((keylen > 0) && (c->cipher->flags & EVP_CIPH_VARIABLE_LENGTH)) {... | 0 | [
"CWE-189"
] | openssl | 3f3582139fbb259a1c3cbb0a25236500a409bf26 | 255,379,700,769,428,730,000,000,000,000,000,000,000 | 13 | Fix encrypt overflow
An overflow can occur in the EVP_EncryptUpdate function. If an attacker is
able to supply very large amounts of input data after a previous call to
EVP_EncryptUpdate with a partial block then a length check can overflow
resulting in a heap corruption.
Following an analysis of all OpenSSL internal... |
static void setup_nofile_rlimit(unsigned long rlimit_nofile)
{
struct rlimit rlim = {
.rlim_cur = rlimit_nofile,
.rlim_max = rlimit_nofile,
};
if (rlimit_nofile == 0) {
return; /* nothing to do */
}
if (setrlimit(RLIMIT_NOFILE, &rlim) < 0) {
/* Ignore SELinux denial... | 0 | [] | qemu | 6084633dff3a05d63176e06d7012c7e15aba15be | 290,829,460,466,029,970,000,000,000,000,000,000,000 | 21 | tools/virtiofsd: xattr name mappings: Add option
Add an option to define mappings of xattr names so that
the client and server filesystems see different views.
This can be used to have different SELinux mappings as
seen by the guest, to run the virtiofsd with less privileges
(e.g. in a case where it can't set trusted/... |
static int smack_file_set_fowner(struct file *file)
{
file->f_security = current_security();
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 430,432,316,927,898,300,000,000,000,000,000,000 | 5 | 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... |
zzip_mem_entry_extra_block(ZZIP_MEM_ENTRY * entry, short datatype)
{
return zzip_mem_entry_find_extra_block(entry, datatype, 16);
} | 0 | [] | zziplib | 72ec933663f738d8e166979aa7fd5590b2104a07 | 204,001,981,186,079,240,000,000,000,000,000,000,000 | 4 | need to check on endbuf for stored files #15 |
dict_param_enumerate(iparam_list * plist, gs_param_enumerator_t * penum,
gs_param_key_t * key, ref_type * type)
{
ref elt[2];
int code;
dict_param_list *const pdlist = (dict_param_list *) plist;
int index =
(penum->intval != 0 ? penum->intval : dict_first(&pdlist->dict));
i... | 0 | [] | ghostpdl | bfa6b2ecbe48edc69a7d9d22a12419aed25960b8 | 213,551,039,268,225,800,000,000,000,000,000,000,000 | 17 | Bug 697548: use the correct param list enumerator
When we encountered dictionary in a ref_param_list, we were using the enumerator
for the "parent" param_list, rather than the enumerator for the param_list
we just created for the dictionary. That parent was usually the stack
list enumerator, and caused a segfault.
Us... |
static void create_pit_timer(struct kvm_kpit_state *ps, u32 val, int is_period)
{
struct kvm_timer *pt = &ps->pit_timer;
s64 interval;
interval = muldiv64(val, NSEC_PER_SEC, KVM_PIT_FREQ);
pr_debug("create pit timer, interval is %llu nsec\n", interval);
/* TODO The new value only affected after the retriggered ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | ee73f656a604d5aa9df86a97102e4e462dd79924 | 324,279,998,278,014,800,000,000,000,000,000,000,000 | 25 | KVM: PIT: control word is write-only
PIT control word (address 0x43) is write-only, reads are undefined.
Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> |
static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode,
int rw, u64 file_offset, int skip_sum,
int async_submit)
{
int write = rw & REQ_WRITE;
struct btrfs_root *root = BTRFS_I(inode)->root;
int ret;
if (async_submit)
async_submit = !atomic_read(&BTRFS_I(inode)->sync_writers);
... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 24,249,059,635,196,674,000,000,000,000,000,000,000 | 49 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... |
void rfbSendInteractionCaps(rfbClientPtr cl)
{
rfbInteractionCapsMsg intr_caps;
rfbCapabilityInfo enc_list[N_ENC_CAPS];
int i;
/* Fill in the header structure sent prior to capability lists. */
intr_caps.nServerMessageTypes = Swap16IfLE(N_SMSG_CAPS);
intr_caps.nClientMessageTypes = Swap16IfLE(N_CMSG_CAPS);... | 0 | [
"CWE-787"
] | turbovnc | cea98166008301e614e0d36776bf9435a536136e | 125,806,387,288,712,200,000,000,000,000,000,000,000 | 80 | Server: Fix two issues identified by ASan
1. If the TLSPlain and X509Plain security types were both disabled, then
rfbOptPamAuth() would overflow the name field in the secTypes
structure when testing the "none" security type, since the name of
that security type has less than five characters. This issue was
... |
virDomainDefGetMemoryTotal(const virDomainDef *def)
{
return def->mem.total_memory;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 35,853,854,877,822,957,000,000,000,000,000,000,000 | 4 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static int close_collection(struct hid_parser *parser)
{
if (!parser->collection_stack_ptr) {
hid_err(parser->device, "collection stack underflow\n");
return -EINVAL;
}
parser->collection_stack_ptr--;
return 0;
} | 0 | [
"CWE-125"
] | linux | 50220dead1650609206efe91f0cc116132d59b3f | 6,814,889,122,532,379,000,000,000,000,000,000,000 | 9 | HID: core: prevent out-of-bound readings
Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
out-of-bound readings.
The fields are allocated up to MAX_USAGE, meaning that potentially, we do
not have enough fields to fit the incoming values.
Add checks and silence KASAN.
Signed-off-by: Benjamin Tis... |
static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq)
{
struct vhost_virtqueue *vq = &nvq->vq;
struct vhost_dev *dev = vq->dev;
if (!nvq->done_idx)
return;
vhost_add_used_and_signal_n(dev, vq, vq->heads, nvq->done_idx);
nvq->done_idx = 0;
} | 0 | [
"CWE-787"
] | linux | f5a4941aa6d190e676065e8f4ed35999f52a01c3 | 338,804,281,972,924,660,000,000,000,000,000,000,000 | 11 | vhost_net: flush batched heads before trying to busy polling
After commit e2b3b35eb989 ("vhost_net: batch used ring update in rx"),
we tend to batch updating used heads. But it doesn't flush batched
heads before trying to do busy polling, this will cause vhost to wait
for guest TX which waits for the used RX. Fixing b... |
gif_internal_decode_frame(gif_animation *gif,
unsigned int frame,
bool clear_image)
{
unsigned int index = 0;
const unsigned char *gif_data, *gif_end;
ssize_t gif_bytes;
unsigned int width, height, offset_x, offset_y;
unsigned i... | 1 | [
"CWE-476"
] | chafa | e4b777c7b7c144cd16a0ea96108267b1004fe6c9 | 21,944,791,382,892,950,000,000,000,000,000,000,000 | 336 | libnsgif: Fix null pointer deref on frameless GIF input
A crafted GIF file with no frame data could cause a null pointer
dereference leading to denial of service (crash). Reported by
@JieyongMa via huntr.dev. |
int ext4_mark_iloc_dirty(handle_t *handle,
struct inode *inode, struct ext4_iloc *iloc)
{
int err = 0;
if (IS_I_VERSION(inode))
inode_inc_iversion(inode);
/* the do_update_inode consumes one bh->b_count */
get_bh(iloc->bh);
/* ext4_do_update_inode() does jbd2_journal_dirty_metadata */
err = ext4_do_updat... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 60,898,827,747,508,200,000,000,000,000,000,000,000 | 16 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
static void ipip6_tunnel_update(struct ip_tunnel *t, struct ip_tunnel_parm *p,
__u32 fwmark)
{
struct net *net = t->net;
struct sit_net *sitn = net_generic(net, sit_net_id);
ipip6_tunnel_unlink(sitn, t);
synchronize_net();
t->parms.iph.saddr = p->iph.saddr;
t->parms.iph.daddr = p->iph.daddr;
memcpy(t->dev->... | 0 | [
"CWE-703",
"CWE-772",
"CWE-401"
] | linux | 07f12b26e21ab359261bf75cfcb424fdc7daeb6d | 310,277,144,795,995,000,000,000,000,000,000,000,000 | 24 | net: sit: fix memory leak in sit_init_net()
If register_netdev() is failed to register sitn->fb_tunnel_dev,
it will go to err_reg_dev and forget to free netdev(sitn->fb_tunnel_dev).
BUG: memory leak
unreferenced object 0xffff888378daad00 (size 512):
comm "syz-executor.1", pid 4006, jiffies 4295121142 (age 16.115s)
... |
have_client_keys(krb5_context context, krb5_kdcpreauth_rock rock)
{
krb5_kdc_req *request = rock->request;
krb5_key_data *kd;
int i;
for (i = 0; i < request->nktypes; i++) {
if (krb5_dbe_find_enctype(context, rock->client, request->ktype[i],
-1, 0, &kd) == 0)
... | 0 | [
"CWE-617"
] | krb5 | 94e5eda5bb94d1d44733a49c3d9b6d1e42c74def | 268,571,866,120,191,470,000,000,000,000,000,000,000 | 13 | Remove incorrect KDC assertion
The assertion in return_enc_padata() is reachable because
kdc_make_s4u2self_rep() may have previously added encrypted padata.
It is no longer necessary because the code uses add_pa_data_element()
instead of allocating a new list.
CVE-2018-20217:
In MIT krb5 1.8 or later, an authenticat... |
dns_message_signer(dns_message_t *msg, dns_name_t *signer) {
isc_result_t result = ISC_R_SUCCESS;
dns_rdata_t rdata = DNS_RDATA_INIT;
REQUIRE(DNS_MESSAGE_VALID(msg));
REQUIRE(signer != NULL);
REQUIRE(msg->from_to_wire == DNS_MESSAGE_INTENTPARSE);
if (msg->tsig == NULL && msg->sig0 == NULL)
return (ISC_R_NOTFO... | 0 | [
"CWE-617"
] | bind9 | 6ed167ad0a647dff20c8cb08c944a7967df2d415 | 308,621,783,100,669,000,000,000,000,000,000,000,000 | 86 | Always keep a copy of the message
this allows it to be available even when dns_message_parse()
returns a error. |
getInstallationPaths(const char *argv0)
{
DIR *pdir;
/* Locate the postgres executable itself */
if (find_my_exec(argv0, my_exec_path) < 0)
elog(FATAL, "%s: could not locate my own executable path", argv0);
#ifdef EXEC_BACKEND
/* Locate executable backend before we change working directory */
if (find_othe... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 53,911,054,801,635,020,000,000,000,000,000,000,000 | 45 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
get_xds_atom_value (GdkDragContext *context)
{
char *ret;
g_return_val_if_fail (context != NULL, NULL);
g_return_val_if_fail (gdk_drag_context_get_source_window (context) != NULL, NULL);
if (gdk_property_get (gdk_drag_context_get_source_window (context),
XDS_ATOM, TEXT_ATOM,
0, MAX_XDS_ATOM_VAL_... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 304,243,665,845,801,460,000,000,000,000,000,000,000 | 16 | libarchive: sanitize filenames before extracting |
static inline __m128i SSE2_mm_abs_epi16(__m128i a) {
__m128i t = _mm_srai_epi16(a, 15);
return _mm_xor_si128(_mm_add_epi16(a, t), t);
} | 0 | [] | jpeg-quantsmooth | 3ab3838e610d361b71d937738edf156505c59c58 | 54,160,488,083,399,880,000,000,000,000,000,000,000 | 4 | avoid divide-by-zero on damaged JPEG files
Also fixed misleading indentation warnings from GCC. |
koi8_apply_all_case_fold(OnigCaseFoldType flag,
OnigApplyAllCaseFoldFunc f, void* arg)
{
return onigenc_apply_all_case_fold_with_map(
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
flag, f, arg);
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 165,034,055,256,547,800,000,000,000,000,000,000,000 | 7 | onig-5.9.2 |
static inline int l2cap_config_req(struct l2cap_conn *conn,
struct l2cap_cmd_hdr *cmd, u16 cmd_len,
u8 *data)
{
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
u16 dcid, flags;
u8 rsp[64];
struct l2cap_chan *chan;
int len, err = 0;
if (cmd_len < sizeof(*req))
return -EPROTO;
dcid ... | 1 | [
"CWE-787"
] | linux | e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 | 58,375,504,669,618,750,000,000,000,000,000,000,000 | 108 | Bluetooth: Properly check L2CAP config option output buffer length
Validate the output buffer length for L2CAP config requests and responses
to avoid overflowing the stack buffer used for building the option blocks.
Cc: stable@vger.kernel.org
Signed-off-by: Ben Seri <ben@armis.com>
Signed-off-by: Marcel Holtmann <mar... |
cdf_read_short_stream(const cdf_info_t *info, const cdf_header_t *h,
const cdf_sat_t *sat, const cdf_dir_t *dir, cdf_stream_t *scn,
const cdf_directory_t **root)
{
size_t i;
const cdf_directory_t *d;
*root = NULL;
for (i = 0; i < dir->dir_len; i++)
if (dir->dir_tab[i].d_type == CDF_DIR_TYPE_ROOT_STORAGE)... | 0 | [
"CWE-787"
] | file | 46a8443f76cec4b41ec736eca396984c74664f84 | 129,874,849,202,129,430,000,000,000,000,000,000,000 | 33 | Limit the number of elements in a vector (found by oss-fuzz) |
virtual void help(stringstream& ss) const {
ss << "Revokes roles from another role." << endl;
} | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 34,663,701,375,840,075,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
void append(OperationContext* opCtx, BSONObjBuilder& b, const std::string& name) const {
BSONArrayBuilder sub(b.subarrayStart(name));
for (const auto& username : _userNames) {
BSONObjBuilder nameObj(sub.subobjStart());
nameObj << AuthorizationManager::USER_NAME_FIELD_NAME << ... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 102,628,785,443,004,550,000,000,000,000,000,000,000 | 8 | SERVER-38984 Validate unique User ID on UserCache hit |
void CLASS parse_minolta(int base)
{
int save, tag, len, offset, high = 0, wide = 0, i, c;
short sorder = order;
fseek(ifp, base, SEEK_SET);
if (fgetc(ifp) || fgetc(ifp) - 'M' || fgetc(ifp) - 'R')
return;
order = fgetc(ifp) * 0x101;
offset = base + get4() + 8;
#ifdef LIBRAW_LIBRARY_BUILD
if(offset>if... | 0 | [
"CWE-190"
] | LibRaw | 4554e24ce24beaef5d0ef48372801cfd91039076 | 166,591,072,840,772,260,000,000,000,000,000,000,000 | 83 | parse_qt: possible integer overflow |
void Reject(Local<Value> reject) override {
finished_ = true;
HandleScope scope(env()->isolate());
InternalCallbackScope callback_scope(this);
Local<Value> value =
object()->Get(env()->context(),
env()->promise_string()).ToLocalChecked();
Local<Promise::Resolver> reso... | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 89,463,622,215,690,800,000,000,000,000,000,000,000 | 10 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
clear_spell_chartab(spelltab_T *sp)
{
int i;
// Init everything to FALSE (zero).
CLEAR_FIELD(sp->st_isw);
CLEAR_FIELD(sp->st_isu);
for (i = 0; i < 256; ++i)
{
sp->st_fold[i] = i;
sp->st_upper[i] = i;
}
// We include digits. A word shouldn't start with a digit, but handling
// t... | 0 | [
"CWE-416"
] | vim | 2813f38e021c6e6581c0c88fcf107e41788bc835 | 246,155,841,278,204,960,000,000,000,000,000,000,000 | 29 | patch 8.2.5072: using uninitialized value and freed memory in spell command
Problem: Using uninitialized value and freed memory in spell command.
Solution: Initialize "attr". Check for empty line early. |
TEST_F(AllowFailedInAndListTest, GoodAndBadJwts) {
EXPECT_CALL(mock_cb_, onComplete(Status::Ok));
auto headers =
Http::TestRequestHeaderMapImpl{{kExampleHeader, GoodToken}, {kOtherHeader, NonExistKidToken}};
context_ = Verifier::createContext(headers, parent_span_, &mock_cb_);
verifier_->verify(context_);... | 0 | [
"CWE-303",
"CWE-703"
] | envoy | ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a | 20,324,888,952,637,468,000,000,000,000,000,000,000 | 10 | jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194)
[jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ... |
static struct b43_dmaring *select_ring_by_priority(struct b43_wldev *dev,
u8 queue_prio)
{
struct b43_dmaring *ring;
if (dev->qos_enabled) {
/* 0 = highest priority */
switch (queue_prio) {
default:
B43_WARN_ON(1);
/* fallthrough */
case 0:
ring = dev->dma.tx_ring_AC_VO;
break;
case 1:... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 76,210,110,502,984,630,000,000,000,000,000,000,000 | 29 | b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put inside of dma_rx can fail...
https://bugzilla.kernel.org/show_bug.cgi?id=32042
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org |
sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer)
{
int res;
struct scsi_device *sdp = sdkp->device;
struct scsi_mode_data data;
int old_wp = sdkp->write_prot;
set_disk_ro(sdkp->disk, 0);
if (sdp->skip_ms_page_3f) {
sd_printk(KERN_NOTICE, sdkp, "Assuming Write Enabled\n");
return;
}
... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 0bfc96cb77224736dfa35c3c555d37b3646ef35e | 200,759,224,069,731,260,000,000,000,000,000,000,000 | 55 | block: fail SCSI passthrough ioctls on partition devices
Linux allows executing the SG_IO ioctl on a partition or LVM volume, and
will pass the command to the underlying block device. This is
well-known, but it is also a large security problem when (via Unix
permissions, ACLs, SELinux or a combination thereof) a prog... |
xsltGetTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
xsltStylesheetPtr style)
{
xsltStylesheetPtr curstyle;
xsltTemplatePtr ret = NULL;
const xmlChar *name = NULL;
xsltCompMatchPtr list = NULL;
float priority;
int keyed = 0;
if ((ctxt == NULL) || (node == NULL))
return(N... | 0 | [
"CWE-125"
] | libxslt | fe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b | 153,591,288,134,972,770,000,000,000,000,000,000,000 | 236 | Fix some case of pattern parsing errors
We could accidentally hit an off by one string array access
due to improper loop exit when parsing patterns |
explicit SoftmaxXentWithLogitsOp(OpKernelConstruction* context)
: OpKernel(context) {} | 0 | [
"CWE-354"
] | tensorflow | 4d74d8a00b07441cba090a02e0dd9ed385145bf4 | 340,018,806,189,696,950,000,000,000,000,000,000,000 | 2 | Fix crash in softmax-xent when some input dimensions are 1.
Before, tf.nn.softmax_cross_entropy_with_logits would fail a CHECK if one input tensor had shape (1, 1) and the other did not.
In particular, the call to ToIndexArray<2> here https://github.com/tensorflow/tensorflow/blob/1f3da84a89702d3b4f234ee83762d738caffe... |
static void bfq_remove_request(struct request_queue *q,
struct request *rq)
{
struct bfq_queue *bfqq = RQ_BFQQ(rq);
struct bfq_data *bfqd = bfqq->bfqd;
const int sync = rq_is_sync(rq);
if (bfqq->next_rq == rq) {
bfqq->next_rq = bfq_find_next_rq(bfqd, bfqq, rq);
bfq_updated_next_req(bfqd, bfqq);
}
... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 168,498,632,095,918,270,000,000,000,000,000,000,000 | 60 | 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... |
void inet6_ifinfo_notify(int event, struct inet6_dev *idev)
{
struct sk_buff *skb;
struct net *net = dev_net(idev->dev);
int err = -ENOBUFS;
skb = nlmsg_new(inet6_if_nlmsg_size(), GFP_ATOMIC);
if (skb == NULL)
goto errout;
err = inet6_fill_ifinfo(skb, idev, 0, 0, event, 0);
if (err < 0) {
/* -EMSGSIZE impl... | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 294,092,370,303,961,270,000,000,000,000,000,000,000 | 23 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
static void write_leases(void)
{
int fd;
unsigned i;
leasetime_t curr;
int64_t written_at;
fd = open_or_warn(server_config.lease_file, O_WRONLY|O_CREAT|O_TRUNC);
if (fd < 0)
return;
curr = written_at = time(NULL);
written_at = SWAP_BE64(written_at);
full_write(fd, &written_at, sizeof(written_at));
for (... | 0 | [
"CWE-125"
] | busybox | 6d3b4bb24da9a07c263f3c1acf8df85382ff562c | 338,464,125,011,019,900,000,000,000,000,000,000,000 | 47 | udhcpc: check that 4-byte options are indeed 4-byte, closes 11506
function old new delta
udhcp_get_option32 - 27 +27
udhcp_get_option 231 248 +17
----------------------------------... |
pixops_scale_nearest (guchar *dest_buf,
int render_x0,
int render_y0,
int render_x1,
int render_y1,
int dest_rowstride,
int dest_channels,
gboolean dest_has_alpha,
const guchar ... | 0 | [] | gdk-pixbuf | ffec86ed5010c5a2be14f47b33bcf4ed3169a199 | 68,793,250,657,869,660,000,000,000,000,000,000,000 | 87 | pixops: Be more careful about integer overflow
Our loader code is supposed to handle out-of-memory and overflow
situations gracefully, reporting errors instead of aborting. But
if you load an image at a specific size, we also execute our
scaling code, which was not careful enough about overflow in some
places.
This c... |
static inline int handle_pte_fault(struct mm_struct *mm,
struct vm_area_struct *vma, unsigned long address,
pte_t *pte, pmd_t *pmd, int write_access)
{
pte_t entry;
spinlock_t *ptl;
entry = *pte;
if (!pte_present(entry)) {
if (pte_none(entry)) {
if (vma->vm_ops) {
if (likely(vma->vm_ops->fault))
... | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 70,979,741,475,681,980,000,000,000,000,000,000,000 | 55 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
void qxl_render_update(PCIQXLDevice *qxl)
{
QXLCookie *cookie;
qemu_mutex_lock(&qxl->ssd.lock);
if (!runstate_is_running() || !qxl->guest_primary.commands ||
qxl->mode == QXL_MODE_UNDEFINED) {
qxl_render_update_area_unlocked(qxl);
qemu_mutex_unlock(&qxl->ssd.lock);
graphic_... | 0 | [] | qemu | 9569f5cb5b4bffa9d3ebc8ba7da1e03830a9a895 | 252,533,115,807,900,900,000,000,000,000,000,000,000 | 23 | display/qxl-render: fix race condition in qxl_cursor (CVE-2021-4207)
Avoid fetching 'width' and 'height' a second time to prevent possible
race condition. Refer to security advisory
https://starlabs.sg/advisories/22-4207/ for more information.
Fixes: CVE-2021-4207
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat... |
static int xen_irq_info_evtchn_setup(unsigned irq,
evtchn_port_t evtchn)
{
struct irq_info *info = info_for_irq(irq);
return xen_irq_info_common_setup(info, irq, IRQT_EVTCHN, evtchn, 0);
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 283,763,969,065,731,200,000,000,000,000,000,000,000 | 7 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
long long Chapters::Atom::GetStartTimecode() const { return m_start_timecode; } | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 76,963,957,441,362,510,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
nm_utils_read_plugin_paths(const char *dirname, const char *prefix)
{
GDir * dir;
GError * error = NULL;
const char *item;
GArray * paths;
char ** result;
guint i;
g_return_val_if_fail(dirname, NULL);
g_return_val_if_fail(prefix, NULL);
dir = g_dir_open(dirname... | 0 | [
"CWE-20"
] | NetworkManager | 420784e342da4883f6debdfe10cde68507b10d27 | 56,645,956,077,477,630,000,000,000,000,000,000,000 | 68 | core: fix crash in nm_wildcard_match_check()
It's not entirely clear how to treat %NULL.
Clearly "match.interface-name=eth0" should not
match with an interface %NULL. But what about
"match.interface-name=!eth0"? It's now implemented
that negative matches still succeed against %NULL.
What about "match.interface-name=*"... |
void* myAlloc(void* /* opaque */, unsigned int item, unsigned int size)
{
return NEW_YS unsigned char[item * size];
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 43,217,966,016,547,800,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
inline int bio_phys_segments(struct request_queue *q, struct bio *bio)
{
if (unlikely(!bio_flagged(bio, BIO_SEG_VALID)))
blk_recount_segments(q, bio);
return bio->bi_phys_segments;
} | 0 | [
"CWE-772",
"CWE-787"
] | linux | 95d78c28b5a85bacbc29b8dba7c04babb9b0d467 | 115,689,695,048,631,960,000,000,000,000,000,000,000 | 7 | fix unbalanced page refcounting in bio_map_user_iov
bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if
IO vector has small consecutive buffers belonging to the same page.
bio_add_pc_page merges them into one, but the page reference is never
dropped.
Cc: stable@vger.kernel.org
Signed-off-by: Vitaly... |
mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
{
return mysql_optionsv(mysql, option, arg);
} | 0 | [] | mariadb-connector-c | 27b2f3d1f1550dfaee0f63a331a406ab31c1b37e | 267,371,213,734,971,000,000,000,000,000,000,000,000 | 4 | various checks for corrupted packets in the protocol
also: check the return value of unpack_fields() |
shapeObj *FLTGetShape(FilterEncodingNode *psFilterNode, double *pdfDistance,
int *pnUnit)
{
char **tokens = NULL;
int nTokens = 0;
FilterEncodingNode *psNode = psFilterNode;
char *szUnitStr = NULL;
char *szUnit = NULL;
if (psNode) {
if (psNode->eType == FILTER_NODE_TYPE_SPATIAL &&... | 0 | [
"CWE-200",
"CWE-119"
] | mapserver | e52a436c0e1c5e9f7ef13428dba83194a800f4df | 304,314,045,295,567,850,000,000,000,000,000,000,000 | 72 | security fix (patch by EvenR) |
parseURL2(char *url, ParsedURL *pu, ParsedURL *current)
{
char *p;
Str tmp;
int relative_uri = FALSE;
parseURL(url, pu, current);
#ifndef USE_W3MMAILER
if (pu->scheme == SCM_MAILTO)
return;
#endif
if (pu->scheme == SCM_DATA)
return;
if (pu->scheme == SCM_NEWS || pu->scheme == SCM_NEWS_GRO... | 0 | [
"CWE-119"
] | w3m | ba9d78faeba9024c3e8840579c3b0e959ae2cb0f | 258,927,401,233,696,900,000,000,000,000,000,000,000 | 181 | Prevent global-buffer-overflow in parseURL()
Bug-Debian: https://github.com/tats/w3m/issues/41 |
static int piv_read_obj_from_file(sc_card_t * card, char * filename,
u8 **buf, size_t *buf_len)
{
int r;
int f = -1;
size_t len;
u8 tagbuf[16];
size_t rbuflen;
const u8 * body;
unsigned int cla_out, tag_out;
size_t bodylen;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
*buf = NULL;
*buf_len = 0;
f = o... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 242,274,495,187,492,380,000,000,000,000,000,000,000 | 58 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static void swap_binders(gnutls_session_t session)
{
struct binder_data_st tmp;
memcpy(&tmp, &session->key.binders[0], sizeof(struct binder_data_st));
memcpy(&session->key.binders[0], &session->key.binders[1], sizeof(struct binder_data_st));
memcpy(&session->key.binders[1], &tmp, sizeof(struct binder_data_st));
} | 0 | [
"CWE-416"
] | gnutls | 75a937d97f4fefc6f9b08e3791f151445f551cb3 | 75,846,955,979,508,160,000,000,000,000,000,000,000 | 8 | pre_shared_key: avoid use-after-free around realloc
Signed-off-by: Daiki Ueno <ueno@gnu.org> |
static inline void dma_async_issue_pending(struct dma_chan *chan)
{
chan->device->device_issue_pending(chan);
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 91,432,294,815,903,580,000,000,000,000,000,000,000 | 4 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
int udpv6_offload_init(void)
{
return inet6_add_offload(&udpv6_offload, IPPROTO_UDP);
} | 0 | [
"CWE-125"
] | linux | 2423496af35d94a87156b063ea5cedffc10a70a1 | 332,506,235,389,398,370,000,000,000,000,000,000,000 | 4 | ipv6: Prevent overrun when parsing v6 header options
The KASAN warning repoted below was discovered with a syzkaller
program. The reproducer is basically:
int s = socket(AF_INET6, SOCK_RAW, NEXTHDR_HOP);
send(s, &one_byte_of_data, 1, MSG_MORE);
send(s, &more_than_mtu_bytes_data, 2000, 0);
The socket() call set... |
bool asn1_read_BitString(struct asn1_data *data, TALLOC_CTX *mem_ctx, DATA_BLOB *blob, uint8_t *padding)
{
int len;
ZERO_STRUCTP(blob);
if (!asn1_start_tag(data, ASN1_BIT_STRING)) return false;
len = asn1_tag_remaining(data);
if (len < 0) {
data->has_error = true;
return false;
}
if (!asn1_read_uint8(data, p... | 0 | [
"CWE-399"
] | samba | 9d989c9dd7a5b92d0c5d65287935471b83b6e884 | 141,049,393,430,770,970,000,000,000,000,000,000,000 | 31 | CVE-2015-7540: lib: util: Check *every* asn1 return call and early return.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep... |
cmsHPROFILE CMSEXPORT cmsOpenProfileFromFile(const char *ICCProfile, const char *sAccess)
{
return cmsOpenProfileFromFileTHR(NULL, ICCProfile, sAccess);
} | 0 | [] | Little-CMS | d2d902b9a03583ae482c782b2f243f7e5268a47d | 182,754,889,285,844,600,000,000,000,000,000,000,000 | 4 | >Changes from Richard Hughes |
void Settings::load(QSettings* settings_ptr) {
// Config updates
SAVELOAD(uiUpdateCounter, "lastupdate");
SAVELOAD(bMute, "audio/mute");
SAVELOAD(bDeaf, "audio/deaf");
LOADENUM(atTransmit, "audio/transmit");
SAVELOAD(uiDoublePush, "audio/doublepush");
SAVELOAD(bTxAudioCue, "audio/pushclick");
SAVELOAD(qsTxAudi... | 0 | [
"CWE-310"
] | mumble | 5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e | 339,374,246,852,372,530,000,000,000,000,000,000,000 | 189 | Explicitly remove file permissions for settings and DB |
int tls1_enc(SSL *s, int send)
{
SSL3_RECORD *rec;
EVP_CIPHER_CTX *ds;
unsigned long l;
int bs,i,j,k,pad=0,ret,mac_size=0;
int n;
const EVP_CIPHER *enc;
if (send)
{
if (EVP_MD_CTX_md(s->write_hash))
{
n=EVP_MD_CTX_size(s->write_hash);
OPENSSL_assert(n >= 0);
}
ds=s->enc_write_ctx;
rec= &(s-... | 1 | [
"CWE-310"
] | openssl | b23da2919b332fd83fa6de87caacb0651f64a3f5 | 70,367,638,452,374,770,000,000,000,000,000,000,000 | 121 | Update DTLS code to match CBC decoding in TLS.
This change updates the DTLS code to match the constant-time CBC
behaviour in the TLS.
(cherry picked from commit 9f27de170d1b7bef3d46d41382dc4dafde8b3900) |
flow_entry_type_t flow_decode(flow_hash_table_t *fht, const struct pcap_pkthdr *pkthdr,
const u_char *pktdata, const int datalink, const int expiry)
{
uint32_t pkt_len = pkthdr->caplen;
const u_char *packet = pktdata;
uint32_t _U_ vlan_offset;
uint16_t ether_type = 0;
ipv4_hdr_t *ip_hdr = NU... | 1 | [
"CWE-476"
] | tcpreplay | 46cf964a7db636da76abeebf10482acf6f682a87 | 35,107,655,806,805,130,000,000,000,000,000,000,000 | 118 | Bug #677 - fixes for tcpprep tree |
eval_string(char_u **arg, typval_T *rettv, int evaluate, int interpolate)
{
char_u *p;
char_u *end;
int extra = interpolate ? 1 : 0;
int off = interpolate ? 0 : 1;
int len;
// Find the end of the string, skipping backslashed characters.
for (p = *arg + off; *p != NUL && *p != '"'; MB_PTR... | 1 | [
"CWE-125",
"CWE-122"
] | vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 251,995,737,585,653,080,000,000,000,000,000,000,000 | 158 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. |
static int sockent_add(sockent_t *se) /* {{{ */
{
sockent_t *last_ptr;
if (se == NULL)
return (-1);
if (se->type == SOCKENT_TYPE_SERVER) {
struct pollfd *tmp;
tmp = realloc(listen_sockets_pollfd,
sizeof(*tmp) * (listen_sockets_num + se->data.server.fd_num));
if (tmp == NULL) {... | 0 | [
"CWE-835"
] | collectd | f6be4f9b49b949b379326c3d7002476e6ce4f211 | 26,094,946,470,313,654,000,000,000,000,000,000,000 | 48 | network plugin: Fix endless loop DOS in parse_packet()
When correct 'Signature part' is received by Collectd, configured without
AuthFile option, condition for endless loop occurs due to missing increase
of pointer to next unprocessed part.
This is a forward-port of #2233.
Fixes: CVE-2017-7401
Closes: #2174
Signed-o... |
GF_Err hnti_on_child_box(GF_Box *s, GF_Box *a)
{
GF_HintTrackInfoBox *hnti = (GF_HintTrackInfoBox *)s;
if (!hnti || !a) return GF_BAD_PARAM;
switch (a->type) {
//this is the value for GF_RTPBox - same as HintSampleEntry for RTP !!!
case GF_ISOM_BOX_TYPE_RTP:
case GF_ISOM_BOX_TYPE_SDP:
if (hnti->SDP) ERROR_ON_D... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 34,440,972,190,534,930,000,000,000,000,000,000,000 | 17 | fixed #1587 |
enqueue_runnable_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
cfs_rq->runnable_weight += se->runnable_weight;
cfs_rq->avg.runnable_load_avg += se->avg.runnable_load_avg;
cfs_rq->avg.runnable_load_sum += se_runnable(se) * se->avg.runnable_load_sum;
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 70,363,278,802,212,210,000,000,000,000,000,000,000 | 7 | 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... |
MODRET auth_pass(cmd_rec *cmd) {
char *user = NULL;
int res = 0;
if (logged_in)
return PR_ERROR_MSG(cmd, R_503, _("You are already logged in"));
user = pr_table_get(session.notes, "mod_auth.orig-user", NULL);
if (!user) {
(void) pr_table_remove(session.notes, "mod_auth.orig-user", NULL);
(void) ... | 0 | [
"CWE-59",
"CWE-61"
] | proftpd | ecff21e0d0e84f35c299ef91d7fda088e516d4ed | 174,471,091,166,890,470,000,000,000,000,000,000,000 | 92 | Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks
is off, to 1.3.5 branch. |
ElectronBrowserClient::GetNetworkContextsParentDirectory() {
base::FilePath user_data_dir;
base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
DCHECK(!user_data_dir.empty());
return {user_data_dir};
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 248,077,458,564,901,700,000,000,000,000,000,000,000 | 7 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
s_aes_process(stream_state * ss, stream_cursor_read * pr,
stream_cursor_write * pw, bool last)
{
stream_aes_state *const state = (stream_aes_state *) ss;
const unsigned char *limit;
const long in_size = pr->limit - pr->ptr;
const long out_size = pw->limit - pw->ptr;
unsigned char t... | 0 | [] | ghostpdl | 8e9ce5016db968b40e4ec255a3005f2786cce45f | 181,302,605,880,342,660,000,000,000,000,000,000,000 | 90 | Bug 699665 "memory corruption in aesdecode"
The specimen file calls aesdecode without specifying the key to be
used, though it does manage to do enough work with the PDF interpreter
routines to get access to aesdecode (which isn't normally available).
This causes us to read uninitialised memory, which can (and often ... |
static bool pdb_samba_dsdb_next_entry(struct pdb_search *search,
struct samr_displayentry *entry)
{
struct pdb_samba_dsdb_search_state *state = talloc_get_type_abort(
search->private_data, struct pdb_samba_dsdb_search_state);
if (state->current == state->num_entries) {
return false;
}
entry->idx = s... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 37,601,657,558,310,593,000,000,000,000,000,000,000 | 24 | 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... |
GF_Err gf_filter_set_author(GF_Filter *filter, const char *new_desc)
{
if (!filter) return GF_BAD_PARAM;
if (filter->instance_author)
gf_free(filter->instance_author);
filter->instance_author = new_desc ? gf_strdup(new_desc) : NULL;
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 266,390,484,833,876,130,000,000,000,000,000,000,000 | 9 | fixed crashes for very long path - cf #1908 |
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
array_init(&EX_T(opline->result.u.var).tmp_var);
if (IS_TMP_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_TMP_VAR != IS_UNUSED
} else {
return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP_HA... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 14,633,423,492,427,908,000,000,000,000,000,000,000 | 13 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
ofpact_type_from_name(const char *name, enum ofpact_type *type)
{
#define OFPACT(ENUM, STRUCT, MEMBER, NAME) \
if (!strcasecmp(name, NAME)) { \
*type = OFPACT_##ENUM; \
return true; ... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 146,316,870,443,025,730,000,000,000,000,000,000,000 | 12 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
GF_Box *vwid_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_ViewIdentifierBox, GF_ISOM_BOX_TYPE_VWID);
return (GF_Box *)tmp; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 108,453,045,161,579,530,000,000,000,000,000,000,000 | 5 | fixed #1587 |
const char* ExpressionSetDifference::getOpName() const {
return "$setDifference";
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 114,518,758,006,456,720,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
ews_soup_got_headers (SoupMessage *msg,
gpointer user_data)
{
struct _oal_req_data *data = (struct _oal_req_data *) user_data;
const gchar *size;
size = soup_message_headers_get_one (
msg->response_headers,
"Content-Length");
if (size)
data->response_size = strtol (size, NULL, 10);
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 217,649,076,375,587,000,000,000,000,000,000,000,000 | 13 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
std::shared_ptr<rss_feed> controller::get_feed_by_url(const std::string& feedurl) {
for (auto feed : feeds) {
if (feedurl == feed->rssurl())
return feed;
}
LOG(level::ERROR, "controller:get_feed_by_url failed for %s", feedurl);
return std::shared_ptr<rss_feed>();
} | 0 | [
"CWE-943",
"CWE-787"
] | newsbeuter | 96e9506ae9e252c548665152d1b8968297128307 | 218,655,170,828,191,900,000,000,000,000,000,000,000 | 8 | Sanitize inputs to bookmark-cmd (#591)
Newsbeuter didn't properly shell-escape the arguments passed to
bookmarking command, which allows a remote attacker to perform remote
code execution by crafting an RSS item whose title and/or URL contain
something interpretable by the shell (most notably subshell
invocations.)
T... |
static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
const char
*mode,
*option;
CompressionType
compression;
EndianType
endian_type;
int
tiff_status = 0;
MagickBooleanType
adjoin,
preserve_compression,
status;
Ma... | 0 | [
"CWE-787"
] | ImageMagick | c8718305f120293d8bf13724f12eed885d830b09 | 81,827,432,708,490,280,000,000,000,000,000,000,000 | 932 | https://github.com/ImageMagick/ImageMagick/issues/4974 |
xmlXPathNewString(const xmlChar *val) {
xmlXPathObjectPtr ret;
ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
if (ret == NULL) {
xmlXPathErrMemory(NULL, "creating string object\n");
return(NULL);
}
memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
ret->type = XPATH_STRING... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 37,607,747,197,233,270,000,000,000,000,000,000,000 | 19 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
g_reset_wait_obj(tbus obj)
{
#ifdef _WIN32
if (obj == 0)
{
return 0;
}
ResetEvent((HANDLE)obj);
return 0;
#else
char buf[64];
if (obj == 0)
{
return 0;
}
while (g_tcp_can_recv((int)obj, 0))
{
recvfrom((int)obj, &buf, 64, 0, 0, 0);
}
return 0;
#endif
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 254,217,969,783,511,120,000,000,000,000,000,000,000 | 23 | move temp files from /tmp to /tmp/.xrdp |
pk_transaction_upgrade_system (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
gboolean ret;
PkBitfield transaction_flags;
PkUpgradeKindEnum upgrade_kind;
const gchar *distro_id;
g_autoptr(GError) error = NULL;
g_autofree gchar *transaction_flags_temp = NULL;
... | 0 | [
"CWE-287"
] | PackageKit | 7e8a7905ea9abbd1f384f05f36a4458682cd4697 | 100,226,349,384,212,190,000,000,000,000,000,000,000 | 58 | 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 rds_inc_info_copy(struct rds_incoming *inc,
struct rds_info_iterator *iter,
__be32 saddr, __be32 daddr, int flip)
{
struct rds_info_message minfo;
minfo.seq = be64_to_cpu(inc->i_hdr.h_sequence);
minfo.len = be32_to_cpu(inc->i_hdr.h_len);
if (flip) {
minfo.laddr = daddr;
minfo.faddr = sa... | 1 | [
"CWE-200"
] | net | 4116def2337991b39919f3b448326e21c40e0dbb | 325,674,263,812,764,160,000,000,000,000,000,000,000 | 23 | rds: fix an infoleak in rds_inc_info_copy
The last field "flags" of object "minfo" is not initialized.
Copying this object out may leak kernel stack data.
Assign 0 to it to avoid leak.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller... |
RZ_API RZ_OWN RzBinDex *rz_bin_dex_new(RZ_NONNULL RzBuffer *buf, ut64 base, RZ_NONNULL Sdb *kv) {
rz_return_val_if_fail(buf, NULL);
RzBinDex *dex = (RzBinDex *)RZ_NEW0(RzBinDex);
if (!dex) {
return NULL;
}
dex->strings = rz_pvector_new((RzPVectorFree)dex_string_free);
if (!dex->strings) {
rz_bin_dex_free(de... | 0 | [
"CWE-787"
] | rizin | 1524f85211445e41506f98180f8f69f7bf115406 | 204,907,222,317,011,620,000,000,000,000,000,000,000 | 40 | fix #2969 - oob write (1 byte) in dex.c |
TEST(FreeUriMembersSuite, MultiFreeWorksFine) {
UriUriA uri;
EXPECT_EQ(uriParseSingleUriA(&uri, "file:///home/user/song.mp3", NULL),
URI_SUCCESS);
UriUriA uriBackup = uri;
EXPECT_EQ(memcmp(&uriBackup, &uri, sizeof(UriUriA)), 0);
uriFreeUriMembersA(&uri);
// Did some pointers change (to NULL)?
EXPECT_NE(me... | 0 | [
"CWE-125"
] | uriparser | cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4 | 140,133,707,119,834,500,000,000,000,000,000,000,000 | 16 | Fix uriParse*Ex* out-of-bounds read |
HttpHeader::delAt(HttpHeaderPos pos, int &headers_deleted)
{
HttpHeaderEntry *e;
assert(pos >= HttpHeaderInitPos && pos < static_cast<ssize_t>(entries.size()));
e = static_cast<HttpHeaderEntry*>(entries[pos]);
entries[pos] = NULL;
/* decrement header length, allow for ": " and crlf */
len -= e->... | 0 | [
"CWE-444"
] | squid | 9c8e2a71aa1d3c159a319d9365c346c48dc783a5 | 273,198,401,446,728,650,000,000,000,000,000,000,000 | 12 | Enforce token characters for field-name (#700)
RFC 7230 defines field-name as a token. Request splitting and cache
poisoning attacks have used non-token characters to fool broken HTTP
agents behind or in front of Squid for years. This change should
significantly reduce that abuse.
If we discover exceptional situatio... |
static INLINE int SFTP_GetSz(byte* buf, word32* sz,
word32 lowerBound, word32 upperBound)
{
int ret = WS_SUCCESS;
if (buf == NULL || sz == NULL) {
ret = WS_BAD_ARGUMENT;
}
if (ret == WS_SUCCESS) {
word32 val;
ato32(buf, &val);
if (val < lowerBound || val > uppe... | 0 | [
"CWE-190"
] | wolfssh | edb272e35ee57e7b89f3e127222c6981b6a1e730 | 251,448,045,170,038,800,000,000,000,000,000,000,000 | 21 | ASAN SFTP Fixes
When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766) |
next_nonnull_line(Line *line)
{
Line *l;
for (l = line; l != NULL && l->len == 0; l = l->next) ;
if (l == NULL || l->len == 0)
return -1;
Currentbuf->currentLine = l;
if (l != line)
Currentbuf->pos = 0;
return 0;
} | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 213,769,887,211,363,030,000,000,000,000,000,000,000 | 14 | Make temporary directory safely when ~/.w3m is unwritable |
zzip_mem_disk_entry_strdup_name(ZZIP_MEM_DISK* dir,
ZZIP_DISK_ENTRY* entry) {
return zzip_disk_entry_strdup_name(dir->disk, entry); } | 1 | [
"CWE-119"
] | zziplib | 596d9dfce2624e849417d4301e8d67935608aa5e | 83,957,518,947,242,690,000,000,000,000,000,000,000 | 3 | memdisk
(.) |
XML_SetNamespaceDeclHandler(XML_Parser parser,
XML_StartNamespaceDeclHandler start,
XML_EndNamespaceDeclHandler end)
{
startNamespaceDeclHandler = start;
endNamespaceDeclHandler = end;
} | 0 | [
"CWE-119"
] | libexpat | ba0f9c3b40c264b8dd392e02a7a060a8fa54f032 | 68,255,929,030,892,110,000,000,000,000,000,000,000 | 7 | CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings
https://sourceforge.net/p/expat/bugs/528/ |
\param file Input file (can be \c 0 if \c filename is set).
\param filename Filename, as a C-string (can be \c 0 if \c file is set).
\return C-string containing the guessed file format, or \c 0 if nothing has been guessed.
**/
inline const char *ftype(std::FILE *const file, const char *const filename... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 131,000,723,525,180,780,000,000,000,000,000,000,000 | 49 | Fix other issues in 'CImg<T>::load_bmp()'. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.