func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static inline int unuse_pud_range(struct vm_area_struct *vma, pgd_t *pgd,
unsigned long addr, unsigned long end,
swp_entry_t entry, struct page *page)
{
pud_t *pud;
unsigned long next;
int ret;
pud = pud_offset(pgd, addr);
do {
next = pud_addr_end(addr, end);
if (pud_none_or_clear_bad(pud))
continu... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 12,407,693,297,817,377,000,000,000,000,000,000,000 | 19 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
hstore_exists_all(PG_FUNCTION_ARGS)
{
HStore *hs = PG_GETARG_HS(0);
ArrayType *keys = PG_GETARG_ARRAYTYPE_P(1);
int nkeys;
Pairs *key_pairs = hstoreArrayToPairs(keys, &nkeys);
int i;
int lowbound = 0;
bool res = true;
/*
* we exploit the fact that the pairs list is already sorted into strictly
... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 40,659,721,171,364,834,000,000,000,000,000,000,000 | 30 | 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... |
NTSTATUS dsdb_ldb_err_to_ntstatus(int err)
{
switch (err) {
case LDB_SUCCESS:
return NT_STATUS_OK;
case LDB_ERR_PROTOCOL_ERROR:
return NT_STATUS_DEVICE_PROTOCOL_ERROR;
case LDB_ERR_TIME_LIMIT_EXCEEDED:
return NT_STATUS_IO_TIMEOUT;
case LDB_ERR_SIZE_LIMIT_EXCEEDED:
return NT_STATUS_BUFFER_TOO_SMALL;
ca... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 1,956,699,816,226,352,600,000,000,000,000,000,000 | 74 | 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... |
void sanity_check_mid(clump_t *cp)
{
clump_t *parent;
while ((parent = cp->parent) != NULL)
{
if (parent->left == cp)
{
if (parent->right == cp)
broken_splay();
}
else if (parent->right != cp)
broken_splay();
cp = parent;
}... | 0 | [
"CWE-190"
] | ghostpdl | cfde94be1d4286bc47633c6e6eaf4e659bd78066 | 285,581,014,106,089,400,000,000,000,000,000,000,000 | 18 | 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. |
void setOutputFrameBuffer(FrameBuffer& frameBuffer, int pixelType,
Array2D<unsigned int>& uData, Array2D<float>& fData,
Array2D<half>& hData, int width)
{
switch (pixelType)
{
case 0:
frameBuffer.insert ("UINT",
... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 338,603,778,696,913,070,000,000,000,000,000,000,000 | 29 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
mml_set_min_max(MinMaxLen* l, OnigLen min, OnigLen max)
{
l->min = min;
l->max = max;
} | 0 | [
"CWE-787"
] | oniguruma | cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0 | 84,244,463,743,737,780,000,000,000,000,000,000,000 | 5 | #207: Out-of-bounds write |
struct page *get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid)
{
return __get_node_page(sbi, nid, NULL, 0);
} | 0 | [
"CWE-200",
"CWE-362"
] | linux | 30a61ddf8117c26ac5b295e1233eaa9629a94ca3 | 83,275,005,163,180,380,000,000,000,000,000,000,000 | 4 | f2fs: fix race condition in between free nid allocator/initializer
In below concurrent case, allocated nid can be loaded into free nid cache
and be allocated again.
Thread A Thread B
- f2fs_create
- f2fs_new_inode
- alloc_nid
- __insert_nid_to_list(ALLOC_NID_LIST)
- f2fs_balance_fs_bg
- build_free... |
static int emulator_set_msr(struct x86_emulate_ctxt *ctxt,
u32 msr_index, u64 data)
{
return kvm_set_msr(emul_to_vcpu(ctxt), msr_index, data);
} | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 140,427,594,918,818,300,000,000,000,000,000,000,000 | 5 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
const Magick::Options *Magick::Image::constOptions(void) const
{
return(_imgRef->options());
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 339,443,737,281,851,560,000,000,000,000,000,000,000 | 4 | Added missing return to avoid use after free. |
zzip_disk_feof(ZZIP_DISK_FILE * file)
{
if (! file || ! file->avail)
return EOF;
return 0;
} | 0 | [] | zziplib | 72ec933663f738d8e166979aa7fd5590b2104a07 | 196,769,746,661,925,070,000,000,000,000,000,000,000 | 6 | need to check on endbuf for stored files #15 |
int af9005_read_tuner_registers(struct dvb_usb_device *d, u16 reg, u8 addr,
u8 * values, int len)
{
/* don't let the name of this function mislead you: it's just used
as an interface from the firmware to the i2c bus. The actual
i2c addresses are contained in the data */
int ret, i;
u8 temp, buf[2];
buf... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 2289adbfa559050d2a38bcd9caac1c18b800e928 | 229,433,148,104,671,150,000,000,000,000,000,000,000 | 52 | media: usb: fix memory leak in af9005_identify_state
In af9005_identify_state when returning -EIO the allocated buffer should
be released. Replace the "return -EIO" with assignment into ret and move
deb_info() under a check.
Fixes: af4e067e1dcf ("V4L/DVB (5625): Add support for the AF9005 demodulator from Afatech")
S... |
nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
struct nfsd_readargs *args)
{
unsigned int len;
int v;
p = decode_fh(p, &args->fh);
if (!p)
return 0;
args->offset = ntohl(*p++);
len = args->count = ntohl(*p++);
p++; /* totalcount - unused */
len = min_t(unsigned int, len, NFSSVC_MAXBLK... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 13bf9fbff0e5e099e2b6f003a0ab8ae145436309 | 110,511,661,303,552,500,000,000,000,000,000,000,000 | 30 | nfsd: stricter decoding of write-like NFSv2/v3 ops
The NFSv2/v3 code does not systematically check whether we decode past
the end of the buffer. This generally appears to be harmless, but there
are a few places where we do arithmetic on the pointers involved and
don't account for the possibility that a length could b... |
SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, mode_t, mode)
{
struct path path;
struct inode *inode;
int error;
struct iattr newattrs;
error = user_path_at(dfd, filename, LOOKUP_FOLLOW, &path);
if (error)
goto out;
inode = path.dentry->d_inode;
error = mnt_want_write(path.mnt);
if (err... | 1 | [
"CWE-732"
] | linux-stable | e57712ebebbb9db7d8dcef216437b3171ddcf115 | 134,281,698,522,381,510,000,000,000,000,000,000,000 | 32 | merge fchmod() and fchmodat() guts, kill ancient broken kludge
The kludge in question is undocumented and doesn't work for 32bit
binaries on amd64, sparc64 and s390. Passing (mode_t)-1 as
mode had (since 0.99.14v and contrary to behaviour of any
other Unix, prescriptions of POSIX, SuS and our own manpages)
was kinda-... |
struct razer_report razer_chroma_mouse_extended_matrix_effect_breathing_dual(unsigned char variable_storage, unsigned char led_id, struct razer_rgb *rgb1, struct razer_rgb *rgb2)
{
struct razer_report report = razer_chroma_mouse_extended_matrix_effect_base(0x0A, variable_storage, led_id, 0x03);
report.argument... | 0 | [
"CWE-787"
] | openrazer | 7e8a04feb378a679f1bcdcae079a5100cc45663b | 92,808,105,763,325,580,000,000,000,000,000,000,000 | 16 | Fix oob memcpy in matrix_custom_frame methods
Adjust row_length if it exeeds the arguments array |
static int ethtool_set_msglevel(struct net_device *dev, char __user *useraddr)
{
struct ethtool_value edata;
if (!dev->ethtool_ops->set_msglevel)
return -EOPNOTSUPP;
if (copy_from_user(&edata, useraddr, sizeof(edata)))
return -EFAULT;
dev->ethtool_ops->set_msglevel(dev, edata.data);
return 0;
} | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 144,188,946,033,793,020,000,000,000,000,000,000,000 | 13 | [IPv4/IPv6]: UFO Scatter-gather approach
Attached is kernel patch for UDP Fragmentation Offload (UFO) feature.
1. This patch incorporate the review comments by Jeff Garzik.
2. Renamed USO as UFO (UDP Fragmentation Offload)
3. udp sendfile support with UFO
This patches uses scatter-gather feature of skb to generate l... |
PHP_METHOD(domimplementation, createDocumentType)
{
xmlDtd *doctype;
int ret;
size_t name_len = 0, publicid_len = 0, systemid_len = 0;
char *name = NULL, *publicid = NULL, *systemid = NULL;
xmlChar *pch1 = NULL, *pch2 = NULL, *localname = NULL;
xmlURIPtr uri;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sss", &... | 0 | [] | php-src | f15f8fc573eb38c3c73e23e0930063a6f6409ed4 | 23,605,237,004,828,320,000,000,000,000,000,000,000 | 61 | Fix #79971: special character is breaking the path in xml function
The libxml based XML functions accepting a filename actually accept
URIs with possibly percent-encoded characters. Percent-encoded NUL
bytes lead to truncation, like non-encoded NUL bytes would. We catch
those, and let the functions fail with a respe... |
PHP_METHOD(Phar, addFromString)
{
char *localname, *cont_str;
int localname_len, cont_len;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ps", &localname, &localname_len, &cont_str, &cont_len) == FAILURE) {
return;
}
phar_add_file(&(phar_obj->arc.archive), localname, localname_l... | 0 | [
"CWE-416"
] | php-src | d144590d38fa321b46b8e199c754006318985c84 | 138,239,920,922,169,550,000,000,000,000,000,000,000 | 13 | Fix bug #72321 - use efree() for emalloc allocation |
Item_temporal_literal(THD *thd, uint dec_arg):
Item_literal(thd)
{
collation.set(&my_charset_numeric, DERIVATION_NUMERIC, MY_REPERTOIRE_ASCII);
decimals= dec_arg;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 143,425,054,412,284,120,000,000,000,000,000,000,000 | 6 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
UntrustedCacheMalloc *UntrustedCacheMalloc::Instance() {
static TrustedSpinLock lock(/*is_recursive=*/false);
static UntrustedCacheMalloc *instance = nullptr;
if (instance == nullptr) {
LockGuard guard(&lock);
if (instance == nullptr) {
instance = new UntrustedCacheMalloc();
}
}
return insta... | 0 | [
"CWE-200",
"CWE-668"
] | asylo | a47ef55db2337d29de19c50cd29b0deb2871d31c | 72,324,282,786,625,940,000,000,000,000,000,000,000 | 11 | Fix vulnerability in UntrustedCacheMalloc
The pointer array is stored in untrusted memory, so we cannot trust the
value even after validation. We should validate the pointer is pointing
to untrusted memory after it's stored inside the enclave.
PiperOrigin-RevId: 358474391
Change-Id: I63cf6c251bdaf1b491dbf06cc0dcf77f7... |
void PM_io_parser<PMDEC>::print_hedge(Halfedge_handle e) const
{ // syntax: index { opposite, prev, next, vertex, face, mark }
out << index(e) << " { "
<< index(twin(e)) << ", "
<< index(previous(e)) << ", " << index(next(e)) << ", "
<< index(target(e)) << ", " << index(face(e)) << ", "
<< m... | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 292,745,184,185,678,370,000,000,000,000,000,000,000 | 8 | Fix Nef_2 and Nef_S2 IO |
hfs_load_attrs(TSK_FS_FILE * fs_file)
{
TSK_FS_INFO *fs;
HFS_INFO *hfs;
TSK_FS_ATTR *fs_attr;
TSK_FS_ATTR_RUN *attr_run;
hfs_fork *forkx;
unsigned char resource_fork_has_contents = FALSE;
unsigned char compression_flag = FALSE;
unsigned char isCompressed = FALSE;
unsigned char compDa... | 0 | [
"CWE-190",
"CWE-284"
] | sleuthkit | 114cd3d0aac8bd1aeaf4b33840feb0163d342d5b | 273,002,451,769,683,870,000,000,000,000,000,000,000 | 362 | hfs: fix keylen check in hfs_cat_traverse()
If key->key_len is 65535, calculating "uint16_t keylen' would
cause an overflow:
uint16_t keylen;
...
keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len)
so the code bypasses the sanity check "if (keylen > nodesize)"
which results in crash later:
./too... |
static int convertCompoundSelectToSubquery(Walker *pWalker, Select *p){
int i;
Select *pNew;
Select *pX;
sqlite3 *db;
struct ExprList_item *a;
SrcList *pNewSrc;
Parse *pParse;
Token dummy;
if( p->pPrior==0 ) return WRC_Continue;
if( p->pOrderBy==0 ) return WRC_Continue;
for(pX=p; pX && (pX->op==T... | 0 | [
"CWE-476"
] | sqlite | 396afe6f6aa90a31303c183e11b2b2d4b7956b35 | 327,110,532,278,635,440,000,000,000,000,000,000,000 | 51 | Continue to back away from the LEFT JOIN optimization of check-in [41c27bc0ff1d3135]
by disallowing query flattening if the outer query is DISTINCT. Without this fix,
if an index scan is run on the table within the view on the right-hand side of the
LEFT JOIN, stale result registers might be accessed yielding incorrec... |
void b43_dma_rx(struct b43_dmaring *ring)
{
const struct b43_dma_ops *ops = ring->ops;
int slot, current_slot;
int used_slots = 0;
B43_WARN_ON(ring->tx);
current_slot = ops->get_current_rxslot(ring);
B43_WARN_ON(!(current_slot >= 0 && current_slot < ring->nr_slots));
slot = ring->current_slot;
for (; slot != ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 81,372,487,397,003,250,000,000,000,000,000,000,000 | 18 | 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 |
void Magick::Image::repage()
{
modifyImage();
options()->page(Geometry());
image()->page.width = 0;
image()->page.height = 0;
image()->page.x = 0;
image()->page.y = 0;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 163,562,656,584,768,990,000,000,000,000,000,000,000 | 9 | Added missing return to avoid use after free. |
CloseNotifyConnector(EventBase* evb, const SocketAddress& addr) {
evb_ = evb;
ssl_ = AsyncSSLSocket::newSocket(std::make_shared<SSLContext>(), evb_);
ssl_->connect(this, addr);
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 338,661,188,210,467,700,000,000,000,000,000,000,000 | 5 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
int on_header_value(const char* at, size_t length) {
int rv = TrackHeader(length);
if (rv != 0) {
return rv;
}
if (num_values_ != num_fields_) {
// start of new header value
num_values_++;
values_[num_values_ - 1].Reset();
}
CHECK_LT(num_values_, arraysize(values_));
... | 0 | [
"CWE-400"
] | node | 753f3b247ae2d24fee0b3f48b9ec3a5c308f0650 | 339,732,105,580,016,300,000,000,000,000,000,000,000 | 19 | http: add requestTimeout
This commits introduces a new http.Server option called requestTimeout
with a default value in milliseconds of 0.
If requestTimeout is set to a positive value, the server will start a new
timer set to expire in requestTimeout milliseconds when a new connection
is established. The timer is als... |
static void loongarch_cpu_set_pc(CPUState *cs, vaddr value)
{
LoongArchCPU *cpu = LOONGARCH_CPU(cs);
CPULoongArchState *env = &cpu->env;
env->pc = value;
} | 0 | [] | qemu | 3517fb726741c109cae7995f9ea46f0cab6187d6 | 24,210,562,096,257,856,000,000,000,000,000,000,000 | 7 | target/loongarch: Clean up tlb when cpu reset
We should make sure that tlb is clean when cpu reset.
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20220705070950.2364243-1-gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson... |
static int kvm_vm_ioctl_enable_cap_generic(struct kvm *kvm,
struct kvm_enable_cap *cap)
{
switch (cap->cap) {
#ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT
case KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2: {
u64 allowed_options = KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE;
if (cap->args[0] & KVM_DIRTY_LOG_MANUAL_PROTEC... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 311,621,621,879,060,400,000,000,000,000,000,000,000 | 21 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
dissect_kafka_bytes_new(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int hf_item, int offset, int *p_bytes_offset, int *p_bytes_length, gboolean *p_invalid)
{
gint64 val;
guint len;
proto_item *pi;
*p_invalid = FALSE;
len = tvb_get_varint(tvb, offset, 5, &val, ENC_VARINT_ZIGZA... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 303,359,487,264,570,330,000,000,000,000,000,000,000 | 40 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
static void free_pg_vec(char **pg_vec, unsigned int order, unsigned int len)
{
int i;
for (i = 0; i < len; i++) {
if (likely(pg_vec[i]))
free_pages((unsigned long) pg_vec[i], order);
}
kfree(pg_vec);
} | 0 | [
"CWE-909"
] | linux-2.6 | 67286640f638f5ad41a946b9a3dc75327950248f | 91,478,956,632,012,930,000,000,000,000,000,000,000 | 10 | net: packet: fix information leak to userland
packet_getname_spkt() doesn't initialize all members of sa_data field of
sockaddr struct if strlen(dev->name) < 13. This structure is then copied
to userland. It leads to leaking of contents of kernel stack memory.
We have to fully fill sa_data with strncpy() instead of ... |
R_API RBinJavaInterfaceInfo *r_bin_java_interface_new(RBinJavaObj *bin, const ut8 *buffer, ut64 sz) {
RBinJavaInterfaceInfo *ifobj = NULL;
ifobj = R_NEW0 (RBinJavaInterfaceInfo);
IFDBG eprintf("Parsing RBinJavaInterfaceInfo\n");
if (ifobj) {
if (buffer) {
ifobj->class_info_idx = R_BIN_JAVA_USHORT (buffer, 0);
... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 140,916,966,928,743,880,000,000,000,000,000,000,000 | 21 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
std::list<HeaderEntryImpl>::iterator begin() { return headers_.begin(); } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 1,637,523,296,235,101,500,000,000,000,000,000,000 | 1 | 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... |
DEFINE_TEST(test_read_format_rar5_multiple_files)
{
const int DATA_SIZE = 4096;
uint8_t buff[4096];
PROLOGUE("test_read_format_rar5_multiple_files.rar");
/* There should be 4 files inside this test file. Check for their
* existence, and also check the contents of those test files. */
assertA(0 == archive_read... | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 200,738,182,299,243,070,000,000,000,000,000,000,000 | 39 | 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... |
camel_ews_store_set_ooo_alert_state (CamelEwsStore *ews_store,
CamelEwsStoreOooAlertState state)
{
g_return_if_fail (CAMEL_IS_EWS_STORE (ews_store));
if (ews_store->priv->ooo_alert_state == state)
return;
ews_store->priv->ooo_alert_state = state;
g_object_notify (G_OBJECT (e... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 229,565,503,381,751,070,000,000,000,000,000,000,000 | 11 | 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 |
CreateStatistics(CreateStatsStmt *stmt)
{
int16 attnums[STATS_MAX_DIMENSIONS];
int numcols = 0;
char *namestr;
NameData stxname;
Oid statoid;
Oid namespaceId;
Oid stxowner = GetUserId();
HeapTuple htup;
Datum values[Natts_pg_statistic_ext];
bool nulls[Natts_pg_statistic_ext];
int2vector *stxkey... | 1 | [
"CWE-94"
] | postgres | 5919bb5a5989cda232ac3d1f8b9d90f337be2077 | 128,002,159,320,184,500,000,000,000,000,000,000,000 | 320 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
variable_completion_function (text, state)
const char *text;
int state;
{
static char **varlist = (char **)NULL;
static int varlist_index;
static char *varname = (char *)NULL;
static int namelen;
static int first_char, first_char_loc;
if (!state)
{
if (varname)
free (varname);
f... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 282,996,513,761,983,240,000,000,000,000,000,000,000 | 59 | Bash-4.4 patch 7 |
Chapters::Atom::Atom() {} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 227,285,645,897,224,930,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 |
static int wcd9335_enable_master_bias(struct wcd9335_codec *wcd)
{
wcd->master_bias_users++;
if (wcd->master_bias_users == 1) {
regmap_update_bits(wcd->regmap, WCD9335_ANA_BIAS,
WCD9335_ANA_BIAS_EN_MASK,
WCD9335_ANA_BIAS_ENABLE);
regmap_update_bits(wcd->regmap, WCD9335_ANA_BIAS,
WCD9335_ANA_BIAS_PR... | 0 | [] | sound | a54988113985ca22e414e132054f234fc8a92604 | 286,901,482,147,446,700,000,000,000,000,000,000,000 | 25 | wcd9335: fix a incorrect use of kstrndup()
In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup().
However, according to doc: "Note: Use kmemdup_nul() instead if the size
is known exactly." So we should use kmemdup_nul() here instead of
kstrndup().
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
... |
string t_cpp_generator::type_to_enum(t_type* type) {
type = get_true_type(type);
if (type->is_base_type()) {
t_base_type::t_base tbase = ((t_base_type*)type)->get_base();
switch (tbase) {
case t_base_type::TYPE_VOID:
throw "NO T_VOID CONSTRUCT";
case t_base_type::TYPE_STRING:
return "::... | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 278,940,374,597,817,400,000,000,000,000,000,000,000 | 39 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
void tcp_init_buffer_space(struct sock *sk)
{
int tcp_app_win = sock_net(sk)->ipv4.sysctl_tcp_app_win;
struct tcp_sock *tp = tcp_sk(sk);
int maxwin;
if (!(sk->sk_userlocks & SOCK_SNDBUF_LOCK))
tcp_sndbuf_expand(sk);
tp->rcvq_space.space = min_t(u32, tp->rcv_wnd, TCP_INIT_CWND * tp->advmss);
tcp_mstamp_refresh... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 213,482,022,411,514,400,000,000,000,000,000,000,000 | 34 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static int manager_watch_jobs_in_progress(Manager *m) {
usec_t next;
assert(m);
if (m->jobs_in_progress_event_source)
return 0;
next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC;
return sd_event_add_monotonic(m->event, next, 0, manager_dispatch_jobs_in_p... | 0 | [] | systemd | 5ba6985b6c8ef85a8bcfeb1b65239c863436e75b | 178,360,007,204,415,270,000,000,000,000,000,000,000 | 11 | core: allow PIDs to be watched by two units at the same time
In some cases it is interesting to map a PID to two units at the same
time. For example, when a user logs in via a getty, which is reexeced to
/sbin/login that binary will be explicitly referenced as main pid of the
getty service, as well as implicitly refer... |
lib_mainloop_watchdog(argc, argv, self)
int argc;
VALUE *argv;
VALUE self;
{
VALUE check_rootwidget;
#ifdef RUBY_VM
rb_raise(rb_eNotImpError,
"eventloop_watchdog is not implemented on Ruby VM.");
#endif
if (rb_scan_args(argc, argv, "01", &check_rootwidget) == 0) {
check_rootwid... | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 302,458,064,566,643,400,000,000,000,000,000,000,000 | 23 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static int io_files_update(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_ring_ctx *ctx = req->ctx;
struct io_uring_rsrc_update2 up;
int ret;
if (issue_flags & IO_URING_F_NONBLOCK)
return -EAGAIN;
up.offset = req->rsrc_update.offset;
up.data = req->rsrc_update.arg;
up.nr = 0;
up.tags = 0;
up.... | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 16,106,698,807,944,524,000,000,000,000,000,000,000 | 25 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
void git_path_diriter_free(git_path_diriter *diriter)
{
if (diriter == NULL)
return;
if (diriter->dir) {
closedir(diriter->dir);
diriter->dir = NULL;
}
#ifdef GIT_USE_ICONV
git_path_iconv_clear(&diriter->ic);
#endif
git_buf_dispose(&diriter->path);
} | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 3f7851eadca36a99627ad78cbe56a40d3776ed01 | 211,339,333,444,169,080,000,000,000,000,000,000,000 | 16 | Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS
A little-known feature of NTFS is that it offers to store metadata in
so-called "Alternate Data Streams" (inspired by Apple's "resource
forks") that are copied together with the file they are associated with.
These Alternate Data Streams can be accessed ... |
* iscsi interface functions
*/
static struct iscsi_internal *
iscsi_if_transport_lookup(struct iscsi_transport *tt)
{
struct iscsi_internal *priv;
unsigned long flags;
spin_lock_irqsave(&iscsi_transport_lock, flags);
list_for_each_entry(priv, &iscsi_transports, list) {
if (tt == priv->iscsi_transport) {
spi... | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 37,256,994,103,183,620,000,000,000,000,000,000,000 | 15 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
TEST_F(HttpConnectionManagerImplTest, 100ContinueResponseWithEncoderFiltersProxyingDisabled) {
proxy_100_continue_ = false;
setup(false, "envoy-custom-server", false);
setUpEncoderAndDecoder(false, false);
sendRequestHeadersAndData();
// Akin to 100ContinueResponseWithEncoderFilters below, but with
// prox... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 174,208,460,076,370,270,000,000,000,000,000,000,000 | 23 | 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... |
TEST(LengthFieldFrameDecoder, Simple) {
auto pipeline = Pipeline<IOBufQueue&, std::unique_ptr<IOBuf>>::create();
int called = 0;
(*pipeline)
.addBack(LengthFieldBasedFrameDecoder())
.addBack(test::FrameTester([&](std::unique_ptr<IOBuf> buf) {
auto sz = buf->computeChainDataLength();
calle... | 0 | [
"CWE-119",
"CWE-787"
] | wangle | 5b3bceca875e4ea4ed9d14c20b20ce46c92c13c6 | 297,659,129,979,930,500,000,000,000,000,000,000,000 | 28 | Peek for \n in LineBasedFrameDecoder.
Summary:
Previously this could underflow if there was not a following \n.
CVE-2019-3563
Reviewed By: siyengar
Differential Revision: D14935715
fbshipit-source-id: 25c3eecf373f89efa1232456aeeb092f13b7fa06 |
static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd ( opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 19,344,776,731,531,496,000,000,000,000,000,000,000 | 138 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
bool PlayerGeneric::getPowerOfTwoCompensationFlag() const
{
return compensateBufferFlag;
} | 0 | [
"CWE-416"
] | MilkyTracker | 7afd55c42ad80d01a339197a2d8b5461d214edaf | 231,373,587,043,421,570,000,000,000,000,000,000,000 | 4 | Fix use-after-free in PlayerGeneric destructor |
virtual ~AuthorizationManagerTest() {
if (authzManager)
authzManager->invalidateUserCache();
} | 0 | [
"CWE-863"
] | mongo | a93cfd354467981c9cf944a4ada748d0226fdfb0 | 133,688,291,444,039,840,000,000,000,000,000,000,000 | 4 | SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON
(cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b)
(cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36)
(cherry picked from commit fb87cc88ecb5d300f14cda7bc238d7d5132118f5) |
static bool cgm_attach(const char *name, const char *lxcpath, pid_t pid)
{
bool pass = true;
char *cgroup = NULL;
char **slist = subsystems;
int i;
if (!cgm_dbus_connect()) {
ERROR("Error connecting to cgroup manager");
return false;
}
for (i = 0; slist[i]; i++) {
cgroup = try_get_abs_cgroup(name, lxcpat... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 294,434,080,601,655,600,000,000,000,000,000,000,000 | 33 | 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... |
int kvm_arch_create_memslot(struct kvm *kvm, struct kvm_memory_slot *slot,
unsigned long npages)
{
int i;
for (i = 0; i < KVM_NR_PAGE_SIZES; ++i) {
unsigned long ugfn;
int lpages;
int level = i + 1;
lpages = gfn_to_index(slot->base_gfn + npages - 1,
slot->base_gfn, level) + 1;
slot->arch... | 0 | [
"CWE-369"
] | linux | 0185604c2d82c560dab2f2933a18f797e74ab5a8 | 313,987,362,201,819,370,000,000,000,000,000,000,000 | 58 | KVM: x86: Reload pit counters for all channels when restoring state
Currently if userspace restores the pit counters with a count of 0
on channels 1 or 2 and the guest attempts to read the count on those
channels, then KVM will perform a mod of 0 and crash. This will ensure
that 0 values are converted to 65536 as per... |
constructor (GType type,
guint n_construct_params,
GObjectConstructParam *construct_params)
{
GObject *object;
NMAGConfConnectionPrivate *priv;
NMConnection *connection;
GError *error = NULL;
object = G_OBJECT_CLASS (nma_gconf_connection_parent_class)->constructor (type, n_construct_params, construct_pa... | 1 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 92,523,945,177,845,830,000,000,000,000,000,000,000 | 48 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
static int internal_verify(X509_STORE_CTX *ctx)
{
int ok=0,n;
X509 *xs,*xi;
EVP_PKEY *pkey=NULL;
int (*cb)(int xok,X509_STORE_CTX *xctx);
cb=ctx->verify_cb;
n=sk_X509_num(ctx->chain);
ctx->error_depth=n-1;
n--;
xi=sk_X509_value(ctx->chain,n);
if (ctx->check_issued(ctx, xi, xi))
xs=xi;
else
{
if (n ... | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 201,931,093,782,814,040,000,000,000,000,000,000,000 | 89 | Backport OCSP fixes. |
unsigned long get_pmcs_ext_regs(int idx)
{
struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events);
return cpuhw->pmcs[idx];
} | 0 | [
"CWE-476"
] | linux | 60b7ed54a41b550d50caf7f2418db4a7e75b5bdc | 39,294,674,608,361,040,000,000,000,000,000,000,000 | 6 | powerpc/perf: Fix crash in perf_instruction_pointer() when ppmu is not set
On systems without any specific PMU driver support registered, running
perf record causes Oops.
The relevant portion from call trace:
BUG: Kernel NULL pointer dereference on read at 0x00000040
Faulting instruction address: 0xc0021f0c
Oo... |
GF_Err trep_Size(GF_Box *s)
{
GF_TrackExtensionPropertiesBox *ptr = (GF_TrackExtensionPropertiesBox *)s;
ptr->size += 4;
return GF_OK; | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 249,216,784,210,967,420,000,000,000,000,000,000,000 | 6 | prevent dref memleak on invalid input (#1183) |
void fx_DataView_prototype_getUint16(txMachine* the)
{
fx_DataView_prototype_get(the, 2, fxUint16Getter);
} | 0 | [
"CWE-125"
] | moddable | 135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45 | 166,338,866,417,859,920,000,000,000,000,000,000,000 | 4 | XS: #896 |
const string name() override { return "get_bucket_logging"; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 50,695,599,751,760,950,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
//! Fill sequentially all pixel values with specified values \newinstance.
CImg<T> get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
const T& val6, const T& val7, const T& val8, const T& val9) const {
return CImg<T>(_width,_height,_dept... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 166,771,462,878,759,000,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
void *rds_tcp_listen_sock_def_readable(struct net *net)
{
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
struct socket *lsock = rtn->rds_tcp_listen_sock;
if (!lsock)
return NULL;
return lsock->sk->sk_user_data;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | cb66ddd156203daefb8d71158036b27b0e2caf63 | 191,678,356,926,699,500,000,000,000,000,000,000,000 | 10 | net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock().
When it is to cleanup net namespace, rds_tcp_exit_net() will call
rds_tcp_kill_sock(), if t_sock is NULL, it will not call
rds_conn_destroy(), rds_conn_path_destroy() and rds_tcp_conn_free() to free
connection, and the worker cp_conn_w is ... |
cmsFloat64Number ParseFloatNumber(const char *Buffer)
{
cmsFloat64Number dnum = 0.0;
int sign = 1;
if (*Buffer == '-' || *Buffer == '+') {
sign = (*Buffer == '-') ? -1 : 1;
Buffer++;
}
while (*Buffer && isdigit((int) *Buffer)) {
dnum = dnum * 10.0 + (*Buffer - '0');
... | 1 | [] | Little-CMS | 65e2f1df3495edc984f7e0d7b7b24e29d851e240 | 90,656,678,552,033,500,000,000,000,000,000,000,000 | 71 | Fix some warnings from static analysis |
static void ipgre_tap_setup(struct net_device *dev)
{
ether_setup(dev);
dev->netdev_ops = &ipgre_tap_netdev_ops;
dev->destructor = free_netdev;
dev->iflink = 0;
dev->features |= NETIF_F_NETNS_LOCAL;
} | 0 | [] | linux-2.6 | c2892f02712e9516d72841d5c019ed6916329794 | 91,232,718,935,943,090,000,000,000,000,000,000,000 | 11 | gre: fix netns vs proto registration ordering
GRE protocol receive hook can be called right after protocol addition is done.
If netns stuff is not yet initialized, we're going to oops in
net_generic().
This is remotely oopsable if ip_gre is compiled as module and packet
comes at unfortunate moment of module loading.
... |
static int sctp_getsockopt_peeloff(struct sock *sk, int len, char __user *optval, int __user *optlen)
{
sctp_peeloff_arg_t peeloff;
struct socket *newsock;
int retval = 0;
struct sctp_association *asoc;
if (len < sizeof(sctp_peeloff_arg_t))
return -EINVAL;
len = sizeof(sctp_peeloff_arg_t);
if (copy_from_user(... | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 94,730,647,071,755,180,000,000,000,000,000,000,000 | 45 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
static MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_new()
{
return (MSUSB_INTERFACE_DESCRIPTOR*)calloc(1, sizeof(MSUSB_INTERFACE_DESCRIPTOR));
} | 0 | [
"CWE-190"
] | FreeRDP | 9f77fc3dd2394373e1be753952b00dafa1a9b7da | 195,102,358,277,270,150,000,000,000,000,000,000,000 | 4 | Fixed int overflow in msusb_mspipes_read
Thanks to hac425 |
bool pb_decode_double_as_float(pb_istream_t *stream, float *dest)
{
uint_least8_t sign;
int exponent;
uint32_t mantissa;
uint64_t value;
union { float f; uint32_t i; } out;
if (!pb_decode_fixed64(stream, &value))
return false;
/* Decompose input value */
sign = (uint_least8_t)(... | 0 | [
"CWE-763"
] | nanopb | e2f0ccf939d9f82931d085acb6df8e9a182a4261 | 128,618,826,092,059,810,000,000,000,000,000,000,000 | 65 | Fix invalid free() with oneof (#647)
Nanopb would call free() or realloc() on an invalid
(attacker controlled) pointer value when all the following
conditions are true:
- PB_ENABLE_MALLOC is defined at the compile time
- Message definition contains an oneof field, and the oneof
contains at least one pointer type fi... |
int oauth2_try_parse_jwt(const struct oauth2_settings *set,
const char *token, ARRAY_TYPE(oauth2_field) *fields,
bool *is_jwt_r, const char **error_r)
{
const char *const *blobs = t_strsplit(token, ".");
int ret;
i_assert(set->key_dict != NULL);
/* we don't know if it's JWT token yet */
*is_jwt_r = FALSE... | 1 | [
"CWE-22"
] | core | 1db66e39500672bc167d5e4e2e7232b8f7d87c05 | 250,936,441,923,793,640,000,000,000,000,000,000,000 | 84 | lib-oauth2: Move identifier escaping to own function |
static bool tcp_can_coalesce_send_queue_head(struct sock *sk, int len)
{
struct sk_buff *skb, *next;
skb = tcp_send_head(sk);
tcp_for_write_queue_from_safe(skb, next, sk) {
if (len <= skb->len)
break;
if (unlikely(TCP_SKB_CB(skb)->eor))
return false;
len -= skb->len;
}
return true;
} | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 162,041,787,079,610,070,000,000,000,000,000,000,000 | 17 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
mISDN_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
{
struct timeval tv;
if (_pms(sk)->cmask & MISDN_TIME_STAMP) {
skb_get_timestamp(skb, &tv);
put_cmsg(msg, SOL_MISDN, MISDN_TIME_STAMP, sizeof(tv), &tv);
}
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 251,265,122,608,530,000,000,000,000,000,000,000,000 | 9 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string)
{
cJSON *string_item = cJSON_CreateString(string);
if (add_item_to_object(object, name, string_item, &global_hooks, false))
{
return string_item;
}
cJSON_Delete(string_item... | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 47,286,818,074,854,030,000,000,000,000,000,000,000 | 11 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
static void r_core_break (RCore *core) {
} | 0 | [
"CWE-415",
"CWE-703"
] | radare2 | cb8b683758edddae2d2f62e8e63a738c39f92683 | 134,868,094,711,013,490,000,000,000,000,000,000,000 | 2 | Fix #16303 - c->table_query double free (#16318) |
static void __wake_up_common(wait_queue_head_t *q, unsigned int mode,
int nr_exclusive, int sync, void *key)
{
wait_queue_t *curr, *next;
list_for_each_entry_safe(curr, next, &q->task_list, task_list) {
unsigned flags = curr->flags;
if (curr->func(curr, mode, sync, key) &&
(flags & WQ_FLAG_EXCLUSIVE... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 282,399,432,131,412,170,000,000,000,000,000,000,000 | 13 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
const char *samdb_forest_name(struct ldb_context *ldb, TALLOC_CTX *mem_ctx)
{
const char *forest_name = ldb_dn_canonical_string(mem_ctx,
ldb_get_root_basedn(ldb));
char *p;
if (forest_name == NULL) {
return NULL;
}
p = strchr(forest_name, '/');
if (p) {
*p = '\0';
}
return forest_name;
} | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 132,550,281,735,441,600,000,000,000,000,000,000,000 | 17 | 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... |
void construct_reply_common_req(struct smb_request *req, char *outbuf)
{
construct_reply_common(req, (char *)req->inbuf, outbuf);
} | 0 | [] | samba | 25452a2268ac7013da28125f3df22085139af12d | 324,730,699,510,086,560,000,000,000,000,000,000,000 | 4 | s3: Fix a NULL pointer dereference
Found by Laurent Gaffie <laurent.gaffie@gmail.com>.
Thanks!
Volker |
static int task_dumpable(struct task_struct *task)
{
int dumpable = 0;
struct mm_struct *mm;
task_lock(task);
mm = task->mm;
if (mm)
dumpable = get_dumpable(mm);
task_unlock(task);
if(dumpable == 1)
return 1;
return 0;
} | 0 | [] | linux | 0499680a42141d86417a8fbaa8c8db806bea1201 | 44,129,430,651,324,090,000,000,000,000,000,000,000 | 14 | procfs: add hidepid= and gid= mount options
Add support for mount options to restrict access to /proc/PID/
directories. The default backward-compatible "relaxed" behaviour is left
untouched.
The first mount option is called "hidepid" and its value defines how much
info about processes we want to be available for non... |
const Integer& DSA_PrivateKey::GetPrivatePart() const
{
return x_;
} | 0 | [] | mysql-server | 5c6169fb309981b564a17bee31b367a18866d674 | 165,668,559,833,963,300,000,000,000,000,000,000,000 | 4 | Bug #24740291: YASSL UPDATE TO 2.4.2 |
int php_stream_xmlIO_close(void *context)
{
TSRMLS_FETCH();
return php_stream_close((php_stream*)context);
} | 0 | [
"CWE-200"
] | php-src | afe98b7829d50806559acac9b530acb8283c3bf4 | 255,382,595,090,876,100,000,000,000,000,000,000,000 | 5 | Disabled external entities loading |
UUID OplogApplicationChecks::getUUIDFromOplogEntry(const BSONObj& oplogEntry) {
BSONElement uiElem = oplogEntry["ui"];
return uassertStatusOK(UUID::parse(uiElem));
}; | 0 | [
"CWE-20"
] | mongo | cbec187266a9f902b3906ae8ccef2bbda0c5b27b | 210,044,843,409,625,200,000,000,000,000,000,000,000 | 4 | SERVER-36263 Bypassing operation validation in applyOps should require special privilege |
compat_copy_entry_from_user(struct compat_ipt_entry *e, void **dstptr,
unsigned int *size,
struct xt_table_info *newinfo, unsigned char *base)
{
struct xt_entry_target *t;
struct ipt_entry *de;
unsigned int origsize;
int h;
struct xt_entry_match *ematch;
origsize = *size;
de = *dstptr;
memcpy(de,... | 0 | [
"CWE-476"
] | linux | 57ebd808a97d7c5b1e1afb937c2db22beba3c1f8 | 204,577,074,859,263,240,000,000,000,000,000,000,000 | 34 | netfilter: add back stackpointer size checks
The rationale for removing the check is only correct for rulesets
generated by ip(6)tables.
In iptables, a jump can only occur to a user-defined chain, i.e.
because we size the stack based on number of user-defined chains we
cannot exceed stack size.
However, the underlyi... |
init_side (FlatpakProxyClient *client, ProxySide *side)
{
side->got_first_byte = (side == &client->bus_side);
side->client = client;
side->header_buffer.size = 16;
side->header_buffer.pos = 0;
side->current_read_buffer = &side->header_buffer;
side->expected_replies = g_hash_table_new (g_direct_hash, g_direc... | 0 | [
"CWE-284",
"CWE-436"
] | flatpak | 52346bf187b5a7f1c0fe9075b328b7ad6abe78f6 | 225,494,730,633,069,000,000,000,000,000,000,000,000 | 9 | Fix vulnerability in dbus proxy
During the authentication all client data is directly forwarded
to the dbus daemon as is, until we detect the BEGIN command after
which we start filtering the binary dbus protocol.
Unfortunately the detection of the BEGIN command in the proxy
did not exactly match the detection in the ... |
alt_merge_mml(MinMaxLen* to, MinMaxLen* from)
{
if (to->min > from->min) to->min = from->min;
if (to->max < from->max) to->max = from->max;
} | 0 | [
"CWE-125"
] | php-src | c6e34d91b88638966662caac62c4d0e90538e317 | 225,698,277,245,166,000,000,000,000,000,000,000,000 | 5 | Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) |
int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info)
{
int ret;
struct dmar_rmrr_unit *rmrru;
struct dmar_atsr_unit *atsru;
struct acpi_dmar_atsr *atsr;
struct acpi_dmar_reserved_memory *rmrr;
if (!intel_iommu_enabled && system_state >= SYSTEM_RUNNING)
return 0;
list_for_each_entry(rmrru, &dmar... | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 198,349,377,107,255,130,000,000,000,000,000,000,000 | 50 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
int has_dirs_only_path(const char *name, int len, int prefix_len)
{
return threaded_has_dirs_only_path(&default_cache, name, len, prefix_len);
} | 0 | [
"CWE-59",
"CWE-61"
] | git | 684dd4c2b414bcf648505e74498a608f28de4592 | 327,941,592,060,813,440,000,000,000,000,000,000,000 | 4 | checkout: fix bug that makes checkout follow symlinks in leading path
Before checking out a file, we have to confirm that all of its leading
components are real existing directories. And to reduce the number of
lstat() calls in this process, we cache the last leading path known to
contain only directories. However, wh... |
Item *Item_func_decode_oracle::find_item()
{
uint idx;
if (!Predicant_to_list_comparator::cmp_nulls_equal(current_thd, this, &idx))
return args[idx + when_count()];
Item **pos= Item_func_decode_oracle::else_expr_addr();
return pos ? pos[0] : 0;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 339,542,444,325,514,600,000,000,000,000,000,000,000 | 8 | 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 ... |
virtual const double *const_ptr_double() const { return NULL; } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 19,812,943,966,517,481,000,000,000,000,000,000,000 | 1 | 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 ... |
vte_sequence_handler_up (VteTerminal *terminal, GValueArray *params)
{
VteScreen *screen;
long start, end;
screen = terminal->pvt->screen;
if (screen->scrolling_restricted) {
start = screen->insert_delta + screen->scrolling_region.start;
end = screen->insert_delta + screen->scrolling_region.end;
} else {
s... | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 6,647,630,107,701,602,000,000,000,000,000,000,000 | 17 | fix bug #548272
svn path=/trunk/; revision=2365 |
gss_process_context_token (minor_status,
context_handle,
token_buffer)
OM_uint32 * minor_status;
gss_ctx_id_t context_handle;
gss_buffer_t token_buffer;
{
OM_uint32 status;
gss_union_ctx_id_t ctx;
gss_mechanism mech;
if (minor_status == NULL)
... | 1 | [
"CWE-415"
] | krb5 | 56f7b1bc95a2a3eeb420e069e7655fb181ade5cf | 264,027,247,527,724,500,000,000,000,000,000,000,000 | 51 | Preserve GSS context on init/accept failure
After gss_init_sec_context() or gss_accept_sec_context() has created a
context, don't delete the mechglue context on failures from subsequent
calls, even if the mechanism deletes the mech-specific context (which
is allowed by RFC 2744 but not preferred). Check for union con... |
int ziplistTest(int argc, char **argv) {
unsigned char *zl, *p;
unsigned char *entry;
unsigned int elen;
long long value;
/* If an argument is given, use it as the random seed. */
if (argc == 2)
srand(atoi(argv[1]));
zl = createIntList();
ziplistRepr(zl);
zfree(zl);
z... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 99,365,343,712,101,900,000,000,000,000,000,000,000 | 550 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
WriteCompressedType(mat_t *mat, matvar_t *matvar, z_streamp z)
{
int err;
mat_uint32_t comp_buf[512];
mat_uint32_t uncomp_buf[512];
size_t byteswritten = 0, nelems = 1;
if ( MAT_C_EMPTY == matvar->class_type ) {
/* exit early if this is an empty data */
return byteswritten;
}
... | 0 | [
"CWE-200",
"CWE-401"
] | matio | b53b62b756920f4c1509f4ee06427f66c3b5c9c4 | 221,002,751,307,546,270,000,000,000,000,000,000,000 | 172 | Fix memory leak
As reported by https://github.com/tbeu/matio/issues/186 |
static void sas_wait_eh(struct domain_device *dev)
{
struct sas_ha_struct *ha = dev->port->ha;
DEFINE_WAIT(wait);
if (dev_is_sata(dev)) {
ata_port_wait_eh(dev->sata_dev.ap);
return;
}
retry:
spin_lock_irq(&ha->lock);
while (test_bit(SAS_DEV_EH_PENDING, &dev->state)) {
prepare_to_wait(&ha->eh_wait_q, &wai... | 0 | [] | linux | 318aaf34f1179b39fa9c30fa0f3288b645beee39 | 173,308,241,459,877,050,000,000,000,000,000,000,000 | 28 | scsi: libsas: defer ata device eh commands to libata
When ata device doing EH, some commands still attached with tasks are
not passed to libata when abort failed or recover failed, so libata did
not handle these commands. After these commands done, sas task is freed,
but ata qc is not freed. This will cause ata qc lea... |
PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
{
static const char module[] = "PixarLogDecode";
TIFFDirectory *td = &tif->tif_dir;
PixarLogState* sp = DecoderState(tif);
tmsize_t i;
tmsize_t nsamples;
int llen;
uint16 *up;
switch (sp->user_datafmt) {
case PIXARLOGDATAFMT_FLOAT:
nsamples = occ ... | 0 | [
"CWE-369",
"CWE-787"
] | libtiff | 391e77fcd217e78b2c51342ac3ddb7100ecacdd2 | 294,230,553,468,005,540,000,000,000,000,000,000,000 | 138 | * libtiff/tif_pixarlog.c: fix potential buffer write overrun in
PixarLogDecode() on corrupted/unexpected images (reported by Mathias Svensson) |
R_API int r_bin_list(RBin *bin, int json) {
RListIter *it;
RBinPlugin *bp;
RBinXtrPlugin *bx;
if (json == 'q') {
r_list_foreach (bin->plugins, it, bp) {
bin->cb_printf ("%s\n", bp->name);
}
r_list_foreach (bin->binxtrs, it, bx) {
bin->cb_printf ("%s\n", bx->name);
}
} else if (json) {
int i;
i ... | 0 | [
"CWE-125"
] | radare2 | d31c4d3cbdbe01ea3ded16a584de94149ecd31d9 | 50,450,334,791,051,820,000,000,000,000,000,000,000 | 49 | Fix #8748 - Fix oobread on string search |
bool table_already_fk_prelocked(TABLE_LIST *tl, LEX_STRING *db,
LEX_STRING *table, thr_lock_type lock_type)
{
for (; tl; tl= tl->next_global )
{
if (tl->lock_type >= lock_type &&
tl->prelocking_placeholder == TABLE_LIST::FK &&
strcmp(tl->db, db->str) == 0 &&
... | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 121,642,374,717,226,700,000,000,000,000,000,000,000 | 13 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
int apply_subsystem_event_filter(struct trace_subsystem_dir *dir,
char *filter_string)
{
struct event_subsystem *system = dir->subsystem;
struct trace_array *tr = dir->tr;
struct event_filter *filter = NULL;
int err = 0;
mutex_lock(&event_mutex);
/* Make sure the system still has events */
if (!dir->nr_ev... | 0 | [
"CWE-787"
] | linux | 70303420b5721c38998cf987e6b7d30cc62d4ff1 | 326,925,042,827,718,200,000,000,000,000,000,000,000 | 42 | tracing: Check for no filter when processing event filters
The syzkaller detected a out-of-bounds issue with the events filter code,
specifically here:
prog[N].pred = NULL; /* #13 */
prog[N].target = 1; /* TRUE */
prog[N+1].pred = NULL;
prog[N+1].target = 0; /* FALSE */
-> prog[N-1].target = N;
prog[N-1].w... |
_copyWindowDef(const WindowDef *from)
{
WindowDef *newnode = makeNode(WindowDef);
COPY_STRING_FIELD(name);
COPY_STRING_FIELD(refname);
COPY_NODE_FIELD(partitionClause);
COPY_NODE_FIELD(orderClause);
COPY_SCALAR_FIELD(frameOptions);
COPY_NODE_FIELD(startOffset);
COPY_NODE_FIELD(endOffset);
COPY_LOCATION_FIELD... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 194,971,689,893,299,000,000,000,000,000,000,000,000 | 15 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
GetCurrentChunkReplayStartTime(void)
{
/* use volatile pointer to prevent code rearrangement */
volatile XLogCtlData *xlogctl = XLogCtl;
TimestampTz xtime;
SpinLockAcquire(&xlogctl->info_lck);
xtime = xlogctl->currentChunkStartTime;
SpinLockRelease(&xlogctl->info_lck);
return xtime;
} | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 239,714,782,152,641,140,000,000,000,000,000,000,000 | 12 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
static void virtio_net_set_multiqueue(VirtIONet *n, int multiqueue)
{
VirtIODevice *vdev = VIRTIO_DEVICE(n);
int i, max = multiqueue ? n->max_queues : 1;
n->multiqueue = multiqueue;
for (i = 2; i <= n->max_queues * 2 + 1; i++) {
virtio_del_queue(vdev, i);
}
for (i = 1; i < max; i++) {... | 0 | [
"CWE-119"
] | qemu | 98f93ddd84800f207889491e0b5d851386b459cf | 262,863,732,319,955,140,000,000,000,000,000,000,000 | 37 | virtio-net: out-of-bounds buffer write on load
CVE-2013-4149 QEMU 1.3.0 out-of-bounds buffer write in
virtio_net_load()@hw/net/virtio-net.c
> } else if (n->mac_table.in_use) {
> uint8_t *buf = g_malloc0(n->mac_table.in_use);
We are allocating buffer of size n->mac_table.in_use
> qemu... |
static int drop_security_capability(const struct lo_data *lo, int fd)
{
if (!lo->xattr_security_capability) {
/* We didn't remap the name, let the host kernel do it */
return 0;
}
if (!fremovexattr(fd, lo->xattr_security_capability)) {
/* All good */
return 0;
}
swit... | 0 | [
"CWE-281"
] | qemu | e586edcb410543768ef009eaa22a2d9dd4a53846 | 200,537,891,101,302,200,000,000,000,000,000,000,000 | 25 | virtiofs: drop remapped security.capability xattr as needed
On Linux, the 'security.capability' xattr holds a set of
capabilities that can change when an executable is run, giving
a limited form of privilege escalation to those programs that
the writer of the file deemed worthy.
Any write causes the 'security.capabil... |
void gf_filter_block_eos(GF_Filter *filter, Bool do_block)
{
if (filter) filter->block_eos = do_block;
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 20,361,637,029,826,896,000,000,000,000,000,000,000 | 4 | fixed crashes for very long path - cf #1908 |
void __audit_log_capset(const struct cred *new, const struct cred *old)
{
struct audit_context *context = current->audit_context;
context->capset.pid = task_pid_nr(current);
context->capset.cap.effective = new->cap_effective;
context->capset.cap.inheritable = new->cap_effective;
context->capset.cap.permitted =... | 0 | [
"CWE-362"
] | linux | 43761473c254b45883a64441dd0bc85a42f3645c | 194,717,912,176,147,320,000,000,000,000,000,000,000 | 9 | audit: fix a double fetch in audit_log_single_execve_arg()
There is a double fetch problem in audit_log_single_execve_arg()
where we first check the execve(2) argumnets for any "bad" characters
which would require hex encoding and then re-fetch the arguments for
logging in the audit record[1]. Of course this leaves a... |
static void innerLoopLoadRow(
Parse *pParse, /* Statement under construction */
Select *pSelect, /* The query being coded */
RowLoadInfo *pInfo /* Info needed to complete the row load */
){
sqlite3ExprCodeExprList(pParse, pSelect->pEList, pInfo->regResult,
... | 0 | [
"CWE-20"
] | sqlite | e59c562b3f6894f84c715772c4b116d7b5c01348 | 146,810,098,783,755,820,000,000,000,000,000,000,000 | 14 | Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list.
FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.