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 |
|---|---|---|---|---|---|---|---|---|---|---|
smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
struct cifs_fid *fid, FILE_ALL_INFO *data)
{
int rc;
struct smb2_file_all_info *smb2_data;
smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + PATH_MAX * 2,
GFP_KERNEL);
if (smb2_data == NULL)
return -ENOMEM;
rc = SMB2_query... | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 264,289,188,748,766,180,000,000,000,000,000,000,000 | 18 | cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
When calling smb2_ioctl_query_info() with invalid
smb_query_info::flags, a NULL ptr dereference is triggered when trying
to kfree() uninitialised rqst[n].rq_iov array.
This also fixes leaked paths that are created in SMB2_open_init()
which required SMB2_open_f... | 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 LibRaw::versionNumber() { return LIBRAW_VERSION; } | 0 | [
"CWE-119",
"CWE-787"
] | LibRaw | 2f912f5b33582961b1cdbd9fd828589f8b78f21d | 64,355,550,803,758,920,000,000,000,000,000,000,000 | 1 | fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef | 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 ... |
ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**< identifier of externl magic string */
{
JERRY_ASSERT (id < lit_get_magic_string_ex_count ());
uintptr_t string_id = (uintptr_t) (id + LIT_MAGIC_STRING__COUNT);
if (JERRY_LIKELY (string_id <= ECMA_DIRECT_STRING_MAX_IMM))
{
retu... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 151,979,178,509,090,370,000,000,000,000,000,000,000 | 18 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.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... |
static void change_item_list_context(List<Item> *list,
Name_resolution_context *context)
{
List_iterator_fast<Item> it (*list);
Item *item;
while((item= it++))
{
item->walk(&Item::change_context_processor, FALSE, (void *)context);
}
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 277,186,704,838,252,370,000,000,000,000,000,000,000 | 10 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... | 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"... |
_public_ int sd_bus_add_filter(
sd_bus *bus,
sd_bus_slot **slot,
sd_bus_message_handler_t callback,
void *userdata) {
sd_bus_slot *s;
assert_return(bus, -EINVAL);
assert_return(bus = bus_resolve(bus), -ENOPKG);
assert_retu... | 0 | [
"CWE-416"
] | systemd | 1068447e6954dc6ce52f099ed174c442cb89ed54 | 74,844,741,073,008,350,000,000,000,000,000,000,000 | 27 | sd-bus: introduce API for re-enqueuing incoming messages
When authorizing via PolicyKit we want to process incoming method calls
twice: once to process and figure out that we need PK authentication,
and a second time after we aquired PK authentication to actually execute
the operation. With this new call sd_bus_enqueu... | 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... |
SPL_METHOD(SplMaxHeap, compare)
{
zval *a, *b;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &a, &b) == FAILURE) {
return;
}
RETURN_LONG(spl_ptr_heap_zval_max_cmp(a, b, NULL TSRMLS_CC));
} | 0 | [] | php-src | 1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1 | 275,143,560,818,435,180,000,000,000,000,000,000,000 | 10 | Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error | Safe | null | null |
void read_stats_from_file(char from_file[])
{
struct file_magic file_magic;
struct file_activity *file_actlst = NULL;
char rec_hdr_tmp[MAX_RECORD_HEADER_SIZE];
int curr = 1, i, p;
int ifd, rtype;
int rows, eosaf = TRUE, reset = FALSE;
long cnt = 1;
off_t fpos;
/* Get window size */
rows = get_win_height();
... | 0 | [
"CWE-125"
] | sysstat | fbc691eaaa10d0bcea6741d5a223dc3906106548 | 237,184,654,583,636,830,000,000,000,000,000,000,000 | 159 | Fix #196 and #199: Out of bound reads security issues
Check args before calling memmove() and memset() in remap_struct()
function to avoid out of bound reads which would possibly lead to
unknown code execution and/or sadf command crash.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> | 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 coroutine_fn v9fs_clunk(void *opaque)
{
int err;
int32_t fid;
size_t offset = 7;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
err = pdu_unmarshal(pdu, offset, "d", &fid);
if (err < 0) {
goto out_nofid;
}
trace_v9fs_clunk(pdu->tag, pdu->id... | 0 | [
"CWE-362"
] | qemu | 89fbea8737e8f7b954745a1ffc4238d377055305 | 48,027,660,727,318,660,000,000,000,000,000,000,000 | 32 | 9pfs: Fully restart unreclaim loop (CVE-2021-20181)
Depending on the client activity, the server can be asked to open a huge
number of file descriptors and eventually hit RLIMIT_NOFILE. This is
currently mitigated using a reclaim logic : the server closes the file
descriptors of idle fids, based on the assumption that... | 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... |
ipcp_val_agg_replacement_ok_p (ipa_agg_replacement_value *aggvals,
int index, HOST_WIDE_INT offset, tree value)
{
if (offset == -1)
return true;
while (aggvals)
{
if (aggvals->index == index
&& aggvals->offset == offset
&& values_equal_for_ipcp_p (aggvals->value, value))
return true;... | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 293,170,542,942,290,880,000,000,000,000,000,000,000 | 16 | Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)
2019-12-21 Martin Jambor <mjambor@suse.cz>
PR ipa/93015
* ipa-cp.c (ipcp_store_vr_results): Check that info exists
testsuite/
* gcc.dg/lto/pr93015_0.c: New test.
From-SVN: r279695 | 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 svm_queue_exception(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
unsigned nr = vcpu->arch.exception.nr;
bool has_error_code = vcpu->arch.exception.has_error_code;
bool reinject = vcpu->arch.exception.injected;
u32 error_code = vcpu->arch.exception.error_code;
/*
* If we are within ... | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 5,589,653,655,912,771,000,000,000,000,000,000,000 | 40 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... | 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 blkcg_policy_register(struct blkcg_policy *pol)
{
struct blkcg *blkcg;
int i, ret;
mutex_lock(&blkcg_pol_register_mutex);
mutex_lock(&blkcg_pol_mutex);
/* find an empty slot */
ret = -ENOSPC;
for (i = 0; i < BLKCG_MAX_POLS; i++)
if (!blkcg_policy[i])
break;
if (i >= BLKCG_MAX_POLS)
goto err_unlock;... | 0 | [
"CWE-415"
] | linux | 9b54d816e00425c3a517514e0d677bb3cec49258 | 49,273,816,735,224,000,000,000,000,000,000,000,000 | 63 | blkcg: fix double free of new_blkg in blkcg_init_queue
If blkg_create fails, new_blkg passed as an argument will
be freed by blkg_create, so there is no need to free it again.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Jens Axboe <axboe@fb.com> | 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 int setup_swap_extents(struct swap_info_struct *sis, sector_t *span)
{
struct inode *inode;
unsigned blocks_per_page;
unsigned long page_no;
unsigned blkbits;
sector_t probe_block;
sector_t last_block;
sector_t lowest_block = -1;
sector_t highest_block = 0;
int nr_extents = 0;
int ret;
inode = sis->s... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 159,397,691,439,733,440,000,000,000,000,000,000,000 | 95 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... | Safe | 264 | null |
inline void LogSoftmax(const SoftmaxParams& params, float input_scale,
const RuntimeShape& input_shape, const T* input_data,
const RuntimeShape& output_shape, T* output_data) {
ruy::profiler::ScopeLabel label("LogSoftmax");
const int trailing_dim = input_shape.Dimension... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 17,587,943,459,026,210,000,000,000,000,000,000,000 | 51 | 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... |
int vrend_create_surface(struct vrend_context *ctx,
uint32_t handle,
uint32_t res_handle, uint32_t format,
uint32_t val0, uint32_t val1)
{
struct vrend_surface *surf;
struct vrend_resource *res;
uint32_t ret_handle;
if (format >= PI... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 251,961,112,568,109,780,000,000,000,000,000,000,000 | 82 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> | 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... |
xfs_ioctl_setattr_check_extsize(
struct xfs_inode *ip,
struct fileattr *fa)
{
struct xfs_mount *mp = ip->i_mount;
xfs_failaddr_t failaddr;
uint16_t new_diflags;
if (!fa->fsx_valid)
return 0;
if (S_ISREG(VFS_I(ip)->i_mode) && ip->i_df.if_nextents &&
XFS_FSB_TO_B(mp, ip->i_extsize) != fa->fsx_extsize)
... | 0 | [
"CWE-125"
] | linux | 983d8e60f50806f90534cc5373d0ce867e5aaf79 | 63,920,005,508,793,650,000,000,000,000,000,000,000 | 40 | xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate
The old ALLOCSP/FREESP ioctls in XFS can be used to preallocate space at
the end of files, just like fallocate and RESVSP. Make the behavior
consistent with the other ioctls.
Reported-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Darric... | 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 generate_session_id(char *buf, const char *random, const char *user) {
mg_md5(buf, random, user, NULL);
} | 0 | [
"CWE-284",
"CWE-335"
] | ntopng | 30610bda60cbfc058f90a1c0a17d0e8f4516221a | 271,825,744,219,254,920,000,000,000,000,000,000,000 | 3 | Added code to randomize values returned by rand() | 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... |
bool check_host_name(LEX_CSTRING *str)
{
const char *name= str->str;
const char *end= str->str + str->length;
if (check_string_byte_length(str, ER_HOSTNAME, HOSTNAME_LENGTH))
return TRUE;
while (name != end)
{
if (*name == '@')
{
my_printf_error(ER_UNKNOWN_ERROR,
"Mal... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 159,391,918,717,935,210,000,000,000,000,000,000,000 | 20 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... | 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 edge_throttle(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int status;
if (edge_port == NULL)
return;
/* if we are implementing XON/XOFF, send the stop character */
if (I_IXOFF(tty)) {
unsigned char s... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 1ee0a224bc9aad1de496c795f96bc6ba2c394811 | 132,265,086,683,923,530,000,000,000,000,000,000,000 | 24 | USB: io_ti: Fix NULL dereference in chase_port()
The tty is NULL when the port is hanging up.
chase_port() needs to check for this.
This patch is intended for stable series.
The behavior was observed and tested in Linux 3.2 and 3.7.1.
Johan Hovold submitted a more elaborate patch for the mainline kernel.
[ 56.277... | 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... |
TEST_F(QueryPlannerTest, ExprEqCanUseHashedIndexWithRegex) {
params.options &= ~QueryPlannerParams::INCLUDE_COLLSCAN;
addIndex(BSON("a"
<< "hashed"));
runQuery(fromjson("{a: {$_internalExprEq: /abc/}}"));
ASSERT_EQUALS(getNumSolutions(), 1U);
assertSolutionExists(
"{fetch: ... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 58,810,176,882,044,020,000,000,000,000,000,000,000 | 10 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. | Safe | null | null |
void Tags::Tag::Init() {
m_simple_tags = NULL;
m_simple_tags_size = 0;
m_simple_tags_count = 0;
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 41,272,383,896,222,047,000,000,000,000,000,000,000 | 5 | 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... |
ModuleExport size_t RegisterMATImage(void)
{
MagickInfo
*entry;
entry=AcquireMagickInfo("MAT","MAT","MATLAB level 5 image format");
entry->decoder=(DecodeImageHandler *) ReadMATImage;
entry->encoder=(EncodeImageHandler *) WriteMATImage;
entry->flags^=CoderBlobSupportFlag;
entry->flags|=CoderSeekableStr... | 0 | [
"CWE-125"
] | ImageMagick | a6240a163cb787909703d9fc649cf861f60ddd7c | 94,062,352,634,059,220,000,000,000,000,000,000,000 | 13 | https://github.com/ImageMagick/ImageMagick/issues/131 | 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"... |
mrb_io_flags_to_modenum(mrb_state *mrb, int flags)
{
int modenum = 0;
switch(flags & (FMODE_READABLE|FMODE_WRITABLE|FMODE_READWRITE)) {
case FMODE_READABLE:
modenum = O_RDONLY;
break;
case FMODE_WRITABLE:
modenum = O_WRONLY;
break;
case FMODE_READWRITE:
modenum = O_RDWR;
... | 0 | [
"CWE-416",
"CWE-787"
] | mruby | b51b21fc63c9805862322551387d9036f2b63433 | 44,321,406,882,085,820,000,000,000,000,000,000,000 | 33 | Fix `use after free in File#initilialize_copy`; fix #4001
The bug and the fix were reported by https://hackerone.com/pnoltof | 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 ff_amf_write_field_name(uint8_t **dst, const char *str)
{
bytestream_put_be16(dst, strlen(str));
bytestream_put_buffer(dst, str, strlen(str));
} | 0 | [
"CWE-20"
] | FFmpeg | ffcc82219cef0928bed2d558b19ef6ea35634130 | 21,149,314,505,959,179,000,000,000,000,000,000,000 | 5 | avformat/rtmppkt: Convert ff_amf_get_field_value() to bytestream2
Fixes: out of array accesses
Found-by: JunDong Xie of Ant-financial Light-Year Security Lab
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | 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... |
git_filemode_t git_tree_entry_filemode_raw(const git_tree_entry *entry)
{
return entry->attr;
} | 0 | [
"CWE-20"
] | libgit2 | 928429c5c96a701bcbcafacb2421a82602b36915 | 233,854,723,616,098,800,000,000,000,000,000,000,000 | 4 | tree: Check for `.git` with case insensitivy | 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... |
dynamic_interfaces_handler(vector_t *strvec)
{
char *str;
global_data->dynamic_interfaces = true;
if (vector_size(strvec) >= 2) {
str = strvec_slot(strvec, 1);
if (!strcmp(str, "allow_if_changes"))
global_data->allow_if_changes = true;
else
report_config_error(CONFIG_GENERAL_ERROR, "Unknown dynamic_in... | 0 | [
"CWE-200"
] | keepalived | c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067 | 250,302,852,197,926,450,000,000,000,000,000,000,000 | 15 | 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... |
static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define CropBox "CropBox"
#define DeviceCMYK "DeviceCMYK"
#define MediaBox "MediaBox"
#define RenderPCLText " Rendering PCL... "
char
command[MaxTextExtent],
*density,
filename[MaxTextExtent],
geometry[MaxTextExt... | 1 | [
"CWE-401"
] | ImageMagick6 | ff840181f631b1b7f29160cae24d792fcd176bae | 138,946,090,885,102,760,000,000,000,000,000,000,000 | 246 | https://github.com/ImageMagick/ImageMagick/issues/1520 | Vulnerable | 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... |
static inline void kvm_arch_end_assignment(struct kvm *kvm)
{
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 259,951,661,731,032,460,000,000,000,000,000,000,000 | 3 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... | 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 b_unpack (lua_State *L) {
Header h;
const char *fmt = luaL_checkstring(L, 1);
size_t ld;
const char *data = luaL_checklstring(L, 2, &ld);
size_t pos = luaL_optinteger(L, 3, 1);
luaL_argcheck(L, pos > 0, 3, "offset must be 1 or greater");
pos--; /* Lua indexes are 1-based, but here we want 0-bas... | 0 | [
"CWE-190",
"CWE-787"
] | redis | e89086e09a38cc6713bcd4b9c29abf92cf393936 | 160,884,572,770,780,030,000,000,000,000,000,000,000 | 71 | Security: fix Lua struct package offset handling.
After the first fix to the struct package I found another similar
problem, which is fixed by this patch. It could be reproduced easily by
running the following script:
return struct.unpack('f', "xxxxxxxxxxxxx",-3)
The above will access bytes before the 'data' poi... | 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... |
peer_ebgp_multihop_set_vty (struct vty *vty, const char *ip_str,
const char *ttl_str)
{
struct peer *peer;
unsigned int ttl;
peer = peer_and_group_lookup_vty (vty, ip_str);
if (! peer)
return CMD_WARNING;
if (! ttl_str)
ttl = TTL_MAX;
else
VTY_GET_INTEGER_RANGE ("T... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 68,578,869,557,251,160,000,000,000,000,000,000,000 | 19 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... | 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 int kvm_memslots_get_as_id(struct kvm_memory_slot *a,
struct kvm_memory_slot *b)
{
if (WARN_ON_ONCE(!a && !b))
return 0;
if (!a)
return b->as_id;
if (!b)
return a->as_id;
WARN_ON_ONCE(a->as_id != b->as_id);
return a->as_id; | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 271,719,413,825,844,900,000,000,000,000,000,000,000 | 14 | 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... |
tilde_initialize ()
{
static int times_called = 0;
/* Tell the tilde expander that we want a crack first. */
tilde_expansion_preexpansion_hook = bash_special_tilde_expansions;
/* Tell the tilde expander about special strings which start a tilde
expansion, and the special strings that end one. Only do th... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 226,170,044,564,700,920,000,000,000,000,000,000,000 | 35 | bash-4.4-rc2 release | Safe | null | null |
upnp_delete_redirection(unsigned short eport, const char * protocol)
{
syslog(LOG_INFO, "removing redirect rule port %hu %s", eport, protocol);
return _upnp_delete_redir(eport, proto_atoi(protocol));
} | 0 | [
"CWE-476"
] | miniupnp | f321c2066b96d18afa5158dfa2d2873a2957ef38 | 154,606,534,404,032,340,000,000,000,000,000,000,000 | 5 | upnp_redirect(): accept NULL desc argument | 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... |
opj_tcd_t* opj_tcd_create(OPJ_BOOL p_is_decoder)
{
opj_tcd_t *l_tcd = 00;
/* create the tcd structure */
l_tcd = (opj_tcd_t*) opj_calloc(1, sizeof(opj_tcd_t));
if (!l_tcd) {
return 00;
}
l_tcd->m_is_decoder = p_is_decoder ? 1 : 0;
l_tcd->tcd_image = (opj_tcd_image_t*)opj_calloc(1,... | 0 | [
"CWE-119",
"CWE-787"
] | openjpeg | 397f62c0a838e15d667ef50e27d5d011d2c79c04 | 246,127,191,734,779,800,000,000,000,000,000,000,000 | 20 | Fix write heap buffer overflow in opj_mqc_byteout(). Discovered by Ke Liu of Tencent's Xuanwu LAB (#835) | 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 vfat_find(struct inode *dir, struct qstr *qname,
struct fat_slot_info *sinfo)
{
unsigned int len = vfat_striptail_len(qname);
if (len == 0)
return -ENOENT;
return fat_search_long(dir, qname->name, len, sinfo);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0720a06a7518c9d0c0125bd5d1f3b6264c55c3dd | 202,355,280,114,869,040,000,000,000,000,000,000,000 | 8 | NLS: improve UTF8 -> UTF16 string conversion routine
The utf8s_to_utf16s conversion routine needs to be improved. Unlike
its utf16s_to_utf8s sibling, it doesn't accept arguments specifying
the maximum length of the output buffer or the endianness of its
16-bit output.
This patch (as1501) adds the two missing argumen... | 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 ... |
u32 gf_isom_get_user_data_count(GF_ISOFile *movie, u32 trackNumber, u32 UserDataType, bin128 UUID)
{
GF_UserDataMap *map;
GF_TrackBox *trak;
GF_UserDataBox *udta;
bin128 t;
u32 i, count;
if (!movie || !movie->moov) return 0;
if (UserDataType == GF_ISOM_BOX_TYPE_UUID) UserDataType = 0;
memset(t, 1, 16);
if (... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 64,799,346,030,795,420,000,000,000,000,000,000,000 | 31 | 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... |
void Server::setLastChannel(const User *p) {
if (p->iId < 0)
return;
if (p->cChannel->bTemporary)
return;
TransactionHolder th;
QSqlQuery &query = *th.qsqQuery;
SQLPREP("UPDATE `%1users` SET `lastchannel`=? WHERE `server_id` = ? AND `user_id` = ?");
query.addBindValue(p->cChannel->iId);
query.addBindValue... | 0 | [
"CWE-20"
] | mumble | 6b33dda344f89e5a039b7d79eb43925040654242 | 109,800,664,706,754,920,000,000,000,000,000,000,000 | 16 | Don't crash on long usernames | 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... |
SCM_DEFINE (scm_stat, "stat", 1, 1, 0,
(SCM object, SCM exception_on_error),
"Return an object containing various information about the file\n"
"determined by @var{object}. @var{object} can be a string containing\n"
"a file name or a port or integer file descriptor which is open\n"
"on... | 0 | [] | guile | 245608911698adb3472803856019bdd5670b6614 | 147,028,240,490,584,470,000,000,000,000,000,000,000 | 103 | Remove 'umask' calls from 'mkdir'.
Fixes <http://bugs.gnu.org/24659>.
* libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is
unbound; instead, use 0777 as the mode. Update docstring to clarify
this.
* doc/ref/posix.texi (File System): Adjust accordingly.
* NEWS: Mention it. | Safe | null | null |
TEST_P(MessengerTest, FeatureTest) {
FakeDispatcher cli_dispatcher(false), srv_dispatcher(true);
entity_addr_t bind_addr;
bind_addr.parse("127.0.0.1");
uint64_t all_feature_supported, feature_required, feature_supported = 0;
for (int i = 0; i < 10; i++)
feature_supported |= 1ULL << i;
feature_required =... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 172,786,769,411,499,850,000,000,000,000,000,000,000 | 56 | 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 ... |
static inline void warp_clock(void)
{
write_seqlock_irq(&xtime_lock);
wall_to_monotonic.tv_sec -= sys_tz.tz_minuteswest * 60;
xtime.tv_sec += sys_tz.tz_minuteswest * 60;
update_xtime_cache(0);
write_sequnlock_irq(&xtime_lock);
clock_was_set();
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 189,730,536,898,388,300,000,000,000,000,000,000,000 | 9 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... | Safe | 189 | null |
static int oidc_handle_discovery_response(request_rec *r, oidc_cfg *c) {
/* variables to hold the values returned in the response */
char *issuer = NULL, *target_link_uri = NULL, *login_hint = NULL,
*auth_request_params = NULL, *csrf_cookie, *csrf_query = NULL,
*user = NULL, *path_scopes;
oidc_provider_t *pro... | 0 | [
"CWE-601"
] | mod_auth_openidc | 03e6bfb446f4e3f27c003d30d6a433e5dd8e2b3d | 269,221,213,659,284,280,000,000,000,000,000,000,000 | 150 | apply OIDCRedirectURLsAllowed setting to target_link_uri
closes #672; thanks @Meheni
release 2.4.9.4
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> | Safe | 601 | {"cwe_id": "CWE-601", "vulnerability_type": "URL Redirection to Untrusted Site ('Open Redirect')", "description": "The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.", "severity": "Low", "category": "Open Redirect", "impact": ["Bypass Protect... |
sctp_disposition_t sctp_sf_do_ecn_cwr(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
sctp_cwrhdr_t *cwr;
struct sctp_chunk *chunk = arg;
u32 lowest_tsn;
if (!sc... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 97,979,405,098,631,260,000,000,000,000,000,000,000 | 32 | 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 |
ff_layout_pg_check_layout(struct nfs_pageio_descriptor *pgio,
struct nfs_page *req)
{
pnfs_generic_pg_check_layout(pgio);
pnfs_generic_pg_check_range(pgio, req);
} | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 22,232,093,117,048,373,000,000,000,000,000,000,000 | 6 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... | 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... |
enum dc_status dce100_validate_plane(const struct dc_plane_state *plane_state, struct dc_caps *caps)
{
if (plane_state->format < SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
return DC_OK;
return DC_FAIL_SURFACE_VALIDATE;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 176,201,841,953,903,940,000,000,000,000,000,000,000 | 8 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | 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... |
static int is_nip_reserved(struct static_lease *st_lease, uint32_t nip)
{
while (st_lease) {
if (st_lease->nip == nip)
return 1;
st_lease = st_lease->next;
}
return 0;
} | 0 | [
"CWE-125"
] | busybox | 6d3b4bb24da9a07c263f3c1acf8df85382ff562c | 254,042,657,373,643,300,000,000,000,000,000,000,000 | 10 | udhcpc: check that 4-byte options are indeed 4-byte, closes 11506
function old new delta
udhcp_get_option32 - 27 +27
udhcp_get_option 231 248 +17
----------------------------------... | 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 inline unsigned char ScaleQuantumToChar(const Quantum quantum)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
return((unsigned char) quantum);
#else
if (quantum <= 0.0)
return(0);
if (quantum >= 255.0)
return(255);
return((unsigned char) (quantum+0.5));
#endif
} | 1 | [
"CWE-190"
] | ImageMagick | 564f2a35e523e2b6cce9485018157f03ec05a947 | 35,083,530,623,690,007,000,000,000,000,000,000,000 | 12 | https://github.com/ImageMagick/ImageMagick/issues/1741 | Vulnerable | 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... |
emergency_print(u_char * field, u_int length)
{
int iindex;
int start = 0;
int stop = 25;
while (start < stop) {
for (iindex = start; iindex < stop; iindex++)
printf("%02X ", field[iindex]);
printf("\n");
start = stop;
sto... | 0 | [
"CWE-415"
] | net-snmp | 5f881d3bf24599b90d67a45cae7a3eb099cd71c9 | 110,595,788,710,619,700,000,000,000,000,000,000,000 | 17 | libsnmp, USM: Introduce a reference count in struct usmStateReference
This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/. | 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"... |
to_physical(const void *ptr)
{
return (uintptr_t) ptr;
} | 0 | [
"CWE-193"
] | spice | a4a16ac42d2f19a17e36556546aa94d5cd83745f | 38,230,872,600,688,464,000,000,000,000,000,000,000 | 4 | memslot: Fix off-by-one error in group/slot boundary check
RedMemSlotInfo keeps an array of groups, and each group contains an
array of slots. Unfortunately, these checks are off by 1, they check
that the index is greater or equal to the number of elements in the
array, while these arrays are 0 based. The check should... | Safe | 193 | {"cwe_id": "CWE-193", "vulnerability_type": "Off-by-one Error", "description": "A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.", "severity": null, "category": "off-by-five", "impact": ["DoS: Crash, Exit, or Restart", "DoS: Resource Consumption (CPU)... |
int dev_change_net_namespace(struct net_device *dev, struct net *net, const char *pat)
{
int err;
ASSERT_RTNL();
/* Don't allow namespace local devices to be moved. */
err = -EINVAL;
if (dev->features & NETIF_F_NETNS_LOCAL)
goto out;
/* Ensure the device has been registrered */
if (dev->reg_state != NETREG... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 71,016,453,032,673,230,000,000,000,000,000,000,000 | 104 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... | Safe | null | null |
int ext4_truncate(struct inode *inode)
{
struct ext4_inode_info *ei = EXT4_I(inode);
unsigned int credits;
int err = 0, err2;
handle_t *handle;
struct address_space *mapping = inode->i_mapping;
/*
* There is a possibility that we're either freeing the inode
* or it's a completely new inode. In those cases we... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 206,100,255,421,900,360,000,000,000,000,000,000,000 | 101 | 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 bool is_terminal_output(ExecOutput o) {
return IN_SET(o,
EXEC_OUTPUT_TTY,
EXEC_OUTPUT_SYSLOG_AND_CONSOLE,
EXEC_OUTPUT_KMSG_AND_CONSOLE,
EXEC_OUTPUT_JOURNAL_AND_CONSOLE);
} | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 62,656,695,025,517,740,000,000,000,000,000,000,000 | 7 | 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... |
Status BroadcastBinaryOpOutputShapeFnHelper(InferenceContext* c,
ShapeHandle shape_x,
ShapeHandle shape_y,
bool incompatible_shape_error,
ShapeH... | 0 | [
"CWE-369"
] | tensorflow | 8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4 | 170,868,307,233,235,750,000,000,000,000,000,000,000 | 90 | Prevent division by 0 in common shape functions.
PiperOrigin-RevId: 387712197
Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149 | 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 int grab_super(struct super_block *s) __releases(sb_lock)
{
s->s_count++;
spin_unlock(&sb_lock);
down_write(&s->s_umount);
if ((s->s_flags & MS_BORN) && atomic_inc_not_zero(&s->s_active)) {
put_super(s);
return 1;
}
up_write(&s->s_umount);
put_super(s);
return 0;
} | 0 | [
"CWE-17"
] | linux | eee5cc2702929fd41cce28058dc6d6717f723f87 | 108,418,577,428,073,640,000,000,000,000,000,000,000 | 13 | get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | Safe | 17 | null |
void Filter::UpstreamCallbacks::onBelowWriteBufferLowWatermark() {
ASSERT(on_high_watermark_called_);
on_high_watermark_called_ = false;
if (parent_ != nullptr) {
// The upstream write buffer is drained. Resume reading.
parent_->readDisableDownstream(false);
}
} | 0 | [
"CWE-416"
] | envoy | ce0ae309057a216aba031aff81c445c90c6ef145 | 79,891,082,260,405,080,000,000,000,000,000,000,000 | 9 | CVE-2021-43826
Signed-off-by: Yan Avlasov <yavlasov@google.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... |
static int ixgbe_negotiate_vf_api(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{
int api = msgbuf[1];
switch (api) {
case ixgbe_mbox_api_10:
case ixgbe_mbox_api_11:
case ixgbe_mbox_api_12:
case ixgbe_mbox_api_13:
case ixgbe_mbox_api_14:
adapter->vfinfo[vf].vf_api = api;
return 0;
default:
br... | 0 | [
"CWE-20"
] | linux | 63e39d29b3da02e901349f6cd71159818a4737a6 | 172,490,230,446,770,960,000,000,000,000,000,000,000 | 21 | ixgbe: fix large MTU request from VF
Check that the MTU value requested by the VF is in the supported
range of MTUs before attempting to set the VF large packet enable,
otherwise reject the request. This also avoids unnecessary
register updates in the case of the 82599 controller.
Fixes: 872844ddb9e4 ("ixgbe: Enable ... | 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 int nf_tables_dump_flowtable(struct sk_buff *skb,
struct netlink_callback *cb)
{
const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh);
struct nft_flowtable_filter *filter = cb->data;
unsigned int idx = 0, s_idx = cb->args[0];
struct net *net = sock_net(skb->sk);
int family = nfmsg->nfgen_family;
stru... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 154,944,011,911,708,960,000,000,000,000,000,000,000 | 52 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... | 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... |
int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
{
struct page *page = vmf->page;
loff_t size;
unsigned long len;
int ret;
struct file *file = vma->vm_file;
struct inode *inode = file_inode(file);
struct address_space *mapping = inode->i_mapping;
handle_t *handle;
get_block_t *get_block;... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 23,740,929,782,621,000,000,000,000,000,000,000,000 | 90 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... | 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... |
QPDFObjectHandle::QPDFObjectHandle(QPDFObject* data) :
m(new Members(data))
{
} | 0 | [
"CWE-399",
"CWE-674"
] | qpdf | b4d6cf6836ce025ba1811b7bbec52680c7204223 | 77,279,822,362,824,770,000,000,000,000,000,000,000 | 4 | Limit depth of nesting in direct objects (fixes #202)
This fixes CVE-2018-9918. | Safe | 399 | null |
void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity)
{
per_cpu(cpu_scale, cpu) = capacity;
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 289,868,361,923,479,700,000,000,000,000,000,000,000 | 4 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... | 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 dtls1_get_record(SSL *s)
{
int ssl_major,ssl_minor;
int i,n;
SSL3_RECORD *rr;
unsigned char *p = NULL;
unsigned short version;
DTLS1_BITMAP *bitmap;
unsigned int is_next_epoch;
rr= &(s->s3->rrec);
/* The epoch may have changed. If so, process all the
* pending records. This is a non-blocking operati... | 0 | [
"CWE-310"
] | openssl | 9c00a950604aca819cee977f1dcb4b45f2af3aa6 | 190,783,871,897,369,660,000,000,000,000,000,000,000 | 161 | Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cher... | Safe | 310 | null |
sctp_disposition_t sctp_sf_error_shutdown(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_ERROR,
SCTP_ERROR(-ESHUTDOWN));
return SCTP_... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 238,772,052,292,861,750,000,000,000,000,000,000,000 | 11 | 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 |
int WavpackSetChannelLayout (WavpackContext *wpc, uint32_t layout_tag, const unsigned char *reorder)
{
int nchans = layout_tag & 0xff;
if ((layout_tag & 0xff00ff00) || nchans > wpc->config.num_channels)
return FALSE;
wpc->channel_layout = layout_tag;
if (wpc->channel_reordering) {
fre... | 0 | [
"CWE-703",
"CWE-835"
] | WavPack | 070ef6f138956d9ea9612e69586152339dbefe51 | 198,561,141,423,039,030,000,000,000,000,000,000,000 | 30 | issue #53: error out on zero sample rate | 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"... |
ArgParser::argEmpty()
{
o.infilename = "";
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 309,749,157,157,180,500,000,000,000,000,000,000,000 | 4 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... | 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 kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
struct module *module)
{
int r;
int cpu;
r = kvm_arch_init(opaque);
if (r)
goto out_fail;
/*
* kvm_arch_init makes sure there's at most one caller
* for architectures that support multiple implementations,
* like intel and amd on x86... | 0 | [
"CWE-416",
"CWE-362"
] | linux | cfa39381173d5f969daf43582c95ad679189cbc9 | 109,968,983,859,446,730,000,000,000,000,000,000,000 | 103 | kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
kvm_ioctl_create_device() does the following:
1. creates a device that holds a reference to the VM object (with a borrowed
reference, the VM's refcount has not been bumped yet)
2. initializes the device
3. transfers the reference to the device t... | 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 find_good_pkt_pointers(struct bpf_verifier_state *state,
struct bpf_reg_state *dst_reg,
enum bpf_reg_type type,
bool range_right_open)
{
struct bpf_reg_state *regs = state->regs, *reg;
u16 new_range;
int i;
if (dst_reg->off < 0 ||
(dst_reg->off == 0 && range_right_open))
/* ... | 0 | [
"CWE-20"
] | linux | c131187db2d3fa2f8bf32fdf4e9a4ef805168467 | 196,968,655,980,102,700,000,000,000,000,000,000,000 | 85 | bpf: fix branch pruning logic
when the verifier detects that register contains a runtime constant
and it's compared with another constant it will prune exploration
of the branch that is guaranteed not to be taken at runtime.
This is all correct, but malicious program may be constructed
in such a way that it always has... | 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... |
int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
{
struct super_block *sb = inode->i_sb;
ext4_lblk_t first_block, stop_block;
struct address_space *mapping = inode->i_mapping;
loff_t first_block_offset, last_block_offset;
handle_t *handle;
unsigned int credits;
int ret = 0, ret2 = 0;
trac... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 961,100,374,316,314,600,000,000,000,000,000,000 | 144 | 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"... |
void posix_cpu_timers_exit(struct task_struct *tsk)
{
cleanup_timers(tsk->cpu_timers,
tsk->utime, tsk->stime, tsk->se.sum_exec_runtime);
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 231,962,936,682,450,300,000,000,000,000,000,000,000 | 6 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... | Safe | 189 | null |
RZ_API bool rz_bin_object_is_static(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, false);
if (obj->libs && rz_list_length(obj->libs) > 0) {
return RZ_BIN_DBG_STATIC & obj->info->dbg_info;
}
return true;
} | 0 | [
"CWE-200",
"CWE-787"
] | rizin | 07b43bc8aa1ffebd9b68d60624c9610cf7e460c7 | 108,564,828,723,152,950,000,000,000,000,000,000,000 | 7 | fix oob read on luac | 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 tipc_aead_decrypt(struct net *net, struct tipc_aead *aead,
struct sk_buff *skb, struct tipc_bearer *b)
{
struct tipc_crypto_rx_ctx *rx_ctx;
struct aead_request *req;
struct crypto_aead *tfm;
struct sk_buff *unused;
struct scatterlist *sg;
struct tipc_ehdr *ehdr;
int ehsz, nsg, rc;
void *ctx;
... | 0 | [
"CWE-20"
] | linux | fa40d9734a57bcbfa79a280189799f76c88f7bb0 | 222,139,379,094,773,230,000,000,000,000,000,000,000 | 79 | tipc: fix size validations for the MSG_CRYPTO type
The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages
to receive keys from other nodes in the cluster in order to decrypt any
further messages from them.
This patch verifies that any supplied sizes in the message body are
valid for the received message... | 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 stmt_clear_error(MYSQL_STMT *stmt)
{
if (stmt->last_errno)
{
stmt->last_errno= 0;
stmt->last_error[0]= '\0';
strmov(stmt->sqlstate, not_error_sqlstate);
}
} | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 136,579,735,725,315,800,000,000,000,000,000,000,000 | 9 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... | Safe | null | null |
static int dissect_CPMCompareBmk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolean in, void *data _U_)
{
gint offset = 16;
proto_item *item;
proto_tree *tree;
item = proto_tree_add_item(parent_tree, hf_mswsp_msg, tvb, offset, in ? 0 : -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_mswsp_m... | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 25,556,603,226,211,236,000,000,000,000,000,000,000 | 24 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. | 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... |
DLLEXPORT int tjCompressFromYUV(tjhandle handle, const unsigned char *srcBuf,
int width, int pad, int height, int subsamp,
unsigned char **jpegBuf,
unsigned long *jpegSize, int jpegQual,
int f... | 0 | [
"CWE-787"
] | libjpeg-turbo | 2a9e3bd7430cfda1bc812d139e0609c6aca0b884 | 33,053,403,370,068,863,000,000,000,000,000,000,000 | 39 | TurboJPEG: Properly handle gigapixel images
Prevent several integer overflow issues and subsequent segfaults that
occurred when attempting to compress or decompress gigapixel images with
the TurboJPEG API:
- Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid
integer overflow when computing the retur... | 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 void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
struct ieee80211_sta *pubsta,
struct sk_buff *skb,
struct napi_struct *napi)
{
struct ieee80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;
struct ieee80211_hdr *hdr;
__le16 fc;
struct ieee80211_rx_data rx;... | 0 | [] | linux | 588f7d39b3592a36fb7702ae3b8bdd9be4621e2f | 208,608,947,255,406,030,000,000,000,000,000,000,000 | 121 | mac80211: drop robust management frames from unknown TA
When receiving a robust management frame, drop it if we don't have
rx->sta since then we don't have a security association and thus
couldn't possibly validate the frame.
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com> | Safe | null | null |
QPDF::decryptStream(PointerHolder<EncryptionParameters> encp,
PointerHolder<InputSource> file,
QPDF& qpdf_for_warning, Pipeline*& pipeline,
int objid, int generation,
QPDFObjectHandle& stream_dict,
bool is_attachment_stream,
std... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 30,466,291,384,152,440,000,000,000,000,000,000,000 | 138 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... | 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... |
TEST_F(HttpConnectionManagerImplTest, PerStreamIdleTimeoutAfterUpstreamHeaders) {
setup(false, "");
ON_CALL(route_config_provider_.route_config_->route_->route_entry_, idleTimeout())
.WillByDefault(Return(std::chrono::milliseconds(10)));
// Store the basic request encoder during filter chain setup.
std::... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 128,288,198,720,093,460,000,000,000,000,000,000,000 | 47 | 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... | 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... |
void BroadcastSelect5DSlow(const RuntimeShape& input_condition_shape,
const D* input_condition_data,
const RuntimeShape& input_x_shape,
const T* input_x_data,
const RuntimeShape& input_y_shape,
... | 0 | [
"CWE-125"
] | tensorflow | 595a65a3e224a0362d7e68c2213acfc2b499a196 | 268,093,320,222,854,570,000,000,000,000,000,000,000 | 69 | Return a TFLite error if gather_nd will result in reading invalid memory
PiperOrigin-RevId: 463054033 | 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 ipgre_tunnel_link(struct ipgre_net *ign, struct ip_tunnel *t)
{
struct ip_tunnel **tp = ipgre_bucket(ign, t);
spin_lock_bh(&ipgre_lock);
t->next = *tp;
rcu_assign_pointer(*tp, t);
spin_unlock_bh(&ipgre_lock);
} | 0 | [] | linux-2.6 | c2892f02712e9516d72841d5c019ed6916329794 | 200,825,982,404,330,230,000,000,000,000,000,000,000 | 9 | gre: fix netns vs proto registration ordering
GRE protocol receive hook can be called right after protocol addition is done.
If netns stuff is not yet initialized, we're going to oops in
net_generic().
This is remotely oopsable if ip_gre is compiled as module and packet
comes at unfortunate moment of module loading.
... | Safe | null | null |
static const char *ccid3_tx_state_name(enum ccid3_hc_tx_states state)
{
static const char *const ccid3_state_names[] = {
[TFRC_SSTATE_NO_SENT] = "NO_SENT",
[TFRC_SSTATE_NO_FBACK] = "NO_FBACK",
[TFRC_SSTATE_FBACK] = "FBACK",
};
return ccid3_state_names[state];
} | 0 | [
"CWE-200"
] | linux | 7b07f8eb75aa3097cdfd4f6eac3da49db787381d | 276,691,246,018,558,670,000,000,000,000,000,000,000 | 10 | dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO)
The CCID3 code fails to initialize the trailing padding bytes of struct
tfrc_tx_info added for alignment on 64 bit architectures. It that for
potentially leaks four bytes kernel stack via the getsockopt() syscall.
Add an explicit memset(0) before filling th... | 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... |
group_test(
char *grp,
char *ident
)
{
if (grp == NULL)
return (0);
if (strcmp(grp, sys_groupname) == 0)
return (0);
if (ident == NULL)
return (1);
if (strcmp(grp, ident) == 0)
return (0);
return (1);
} | 0 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 31,278,107,446,188,080,000,000,000,000,000,000,000 | 19 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. | 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 ... |
void Http2Session::CheckAllocatedSize(size_t previous_size) const {
CHECK_GE(current_nghttp2_memory_, previous_size);
} | 0 | [
"CWE-416"
] | node | a3c33d4ce78f74d1cf1765704af5b427aa3840a6 | 9,931,611,323,890,854,000,000,000,000,000,000,000 | 3 | http2: update handling of rst_stream with error code NGHTTP2_CANCEL
The PR updates the handling of rst_stream frames and adds all streams
to the pending list on receiving rst frames with the error code
NGHTTP2_CANCEL.
The changes will remove dependency on the stream state that may allow
bypassing the checks in certai... | 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 _regulator_do_enable(struct regulator_dev *rdev)
{
int ret, delay;
/* Query before enabling in case configuration dependent. */
ret = _regulator_get_enable_time(rdev);
if (ret >= 0) {
delay = ret;
} else {
rdev_warn(rdev, "enable_time() failed: %d\n", ret);
delay = 0;
}
trace_regulator_enable... | 0 | [
"CWE-416"
] | linux | 60a2362f769cf549dc466134efe71c8bf9fbaaba | 8,833,686,349,191,960,000,000,000,000,000,000,000 | 64 | regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org> | 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 __init setup_numabalancing(char *str)
{
int ret = 0;
if (!str)
goto out;
if (!strcmp(str, "enable")) {
numabalancing_override = 1;
ret = 1;
} else if (!strcmp(str, "disable")) {
numabalancing_override = -1;
ret = 1;
}
out:
if (!ret)
pr_warn("Unable to parse numa_balancing=\n");
return re... | 0 | [
"CWE-388"
] | linux | cf01fb9985e8deb25ccf0ea54d916b8871ae0e62 | 137,652,432,909,719,430,000,000,000,000,000,000,000 | 19 | mm/mempolicy.c: fix error handling in set_mempolicy and mbind.
In the case that compat_get_bitmap fails we do not want to copy the
bitmap to the user as it will contain uninitialized stack data and leak
sensitive data.
Signed-off-by: Chris Salls <salls@cs.ucsb.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-founda... | Safe | 388 | null |
static void dwc3_gadget_disable_irq(struct dwc3 *dwc)
{
/* mask all interrupts */
dwc3_writel(dwc->regs, DWC3_DEVTEN, 0x00);
} | 0 | [
"CWE-703",
"CWE-667",
"CWE-189"
] | linux | c91815b596245fd7da349ecc43c8def670d2269e | 40,673,322,664,981,546,000,000,000,000,000,000,000 | 5 | usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_... | 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"... |
m4_decr (struct obstack *obs, int argc, token_data **argv)
{
int value;
if (bad_argc (argv[0], argc, 2, 2))
return;
if (!numeric_arg (argv[0], ARG (1), &value))
return;
shipout_int (obs, value - 1);
} | 0 | [] | m4 | 5345bb49077bfda9fabd048e563f9e7077fe335d | 311,474,902,702,830,470,000,000,000,000,000,000,000 | 12 | Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba) | Safe | null | null |
static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
int sec_len,
const void *seed1, int seed1_len,
const void *seed2, int seed2_len,
const void *seed3, int seed3_len,
const void *seed4, int seed4_len,
const void *seed5, int seed5_len,
unsigned char *out, int olen)
{
int chunk;
uns... | 0 | [
"CWE-310"
] | openssl | e5420be6cd09af2550b128575a675490cfba0483 | 325,977,663,383,461,880,000,000,000,000,000,000,000 | 84 | Make CBC decoding constant time.
This patch makes the decoding of SSLv3 and TLS CBC records constant
time. Without this, a timing side-channel can be used to build a padding
oracle and mount Vaudenay's attack.
This patch also disables the stitched AESNI+SHA mode pending a similar
fix to that code.
In order to be eas... | Safe | 310 | null |
int ip6_forward(struct sk_buff *skb)
{
struct dst_entry *dst = skb_dst(skb);
struct ipv6hdr *hdr = ipv6_hdr(skb);
struct inet6_skb_parm *opt = IP6CB(skb);
struct net *net = dev_net(dst->dev);
struct neighbour *n;
u32 mtu;
if (net->ipv6.devconf_all->forwarding == 0)
goto error;
if (skb_warn_if_lro(skb))
go... | 0 | [
"CWE-703"
] | linux | 87c48fa3b4630905f98268dde838ee43626a060c | 48,726,273,957,679,810,000,000,000,000,000,000,000 | 156 | ipv6: make fragment identifications less predictable
IPv6 fragment identification generation is way beyond what we use for
IPv4 : It uses a single generator. Its not scalable and allows DOS
attacks.
Now inetpeer is IPv6 aware, we can use it to provide a more secure and
scalable frag ident generator (per destination, ... | 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"... |
theora_type_find (GstTypeFind * tf, gpointer private)
{
const guint8 *data = gst_type_find_peek (tf, 0, 7); //42);
if (data) {
if (data[0] != 0x80)
return;
if (memcmp (&data[1], "theora", 6) != 0)
return;
/* FIXME: make this more reliable when specs are out */
gst_type_find_suggest (... | 0 | [
"CWE-125"
] | gst-plugins-base | 2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095 | 40,145,429,258,941,830,000,000,000,000,000,000,000 | 14 | typefind: bounds check windows ico detection
Fixes out of bounds read
https://bugzilla.gnome.org/show_bug.cgi?id=774902 | 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"... |
SRC_UnsetActive(SRC_Instance inst)
{
inst->active = 0;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 43,428,511,721,284,370,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. | Safe | 59 | {"cwe_id": "CWE-59", "vulnerability_type": "Improper Link Resolution Before File Access ('Link Following')", "description": "The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.", "severit... |
int mz_compress(unsigned char *pDest, mz_ulong *pDest_len,
const unsigned char *pSource, mz_ulong source_len) {
return mz_compress2(pDest, pDest_len, pSource, source_len,
MZ_DEFAULT_COMPRESSION);
} | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 286,256,964,926,299,560,000,000,000,000,000,000,000 | 5 | Make line_no with too large value(2**20) invalid. Fixes #124 | 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... |
dns_zone_setprivatetype(dns_zone_t *zone, dns_rdatatype_t type) {
REQUIRE(DNS_ZONE_VALID(zone));
zone->privatetype = type;
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 297,755,938,951,648,500,000,000,000,000,000,000,000 | 4 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. | Safe | 327 | {"cwe_id": "CWE-327", "vulnerability_type": "Use of a Broken or Risky Cryptographic Algorithm", "description": "The product uses a broken or risky cryptographic algorithm or protocol.", "severity": "High", "category": null, "impact": ["Read Application Data", "Modify Application Data", "Hide Activities"], "languages": ... |
static int jas_cmpxformseq_resize(jas_cmpxformseq_t *pxformseq, int n)
{
jas_cmpxform_t **p;
assert(n >= pxformseq->numpxforms);
p = (!pxformseq->pxforms) ? jas_alloc2(n, sizeof(jas_cmpxform_t *)) :
jas_realloc2(pxformseq->pxforms, n, sizeof(jas_cmpxform_t *));
if (!p) {
return -1;
}
pxformseq->pxforms = p;
... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 50,009,776,607,961,550,000,000,000,000,000,000,000 | 13 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... | Safe | 189 | null |
parse_one_sig_subpkt (const byte * buffer, size_t n, int type)
{
switch (type)
{
case SIGSUBPKT_REV_KEY:
if (n < 22)
break;
return 0;
case SIGSUBPKT_SIG_CREATED:
case SIGSUBPKT_SIG_EXPIRE:
case SIGSUBPKT_KEY_EXPIRE:
if (n < 4)
break;
return 0;
case SIGSUBPKT_KEY_FLAGS... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 263,301,980,877,677,750,000,000,000,000,000,000,000 | 57 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... | 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... |
CImg<T>& fillC(const unsigned int x, const unsigned int y, const unsigned int z, const int a0, ...) {
const ulongT whd = (ulongT)_width*_height*_depth;
if (x<_width && y<_height && z<_depth) _cimg_fill1(x,y,z,0,whd,_spectrum,int);
return *this;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 249,334,972,076,303,240,000,000,000,000,000,000,000 | 5 | 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... |
int ip_send_skb(struct sk_buff *skb)
{
struct net *net = sock_net(skb->sk);
int err;
err = ip_local_out(skb);
if (err) {
if (err > 0)
err = net_xmit_errno(err);
if (err)
IP_INC_STATS(net, IPSTATS_MIB_OUTDISCARDS);
}
return err;
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 283,421,729,542,883,760,000,000,000,000,000,000,000 | 15 | 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... |
Magick::Color Magick::Image::matteColor(void) const
{
return(Color(constImage()->matte_color));
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 282,000,380,370,181,400,000,000,000,000,000,000,000 | 4 | Added missing return to avoid use after free. | 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... |
const u8 *sc_asn1_verify_tag(sc_context_t *ctx, const u8 * buf, size_t buflen,
unsigned int tag_in, size_t *taglen_out)
{
return sc_asn1_skip_tag(ctx, &buf, &buflen, tag_in, taglen_out);
} | 0 | [
"CWE-119",
"CWE-787"
] | OpenSC | 412a6142c27a5973c61ba540e33cdc22d5608e68 | 201,086,881,270,932,780,000,000,000,000,000,000,000 | 5 | fixed out of bounds access of ASN.1 Bitstring
Credit to OSS-Fuzz | 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 char **php_xsl_xslt_make_params(HashTable *parht, int xpath_params TSRMLS_DC)
{
int parsize;
zval **value;
char *xpath_expr, *string_key = NULL;
ulong num_key;
char **params = NULL;
int i = 0;
parsize = (2 * zend_hash_num_elements(parht) + 1) * sizeof(char *);
params = (char **)safe_emalloc((2 * zend_... | 1 | [] | php-src | 1744be2d17befc69bf00033993f4081852a747d6 | 7,727,997,739,355,301,000,000,000,000,000,000,000 | 46 | Fix for bug #69782 | Vulnerable | null | null |
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_ULONG_INT : HA_KEYTYPE_LONG_INT; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 198,328,070,975,861,160,000,000,000,000,000,000,000 | 2 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... | 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... |
bool unit_may_gc(Unit *u) {
UnitActiveState state;
int r;
assert(u);
/* Checks whether the unit is ready to be unloaded for garbage collection.
* Returns true when the unit may be collected, and false if there's some
* reason to keep it loaded.
*
* R... | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 226,433,247,433,894,870,000,000,000,000,000,000,000 | 68 | 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... | 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 void rtl8xxxu_dump_action(struct device *dev,
struct ieee80211_hdr *hdr)
{
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)hdr;
u16 cap, timeout;
if (!(rtl8xxxu_debug & RTL8XXXU_DEBUG_ACTION))
return;
switch (mgmt->u.action.u.addba_resp.action_code) {
case WLAN_ACTION_ADDBA_RESP:
cap = le1... | 0 | [
"CWE-400",
"CWE-401"
] | linux | a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c | 241,733,064,614,755,300,000,000,000,000,000,000,000 | 38 | rtl8xxxu: prevent leaking urb
In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> | 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... |
static void nvme_register_types(void)
{
type_register_static(&nvme_info);
type_register_static(&nvme_bus_info);
} | 0 | [] | qemu | 736b01642d85be832385063f278fe7cd4ffb5221 | 190,121,286,805,536,150,000,000,000,000,000,000,000 | 5 | hw/nvme: fix CVE-2021-3929
This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the
device itself. This still allows DMA to MMIO regions of other devices
(e.g. doing P2P DMA to the controller memory buffer of another NVMe
device).
Fixes: CVE-2021-3929
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Review... | Safe | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.