func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string | is_vulnerable string | cwe_id_extracted string | cwe_details string |
|---|---|---|---|---|---|---|---|---|---|---|
u_int32_t ndpi_bytestream_dec_or_hex_to_number(const u_int8_t *str, u_int16_t max_chars_to_read, u_int16_t *bytes_read) {
u_int32_t val;
val = 0;
if(max_chars_to_read <= 2 || str[0] != '0' || str[1] != 'x') {
return(ndpi_bytestream_to_number(str, max_chars_to_read, bytes_read));
} else {
/*use base 16 s... | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 116,771,549,935,306,240,000,000,000,000,000,000,000 | 32 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> | Safe | 416 | {"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An... |
void MainWindow::onPlayerTabIndexChanged(int index)
{
if (Player::SourceTabIndex == index)
m_timelineDock->saveAndClearSelection();
else
m_timelineDock->restoreSelection();
} | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 52,953,006,005,092,020,000,000,000,000,000,000,000 | 7 | fix upgrade check is not using TLS correctly | Safe | 89 | {"cwe_id": "CWE-89", "vulnerability_type": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes spec... |
int lxc_safe_uint(const char *numstr, unsigned int *converted)
{
char *err = NULL;
unsigned long int uli;
while (isspace(*numstr))
numstr++;
if (*numstr == '-')
return -EINVAL;
errno = 0;
uli = strtoul(numstr, &err, 0);
if (errno == ERANGE && uli == ULONG_MAX)
return -ERANGE;
if (err == numstr || *err... | 0 | [
"CWE-417"
] | lxc | 5eb45428b312e978fb9e294dde16efb14dd9fa4d | 300,386,521,973,931,370,000,000,000,000,000,000,000 | 25 | CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> | Safe | 417 | null |
TEST(HeaderDataConstructorTest, ExactMatchSpecifier) {
const std::string yaml = R"EOF(
name: test-header
exact_match: value
)EOF";
HeaderUtility::HeaderData header_data =
HeaderUtility::HeaderData(parseHeaderMatcherFromYaml(yaml));
EXPECT_EQ("test-header", header_data.name_.get());
EXPECT_EQ(HeaderUti... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 178,710,567,664,794,100,000,000,000,000,000,000,000 | 13 | 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... | Safe | null | null |
relative_move(NCURSES_SP_DCLx
string_desc * target,
int from_y,
int from_x,
int to_y,
int to_x,
int ovw)
/* move via local motions (cuu/cuu1/cud/cud1/cub1/cub/cuf1/cuf/vpa/hpa) */
{
string_desc save;
int n, vcost = 0, hcost = 0;
(void) _nc_str_copy(&save, target);
... | 1 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 302,980,864,530,917,520,000,000,000,000,000,000,000 | 213 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... | Vulnerable | null | null |
inline void AddScalarBroadcast(int size, const ArithmeticParams& params,
float broadcast_value, const float* input2_data,
float* output_data) {
int i = 0;
#ifdef USE_NEON
const float32x4_t output_activation_min_vector =
vdupq_n_f32(params.float_act... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 236,367,207,191,693,050,000,000,000,000,000,000,000 | 29 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 | Safe | 476 | {"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory... |
static int __init atalk_init(void)
{
(void)sock_register(&atalk_family_ops);
ddp_dl = register_snap_client(ddp_snap_id, atalk_rcv);
if (!ddp_dl)
printk(atalk_err_snap);
dev_add_pack(<alk_packet_type);
dev_add_pack(&ppptalk_packet_type);
register_netdevice_notifier(&ddp_notifier);
aarp_proto_init();
atalk_... | 0 | [] | history | 7ab442d7e0a76402c12553ee256f756097cae2d2 | 125,490,530,139,080,550,000,000,000,000,000,000,000 | 17 | [DDP]: Convert to new protocol interface.
Convert ddp to the new protocol interface which means it has to
handle fragmented skb's. The only big change is in the checksum
routine which has to do more work (like skb_checksum).
Minor speedup is folding the carry to avoid a branch.
Tested against a 2.4 system and by ru... | Safe | null | null |
static int fwnet_finish_incoming_packet(struct net_device *net,
struct sk_buff *skb, u16 source_node_id,
bool is_broadcast, u16 ether_type)
{
struct fwnet_device *dev;
int status;
__be64 guid;
switch (ether_type) {
case ETH_P_ARP:
case ETH_P_IP:
#if IS_ENABLED(CONFIG_IPV6)
case ETH_P_IPV6:
#endif
br... | 0 | [
"CWE-119",
"CWE-284",
"CWE-787"
] | linux | 667121ace9dbafb368618dbabcf07901c962ddac | 76,853,014,518,927,810,000,000,000,000,000,000,000 | 81 | firewire: net: guard against rx buffer overflows
The IP-over-1394 driver firewire-net lacked input validation when
handling incoming fragmented datagrams. A maliciously formed fragment
with a respectively large datagram_offset would cause a memcpy past the
datagram buffer.
So, drop any packets carrying a fragment wi... | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
int yang_check_deviate_unique(struct lys_module *module, struct lys_deviate *deviate, struct lys_node *dev_target)
{
struct lys_node_list *list;
char *str;
uint i = 0;
struct lys_unique *last_unique = NULL;
if (yang_read_deviate_unique(deviate, dev_target)) {
goto error;
}
list = (s... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 165,867,557,104,866,040,000,000,000,000,000,000,000 | 50 | yang parser BUGFIX double free
Fixes #742 | Safe | 415 | {"cwe_id": "CWE-415", "vulnerability_type": "Double Free", "description": "The product calls free() twice on the same memory address.", "severity": "High", "category": "Double-free", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands"], "languages": [null, "C", "C++"], "example": "Example not extracted"... |
static enum test_return test_issue_44(void) {
in_port_t port;
pid_t pid = start_server(&port, true, 15);
assert(kill(pid, SIGHUP) == 0);
sleep(1);
assert(kill(pid, SIGTERM) == 0);
return TEST_PASS;
} | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 123,697,220,259,582,600,000,000,000,000,000,000,000 | 9 | Issue 102: Piping null to the server will crash it | Safe | 20 | {"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca... |
void AuthorizationManager::setAuthEnabled(bool enabled) {
_authEnabled = enabled;
} | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 216,338,291,293,664,970,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) | Safe | 613 | {"cwe_id": "CWE-613", "vulnerability_type": "Insufficient Session Expiration", "description": "According to WASC, \"Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.\"", "severity": null, "category": null, "impact": ["Bypass Protect... |
static void dump_ah_combs(struct sk_buff *skb, const struct xfrm_tmpl *t)
{
struct sadb_prop *p;
int i;
p = (struct sadb_prop*)skb_put(skb, sizeof(struct sadb_prop));
p->sadb_prop_len = sizeof(struct sadb_prop)/8;
p->sadb_prop_exttype = SADB_EXT_PROPOSAL;
p->sadb_prop_replay = 32;
memset(p->sadb_prop_reserved, ... | 0 | [] | linux | 096f41d3a8fcbb8dde7f71379b1ca85fe213eded | 217,208,161,942,159,900,000,000,000,000,000,000,000 | 34 | af_key: Fix sadb_x_ipsecrequest parsing
The parsing of sadb_x_ipsecrequest is broken in a number of ways.
First of all we're not verifying sadb_x_ipsecrequest_len. This
is needed when the structure carries addresses at the end. Worse
we don't even look at the length when we parse those optional
addresses.
The migra... | Safe | null | null |
PHP_FUNCTION(imagefilledarc)
{
zval *IM;
zend_long cx, cy, w, h, ST, E, col, style;
gdImagePtr im;
int e, st;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllllllll", &IM, &cx, &cy, &w, &h, &ST, &E, &col, &style) == FAILURE) {
return;
}
if ((im = (gdImagePtr)zend_fetch_resource(Z_RES_P(IM), "Image", le_gd)) =... | 0 | [
"CWE-787"
] | php-src | 28022c9b1fd937436ab67bb3d61f652c108baf96 | 114,836,099,359,816,990,000,000,000,000,000,000,000 | 29 | Fix bug#72697 - select_colors write out-of-bounds
(cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4)
Conflicts:
ext/gd/gd.c | Safe | 787 | {"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest... |
static FLAC__StreamEncoderInitStatus init_FILE_internal_(
FLAC__StreamEncoder *encoder,
FILE *file,
FLAC__StreamEncoderProgressCallback progress_callback,
void *client_data,
FLAC__bool is_ogg
)
{
FLAC__StreamEncoderInitStatus init_status;
FLAC__ASSERT(0 != encoder);
FLAC__ASSERT(0 != file);
if(encoder->prote... | 0 | [] | flac | c06a44969c1145242a22f75fc8fb2e8b54c55303 | 188,176,698,440,713,900,000,000,000,000,000,000,000 | 68 | flac : Fix for https://sourceforge.net/p/flac/bugs/425/
* flac/encode.c : Validate num_tracks field of cuesheet.
* libFLAC/stream_encoder.c : Add check for a NULL pointer.
* flac/encode.c : Improve bounds checking.
Closes: https://sourceforge.net/p/flac/bugs/425/ | Safe | null | null |
SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol,
int __user *, usockvec)
{
struct socket *sock1, *sock2;
int fd1, fd2, err;
struct file *newfile1, *newfile2;
int flags;
flags = type & ~SOCK_TYPE_MASK;
if (flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK))
return -EINVAL;
type &= SOCK_TYPE_MASK;
if... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 221,771,133,916,288,320,000,000,000,000,000,000,000 | 87 | 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... | Safe | 20 | {"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca... |
void __hci_req_update_scan(struct hci_request *req)
{
struct hci_dev *hdev = req->hdev;
u8 scan;
if (!hci_dev_test_flag(hdev, HCI_BREDR_ENABLED))
return;
if (!hdev_is_powered(hdev))
return;
if (mgmt_powering_down(hdev))
return;
if (hdev->scanning_paused)
return;
if (hci_dev_test_flag(hdev, HCI_CONNE... | 0 | [
"CWE-362"
] | linux | e2cb6b891ad2b8caa9131e3be70f45243df82a80 | 294,285,262,482,885,900,000,000,000,000,000,000,000 | 32 | bluetooth: eliminate the potential race condition when removing the HCI controller
There is a possible race condition vulnerability between issuing a HCI
command and removing the cont. Specifically, functions hci_req_sync()
and hci_dev_do_close() can race each other like below:
thread-A in hci_req_sync() | th... | Safe | 362 | {"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour... |
static inline void release_mc(struct kref *kref)
{
struct cma_multicast *mc = container_of(kref, struct cma_multicast, mcref);
kfree(mc->multicast.ib);
kfree(mc);
} | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 182,023,264,201,113,840,000,000,000,000,000,000,000 | 7 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... | Safe | 20 | {"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca... |
static void __slab_free(struct kmem_cache *s, struct page *page,
void *head, void *tail, int cnt,
unsigned long addr)
{
void *prior;
int was_frozen;
struct page new;
unsigned long counters;
struct kmem_cache_node *n = NULL;
unsigned long uninitialized_var(flags);
stat(s, FREE_SLOWPATH);
if (kmem_cache_... | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 139,683,591,868,149,210,000,000,000,000,000,000,000 | 112 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... | Safe | null | null |
static void ib_ucm_event_sidr_rep_get(struct ib_ucm_sidr_rep_event_resp *urep,
struct ib_cm_sidr_rep_event_param *krep)
{
urep->status = krep->status;
urep->qkey = krep->qkey;
urep->qpn = krep->qpn;
}; | 0 | [
"CWE-284",
"CWE-264"
] | linux | e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 | 183,049,562,914,945,460,000,000,000,000,000,000,000 | 7 | IB/security: Restrict use of the write() interface
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl(). This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory... | Safe | 284 | {"cwe_id": "CWE-284", "vulnerability_type": "Improper Access Control", "description": "The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.", "severity": null, "category": "Authorization", "impact": ["Varies by Context"], "languages": [null], "example": "Example not ex... |
lookup(lookup_state_t *state,
const char *path,
authz_access_t required,
svn_boolean_t recursive,
apr_pool_t *scratch_pool)
{
/* Create a scratch pad large enough to hold any of PATH's segments. */
apr_size_t path_len = strlen(path);
svn_stringbuf_ensure(state->scratch_pad, path_len);
... | 0 | [
"CWE-703"
] | subversion | e1b615840932fb46aefe1cd90d2115720af4600e | 301,627,711,987,663,100,000,000,000,000,000,000,000 | 142 | Fix issue #4880 "Use-after-free of object-pools when used as httpd module"
Ensure that we initialize authz again if the pool which our authz
caches depend on is cleared. Apache HTTPD may run pre/post config
hooks multiple times and clear its global configuration pool which
our authz caching pools depend on.
Reported-... | Safe | 703 | {"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"... |
static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm,
struct vm_area_struct *vma, unsigned long addr, pte_t pte)
{
u64 frame = 0, flags = 0;
struct page *page = NULL;
if (pte_present(pte)) {
if (pm->show_pfn)
frame = pte_pfn(pte);
flags |= PM_PRESENT;
page = _vm_normal_page(vma, addr, pte, ... | 0 | [
"CWE-362",
"CWE-703",
"CWE-667"
] | linux | 04f5866e41fb70690e28397487d8bd8eea7d712a | 299,558,328,036,674,730,000,000,000,000,000,000,000 | 38 | 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... | Safe | 362 | {"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour... |
static int do_format(int drive, struct format_descr *tmp_format_req)
{
int ret;
if (lock_fdc(drive))
return -EINTR;
set_floppy(drive);
if (!_floppy ||
_floppy->track > drive_params[current_drive].tracks ||
tmp_format_req->track >= _floppy->track ||
tmp_format_req->head >= _floppy->head ||
(_... | 1 | [
"CWE-416"
] | linux | f71f01394f742fc4558b3f9f4c7ef4c4cf3b07c8 | 320,589,868,630,189,800,000,000,000,000,000,000,000 | 27 | floppy: use a statically allocated error counter
Interrupt handler bad_flp_intr() may cause a UAF on the recently freed
request just to increment the error count. There's no point keeping
that one in the request anyway, and since the interrupt handler uses a
static pointer to the error which cannot be kept in sync wi... | Vulnerable | 416 | {"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An... |
void slb_miss_bad_addr(struct pt_regs *regs)
{
enum ctx_state prev_state = exception_enter();
if (user_mode(regs))
_exception(SIGSEGV, regs, SEGV_BNDERR, regs->dar);
else
bad_page_fault(regs, regs->dar, SIGSEGV);
exception_exit(prev_state);
} | 0 | [] | linux | 5d176f751ee3c6eededd984ad409bff201f436a7 | 309,278,305,318,458,870,000,000,000,000,000,000,000 | 11 | powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR ... | Safe | null | null |
bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, jint c, LIR_Opr result, LIR_Opr tmp) {
if (tmp->is_valid() && c > 0 && c < max_jint) {
if (is_power_of_2(c + 1)) {
__ move(left, tmp);
__ shift_left(left, log2_jint(c + 1), left);
__ sub(left, tmp, result);
return true;
} else i... | 0 | [] | jdk11u-dev | 9a62b8af48af6c506d2fc4a3482116de26357f16 | 287,701,060,304,790,000,000,000,000,000,000,000,000 | 16 | 8272014: Better array indexing
Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f | Safe | null | null |
my_gettimeofday(struct timeval *tvp, void *tzp)
{
struct timeb timebuffer;
ftime(&timebuffer);
if (tvp) {
tvp->tv_sec = timebuffer.time;
tvp->tv_usec = timebuffer.millitm * 1000L;
}
return (0);
} | 0 | [
"CWE-416"
] | libxml2 | 1358d157d0bd83be1dfe356a69213df9fac0b539 | 54,219,080,313,117,140,000,000,000,000,000,000,000 | 11 | 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. | Safe | 416 | {"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An... |
void visit(PrioritizedChoice & /*ope*/) override {
name = "PrioritizedChoice";
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 282,500,295,370,343,630,000,000,000,000,000,000,000 | 3 | Fix #122 | Safe | 125 | {"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"... |
static void perf_event_addr_filters_apply(struct perf_event *event)
{
struct perf_addr_filters_head *ifh = perf_event_addr_filters(event);
struct task_struct *task = READ_ONCE(event->ctx->task);
struct perf_addr_filter *filter;
struct mm_struct *mm = NULL;
unsigned int count = 0;
unsigned long flags;
/*
* We ... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 151,325,636,792,174,410,000,000,000,000,000,000,000 | 47 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... | Safe | 362 | {"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour... |
void jpc_qmfb_join_row(jpc_fix_t *a, int numcols, int parity)
{
int bufsize = JPC_CEILDIVPOW2(numcols, 1);
#if !defined(HAVE_VLA)
jpc_fix_t joinbuf[QMFB_JOINBUFSIZE];
#else
jpc_fix_t joinbuf[bufsize];
#endif
jpc_fix_t *buf = joinbuf;
register jpc_fix_t *srcptr;
register jpc_fix_t *dstptr;
register int n;
int h... | 1 | [
"CWE-119"
] | jasper | 0d64bde2b3ba7e1450710d540136a8ce4199ef30 | 187,536,757,693,769,980,000,000,000,000,000,000,000 | 63 | CVE-2014-8158 | Vulnerable | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
static bool imap_matchresp(const char *line, size_t len, const char *cmd)
{
const char *end = line + len;
size_t cmd_len = strlen(cmd);
/* Skip the untagged response marker */
line += 2;
/* Do we have a number after the marker? */
if(line < end && ISDIGIT(*line)) {
/* Skip the number */
do
l... | 0 | [
"CWE-119"
] | curl | 13c9a9ded3ae744a1e11cbc14e9146d9fa427040 | 194,225,909,348,103,520,000,000,000,000,000,000,000 | 30 | imap: if a FETCH response has no size, don't call write callback
CVE-2017-1000257
Reported-by: Brian Carpenter and 0xd34db347
Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586 | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
MagickPrivate Cursor XMakeCursor(Display *display,Window window,
Colormap colormap,char *background_color,char *foreground_color)
{
#define scope_height 17
#define scope_x_hot 8
#define scope_y_hot 8
#define scope_width 17
static const unsigned char
scope_bits[] =
{
0x80, 0x03, 0x00, 0x80, 0x02, 0x00... | 0 | [] | ImageMagick | f391a5f4554fe47eb56d6277ac32d1f698572f0e | 84,544,752,095,171,470,000,000,000,000,000,000,000 | 60 | https://github.com/ImageMagick/ImageMagick/issues/1531 | Safe | null | null |
struct vmx_uret_msr *vmx_find_uret_msr(struct vcpu_vmx *vmx, u32 msr)
{
int i;
i = kvm_find_user_return_msr(msr);
if (i >= 0)
return &vmx->guest_uret_msrs[i];
return NULL;
} | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 26,047,734,032,697,777,000,000,000,000,000,000,000 | 9 | KVM: x86: do not report a vCPU as preempted outside instruction boundaries
If a vCPU is outside guest mode and is scheduled out, it might be in the
process of making a memory access. A problem occurs if another vCPU uses
the PV TLB flush feature during the period when the vCPU is scheduled
out, and a virtual address ... | Safe | 703 | {"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"... |
TEST_F(ConnectionManagerUtilityTest, PipeAddressInvalidXFFtDontUseRemote) {
connection_.stream_info_.downstream_address_provider_->setRemoteAddress(
std::make_shared<Network::Address::PipeInstance>("/blah"));
ON_CALL(config_, useRemoteAddress()).WillByDefault(Return(false));
TestRequestHeaderMapImpl headers... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 108,706,892,871,265,120,000,000,000,000,000,000,000 | 10 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> | Safe | 22 | {"cwe_id": "CWE-22", "vulnerability_type": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", "description": "The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product ... |
static int x509parse_verify_top(
x509_cert *child, x509_cert *trust_ca,
x509_crl *ca_crl, int path_cnt, int *flags,
int (*f_vrfy)(void *, x509_cert *, int, int *),
void *p_vrfy )
{
int hash_id, ret;
int ca_flags = 0, check_path_cnt = path_cnt + 1;
... | 1 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 298,200,956,554,714,570,000,000,000,000,000,000,000 | 99 | RSA blinding on CRT operations to counter timing attacks | Vulnerable | 310 | null |
parse_fcall_arguments_20(StringInfo msgBuf, struct fp_info * fip,
FunctionCallInfo fcinfo)
{
int nargs;
int i;
StringInfoData abuf;
nargs = pq_getmsgint(msgBuf, 4); /* # of arguments */
if (fip->flinfo.fn_nargs != nargs || nargs > FUNC_MAX_ARGS)
ereport(ERROR,
(errcode(ERRCODE_PROTOCOL_VIOLATION... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 243,179,008,450,252,600,000,000,000,000,000,000,000 | 70 | 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... | Safe | 89 | {"cwe_id": "CWE-89", "vulnerability_type": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes spec... |
static int muscle_pin_cmd(sc_card_t *card, struct sc_pin_cmd_data *cmd,
int *tries_left)
{
muscle_private_t* priv = MUSCLE_DATA(card);
const int bufferLength = MSC_MAX_PIN_COMMAND_LENGTH;
u8 buffer[MSC_MAX_PIN_COMMAND_LENGTH];
switch(cmd->cmd) {
case SC_PIN_CMD_VERIFY:
switch(cmd->pin_type) {
case SC_AC_CH... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 26,876,968,827,268,857,000,000,000,000,000,000,000 | 67 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. | Safe | 415 | {"cwe_id": "CWE-415", "vulnerability_type": "Double Free", "description": "The product calls free() twice on the same memory address.", "severity": "High", "category": "Double-free", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands"], "languages": [null, "C", "C++"], "example": "Example not extracted"... |
gs_currentlabicc(const gs_gstate * pgs, gs_param_string * pval)
{
static const char *const rfs = LAB_ICC;
pval->data = (const byte *)( (pgs->icc_manager->lab_profile == NULL) ?
rfs : pgs->icc_manager->lab_profile->name);
pval->size = strlen((const char *)pval->data);
pval->persi... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 29,076,000,479,453,784,000,000,000,000,000,000,000 | 9 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. | Safe | null | null |
static int hclge_tm_pg_weight_cfg(struct hclge_dev *hdev, u8 pg_id,
u8 dwrr)
{
struct hclge_pg_weight_cmd *weight;
struct hclge_desc desc;
hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_TM_PG_WEIGHT, false);
weight = (struct hclge_pg_weight_cmd *)desc.data;
weight->pg_id = pg_id;
weight->dwrr = dwrr;
retu... | 0 | [
"CWE-125"
] | linux | 04f25edb48c441fc278ecc154c270f16966cbb90 | 147,076,865,354,741,940,000,000,000,000,000,000,000 | 15 | net: hns3: add some error checking in hclge_tm module
When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the
hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg
with vport->vport_id as pri_id, which is used as index for
hdev->tm_info.tc_info, it will cause out of bound access issue
if vport_id is e... | Safe | 125 | {"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"... |
ex_spellinfo(exarg_T *eap UNUSED)
{
int lpi;
langp_T *lp;
char_u *p;
if (no_spell_checking(curwin))
return;
msg_start();
for (lpi = 0; lpi < curwin->w_s->b_langp.ga_len && !got_int; ++lpi)
{
lp = LANGP_ENTRY(curwin->w_s->b_langp, lpi);
msg_puts("file: ");
msg_puts((char *)lp->lp_slang... | 0 | [
"CWE-416"
] | vim | 2813f38e021c6e6581c0c88fcf107e41788bc835 | 170,868,960,998,449,680,000,000,000,000,000,000,000 | 25 | patch 8.2.5072: using uninitialized value and freed memory in spell command
Problem: Using uninitialized value and freed memory in spell command.
Solution: Initialize "attr". Check for empty line early. | Safe | 416 | {"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An... |
static int apply_lock_personality(const Unit* u, const ExecContext *c) {
unsigned long personality;
int r;
assert(u);
assert(c);
if (!c->lock_personality)
return 0;
if (skip_seccomp_unavailable(u, "LockPersonality="))
return 0;
... | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 232,384,177,537,031,840,000,000,000,000,000,000,000 | 25 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= | Safe | 269 | {"cwe_id": "CWE-269", "vulnerability_type": "Improper Privilege Management", "description": "The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.", "severity": "Medium", "category": null, "impact": ["Gain Privileges or Assume Ide... |
static int usb_audio_resume(struct usb_interface *intf)
{
return __usb_audio_resume(intf, false);
} | 0 | [
"CWE-284",
"CWE-125"
] | linux | bfc81a8bc18e3c4ba0cbaa7666ff76be2f998991 | 201,610,099,419,156,400,000,000,000,000,000,000,000 | 4 | ALSA: usb-audio: Check out-of-bounds access by corrupted buffer descriptor
When a USB-audio device receives a maliciously adjusted or corrupted
buffer descriptor, the USB-audio driver may access an out-of-bounce
value at its parser. This was detected by syzkaller, something like:
BUG: KASAN: slab-out-of-bounds in ... | Safe | 284 | {"cwe_id": "CWE-284", "vulnerability_type": "Improper Access Control", "description": "The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.", "severity": null, "category": "Authorization", "impact": ["Varies by Context"], "languages": [null], "example": "Example not ex... |
static inline void skcipher_map_src(struct skcipher_walk *walk)
{
walk->src.virt.addr = skcipher_map(&walk->in);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 9933e113c2e87a9f46a40fde8dafbf801dca1ab9 | 195,660,362,794,390,050,000,000,000,000,000,000,000 | 4 | crypto: skcipher - Add missing API setkey checks
The API setkey checks for key sizes and alignment went AWOL during the
skcipher conversion. This patch restores them.
Cc: <stable@vger.kernel.org>
Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...")
Reported-by: Baozeng <sploving1@gmail.com>
Signed-of... | Safe | 476 | {"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory... |
static int cache_constructor(void *buffer, void *notused1, int notused2) {
uint64_t *ptr = buffer;
*ptr = constructor_pattern;
return 0;
} | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 179,441,902,230,978,140,000,000,000,000,000,000,000 | 5 | Issue 102: Piping null to the server will crash it | Safe | 20 | {"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca... |
void smbd_setup_sig_term_handler(void)
{
struct tevent_signal *se;
se = tevent_add_signal(smbd_event_context(),
smbd_event_context(),
SIGTERM, 0,
smbd_sig_term_handler,
NULL);
if (!se) {
exit_server("failed to setup SIGTERM handler");
}
} | 0 | [] | samba | 25452a2268ac7013da28125f3df22085139af12d | 92,826,467,451,234,300,000,000,000,000,000,000,000 | 13 | s3: Fix a NULL pointer dereference
Found by Laurent Gaffie <laurent.gaffie@gmail.com>.
Thanks!
Volker | Safe | null | null |
String *Item::val_string_from_decimal(String *str)
{
my_decimal dec_buf, *dec= val_decimal(&dec_buf);
if (null_value)
return 0;
my_decimal_round(E_DEC_FATAL_ERROR, dec, decimals, FALSE, &dec_buf);
my_decimal2string(E_DEC_FATAL_ERROR, &dec_buf, 0, 0, 0, str);
return str;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 310,436,726,339,099,200,000,000,000,000,000,000,000 | 9 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... | Safe | null | null |
xmlGzfileOpen_real (const char *filename) {
const char *path = NULL;
gzFile fd;
if (!strcmp(filename, "-")) {
int duped_fd = dup(fileno(stdin));
fd = gzdopen(duped_fd, "rb");
if (fd == Z_NULL && duped_fd >= 0) {
close(duped_fd); /* gzdOpen() does not close on failure */... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 80,837,665,535,525,350,000,000,000,000,000,000,000 | 41 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. | Safe | 134 | {"cwe_id": "CWE-134", "vulnerability_type": "Use of Externally-Controlled Format String", "description": "The product uses a function that accepts a format string as an argument, but the format string originates from an external source.", "severity": "High", "category": null, "impact": ["Read Memory", "Modify Memory", ... |
static struct tcp_md5sig_key *tcp_v4_reqsk_md5_lookup(struct sock *sk,
struct request_sock *req)
{
return tcp_v4_md5_do_lookup(sk, inet_rsk(req)->rmt_addr);
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 34,717,852,640,722,366,000,000,000,000,000,000,000 | 5 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... | Safe | 362 | {"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour... |
cmsPipeline* BuildGrayInputMatrixPipeline(cmsHPROFILE hProfile)
{
cmsToneCurve *GrayTRC;
cmsPipeline* Lut;
cmsContext ContextID = cmsGetProfileContextID(hProfile);
GrayTRC = (cmsToneCurve *) cmsReadTag(hProfile, cmsSigGrayTRCTag);
if (GrayTRC == NULL) return NULL;
Lut = cmsPipelineAlloc(Contex... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 268,677,697,396,429,050,000,000,000,000,000,000,000 | 49 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... | Safe | null | null |
cql_server::connection::parse_frame(temporary_buffer<char> buf) const {
if (buf.size() != frame_size()) {
throw cql_frame_error();
}
cql_binary_frame_v3 v3;
switch (_version) {
case 1:
case 2: {
cql_binary_frame_v1 raw = read_unaligned<cql_binary_frame_v1>(buf.get());
aut... | 0 | [] | scylladb | 1c2eef384da439b0457b6d71c7e37d7268e471cb | 240,970,160,559,743,600,000,000,000,000,000,000,000 | 32 | transport/server.cc: Return correct size of decompressed lz4 buffer
An incorrect size is returned from the function, which could lead to
crashes or undefined behavior. Fix by erroring out in these cases.
Fixes #11476 | Safe | null | null |
static void selinux_inode_getsecid(struct inode *inode, u32 *secid)
{
struct inode_security_struct *isec = inode_security_novalidate(inode);
*secid = isec->sid;
} | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 114,872,486,191,281,190,000,000,000,000,000,000,000 | 5 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... | Safe | 682 | {"cwe_id": "CWE-682", "vulnerability_type": "Incorrect Calculation", "description": "The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.", "severity": "High", "category": null, "impact": ["DoS: Crash, Exit, or Resta... |
GuestFsfreezeStatus qmp_guest_fsfreeze_status(Error **errp)
{
if (ga_is_frozen(ga_state)) {
return GUEST_FSFREEZE_STATUS_FROZEN;
}
return GUEST_FSFREEZE_STATUS_THAWED;
} | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 112,433,831,483,360,430,000,000,000,000,000,000,000 | 8 | qga: check bytes count read by guest-file-read
While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Pra... | Safe | 190 | {"cwe_id": "CWE-190", "vulnerability_type": "Integer Overflow or Wraparound", "description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n assumes that the resulting value will always be larger than\n the original value. This occurs whe... |
static bool ext4_mb_discard_preallocations_should_retry(struct super_block *sb,
struct ext4_allocation_context *ac, u64 *seq)
{
int freed;
u64 seq_retry = 0;
bool ret = false;
freed = ext4_mb_discard_preallocations(sb, ac->ac_o_ex.fe_len);
if (freed) {
ret = true;
goto out_dbg;
}
seq_retry = ext4_get_dis... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 248,778,111,726,657,030,000,000,000,000,000,000,000 | 23 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... | Safe | 703 | {"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"... |
static void kvm_null_fn(void)
{
} | 0 | [
"CWE-119"
] | linux | f8be156be163a052a067306417cd0ff679068c97 | 312,889,856,217,513,500,000,000,000,000,000,000,000 | 4 | KVM: do not allow mapping valid but non-reference-counted pages
It's possible to create a region which maps valid but non-refcounted
pages (e.g., tail pages of non-compound higher order allocations). These
host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family
of APIs, which take a reference to the p... | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
static void sycc444_to_rgb(opj_image_t *img)
{
int *d0, *d1, *d2, *r, *g, *b;
const int *y, *cb, *cr;
size_t maxw, maxh, max, i;
int offset, upb;
upb = (int)img->comps[0].prec;
offset = 1 << (upb - 1);
upb = (1 << upb) - 1;
maxw = (size_t)img->comps[0].w;
maxh = (size_t)img->comps[... | 0 | [
"CWE-119",
"CWE-787"
] | openjpeg | 2e5ab1d9987831c981ff05862e8ccf1381ed58ea | 255,112,047,581,158,700,000,000,000,000,000,000,000 | 50 | color_apply_icc_profile: avoid potential heap buffer overflow
Derived from a patch by Thuan Pham | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
static inline Quantum GetPixelCb(const Image *magick_restrict image,
const Quantum *magick_restrict pixel)
{
return(pixel[image->channel_map[CbPixelChannel].offset]);
} | 0 | [
"CWE-20",
"CWE-125"
] | ImageMagick | 8187d2d8fd010d2d6b1a3a8edd935beec404dddc | 170,891,943,050,300,050,000,000,000,000,000,000,000 | 5 | https://github.com/ImageMagick/ImageMagick/issues/1610 | Safe | 20 | {"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca... |
const SSL_METHOD *SSL_get_ssl_method(SSL *s)
{
return (s->method);
} | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 331,125,133,938,387,180,000,000,000,000,000,000,000 | 4 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... | Safe | 310 | null |
file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
int mode, int text)
{
struct mlist *ml;
int rv, printed_something = 0, need_separator = 0;
for (ml = ms->mlist[0]->next; ml != ms->mlist[0]; ml = ml->next)
if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, 0, mode,
text, ... | 1 | [
"CWE-755"
] | file | cc9e74dfeca5265ad725acc926ef0b8d2a18ee70 | 217,397,006,285,654,200,000,000,000,000,000,000,000 | 13 | count indirect recursion as recursion. | Vulnerable | 755 | {"cwe_id": "CWE-755", "vulnerability_type": "Improper Handling of Exceptional Conditions", "description": "The product does not handle or incorrectly handles an exceptional condition.", "severity": "Medium", "category": null, "impact": ["Other"], "languages": [null], "example": "Example not extracted"} |
static int shmem_xattr_validate(const char *name)
{
struct { const char *prefix; size_t len; } arr[] = {
{ XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN },
{ XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN }
};
int i;
for (i = 0; i < ARRAY_SIZE(arr); i++) {
size_t preflen = arr[i].len;
if (strncmp(name, ... | 0 | [
"CWE-399"
] | linux | 5f00110f7273f9ff04ac69a5f85bb535a4fd0987 | 325,866,823,133,486,550,000,000,000,000,000,000,000 | 18 | tmpfs: fix use-after-free of mempolicy object
The tmpfs remount logic preserves filesystem mempolicy if the mpol=M
option is not specified in the remount request. A new policy can be
specified if mpol=M is given.
Before this patch remounting an mpol bound tmpfs without specifying
mpol= mount option in the remount re... | Safe | 399 | null |
void sctp_transport_set_owner(struct sctp_transport *transport,
struct sctp_association *asoc)
{
transport->asoc = asoc;
sctp_association_hold(asoc);
} | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 265,164,529,241,474,570,000,000,000,000,000,000,000 | 6 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... | Safe | null | null |
njs_string_trim(const njs_value_t *value, njs_string_prop_t *string,
unsigned mode)
{
uint32_t cp, trim;
const u_char *p, *prev, *start, *end;
njs_unicode_decode_t ctx;
trim = 0;
njs_string_prop(string, value);
start = string->start;
end = string->start + string... | 1 | [
"CWE-125"
] | njs | b9aea5854bcf6f2de8f7a7f1550874e392b94be2 | 192,938,964,584,723,960,000,000,000,000,000,000,000 | 114 | Fixed String.prototype.trimEnd() with unicode string.
Previously, when the method was invoked with a string consisting of space
characters and at least one of them was a Unicode space separator (code
point above 127) it returned invalid string value with non-zero size
but zero length.
The fix is to update the size of... | Vulnerable | 125 | {"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"... |
static int verify_ca(const gnutls_datum_t *raw_crt, unsigned raw_crt_size,
gnutls_certificate_type_t crt_type,
dane_cert_type_t ctype,
dane_match_type_t match, gnutls_datum_t * data,
unsigned int *verify)
{
gnutls_datum_t pubkey = {NULL, 0};
int ret;
unsigned int vstatus;
gnutls_x509_crt_t crt =... | 0 | [
"CWE-119"
] | gnutls | ed51e5e53cfbab3103d6b7b85b7ba4515e4f30c3 | 172,309,357,150,202,180,000,000,000,000,000,000,000 | 85 | Adding dane_raw_tlsa to allow initialization of dane_query_t from DANE records based on external DNS resolutions. Also fixing a buffer overflow.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org> | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
static void sony_state_worker(struct work_struct *work)
{
struct sony_sc *sc = container_of(work, struct sony_sc, state_worker);
sc->send_output_report(sc);
} | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 228,477,216,932,867,700,000,000,000,000,000,000,000 | 6 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... | Safe | 787 | {"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest... |
void sctp_association_free(struct sctp_association *asoc)
{
struct sock *sk = asoc->base.sk;
struct sctp_transport *transport;
struct list_head *pos, *temp;
int i;
/* Only real associations count against the endpoint, so
* don't bother for if this is a temporary association.
*/
if (!asoc->temp) {
list_del(... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 262,868,281,047,172,930,000,000,000,000,000,000,000 | 82 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... | Safe | null | null |
static int nl80211_tx_control_port(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;
const u8 *buf;
size_t len;
u8 *dest;
u16 proto;
bool noencrypt;
int err;
i... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 151,143,738,774,350,000,000,000,000,000,000,000,000 | 61 | 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... | Safe | 120 | {"cwe_id": "CWE-120", "vulnerability_type": "Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')", "description": "The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.", "severity": "High", "category": "... |
RGB_to_HWB (RGBType RGB, HWBType * HWB)
{
/*
* RGB are each on [0, 1]. W and B are returned on [0, 1] and H is
* returned on [0, 6]. Exception: H is returned UNDEFINED if W == 1 - B.
*/
float R = RGB.R, G = RGB.G, B = RGB.B, w, v, b, f;
int i;
w = MIN3 (R, G, B);
v = MAX3 (R, G, B);
b = 1 - ... | 0 | [
"CWE-119"
] | php-src | feba44546c27b0158f9ac20e72040a224b918c75 | 206,133,727,676,847,960,000,000,000,000,000,000,000 | 21 | Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()). | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
static void opj_j2k_read_float32_to_float(const void * p_src_data,
void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_FLOAT32 * l_dest_data = (OPJ_FLOAT32 *) p_dest_data;
OPJ_UINT32 i;
OPJ_FLOAT32 l_temp;
for (i = 0; i < p_nb_elem; ++i) {
... | 0 | [
"CWE-416",
"CWE-787"
] | openjpeg | 4241ae6fbbf1de9658764a80944dc8108f2b4154 | 280,512,053,876,225,330,000,000,000,000,000,000,000 | 16 | Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985) | Safe | 416 | {"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An... |
CImg<T>& load_yuv(const char *const filename,
const unsigned int size_x, const unsigned int size_y=1,
const unsigned int chroma_subsampling=444,
const unsigned int first_frame=0, const unsigned int last_frame=~0U,
const unsigned... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 278,225,055,055,944,700,000,000,000,000,000,000,000 | 8 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. | Safe | 770 | {"cwe_id": "CWE-770", "vulnerability_type": "Allocation of Resources Without Limits or Throttling", "description": "The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.", "severity": "Hi... |
inline int qs_strncmp(const char * s, const char * qs, size_t n)
{
int i=0;
unsigned char u1, u2, unyb, lnyb;
while(n-- > 0)
{
u1 = static_cast<unsigned char>(*s++);
u2 = static_cast<unsigned char>(*qs++);
if ( ! CROW_QS_ISQSCHR(u1) ) { u1 = '\0'; }
if ( ! CROW_QS_ISQ... | 0 | [
"CWE-703"
] | Crow | 79eec91f00b5fb7df890d4e84b2f048b0841e044 | 199,020,897,528,128,240,000,000,000,000,000,000,000 | 46 | Fixed issue where an index in qs_parse is incorrectly incremented beyond the maximum possible value | Safe | 703 | {"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"... |
static int b43_op_add_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct b43_wl *wl = hw_to_b43_wl(hw);
struct b43_wldev *dev;
int err = -EOPNOTSUPP;
/* TODO: allow WDS/AP devices to coexist */
if (vif->type != NL80211_IFTYPE_AP &&
vif->type != NL80211_IFTYPE_MESH_POINT &&
vif->... | 0 | [
"CWE-134"
] | wireless | 9538cbaab6e8b8046039b4b2eb6c9d614dc782bd | 146,252,226,478,943,850,000,000,000,000,000,000,000 | 42 | b43: stop format string leaking into error msgs
The module parameter "fwpostfix" is userspace controllable, unfiltered,
and is used to define the firmware filename. b43_do_request_fw() populates
ctx->errors[] on error, containing the firmware filename. b43err()
parses its arguments as a format string. For systems with... | Safe | 134 | {"cwe_id": "CWE-134", "vulnerability_type": "Use of Externally-Controlled Format String", "description": "The product uses a function that accepts a format string as an argument, but the format string originates from an external source.", "severity": "High", "category": null, "impact": ["Read Memory", "Modify Memory", ... |
http_DoConnection(const struct http *hp)
{
char *p, *q;
const char *ret;
unsigned u;
if (!http_GetHdr(hp, H_Connection, &p)) {
if (hp->protover < 11)
return ("not HTTP/1.1");
return (NULL);
}
ret = NULL;
AN(p);
for (; *p; p++) {
if (vct_issp(*p))
continue;
if (*p == ',')
continue;
for (q = p... | 0 | [] | Varnish-Cache | 29870c8fe95e4e8a672f6f28c5fbe692bea09e9c | 339,883,136,839,941,470,000,000,000,000,000,000,000 | 33 | Check for duplicate Content-Length headers in requests
If a duplicate CL header is in the request, we fail the request with a
400 (Bad Request)
Fix a test case that was sending duplicate CL by misstake and would
not fail because of that. | Safe | null | null |
static int
unquoted_substring (substr, string)
char *substr, *string;
{
size_t slen;
int sindex, c, sublen;
DECLARE_MBSTATE;
if (substr == 0 || *substr == '\0')
return (0);
slen = strlen (string);
sublen = strlen (substr);
for (sindex = 0; c = string[sindex]; )
{
if (STREQN (string + ... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 291,340,993,737,088,530,000,000,000,000,000,000,000 | 40 | Bash-4.4 patch 7 | Safe | 20 | {"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca... |
static inline void exit_pi_state_list(struct task_struct *curr) { } | 0 | [
"CWE-416"
] | tip | 8019ad13ef7f64be44d4f892af9c840179009254 | 73,100,928,423,911,690,000,000,000,000,000,000,000 | 1 | futex: Fix inode life-time issue
As reported by Jann, ihold() does not in fact guarantee inode
persistence. And instead of making it so, replace the usage of inode
pointers with a per boot, machine wide, unique inode identifier.
This sequence number is global, but shared (file backed) futexes are
rare enough that thi... | Safe | 416 | {"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An... |
static void ExportBlueQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
unsigned char *magick_restrict q,ExceptionInfo *exception)
{
QuantumAny
range;
ssize_t
x;
assert(exception != (ExceptionInfo *) NULL);
assert(exception->... | 0 | [
"CWE-190"
] | ImageMagick | 5af1dffa4b6ab984b5f13d1e91c95760d75f12a6 | 27,913,983,020,202,510,000,000,000,000,000,000,000 | 104 | outside the range of representable values of type 'unsigned char' (#3083)
Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com> | Safe | 190 | {"cwe_id": "CWE-190", "vulnerability_type": "Integer Overflow or Wraparound", "description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n assumes that the resulting value will always be larger than\n the original value. This occurs whe... |
__fastcall TNullConsole::TNullConsole()
{
}
| 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 60,695,396,190,161,520,000,000,000,000,000,000,000 | 3 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b | Safe | 787 | {"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest... |
static int bcf1_sync(bcf1_t *line)
{
char *shared_ori = line->shared.s;
size_t prev_len;
kstring_t tmp = {0,0,0};
if ( !line->shared.l )
{
// New line created via API, BCF data blocks do not exist. Get it ready for BCF output
tmp = line->shared;
bcf1_sync_id(line, &tmp);
... | 0 | [
"CWE-787"
] | htslib | dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c | 257,393,337,503,667,730,000,000,000,000,000,000,000 | 141 | Fix check for VCF record size
The check for excessive record size in vcf_parse_format() only
looked at individual fields. It was therefore possible to
exceed the limit and overflow fmt_aux_t::offset by having
multiple fields with a combined size that went over INT_MAX.
Fix by including the amount of memory used so fa... | Safe | 787 | {"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest... |
shell_gtk_embed_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
ShellGtkEmbed *embed = SHELL_GTK_EMBED (object);
switch (prop_id)
{
case PROP_WINDOW:
... | 0 | [] | gnome-shell | 90c55e1977fde252b79bcfd9d0ef41144fb21fe2 | 105,348,679,898,879,170,000,000,000,000,000,000,000 | 18 | gtk-embed: ensure we only listen for window-created events once
If a tray icon gets a mapped and unmapped and the mapped again
in quick succession, we can end up with multiple handlers
listening for window creation events.
This commit tries to guard against that by only listening for
window-created events when we don... | Safe | null | null |
static OPJ_BOOL opj_j2k_read_mct ( opj_j2k_t *p_j2k,
OPJ_BYTE * p_header_data,
OPJ_UINT32 p_header_size,
opj_ev... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 207,437,506,341,875,800,000,000,000,000,000,000,000 | 105 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 | Safe | 416 | {"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An... |
dbus_service_name_handler(vector_t *strvec)
{
FREE_PTR(global_data->dbus_service_name);
global_data->dbus_service_name = set_value(strvec);
} | 0 | [
"CWE-200"
] | keepalived | c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067 | 298,458,269,325,731,300,000,000,000,000,000,000,000 | 5 | Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and also
allows the umask to be specified in the configuration or as a command
line option.
Signed-off-by: Quentin Armitage <quentin@armit... | Safe | 200 | {"cwe_id": "CWE-200", "vulnerability_type": "Exposure of Sensitive Information to an Unauthorized Actor", "description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "severity": "High", "category": "Information Disclosure", "impact": ["Re... |
gin::Handle<WebContents> WebContents::CreateFromWebPreferences(
v8::Isolate* isolate,
const gin_helper::Dictionary& web_preferences) {
// Check if webPreferences has |webContents| option.
gin::Handle<WebContents> web_contents;
if (web_preferences.GetHidden("webContents", &web_contents) &&
!web_conte... | 0 | [] | electron | 6d9f3a494596d6b3e30938af9deb2c79f1c7f797 | 283,394,422,062,888,430,000,000,000,000,000,000,000 | 25 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#34191)
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33367)
* Make ElectronBrowser mojo interface frame associated. (#32815)
Co-authored-by: Marek Haranczyk <marek@openfin.co>
* fix: e... | Safe | null | null |
static void send_ext_key_event_ack(VncState *vs)
{
vnc_lock_output(vs);
vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);
vnc_write_u8(vs, 0);
vnc_write_u16(vs, 1);
vnc_framebuffer_update(vs, 0, 0, ds_get_width(vs->ds), ds_get_height(vs->ds),
VNC_ENCODING_EXT_KEY_EVENT)... | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 298,175,812,654,554,800,000,000,000,000,000,000,000 | 11 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... | Safe | 125 | {"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"... |
GF_Err audio_sample_entry_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_MPEGAudioSampleEntryBox *ptr = (GF_MPEGAudioSampleEntryBox *)s;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_isom_audio_sample_entry_write((GF_AudioSampleEntryBox*)s, bs);
if (ptr->esd) {
e = gf_isom_box_write((GF_Box *)ptr-... | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 72,860,328,854,145,650,000,000,000,000,000,000,000 | 21 | prevent dref memleak on invalid input (#1183) | Safe | 400 | {"cwe_id": "CWE-400", "vulnerability_type": "Uncontrolled Resource Consumption", "description": "The product does not properly control the allocation and maintenance of a limited resource.", "severity": "High", "category": "Resource Exhaustion", "impact": ["DoS: Crash, Exit, or Restart", "DoS: Resource Consumption (CPU... |
ftp_type(ftpbuf_t *ftp, ftptype_t type)
{
char typechar[2] = "?";
if (ftp == NULL) {
return 0;
}
if (type == ftp->type) {
return 1;
}
if (type == FTPTYPE_ASCII) {
typechar[0] = 'A';
} else if (type == FTPTYPE_IMAGE) {
typechar[0] = 'I';
} else {
return 0;
}
if (!ftp_putcmd(ftp, "TYPE", typechar)) ... | 1 | [
"CWE-189"
] | php-src | ac2832935435556dc593784cd0087b5e576bbe4d | 108,020,963,187,932,070,000,000,000,000,000,000,000 | 27 | Fix bug #69545 - avoid overflow when reading list | Vulnerable | 189 | null |
static inline int slave_enable_netpoll(struct slave *slave)
{
struct netpoll *np;
int err = 0;
np = kzalloc(sizeof(*np), GFP_KERNEL);
err = -ENOMEM;
if (!np)
goto out;
np->dev = slave->dev;
strlcpy(np->dev_name, slave->dev->name, IFNAMSIZ);
err = __netpoll_setup(np);
if (err) {
kfree(np);
goto out;
}
... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 268,476,702,464,326,500,000,000,000,000,000,000,000 | 21 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... | Safe | 703 | {"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"... |
virDomainBlockIoTuneInfoHasBasic(const virDomainBlockIoTuneInfo *iotune)
{
return iotune->total_bytes_sec ||
iotune->read_bytes_sec ||
iotune->write_bytes_sec ||
iotune->total_iops_sec ||
iotune->read_iops_sec ||
iotune->write_iops_sec;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 76,241,070,674,799,360,000,000,000,000,000,000,000 | 9 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... | Safe | 212 | {"cwe_id": "CWE-212", "vulnerability_type": "Improper Removal of Sensitive Information Before Storage or Transfer", "description": "The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to... |
void sock_enable_timestamps(struct sock *sk)
{
lock_sock(sk);
__sock_set_timestamps(sk, true, false, true);
release_sock(sk);
} | 0 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 236,801,739,410,319,800,000,000,000,000,000,000,000 | 6 | af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations
are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred.
In order to fix this issue, this patch adds a new spinlock that needs
to be used whenever these fields are read o... | Safe | null | null |
static bool HHVM_METHOD(ZipArchive, extractTo, const String& destination,
const Variant& entries) {
auto zipDir = getResource<ZipDirectory>(this_, "zipDir");
FAIL_IF_INVALID_ZIPARCHIVE(extractTo, zipDir);
FAIL_IF_EMPTY_STRING_ZIPARCHIVE(extractTo, destination);
auto fileCount = zip_get... | 0 | [
"CWE-22"
] | hhvm | 65c95a01541dd2fbc9c978ac53bed235b5376686 | 1,406,847,852,894,938,600,000,000,000,000,000,000 | 56 | ZipArchive::extractTo bug 70350
Summary:Don't allow upward directory traversal when extracting zip archive files.
Files in zip files with `..` or starting at main root `/` should be normalized
to something where the file being extracted winds up within the directory or
a subdirectory where the actual extraction is ta... | Safe | 22 | {"cwe_id": "CWE-22", "vulnerability_type": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", "description": "The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product ... |
int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
int flags, int *addr_len)
{
struct inet_sock *inet = inet_sk(sk);
DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name);
struct sk_buff *skb;
unsigned int ulen, copied;
int peeked, off = 0;
int err;
int is_udplite = IS_UDPLITE(s... | 0 | [
"CWE-358"
] | linux | 197c949e7798fbf28cfadc69d9ca0c2abbf93191 | 274,902,792,227,602,660,000,000,000,000,000,000,000 | 101 | udp: properly support MSG_PEEK with truncated buffers
Backport of this upstream commit into stable kernels :
89c22d8c3b27 ("net: Fix skb csum races when peeking")
exposed a bug in udp stack vs MSG_PEEK support, when user provides
a buffer smaller than skb payload.
In this case,
skb_copy_and_csum_datagram_iovec(skb, s... | Safe | 358 | {"cwe_id": "CWE-358", "vulnerability_type": "Improperly Implemented Security Check for Standard", "description": "The product does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.", "severity": null, "category": ... |
inline void bindValue(int pos, const QVariant &val) { _query->bindValue(pos, val); } | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 154,254,448,497,824,320,000,000,000,000,000,000,000 | 1 | Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL.
Properly detects whether Qt performs slash escaping in SQL queries or
not, and then configures PostgreSQL accordingly. This bug was a
introduced due to a bugfix in Qt 4.8.5 disables slash escaping when
binding queries: https://bugreports.qt-project.org/brows... | Safe | 89 | {"cwe_id": "CWE-89", "vulnerability_type": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes spec... |
static void virtio_scsi_common_class_init(ObjectClass *klass, void *data)
{
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
vdc->get_config = virtio_scsi_get_config;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} | 0 | [
"CWE-119"
] | qemu | 3c3ce981423e0d6c18af82ee62f1850c2cda5976 | 137,524,165,570,893,660,000,000,000,000,000,000,000 | 8 | virtio-scsi: fix buffer overrun on invalid state load
CVE-2013-4542
hw/scsi/scsi-bus.c invokes load_request.
virtio_scsi_load_request does:
qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem));
this probably can make elem invalid, for example,
make in_num or out_num huge, then:
virtio_scsi_p... | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
enum addr_type_t type)
{
int idx, ip_idx;
int s_idx, s_ip_idx;
int err = 1;
struct net_device *dev;
struct inet6_dev *idev = NULL;
struct inet6_ifaddr *ifa;
struct ifmcaddr6 *ifmca;
struct ifacaddr6 *ifaca;
s_idx = cb->args[0];... | 0 | [
"CWE-200"
] | linux-2.6 | 8a47077a0b5aa2649751c46e7a27884e6686ccbf | 60,194,136,961,235,650,000,000,000,000,000,000,000 | 94 | [NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | Safe | 200 | {"cwe_id": "CWE-200", "vulnerability_type": "Exposure of Sensitive Information to an Unauthorized Actor", "description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "severity": "High", "category": "Information Disclosure", "impact": ["Re... |
onig_print_statistics(FILE* f)
{
int r;
int i;
r = fprintf(f, " count prev time\n");
if (r < 0) return -1;
for (i = 0; OpInfo[i].opcode >= 0; i++) {
r = fprintf(f, "%8d: %8d: %10ld: %s\n",
OpCounter[i], OpPrevCounter[i], OpTime[i], OpInfo[i].name);
if (r < 0) return -1;... | 0 | [
"CWE-125"
] | oniguruma | d3e402928b6eb3327f8f7d59a9edfa622fec557b | 45,465,367,705,734,420,000,000,000,000,000,000,000 | 18 | fix heap-buffer-overflow | Safe | 125 | {"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"... |
njs_is_data_descriptor(njs_object_prop_t *prop)
{
return prop->writable != NJS_ATTRIBUTE_UNSET || njs_is_valid(&prop->value);
} | 1 | [] | njs | 6549d49630ce5f5ac823fd3ae0c6c8558b8716ae | 144,750,219,618,982,430,000,000,000,000,000,000,000 | 4 | Fixed redefinition of special props in Object.defineProperty().
Previously, when NJS_PROPERTY_HANDLER property was updated it might be
left in inconsistent state. Namely, prop->type was left unchanged, but
prop->value did not have an expected property handler. As a result
consecutive reference to the property may re... | Vulnerable | null | null |
Reprog *regcomp(const char *pattern, int cflags, const char **errorp)
{
return regcompx(default_alloc, NULL, pattern, cflags, errorp);
} | 0 | [
"CWE-703",
"CWE-674"
] | mujs | 160ae29578054dc09fd91e5401ef040d52797e61 | 81,620,656,461,592,070,000,000,000,000,000,000,000 | 4 | Issue #162: Check stack overflow during regexp compilation.
Only bother checking during the first compilation pass that counts
the size of the program. | Safe | 703 | {"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"... |
uint32_t CompactProtocolWriter::serializedSizeZCBinary(IOBuf const& v) const {
size_t size = v.computeChainDataLength();
return (size > folly::IOBufQueue::kMaxPackCopy)
? serializedSizeI32() // too big to pack: size only
: size + serializedSizeI32(); // size + packed data
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 297,087,674,557,397,760,000,000,000,000,000,000,000 | 6 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... | Safe | 703 | {"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"... |
}
inline int mod(const bool x, const bool m) {
return m?(x?1:0):0; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 286,825,916,469,323,730,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. | Safe | 125 | {"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"... |
static void ql_phy_start_neg_ex(struct ql3_adapter *qdev)
{
u16 reg;
u16 portConfiguration;
if (qdev->phyType == PHY_AGERE_ET1011C)
ql_mii_write_reg(qdev, 0x13, 0x0000);
/* turn off external loopback */
if (qdev->mac_index == 0)
portConfiguration =
qdev->nvram_data.macCfg_port0.portConfiguration;
els... | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 82,655,103,686,843,560,000,000,000,000,000,000,000 | 72 | net: qlogic: Fix memory leak in ql_alloc_large_buffers
In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb.
This skb should be released if pci_dma_mapping_error fails.
Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue... | Safe | 401 | {"cwe_id": "CWE-401", "vulnerability_type": "Missing Release of Memory after Effective Lifetime", "description": "The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse.", "severity": "Medium", "category": "Memory Leak", "imp... |
int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address)
{
spinlock_t *ptl;
pgtable_t new = pte_alloc_one(mm, address);
if (!new)
return -ENOMEM;
/*
* Ensure all pte setup (eg. pte page lock and page clearing) are
* visible before the pte is made visible to other CPUs by being
* put into pa... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 142,136,906,930,801,850,000,000,000,000,000,000,000 | 33 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
{
u8 *tail;
int nfrags;
int esph_offset;
struct page *page;
struct sk_buff *trailer;
int tailen = esp->tailen;
unsigned int allocsz;
/* this is non-NULL only with TCP/UDP Encapsulation */
if (x->encap) {
int err = esp_outpu... | 0 | [
"CWE-787"
] | linux | ebe48d368e97d007bfeb76fcb065d6cfc4c96645 | 11,906,501,616,765,280,000,000,000,000,000,000,000 | 91 | esp: Fix possible buffer overflow in ESP transformation
The maximum message size that can be send is bigger than
the maximum site that skb_page_frag_refill can allocate.
So it is possible to write beyond the allocated buffer.
Fix this by doing a fallback to COW in that case.
v2:
Avoid get get_order() costs as sugg... | Safe | 787 | {"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest... |
static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu,
struct kvm_enable_cap *cap)
{
int r;
uint16_t vmcs_version;
void __user *user_ptr;
if (cap->flags)
return -EINVAL;
switch (cap->cap) {
case KVM_CAP_HYPERV_SYNIC2:
if (cap->args[0])
return -EINVAL;
fallthrough;
case KVM_CAP_HYPERV_SY... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 148,362,766,798,601,030,000,000,000,000,000,000,000 | 51 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... | Safe | 476 | {"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory... |
static long lp_compat_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
unsigned int minor;
struct timeval par_timeout;
int ret;
minor = iminor(file_inode(file));
mutex_lock(&lp_mutex);
switch (cmd) {
case LPSETTIMEOUT:
if (compat_get_timeval(&par_timeout, compat_ptr(arg))) {
ret = -EFAULT... | 0 | [
"CWE-787"
] | linux | 3e21f4af170bebf47c187c1ff8bf155583c9f3b1 | 124,506,607,362,284,000,000,000,000,000,000,000,000 | 31 | char: lp: fix possible integer overflow in lp_setup()
The lp_setup() code doesn't apply any bounds checking when passing
"lp=none", and only in this case, resulting in an overflow of the
parport_nr[] array. All versions in Git history are affected.
Reported-By: Roee Hay <roee.hay@hcl.com>
Cc: Ben Hutchings <ben@decad... | Safe | 787 | {"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest... |
__xfrm_policy_bysel_ctx(struct hlist_head *chain, const struct xfrm_mark *mark,
u32 if_id, u8 type, int dir, struct xfrm_selector *sel,
struct xfrm_sec_ctx *ctx)
{
struct xfrm_policy *pol;
if (!chain)
return NULL;
hlist_for_each_entry(pol, chain, bydst) {
if (pol->type == type &&
pol->if_id == if_i... | 0 | [
"CWE-703"
] | linux | f85daf0e725358be78dfd208dea5fd665d8cb901 | 56,889,288,054,817,730,000,000,000,000,000,000,000 | 20 | xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup()
xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of
pols[0]. This refcount can be dropped in xfrm_expand_policies() when
xfrm_expand_policies() return error. pols[0]'s refcount is balanced in
here. But xfrm_bundle_look... | Safe | 703 | {"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.