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 |
|---|---|---|---|---|---|---|---|---|---|---|
static char* ReadPassword(rfbClient* client) {
#ifdef __MINGW32__
/* FIXME */
rfbClientErr("ReadPassword on MinGW32 NOT IMPLEMENTED\n");
return NoPassword(client);
#else
int i;
char* p=malloc(9);
struct termios save,noecho;
p[0]=0;
if(tcgetattr(fileno(stdin),&save)!=0) return p;
noecho=save; noecho.c_lflag &= ... | 0 | [
"CWE-189"
] | libvncserver | 045a044e8ae79db9244593fbce154cdf6e843273 | 332,902,502,151,394,100,000,000,000,000,000,000,000 | 29 | Fix integer overflow in MallocFrameBuffer()
Promote integers to uint64_t to avoid integer overflow issue during
frame buffer allocation for very large screen sizes | Safe | 189 | null |
xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) {
int statenr, transnr;
xmlRegStatePtr state;
xmlRegTransPtr t1, t2, last;
int i;
int ret = 1;
int deep = 1;
#ifdef DEBUG_REGEXP_GRAPH
printf("xmlFAComputesDeterminism\n");
xmlRegPrintCtxt(stdout, ctxt);
#endif
if (ctxt->determinist... | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 200,199,813,719,123,250,000,000,000,000,000,000,000 | 140 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. | 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 ... |
server_reset(struct xrdp_mod* mod, int width, int height, int bpp)
{
struct xrdp_wm* wm;
wm = (struct xrdp_wm*)(mod->wm);
if (wm->client_info == 0)
{
return 1;
}
/* older client can't resize */
if (wm->client_info->build <= 419)
{
return 0;
}
/* if same, don't need to do anything */
if (w... | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 148,028,117,536,488,660,000,000,000,000,000,000,000 | 36 | move temp files from /tmp to /tmp/.xrdp | Safe | null | null |
onig_free(regex_t* reg)
{
if (IS_NOT_NULL(reg)) {
onig_free_body(reg);
xfree(reg);
}
} | 0 | [
"CWE-125"
] | php-src | c6e34d91b88638966662caac62c4d0e90538e317 | 50,020,436,640,344,200,000,000,000,000,000,000,000 | 7 | Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) | 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"... |
int qemu_can_send_packet(NetClientState *sender)
{
int vm_running = runstate_is_running();
if (!vm_running) {
return 0;
}
if (!sender->peer) {
return 1;
}
if (sender->peer->receive_disabled) {
return 0;
} else if (sender->peer->info->can_receive &&
!... | 1 | [
"CWE-835"
] | qemu | 705df5466c98f3efdd2b68d3b31dad86858acad7 | 196,925,148,603,897,120,000,000,000,000,000,000,000 | 20 | net: introduce qemu_receive_packet()
Some NIC supports loopback mode and this is done by calling
nc->info->receive() directly which in fact suppresses the effort of
reentrancy check that is done in qemu_net_queue_send().
Unfortunately we can't use qemu_net_queue_send() here since for
loopback there's no sender as pee... | Vulnerable | 835 | {"cwe_id": "CWE-835", "vulnerability_type": "Loop with Unreachable Exit Condition ('Infinite Loop')", "description": "The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.", "severity": null, "category": null, "impact": ["DoS: Resource Consumption (CPU)", "DoS:... |
int32_t Downstream::get_downstream_stream_id() const {
return downstream_stream_id_;
} | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 306,463,494,610,458,470,000,000,000,000,000,000,000 | 3 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. | Safe | null | null |
static void bnep_net_timeout(struct net_device *dev)
{
BT_DBG("net_timeout");
netif_wake_queue(dev);
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 32,001,925,643,102,177,000,000,000,000,000,000,000 | 5 | 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"... |
bash_execute_unix_command (count, key)
int count; /* ignored */
int key;
{
int type;
register int i, r;
intmax_t mi;
sh_parser_state_t ps;
char *cmd, *value, *ce, old_ch;
SHELL_VAR *v;
char ibuf[INT_STRLEN_BOUND(int) + 1];
Keymap cmd_xmap;
/* First, we need to find the right command to exec... | 0 | [
"CWE-273",
"CWE-787"
] | bash | 951bdaad7a18cc0dc1036bba86b18b90874d39ff | 157,367,172,380,956,200,000,000,000,000,000,000,000 | 100 | commit bash-20190628 snapshot | Safe | 273 | {"cwe_id": "CWE-273", "vulnerability_type": "Improper Check for Dropped Privileges", "description": "The product attempts to drop privileges but does not check or incorrectly checks to see if the drop succeeded.", "severity": "Medium", "category": null, "impact": ["Gain Privileges or Assume Identity", "Gain Privileges ... |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 2);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input));
const TfLiteTensor* axis;
TF_LITE_ENSUR... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 118,931,947,382,947,350,000,000,000,000,000,000,000 | 58 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... | 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"... |
applet_do_notify (NMApplet *applet,
NotifyUrgency urgency,
const char *summary,
const char *message,
const char *icon,
const char *action1,
const char *action1_label,
NotifyActionCallback action... | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 169,770,724,992,888,590,000,000,000,000,000,000,000 | 48 | editor: prevent any registration of objects on the system bus
D-Bus access-control is name-based; so requests for a specific name
are allowed/denied based on the rules in /etc/dbus-1/system.d. But
apparently apps still get a non-named service on the bus, and if we
register *any* object even though we don't have a nam... | 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... |
PCR_ERes GC_push_thread_stack(PCR_Th_T *t, PCR_Any dummy)
{
struct PCR_ThCtl_TInfoRep info;
PCR_ERes result;
info.ti_stkLow = info.ti_stkHi = 0;
result = PCR_ThCtl_GetInfo(t, &info);
GC_push_all_stack((ptr_t)(info.ti_stkLow), (ptr_t)(info.ti_stkHi));
return(result);
} | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 237,095,769,958,735,800,000,000,000,000,000,000,000 | 10 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... | 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 ... |
**/
inline cimg_long wait(const unsigned int milliseconds) {
cimg::mutex(3);
static cimg_ulong timer = cimg::time();
cimg::mutex(3,0);
return cimg::wait(milliseconds,&timer); | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 115,898,711,633,806,050,000,000,000,000,000,000,000 | 6 | . | 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 ... |
CephXTicketBlob() : secret_id(0) {} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 74,499,989,191,208,870,000,000,000,000,000,000,000 | 1 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... | Safe | 287 | {"cwe_id": "CWE-287", "vulnerability_type": "Improper Authentication", "description": "When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.", "severity": "High", "category": "authentification", "impact": ["Read Application Data", "Gain Privileges ... |
TfLiteRegistration* Register_RELU() {
static TfLiteRegistration r = {activations::ReluInit, activations::ReluFree,
activations::ReluPrepare,
activations::ReluEval};
return &r;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 282,121,259,385,496,200,000,000,000,000,000,000,000 | 6 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... | 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"... |
void StreamEncoderImpl::encodeHeader(const char* key, uint32_t key_size, const char* value,
uint32_t value_size) {
ASSERT(key_size > 0);
connection_.copyToBuffer(key, key_size);
connection_.addCharToBuffer(':');
connection_.addCharToBuffer(' ');
connection_.copyToBuffer(... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 221,711,775,306,802,040,000,000,000,000,000,000,000 | 11 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> | 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... |
parse_args (int *argcp,
const char ***argvp)
{
int total_parsed_argc = *argcp;
parse_args_recurse (argcp, argvp, FALSE, &total_parsed_argc);
} | 0 | [
"CWE-20",
"CWE-269"
] | bubblewrap | efc89e3b939b4bde42c10f065f6b7b02958ed50e | 110,630,152,153,347,520,000,000,000,000,000,000,000 | 7 | Don't create our own temporary mount point for pivot_root
An attacker could pre-create /tmp/.bubblewrap-$UID and make it a
non-directory, non-symlink (in which case mounting our tmpfs would fail,
causing denial of service), or make it a symlink under their control
(potentially allowing bad things if the protected_syml... | 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 set_tssldt_descriptor(void *d, unsigned long addr,
unsigned type, unsigned size)
{
#ifdef CONFIG_X86_64
struct ldttss_desc64 *desc = d;
memset(desc, 0, sizeof(*desc));
desc->limit0 = size & 0xFFFF;
desc->base0 = PTR_LOW(addr);
desc->base1 = PTR_MIDDLE(addr) & 0xFF;
desc->type = type;
des... | 0 | [
"CWE-119"
] | linux-2.6 | 5ac37f87ff18843aabab84cf75b2f8504c2d81fe | 222,789,762,102,524,500,000,000,000,000,000,000,000 | 18 | x86: fix ldt limit for 64 bit
Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor.
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | 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 ... |
rsvg_get_url_string (const char *str)
{
if (!strncmp (str, "url(", 4)) {
const char *p = str + 4;
int ix;
while (g_ascii_isspace (*p))
p++;
for (ix = 0; p[ix]; ix++)
if (p[ix] == ')')
return g_strndup (p, ix);
}
return NULL;
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 319,691,141,696,751,330,000,000,000,000,000,000,000 | 15 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... | Safe | null | null |
static void __exit kvm_x86_exit(void)
{
/*
* If module_init() is implemented, module_exit() must also be
* implemented to allow module unload.
*/
} | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 304,277,635,663,439,320,000,000,000,000,000,000,000 | 7 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... | Safe | 459 | {"cwe_id": "CWE-459", "vulnerability_type": "Incomplete Cleanup", "description": "The product does not properly \"clean up\" and remove temporary or supporting resources after they have been used.", "severity": null, "category": "Insufficient Cleanup", "impact": ["Other", "Read Application Data", "Modify Application Da... |
static ssize_t aio_run_iocb(struct kiocb *iocb)
{
struct kioctx *ctx = iocb->ki_ctx;
ssize_t (*retry)(struct kiocb *);
ssize_t ret;
if (!(retry = iocb->ki_retry)) {
printk("aio_run_iocb: iocb->ki_retry = NULL\n");
return 0;
}
/*
* We don't want the next retry iteration for this
* operation to start unti... | 0 | [
"CWE-190"
] | linux-2.6 | 75e1c70fc31490ef8a373ea2a4bea2524099b478 | 291,794,340,097,811,970,000,000,000,000,000,000,000 | 86 | aio: check for multiplication overflow in do_io_submit
Tavis Ormandy pointed out that do_io_submit does not do proper bounds
checking on the passed-in iocb array:
if (unlikely(nr < 0))
return -EINVAL;
if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))
retu... | 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... |
Statement_Ptr Expand::operator()(If_Ptr i)
{
Env env(environment(), true);
env_stack.push_back(&env);
call_stack.push_back(i);
Expression_Obj rv = i->predicate()->perform(&eval);
if (*rv) {
append_block(i->block());
}
else {
Block_Ptr alt = i->alternative();
if (alt) ap... | 0 | [
"CWE-476"
] | libsass | 0bc35e3d26922229d5a3e3308860cf0fcee5d1cf | 271,446,272,145,863,500,000,000,000,000,000,000,000 | 17 | Fix segfault on empty custom properties
Originally reported in sass/sassc#225
Fixes sass/sassc#225
Spec sass/sass-spec#1249 | 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... |
int do_dtls1_write(SSL *s, int type, const unsigned char *buf,
unsigned int len, int create_empty_fragment)
{
unsigned char *p, *pseq;
int i, mac_size, clear = 0;
int prefix_len = 0;
SSL3_RECORD *wr;
SSL3_BUFFER *wb;
SSL_SESSION *sess;
int bs;
/*
* first check if... | 0 | [
"CWE-189"
] | openssl | b77ab018b79a00f789b0fb85596b446b08be4c9d | 333,916,406,502,065,900,000,000,000,000,000,000,000 | 217 | Fix DTLS replay protection
The DTLS implementation provides some protection against replay attacks
in accordance with RFC6347 section 4.1.2.6.
A sliding "window" of valid record sequence numbers is maintained with
the "right" hand edge of the window set to the highest sequence number we
have received so far. Records ... | Safe | 189 | null |
struct pipe_inode_info *alloc_pipe_info(void)
{
struct pipe_inode_info *pipe;
unsigned long pipe_bufs = PIPE_DEF_BUFFERS;
struct user_struct *user = get_current_user();
unsigned long user_bufs;
unsigned int max_size = READ_ONCE(pipe_max_size);
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL_ACCOUNT);
... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 226,180,485,560,531,300,000,000,000,000,000,000,000 | 44 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... | 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... |
int sock_wake_async(struct socket_wq *wq, int how, int band)
{
if (!wq || !wq->fasync_list)
return -1;
switch (how) {
case SOCK_WAKE_WAITD:
if (test_bit(SOCKWQ_ASYNC_WAITDATA, &wq->flags))
break;
goto call_kill;
case SOCK_WAKE_SPACE:
if (!test_and_clear_bit(SOCKWQ_ASYNC_NOSPACE, &wq->flags))
break;
... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 34b88a68f26a75e4fded796f1a49c40f82234b7d | 265,797,174,748,581,420,000,000,000,000,000,000,000 | 24 | net: Fix use after free in the recvmmsg exit path
The syzkaller fuzzer hit the following use-after-free:
Call Trace:
[<ffffffff8175ea0e>] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:295
[<ffffffff851cc31a>] __sys_recvmmsg+0x6fa/0x7f0 net/socket.c:2261
[< inline >] SYSC_recvmmsg net/sock... | Safe | 241 | {"cwe_id": "CWE-241", "vulnerability_type": "Improper Handling of Unexpected Data Type", "description": "The product does not handle or incorrectly handles when a particular element is not the expected type, e.g. it expects a digit (0-9) but is provided with a letter (A-Z).", "severity": null, "category": null, "impact... |
static bool is_shidx_valid(ELFOBJ *bin, Elf_(Half) value) {
return value < bin->ehdr.e_shnum && !R_BETWEEN (SHN_LORESERVE, value, SHN_HIRESERVE);
} | 0 | [
"CWE-787"
] | radare2 | 3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e | 269,641,993,769,201,330,000,000,000,000,000,000,000 | 3 | Fix 4 byte oobread in msp430 disassembler ##crash
* Only crashes with asan builds
* Add missing =SN register
* Reported by cnitlrt via huntrdev
* BountyID: 1c22055b-b015-47a8-a57b-4982978751d0 | 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... |
int phar_get_entry_data(phar_entry_data **ret, char *fname, int fname_len, char *path, int path_len, const char *mode, char allow_dir, char **error, int security) /* {{{ */
{
phar_archive_data *phar;
phar_entry_info *entry;
int for_write = mode[0] != 'r' || mode[1] == '+';
int for_append = mode[0] == 'a';
int for... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 0bfb970f43acd1e81d11be1154805f86655f15d5 | 215,829,218,200,261,720,000,000,000,000,000,000,000 | 161 | Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile
(cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2) | 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 ... |
snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg)
{
int retval;
struct snd_compr_codec_caps *caps;
if (!stream->ops->get_codec_caps)
return -ENXIO;
caps = kmalloc(sizeof(*caps), GFP_KERNEL);
if (!caps)
return -ENOMEM;
retval = stream->ops->get_codec_caps(stream, caps);
if (retva... | 0 | [
"CWE-703"
] | linux | b35cc8225845112a616e3a2266d2fde5ab13d3ab | 288,405,418,582,111,700,000,000,000,000,000,000,000 | 22 | ALSA: compress_core: integer overflow in snd_compr_allocate_buffer()
These are 32 bit values that come from the user, we need to check for
integer overflows or we could end up allocating a smaller buffer than
expected.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | 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"... |
CtPtr ProtocolV2::reuse_connection(AsyncConnectionRef existing,
ProtocolV2 *exproto) {
ldout(cct, 20) << __func__ << " existing=" << existing
<< " reconnect=" << reconnecting << dendl;
connection->inject_delay();
std::lock_guard<std::mutex> l(existing->write_l... | 0 | [
"CWE-323"
] | ceph | 47c7e623546a7a33bd6bbddfb899fa9c9a40f40a | 276,697,068,340,262,560,000,000,000,000,000,000,000 | 124 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... | Safe | 323 | {"cwe_id": "CWE-323", "vulnerability_type": "Reusing a Nonce, Key Pair in Encryption", "description": "Nonces should be used for the present occasion and only once.", "severity": "High", "category": null, "impact": ["Bypass Protection Mechanism", "Gain Privileges or Assume Identity"], "languages": [null], "example": "E... |
static ssize_t sync_state_only_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct device_link *link = to_devlink(dev);
return sprintf(buf, "%d\n", !!(link->flags & DL_FLAG_SYNC_STATE_ONLY));
} | 1 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 122,890,486,203,081,190,000,000,000,000,000,000,000 | 7 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... | Vulnerable | 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 handle_cr(struct kvm_vcpu *vcpu)
{
unsigned long exit_qualification, val;
int cr;
int reg;
int err;
int ret;
exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
cr = exit_qualification & 15;
reg = (exit_qualification >> 8) & 15;
switch ((exit_qualification >> 4) & 3) {
case 0: /* mov to cr */
v... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 325,526,519,973,405,700,000,000,000,000,000,000,000 | 77 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... | 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 vlan_dev_set_lockdep_one(struct net_device *dev,
struct netdev_queue *txq,
void *_subclass)
{
lockdep_set_class_and_subclass(&txq->_xmit_lock,
&vlan_netdev_xmit_lock_key,
*(int *)_subclass);
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 70,258,336,750,110,810,000,000,000,000,000,000,000 | 8 | 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"... |
R_API char *r_str_prepend(char *ptr, const char *string) {
int slen, plen;
if (!ptr) {
return strdup (string);
}
plen = strlen (ptr);
slen = strlen (string);
ptr = realloc (ptr, slen + plen + 1);
if (!ptr) {
return NULL;
}
memmove (ptr + slen, ptr, plen + 1);
memmove (ptr, string, slen);
return ptr;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 117,822,178,899,202,030,000,000,000,000,000,000,000 | 15 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... | Safe | 78 | {"cwe_id": "CWE-78", "vulnerability_type": "Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')", "description": "The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes... |
Item_field::Item_field(THD *thd, Name_resolution_context *context_arg,
Field *f)
:Item_ident(context_arg, f->table->s->db.str, *f->table_name, f->field_name),
item_equal(0), no_const_subst(0),
have_privileges(0), any_privileges(0)
{
/*
We always need to provide Item_field with a ful... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 311,314,053,200,853,900,000,000,000,000,000,000,000 | 40 | 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 |
win_size_restore(garray_T *gap)
{
win_T *wp;
int i, j;
if (win_count() * 2 == gap->ga_len)
{
/* The order matters, because frames contain other frames, but it's
* difficult to get right. The easy way out is to do it twice. */
for (j = 0; j < 2; ++j)
{
i = 0;
FOR_ALL_WINDOWS(wp)
{
... | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 201,654,332,549,080,000,000,000,000,000,000,000,000 | 22 | patch 8.1.2136: using freed memory with autocmd from fuzzer
Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
Solution: Avoid using "wp" after autocommands. (closes #5041) | 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 DataReaderImpl::set_qos(
DataReaderQos& to,
const DataReaderQos& from,
bool first_time)
{
if (first_time && to.durability().kind != from.durability().kind)
{
to.durability() = from.durability();
to.durability().hasChanged = true;
}
if (to.deadline().period !=... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 339,945,444,176,612,900,000,000,000,000,000,000,000 | 105 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... | 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... |
xmlXPathFunctionLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri) {
xmlXPathFunction ret;
if (ctxt == NULL)
return(NULL);
if (name == NULL)
return(NULL);
if (ctxt->funcLookupFunc != NULL) {
xmlXPathFuncLookupFunc f;
f = ctxt->funcLookupFunc;
ret = f(ctxt->funcLook... | 0 | [
"CWE-476"
] | libxml2 | a436374994c47b12d5de1b8b1d191a098fa23594 | 318,404,233,933,656,530,000,000,000,000,000,000,000 | 26 | Fix nullptr deref with XPath logic ops
If the XPath stack is corrupted, for example by a misbehaving extension
function, the "and" and "or" XPath operators could dereference NULL
pointers. Check that the XPath stack isn't empty and optimize the
logic operators slightly.
Closes: https://gitlab.gnome.org/GNOME/libxml2/... | 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... |
should_close(const char *header, int hlen) {
const char *v;
int vlen = 0;
if (NULL != (v = agoo_con_header_value(header, hlen, "Connection", &vlen))) {
return (5 == vlen && 0 == strncasecmp("Close", v, 5));
}
return false;
} | 0 | [
"CWE-444",
"CWE-61"
] | agoo | 23d03535cf7b50d679a60a953a0cae9519a4a130 | 8,546,411,995,497,197,000,000,000,000,000,000,000 | 9 | Remote addr (#99)
* REMOTE_ADDR added
* Ready for merge | Safe | 444 | {"cwe_id": "CWE-444", "vulnerability_type": "Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')", "description": "The product acts as an intermediary HTTP agent\n (such as a proxy or firewall) in the data flow between two\n entities such as a client and server, but it does ... |
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags)
{
CMSerr(CMS_F_CMS_COMPRESS, CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
return NULL;
} | 0 | [
"CWE-399"
] | openssl | dd90a91d8771fd1ad5083fd46a2b3da16a587757 | 8,205,203,487,411,922,000,000,000,000,000,000,000 | 5 | Fix infinite loop in CMS
Fix loop in do_free_upto if cmsbio is NULL: this will happen when attempting
to verify and a digest is not recognised. Reported by Johannes Bauer.
CVE-2015-1792
Reviewed-by: Matt Caswell <matt@openssl.org> | Safe | 399 | null |
njs_vm_object_prop(njs_vm_t *vm, njs_value_t *value, const njs_str_t *prop,
njs_opaque_value_t *retval)
{
njs_int_t ret;
njs_value_t key;
if (njs_slow_path(!njs_is_object(value))) {
njs_type_error(vm, "njs_vm_object_prop() argument is not object");
return NULL;
}
ret = njs_... | 0 | [
"CWE-416"
] | njs | 6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6 | 212,395,709,601,681,370,000,000,000,000,000,000,000 | 23 | Fixed recursive async function calls.
Previously, PromiseCapability record was stored (function->context)
directly in function object during a function invocation. This is
not correct, because PromiseCapability record should be linked to
current execution context. As a result, function->context is
overwritten with c... | 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 CalendarRegressionTest::test4114578()
{
UErrorCode status = U_ZERO_ERROR;
double ONE_HOUR = 60*60*1000;
Calendar *cal = Calendar::createInstance(status);
if(U_FAILURE(status)) {
dataerrln("Error creating calendar %s", u_errorName(status));
delete cal;
return;
}
cal->adoptT... | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 293,982,203,244,693,000,000,000,000,000,000,000,000 | 64 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 | 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... |
nvmet_fc_tgt_q_put(struct nvmet_fc_tgt_queue *queue)
{
kref_put(&queue->ref, nvmet_fc_tgt_queue_free);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0c319d3a144d4b8f1ea2047fd614d2149b68f889 | 36,273,257,993,950,526,000,000,000,000,000,000,000 | 4 | nvmet-fc: ensure target queue id within range.
When searching for queue id's ensure they are within the expected range.
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk> | 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 ip_vs_copy_usvc_compat(struct ip_vs_service_user_kern *usvc,
struct ip_vs_service_user *usvc_compat)
{
memset(usvc, 0, sizeof(*usvc));
usvc->af = AF_INET;
usvc->protocol = usvc_compat->protocol;
usvc->addr.ip = usvc_compat->addr;
usvc->port = usvc_compat->port;
usvc->fwmark = usvc_compat->... | 0 | [
"CWE-200"
] | linux | 2d8a041b7bfe1097af21441cb77d6af95f4f4680 | 145,414,808,015,011,500,000,000,000,000,000,000,000 | 18 | ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing... | 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... |
void parseInclusion(ParseContext* ctx,
BSONElement elem,
ProjectionPathASTNode* parent,
boost::optional<FieldPath> fullPathToParent) {
// There are special rules about _id being included. _id may be included in both inclusion and
// exclusion projectio... | 0 | [
"CWE-732"
] | mongo | cd583b6c4d8aa2364f255992708b9bb54e110cf4 | 181,602,621,325,577,720,000,000,000,000,000,000,000 | 65 | SERVER-53929 Add stricter parser checks around positional projection | Safe | 732 | {"cwe_id": "CWE-732", "vulnerability_type": "Incorrect Permission Assignment for Critical Resource", "description": "The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.", "severity": "High", "category": null, "impact": ["Read... |
static int do_check(struct bpf_verifier_env *env)
{
bool pop_log = !(env->log.level & BPF_LOG_LEVEL2);
struct bpf_verifier_state *state = env->cur_state;
struct bpf_insn *insns = env->prog->insnsi;
struct bpf_reg_state *regs;
int insn_cnt = env->prog->len;
bool do_print_state = false;
int prev_insn_idx = -1;
f... | 0 | [
"CWE-787"
] | linux | 64620e0a1e712a778095bd35cbb277dc2259281f | 223,646,907,481,251,250,000,000,000,000,000,000,000 | 334 | bpf: Fix out of bounds access for ringbuf helpers
Both bpf_ringbuf_submit() and bpf_ringbuf_discard() have ARG_PTR_TO_ALLOC_MEM
in their bpf_func_proto definition as their first argument. They both expect
the result from a prior bpf_ringbuf_reserve() call which has a return type of
RET_PTR_TO_ALLOC_MEM_OR_NULL.
Meani... | 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 __net_exit void raw_exit_net(struct net *net)
{
remove_proc_entry("raw", net->proc_net);
} | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 107,247,311,109,663,620,000,000,000,000,000,000,000 | 4 | inet: prevent leakage of uninitialized memory to user in recv syscalls
Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called wit... | 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... |
Module(asdl_seq * body, asdl_seq * type_ignores, PyArena *arena)
{
mod_ty p;
p = (mod_ty)PyArena_Malloc(arena, sizeof(*p));
if (!p)
return NULL;
p->kind = Module_kind;
p->v.Module.body = body;
p->v.Module.type_ignores = type_ignores;
return p;
} | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 132,109,701,346,948,600,000,000,000,000,000,000,000 | 11 | bpo-35766: Merge typed_ast back into CPython (GH-11645) | 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"... |
int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
{
kuid_t euid;
kgid_t egid;
int id;
int next_id = ids->next_id;
if (size > IPCMNI)
size = IPCMNI;
if (ids->in_use >= size)
return -ENOSPC;
idr_preload(GFP_KERNEL);
spin_lock_init(&new->lock);
new->deleted = false;
rcu_read_lock();... | 1 | [
"CWE-362",
"CWE-401"
] | linux | b9a532277938798b53178d5a66af6e2915cb27cf | 200,057,399,314,448,520,000,000,000,000,000,000,000 | 48 | Initialize msg/shm IPC objects before doing ipc_addid()
As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
having initialized the IPC object state. Yes, we initialize the IPC
object in a locked state, but with all the lockless RCU lookup work,
that IPC object lock no longer means that the state c... | Vulnerable | 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... |
file_to_g_byte_array (const char *filename)
{
char *contents = NULL;
GByteArray *array = NULL;
gsize length = 0;
if (!g_file_get_contents (filename, &contents, &length, NULL))
return NULL;
array = g_byte_array_sized_new (length);
if (!array) {
g_free (contents);
return NULL;
}
g_byte_array_append (arra... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 217,202,771,593,696,560,000,000,000,000,000,000,000 | 18 | 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... | Safe | 310 | null |
Value ExpressionPow::evaluate(const Document& root) const {
Value baseVal = vpOperand[0]->evaluate(root);
Value expVal = vpOperand[1]->evaluate(root);
if (baseVal.nullish() || expVal.nullish())
return Value(BSONNULL);
BSONType baseType = baseVal.getType();
BSONType expType = expVal.getType(... | 1 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 52,340,076,142,054,290,000,000,000,000,000,000,000 | 152 | SERVER-38070 fix infinite loop in agg expression | Vulnerable | 835 | {"cwe_id": "CWE-835", "vulnerability_type": "Loop with Unreachable Exit Condition ('Infinite Loop')", "description": "The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.", "severity": null, "category": null, "impact": ["DoS: Resource Consumption (CPU)", "DoS:... |
static Image *ReadGROUP4Image(const ImageInfo *image_info,
ExceptionInfo *exception)
{
char
filename[MaxTextExtent];
FILE
*file;
Image
*image;
ImageInfo
*read_info;
int
c,
unique_file;
MagickBooleanType
status;
size_t
length;
ssize_t
offset,
strip_offset;... | 0 | [
"CWE-125"
] | ImageMagick6 | d8d844c6f23f4d90d8fe893fe9225dd78fc1e6ef | 211,803,336,887,781,400,000,000,000,000,000,000,000 | 118 | https://github.com/ImageMagick/ImageMagick/issues/1532 | 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"... |
virtual void initialize() {
http2OptionsFromTuple(client_http2_options_, client_settings_);
http2OptionsFromTuple(server_http2_options_, server_settings_);
client_ = std::make_unique<TestClientConnectionImpl>(
client_connection_, client_callbacks_, stats_store_, client_http2_options_,
max_... | 1 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 330,352,930,706,740,560,000,000,000,000,000,000,000 | 20 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... | Vulnerable | 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... |
int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
{
d->p = p;
d->q = q;
d->g = g;
return 1;
} | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 75,267,819,969,248,180,000,000,000,000,000,000,000 | 8 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) | Safe | 326 | {"cwe_id": "CWE-326", "vulnerability_type": "Inadequate Encryption Strength", "description": "The product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.", "severity": null, "category": null, "impact": ["Bypass Pro... |
static int io_openat2(struct io_kiocb *req, unsigned int issue_flags)
{
struct open_flags op;
struct file *file;
bool resolve_nonblock, nonblock_set;
bool fixed = !!req->open.file_slot;
int ret;
ret = build_open_flags(&req->open.how, &op);
if (ret)
goto err;
nonblock_set = op.open_flag & O_NONBLOCK;
resolve... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 257,696,030,511,503,800,000,000,000,000,000,000,000 | 65 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... | 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... |
TEST_F(Http1ServerConnectionImplTest, MetadataTest) {
initialize();
NiceMock<MockRequestDecoder> decoder;
Http::ResponseEncoder* response_encoder = nullptr;
EXPECT_CALL(callbacks_, newStream(_, _))
.WillOnce(Invoke([&](ResponseEncoder& encoder, bool) -> RequestDecoder& {
response_encoder = &encod... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 154,535,490,570,604,980,000,000,000,000,000,000,000 | 22 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> | 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... |
ensure_credentials_sync (GoaProvider *provider,
GoaObject *object,
gint *out_expires_in,
GCancellable *cancellable,
GError **error)
{
GVariant *credentials;
GoaAcco... | 0 | [
"CWE-310"
] | gnome-online-accounts | ecad8142e9ac519b9fc74b96dcb5531052bbffe1 | 5,288,525,658,345,565,000,000,000,000,000,000,000 | 98 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... | Safe | 310 | null |
GetPinholePackets(struct upnphttp * h, const char * action, const char * ns)
{
static const char resp[] =
"<u:%sResponse "
"xmlns:u=\"%s\">"
"<PinholePackets>%u</PinholePackets>"
"</u:%sResponse>";
char body[512];
int bodylen;
struct NameValueParserData data;
const char * uid_str;
int n;
char iaddr[INET6... | 0 | [
"CWE-476"
] | miniupnp | 13585f15c7f7dc28bbbba1661efb280d530d114c | 274,114,453,877,059,300,000,000,000,000,000,000,000 | 57 | GetOutboundPinholeTimeout: check args | 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... |
int smb_vfs_call_closedir(struct vfs_handle_struct *handle,
DIR *dir)
{
VFS_FIND(closedir);
return handle->fns->closedir_fn(handle, dir);
} | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 277,348,156,038,976,100,000,000,000,000,000,000,000 | 6 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> | Safe | 264 | null |
int fscrypt_decrypt_page(const struct inode *inode, struct page *page,
unsigned int len, unsigned int offs, u64 lblk_num)
{
if (!(inode->i_sb->s_cop->flags & FS_CFLG_OWN_PAGES))
BUG_ON(!PageLocked(page));
return fscrypt_do_page_crypto(inode, FS_DECRYPT, lblk_num, page, page,
len, offs, GFP_NOFS);
} | 0 | [
"CWE-416",
"CWE-476"
] | linux | 1b53cf9815bb4744958d41f3795d5d5a1d365e2d | 306,189,135,406,338,900,000,000,000,000,000,000,000 | 9 | fscrypt: remove broken support for detecting keyring key revocation
Filesystem encryption ostensibly supported revoking a keyring key that
had been used to "unlock" encrypted files, causing those files to become
"locked" again. This was, however, buggy for several reasons, the most
severe of which was that when key r... | 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... |
inbound_account (server *serv, char *nick, char *account,
const message_tags_data *tags_data)
{
session *sess = NULL;
GSList *list;
list = sess_list;
while (list)
{
sess = list->data;
if (sess->server == serv)
userlist_set_account (sess, nick, account);
list = list->next;
}
} | 0 | [
"CWE-22"
] | hexchat | 4e061a43b3453a9856d34250c3913175c45afe9d | 168,733,633,941,785,970,000,000,000,000,000,000,000 | 15 | Clean up handling CAP LS | 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 ... |
TEST_F(SingleAllowMissingInOrListTest, GoodAndBadJwts) {
EXPECT_CALL(mock_cb_, onComplete(Status::Ok));
auto headers =
Http::TestRequestHeaderMapImpl{{kExampleHeader, GoodToken}, {kOtherHeader, ExpiredToken}};
context_ = Verifier::createContext(headers, parent_span_, &mock_cb_);
verifier_->verify(context_... | 0 | [
"CWE-303",
"CWE-703"
] | envoy | ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a | 314,624,892,451,514,800,000,000,000,000,000,000,000 | 9 | jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194)
[jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ... | Safe | 303 | {"cwe_id": "CWE-303", "vulnerability_type": "Incorrect Implementation of Authentication Algorithm", "description": "The requirements for the product dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect.", "severity": null, "category": null, "impact": ["Bypass ... |
int unit_patch_contexts(Unit *u) {
CGroupContext *cc;
ExecContext *ec;
unsigned i;
int r;
assert(u);
/* Patch in the manager defaults into the exec and cgroup
* contexts, _after_ the rest of the settings have been
* initialized */
ec = unit_ge... | 1 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 156,317,748,010,681,350,000,000,000,000,000,000,000 | 91 | core: imply NNP and SUID/SGID restriction for DynamicUser=yes service
Let's be safe, rather than sorry. This way DynamicUser=yes services can
neither take benefit of, nor create SUID/SGID binaries.
Given that DynamicUser= is a recent addition only we should be able to
get away with turning this on, even though this i... | Vulnerable | 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... |
my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec)
{
my_decimal tmp_buf, *tmp= args[0]->val_decimal(&tmp_buf);
bool sign;
uint precision;
if ((null_value= args[0]->null_value))
return NULL;
my_decimal_round(E_DEC_FATAL_ERROR, tmp, decimals, FALSE, dec);
sign= dec->sign();
if (unsigned_fl... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 331,743,166,398,771,370,000,000,000,000,000,000,000 | 36 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... | 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": "... |
static int net_fd(struct wif *wi)
{
struct priv_net *pn = wi_priv(wi);
return pn->pn_s;
} | 0 | [
"CWE-20",
"CWE-787"
] | aircrack-ng | 88702a3ce4c28a973bf69023cd0312f412f6193e | 301,530,526,103,010,360,000,000,000,000,000,000,000 | 6 | OSdep: Fixed segmentation fault that happens with a malicious server sending a negative length (Closes #16 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2419 28c6078b-6c39-48e3-add9-af49d547ecab | 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 vrend_patch_blend_state(struct vrend_sub_context *sub_ctx)
{
struct pipe_blend_state new_state = sub_ctx->blend_state;
struct pipe_blend_state *state = &sub_ctx->blend_state;
bool swizzle_blend_color = false;
struct pipe_blend_color blend_color = sub_ctx->blend_color;
int i;
if (sub_ctx->... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 40,468,469,580,112,164,000,000,000,000,000,000,000 | 59 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> | 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 SplashOutputDev::updateFillColor(GfxState *state) {
GfxGray gray;
GfxRGB rgb;
#ifdef SPLASH_CMYK
GfxCMYK cmyk;
GfxColor deviceN;
#endif
switch (colorMode) {
case splashModeMono1:
case splashModeMono8:
state->getFillGray(&gray);
splash->setFillPattern(getColor(gray));
break;
case splash... | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 133,248,737,526,899,720,000,000,000,000,000,000,000 | 32 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 | Safe | 369 | {"cwe_id": "CWE-369", "vulnerability_type": "Divide By Zero", "description": "The product divides a value by zero.", "severity": "Medium", "category": null, "impact": ["DoS: Crash, Exit, or Restart"], "languages": [null], "example": "Example not extracted"} |
static MagickBooleanType SkipRGBMipmaps(Image *image,DDSInfo *dds_info,
int pixel_size,ExceptionInfo *exception)
{
MagickOffsetType
offset;
register ssize_t
i;
size_t
h,
w;
/*
Only skip mipmaps for textures and cube maps
*/
if (EOFBlob(image) != MagickFalse)
{
ThrowFileE... | 0 | [
"CWE-20",
"CWE-617"
] | ImageMagick | 0c5b1e430a83ef793a7334bbbee408cf3c628699 | 234,820,944,888,458,400,000,000,000,000,000,000,000 | 43 | Added check to prevent image being 0x0 (reported in #489). | 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... |
boost::intrusive_ptr<Expression> ExpressionSwitch::parse(
const boost::intrusive_ptr<ExpressionContext>& expCtx,
BSONElement expr,
const VariablesParseState& vps) {
uassert(40060,
str::stream() << "$switch requires an object as an argument, found: "
<< typeName(expr... | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 96,478,142,028,984,980,000,000,000,000,000,000,000 | 75 | SERVER-43699 $mod should not overflow for large negative values | 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... |
TEST_F(HeaderToMetadataTest, EmptyHeaderValue) {
initializeFilter(request_config_yaml);
Http::TestRequestHeaderMapImpl incoming_headers{{"X-VERSION", ""}};
EXPECT_CALL(decoder_callbacks_, streamInfo()).WillRepeatedly(ReturnRef(req_info_));
EXPECT_CALL(req_info_, setDynamicMetadata(_, _)).Times(0);
EXPECT_EQ(... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 106,705,933,814,862,830,000,000,000,000,000,000,000 | 8 | 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 |
static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
OPENSSL_LH_DOALL_FUNC func,
OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)
{
int i;
OPENSSL_LH_NODE *a, *n;
if (lh == NULL)
return;
/*
* reverse the order so we search from 'top to... | 0 | [
"CWE-404"
] | openssl | 64c85430f95200b6b51fe9475bd5203f7c19daf1 | 69,913,030,142,872,380,000,000,000,000,000,000,000 | 26 | Fix bug in OPENSSL_LH_flush
Fixes #18139.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18141)
(cherry picked from commit e5da68183410c06f7b350a0721bc2bd6057e438e) | Safe | 404 | {"cwe_id": "CWE-404", "vulnerability_type": "Improper Resource Shutdown or Release", "description": "The product does not release or incorrectly releases a resource before it is made available for re-use.", "severity": "Medium", "category": null, "impact": ["DoS: Resource Consumption (Other)", "Varies by Context", "Rea... |
uint32_t IOBuf::approximateShareCountOne() const {
if (UNLIKELY(!sharedInfo())) {
return 1U;
}
return sharedInfo()->refcount.load(std::memory_order_acquire);
} | 0 | [
"CWE-787"
] | folly | 4f304af1411e68851bdd00ef6140e9de4616f7d3 | 268,662,709,791,902,840,000,000,000,000,000,000,000 | 6 | [folly] Add additional overflow checks to IOBuf - CVE-2021-24036
Summary:
As per title
CVE-2021-24036
Reviewed By: jan
Differential Revision: D27938605
fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c | 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 acm_tty_open(struct tty_struct *tty, struct file *filp)
{
struct acm *acm = tty->driver_data;
dev_dbg(tty->dev, "%s\n", __func__);
return tty_port_open(&acm->port, tty, filp);
} | 0 | [
"CWE-703"
] | linux | 8835ba4a39cf53f705417b3b3a94eb067673f2c9 | 84,104,016,266,121,170,000,000,000,000,000,000,000 | 8 | USB: cdc-acm: more sanity checking
An attack has become available which pretends to be a quirky
device circumventing normal sanity checks and crashes the kernel
by an insufficient number of interfaces. This patch adds a check
to the code path for quirky devices.
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: sta... | 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"... |
MagickExport MagickBooleanType AutoGammaImage(Image *image,
ExceptionInfo *exception)
{
double
gamma,
log_mean,
mean,
sans;
MagickStatusType
status;
register ssize_t
i;
log_mean=log(0.5);
if (image->channel_mask == DefaultChannels)
{
/*
Apply gamma correction equ... | 0 | [
"CWE-399",
"CWE-119",
"CWE-787"
] | ImageMagick | d4fc44b58a14f76b1ac997517d742ee12c9dc5d3 | 198,646,877,059,278,570,000,000,000,000,000,000,000 | 48 | https://github.com/ImageMagick/ImageMagick/issues/1611 | Safe | 399 | null |
static struct sock *atalk_search_socket(struct sockaddr_at *to,
struct atalk_iface *atif)
{
struct sock *s;
struct hlist_node *node;
read_lock_bh(&atalk_sockets_lock);
sk_for_each(s, node, &atalk_sockets) {
struct atalk_sock *at = at_sk(s);
if (to->sat_port != at->src_port)
continue;
if (to->sat_ad... | 0 | [
"CWE-200"
] | linux-2.6 | 3d392475c873c10c10d6d96b94d092a34ebd4791 | 336,536,472,436,574,350,000,000,000,000,000,000,000 | 37 | appletalk: fix atalk_getname() leak
atalk_getname() can leak 8 bytes of kernel memory to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
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... |
static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg)
{
struct net_device *dev;
char name[IFNAMSIZ];
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct l2tp_eth *priv;
struct l2tp_eth_sess *spriv;
int rc;
struct l2tp_eth_net *... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 167,733,051,583,123,130,000,000,000,000,000,000,000 | 90 | 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"... |
static int bist_write(struct pci_dev *dev, int offset, u8 value, void *data)
{
u8 cur_value;
int err;
err = pci_read_config_byte(dev, offset, &cur_value);
if (err)
goto out;
if ((cur_value & ~PCI_BIST_START) == (value & ~PCI_BIST_START)
|| value == PCI_BIST_START)
err = pci_write_config_byte(dev, offset... | 0 | [
"CWE-284",
"CWE-264"
] | linux | af6fc858a35b90e89ea7a7ee58e66628c55c776b | 42,928,406,512,612,865,000,000,000,000,000,000,000 | 16 | xen-pciback: limit guest control of command register
Otherwise the guest can abuse that control to cause e.g. PCIe
Unsupported Request responses by disabling memory and/or I/O decoding
and subsequently causing (CPU side) accesses to the respective address
ranges, which (depending on system configuration) may be fatal ... | 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... |
void InstanceKlass::set_implementor(Klass* k) {
assert_lock_strong(Compile_lock);
assert(is_interface(), "not interface");
Klass** addr = adr_implementor();
assert(addr != NULL, "null addr");
if (addr != NULL) {
*addr = k;
}
} | 0 | [] | jdk11u-dev | 41825fa33d605f8501164f9296572e4378e8183b | 84,798,372,919,696,780,000,000,000,000,000,000,000 | 9 | 8270386: Better verification of scan methods
Reviewed-by: mbaesken
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 | Safe | null | null |
static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg,
size_t size, int flags)
{
struct unix_stream_read_state state = {
.recv_actor = unix_stream_read_actor,
.socket = sock,
.msg = msg,
.size = size,
.flags = flags
};
return unix_stream_read_generic(&state);
} | 0 | [] | net | 7d267278a9ece963d77eefec61630223fce08c6c | 80,846,795,405,767,580,000,000,000,000,000,000,000 | 13 | unix: avoid use-after-free in ep_remove_wait_queue
Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
An AF_UNIX datagram socket being the client in an n:1 association with
some server socket is only allowed to send messages to the server if the
receive queue of this socket contains at most sk_max_ack_backlog... | Safe | null | null |
grub_ext4_find_leaf (struct grub_ext2_data *data,
struct grub_ext4_extent_header *ext_block,
grub_uint32_t fileblock)
{
struct grub_ext4_extent_idx *index;
void *buf = NULL;
while (1)
{
int i;
grub_disk_addr_t block;
index = (struct grub_ext4_exten... | 0 | [
"CWE-119"
] | grub | ac8cac1dac50daaf1c390d701cca3b55e16ee768 | 259,321,598,063,386,600,000,000,000,000,000,000,000 | 46 | * grub-core/fs/ext2.c: Remove variable length arrays. | 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 php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var_hash TSRMLS_DC) /* {{{ */
{
int i;
ulong *var_already;
HashTable *myht;
if (EG(exception)) {
return;
}
if (var_hash && php_add_var_hash(var_hash, struc, (void *) &var_already TSRMLS_CC) == FAILURE) {
if (Z_ISREF_P(struc)) {
... | 1 | [] | php-src | e8429400d40e3c3aa4b22ba701991d698a2f3b2f | 272,247,776,915,193,100,000,000,000,000,000,000,000 | 195 | Fix bug #70172 - Use After Free Vulnerability in unserialize() | Vulnerable | null | null |
GF_Err gf_isom_reset_data_offset(GF_ISOFile *movie, u64 *top_box_start)
{
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
u32 i, count;
if (!movie || !movie->moov) return GF_BAD_PARAM;
if (top_box_start) *top_box_start = movie->current_top_box_start;
movie->current_top_box_start = 0;
movie->NextMoofNumber = 0;
if (movie->moo... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 74,101,866,879,317,180,000,000,000,000,000,000,000 | 19 | fixed #1706 | 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 bool cmd_aea(RCore* core, int mode, ut64 addr, int length) {
RAnalEsil *esil;
int ptr, ops, ops_end = 0, len, buf_sz, maxopsize;
ut64 addr_end;
AeaStats stats;
const char *esilstr;
RAnalOp aop = R_EMPTY;
ut8 *buf;
RList* regnow;
if (!core) {
return false;
}
maxopsize = r_anal_archinfo (core->anal, R... | 0 | [
"CWE-416",
"CWE-908"
] | radare2 | 9d348bcc2c4bbd3805e7eec97b594be9febbdf9a | 135,574,897,617,885,190,000,000,000,000,000,000,000 | 163 | Fix #9943 - Invalid free on RAnal.avr | 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 skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
int flags)
{
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct skcipher_ctx *ctx = ask->private;
struct skcipher_sg_list *sgl;
struct scatterlist *sg;
struct skcipher_async_req *sreq;
struct skcipher_request *req... | 0 | [] | linux | 4f0414e54e4d1893c6f08260693f8ef84c929293 | 40,619,488,954,293,370,000,000,000,000,000,000,000 | 127 | crypto: algif_skcipher - Load TX SG list after waiting
We need to load the TX SG list in sendmsg(2) after waiting for
incoming data, not before.
Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Dmitry Vyukov <dvyukov@google.c... | Safe | null | null |
static noinline int __cow_file_range(struct btrfs_trans_handle *trans,
struct inode *inode,
struct btrfs_root *root,
struct page *locked_page,
u64 start, u64 end, int *page_started,
unsigned long *nr_written,
int unlock)
{
u64 alloc_hint = 0;
u64 num_bytes;
unsig... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 326,018,791,169,471,180,000,000,000,000,000,000,000 | 155 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... | Safe | 310 | null |
find_comp_entry(int proto)
{
struct compressor_entry *ce;
list_for_each_entry(ce, &compressor_list, list) {
if (ce->comp->compress_proto == proto)
return ce;
}
return NULL;
} | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 207,177,327,398,984,400,000,000,000,000,000,000,000 | 10 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... | Safe | null | null |
static void sigterm_client(int sig)
{
(void) sig;
disablesignals();
_EXIT(EXIT_SUCCESS);
} | 0 | [
"CWE-434"
] | pure-ftpd | 37ad222868e52271905b94afea4fc780d83294b4 | 5,545,624,146,426,544,000,000,000,000,000,000,000 | 7 | Initialize the max upload file size when quotas are enabled
Due to an unwanted check, files causing the quota to be exceeded
were deleted after the upload, but not during the upload.
The bug was introduced in 2009 in version 1.0.23
Spotted by @DroidTest, thanks! | Safe | 434 | {"cwe_id": "CWE-434", "vulnerability_type": "Unrestricted Upload of File with Dangerous Type", "description": "The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.", "severity": "Medium", "category": "Unrestricted File Upload", "impact": ["Execute Un... |
OJPEGReadHeaderInfoSecStreamSos(TIFF* tif)
{
/* this marker needs to be checked, and part of its data needs to be saved for regeneration later on */
static const char module[]="OJPEGReadHeaderInfoSecStreamSos";
OJPEGState* sp=(OJPEGState*)tif->tif_data;
uint16 m;
uint8 n;
uint8 o;
assert(sp->subsamplingcorrect==... | 0 | [
"CWE-369"
] | libtiff | 43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec | 128,957,283,447,973,400,000,000,000,000,000,000,000 | 46 | * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in
OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611 | Safe | 369 | {"cwe_id": "CWE-369", "vulnerability_type": "Divide By Zero", "description": "The product divides a value by zero.", "severity": "Medium", "category": null, "impact": ["DoS: Crash, Exit, or Restart"], "languages": [null], "example": "Example not extracted"} |
void f2fs_flush_merged_writes(struct f2fs_sb_info *sbi)
{
f2fs_submit_merged_write(sbi, DATA);
f2fs_submit_merged_write(sbi, NODE);
f2fs_submit_merged_write(sbi, META);
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 262,456,994,834,525,240,000,000,000,000,000,000,000 | 6 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> | 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... |
postHandler(struct mg_connection *conn, void *cbdata)
{
int rc = 1;
instanceConf_t* inst = (instanceConf_t*) cbdata;
const struct mg_request_info *ri = mg_get_request_info(conn);
struct conn_wrkr_s *connWrkr = mg_get_thread_pointer(conn);
connWrkr->multiSub.nElem = 0;
memset(&connWrkr->parseState, 0, sizeof(connW... | 0 | [
"CWE-787"
] | rsyslog | 89955b0bcb1ff105e1374aad7e0e993faa6a038f | 126,829,684,057,418,470,000,000,000,000,000,000,000 | 94 | net bugfix: potential buffer overrun | 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 snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream)
{
snd_pcm_group_unlock_irq(&substream->self_group,
substream->pcm->nonatomic);
} | 0 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 208,005,318,969,560,100,000,000,000,000,000,000,000 | 5 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... | 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"... |
check_signals ()
{
CHECK_ALRM; /* set by the read builtin */
QUIT;
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 153,470,155,349,097,460,000,000,000,000,000,000,000 | 5 | bash-4.4-rc2 release | Safe | null | null |
uint64 WriteBlock(IMkvWriter* writer, const Frame* const frame, int64 timecode,
uint64 timecode_scale) {
uint64 block_additional_elem_size = 0;
uint64 block_addid_elem_size = 0;
uint64 block_more_payload_size = 0;
uint64 block_more_elem_size = 0;
uint64 block_additions_payload_size = 0;
ui... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 252,655,467,049,627,630,000,000,000,000,000,000,000 | 117 | 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 | 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 JPXStream::getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode) {
if (unlikely(priv->inited == false)) { init(); }
*bitsPerComponent = 8;
int numComps = (priv->image) ? priv->image->numcomps : 1;
if (priv->image) {
if (priv->image->color_space == OPJ_CLRSPC_SRGB && numComps == 4) { numC... | 0 | [
"CWE-125"
] | poppler | 89a5367d49b2556a2635dbb6d48d6a6b182a2c6c | 15,059,974,932,885,836,000,000,000,000,000,000,000 | 18 | JPEG2000Stream: fail gracefully if not all components have the same WxH
I think this is just a mistake, or at least the only file we have with
this scenario is a fuzzed one | 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 GListFSet(GGadget *g,GTextInfo **ti,int32 docopy) {
GListField *gl = (GListField *) g;
GTextInfoArrayFree(gl->ti);
if ( docopy || ti==NULL )
ti = GTextInfoArrayCopy(ti);
gl->ti = ti;
gl->ltot = GTextInfoArrayCount(ti);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 69,276,562,028,572,380,000,000,000,000,000,000,000 | 9 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. | 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 ... |
PropertiesPrivate(File *file, long streamLength) :
length(0),
bitrate(0),
sampleRate(0),
channels(0),
version(0),
bitsPerSample(0),
file(file),
streamLength(streamLength) {} | 0 | [] | taglib | 77d61c6eca4d08b9b025738acf6b926cc750db23 | 168,771,182,470,566,870,000,000,000,000,000,000,000 | 9 | Make sure to not try dividing by zero | Safe | null | null |
static int snd_rawmidi_info_user(struct snd_rawmidi_substream *substream,
struct snd_rawmidi_info __user * _info)
{
struct snd_rawmidi_info info;
int err;
if ((err = snd_rawmidi_info(substream, &info)) < 0)
return err;
if (copy_to_user(_info, &info, sizeof(struct snd_rawmidi_info)))
return -EFAULT;
return... | 0 | [
"CWE-415"
] | linux | 39675f7a7c7e7702f7d5341f1e0d01db746543a0 | 226,993,843,228,387,700,000,000,000,000,000,000,000 | 11 | ALSA: rawmidi: Change resized buffers atomically
The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the
current code is racy. For example, the sequencer client may write to
buffer while it being resized.
As a simple workaround, let's switch to the resized buffer inside the
stream runtime lock.
Reported... | 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 dma_addr_t arm_iommu_map_page(struct device *dev, struct page *page,
unsigned long offset, size_t size, enum dma_data_direction dir,
struct dma_attrs *attrs)
{
if (!dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs))
__dma_page_cpu_to_dev(page, offset, size, dir);
return arm_coherent_iommu_map_page(dev... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 0ea1ec713f04bdfac343c9702b21cd3a7c711826 | 225,958,297,780,834,660,000,000,000,000,000,000,000 | 9 | ARM: dma-mapping: don't allow DMA mappings to be marked executable
DMA mapping permissions were being derived from pgprot_kernel directly
without using PAGE_KERNEL. This causes them to be marked with executable
permission, which is not what we want. Fix this.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk... | 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 int tipc_parse_udp_addr(struct nlattr *nla, struct udp_media_addr *addr,
u32 *scope_id)
{
struct sockaddr_storage sa;
nla_memcpy(&sa, nla, sizeof(sa));
if (sa.ss_family == AF_INET) {
struct sockaddr_in *ip4 = (struct sockaddr_in *)&sa;
addr->proto = htons(ETH_P_IP);
addr->port = ip4->sin_por... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 303,729,190,838,436,600,000,000,000,000,000,000,000 | 40 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... | Safe | null | null |
static int hidinput_setkeycode(struct input_dev *dev,
const struct input_keymap_entry *ke,
unsigned int *old_keycode)
{
struct hid_device *hid = input_get_drvdata(dev);
struct hid_usage *usage;
usage = hidinput_locate_usage(hid, ke, NULL);
if (usage) {
*old_keycode = usage->type == EV_KEY ?
... | 0 | [
"CWE-787"
] | linux | 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 | 140,742,248,974,713,960,000,000,000,000,000,000,000 | 30 | HID: core: Sanitize event code and type when mapping input
When calling into hid_map_usage(), the passed event code is
blindly stored as is, even if it doesn't fit in the associated bitmap.
This event code can come from a variety of sources, including devices
masquerading as input devices, only a bit more "programmab... | 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 session_on_stream_window_update_received(nghttp2_session *session,
nghttp2_frame *frame) {
int rv;
nghttp2_stream *stream;
if (session_detect_idle_stream(session, frame->hd.stream_id)) {
return session_handle_invalid_connection(session, frame, NG... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 262,552,551,323,054,900,000,000,000,000,000,000,000 | 42 | Add nghttp2_option_set_max_outbound_ack | Safe | null | null |
size_t iov_iter_single_seg_count(const struct iov_iter *i)
{
if (i->nr_segs > 1) {
if (likely(iter_is_iovec(i) || iov_iter_is_kvec(i)))
return min(i->count, i->iov->iov_len - i->iov_offset);
if (iov_iter_is_bvec(i))
return min(i->count, i->bvec->bv_len - i->iov_offset);
}
return i->count;
} | 0 | [
"CWE-665",
"CWE-284"
] | linux | 9d2231c5d74e13b2a0546fee6737ee4446017903 | 213,335,417,275,629,100,000,000,000,000,000,000,000 | 10 | lib/iov_iter: initialize "flags" in new pipe_buffer
The functions copy_page_to_iter_pipe() and push_pipe() can both
allocate a new pipe_buffer, but the "flags" member initializer is
missing.
Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed")
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.k... | Safe | 665 | {"cwe_id": "CWE-665", "vulnerability_type": "Improper Initialization", "description": "The product does not initialize or incorrectly initializes a resource, which might leave the resource in an unexpected state when it is accessed or used.", "severity": "Medium", "category": null, "impact": ["Read Memory", "Read Appli... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.