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 |
|---|---|---|---|---|---|---|---|---|---|---|
int cil_gen_devicetreecon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node)
{
enum cil_syntax syntax[] = {
CIL_SYN_STRING,
CIL_SYN_STRING,
CIL_SYN_STRING | CIL_SYN_LIST,
CIL_SYN_END
};
int syntax_len = sizeof(syntax)/sizeof(*syntax);
int rc = SEPOL_ERR;
struct cil_devi... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 48,099,791,604,321,780,000,000,000,000,000,000,000 | 46 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... | 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"... |
SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p)
{
SSL_CIPHER c,*cp;
unsigned long id;
id=0x03000000L|((unsigned long)p[0]<<8L)|(unsigned long)p[1];
c.id=id;
cp = (SSL_CIPHER *)OBJ_bsearch((char *)&c,
(char *)ssl3_ciphers,
SSL3_NUM_CIPHERS,sizeof(SSL_CIPHER),
FP_ICC ssl_cipher_id_cmp);
if (cp =... | 0 | [] | openssl | 8671b898609777c95aedf33743419a523874e6e8 | 25,454,902,488,931,257,000,000,000,000,000,000,000 | 16 | Memory saving patch. | Safe | null | null |
static void tftp_send_error(struct tftp_session *spt, uint16_t errorcode,
const char *msg, struct tftp_t *recv_tp)
{
struct mbuf *m;
struct tftp_t *tp;
DEBUG_TFTP("tftp error msg: %s", msg);
m = m_get(spt->slirp);
if (!m) {
goto out;
}
tp = tftp_prep_m... | 1 | [] | libslirp | 990163cf3ac86b7875559f49602c4d76f46f6f30 | 221,266,877,863,571,270,000,000,000,000,000,000,000 | 28 | tftp: introduce a header structure
Instead of using a composed structure and potentially reading past the
incoming buffer, use a different structure for the header.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> | Vulnerable | null | null |
xcf_load_prop (XcfInfo *info,
PropType *prop_type,
guint32 *prop_size)
{
if (G_UNLIKELY (xcf_read_int32 (info->fp, (guint32 *) prop_type, 1) != 4))
return FALSE;
info->cp += 4;
if (G_UNLIKELY (xcf_read_int32 (info->fp, (guint32 *) prop_size, 1) != 4))
return FALSE;
inf... | 0 | [
"CWE-416"
] | gimp | e82aaa4b4ee0703c879e35ea9321fff6be3e9b6f | 233,103,677,818,568,600,000,000,000,000,000,000,000 | 16 | Bug 767873 - (CVE-2016-4994) Multiple Use-After-Free when parsing...
...XCF channel and layer properties
The properties PROP_ACTIVE_LAYER, PROP_FLOATING_SELECTION,
PROP_ACTIVE_CHANNEL saves the current object pointer the @info
structure. Others like PROP_SELECTION (for channel) and
PROP_GROUP_ITEM (for layer) will de... | 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 zscoreCommand(client *c) {
robj *key = c->argv[1];
robj *zobj;
double score;
if ((zobj = lookupKeyReadOrReply(c,key,shared.null[c->resp])) == NULL ||
checkType(c,zobj,OBJ_ZSET)) return;
if (zsetScore(zobj,c->argv[2]->ptr,&score) == C_ERR) {
addReplyNull(c);
} else {
... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 64,787,784,592,619,040,000,000,000,000,000,000,000 | 14 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... | 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... |
njs_string_copy(njs_value_t *dst, njs_value_t *src)
{
*dst = *src;
/* GC: long string retain */
} | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 246,255,036,559,182,130,000,000,000,000,000,000,000 | 6 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. | Safe | null | null |
msg_use_printf(void)
{
return (!msg_check_screen()
#if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
# ifdef VIMDLL
|| (!gui.in_use && !termcap_active)
# else
|| !termcap_active
# endif
#endif
|| (swapping_screen() && !termcap_active)
);
} | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 303,409,599,786,037,800,000,000,000,000,000,000,000 | 13 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. | 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 kvm_rtas_int_on(struct kvm_vcpu *vcpu, struct rtas_args *args)
{
u32 irq;
int rc;
if (be32_to_cpu(args->nargs) != 1 || be32_to_cpu(args->nret) != 1) {
rc = -3;
goto out;
}
irq = be32_to_cpu(args->args[0]);
if (xics_on_xive())
rc = kvmppc_xive_int_on(vcpu->kvm, irq);
else
rc = kvmppc_xics_i... | 0 | [
"CWE-787"
] | linux | f62f3c20647ebd5fb6ecb8f0b477b9281c44c10a | 50,587,082,129,369,570,000,000,000,000,000,000,000 | 21 | KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow
The kvmppc_rtas_hcall() sets the host rtas_args.rets pointer based on
the rtas_args.nargs that was provided by the guest. That guest nargs
value is not range checked, so the guest can cause the host rets pointer
to be pointed outside the args array. The individual rtas... | 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... |
cmsBool ReadOneElem(cmsIOHANDLER* io, _cmsDICelem* e, cmsUInt32Number i, cmsUInt32Number BaseOffset)
{
if (!_cmsReadUInt32Number(io, &e->Offsets[i])) return FALSE;
if (!_cmsReadUInt32Number(io, &e ->Sizes[i])) return FALSE;
// An offset of zero has special meaning and shal be preserved
if (e ->Offsets... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 12,880,004,166,247,208,000,000,000,000,000,000,000 | 10 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... | Safe | null | null |
static void vvalue_strbuf_append_ui4(wmem_strbuf_t *strbuf, void *ptr)
{
guint32 ui4 = *(guint32*)ptr;
wmem_strbuf_append_printf(strbuf, "%d", ui4);
} | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 319,414,885,468,742,400,000,000,000,000,000,000,000 | 5 | 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... |
local void drop_space(struct space *space)
{
int use;
struct pool *pool;
possess(space->use);
use = peek_lock(space->use);
assert(use != 0);
if (use == 1) {
pool = space->pool;
possess(pool->have);
space->next = pool->head;
pool->head = space;
twist(pool-... | 0 | [
"CWE-703",
"CWE-22"
] | pigz | fdad1406b3ec809f4954ff7cdf9e99eb18c2458f | 277,718,798,356,984,050,000,000,000,000,000,000,000 | 17 | When decompressing with -N or -NT, strip any path from header name.
This uses the path of the compressed file combined with the name
from the header as the name of the decompressed output file. Any
path information in the header name is stripped. This avoids a
possible vulnerability where absolute or descending path... | 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"... |
bool Uint32Analysis::IsSafeUint32Use(HValue* val, HValue* use) {
// Operations that operatate on bits are safe.
if (use->IsBitwise() ||
use->IsShl() ||
use->IsSar() ||
use->IsShr() ||
use->IsBitNot()) {
return true;
} else if (use->IsChange() || use->IsSimulate()) {
// Conversions ... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 126,809,483,179,659,050,000,000,000,000,000,000,000 | 27 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... | Safe | null | null |
static apr_byte_t oidc_cache_crypto_encrypt(request_rec *r, const char *plaintext, const char *key,
char **result) {
apr_byte_t rv = FALSE;
json_t *json = NULL;
json = json_object();
json_object_set_new(json, OIDC_CACHE_CRYPTO_JSON_KEY, json_string(plaintext));
rv = oidc_util_jwt_create(r, (const char*) key, j... | 0 | [
"CWE-330"
] | mod_auth_openidc | 375407c16c61a70b56fdbe13b0d2c8f11398e92c | 284,510,339,830,583,040,000,000,000,000,000,000,000 | 15 | use encrypted JWTs for storing encrypted cache contents
- avoid using static AAD/IV; thanks @niebardzo
- bump to 2.4.9-dev
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> | Safe | 330 | {"cwe_id": "CWE-330", "vulnerability_type": "Use of Insufficiently Random Values", "description": "The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.", "severity": "High", "category": null, "impact": ["Other", "Bypass Protection Mechanism", "Other", "By... |
void cil_destroy_in(struct cil_in *in)
{
if (in == NULL) {
return;
}
cil_symtab_array_destroy(in->symtab);
free(in);
} | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 32,745,468,607,744,062,000,000,000,000,000,000,000 | 10 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... | 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"... |
ZEND_VM_HANDLER(136, ZEND_ECHO, CONST|TMPVAR|CV, ANY)
{
USE_OPLINE
zend_free_op free_op1;
zval *z;
SAVE_OPLINE();
z = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
if (Z_TYPE_P(z) == IS_STRING) {
zend_string *str = Z_STR_P(z);
if (ZSTR_LEN(str) != 0) {
zend_write(ZSTR_VAL(str), ZSTR_LEN(str));
}
} else {
zend_... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 336,895,820,892,847,830,000,000,000,000,000,000,000 | 29 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. | 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 ntop_change_allowed_nets(lua_State* vm) {
char *username, *allowed_nets;
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(!Utils::isUserAdministrator(vm)) return(CONST_LUA_ERROR);
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(CONST_LUA_PARAM_ERROR);
if((user... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 42,216,134,749,480,770,000,000,000,000,000,000,000 | 14 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it | Safe | 254 | null |
static const char *cmd_audit_log_storage_dir(cmd_parms *cmd, void *_dcfg,
const char *p1)
{
directory_config *dcfg = _dcfg;
dcfg->auditlog_storage_dir = ap_server_root_relative(cmd->pool, p1);
return NULL;
} | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 308,859,551,465,437,240,000,000,000,000,000,000,000 | 9 | Added SecXmlExternalEntity | 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... |
ip_set_variable2(self, varname, index, value, flag)
VALUE self;
VALUE varname;
VALUE index;
VALUE value;
VALUE flag;
{
VALUE argv[4];
VALUE retval;
StringValue(varname);
if (!NIL_P(index)) StringValue(index);
StringValue(value);
argv[0] = varname;
argv[1] = index;
a... | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 283,733,538,955,218,980,000,000,000,000,000,000,000 | 27 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | Safe | null | null |
Item_bool_rowready_func2* Lt_creator::create_swap(THD *thd, Item *a, Item *b) const
{
return new(thd->mem_root) Item_func_gt(thd, b, a);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 108,285,658,112,743,700,000,000,000,000,000,000,000 | 4 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... | Safe | 617 | {"cwe_id": "CWE-617", "vulnerability_type": "Reachable Assertion", "description": "The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.", "severity": null, "category": "assertion failure", "im... |
ieee80211_tdls_mgmt_setup(struct wiphy *wiphy, struct net_device *dev,
const u8 *peer, u8 action_code, u8 dialog_token,
u16 status_code, u32 peer_capability, bool initiator,
const u8 *extra_ies, size_t extra_ies_len)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211... | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 151,068,993,661,816,500,000,000,000,000,000,000,000 | 70 | mac80211: handle deauthentication/disassociation from TDLS peer
When receiving a deauthentication/disassociation frame from a TDLS
peer, a station should not disconnect the current AP, but only
disable the current TDLS link if it's enabled.
Without this change, a TDLS issue can be reproduced by following the
steps as... | Safe | null | null |
static char* rdp_get_bitmap_codec_guid_name(const GUID* guid)
{
RPC_STATUS rpc_status;
if (UuidEqual(guid, &CODEC_GUID_REMOTEFX, &rpc_status))
return "CODEC_GUID_REMOTEFX";
else if (UuidEqual(guid, &CODEC_GUID_NSCODEC, &rpc_status))
return "CODEC_GUID_NSCODEC";
else if (UuidEqual(guid, &CODEC_GUID_IGNORE, &rpc... | 0 | [
"CWE-119",
"CWE-125"
] | FreeRDP | 3627aaf7d289315b614a584afb388f04abfb5bbf | 155,254,763,281,841,980,000,000,000,000,000,000,000 | 20 | Fixed #6011: Bounds check in rdp_read_font_capability_set | 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 encrypted_key_decrypt(struct encrypted_key_payload *epayload,
const char *format, const char *hex_encoded_iv)
{
struct key *mkey;
u8 derived_key[HASH_SIZE];
const u8 *master_key;
u8 *hmac;
const char *hex_encoded_data;
unsigned int encrypted_datalen;
size_t master_keylen;
size_t asciilen;
int r... | 0 | [
"CWE-284",
"CWE-264",
"CWE-269"
] | linux | 096fe9eaea40a17e125569f9e657e34cdb6d73bd | 151,503,911,308,994,800,000,000,000,000,000,000,000 | 55 | KEYS: Fix handling of stored error in a negatively instantiated user key
If a user key gets negatively instantiated, an error code is cached in the
payload area. A negatively instantiated key may be then be positively
instantiated by updating it with valid data. However, the ->update key
type method must be aware th... | Safe | 284 | {"cwe_id": "CWE-284", "vulnerability_type": "Improper Access Control", "description": "The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.", "severity": null, "category": "Authorization", "impact": ["Varies by Context"], "languages": [null], "example": "Example not ex... |
lookup_by_cid(struct multi_context *m, const unsigned long cid)
{
if (m)
{
struct multi_instance *mi = (struct multi_instance *) hash_lookup(m->cid_hash, &cid);
if (mi && !mi->halt)
{
return mi;
}
}
return NULL;
} | 0 | [
"CWE-362",
"CWE-476"
] | openvpn | 37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab | 88,125,912,982,041,960,000,000,000,000,000,000,000 | 12 | Fix illegal client float (CVE-2020-11810)
There is a time frame between allocating peer-id and initializing data
channel key (which is performed on receiving push request or on async
push-reply) in which the existing peer-id float checks do not work right.
If a "rogue" data channel packet arrives during that time fra... | Safe | 362 | {"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour... |
static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
void *frame, struct net_device *dev, void *data, int tp_len,
__be16 proto, unsigned char *addr, int hlen, int copylen,
const struct sockcm_cookie *sockc)
{
union tpacket_uhdr ph;
int to_write, offset, len, nr_frags, len_max;
struct socket... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 4,722,602,410,801,795,700,000,000,000,000,000,000 | 80 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... | 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... |
out_char(unsigned c)
{
#if defined(UNIX) || defined(VMS) || defined(AMIGA) || defined(MACOS_X)
if (c == '\n') // turn LF into CR-LF (CRMOD doesn't seem to do this)
out_char('\r');
#endif
out_buf[out_pos++] = c;
// For testing we flush each time.
if (out_pos >= OUT_SIZE || p_wd)
out_flush();
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 128,020,643,105,499,740,000,000,000,000,000,000,000 | 13 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. | 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 nfs41_check_open_stateid(struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(state->inode);
nfs4_stateid *stateid = &state->open_stateid;
const struct cred *cred = state->owner->so_cred;
int status;
if (test_bit(NFS_OPEN_STATE, &state->flags) == 0)
return -NFS4ERR_BAD_STATEID;
status ... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 26,799,241,678,966,247,000,000,000,000,000,000,000 | 20 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... | 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 bdrv_reopen_commit(BDRVReopenState *reopen_state)
{
BlockDriver *drv;
assert(reopen_state != NULL);
drv = reopen_state->bs->drv;
assert(drv != NULL);
/* If there are any driver level actions to take */
if (drv->bdrv_reopen_commit) {
drv->bdrv_reopen_commit(reopen_state);
}
... | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 153,325,177,874,394,700,000,000,000,000,000,000,000 | 21 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... | 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... |
op_replace(oparg_T *oap, int c)
{
int n, numc;
int num_chars;
char_u *newp, *oldp;
size_t oldlen;
struct block_def bd;
char_u *after_p = NULL;
int had_ctrl_v_cr = FALSE;
if ((curbuf->b_ml.ml_flags & ML_EMPTY ) || oap->empty)
return OK; // nothing to do
if (c == REPLAC... | 1 | [
"CWE-122"
] | vim | c249913edc35c0e666d783bfc21595cf9f7d9e0d | 93,916,035,637,160,070,000,000,000,000,000,000,000 | 234 | patch 9.0.0483: illegal memory access when replacing in virtualedit mode
Problem: Illegal memory access when replacing in virtualedit mode.
Solution: Check for replacing NUL after Tab. | Vulnerable | 122 | {"cwe_id": "CWE-122", "vulnerability_type": "Heap-based Buffer Overflow", "description": "A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().", "severity": "... |
static int handler_QuickTime(deark *c, lctx *d, i64 opcode, i64 data_pos, i64 *bytes_used)
{
i64 payload_pos;
i64 payload_len;
i64 endpos;
i64 idsc_pos;
payload_len = de_getu32be(data_pos);
payload_pos = data_pos+4;
de_dbg(c, "payload: pos=%"I64_FMT", len=%"I64_FMT, payload_pos, payload_len);
endpos = payload_... | 0 | [
"CWE-476"
] | deark | 287f5ac31dfdc074669182f51ece637706070eeb | 65,774,549,275,562,870,000,000,000,000,000,000,000 | 21 | pict: Fixed a bug with ICC profile extraction
Could cause a NULL pointer dereference.
Found by F. Çelik. | 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 Item_equal::merge_into_list(THD *thd, List<Item_equal> *list,
bool save_merged,
bool only_intersected)
{
Item_equal *item;
List_iterator<Item_equal> it(*list);
Item_equal *merge_into= NULL;
while((item= it++))
{
if (!merge_into)
{
... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 139,244,461,842,016,200,000,000,000,000,000,000,000 | 23 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... | Safe | 617 | {"cwe_id": "CWE-617", "vulnerability_type": "Reachable Assertion", "description": "The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.", "severity": null, "category": "assertion failure", "im... |
int kvm_vcpu_read_guest_atomic(struct kvm_vcpu *vcpu, gpa_t gpa,
void *data, unsigned long len)
{
gfn_t gfn = gpa >> PAGE_SHIFT;
struct kvm_memory_slot *slot = kvm_vcpu_gfn_to_memslot(vcpu, gfn);
int offset = offset_in_page(gpa);
return __kvm_read_guest_atomic(slot, gfn, data, offset, len); | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 292,939,353,333,822,330,000,000,000,000,000,000,000 | 9 | 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 void populate_mgmt_filter_uuids(uint8_t (*mgmt_uuids)[16], GSList *uuids)
{
GSList *l;
for (l = uuids; l != NULL; l = g_slist_next(l)) {
bt_uuid_t uuid, u128;
uint128_t uint128;
bt_string_to_uuid(&uuid, l->data);
bt_uuid_to_uuid128(&uuid, &u128);
ntoh128((uint128_t *) u128.value.u128.data, &uint12... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 312,920,505,099,919,940,000,000,000,000,000,000,000 | 17 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. | Safe | 862 | {"cwe_id": "CWE-862", "vulnerability_type": "Missing Authorization", "description": "The product does not perform an authorization check when an actor attempts to access a resource or perform an action.", "severity": "High", "category": "AuthZ", "impact": ["Read Application Data", "Read Files or Directories", "Modify A... |
errorProcessor(XML_Parser parser,
const char *s,
const char *end,
const char **nextPtr)
{
return errorCode;
} | 0 | [
"CWE-119"
] | libexpat | ba0f9c3b40c264b8dd392e02a7a060a8fa54f032 | 99,239,848,563,498,970,000,000,000,000,000,000,000 | 7 | CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings
https://sourceforge.net/p/expat/bugs/528/ | 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 ... |
frame_setheight(frame_T *curfrp, int height)
{
int room; // total number of lines available
int take; // number of lines taken from other windows
int room_cmdline; // lines available from cmdline
int run;
frame_T *frp;
int h;
int room_reserved;
// If the height already is the de... | 0 | [
"CWE-416"
] | vim | 28d032cc688ccfda18c5bbcab8b50aba6e18cde5 | 313,574,910,858,532,500,000,000,000,000,000,000,000 | 159 | patch 8.2.4979: accessing freed memory when line is flushed
Problem: Accessing freed memory when line is flushed.
Solution: Make a copy of the pattern to search for. | 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 handler_t wstunnel_recv_parse(request_st * const r, http_response_opts * const opts, buffer * const b, size_t n) {
handler_ctx *hctx = (handler_ctx *)opts->pdata;
DEBUG_LOG_DEBUG("recv data from backend (fd=%d), size=%zx", hctx->gw.fd, n);
if (0 == n) return HANDLER_FINISHED;
if (mod_wstunnel_fra... | 0 | [
"CWE-476"
] | lighttpd1.4 | 971773f1fae600074b46ef64f3ca1f76c227985f | 47,629,779,141,341,100,000,000,000,000,000,000,000 | 12 | [mod_wstunnel] fix crash with bad hybivers (fixes #3165)
(thx Michał Dardas)
x-ref:
"mod_wstunnel null pointer dereference"
https://redmine.lighttpd.net/issues/3165 | 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 void test11(char const* infile,
char const* password,
char const* outfile,
char const* outfile2)
{
qpdf_read(qpdf, infile, password);
qpdf_init_write(qpdf, outfile);
qpdf_set_static_ID(qpdf, QPDF_TRUE);
qpdf_set_r2_encryption_parameters(
qpdf, "user1", "owner1", QPDF_FALSE, QPDF_T... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 150,670,822,541,752,250,000,000,000,000,000,000,000 | 13 | 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... |
e_ews_soup_log_printer (SoupLogger *logger,
SoupLoggerLogLevel level,
char direction,
const gchar *data,
gpointer user_data)
{
const gchar *filtered_data = NULL;
if (e_ews_debug_get_log_level () >= 3) {
if (direction == '>' && g_ascii_strncasecmp (data, "Host:", 5) == 0)
filtered_data = "Host: <reda... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 38,342,950,973,966,186,000,000,000,000,000,000,000 | 21 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 | Safe | 295 | {"cwe_id": "CWE-295", "vulnerability_type": "Improper Certificate Validation", "description": "The product does not validate, or incorrectly validates, a certificate.", "severity": null, "category": null, "impact": ["Bypass Protection Mechanism", "Gain Privileges or Assume Identity"], "languages": [null], "example": "E... |
poppler_index_iter_get_action (PopplerIndexIter *iter)
{
OutlineItem *item;
const LinkAction *link_action;
PopplerAction *action;
gchar *title;
g_return_val_if_fail (iter != nullptr, NULL);
item = (OutlineItem *)iter->items->get (iter->index);
link_action = item->getAction ();
title = unicode_to_char (item-... | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 110,934,777,858,895,140,000,000,000,000,000,000,000 | 20 | Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236 | 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... |
check_nextcmd(char_u *p)
{
char_u *s = skipwhite(p);
if (*s == '|' || *s == '\n')
return (s + 1);
else
return NULL;
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 68,970,856,288,260,305,000,000,000,000,000,000,000 | 9 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. | 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... |
struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
struct request_sock *req,
struct tcp_fastopen_cookie *foc,
enum tcp_synack_type synack_type)
{
struct inet_request_sock *ireq = inet_rsk(req);
const struct tcp_sock *tp = tcp_sk(sk);
struct tcp_md5sig_key *md5 = NULL;
struct t... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 115,584,162,375,310,180,000,000,000,000,000,000,000 | 97 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... | Safe | 190 | {"cwe_id": "CWE-190", "vulnerability_type": "Integer Overflow or Wraparound", "description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n assumes that the resulting value will always be larger than\n the original value. This occurs whe... |
static void _rtl_usb_io_handler_release(struct ieee80211_hw *hw)
{
struct rtl_priv __maybe_unused *rtlpriv = rtl_priv(hw);
mutex_destroy(&rtlpriv->io.bb_mutex);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 3f93616951138a598d930dcaec40f2bfd9ce43bb | 67,177,143,739,393,170,000,000,000,000,000,000,000 | 6 | rtlwifi: prevent memory leak in rtl_usb_probe
In rtl_usb_probe if allocation for usb_data fails the allocated hw
should be released. In addition the allocated rtlpriv->usb_data should
be released on error handling path.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeau... | 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 OPJ_BOOL opj_j2k_write_all_tile_parts(opj_j2k_t *p_j2k,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_data_written,
OPJ_UINT32 total_data_size,
opj_stream_private_t *p_stream,
struct opj_event_mgr * p_manager
)
{
OPJ_UINT32 tilepartno = ... | 0 | [
"CWE-20"
] | openjpeg | 73fdf28342e4594019af26eb6a347a34eceb6296 | 286,162,879,540,919,580,000,000,000,000,000,000,000 | 121 | opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only) | 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... |
epass2003_sm_free_wrapped_apdu(struct sc_card *card,
struct sc_apdu *plain, struct sc_apdu **sm_apdu)
{
struct sc_context *ctx = card->ctx;
int rv = SC_SUCCESS;
LOG_FUNC_CALLED(ctx);
if (!sm_apdu)
LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_ARGUMENTS);
if (!(*sm_apdu))
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
if (pla... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 330,747,672,784,914,580,000,000,000,000,000,000,000 | 29 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. | Safe | 415 | {"cwe_id": "CWE-415", "vulnerability_type": "Double Free", "description": "The product calls free() twice on the same memory address.", "severity": "High", "category": "Double-free", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands"], "languages": [null, "C", "C++"], "example": "Example not extracted"... |
int CLASS foveon_apply_curve (short *t_curve, int i)
{
if (abs(i) >= t_curve[0]) return 0;
return i < 0 ? -t_curve[1-i] : t_curve[1+i];
} | 0 | [
"CWE-119",
"CWE-787",
"CWE-190"
] | LibRaw-demosaic-pack-GPL2 | 194f592e205990ea8fce72b6c571c14350aca716 | 183,663,299,228,875,600,000,000,000,000,000,000,000 | 5 | Fixed possible foveon buffer overrun (Secunia SA750000) | 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 ... |
find_variable (name)
const char *name;
{
return (find_variable_internal (name, (expanding_redir == 0 && (assigning_in_environment || executing_builtin))));
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 318,002,852,050,707,650,000,000,000,000,000,000,000 | 5 | commit bash-20120224 snapshot | Safe | null | null |
bool JlCompress::removeFile(QStringList listFile) {
bool ret = true;
// Per ogni file
for (int i=0; i<listFile.count(); i++) {
// Lo elimino
ret = ret && QFile::remove(listFile.at(i));
}
return ret;
} | 0 | [
"CWE-22"
] | quazip | 5d2fc16a1976e5bf78d2927b012f67a2ae047a98 | 133,287,460,302,814,970,000,000,000,000,000,000,000 | 9 | Fixed the Zip Slip vulnerability in JlCompress
When extracting a file with a dangerous path like "../evil.exe"
from a ZIP archive with JlCompress::extractDir(), the target
file would be created outside of the target directory, potentially
even overwriting an existing file there. | 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 ... |
sug_compare(const void *s1, const void *s2)
{
suggest_T *p1 = (suggest_T *)s1;
suggest_T *p2 = (suggest_T *)s2;
int n = p1->st_score - p2->st_score;
if (n == 0)
{
n = p1->st_altscore - p2->st_altscore;
if (n == 0)
n = STRICMP(p1->st_word, p2->st_word);
}
return n;
} | 0 | [
"CWE-457"
] | vim | 15d9890eee53afc61eb0a03b878a19cb5672f732 | 135,453,333,137,118,900,000,000,000,000,000,000,000 | 14 | patch 8.2.3582: reading uninitialized memory when giving spell suggestions
Problem: Reading uninitialized memory when giving spell suggestions.
Solution: Check that preword is not empty. | Safe | 457 | {"cwe_id": "CWE-457", "vulnerability_type": "Use of Uninitialized Variable", "description": "The code uses a variable that has not been initialized, leading to unpredictable or unintended results.", "severity": "High", "category": null, "impact": ["Other", "Other"], "languages": ["C", "C++", "Perl", "PHP", null], "exam... |
void *ns_get_path(struct path *path, struct task_struct *task,
const struct proc_ns_operations *ns_ops)
{
struct ns_common *ns;
void *ret;
again:
ns = ns_ops->get(task);
if (!ns)
return ERR_PTR(-ENOENT);
ret = __ns_get_path(path, ns);
if (IS_ERR(ret) && PTR_ERR(ret) == -EAGAIN)
goto again;
return ret;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 073c516ff73557a8f7315066856c04b50383ac34 | 263,610,499,003,526,730,000,000,000,000,000,000,000 | 16 | nsfs: mark dentry with DCACHE_RCUACCESS
Andrey reported a use-after-free in __ns_get_path():
spin_lock include/linux/spinlock.h:299 [inline]
lockref_get_not_dead+0x19/0x80 lib/lockref.c:179
__ns_get_path+0x197/0x860 fs/nsfs.c:66
open_related_ns+0xda/0x200 fs/nsfs.c:143
sock_ioctl+0x39d/0x440 net/socket.c:10... | 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... |
am_cache_entry_t *am_get_request_session_by_nameid(request_rec *r, char *nameid)
{
return am_cache_lock(r->server, AM_CACHE_NAMEID, nameid);
} | 1 | [
"CWE-79"
] | mod_auth_mellon | 7af21c53da7bb1de024274ee6da30bc22316a079 | 41,958,831,550,235,650,000,000,000,000,000,000,000 | 4 | Fix Cross-Site Session Transfer vulnerability
mod_auth_mellon did not verify that the site the session was created
for was the same site as the site the user accessed. This allows an
attacker with access to one web site on a server to use the same
session to get access to a different site running on the same server.
... | Vulnerable | 79 | {"cwe_id": "CWE-79", "vulnerability_type": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", ... |
inline void TABLE::mark_index_columns_no_reset(uint index, MY_BITMAP *bitmap)
{
do_mark_index_columns(this, index, bitmap, false);
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 109,912,370,797,255,180,000,000,000,000,000,000,000 | 4 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. | 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... |
copy_compressed_bytes (BITCODE_RC *restrict dst, BITCODE_RC *restrict src,
int length)
{
while (length >= 32)
{
copy_16 (16);
copy_16 (0);
src += 32;
length -= 32;
}
switch (length)
{
case 0:
break;
case 1:
copy_1 (0);
break;
... | 0 | [
"CWE-787"
] | libredwg | 45d2a290c65ed691be0901ba2b2ef51044e07a16 | 212,119,696,278,636,950,000,000,000,000,000,000,000 | 165 | decode_r2007: fix for invalid section size
See GH #350. With fuzzing section->data_size might not fit
section_page->uncomp_size. | 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... |
extent uzmbclen(ptr)
ZCONST unsigned char *ptr;
{
int mbl;
mbl = mblen((ZCONST char *)ptr, MB_CUR_MAX);
/* For use in code scanning through MBCS strings, we need a strictly
positive "MB char bytes count". For our scanning purpose, it is not
not relevant whether the MB character is valid ... | 0 | [
"CWE-400"
] | unzip | 41beb477c5744bc396fa1162ee0c14218ec12213 | 45,417,589,919,242,130,000,000,000,000,000,000,000 | 14 | Fix bug in undefer_input() that misplaced the input state. | 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 bfq_max_budget(struct bfq_data *bfqd)
{
if (bfqd->budgets_assigned < bfq_stats_min_budgets)
return bfq_default_max_budget;
else
return bfqd->bfq_max_budget; | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 72,970,519,602,415,100,000,000,000,000,000,000,000 | 7 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... | 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 tree_content_set(
struct tree_entry *root,
const char *p,
const unsigned char *sha1,
const uint16_t mode,
struct tree_content *subtree)
{
struct tree_content *t;
const char *slash1;
unsigned int i, n;
struct tree_entry *e;
slash1 = strchrnul(p, '/');
n = slash1 - p;
if (!n)
die("Empty path com... | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 154,882,655,157,843,920,000,000,000,000,000,000,000 | 88 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... | 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 ... |
TEST_F(HttpConnectionManagerConfigTest, InvalidServerName) {
const std::string yaml_string = R"EOF(
server_name: >
foo
route_config:
name: local_route
stat_prefix: router
)EOF";
EXPECT_THROW(createHttpConnectionManagerConfig(yaml_string), ProtoValidationException);
} | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 144,565,179,082,928,350,000,000,000,000,000,000,000 | 11 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> | Safe | 22 | {"cwe_id": "CWE-22", "vulnerability_type": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", "description": "The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product ... |
//! Return a \c 1x10 image containing specified values.
static CImg<T> vector(const T& a0, const T& a1, const T& a2, const T& a3,
const T& a4, const T& a5, const T& a6, const T& a7,
const T& a8, const T& a9) {
CImg<T> r(1,10); T *ptr = r._data;
*(p... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 64,425,782,206,854,200,000,000,000,000,000,000,000 | 9 | Fix other issues in 'CImg<T>::load_bmp()'. | Safe | 125 | {"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"... |
static void shutdown_openssl(void)
{
PJ_UNUSED_ARG(openssl_init_count);
} | 0 | [
"CWE-362",
"CWE-703"
] | pjproject | d5f95aa066f878b0aef6a64e60b61e8626e664cd | 14,876,242,792,068,598,000,000,000,000,000,000,000 | 4 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without... | 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... |
OVS_REQUIRES(ct->ct_lock)
{
if (conn->alg) {
expectation_clean(ct, &conn->key);
}
uint32_t hash = conn_key_hash(&conn->key, ct->hash_basis);
cmap_remove(&ct->conns, &conn->cm_node, hash);
} | 0 | [
"CWE-400"
] | ovs | 53c1b8b166f3dd217bc391d707885f789e9ecc49 | 200,087,889,067,451,760,000,000,000,000,000,000,000 | 9 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... | 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 noinline int hiddev_ioctl_string(struct hiddev *hiddev, unsigned int cmd, void __user *user_arg)
{
struct hid_device *hid = hiddev->hid;
struct usb_device *dev = hid_to_usb_dev(hid);
int idx, len;
char *buf;
if (get_user(idx, (int __user *)user_arg))
return -EFAULT;
if ((buf = kmalloc(HID_STRING_SIZE, ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 93a2001bdfd5376c3dc2158653034c20392d15c5 | 338,160,416,032,618,000,000,000,000,000,000,000,000 | 27 | HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands
This patch validates the num_values parameter from userland during the
HIDIOCGUSAGES and HIDIOCSUSAGES commands. Previously, if the report id was set
to HID_REPORT_ID_UNKNOWN, we would fail to validate the num_values parameter
leading to a heap... | 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 ca8210_rx_done(struct cas_control *cas_ctl)
{
u8 *buf;
unsigned int len;
struct work_priv_container *mlme_reset_wpc;
struct ca8210_priv *priv = cas_ctl->priv;
buf = cas_ctl->tx_in_buf;
len = buf[1] + 2;
if (len > CA8210_SPI_BUF_SIZE) {
dev_crit(
&priv->spi->dev,
"Received packet len (%u) err... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 6402939ec86eaf226c8b8ae00ed983936b164908 | 277,603,219,964,557,660,000,000,000,000,000,000,000 | 110 | ieee802154: ca8210: prevent memory leak
In ca8210_probe the allocated pdata needs to be assigned to
spi_device->dev.platform_data before calling ca8210_get_platform_data.
Othrwise when ca8210_get_platform_data fails pdata cannot be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lor... | 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... |
PHP_FUNCTION(imagepalettecopy)
{
zval *dstim, *srcim;
gdImagePtr dst, src;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &dstim, &srcim) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(dst, gdImagePtr, &dstim, -1, "Image", le_gd);
ZEND_FETCH_RESOURCE(src, gdImagePtr, &srcim, -1, "Image", le_gd);
gd... | 0 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 11,148,627,720,284,682,000,000,000,000,000,000,000 | 14 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls | 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 check_ptr_to_btf_access(struct bpf_verifier_env *env,
struct bpf_reg_state *regs,
int regno, int off, int size,
enum bpf_access_type atype,
int value_regno)
{
struct bpf_reg_state *reg = regs + regno;
const struct btf_type *t = btf_type_by_id(btf_vmlinux, reg->btf_id);
const ch... | 0 | [] | linux | 294f2fc6da27620a506e6c050241655459ccd6bd | 49,970,226,162,528,990,000,000,000,000,000,000 | 56 | bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds()
Currently, for all op verification we call __red_deduce_bounds() and
__red_bound_offset() but we only call __update_reg_bounds() in bitwise
ops. However, we could benefit from calling __update_reg_bounds() in
BPF_ADD, BPF_SUB, and BPF_MUL case... | Safe | null | null |
yang_read_deviate_unique(struct lys_deviate *deviate, struct lys_node *dev_target)
{
struct ly_ctx *ctx = dev_target->module->ctx;
struct lys_node_list *list;
struct lys_unique *unique;
/* check target node type */
if (dev_target->nodetype != LYS_LIST) {
LOGVAL(ctx, LYE_INSTMT, LY_VLOG_NONE... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 214,642,589,936,915,900,000,000,000,000,000,000,000 | 27 | yang parser BUGFIX double free
Fixes #742 | Safe | 415 | {"cwe_id": "CWE-415", "vulnerability_type": "Double Free", "description": "The product calls free() twice on the same memory address.", "severity": "High", "category": "Double-free", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands"], "languages": [null, "C", "C++"], "example": "Example not extracted"... |
stack_extend(mrb_state *mrb, int room)
{
if (mrb->c->stack + room >= mrb->c->stend) {
stack_extend_alloc(mrb, room);
}
} | 0 | [
"CWE-416",
"CWE-190"
] | mruby | 1905091634a6a2925c911484434448e568330626 | 224,267,746,119,206,800,000,000,000,000,000,000,000 | 6 | Check length of env stack before accessing upvar; fix #3995 | 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... |
tar_sparse_dump_header (struct tar_sparse_file *file)
{
if (file->optab->dump_header)
return file->optab->dump_header (file);
return false;
} | 0 | [] | tar | c15c42ccd1e2377945fd0414eca1a49294bff454 | 264,584,361,780,621,270,000,000,000,000,000,000,000 | 6 | Fix CVE-2018-20482
* NEWS: Update.
* src/sparse.c (sparse_dump_region): Handle short read condition.
(sparse_extract_region,check_data_region): Fix dumped_size calculation.
Handle short read condition.
(pax_decode_header): Fix dumped_size calculation.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likew... | Safe | null | null |
xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader) {
if (reader == NULL)
return(-1);
if (reader->node == NULL)
return(-1);
if (reader->curnode == NULL)
return(0);
if (reader->curnode->type == XML_ATTRIBUTE_NODE) {
if (reader->curnode->children == NULL)
return(0);
reader->curnode = reader... | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 199,810,734,267,182,900,000,000,000,000,000,000,000 | 32 | CVE-2015-1819 Enforce the reader to run in constant memory
One of the operation on the reader could resolve entities
leading to the classic expansion issue. Make sure the
buffer used for xmlreader operation is bounded.
Introduce a new allocation type for the buffers for this effect. | Safe | 399 | null |
void hnti_box_del(GF_Box *a)
{
gf_free(a);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 194,764,355,634,166,300,000,000,000,000,000,000,000 | 4 | fixed #1587 | 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 check_object(struct kmem_cache *s, struct page *page,
void *object, int active)
{
u8 *p = object;
u8 *endobject = object + s->objsize;
if (s->flags & SLAB_RED_ZONE) {
unsigned int red =
active ? SLUB_RED_ACTIVE : SLUB_RED_INACTIVE;
if (!check_bytes_and_report(s, page, object, "Redzone",
e... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 339,640,502,363,163,840,000,000,000,000,000,000,000 | 53 | 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 propfind_by_resources(struct propfind_ctx *fctx)
{
int r = 0;
sqlite3 *newdb;
if (!fctx->mailbox) return 0;
/* Open the DAV DB corresponding to the mailbox.
*
* Note we open the new one first before closing the old one, so we
* get refcounted retaining of the open database wi... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 198,498,191,116,004,840,000,000,000,000,000,000,000 | 41 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication | Safe | null | null |
static void scene_dump_vrml_id(GF_SceneDumper *sdump, GF_Node *node)
{
u32 id;
const char *node_name;
if (!sdump->trace) return;
/*FIXME - optimize id/name fetch*/
node_name = gf_node_get_name_and_id(node, &id);
if (node_name)
gf_fprintf(sdump->trace, "%s", node_name);
else
gf_fprintf(sdump->trace, "N%d", id... | 0 | [
"CWE-476"
] | gpac | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | 69,867,102,166,305,570,000,000,000,000,000,000,000 | 12 | fixed #2232 | 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 nfc_targets_found(struct nfc_dev *dev,
struct nfc_target *targets, int n_targets)
{
int i;
pr_debug("dev_name=%s n_targets=%d\n", dev_name(&dev->dev), n_targets);
for (i = 0; i < n_targets; i++)
targets[i].idx = dev->target_next_idx++;
device_lock(&dev->dev);
if (dev->polling == false) {
device... | 0 | [] | linux | 3e3b5dfcd16a3e254aab61bd1e8c417dd4503102 | 54,105,221,294,927,680,000,000,000,000,000,000,000 | 43 | NFC: reorder the logic in nfc_{un,}register_device
There is a potential UAF between the unregistration routine and the NFC
netlink operations.
The race that cause that UAF can be shown as below:
(FREE) | (USE)
nfcmrvl_nci_unregister_dev | nfc_genl_dev_up
nci_close_device |
nci... | Safe | null | null |
p11_rpc_buffer_add_rsa_pkcs_pss_mechanism_value (p11_buffer *buffer,
const void *value,
CK_ULONG value_length)
{
CK_RSA_PKCS_PSS_PARAMS params;
/* Check if value can be converted to CK_RSA_PKCS_PSS_PARAMS. */
if (value_length != sizeof (CK_RSA_PKCS_PSS_PARAMS)) {
p11_buffer_fail (buffer);
return;
... | 0 | [
"CWE-787"
] | p11-kit | 2617f3ef888e103324a28811886b99ed0a56346d | 196,503,261,938,989,380,000,000,000,000,000,000,000 | 26 | Check attribute length against buffer size
If an attribute's length does not match the length of the byte array
inside it, one length was used for allocation, and the other was used
for memcpy. This additional check will instead return an error on
malformed messages. | 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 udbg_rtascon_getc(void)
{
int c;
while ((c = udbg_rtascon_getc_poll()) == -1)
;
return c;
} | 0 | [
"CWE-862"
] | linux | bd59380c5ba4147dcbaad3e582b55ccfd120b764 | 327,314,677,706,282,960,000,000,000,000,000,000,000 | 9 | powerpc/rtas: Restrict RTAS requests from userspace
A number of userspace utilities depend on making calls to RTAS to retrieve
information and update various things.
The existing API through which we expose RTAS to userspace exposes more
RTAS functionality than we actually need, through the sys_rtas syscall,
which al... | Safe | 862 | {"cwe_id": "CWE-862", "vulnerability_type": "Missing Authorization", "description": "The product does not perform an authorization check when an actor attempts to access a resource or perform an action.", "severity": "High", "category": "AuthZ", "impact": ["Read Application Data", "Read Files or Directories", "Modify A... |
static __attribute__ ((format (printf, 2, 3))) void QDECL CL_RefPrintf( int print_level, const char *fmt, ...) {
va_list argptr;
char msg[MAXPRINTMSG];
va_start (argptr,fmt);
Q_vsnprintf (msg, sizeof(msg), fmt, argptr);
va_end (argptr);
if ( print_level == PRINT_ALL ) {
Com_Printf ("%s", msg);
} else if (... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 96,394,701,927,445,340,000,000,000,000,000,000,000 | 16 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. | Safe | 269 | {"cwe_id": "CWE-269", "vulnerability_type": "Improper Privilege Management", "description": "The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.", "severity": "Medium", "category": null, "impact": ["Gain Privileges or Assume Ide... |
static int cmp_t(const void * const a, const void * const b)
{
if (((const PureFileInfo *) a)->mtime < ((const PureFileInfo *) b)->mtime) {
return 1;
}
if (((const PureFileInfo *) a)->mtime > ((const PureFileInfo *) b)->mtime) {
return -1;
}
return 0;
} | 0 | [
"CWE-400",
"CWE-703"
] | pure-ftpd | aea56f4bcb9948d456f3fae4d044fd3fa2e19706 | 201,723,727,447,307,600,000,000,000,000,000,000,000 | 10 | listdir(): reuse a single buffer to store every file name to display
Allocating a new buffer for each entry is useless.
And as these buffers are allocated on the stack, on systems with a
small stack size, with many entries, the limit can easily be reached,
causing a stack exhaustion and aborting the user session.
Re... | 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... |
logger_stop_signal_cb (const void *pointer, void *data,
const char *signal, const char *type_data,
void *signal_data)
{
struct t_logger_buffer *ptr_logger_buffer;
/* make C compiler happy */
(void) pointer;
(void) data;
(void) signal;
(void) type_da... | 0 | [
"CWE-119",
"CWE-787"
] | weechat | f105c6f0b56fb5687b2d2aedf37cb1d1b434d556 | 15,342,603,238,783,141,000,000,000,000,000,000,000 | 18 | logger: call strftime before replacing buffer local variables | 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 ... |
inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate)
{
IF_DESKTOP(long long) int n = 0;
ssize_t nwrote;
/* Allocate all global buffers (for DYN_ALLOC option) */
gunzip_window = xmalloc(GUNZIP_WSIZE);
gunzip_outbuf_count = 0;
gunzip_bytes_out = 0;
gunzip_src_fd = xstate->src_fd;
/* (re) initialize s... | 0 | [
"CWE-755"
] | busybox | f25d254dfd4243698c31a4f3153d4ac72aa9e9bd | 59,562,072,838,416,680,000,000,000,000,000,000,000 | 56 | decompress_gunzip: Fix DoS if gzip is corrupt
On certain corrupt gzip files, huft_build will set the error bit on
the result pointer. If afterwards abort_unzip is called huft_free
might run into a segmentation fault or an invalid pointer to
free(p).
In order to mitigate this, we check in huft_free if the error bit
is... | Safe | 755 | {"cwe_id": "CWE-755", "vulnerability_type": "Improper Handling of Exceptional Conditions", "description": "The product does not handle or incorrectly handles an exceptional condition.", "severity": "Medium", "category": null, "impact": ["Other"], "languages": [null], "example": "Example not extracted"} |
my_decimal *Item_sum_udf_str::val_decimal(my_decimal *dec)
{
return val_decimal_from_string(dec);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 262,914,790,652,040,700,000,000,000,000,000,000,000 | 4 | 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": "... |
free_string_option(char_u *p)
{
if (p != empty_option)
vim_free(p);
} | 0 | [
"CWE-20"
] | vim | d0b5138ba4bccff8a744c99836041ef6322ed39a | 182,093,981,946,269,640,000,000,000,000,000,000,000 | 5 | patch 8.0.0056
Problem: When setting 'filetype' there is no check for a valid name.
Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'. | 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... |
kadm5_setkey_principal_4(void *server_handle, krb5_principal principal,
krb5_boolean keepold, kadm5_key_data *key_data,
int n_key_data)
{
krb5_db_entry *kdb;
osa_princ_ent_rec adb;
krb5_timestamp now;
kadm5_policy_ent_rec pol;
krb5_key_data *new_key_... | 0 | [
"CWE-476",
"CWE-90"
] | krb5 | e1caf6fb74981da62039846931ebdffed71309d1 | 292,517,152,642,533,330,000,000,000,000,000,000,000 | 172 | Fix flaws in LDAP DN checking
KDB_TL_USER_INFO tl-data is intended to be internal to the LDAP KDB
module, and not used in disk or wire principal entries. Prevent
kadmin clients from sending KDB_TL_USER_INFO tl-data by giving it a
type number less than 256 and filtering out type numbers less than 256
in kadm5_create_p... | 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... |
}
//! Compute n-D Fast Fourier Transform \newinstance. | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 58,965,914,646,012,860,000,000,000,000,000,000,000 | 3 | 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... |
njs_vm_value_to_bytes(njs_vm_t *vm, njs_str_t *dst, njs_value_t *src)
{
u_char *start;
size_t size, length, offset;
njs_int_t ret;
njs_value_t value;
njs_typed_array_t *array;
njs_array_buffer_t *buffer;
if (njs_slow_path(src == NULL)) {
... | 0 | [
"CWE-416"
] | njs | 6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6 | 252,937,051,686,829,000,000,000,000,000,000,000,000 | 70 | 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... |
static void *cgroup_idr_replace(struct idr *idr, void *ptr, int id)
{
void *ret;
spin_lock_bh(&cgroup_idr_lock);
ret = idr_replace(idr, ptr, id);
spin_unlock_bh(&cgroup_idr_lock);
return ret;
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 202,788,749,670,391,700,000,000,000,000,000,000,000 | 9 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... | 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 logfile(const int crit, const char *format, ...)
{
#if defined(NON_ROOT_FTP)
(void) crit;
(void) format;
#else
const char *urgency;
va_list va;
char line[MAX_SYSLOG_LINE];
if (no_syslog != 0) {
va_end(va);
return;
}
va_start(va, format);
vsnprintf(line, sizeof l... | 0 | [
"CWE-434"
] | pure-ftpd | 37ad222868e52271905b94afea4fc780d83294b4 | 324,769,853,538,054,950,000,000,000,000,000,000,000 | 48 | 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... |
static int ntop_update_host_alert_policy(lua_State* vm) {
NetworkInterface *ntop_interface = getCurrentInterface(vm);
char *host_ip;
u_int16_t vlan_id = 0;
char buf[64];
Host *h;
ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) ... | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 300,646,077,903,953,420,000,000,000,000,000,000,000 | 22 | Security fix: prevents empty host from being used | 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 ocfs2_write_end_nolock(struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
int i;
unsigned from, to, start = pos & (PAGE_CACHE_SIZE - 1);
struct inode *inode = mapping->host;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_write... | 0 | [
"CWE-20"
] | linux-2.6 | 272b62c1f0f6f742046e45b50b6fec98860208a0 | 240,453,488,152,899,900,000,000,000,000,000,000,000 | 75 | Treat writes as new when holes span across page boundaries
When a hole spans across page boundaries, the next write forces
a read of the block. This could end up reading existing garbage
data from the disk in ocfs2_map_page_blocks. This leads to
non-zero holes. In order to avoid this, mark the writes as new
when the h... | 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 UINT cliprdr_send_data_request(wfClipboard* clipboard, UINT32 formatId)
{
UINT rc;
UINT32 remoteFormatId;
CLIPRDR_FORMAT_DATA_REQUEST formatDataRequest;
if (!clipboard || !clipboard->context || !clipboard->context->ClientFormatDataRequest)
return ERROR_INTERNAL_ERROR;
remoteFormatId = get_remote_format_... | 0 | [
"CWE-20"
] | FreeRDP | 0d79670a28c0ab049af08613621aa0c267f977e9 | 238,025,946,691,261,100,000,000,000,000,000,000,000 | 22 | Fixed missing input checks for file contents request
reported by Valentino Ricotta (Thalium) | 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 propfind_calusertype(const xmlChar *name, xmlNsPtr ns,
struct propfind_ctx *fctx,
xmlNodePtr resp __attribute__((unused)),
struct propstat propstat[],
void *rock __attribute__((unused)))
{
const char *type = fctx->req_tgt->user ? "INDIVIDUAL" : "UNKNOWN";
if (!namespace_calendar.enabled) re... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 74,017,109,844,083,975,000,000,000,000,000,000,000 | 15 | HTTP: don't overrun buffer when parsing strings with sscanf() | 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 TS_RESP_free(TS_RESP *a)
{
if (!a)
return;
if (a->tst_info)
TS_TST_INFO_free(a->tst_info);
TS_RESP_int_free(a);
} | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 176,709,563,581,298,400,000,000,000,000,000,000,000 | 8 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller | Safe | null | null |
char *drm_get_connector_status_name(enum drm_connector_status status)
{
if (status == connector_status_connected)
return "connected";
else if (status == connector_status_disconnected)
return "disconnected";
else
return "unknown";
} | 0 | [
"CWE-190",
"CWE-189"
] | linux | a5cd335165e31db9dbab636fd29895d41da55dd2 | 323,117,500,172,054,570,000,000,000,000,000,000,000 | 9 | drm: integer overflow in drm_mode_dirtyfb_ioctl()
There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips. The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.
Reported-by: Haogang Chen <haogangchen@g... | Safe | 190 | {"cwe_id": "CWE-190", "vulnerability_type": "Integer Overflow or Wraparound", "description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n assumes that the resulting value will always be larger than\n the original value. This occurs whe... |
static int decode_hybrid(const uint8_t *sptr, uint8_t *dptr, int dx, int dy,
int h, int w, int stride, const uint32_t *pal)
{
int x, y;
const uint8_t *orig_src = sptr;
for (y = dx+h; y > dx; y--) {
uint8_t *dst = dptr + (y * stride) + dy * 3;
for (x = 0; x < w; x++)... | 0 | [
"CWE-20"
] | FFmpeg | 880c73cd76109697447fbfbaa8e5ee5683309446 | 200,558,821,891,417,430,000,000,000,000,000,000,000 | 29 | avcodec/flashsv: check diff_start/height
Fixes out of array accesses
Fixes Ticket2844
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> | 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 SetPixelL(const Image *magick_restrict image,const Quantum L,
Quantum *magick_restrict pixel)
{
if (image->channel_map[LPixelChannel].traits != UndefinedPixelTrait)
pixel[image->channel_map[LPixelChannel].offset]=L;
} | 0 | [
"CWE-20",
"CWE-125"
] | ImageMagick | 8187d2d8fd010d2d6b1a3a8edd935beec404dddc | 46,161,995,402,679,790,000,000,000,000,000,000,000 | 6 | https://github.com/ImageMagick/ImageMagick/issues/1610 | Safe | 20 | {"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca... |
void mobi_buffer_copy8(MOBIBuffer *dest, MOBIBuffer *source) {
mobi_buffer_add8(dest, mobi_buffer_get8(source));
} | 0 | [
"CWE-787"
] | libmobi | ab5bf0e37e540eac682a14e628853b918626e72b | 226,970,531,797,016,200,000,000,000,000,000,000,000 | 3 | fix oob write bug inside libmobi | 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... |
category_ber (EContact *contact)
{
struct berval ** result = NULL;
GList *categories;
const gchar *category_string;
category_string = e_contact_get (contact, E_CONTACT_CATEGORIES);
if (!category_string || !*category_string)
return NULL;
categories = e_contact_get (contact, E_CONTACT_CATEGORY_LIST);
if (g_li... | 0 | [] | evolution-data-server | 34bad61738e2127736947ac50e0c7969cc944972 | 116,547,463,124,877,090,000,000,000,000,000,000,000 | 33 | Bug 796174 - strcat() considered unsafe for buffer overflow | Safe | null | null |
psf_ftell (SF_PRIVATE *psf)
{ sf_count_t pos ;
if (psf->virtual_io)
return psf->vio.tell (psf->vio_user_data) ;
pos = _telli64 (psf->file.filedes) ;
if (pos == ((sf_count_t) -1))
{ psf_log_syserr (psf, errno) ;
return -1 ;
} ;
return pos - psf->fileoffset ;
} /* psf_ftell */ | 0 | [
"CWE-369",
"CWE-189"
] | libsndfile | 725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6 | 204,833,894,248,897,880,000,000,000,000,000,000,000 | 15 | src/file_io.c : Prevent potential divide-by-zero.
Closes: https://github.com/erikd/libsndfile/issues/92 | 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"} |
on_reauthenticate (GdmSessionWorker *worker,
DBusMessage *message)
{
if (worker->priv->state != GDM_SESSION_WORKER_STATE_SESSION_STARTED) {
g_debug ("GdmSessionWorker: ignoring spurious reauthenticate for user while in state %s", get_state_name (worker->priv->state));
... | 0 | [] | gdm | c25ef9245be4e0be2126ef3d075df4401949b570 | 187,952,761,170,840,340,000,000,000,000,000,000,000 | 10 | Store the face and dmrc files in a cache. Refer to bug #565151. | Safe | null | null |
njs_object_iterate_reverse(njs_vm_t *vm, njs_iterator_args_t *args,
njs_iterator_handler_t handler)
{
double idx;
int64_t i, from, to, length;
njs_int_t ret;
njs_array_t *array, *keys;
njs_value_t *entry, *value, prop, character, string_obj;
... | 1 | [
"CWE-416",
"CWE-703"
] | njs | eafe4c7a326b163612f10861392622b5da5b1792 | 55,404,641,652,654,760,000,000,000,000,000,000,000 | 174 | Fixed Array.prototype.lastIndexOf() with unicode string as "this".
Previously, when lastIndexOf() was called with unicode string as "this"
argument and a negative "fromIndex" argument null-pointer dererence
might occur because njs_string_offset() was called with invalid index
value whereas njs_string_offset() should a... | Vulnerable | 416 | {"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An... |
static void scalar_min_max_add(struct bpf_reg_state *dst_reg,
struct bpf_reg_state *src_reg)
{
s64 smin_val = src_reg->smin_value;
s64 smax_val = src_reg->smax_value;
u64 umin_val = src_reg->umin_value;
u64 umax_val = src_reg->umax_value;
if (signed_add_overflows(dst_reg->smin_value, smin_val) ||
s... | 0 | [] | linux | 294f2fc6da27620a506e6c050241655459ccd6bd | 81,470,803,245,153,410,000,000,000,000,000,000,000 | 26 | bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds()
Currently, for all op verification we call __red_deduce_bounds() and
__red_bound_offset() but we only call __update_reg_bounds() in bitwise
ops. However, we could benefit from calling __update_reg_bounds() in
BPF_ADD, BPF_SUB, and BPF_MUL case... | Safe | null | null |
TPMU_PUBLIC_ID_Unmarshal(TPMU_PUBLIC_ID *target, BYTE **buffer, INT32 *size, UINT32 selector)
{
TPM_RC rc = TPM_RC_SUCCESS;
switch (selector) {
#if ALG_KEYEDHASH
case TPM_ALG_KEYEDHASH:
rc = TPM2B_DIGEST_Unmarshal(&target->keyedHash, buffer, size);
break;
#endif
#if ALG_SYMCIPHER
case TPM_ALG_SYM... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 140,591,202,526,643,320,000,000,000,000,000,000,000 | 30 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.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... |
print_version (void)
{
const char *wgetrc_title = _("Wgetrc: ");
const char *locale_title = _("Locale: ");
const char *compile_title = _("Compile: ");
const char *link_title = _("Link: ");
char *env_wgetrc, *user_wgetrc;
int i;
if (printf (_("GNU Wget %s built on %s.\n\n"), version_string, OS_TYPE) ... | 0 | [
"CWE-200"
] | wget | c125d24762962d91050d925fbbd9e6f30b2302f8 | 88,479,901,329,225,580,000,000,000,000,000,000,000 | 96 | Don't use extended attributes (--xattr) by default
* src/init.c (defaults): Set enable_xattr to false by default
* src/main.c (print_help): Reverse option logic of --xattr
* doc/wget.texi: Add description for --xattr
Users may not be aware that the origin URL and Referer are saved
including credentials, and possibly ... | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.