func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
isAlphaNum(char ch) {
return (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');
} | 0 | [
"CWE-20",
"CWE-476"
] | passenger | ddb8ecc4ebf260e4967f57f271d4f5761abeac3e | 109,389,880,199,113,210,000,000,000,000,000,000,000 | 3 | Fix CVE-2015-7519 header collision vulnerability |
void tls1_clear(SSL *s)
{
ssl3_clear(s);
s->version=TLS1_VERSION;
} | 0 | [
"CWE-310"
] | openssl | 270881316664396326c461ec7a124aec2c6cc081 | 26,291,914,011,562,210,000,000,000,000,000,000,000 | 5 | Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cher... |
get_link_name (const char *name,
int count,
int max_length)
{
const char *format;
char *result;
int unshortened_length;
gboolean use_count;
g_assert (name != NULL);
if (count < 0)
{
g_warning ("bad count in get_link_name");
coun... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 255,764,225,330,734,300,000,000,000,000,000,000,000 | 133 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
static inline void load_kernel_asce(void)
{
unsigned long asce;
__ctl_store(asce, 1, 1);
if (asce != S390_lowcore.kernel_asce)
__ctl_load(S390_lowcore.kernel_asce, 1, 1);
set_cpu_flag(CIF_ASCE);
} | 0 | [
"CWE-20"
] | linux | 3446c13b268af86391d06611327006b059b8bab1 | 159,270,813,583,204,320,000,000,000,000,000,000,000 | 9 | s390/mm: four page table levels vs. fork
The fork of a process with four page table levels is broken since
git commit 6252d702c5311ce9 "[S390] dynamic page tables."
All new mm contexts are created with three page table levels and
an asce limit of 4TB. If the parent has four levels dup_mmap will
add vmas to the new co... |
enum_field_types field_type() const { return orig_item->field_type(); } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 193,509,426,350,628,700,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
void clear()
{
} | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 18,497,510,669,089,431,000,000,000,000,000,000,000 | 3 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
int SSL_get_error(const SSL *s,int i)
{
int reason;
unsigned long l;
BIO *bio;
if (i > 0) return(SSL_ERROR_NONE);
/* Make things return SSL_ERROR_SYSCALL when doing SSL_do_handshake
* etc, where we do encode the error */
if ((l=ERR_peek_error()) != 0)
{
if (ERR_GET_LIB(l) == ERR_LIB_SYS)
return(SSL_ER... | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 128,245,741,165,566,530,000,000,000,000,000,000,000 | 86 | Add Next Protocol Negotiation. |
static int pkey_GOST_ECcp_encrypt(EVP_PKEY_CTX *pctx, unsigned char *out,
size_t *out_len, const unsigned char *key,
size_t key_len)
{
GOST_KEY_TRANSPORT *gkt = NULL;
EVP_PKEY *pubk = EVP_PKEY_CTX_get0_pkey(pctx);
struct gost_pmeth_data *data = EVP_PKEY_... | 1 | [
"CWE-120",
"CWE-787"
] | engine | 7df766124f87768b43b9e8947c5a01e17545772c | 119,311,370,633,297,220,000,000,000,000,000,000,000 | 111 | Fix buffer overrun in creating key transport blob according to RFC 9189, 4.2.4.2
Resolves: CVE-2022-29242 |
static void forward_filesfrom_data(void)
{
ssize_t len;
len = read(ff_forward_fd, ff_xb.buf + ff_xb.len, ff_xb.size - ff_xb.len);
if (len <= 0) {
if (len == 0 || errno != EINTR) {
/* Send end-of-file marker */
ff_forward_fd = -1;
write_buf(iobuf.out_fd, "\0\0", ff_lastchar ? 2 : 1);
free_xbuf(&ff_xb);... | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 187,808,364,107,572,900,000,000,000,000,000,000,000 | 106 | Some extra file-list safety checks. |
proxy_C_DecryptVerifyUpdate (CK_X_FUNCTION_LIST *self,
CK_SESSION_HANDLE handle,
CK_BYTE_PTR enc_part,
CK_ULONG enc_part_len,
CK_BYTE_PTR part,
CK_ULONG_PTR part_len)
{
State... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 29,617,955,847,828,417,000,000,000,000,000,000,000 | 16 | Check for arithmetic overflows before allocating |
void ossl_statem_set_in_handshake(SSL *s, int inhand)
{
if (inhand)
s->statem.in_handshake++;
else
s->statem.in_handshake--;
} | 0 | [
"CWE-400"
] | openssl | 4b390b6c3f8df925dc92a3dd6b022baa9a2f4650 | 173,622,239,448,764,160,000,000,000,000,000,000,000 | 7 | Excessive allocation of memory in tls_get_message_header()
A TLS message includes 3 bytes for its length in the header for the message.
This would allow for messages up to 16Mb in length. Messages of this length
are excessive and OpenSSL includes a check to ensure that a peer is sending
reasonably sized messages in or... |
static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF* tif, TIFFDirEntry* direntry, uint32* count, uint32 desttypesize, void** value)
{
int typesize;
uint32 datasize;
void* data;
typesize=TIFFDataWidth(direntry->tdir_type);
if ((direntry->tdir_count==0)||(typesize==0))
{
*value=0;
return(TIFFReadDirEntry... | 0 | [
"CWE-125"
] | libtiff | 9a72a69e035ee70ff5c41541c8c61cd97990d018 | 258,643,152,698,489,230,000,000,000,000,000,000,000 | 68 | * libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() to
instanciate compute ntrips as TIFFhowmany_32(td->td_imagelength, rowsperstrip),
instead of a logic based on the total size of data. Which is faulty is
the total size of data is not sufficient to fill the whole image, and thus
results in reading outside ... |
int is_valid_bugaddr(unsigned long addr)
{
unsigned short ud;
if (addr < TASK_SIZE_MAX)
return 0;
if (probe_kernel_address((unsigned short *)addr, ud))
return 0;
return ud == INSN_UD0 || ud == INSN_UD2;
} | 0 | [
"CWE-362",
"CWE-284"
] | linux | d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9 | 184,443,283,510,148,220,000,000,000,000,000,000,000 | 12 | x86/entry/64: Don't use IST entry for #BP stack
There's nothing IST-worthy about #BP/int3. We don't allow kprobes
in the small handful of places in the kernel that run at CPL0 with
an invalid stack, and 32-bit kernels have used normal interrupt
gates for #BP forever.
Furthermore, we don't allow kprobes in places tha... |
ltree_in(PG_FUNCTION_ARGS)
{
char *buf = (char *) PG_GETARG_POINTER(0);
char *ptr;
nodeitem *list,
*lptr;
int num = 0,
totallen = 0;
int state = LTPRS_WAITNAME;
ltree *result;
ltree_level *curlevel;
int charlen;
int pos = 0;
ptr = buf;
while (*ptr)
{
charlen = pg_mblen(ptr);
... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 227,912,554,498,844,350,000,000,000,000,000,000,000 | 110 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
bool const_item() const { return true; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 159,584,463,450,720,420,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
RuntimeError() : std::runtime_error("") {} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 113,708,586,923,044,390,000,000,000,000,000,000,000 | 1 | Fix segfault on complex pointer formatting (#642) |
struct dns_resolvers *find_resolvers_by_id(const char *id)
{
struct dns_resolvers *res;
list_for_each_entry(res, &dns_resolvers, list) {
if (!strcmp(res->id, id))
return res;
}
return NULL;
} | 0 | [
"CWE-125"
] | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | 288,145,440,572,143,000,000,000,000,000,000,000,000 | 10 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly acce... |
extern "C" void *SUB_REALLOC(void *ptr, size_t size)
{
void *new_ptr = NULL;
#if MBED_MEM_TRACING_ENABLED
mbed_mem_trace_lock();
#endif
#if MBED_HEAP_STATS_ENABLED
// Note - no lock needed since malloc and free are thread safe
// Get old size
uint32_t old_size = 0;
if (ptr != NULL) {
al... | 0 | [
"CWE-190"
] | mbed-os | 4450464fc87fb104a45190a2334b82b3bb2b13fb | 137,874,936,925,347,400,000,000,000,000,000,000,000 | 47 | Add integer overflow check to the malloc wrappers
Add a check that the combined size of the buffer to allocate and
alloc_info_t does not exceed the maximum integer value representable
by size_t. |
void ogs_sbi_message_final(void)
{
ogs_pool_final(&request_pool);
ogs_pool_final(&response_pool);
} | 0 | [
"CWE-476",
"CWE-787"
] | open5gs | d919b2744cd05abae043490f0a3dd1946c1ccb8c | 179,344,852,137,547,650,000,000,000,000,000,000,000 | 5 | [AMF] fix the memory problem (#1247)
1. memory corruption
- Overflow num_of_part in SBI message
2. null pointer dereference
- n2InfoContent->ngap_ie_type |
GF_Err payt_box_dump(GF_Box *a, FILE * trace)
{
GF_PAYTBox *p;
p = (GF_PAYTBox *)a;
gf_isom_box_dump_start(a, "PayloadTypeBox", trace);
gf_fprintf(trace, "PayloadID=\"%d\" PayloadString=\"%s\">\n", p->payloadCode, p->payloadString);
gf_isom_box_dump_done("PayloadTypeBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 14,655,950,845,080,920,000,000,000,000,000,000,000 | 9 | fixed #2138 |
void fix_charset_and_length(CHARSET_INFO *cs,
Derivation dv, Metadata metadata)
{
/*
We have to have a different max_length than 'length' here to
ensure that we get the right length if we do use the item
to create a new table. In this case max_length must be the m... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 336,724,934,798,807,180,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 ... |
p11_kit_iter_begin_with (P11KitIter *iter,
CK_FUNCTION_LIST_PTR module,
CK_SLOT_ID slot,
CK_SESSION_HANDLE session)
{
CK_SESSION_INFO info;
CK_RV rv;
finish_iterating (iter, CKR_OK);
return_if_fail (module != NULL);
if (session != 0) {
... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 199,943,239,985,952,780,000,000,000,000,000,000,000 | 64 | Check for arithmetic overflows before allocating |
alloc_add_clump(gs_ref_memory_t * mem, ulong csize, client_name_t cname)
{
clump_t *cp = alloc_acquire_clump(mem, csize, true, cname);
if (cp) {
alloc_close_clump(mem);
mem->cc = cp;
gs_alloc_fill(mem->cc->cbase, gs_alloc_fill_free,
mem->cc->climit - mem->cc->cbase... | 0 | [
"CWE-190"
] | ghostpdl | cfde94be1d4286bc47633c6e6eaf4e659bd78066 | 140,155,355,538,196,500,000,000,000,000,000,000,000 | 12 | Bug 697985: bounds check the array allocations methods
The clump allocator has four allocation functions that use 'number of elements'
and 'size of elements' parameters (rather than a simple 'number of bytes').
Those need specific bounds checking. |
hash_compare_semantic_type (const semantic_type *m1, const semantic_type *m2)
{
/* Since names are unique, we can compare the pointers themselves. */
return UNIQSTR_EQ (m1->tag, m2->tag);
} | 0 | [] | bison | b7aab2dbad43aaf14eebe78d54aafa245a000988 | 15,544,949,677,685,510,000,000,000,000,000,000,000 | 5 | fix: crash when redefining the EOF token
Reported by Agency for Defense Development.
https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
On an empty such as
%token FOO
BAR
FOO 0
%%
input: %empty
we crash because when we find FOO 0, we decrement ntokens (since FOO
was discovered... |
bool Image::isRationalType(uint16_t type) {
return type == Exiv2::unsignedRational
|| type == Exiv2::signedRational
;
} | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 262,713,020,116,261,600,000,000,000,000,000,000,000 | 5 | Fix https://github.com/Exiv2/exiv2/issues/55 |
void ModuleSQL::init()
{
if (mysql_library_init(0, NULL, NULL))
throw ModuleException("Unable to initialise the MySQL library!");
Dispatcher = new DispatcherThread(this);
ServerInstance->Threads->Start(Dispatcher);
Implementation eventlist[] = { I_OnRehash, I_OnUnloadModule };
ServerInstance->Modules->Attach(e... | 0 | [
"CWE-476"
] | inspircd | 2cc35d8625b7ea5cbd1d1ebb116aff86c5280162 | 47,310,804,797,546,750,000,000,000,000,000,000,000 | 13 | Initialise and deallocate the MySQL library correctly. |
const char* SegmentInfo::GetTitleAsUTF8() const { return m_pTitleAsUTF8; } | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 336,256,374,346,533,830,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 |
int bdecode(char const* start, char const* end, bdecode_node& ret
, error_code& ec, int* error_pos, int depth_limit, int token_limit)
{
ec.clear();
ret.clear();
if (end - start > bdecode_token::max_offset)
{
if (error_pos) *error_pos = 0;
ec = bdecode_errors::limit_exceeded;
return -1;
}
// t... | 1 | [
"CWE-125"
] | libtorrent | ec30a5e9ec703afb8abefba757c6d401303b53db | 84,032,419,935,282,340,000,000,000,000,000,000,000 | 216 | fix out-of-bounds read in bdecode
Fixes #2099 |
static Sdb *store_versioninfo_gnu_verdef(ELFOBJ *bin, Elf_(Shdr) *shdr, int sz) {
const char *section_name = "";
const char *link_section_name = "";
char *end = NULL;
Elf_(Shdr) *link_shdr = NULL;
ut8 dfs[sizeof (Elf_(Verdef))] = {0};
Sdb *sdb;
int cnt, i;
if (shdr->sh_link > bin->ehdr.e_shnum) {
return false... | 1 | [
"CWE-476"
] | radare2 | fbaf24bce7ea4211e4608b3ab6c1b45702cb243d | 132,721,350,739,902,740,000,000,000,000,000,000,000 | 127 | Fix #8764 a 3rd time since 2nd time is UB and can be optimized away |
MagickExport void DestroyXResources(void)
{
register int
i;
unsigned int
number_windows;
XWindowInfo
*magick_windows[MaxXWindows];
XWindows
*windows;
DestroyXWidget();
windows=XSetWindows((XWindows *) ~0);
if ((windows == (XWindows *) NULL) || (windows->display == (Display *) NULL))
... | 0 | [] | ImageMagick | f391a5f4554fe47eb56d6277ac32d1f698572f0e | 224,672,166,737,733,960,000,000,000,000,000,000,000 | 189 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
icase - flag, if set to 1 the match is case insensitive
*/
int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
char *replace, char *string, int icase)
{
my_regex_t r;
my_regmatch_t *subs;
char *replace_end;
char *buf= *buf_p;
int len;
int buf_len, need_buf_len;
int cflags= REG_E... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 100,194,384,162,447,050,000,000,000,000,000,000,000 | 171 | WL#9072: Backport WL#8785 to 5.5 |
Ogg::XiphComment::~XiphComment()
{
delete d;
} | 0 | [
"CWE-20"
] | taglib | ab8a0ee8937256311e649a88e8ddd7c7f870ad59 | 161,029,525,018,825,900,000,000,000,000,000,000,000 | 4 | Don't store the output of ByteVector::toUInt() in int, use uint instead |
static void __exit exit_ext2_fs(void)
{
unregister_filesystem(&ext2_fs_type);
destroy_inodecache();
} | 0 | [
"CWE-241",
"CWE-19"
] | linux | be0726d33cb8f411945884664924bed3cb8c70ee | 217,709,187,400,342,670,000,000,000,000,000,000,000 | 5 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
sti... |
Rows_log_event *pending() const
{
return m_pending;
} | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 155,176,940,689,909,600,000,000,000,000,000,000,000 | 4 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
{
unsigned long old_cr0 = kvm_read_cr0(vcpu);
unsigned long update_bits = X86_CR0_PG | X86_CR0_WP |
X86_CR0_CD | X86_CR0_NW;
cr0 |= X86_CR0_ET;
#ifdef CONFIG_X86_64
if (cr0 & 0xffffffff00000000UL)
return 1;
#endif
cr0 &= ~CR0_RESERVED_BITS;
i... | 0 | [] | linux | 6d1068b3a98519247d8ba4ec85cd40ac136dbdf9 | 324,750,593,886,962,940,000,000,000,000,000,000,000 | 52 | KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461)
On hosts without the XSAVE support unprivileged local user can trigger
oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest
cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN
ioctl.
invalid opcode: 0000 [#2]... |
int PackLinuxElf32::pack2(OutputFile *fo, Filter &ft)
{
Extent x;
unsigned k;
bool const is_shlib = (0!=xct_off);
// count passes, set ptload vars
uip->ui_total_passes = 0;
for (k = 0; k < e_phnum; ++k) {
if (PT_LOAD32==get_te32(&phdri[k].p_type)) {
uip->ui_total_passes++;
... | 0 | [
"CWE-415"
] | upx | d9288213ec156dffc435566b9d393d23e87c6914 | 14,762,007,168,485,483,000,000,000,000,000,000,000 | 68 | More checking of PT_DYNAMIC and its contents.
https://github.com/upx/upx/issues/206
modified: p_lx_elf.cpp |
recv_password_packet(Port *port)
{
StringInfoData buf;
if (PG_PROTOCOL_MAJOR(port->proto) >= 3)
{
/* Expect 'p' message type */
int mtype;
mtype = pq_getbyte();
if (mtype != 'p')
{
/*
* If the client just disconnects without offering a password,
* don't make a log entry. This is legal per p... | 1 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 130,064,733,470,450,960,000,000,000,000,000,000,000 | 62 | 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... |
static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap,
struct nfs_fattr *fattr, struct nfs_fh *fh,
struct nfs4_fs_locations *fs_loc, struct nfs4_label *label,
const struct nfs_server *server)
{
int status;
umode_t fmode = 0;
uint32_t type;
int32_t err;
status = decode_attr_type(xdr, bitm... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 158,519,416,269,592,690,000,000,000,000,000,000,000 | 129 | 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... |
static int check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn)
{
struct bpf_reg_state *regs = cur_regs(env);
static const int ctx_reg = BPF_REG_6;
u8 mode = BPF_MODE(insn->code);
int i, err;
if (!may_access_skb(env->prog->type)) {
verbose(env, "BPF_LD_[ABS|IND] instructions not allowed for this pr... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 247,995,692,894,303,800,000,000,000,000,000,000,000 | 88 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
QPDFWriter::writeXRefStream(int xref_id, int max_id, qpdf_offset_t max_offset,
trailer_e which, int first, int last, int size,
qpdf_offset_t prev, int hint_id,
qpdf_offset_t hint_offset,
qpdf_offset_t hint_length,
bool skip_compression,
... | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 85,289,337,021,141,720,000,000,000,000,000,000,000 | 113 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
static inline void sync_cr8_to_lapic(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
if (svm_nested_virtualize_tpr(vcpu))
return;
if (!is_cr_intercept(svm, INTERCEPT_CR8_WRITE)) {
int cr8 = svm->vmcb->control.int_ctl & V_TPR_MASK;
kvm_set_cr8(vcpu, cr8);
}
} | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 167,244,870,332,077,250,000,000,000,000,000,000,000 | 12 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... |
storagePoolRefreshFailCleanup(virStorageBackend *backend,
virStoragePoolObj *obj,
const char *stateFile)
{
virErrorPtr orig_err;
virErrorPreserveLast(&orig_err);
virStoragePoolObjClearVols(obj);
if (stateFile)
unlink(stateFile);
i... | 0 | [] | libvirt | 447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87 | 264,843,508,776,364,200,000,000,000,000,000,000,000 | 15 | storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath
'virStoragePoolObjListSearch' returns a locked and refed object, thus we
must release it on ACL permission failure.
Fixes: 7aa0e8c0cb8
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318
Signed-off-by: Peter Krempa <pkrempa@redhat.co... |
static void server_real_connect(SERVER_REC *server, IPADDR *ip,
const char *unix_socket)
{
GIOChannel *handle;
IPADDR *own_ip = NULL;
const char *errmsg;
char *errmsg2;
char ipaddr[MAX_IP_LEN];
int port;
g_return_if_fail(ip != NULL || unix_socket != NULL);
signal_emit("server connecting", 2, server... | 0 | [
"CWE-20"
] | irssi-proxy | 85bbc05b21678e80423815d2ef1dfe26208491ab | 165,422,647,437,812,030,000,000,000,000,000,000,000 | 63 | Check if an SSL certificate matches the hostname of the server we are connecting to
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564 |
void TABLE_LIST::reinit_before_use(THD *thd)
{
/*
Reset old pointers to TABLEs: they are not valid since the tables
were closed in the end of previous prepare or execute call.
*/
table= 0;
/* Reset is_schema_table_processed value(needed for I_S tables */
schema_table_state= NOT_PROCESSED;
TABLE_LIS... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 127,741,234,425,424,820,000,000,000,000,000,000,000 | 24 | 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 void guc_ct_pool_entries_init(struct guc_ct_pool_entry *pool, u32 num)
{
memset(pool, 0, num * sizeof(*pool));
} | 0 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 124,589,627,377,123,700,000,000,000,000,000,000,000 | 4 | drm/i915/guc: Update to use firmware v49.0.1
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer d... |
static void binder_wakeup_proc_ilocked(struct binder_proc *proc)
{
struct binder_thread *thread = binder_select_thread_ilocked(proc);
binder_wakeup_thread_ilocked(proc, thread, /* sync = */false);
} | 0 | [
"CWE-416"
] | linux | 7bada55ab50697861eee6bb7d60b41e68a961a9c | 227,403,902,624,501,320,000,000,000,000,000,000,000 | 6 | binder: fix race that allows malicious free of live buffer
Malicious code can attempt to free buffers using the BC_FREE_BUFFER
ioctl to binder. There are protections against a user freeing a buffer
while in use by the kernel, however there was a window where
BC_FREE_BUFFER could be used to free a recently allocated bu... |
TEST_F(QueryPlannerTest, HintValid) {
addIndex(BSON("a" << 1));
runQueryHint(BSONObj(), fromjson("{a: 1}"));
assertNumSolutions(1U);
assertSolutionExists(
"{fetch: {filter: null, "
"node: {ixscan: {filter: null, pattern: {a: 1}}}}}");
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 80,260,565,493,629,230,000,000,000,000,000,000,000 | 9 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
{
struct vcpu_svm *svm = to_svm(vcpu);
struct kvm_host_map map_save;
int ret;
if (is_guest_mode(vcpu)) {
/* FED8h - SVM Guest */
put_smstate(u64, smstate, 0x7ed8, 1);
/* FEE0h - SVM Guest VMCB Physical Address */
put_smstate(u64, smstate, 0x7ee... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 175,633,736,261,796,400,000,000,000,000,000,000,000 | 45 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
inline BuilderArena* SegmentBuilder::getArena() {
// Down-cast safe because SegmentBuilder's constructor always initializes its SegmentReader base
// class with an Arena pointer that actually points to a BuilderArena.
return static_cast<BuilderArena*>(arena);
} | 0 | [
"CWE-20"
] | capnproto | 52bc956459a5e83d7c31be95763ff6399e064ae4 | 92,822,202,317,056,560,000,000,000,000,000,000,000 | 5 | SECURITY: Prevent compiler from eliding bounds checks.
Details: https://github.com/sandstorm-io/capnproto/blob/master/security-advisories/2017-04-17-0-apple-32bit-elides-bounds-check.md |
static int __split_and_process_non_flush(struct clone_info *ci)
{
struct bio *bio = ci->bio;
struct dm_target *ti;
unsigned len;
int r;
if (unlikely(bio_op(bio) == REQ_OP_DISCARD))
return __send_discard(ci);
else if (unlikely(bio_op(bio) == REQ_OP_WRITE_SAME))
return __send_write_same(ci);
else if (unlikely... | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 101,766,460,019,395,120,000,000,000,000,000,000,000 | 33 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
void load_cgroup(const char *fname) {
if (!fname)
return;
FILE *fp = fopen(fname, "re");
if (fp) {
char buf[MAXBUF];
if (fgets(buf, MAXBUF, fp)) {
cfg.cgroup = strdup(buf);
if (!cfg.cgroup)
errExit("strdup");
}
else
goto errout;
fclose(fp);
return;
}
errout:
fwarning("cannot load contr... | 1 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 42,136,138,020,152,883,000,000,000,000,000,000,000 | 23 | fixing CVE-2022-31214 |
void ib_uverbs_srq_event_handler(struct ib_event *event, void *context_ptr)
{
struct ib_uevent_object *uobj;
uobj = container_of(event->element.srq->uobject,
struct ib_uevent_object, uobject);
ib_uverbs_async_handler(context_ptr, uobj->uobject.user_handle,
event->event, &uobj->event_list,
&uobj->eve... | 0 | [
"CWE-362",
"CWE-703",
"CWE-667"
] | linux | 04f5866e41fb70690e28397487d8bd8eea7d712a | 270,941,474,133,215,800,000,000,000,000,000,000,000 | 11 | coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes bel... |
set_spell_chartab(char_u *fol, char_u *low, char_u *upp)
{
// We build the new tables here first, so that we can compare with the
// previous one.
spelltab_T new_st;
char_u *pf = fol, *pl = low, *pu = upp;
int f, l, u;
clear_spell_chartab(&new_st);
while (*pf != NUL)
{
if (*pl == NUL... | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 316,450,084,808,736,470,000,000,000,000,000,000,000 | 65 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
FOLLY_ALWAYS_INLINE bool advanceToNextField(
NimbleProtocolReader* /* iprot */,
int32_t /* currFieldId */,
int32_t nextFieldId,
TType nextFieldType) {
detail::nimble::FieldBytes expected = fieldBeginBytes(
detail::nimble::ttypeToNimbleType(nextFieldType), nextFieldId)... | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | 3f156207e8a6583d88999487e954320dc18955e6 | 864,174,091,503,652,300,000,000,000,000,000,000 | 18 | Better handling of truncated data when reading containers
Summary:
Currently we read the container size and blindly pre-allocate the container of that size. This allows malicious attacker to send few bytes message and cause server to allocate GBs of memory.
This diff changes the logic to check if we have at least 1b/... |
e_ews_connection_get_attachments_sync (EEwsConnection *cnc,
gint pri,
const gchar *uid,
const GSList *ids,
const gchar *cache,
... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 3,370,476,155,044,747,000,000,000,000,000,000,000 | 34 | 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 |
FunctionContext::UniqueId FunctionContext::query_id() const {
UniqueId id;
#if DORIS_UDF_SDK_BUILD
id.hi = id.lo = 0;
#else
id.hi = _impl->_state->query_id().hi;
id.lo = _impl->_state->query_id().lo;
#endif
return id;
} | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 190,525,941,597,168,770,000,000,000,000,000,000,000 | 10 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
static unsigned long add_required_remount_flags(const char *s, const char *d,
unsigned long flags)
{
#ifdef HAVE_STATVFS
struct statvfs sb;
unsigned long required_flags = 0;
if (!(flags & MS_REMOUNT))
return flags;
if (!s)
s = d;
if (!s)
return flags;
if (statvfs(s, &sb) < 0)
return flags;
if (sb.f... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 216,010,445,193,995,650,000,000,000,000,000,000,000 | 32 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
bool HeaderMapImpl::operator==(const HeaderMap& rhs) const {
if (size() != rhs.size()) {
return false;
}
std::vector<std::pair<absl::string_view, absl::string_view>> rhs_headers;
rhs_headers.reserve(rhs.size());
rhs.iterate(collectAllHeaders(&rhs_headers));
auto i = headers_.begin();
auto j = rhs_he... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 61,416,208,380,380,480,000,000,000,000,000,000,000 | 19 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static int _valid_id(char *caller, job_desc_msg_t *msg, uid_t uid, gid_t gid)
{
if (validate_slurm_user(uid))
return SLURM_SUCCESS;
if (uid != msg->user_id) {
error("%s: Requested UID=%u doesn't match user UID=%u.",
caller, msg->user_id, uid);
return ESLURM_USER_ID_MISSING;
}
if (gid != msg->group_i... | 0 | [
"CWE-20"
] | slurm | 033dc0d1d28b8d2ba1a5187f564a01c15187eb4e | 231,679,431,082,793,900,000,000,000,000,000,000,000 | 19 | Fix insecure handling of job requested gid.
Only trust MUNGE signed values, unless the RPC was signed by
SlurmUser or root.
CVE-2018-10995. |
static int dccp_getsockopt_service(struct sock *sk, int len,
__be32 __user *optval,
int __user *optlen)
{
const struct dccp_sock *dp = dccp_sk(sk);
const struct dccp_service_list *sl;
int err = -ENOENT, slen = 0, total_len = sizeof(u32);
lock_sock(sk);
if ((sl = dp->dccps_service_list) != NULL) {
... | 0 | [] | linux-2.6 | 39ebc0276bada8bb70e067cb6d0eb71839c0fb08 | 60,701,119,597,104,970,000,000,000,000,000,000,000 | 27 | [DCCP] getsockopt: Fix DCCP_SOCKOPT_[SEND,RECV]_CSCOV
We were only checking if there was enough space to put the int, but
left len as specified by the (malicious) user, sigh, fix it by setting
len to sizeof(val) and transfering just one int worth of data, the one
asked for.
Also check for negative len values.
Signed... |
QPDFWriter::setQDFMode(bool val)
{
this->m->qdf_mode = val;
} | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 78,875,421,929,952,650,000,000,000,000,000,000,000 | 4 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
static u16 prot_field_size(enum ib_signature_type type)
{
switch (type) {
case IB_SIG_TYPE_T10_DIF:
return MLX5_DIF_SIZE;
default:
return 0;
}
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 134,539,423,952,911,400,000,000,000,000,000,000,000 | 9 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
static int compile_suggested_paths(const ExecContext *c, const ExecParameters *p, char ***ret) {
_cleanup_strv_free_ char ** list = NULL;
ExecDirectoryType t;
int r;
assert(c);
assert(p);
assert(ret);
assert(c->dynamic_user);
/* Compile a list of paths ... | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 231,265,410,658,811,900,000,000,000,000,000,000,000 | 44 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
GF_OperatingPointsInformation *gf_isom_oinf_new_entry()
{
GF_OperatingPointsInformation* ptr;
GF_SAFEALLOC(ptr, GF_OperatingPointsInformation);
if (ptr) {
ptr->profile_tier_levels = gf_list_new();
ptr->operating_points = gf_list_new();
ptr->dependency_layers = gf_list_new();
}
return ptr;
} | 0 | [
"CWE-401"
] | gpac | 0a85029d694f992f3631e2f249e4999daee15cbf | 154,409,999,767,966,700,000,000,000,000,000,000,000 | 12 | fixed #1785 (fuzz) |
static int __l2cap_wait_ack(struct sock *sk, struct l2cap_chan *chan)
{
DECLARE_WAITQUEUE(wait, current);
int err = 0;
int timeo = L2CAP_WAIT_ACK_POLL_PERIOD;
/* Timeout to prevent infinite loop */
unsigned long timeout = jiffies + L2CAP_WAIT_ACK_TIMEOUT;
add_wait_queue(sk_sleep(sk), &wait);
set_current_state(T... | 0 | [
"CWE-787"
] | linux | 1bff51ea59a9afb67d2dd78518ab0582a54a472c | 107,187,740,658,912,270,000,000,000,000,000,000,000 | 44 | Bluetooth: fix use-after-free error in lock_sock_nested()
use-after-free error in lock_sock_nested is reported:
[ 179.140137][ T3731] =====================================================
[ 179.142675][ T3731] BUG: KMSAN: use-after-free in lock_sock_nested+0x280/0x2c0
[ 179.145494][ T3731] CPU: 4 PID: 3731 Comm: k... |
_libssh2_channel_open(LIBSSH2_SESSION * session, const char *channel_type,
uint32_t channel_type_len,
uint32_t window_size,
uint32_t packet_size,
const unsigned char *message,
size_t message_len)
{
static c... | 0 | [
"CWE-787"
] | libssh2 | dc109a7f518757741590bb993c0c8412928ccec2 | 307,649,734,062,063,050,000,000,000,000,000,000,000 | 217 | Security fixes (#315)
* Bounds checks
Fixes for CVEs
https://www.libssh2.org/CVE-2019-3863.html
https://www.libssh2.org/CVE-2019-3856.html
* Packet length bounds check
CVE
https://www.libssh2.org/CVE-2019-3855.html
* Response length check
CVE
https://www.libssh2.org/CVE-2019-3859.html
* Bounds ch... |
fmt_timeframe(time_t t)
{
char *buf;
static char tfbuf[TF_BUFS][TF_LEN]; /* ring buffer */
static int idx = 0;
unsigned int sec, min, hrs, day;
unsigned long long week;
buf = tfbuf[idx++];
if (idx == TF_BUFS)
idx = 0;
week = t;
sec = week % 60;
week /= 60;
min = week % 60;
week /= 60;
hrs = week %... | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 261,307,252,139,750,300,000,000,000,000,000,000,000 | 32 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
static void rtps_util_add_typeobject(proto_tree *tree, packet_info * pinfo,
tvbuff_t * tvb, gint offset, const guint encoding, guint32 size,
type_mapping * type_mapping_object ) {
proto_tree * typeobject_tree;
gint offset_tmp = 0;
guint32 member_id = 0, member_length = 0;
guint32 long_number;
... | 0 | [
"CWE-401"
] | wireshark | 33e63d19e5496c151bad69f65cdbc7cba2b4c211 | 90,004,645,468,533,610,000,000,000,000,000,000,000 | 37 | RTPS: Fixup our coherent set map.
coherent_set_tracking.coherent_set_registry_map uses a struct as a key,
but the hash and comparison routines treat keys as a sequence of bytes.
Make sure every key byte is initialized. Fixes #16994.
Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead
of creating ... |
void mvcg_box_del(GF_Box *s)
{
GF_MultiviewGroupBox *ptr = (GF_MultiviewGroupBox *) s;
if (ptr->entries) gf_free(ptr->entries);
gf_free(ptr); | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 118,803,996,817,548,200,000,000,000,000,000,000,000 | 6 | fixed #1587 |
errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
{
va_list args;
callbacks++;
if (noout)
return;
va_start(args, msg);
fprintf(stdout, "SAX.error: ");
vfprintf(stdout, msg, args);
va_end(args);
} | 0 | [
"CWE-416"
] | libxml2 | 1358d157d0bd83be1dfe356a69213df9fac0b539 | 324,029,383,744,799,500,000,000,000,000,000,000,000 | 12 | Fix use-after-free with `xmllint --html --push`
Call htmlCtxtUseOptions to make sure that names aren't stored in
dictionaries.
Note that this issue only affects xmllint using the HTML push parser.
Fixes #230. |
static void do_metadata(struct work_struct *work)
{
struct mdata_req *req = container_of(work, struct mdata_req, work);
req->result = dm_io(req->io_req, 1, req->where, NULL);
} | 0 | [
"CWE-200",
"CWE-264"
] | linux | e9c6a182649f4259db704ae15a91ac820e63b0ca | 150,183,172,233,166,960,000,000,000,000,000,000,000 | 6 | dm snapshot: fix data corruption
This patch fixes a particular type of data corruption that has been
encountered when loading a snapshot's metadata from disk.
When we allocate a new chunk in persistent_prepare, we increment
ps->next_free and we make sure that it doesn't point to a metadata area
by further incrementin... |
virtual ~ErrorReport() { } | 0 | [
"CWE-59"
] | passenger | 9dda49f4a3ebe9bafc48da1bd45799f30ce19566 | 308,838,847,493,327,250,000,000,000,000,000,000,000 | 1 | Fixed a problem with graceful web server restarts.
This problem was introduced in 4.0.6 during the attempt to fix issue #910. |
static int parse_file_extra_htime(struct archive_read* a,
struct archive_entry* e, struct rar5* rar, ssize_t* extra_data_size)
{
char unix_time = 0;
size_t flags = 0;
size_t value_len;
enum HTIME_FLAGS {
IS_UNIX = 0x01,
HAS_MTIME = 0x02,
HAS_CTIME = 0x04,
HAS_ATIME = 0x08,
HAS_UNIX_... | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 52,190,365,830,715,980,000,000,000,000,000,000,000 | 52 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
static int nl80211_start_sched_scan(struct sk_buff *skb,
struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_sched_scan_request *sched_scan_req;
bool want_multi;
i... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 250,810,292,583,353,420,000,000,000,000,000,000,000 | 54 | nl80211: validate beacon head
We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that thi... |
static unsigned int psk_server_callback(SSL *ssl, const char *identity,
unsigned char *psk,
unsigned int max_psk_len)
{
unsigned int psk_len = 0;
fr_tls_server_conf_t *conf;
REQUEST *request;
conf = (fr_tls_server_conf_t *)SSL_get_ex_data(ssl,
FR_TLS_EX_INDEX_CONF);
if (!conf) return 0;
r... | 0 | [
"CWE-295"
] | freeradius-server | 874b39451702338389260edbfc52b381b20352ec | 243,901,843,746,918,670,000,000,000,000,000,000,000 | 76 | Set X509_V_FLAG_CRL_CHECK_ALL |
object_manager_get_proxy_type_func (GDBusObjectManagerClient *manager,
const gchar *object_path,
const gchar *interface_name,
gpointer user_data)
{
if (interface_name == NULL)
return G_TYPE_DBUS_OBJECT_PROXY;
if (g_str_equal (interface_name, BLUEZ_... | 0 | [] | gnome-bluetooth | 6b5086d42ea64d46277f3c93b43984f331d12f89 | 196,570,304,363,253,900,000,000,000,000,000,000,000 | 15 | lib: Fix Discoverable being reset when turned off
Work-around race in bluetoothd which would reset the discoverable
flag if a timeout change was requested before discoverable finished
being set to off:
See https://bugzilla.redhat.com/show_bug.cgi?id=1602985 |
static char *TraceSVGClippath(const unsigned char *blob,size_t length,
const size_t columns,const size_t rows)
{
char
*path,
*message;
MagickBooleanType
in_subpath;
PointInfo
first[3],
last[3],
point[3];
register ssize_t
i;
ssize_t
knot_count,
selector,
x,
y;
... | 0 | [
"CWE-476"
] | ImageMagick | 2c75f301d9ac84f91071393b02d8c88c8341c91c | 121,826,107,925,767,960,000,000,000,000,000,000,000 | 168 | https://github.com/ImageMagick/ImageMagick/issues/1225 |
qb_ipc_us_fc_get(struct qb_ipc_one_way *one_way)
{
struct ipc_us_control *ctl =
(struct ipc_us_control *)one_way->u.us.shared_data;
return qb_atomic_int_get(&ctl->flow_control);
} | 0 | [
"CWE-59"
] | libqb | e322e98dc264bc5911d6fe1d371e55ac9f95a71e | 114,258,581,720,463,730,000,000,000,000,000,000,000 | 7 | ipc: use O_EXCL on SHM files, and randomize the names
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> |
bool __weak is_swbp_insn(uprobe_opcode_t *insn)
{
return *insn == UPROBE_SWBP_INSN;
} | 0 | [
"CWE-416"
] | linux | 355627f518978b5167256d27492fe0b343aaf2f2 | 80,568,507,368,572,340,000,000,000,000,000,000,000 | 4 | mm, uprobes: fix multiple free of ->uprobes_state.xol_area
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new error p... |
static int map_search_self_req(struct ldb_request **req,
struct map_context *ac,
struct ldb_dn *dn)
{
/* attrs[] is returned from this function in
* ac->search_req->op.search.attrs, so it must be static, as
* otherwise the compiler can put it on the stack */
static const char * const attrs[] = { IS_MAPPED... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 117,596,333,435,542,920,000,000,000,000,000,000,000 | 25 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static void ov518_mode_init_regs(struct sd *sd)
{
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
int hsegs, vsegs, packet_size;
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt... | 1 | [
"CWE-476"
] | linux | 998912346c0da53a6dbb71fab3a138586b596b30 | 263,247,290,990,414,300,000,000,000,000,000,000,000 | 133 | media: ov519: add missing endpoint sanity checks
Make sure to check that we have at least one endpoint before accessing
the endpoint array to avoid dereferencing a NULL-pointer on stream
start.
Note that these sanity checks are not redundant as the driver is mixing
looking up altsettings by index and by number, which... |
e_ews_connection_dup_password (EEwsConnection *cnc)
{
const gchar *protected;
gchar *duplicate;
g_return_val_if_fail (E_IS_EWS_CONNECTION (cnc), NULL);
g_mutex_lock (&cnc->priv->property_lock);
protected = e_ews_connection_get_password (cnc);
duplicate = g_strdup (protected);
g_mutex_unlock (&cnc->priv->prop... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 19,404,677,493,949,463,000,000,000,000,000,000,000 | 16 | 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 |
static char inf() { return max(); }
static char cut(const double val) { | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 143,703,002,556,489,500,000,000,000,000,000,000,000 | 2 | Fix other issues in 'CImg<T>::load_bmp()'. |
_bson_iter_find_with_len (bson_iter_t *iter, /* INOUT */
const char *key, /* IN */
int keylen) /* IN */
{
const char *ikey;
if (keylen == 0) {
return false;
}
if (keylen < 0) {
keylen = (int) strlen (key);
}
while (bson_iter_n... | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 19,965,476,079,995,128,000,000,000,000,000,000,000 | 24 | CDRIVER-2269 Check for zero string length in codewscope |
static inline void gen_scas(DisasContext *s, TCGMemOp ot)
{
gen_string_movl_A0_EDI(s);
gen_op_ld_v(s, ot, cpu_T1, cpu_A0);
gen_op(s, OP_CMPL, ot, R_EAX);
gen_op_movl_T0_Dshift(ot);
gen_op_add_reg_T0(s->aflag, R_EDI);
} | 0 | [
"CWE-94"
] | qemu | 30663fd26c0307e414622c7a8607fbc04f92ec14 | 89,728,972,205,163,870,000,000,000,000,000,000,000 | 8 | 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.... |
struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, bool is_sync)
{
return bic->bfqq[is_sync]; | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 138,435,206,045,196,640,000,000,000,000,000,000,000 | 4 | 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... |
NOEXPORT void log_queue(SERVICE_OPTIONS *opt,
int level, char *stamp, char *id, char *text) {
struct LIST *tmp;
/* make a new element */
tmp=str_alloc_detached(sizeof(struct LIST));
tmp->next=NULL;
tmp->opt=opt;
tmp->level=level;
tmp->stamp=stamp;
str_detach(tmp->stamp);
tmp... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 123,084,045,396,320,750,000,000,000,000,000,000,000 | 26 | stunnel-5.57 |
static void reset_studio_dc_predictors(MpegEncContext *s)
{
/* Reset DC Predictors */
s->last_dc[0] =
s->last_dc[1] =
s->last_dc[2] = 1 << (s->avctx->bits_per_raw_sample + s->dct_precision + s->intra_dc_precision - 1);
} | 0 | [
"CWE-476"
] | FFmpeg | 2aa9047486dbff12d9e040f917e5f799ed2fd78b | 219,756,964,159,392,640,000,000,000,000,000,000,000 | 7 | avcodec/mpeg4videodec: Check read profile before setting it
Fixes: null pointer dereference
Fixes: ffmpeg_crash_7.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
void nft_unregister_set(struct nft_set_ops *ops)
{
nfnl_lock(NFNL_SUBSYS_NFTABLES);
list_del_rcu(&ops->list);
nfnl_unlock(NFNL_SUBSYS_NFTABLES);
} | 0 | [
"CWE-19"
] | nf | a2f18db0c68fec96631c10cad9384c196e9008ac | 322,670,933,505,888,000,000,000,000,000,000,000,000 | 6 | netfilter: nf_tables: fix flush ruleset chain dependencies
Jumping between chains doesn't mix well with flush ruleset. Rules
from a different chain and set elements may still refer to us.
[ 353.373791] ------------[ cut here ]------------
[ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[ 353.373896... |
void MemoryInfo(MemoryTracker* tracker) const override {
tracker->TrackField("paths", paths);
} | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 131,111,972,951,043,350,000,000,000,000,000,000,000 | 3 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
netdev_features_t features)
{
struct sk_buff *segs = ERR_PTR(-EINVAL);
struct ipv6hdr *ipv6h;
const struct net_offload *ops;
int proto;
struct frag_hdr *fptr;
unsigned int unfrag_ip6hlen;
unsigned int payload_len;
u8 *prevhdr;
int offset = 0;
bool ... | 1 | [
"CWE-125"
] | linux | 2423496af35d94a87156b063ea5cedffc10a70a1 | 223,392,989,178,596,400,000,000,000,000,000,000,000 | 76 | 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... |
static StringTable* Pe_r_bin_pe_parse_string_table(RBinPEObj* pe, PE_DWord* curAddr) {
StringTable* stringTable = calloc (1, sizeof (*stringTable));
if (!stringTable) {
pe_printf ("Warning: calloc (stringTable)\n");
return NULL;
}
PE_DWord startAddr = *curAddr;
if ((stringTable->wLength = r_buf_read_le16_at (... | 0 | [
"CWE-400",
"CWE-703"
] | radare2 | 634b886e84a5c568d243e744becc6b3223e089cf | 35,169,453,024,397,190,000,000,000,000,000,000,000 | 78 | Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4= |
error_response(struct module_qstate* qstate, int id, int rcode)
{
verbose(VERB_QUERY, "return error response %s",
sldns_lookup_by_id(sldns_rcodes, rcode)?
sldns_lookup_by_id(sldns_rcodes, rcode)->name:"??");
qstate->return_rcode = rcode;
qstate->return_msg = NULL;
qstate->ext_state[id] = module_finished;
retu... | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 294,814,609,239,378,230,000,000,000,000,000,000,000 | 10 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
void Item_param::set_ignore()
{
m_is_settable_routine_parameter= false;
state= IGNORE_VALUE;
fixed= true;
null_value= true;
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 288,447,409,909,824,300,000,000,000,000,000,000,000 | 7 | 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. |
kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which,
krb5_data *realm, krb5_data *entity, int nentities)
{
char **princ;
int length;
int i;
if (kssl_ctx == NULL || entity == NULL) return KSSL_CTX_ERR;
switch (which)
{
case KSSL_CLIENT: princ = &kssl_ctx->client_princ; brea... | 0 | [
"CWE-20"
] | openssl | cca1cd9a3447dd067503e4a85ebd1679ee78a48e | 187,845,533,456,303,700,000,000,000,000,000,000,000 | 49 | Submitted by: Tomas Hoger <thoger@redhat.com>
Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL
could be crashed if the relevant tables were not present (e.g. chrooted). |
int luaD_poscall (lua_State *L, StkId firstResult) {
StkId res;
int wanted, i;
CallInfo *ci;
if (L->hookmask & LUA_MASKRET)
firstResult = callrethooks(L, firstResult);
ci = L->ci--;
res = ci->func; /* res == final position of 1st result */
wanted = ci->nresults;
L->base = (ci - 1)->base; /* restor... | 0 | [
"CWE-200",
"CWE-17"
] | redis | fdf9d455098f54f7666c702ae464e6ea21e25411 | 308,008,720,281,924,650,000,000,000,000,000,000,000 | 19 | disable loading lua bytecode |
config_setvar(
config_tree *ptree
)
{
setvar_node *my_node;
size_t varlen, vallen, octets;
char * str;
str = NULL;
my_node = HEAD_PFIFO(ptree->setvar);
for (; my_node != NULL; my_node = my_node->link) {
varlen = strlen(my_node->var);
vallen = strlen(my_node->val);
octets = varlen + vallen + 1 + 1;
str ... | 0 | [
"CWE-20"
] | ntp | 52e977d79a0c4ace997e5c74af429844da2f27be | 19,546,539,675,983,940,000,000,000,000,000,000,000 | 24 | [Bug 1773] openssl not detected during ./configure.
[Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL. |
static void FVSelectColor(FontView *fv, uint32 col, int merge) {
int i, doit;
uint32 sccol;
SplineChar **glyphs = fv->b.sf->glyphs;
for ( i=0; i<fv->b.map->enccount; ++i ) {
int gid = fv->b.map->map[i];
sccol = ( gid==-1 || glyphs[gid]==NULL ) ? COLOR_DEFAULT : glyphs[gid]->color;
doit = sccol==col... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 66,749,024,580,083,870,000,000,000,000,000,000,000 | 13 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static void set_lwt_redirect(struct rtable *rth)
{
if (lwtunnel_output_redirect(rth->dst.lwtstate)) {
rth->dst.lwtstate->orig_output = rth->dst.output;
rth->dst.output = lwtunnel_output;
}
if (lwtunnel_input_redirect(rth->dst.lwtstate)) {
rth->dst.lwtstate->orig_input = rth->dst.input;
rth->dst.input = lwtu... | 0 | [
"CWE-476"
] | linux | bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205 | 282,817,556,602,368,650,000,000,000,000,000,000,000 | 12 | net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set
Syzkaller hit 'general protection fault in fib_dump_info' bug on
commit 4.13-rc5..
Guilty file: net/ipv4/fib_semantics.c
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Modules linked... |
xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
int i, nb;
xmlHashEntryPtr iter;
xmlHashEntryPtr next;
if (table == NULL)
return;
if (f == NULL)
return;
if (table->table) {
for(i = 0; i < table->size; i++) {
if (table->table[i].valid == 0)
continue;
i... | 0 | [
"CWE-399"
] | libxml2 | 8973d58b7498fa5100a876815476b81fd1a2412a | 133,232,396,310,066,080,000,000,000,000,000,000,000 | 36 | Add hash randomization to hash and dict structures
Following http://www.ocert.org/advisories/ocert-2011-003.html
it seems that having hash randomization might be a good idea
when using XML with untrusted data
* configure.in: lookup for rand, srand and time
* dict.c: add randomization to dictionaries hash tables
* hash... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.