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 |
|---|---|---|---|---|---|---|---|---|---|---|
AlgorithmEnum* ZRtp::getStrongHashOffered(ZrtpPacketHello *hello) {
int numHash = hello->getNumHashes();
for (int i = 0; i < numHash; i++) {
if (*(int32_t*)(hello->getHashType(i)) == *(int32_t*)s384) {
return &zrtpHashes.getByName((const char*)hello->getHashType(i));
}
}
ret... | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 174,044,593,278,888,600,000,000,000,000,000,000,000 | 10 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error | 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 ... |
MagickExport Image *EvaluateImages(const Image *images,
const MagickEvaluateOperator op,ExceptionInfo *exception)
{
#define EvaluateImageTag "Evaluate/Image"
CacheView
*evaluate_view;
Image
*image;
MagickBooleanType
status;
MagickOffsetType
progress;
MagickPixelPacket
**magick_rest... | 0 | [] | ImageMagick6 | 072d7b10dbe74d1cf4ec0d008990c1a28c076f9e | 296,910,273,596,798,300,000,000,000,000,000,000,000 | 330 | https://github.com/ImageMagick/ImageMagick/issues/3332 | Safe | null | null |
static long nfs4_update_delay(long *timeout)
{
long ret;
if (!timeout)
return NFS4_POLL_RETRY_MAX;
if (*timeout <= 0)
*timeout = NFS4_POLL_RETRY_MIN;
if (*timeout > NFS4_POLL_RETRY_MAX)
*timeout = NFS4_POLL_RETRY_MAX;
ret = *timeout;
*timeout <<= 1;
return ret;
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 256,426,779,992,753,480,000,000,000,000,000,000,000 | 13 | 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... |
int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol)
{
struct net *net = xp_net(pol);
struct xfrm_policy *old_pol;
#ifdef CONFIG_XFRM_SUB_POLICY
if (pol && pol->type != XFRM_POLICY_TYPE_MAIN)
return -EINVAL;
#endif
spin_lock_bh(&net->xfrm.xfrm_policy_lock);
old_pol = rcu_dereference_pro... | 0 | [
"CWE-125"
] | ipsec | 7bab09631c2a303f87a7eb7e3d69e888673b9b7e | 230,350,839,044,838,700,000,000,000,000,000,000,000 | 35 | xfrm: policy: check policy direction value
The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used
as an array index. This can lead to an out-of-bound access, kernel lockup and
DoS. Add a check for the 'dir' value.
This fixes CVE-2017-11600.
References: https://bugzilla.redhat.com/show_bug.cgi?... | 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 struct tcp_md5sig_key *tcp_md5_do_lookup(struct sock *sk,
const union tcp_md5_addr *addr,
int family)
{
return NULL;
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 241,312,394,778,043,350,000,000,000,000,000,000,000 | 6 | 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 |
bool switch_to_ns(pid_t pid, const char *ns) {
int fd, ret;
char nspath[MAXPATHLEN];
/* Switch to new ns */
ret = snprintf(nspath, MAXPATHLEN, "/proc/%d/ns/%s", pid, ns);
if (ret < 0 || ret >= MAXPATHLEN)
return false;
fd = open(nspath, O_RDONLY);
if (fd < 0) {
SYSERROR("failed to open %s", nspath);
retu... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 65,540,001,659,629,350,000,000,000,000,000,000,000 | 24 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... | 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... |
struct btrfs_trans_handle *btrfs_join_transaction(struct btrfs_root *root)
{
return start_transaction(root, 0, TRANS_JOIN, 0);
} | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 208,829,178,709,939,460,000,000,000,000,000,000,000 | 4 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... | Safe | 310 | null |
static SDL_INLINE void BG_Blended_SDF(const TTF_Image *image, Uint32 *destination, Sint32 srcskip, Uint32 dstskip, Uint8 fg_alpha)
{
const Uint8 *src = image->buffer;
Uint32 *dst = destination;
Uint32 width = image->width;
Uint32 height = image->rows;
Uint32 s;
Uint32 d;... | 0 | [
"CWE-190",
"CWE-787"
] | SDL_ttf | db1b41ab8bde6723c24b866e466cad78c2fa0448 | 6,187,141,909,006,007,000,000,000,000,000,000,000 | 27 | More integer overflow (see bug #187)
Make sure that 'width + alignment' doesn't overflow, otherwise
it could create a SDL_Surface of 'width' but with wrong 'pitch' | 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... |
dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *ppi_tree = NULL, *ppi_flags_tree = NULL, *seg_tree = NULL, *ampdu_tree = NULL;
proto_tree *agg_tree = NULL;
proto_item *ti = NULL;
tvbuff_t *next_tvb;
int offset = 0;
guint... | 1 | [
"CWE-20"
] | wireshark | 2c13e97d656c1c0ac4d76eb9d307664aae0e0cf7 | 126,398,171,782,217,300,000,000,000,000,000,000,000 | 305 | The WTAP_ENCAP_ETHERNET dissector needs to be passed a struct eth_phdr.
We now require that. Make it so.
Bug: 12440
Change-Id: Iffee520976b013800699bde3c6092a3e86be0d76
Reviewed-on: https://code.wireshark.org/review/15424
Reviewed-by: Guy Harris <guy@alum.mit.edu> | Vulnerable | 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... |
sasl_session_t *make_session(const char *uid, server_t *server)
{
sasl_session_t *p = find_session(uid);
mowgli_node_t *n;
if(p)
return p;
p = malloc(sizeof(sasl_session_t));
memset(p, 0, sizeof(sasl_session_t));
p->uid = strdup(uid);
p->server = server;
n = mowgli_node_create();
mowgli_node_add(p, n, &ses... | 1 | [
"CWE-288"
] | atheme | de2ba3ca8f6c39b41431d989f3ac66002a487839 | 72,463,395,345,462,050,000,000,000,000,000,000,000 | 17 | modules/saslserv/main: backport 7.3 commits for pending EID login
This backports commits 4e664c75d0b280a052eb & ceb0235695e6736ce2ab
from the master branch.
The IRCv3.1 SASL specification contains the following wording:
If the client completes registration (with CAP END, NICK, USER
and any other necessary me... | Vulnerable | 288 | {"cwe_id": "CWE-288", "vulnerability_type": "Authentication Bypass Using an Alternate Path or Channel", "description": "The product requires authentication, but the product has an alternate path or channel that does not require authentication.", "severity": null, "category": null, "impact": ["Bypass Protection Mechanis... |
void generate_field_name(std::ofstream& out, const t_field* field) {
out << "\"" << field->get_name() << "=\"";
} | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 39,857,766,531,450,957,000,000,000,000,000,000,000 | 3 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> | 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... |
GF_Err mp4s_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_MPEGSampleEntryBox *ptr = (GF_MPEGSampleEntryBox *)s;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_data(bs, ptr->reserved, 6);
gf_bs_write_u16(bs, ptr->dataReferenceIndex);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 298,146,095,602,555,040,000,000,000,000,000,000,000 | 11 | 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... |
ipmi_sdr_find_sdr_bysensortype(struct ipmi_intf *intf, uint8_t type)
{
struct sdr_record_list *head;
struct sdr_get_rs *header;
struct sdr_record_list *e;
if (!sdr_list_itr) {
sdr_list_itr = ipmi_sdr_start(intf, 0);
if (!sdr_list_itr) {
lprintf(LOG_ERR, "Unable to open SDR for reading");
return NULL;
}... | 0 | [
"CWE-120"
] | ipmitool | 7ccea283dd62a05a320c1921e3d8d71a87772637 | 314,886,278,273,999,230,000,000,000,000,000,000,000 | 110 | fru, sdr: Fix id_string buffer overflows
Final part of the fixes for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
9 variants of stack buffer overflow when parsing `id_string` field of
SDR records returned from `CMD_GET_SDR` command.
SDR record structs have an `id_co... | Safe | 120 | {"cwe_id": "CWE-120", "vulnerability_type": "Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')", "description": "The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.", "severity": "High", "category": "... |
static int ntop_get_interface_mac_info(lua_State* vm) {
NetworkInterface *ntop_interface = getCurrentInterface(vm);
char *mac = NULL;
u_int16_t vlan_id = 0;
if(lua_type(vm, 1) == LUA_TSTRING) {
mac = (char*)lua_tostring(vm, 1);
if(lua_type(vm, 2) == LUA_TNUMBER) {
vlan_id = (u_int16_t)lua_tonumb... | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 105,006,600,324,411,120,000,000,000,000,000,000,000 | 20 | 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... |
TEST(UriSuite, TestUriUserInfoHostPort2) {
// User info with ":", with port
UriParserStateA stateA;
UriUriA uriA;
stateA.uri = &uriA;
// 0 4 0 3 0 7 01 0 9
const char * const input = "http" "://" "abc:def" "@" "localhost"
// 01 0 3
":" "123";
ASSERT_TR... | 0 | [
"CWE-125"
] | uriparser | cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4 | 180,852,899,984,027,000,000,000,000,000,000,000,000 | 19 | Fix uriParse*Ex* out-of-bounds read | 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 FILE *msg_cache_get(struct ImapData *idata, struct Header *h)
{
if (!idata || !h)
return NULL;
idata->bcache = msg_cache_open(idata);
char id[64];
snprintf(id, sizeof(id), "%u-%u", idata->uid_validity, HEADER_DATA(h)->uid);
return mutt_bcache_get(idata->bcache, id);
} | 0 | [
"CWE-119",
"CWE-787"
] | neomutt | 1b0f0d0988e6df4e32e9f4bf8780846ea95d4485 | 105,326,286,452,607,880,000,000,000,000,000,000,000 | 10 | Don't overflow stack buffer in msg_parse_fetch | 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 ... |
void bootp_input(struct mbuf *m)
{
struct bootp_t *bp = mtod(m, struct bootp_t *);
if (bp->bp_op == BOOTP_REQUEST) {
bootp_reply(m->slirp, bp);
}
} | 1 | [] | libslirp | f13cad45b25d92760bb0ad67bec0300a4d7d5275 | 66,899,238,186,449,535,000,000,000,000,000,000,000 | 8 | bootp: limit vendor-specific area to input packet memory buffer
sizeof(bootp_t) currently holds DHCP_OPT_LEN. Remove this optional field
from the structure, to help with the following patch checking for
minimal header size. Modify the bootp_reply() function to take the
buffer boundaries and avoiding potential buffer o... | Vulnerable | null | null |
void qmp_guest_set_user_password(const char *username,
const char *password,
bool crypted,
Error **errp)
{
error_setg(errp, QERR_UNSUPPORTED);
} | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 100,699,624,196,875,830,000,000,000,000,000,000,000 | 7 | qga: check bytes count read by guest-file-read
While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Pra... | Safe | 190 | {"cwe_id": "CWE-190", "vulnerability_type": "Integer Overflow or Wraparound", "description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n assumes that the resulting value will always be larger than\n the original value. This occurs whe... |
static int checkout_mkdir(
checkout_data *data,
const char *path,
const char *base,
mode_t mode,
unsigned int flags)
{
struct git_futils_mkdir_options mkdir_opts = {0};
int error;
mkdir_opts.dir_map = data->mkdir_map;
mkdir_opts.pool = &data->pool;
error = git_futils_mkdir_relative(
path, base, mode, flag... | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 64c612cc3e25eff5fb02c59ef5a66ba7a14751e4 | 103,445,022,132,047,550,000,000,000,000,000,000,000 | 22 | Protect against 8.3 "short name" attacks also on Linux/macOS
The Windows Subsystem for Linux (WSL) is getting increasingly popular,
in particular because it makes it _so_ easy to run Linux software on
Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to
`/mnt/c/`, no need to set that up manually).
... | 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 vmxnet3_process_tx_queue(VMXNET3State *s, int qidx)
{
struct Vmxnet3_TxDesc txd;
uint32_t txd_idx;
uint32_t data_len;
hwaddr data_pa;
for (;;) {
if (!vmxnet3_pop_next_tx_descr(s, qidx, &txd, &txd_idx)) {
break;
}
vmxnet3_dump_tx_descr(&txd);
... | 0 | [
"CWE-20"
] | qemu | a7278b36fcab9af469563bd7b9dadebe2ae25e48 | 111,007,260,693,600,070,000,000,000,000,000,000,000 | 49 | net/vmxnet3: Refine l2 header validation
Validation of l2 header length assumed minimal packet size as
eth_header + 2 * vlan_header regardless of the actual protocol.
This caused crash for valid non-IP packets shorter than 22 bytes, as
'tx_pkt->packet_type' hasn't been assigned for such packets, and
'vmxnet3_on_tx_do... | 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 __always_inline int kvm_handle_hva_range_no_flush(struct mmu_notifier *mn,
unsigned long start,
unsigned long end,
hva_handler_t handler)
{
struct kvm *kvm = mmu_notifier_to_kvm(mn);
const struct kvm_hva_range range = {
.start = start,
.end = end,
.pte = __pte(0),
.handler =... | 1 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 193,641,356,876,627,930,000,000,000,000,000,000,000 | 18 | 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... | Vulnerable | 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... |
ServerSelector::~ServerSelector() {} | 0 | [
"CWE-755"
] | mongo | 75f7184eafa78006a698cda4c4adfb57f1290047 | 311,922,657,391,124,860,000,000,000,000,000,000,000 | 1 | SERVER-50170 fix max staleness read preference parameter for server selection | 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"} |
file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((unused)),
const void *buf, size_t nb)
{
int m = 0, rv = 0, looks_text = 0;
int mime = ms->flags & MAGIC_MIME;
const unsigned char *ubuf = CAST(const unsigned char *, buf);
unichar *u8buf = NULL;
size_t ulen;
const char *code = NULL;
... | 0 | [
"CWE-399"
] | file | 6f737ddfadb596d7d4a993f7ed2141ffd664a81c | 142,169,202,125,281,550,000,000,000,000,000,000,000 | 126 | - reduce recursion level from 20 to 10 and make a symbolic constant for it.
- pull out the guts of saving and restoring the output buffer into functions
and take care not to overwrite the error message if an error happened. | Safe | 399 | null |
inline longlong val_int_offset(uint row_offset)
{
ptr+=row_offset;
longlong tmp=val_int();
ptr-=row_offset;
return tmp;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 313,491,969,884,683,440,000,000,000,000,000,000,000 | 7 | 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... |
check_for_list_or_dict_or_blob_arg(typval_T *args, int idx)
{
if (args[idx].v_type != VAR_LIST
&& args[idx].v_type != VAR_DICT
&& args[idx].v_type != VAR_BLOB)
{
semsg(_(e_list_dict_or_blob_required_for_argument_nr), idx + 1);
return FAIL;
}
return OK;
} | 0 | [
"CWE-125",
"CWE-122"
] | vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 278,985,866,841,489,220,000,000,000,000,000,000,000 | 11 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. | 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"... |
SYSCALL_DEFINE2(64_munmap, unsigned long, addr, size_t, len)
{
if (invalid_64bit_range(addr, len))
return -EINVAL;
return vm_munmap(addr, len);
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 277,139,442,855,275,840,000,000,000,000,000,000,000 | 7 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
AP_DECLARE(int) ap_calc_scoreboard_size(void)
{
ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &server_limit);
scoreboard_size = SIZE_OF_global_score;
scoreboard_size += SIZE_OF_process_score * server_limit;
scoreboard_size += SIZE_OF_worker_score... | 0 | [
"CWE-476"
] | httpd | fa7b2a5250e54363b3a6c8ac3aaa7de4e8da9b2e | 114,538,826,281,403,310,000,000,000,000,000,000,000 | 11 | Merge r1878092 from trunk:
Fix a NULL pointer dereference
* server/scoreboard.c (ap_increment_counts): In certain cases like certain
invalid requests r->method might be NULL here. r->method_number defaults
to M_GET and hence is M_GET in these cases.
Submitted by: rpluem
Reviewed by: covener, ylavic, jfclere
gi... | Safe | 476 | {"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory... |
static Bool task_postponed_log(void *udta, void *item)
{
GF_FSTask *at = (GF_FSTask *)item;
GF_LOG(GF_LOG_INFO, GF_LOG_FILTER, ("\ttask %s\n", at->log_name));
return GF_FALSE;
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 246,350,469,824,223,150,000,000,000,000,000,000,000 | 6 | fixed crashes for very long path - cf #1908 | 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... |
ModuleExport size_t RegisterDCMImage(void)
{
MagickInfo
*entry;
static const char
*DCMNote=
{
"DICOM is used by the medical community for images like X-rays. The\n"
"specification, \"Digital Imaging and Communications in Medicine\n"
"(DICOM)\", is available at http://medical.nema.org... | 0 | [
"CWE-20",
"CWE-252"
] | ImageMagick | 6b6bff054d569a77973f2140c0e86366e6168a6c | 314,641,456,449,630,300,000,000,000,000,000,000,000 | 25 | https://github.com/ImageMagick/ImageMagick/issues/1199 | 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 AuthorizationSession::grantInternalAuthorization(Client* client) {
stdx::lock_guard<Client> lk(*client);
_authenticatedUsers.add(internalSecurity.user);
_buildAuthenticatedRolesVector();
} | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 10,129,066,884,481,503,000,000,000,000,000,000,000 | 5 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) | Safe | 613 | {"cwe_id": "CWE-613", "vulnerability_type": "Insufficient Session Expiration", "description": "According to WASC, \"Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.\"", "severity": null, "category": null, "impact": ["Bypass Protect... |
libarchive_read_seek_cb (struct archive *ar_read,
void *client_data,
gint64 request,
int whence)
{
AutoarExtractor *self;
GSeekable *seekable;
GSeekType seektype;
off_t new_offset;
g_debug ("libarchive_... | 0 | [
"CWE-22"
] | gnome-autoar | adb067e645732fdbe7103516e506d09eb6a54429 | 2,538,694,688,111,576,300,000,000,000,000,000,000 | 43 | AutoarExtractor: Do not extract files outside the destination dir
Currently, a malicious archive can cause that the files are extracted
outside of the destination dir. This can happen if the archive contains
a file whose parent is a symbolic link, which points outside of the
destination dir. This is potentially a secu... | Safe | 22 | {"cwe_id": "CWE-22", "vulnerability_type": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", "description": "The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product ... |
static my_bool is_binary_compatible(enum enum_field_types type1,
enum enum_field_types type2)
{
static const enum enum_field_types
range1[]= { MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR, MYSQL_TYPE_NULL },
range2[]= { MYSQL_TYPE_INT24, MYSQL_TYPE_LONG, MYSQL_TYPE_NULL },
range3[... | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 203,272,926,306,228,400,000,000,000,000,000,000,000 | 32 | 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 unsigned long nr_free_zone_pages(int offset)
{
struct zoneref *z;
struct zone *zone;
/* Just pick one node, since fallback list is circular */
unsigned long sum = 0;
struct zonelist *zonelist = node_zonelist(numa_node_id(), GFP_KERNEL);
for_each_zone_zonelist(zone, z, zonelist, offset) {
unsigned long... | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 162,438,582,833,011,600,000,000,000,000,000,000,000 | 19 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... | Safe | null | null |
void pb_controller::reload_queue(bool remove_unplayed) {
if (ql) {
ql->reload(downloads_, remove_unplayed);
}
} | 0 | [
"CWE-78"
] | newsbeuter | 26f5a4350f3ab5507bb8727051c87bb04660f333 | 109,993,661,208,671,520,000,000,000,000,000,000,000 | 5 | Work around shell code in podcast names (#598) | 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... |
static int ipx_release(struct socket *sock)
{
struct sock *sk = sock->sk;
if (!sk)
goto out;
lock_sock(sk);
sk->sk_shutdown = SHUTDOWN_MASK;
if (!sock_flag(sk, SOCK_DEAD))
sk->sk_state_change(sk);
sock_set_flag(sk, SOCK_DEAD);
sock->sk = NULL;
sk_refcnt_debug_release(sk);
ipx_destroy_socket(sk);
releas... | 0 | [
"CWE-416"
] | linux | ee0d8d8482345ff97a75a7d747efc309f13b0d80 | 156,900,424,841,809,140,000,000,000,000,000,000,000 | 21 | ipx: call ipxitf_put() in ioctl error path
We should call ipxitf_put() if the copy_to_user() fails.
Reported-by: 李强 <liqiang6-s@360.cn>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | 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 char *ldb_dn_get_casefold(struct ldb_dn *dn)
{
unsigned int i;
size_t len;
char *d, *n;
if (dn->casefold) return dn->casefold;
if (dn->special) {
dn->casefold = talloc_strdup(dn, dn->linearized);
if (!dn->casefold) return NULL;
dn->valid_case = true;
return dn->casefold;
}
if ( ! ldb_dn_casefold... | 0 | [
"CWE-200"
] | samba | 7f51ec8c4ed9ba1f53d722e44fb6fb3cde933b72 | 31,744,345,517,431,206,000,000,000,000,000,000,000 | 59 | CVE-2015-5330: ldb_dn: simplify and fix ldb_dn_escape_internal()
Previously we relied on NUL terminated strings and jumped back and
forth between copying escaped bytes and memcpy()ing un-escaped chunks.
This simple version is easier to reason about and works with
unterminated strings. It may also be faster as it avoid... | 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 file_close(jas_stream_obj_t *obj)
{
jas_stream_fileobj_t *fileobj;
JAS_DBGLOG(100, ("file_close(%p)\n", obj));
fileobj = JAS_CAST(jas_stream_fileobj_t *, obj);
int ret;
ret = close(fileobj->fd);
if (fileobj->flags & JAS_STREAM_FILEOBJ_DELONCLOSE) {
unlink(fileobj->pathname);
}
jas_free(fileobj);
r... | 0 | [
"CWE-415",
"CWE-190",
"CWE-369"
] | jasper | 634ce8e8a5accc0fa05dd2c20d42b4749d4b2735 | 267,533,863,712,874,100,000,000,000,000,000,000,000 | 13 | Made some changes to the I/O stream library for memory streams.
There were a number of potential problems due to the possibility
of integer overflow.
Changed some integral types to the larger types size_t or ssize_t.
For example, the function mem_resize now takes the buffer size parameter
as a size_t.
Added a new funct... | 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"... |
void imap_unmunge_mbox_name(bool unicode, char *s)
{
imap_unquote_string(s);
char *buf = mutt_str_dup(s);
if (buf)
{
imap_utf_decode(unicode, &buf);
strncpy(s, buf, strlen(s));
}
FREE(&buf);
} | 0 | [
"CWE-125"
] | neomutt | fa1db5785e5cfd9d3cd27b7571b9fe268d2ec2dc | 58,324,281,325,222,230,000,000,000,000,000,000,000 | 13 | Fix seqset iterator when it ends in a comma
If the seqset ended with a comma, the substr_end marker would be just
before the trailing nul. In the next call, the loop to skip the
marker would iterate right past the end of string too.
The fix is simple: place the substr_end marker and skip past it
immediately. | Safe | 125 | {"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"... |
void root_device_unregister(struct device *dev)
{
struct root_device *root = to_root_device(dev);
if (root->owner)
sysfs_remove_link(&root->dev.kobj, "module");
device_unregister(dev);
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 107,917,346,167,310,670,000,000,000,000,000,000,000 | 9 | 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... |
bool FromkLinuxEpollEvent(const struct klinux_epoll_event *input,
struct epoll_event *output) {
if (!input || !output) return false;
output->events = FromkLinuxEpollEvents(input->events);
if (input->events != 0 && output->events == 0) {
return false;
}
output->data.u64 = input->d... | 0 | [
"CWE-787"
] | asylo | bda9772e7872b0d2b9bee32930cf7a4983837b39 | 11,192,424,958,125,895,000,000,000,000,000,000,000 | 10 | Check input length in FromLinuxSockAddr
PiperOrigin-RevId: 333785506
Change-Id: I1d68fb8954665eebc1018d80ff995cbe9e7ed6a9 | 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_free_fsname(
struct xfs_mount *mp)
{
kfree(mp->m_fsname);
kfree(mp->m_rtname);
kfree(mp->m_logname);
} | 0 | [
"CWE-416"
] | linux | c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82 | 116,270,430,174,209,950,000,000,000,000,000,000,000 | 7 | xfs: clear sb->s_fs_info on mount failure
We recently had an oops reported on a 4.14 kernel in
xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage
and so the m_perag_tree lookup walked into lala land.
Essentially, the machine was under memory pressure when the mount
was being run, xfs_fs_fill_super() fa... | 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 sysbus_fdc_initfn(Object *obj)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
FDCtrlSysBus *sys = SYSBUS_FDC(obj);
FDCtrl *fdctrl = &sys->state;
fdctrl->dma_chann = -1;
memory_region_init_io(&fdctrl->iomem, obj, &fdctrl_mem_ops, fdctrl,
"fdc", 0x08);
sysbus_in... | 0 | [
"CWE-119"
] | qemu | e907746266721f305d67bc0718795fedee2e824c | 182,367,071,188,217,300,000,000,000,000,000,000,000 | 12 | fdc: force the fifo access to be in bounds of the allocated buffer
During processing of certain commands such as FD_CMD_READ_ID and
FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could
get out of bounds leading to memory corruption with values coming
from the guest.
Fix this by making sure that the index i... | 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 ieee80211_update_csa(struct ieee80211_sub_if_data *sdata,
struct beacon_data *beacon)
{
struct probe_resp *resp;
int counter_offset_beacon = sdata->csa_counter_offset_beacon;
int counter_offset_presp = sdata->csa_counter_offset_presp;
u8 *beacon_data;
size_t beacon_data_len;
switch (sdata->vif.t... | 0 | [
"CWE-362"
] | linux | 1d147bfa64293b2723c4fec50922168658e613ba | 308,053,165,022,222,060,000,000,000,000,000,000,000 | 47 | mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is b... | 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... |
explicit SparseSegmentSqrtNGradOp(OpKernelConstruction* context)
: SparseSegmentGradOpBase<T>(context, true /*is_sqrtn*/) {} | 0 | [
"CWE-703",
"CWE-681",
"CWE-787"
] | tensorflow | db4f9717c41bccc3ce10099ab61996b246099892 | 239,360,270,727,680,330,000,000,000,000,000,000,000 | 2 | Fix heap buffer overflow in UnsortedSegmentSum.
When Index=int32, data_size and num_segments were truncated from int64 to int32. This truncation can produce negative numbers, which causes UnsortedSegmentFunctor to access out of bounds memory.
Also:
- Switches some indexing calculations to int64 to avoid signed intege... | 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"... |
struct import_t *MACH0_(get_imports)(struct MACH0_(obj_t) * bin) {
rz_return_val_if_fail(bin, NULL);
int i, j, idx, stridx;
if (!bin->sects || !bin->symtab || !bin->symstr || !bin->indirectsyms) {
return NULL;
}
if (bin->dysymtab.nundefsym < 1 || bin->dysymtab.nundefsym > 0xfffff) {
return NULL;
}
struct ... | 0 | [
"CWE-787"
] | rizin | 348b1447d1452f978b69631d6de5b08dd3bdf79d | 114,951,343,395,495,700,000,000,000,000,000,000,000 | 49 | fix #2956 - oob write in mach0.c | Safe | 787 | {"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest... |
flatpak_dir_get_remote_default_token_type (FlatpakDir *self,
const char *remote_name)
{
GKeyFile *config = flatpak_dir_get_repo_config (self);
g_autofree char *group = get_group (remote_name);
if (config)
return (gint32)g_key_file_get_integer (config, group, "xa.def... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 42,993,627,899,563,090,000,000,000,000,000,000,000 | 11 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... | Safe | 74 | {"cwe_id": "CWE-74", "vulnerability_type": "Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')", "description": "The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutra... |
ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group)
{
struct ext4_group_desc *desc;
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct buffer_head *bh;
ext4_fsblk_t bitmap_blk;
int err;
desc = ext4_get_group_desc(sb, block_group, NULL);
if (!desc)
return ERR_PTR(-EFSCORRUPTED);
bitmap... | 0 | [
"CWE-416"
] | linux | 8844618d8aa7a9973e7b527d038a2a589665002c | 74,373,142,154,736,680,000,000,000,000,000,000,000 | 88 | ext4: only look at the bg_flags field if it is valid
The bg_flags field in the block group descripts is only valid if the
uninit_bg or metadata_csum feature is enabled. We were not
consistently looking at this field; fix this.
Also block group #0 must never have uninitialized allocation bitmaps,
or need to be zeroed... | 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 do_insnlist_ioctl(struct comedi_device *dev,
struct comedi_insnlist __user *arg, void *file)
{
struct comedi_insnlist insnlist;
struct comedi_insn *insns = NULL;
unsigned int *data = NULL;
int i = 0;
int ret = 0;
if (copy_from_user(&insnlist, arg, sizeof(struct comedi_insnlist)))
return -EFA... | 0 | [
"CWE-200"
] | linux | 819cbb120eaec7e014e5abd029260db1ca8c5735 | 253,451,742,590,824,870,000,000,000,000,000,000,000 | 71 | staging: comedi: fix infoleak to userspace
driver_name and board_name are pointers to strings, not buffers of size
COMEDI_NAMELEN. Copying COMEDI_NAMELEN bytes of a string containing
less than COMEDI_NAMELEN-1 bytes would leak some unrelated bytes.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: stable <sta... | 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... |
int mysql_db_async_result(SV* h, MYSQL_RES** resp)
{
dTHX;
D_imp_xxh(h);
imp_dbh_t* dbh;
MYSQL* svsock = NULL;
MYSQL_RES* _res;
int retval = 0;
int htype;
if(! resp) {
resp = &_res;
}
htype = DBIc_TYPE(imp_xxh);
if(htype == DBIt_DB) {
D_imp_dbh(h);
dbh = imp_dbh;
} else {
... | 0 | [
"CWE-125"
] | DBD-mysql | 793b72b1a0baa5070adacaac0e12fd995a6fbabe | 247,587,185,263,065,120,000,000,000,000,000,000,000 | 76 | Added Pali's fix for CVE-2016-1249 | 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"... |
BGD_DECLARE(gdImagePtr) gdImageCreateFromGif(FILE *fdFile)
{
gdIOCtx *fd = gdNewFileCtx(fdFile);
gdImagePtr im;
if (fd == NULL) return NULL;
im = gdImageCreateFromGifCtx(fd);
fd->gd_free(fd);
return im;
} | 0 | [
"CWE-681"
] | libgd | a11f47475e6443b7f32d21f2271f28f417e2ac04 | 276,976,690,126,876,550,000,000,000,000,000,000,000 | 12 | Fix #420: Potential infinite loop in gdImageCreateFromGifCtx
Due to a signedness confusion in `GetCode_` a corrupt GIF file can
trigger an infinite loop. Furthermore we make sure that a GIF without
any palette entries is treated as invalid *after* open palette entries
have been removed.
CVE-2018-5711
See also https... | Safe | 681 | {"cwe_id": "CWE-681", "vulnerability_type": "Incorrect Conversion between Numeric Types", "description": "When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting values are used in a sensitive context, then dang... |
static int snd_pcm_lib_ioctl_reset(struct snd_pcm_substream *substream,
void *arg)
{
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long flags;
snd_pcm_stream_lock_irqsave(substream, flags);
if (snd_pcm_running(substream) &&
snd_pcm_update_hw_ptr(substream) >= 0)
runtime->status->hw_pt... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4 | 324,972,597,407,641,570,000,000,000,000,000,000,000 | 16 | ALSA: pcm : Call kill_fasync() in stream lock
Currently kill_fasync() is called outside the stream lock in
snd_pcm_period_elapsed(). This is potentially racy, since the stream
may get released even during the irq handler is running. Although
snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't
guarantee th... | Safe | 416 | {"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An... |
int ha_partition::handle_ordered_index_scan_key_not_found()
{
int error;
uint i, old_elements= m_queue.elements;
uchar *part_buf= m_ordered_rec_buffer;
uchar *curr_rec_buf= NULL;
DBUG_ENTER("ha_partition::handle_ordered_index_scan_key_not_found");
DBUG_ASSERT(m_key_not_found);
/*
Loop over all used pa... | 0 | [] | server | f305a7ce4bccbd56520d874e1d81a4f29bc17a96 | 207,561,155,028,817,140,000,000,000,000,000,000,000 | 46 | bugfix: long partition names | Safe | null | null |
static int vivid_fb_get_fix(struct vivid_dev *dev, struct fb_fix_screeninfo *fix)
{
dprintk(dev, 1, "vivid_fb_get_fix\n");
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
strlcpy(fix->id, "vioverlay fb", sizeof(fix->id));
fix->smem_start = dev->video_pbase;
fix->smem_len = dev->video_buffer_size;
fix->type = FB... | 0 | [
"CWE-200"
] | linux-next | eda98796aff0d9bf41094b06811f5def3b4c333c | 20,123,277,859,560,202,000,000,000,000,000,000,000 | 16 | [media] media/vivid-osd: fix info leak in ioctl
The vivid_fb_ioctl() code fails to initialize the 16 _reserved bytes of
struct fb_vblank after the ->hcount member. Add an explicit
memset(0) before filling the structure to avoid the info leak.
Signed-off-by: Salva Peiró <speirofr@gmail.com>
Signed-off-by: Hans Verkuil... | Safe | 200 | {"cwe_id": "CWE-200", "vulnerability_type": "Exposure of Sensitive Information to an Unauthorized Actor", "description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "severity": "High", "category": "Information Disclosure", "impact": ["Re... |
void Item_equal::update_const(THD *thd)
{
List_iterator<Item> it(equal_items);
if (with_const)
it++;
Item *item;
while ((item= it++))
{
if (item->const_item() && !item->is_expensive() &&
/*
Don't propagate constant status of outer-joined column.
Such a constant status here ... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 81,092,380,241,679,670,000,000,000,000,000,000,000 | 34 | 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... |
void operator()(OpKernelContext* ctx, const CPUDevice& d, int64 num_batches,
int64 samples_per_batch, int64 num_elements,
typename TTypes<T>::ConstFlat means,
typename TTypes<T>::ConstFlat stddevs,
typename TTypes<T>::ConstFlat minvals,
... | 0 | [
"CWE-703",
"CWE-197"
] | tensorflow | ca8c013b5e97b1373b3bb1c97ea655e69f31a575 | 145,950,263,523,650,800,000,000,000,000,000,000,000 | 258 | Prevent integer truncation from 64 to 32 bits.
The `tensorflow::Shard` functions last argument must be a 2 argument function where both arguments are `int64` (`long long`, 64 bits). However, there are usages where code passes in a function where arguments are `int` or `int32` (32 bits). In these cases, it is possible ... | 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 sta_info_hash_add(struct ieee80211_local *local,
struct sta_info *sta)
{
return rhltable_insert(&local->sta_hash, &sta->hash_node,
sta_rht_params);
} | 0 | [
"CWE-287"
] | linux | 3e493173b7841259a08c5c8e5cbe90adb349da7e | 282,087,095,214,807,130,000,000,000,000,000,000,000 | 6 | mac80211: Do not send Layer 2 Update frame before authorization
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-... | 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 ... |
addRule(const FileInfo *file, TranslationTableOpcode opcode, CharsString *ruleChars,
CharsString *ruleDots, TranslationTableCharacterAttributes after,
TranslationTableCharacterAttributes before, TranslationTableOffset *ruleOffset,
TranslationTableRule **rule, int noback, int nofor,
TranslationTableHeader **tabl... | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 332,153,184,953,385,330,000,000,000,000,000,000,000 | 74 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 | 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... |
png_write_info(png_structrp png_ptr, png_const_inforp info_ptr)
{
#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
int i;
#endif
png_debug(1, "in png_write_info");
if (png_ptr == NULL || info_ptr == NULL)
return;
png_write_info_before_PLTE(png_ptr, info_ptr);
if ((info... | 1 | [
"CWE-120"
] | libpng | 81f44665cce4cb1373f049a76f3904e981b7a766 | 205,889,245,604,695,800,000,000,000,000,000,000,000 | 154 | [libpng16] Reject attempt to write over-length PLTE chunk | Vulnerable | 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": "... |
//! Access to a pixel value \const.
const T& operator()(const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int c,
const ulongT wh, const ulongT whd=0) const {
cimg::unused(wh,whd);
return (*this)(x,y,z,c); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 258,350,389,935,924,000,000,000,000,000,000,000,000 | 5 | 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"... |
search_make_new(const struct search_state *const state, int n, const char *const base_name) {
const size_t base_len = strlen(base_name);
const char need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
struct search_domain *dom;
for (dom = state->head; dom; dom = dom->next) {
if (!n--) {
/* this is the... | 1 | [
"CWE-125"
] | libevent | ec65c42052d95d2c23d1d837136d1cf1d9ecef9e | 123,685,664,713,478,690,000,000,000,000,000,000,000 | 25 | evdns: fix searching empty hostnames
From #332:
Here follows a bug report by **Guido Vranken** via the _Tor bug bounty program_. Please credit Guido accordingly.
## Bug report
The DNS code of Libevent contains this rather obvious OOB read:
```c
static char *
search_make_new(const struct search_state *co... | Vulnerable | 125 | {"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"... |
void start_dispatching(JSObject *self) {
MOZ_ASSERT(!is_dispatching(self));
JS::SetReservedSlot(self, Slots::Dispatch, JS::TrueValue());
} | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 112,139,749,365,058,170,000,000,000,000,000,000,000 | 4 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random | Safe | 94 | {"cwe_id": "CWE-94", "vulnerability_type": "Improper Control of Generation of Code ('Code Injection')", "description": "The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could mod... |
xmlDumpElementDeclScan(void *elem, void *buf,
const xmlChar *name ATTRIBUTE_UNUSED) {
xmlDumpElementDecl((xmlBufferPtr) buf, (xmlElementPtr) elem);
} | 0 | [
"CWE-416"
] | libxml2 | 652dd12a858989b14eed4e84e453059cd3ba340e | 64,915,115,582,373,095,000,000,000,000,000,000,000 | 4 | [CVE-2022-23308] Use-after-free of ID and IDREF attributes
If a document is parsed with XML_PARSE_DTDVALID and without
XML_PARSE_NOENT, the value of ID attributes has to be normalized after
potentially expanding entities in xmlRemoveID. Otherwise, later calls
to xmlGetID can return a pointer to previously freed memory... | 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 *AcquireBlock(size_t size)
{
register size_t
i;
register void
*block;
/*
Find free block.
*/
size=(size_t) (size+sizeof(size_t)+6*sizeof(size_t)-1) & -(4U*sizeof(size_t));
i=AllocationPolicy(size);
block=memory_pool.blocks[i];
while ((block != (void *) NULL) && (SizeOfBlock(blo... | 0 | [
"CWE-190",
"CWE-189",
"CWE-703"
] | ImageMagick | 0f6fc2d5bf8f500820c3dbcf0d23ee14f2d9f734 | 66,119,934,062,380,550,000,000,000,000,000,000,000 | 51 | 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... | |
int stub_rx_loop(void *data)
{
struct usbip_device *ud = data;
while (!kthread_should_stop()) {
if (usbip_event_happened(ud))
break;
stub_rx_pdu(ud);
}
return 0;
} | 0 | [
"CWE-125"
] | linux | 635f545a7e8be7596b9b2b6a43cab6bbd5a88e43 | 83,749,328,019,875,250,000,000,000,000,000,000,000 | 13 | usbip: fix stub_rx: get_pipe() to validate endpoint number
get_pipe() routine doesn't validate the input endpoint number
and uses to reference ep_in and ep_out arrays. Invalid endpoint
number can trigger BUG(). Range check the epnum and returning
error instead of calling BUG().
Change caller stub_recv_cmd_submit() to... | 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 UTF32 unescape_unicode(const unsigned char *p)
{
char b;
UTF32 result = 0;
b = digit_values[p[0]];
if (b < 0) return UNI_REPLACEMENT_CHAR;
result = (result << 4) | (unsigned char)b;
b = digit_values[p[1]];
if (b < 0) return UNI_REPLACEMENT_CHAR;
result = (result << 4) | (unsigned ... | 0 | [
"CWE-20"
] | ruby | 36e9ed7fef6eb2d14becf6c52452e4ab16e4bf01 | 287,680,882,676,818,040,000,000,000,000,000,000,000 | 18 | backport 80b5a0ff2a7709367178f29d4ebe1c54122b1c27 partially as a securify fix for CVE-2020-10663.
The patch was provided by Jeremy Evans.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | 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... |
findRuleName(const CharsString *name, const TranslationTableHeader *table) {
const RuleName *ruleName = table->ruleNames;
while (ruleName) {
if ((name->length == ruleName->length) &&
(memcmp(&name->chars[0], ruleName->name, CHARSIZE * name->length) == 0))
return ruleName->ruleOffset;
ruleName = ruleName->n... | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 176,006,780,682,378,600,000,000,000,000,000,000,000 | 10 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 | 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 con_install(struct tty_driver *driver, struct tty_struct *tty)
{
unsigned int currcons = tty->index;
struct vc_data *vc;
int ret;
console_lock();
ret = vc_allocate(currcons);
if (ret)
goto unlock;
vc = vc_cons[currcons].d;
/* Still being freed */
if (vc->port.tty) {
ret = -ERESTARTSYS;
goto... | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 184,205,088,682,768,750,000,000,000,000,000,000,000 | 39 | vt: Disable KD_FONT_OP_COPY
It's buggy:
On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
> We recently discovered a slab-out-of-bounds read in fbcon in the latest
> kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that
> "fbcon_do_set_font" did not handle "vc->vc_font.data" and
> "vc->... | 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"... |
extract_command_subst (string, sindex, xflags)
char *string;
int *sindex;
int xflags;
{
char *ret;
if (string[*sindex] == LPAREN || (xflags & SX_COMPLETE))
return (extract_delimited_string (string, sindex, "$(", "(", ")", xflags|SX_COMMAND)); /*)*/
else
{
xflags |= (no_longjmp_on_fat... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 178,102,563,115,427,100,000,000,000,000,000,000,000 | 16 | bash-4.4-rc2 release | Safe | null | null |
prn_puts(gx_device_printer *pdev, char *ptr)
{
if(is_printer(pdev)) {
while(*ptr)
pc98_prn_out(*ptr ++);
return 0;
}
return gp_fputs(ptr, pdev->file);
} | 0 | [] | ghostpdl | 4fcbece468706e0e89ed2856729b2ccacbc112be | 269,431,722,741,251,730,000,000,000,000,000,000,000 | 9 | Avoid some devices dying due to inappropriate resolutions. | Safe | null | null |
int tls1_new(SSL *s)
{
if (!ssl3_new(s))
return (0);
s->method->ssl_clear(s);
return (1);
} | 0 | [] | openssl | 76343947ada960b6269090638f5391068daee88d | 156,261,420,800,633,700,000,000,000,000,000,000,000 | 7 | Fix for CVE-2015-0291
If a client renegotiates using an invalid signature algorithms extension
it will crash a server with a NULL pointer dereference.
Thanks to David Ramos of Stanford University for reporting this bug.
CVE-2015-0291
Reviewed-by: Tim Hudson <tjh@openssl.org>
Conflicts:
ssl/t1_lib.c | Safe | null | null |
static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf,
word32* inOutIdx, word32 sz)
{
int length;
word32 idx;
word32 ext_bound; /* boundary index for the sequence of extensions */
word32 oid;
byte tag;
WOLFSSL_ENTER("ParseCRL_Extensions");
(void)dcrl;
if (inOutIdx ==... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 308,809,169,981,288,820,000,000,000,000,000,000,000 | 87 | OCSP: improve handling of OCSP no check extension | 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"... |
SecureElementStatus_t SecureElementRandomNumber( uint32_t* randomNum )
{
if( randomNum == NULL )
{
return SECURE_ELEMENT_ERROR_NPE;
}
*randomNum = ATECC608ASeHalGetRandomNumber( );
return SECURE_ELEMENT_SUCCESS;
} | 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 16,187,419,891,929,050,000,000,000,000,000,000,000 | 9 | Added received buffer size checks. | 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": "... |
regconcat(int *flagp)
{
char_u *first = NULL;
char_u *chain = NULL;
char_u *latest;
int flags;
int cont = TRUE;
*flagp = WORST; // Tentatively.
while (cont)
{
switch (peekchr())
{
case NUL:
case Magic('|'):
case Magic('&'):
case Magic(')'):
cont = FALSE;... | 0 | [
"CWE-823",
"CWE-703"
] | vim | 6456fae9ba8e72c74b2c0c499eaf09974604ff30 | 221,756,122,526,850,740,000,000,000,000,000,000,000 | 71 | patch 8.2.4440: crash with specific regexp pattern and string
Problem: Crash with specific regexp pattern and string.
Solution: Stop at the start of the string. | Safe | 823 | {"cwe_id": "CWE-823", "vulnerability_type": "Use of Out-of-range Pointer Offset", "description": "The product performs pointer arithmetic on a valid pointer, but it uses an offset that can point outside of the intended range of valid memory locations for the resulting pointer.", "severity": null, "category": "Untrusted... |
struct json_object *LUKS2_array_remove(struct json_object *array, const char *num)
{
struct json_object *jobj1, *jobj_removing = NULL, *array_new;
int i;
jobj_removing = LUKS2_array_jobj(array, num);
if (!jobj_removing)
return NULL;
/* Create new array without jobj_removing. */
array_new = json_object_new_arr... | 0 | [
"CWE-787"
] | cryptsetup | 52f5cb8cedf22fb3e14c744814ec8af7614146c7 | 257,361,541,237,449,020,000,000,000,000,000,000,000 | 19 | Check segment gaps regardless of heap space.
Segments are validated in hdr_validate_segments. Gaps in segment keys
are detected when collecting offsets. But if an invalid segment is very
large, larger than count, it could happen that cryptsetup is unable to
allocate enough memory, not giving a clue about what actually... | 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... |
unsigned int blk_rq_err_bytes(const struct request *rq)
{
unsigned int ff = rq->cmd_flags & REQ_FAILFAST_MASK;
unsigned int bytes = 0;
struct bio *bio;
if (!(rq->rq_flags & RQF_MIXED_MERGE))
return blk_rq_bytes(rq);
/*
* Currently the only 'mixing' which can happen is between
* different fastfail types. W... | 0 | [
"CWE-416",
"CWE-703"
] | linux | 54648cf1ec2d7f4b6a71767799c45676a138ca24 | 209,383,303,437,183,450,000,000,000,000,000,000,000 | 26 | block: blk_init_allocated_queue() set q->fq as NULL in the fail case
We find the memory use-after-free issue in __blk_drain_queue()
on the kernel 4.14. After read the latest kernel 4.18-rc6 we
think it has the same problem.
Memory is allocated for q->fq in the blk_init_allocated_queue().
If the elevator init function... | 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... |
nsPush(xmlParserCtxtPtr ctxt, const xmlChar *prefix, const xmlChar *URL)
{
if (ctxt->options & XML_PARSE_NSCLEAN) {
int i;
for (i = ctxt->nsNr - 2;i >= 0;i -= 2) {
if (ctxt->nsTab[i] == prefix) {
/* in scope */
if (ctxt->nsTab[i + 1] == URL)
return(-2);
/* out of scope keep it */
... | 0 | [
"CWE-119"
] | libxml2 | 6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d | 112,698,689,709,993,530,000,000,000,000,000,000,000 | 40 | Fix potential out of bound access | Safe | 119 | {"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ... |
unsigned strstrip(char * s)
{
char *last = NULL ;
char *dest = s;
if (s==NULL) return 0;
last = s + strlen(s);
while (isspace((int)*s) && *s) s++;
while (last > s) {
if (!isspace((int)*(last-1)))
break ;
last -- ;
}
*last = (char)0;
memmove(dest,s,last ... | 0 | [] | iniparser | 4f870752abbb756911d7b11405d49e9769d082bd | 249,288,051,841,439,050,000,000,000,000,000,000,000 | 19 | Fix #68 when reading file with only \0 char | Safe | null | null |
static inline void io_queue_async_work(struct io_kiocb *req)
{
struct io_ring_ctx *ctx = req->ctx;
struct io_kiocb *link;
bool do_hashed;
do_hashed = io_prep_async_work(req, &link);
trace_io_uring_queue_async_work(ctx, do_hashed, req, &req->work,
req->flags);
if (!do_hashed) {
io_wq_enqueue(ctx->io_wq, &... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 22,802,789,942,063,960,000,000,000,000,000,000,000 | 20 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... | Safe | null | null |
reg_set_bits(struct pcilynx *lynx, int offset, u32 mask)
{
reg_write(lynx, offset, (reg_read(lynx, offset) | mask));
} | 0 | [
"CWE-416"
] | linux | 829933ef05a951c8ff140e814656d73e74915faf | 99,307,047,505,207,250,000,000,000,000,000,000,000 | 4 | firewire: nosy: Fix a use-after-free bug in nosy_ioctl()
For each device, the nosy driver allocates a pcilynx structure.
A use-after-free might happen in the following scenario:
1. Open nosy device for the first time and call ioctl with command
NOSY_IOC_START, then a new client A will be malloced and added 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... |
static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
const struct in6_addr *group)
{
struct sk_buff *skb;
struct ipv6hdr *ip6h;
struct mld_msg *mldq;
struct ethhdr *eth;
u8 *hopopt;
unsigned long interval;
skb = netdev_alloc_skb_ip_align(br->dev, sizeof(*eth) + sizeof(*ip6h) +
... | 0 | [
"CWE-20"
] | linux | c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1 | 105,669,650,592,602,260,000,000,000,000,000,000,000 | 80 | bridge: fix some kernel warning in multicast timer
Several people reported the warning: "kernel BUG at kernel/timer.c:729!"
and the stack trace is:
#7 [ffff880214d25c10] mod_timer+501 at ffffffff8106d905
#8 [ffff880214d25c50] br_multicast_del_pg.isra.20+261 at ffffffffa0731d25 [bridge]
#9 [ffff880214d25c80] br_mul... | 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 avahi_mdns_mcast_join_ipv6(int fd, const AvahiIPv6Address *a, int idx, int join) {
struct ipv6_mreq mreq6;
struct sockaddr_in6 sa6;
assert(fd >= 0);
assert(idx >= 0);
assert(a);
memset(&mreq6, 0, sizeof(mreq6));
mdns_mcast_group_ipv6 (&sa6);
mreq6.ipv6mr_multiaddr = sa6.sin6_addr;
... | 0 | [
"CWE-399"
] | avahi | 46109dfec75534fe270c0ab902576f685d5ab3a6 | 230,566,646,190,083,700,000,000,000,000,000,000,000 | 23 | socket: Still read corrupt packets from the sockets
Else, we end up with an infinite loop with 100% CPU.
http://www.avahi.org/ticket/325
https://bugzilla.redhat.com/show_bug.cgi?id=667187 | Safe | 399 | null |
static int mi_sort_records(MI_CHECK *param,
register MI_INFO *info, char * name,
uint sort_key,
my_bool write_info,
my_bool update_index)
{
int got_error;
uint key;
MI_KEYDEF *keyinfo;
File new_file;
uchar *temp_buff;
ha_rows old_record_count;
MYISAM_SHARE *share=info->s;
char ll... | 0 | [
"CWE-362"
] | mysql-server | 4e5473862e6852b0f3802b0cd0c6fa10b5253291 | 187,394,964,057,477,240,000,000,000,000,000,000,000 | 173 | Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD)
is created. When repair finishes, this file is renamed to the original
.MYD file. The problem was that during this rename, we copied the
stats from the old file to the new file w... | 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... |
pdf_text_state_alloc(gs_memory_t *mem)
{
pdf_text_state_t *pts =
gs_alloc_struct(mem, pdf_text_state_t, &st_pdf_text_state,
"pdf_text_state_alloc");
if (pts == 0)
return 0;
*pts = ts_default;
return pts;
} | 0 | [
"CWE-119"
] | ghostpdl | 39b1e54b2968620723bf32e96764c88797714879 | 155,110,761,999,468,830,000,000,000,000,000,000,000 | 11 | pdfwrite - Guard against trying to output an infinite number
Bug #699255 " Buffer overflow on pprintg1 due to mishandle postscript file data to pdf"
The file uses an enormous parameter to xyxhow, causing an overflow in
the calculation of text positioning (value > 1e39).
Since this is basically a nonsense value, and ... | 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 PreservePSDOpacityMask(Image *image,LayerInfo* layer_info,
ExceptionInfo *exception)
{
char
*key;
RandomInfo
*random_info;
StringInfo
*key_info;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" preserving opacity mask");
random_info... | 0 | [
"CWE-787"
] | ImageMagick | d4ec73f866a7c42a2e7f301fcd696e5cb7a7d3ab | 89,152,139,142,567,850,000,000,000,000,000,000,000 | 29 | https://github.com/ImageMagick/ImageMagick/issues/350 | 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 samldb_generate_next_mapiid(struct samldb_ctx *ac,
struct dsdb_schema *schema,
int32_t *next_mapiid)
{
int ret;
struct ldb_context *ldb;
struct ldb_dn *schema_dn;
bool mapiid_used = true;
/* Windows' generation seems to start about here */
*next_mapiid = 60000;
ldb = ldb_module... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 295,306,229,636,397,100,000,000,000,000,000,000,000 | 27 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... | Safe | 200 | {"cwe_id": "CWE-200", "vulnerability_type": "Exposure of Sensitive Information to an Unauthorized Actor", "description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "severity": "High", "category": "Information Disclosure", "impact": ["Re... |
void php_date_do_return_parsed_time(INTERNAL_FUNCTION_PARAMETERS, timelib_time *parsed_time, struct timelib_error_container *error)
{
zval *element;
array_init(return_value);
#define PHP_DATE_PARSE_DATE_SET_TIME_ELEMENT(name, elem) \
if (parsed_time->elem == -99999) { \
add_assoc_bool(return_value,... | 0 | [] | php-src | c377f1a715476934133f3254d1e0d4bf3743e2d2 | 322,794,932,573,299,320,000,000,000,000,000,000,000 | 74 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) | Safe | null | null |
void UTFstring::UpdateFromUCS2()
{
// find the size of the final UTF-8 string
size_t i,Size=0;
for (i=0; i<_Length; i++) {
if (_Data[i] < 0x80) {
Size++;
} else if (_Data[i] < 0x800) {
Size += 2;
} else {
Size += 3;
}
}
std::string::value_type *tmpStr = new std::string::value... | 0 | [
"CWE-200",
"CWE-703"
] | libebml | ababb64e0c792ad2a314245233db0833ba12036b | 187,613,614,822,694,750,000,000,000,000,000,000,000 | 31 | EbmlUnicodeString: don't read beyond end of string
The conversion from an UTF-8 encoded string into a wchar_t one was
reading from beyond the end of the source buffer if the length indicated
by a UTF-8 character's first byte exceeds the number of bytes actually
present afterwards.
Fixes the issue reported as Cisco TA... | 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 void i40e_clean_adminq_subtask(struct i40e_pf *pf)
{
struct i40e_arq_event_info event;
struct i40e_hw *hw = &pf->hw;
u16 pending, i = 0;
i40e_status ret;
u16 opcode;
u32 oldval;
u32 val;
/* Do not run clean AQ when PF reset fails */
if (test_bit(__I40E_RESET_FAILED, pf->state))
return;
/* check for... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 172,343,024,164,588,420,000,000,000,000,000,000,000 | 125 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.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 lua_websocket_read(lua_State *L)
{
apr_socket_t *sock;
apr_status_t rv;
int do_read = 1;
int n = 0;
apr_size_t len = 1;
apr_size_t plen = 0;
unsigned short payload_short = 0;
apr_uint64_t payload_long = 0;
unsigned char *mask_bytes;
char byte;
int plaintext;
... | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 34,564,788,911,260,870,000,000,000,000,000,000,000 | 164 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... | 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... |
BOOL license_send_valid_client_error_packet(rdpRdp* rdp)
{
rdpLicense* license = rdp->license;
wStream* s = license_send_stream_init(license);
if (!s)
return FALSE;
DEBUG_LICENSE("Sending Error Alert Packet");
Stream_Write_UINT32(s, STATUS_VALID_CLIENT); /* dwErrorCode */
Stream_Write_UINT32(s, ST_NO_TRANSITIO... | 0 | [
"CWE-125"
] | FreeRDP | 6ade7b4cbfd71c54b3d724e8f2d6ac76a58e879a | 155,993,483,245,084,970,000,000,000,000,000,000,000 | 17 | Fixed OOB Read in license_read_new_or_upgrade_license_packet
CVE-2020-11099 thanks to @antonio-morales for finding this. | 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"... |
datetime_s_commercial(int argc, VALUE *argv, VALUE klass)
{
VALUE vy, vw, vd, vh, vmin, vs, vof, vsg, y, fr, fr2, ret;
int w, d, h, min, s, rof;
double sg;
rb_scan_args(argc, argv, "08", &vy, &vw, &vd, &vh, &vmin, &vs, &vof, &vsg);
y = INT2FIX(-4712);
w = 1;
d = 1;
h = min = s = 0;
... | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 213,532,560,911,630,170,000,000,000,000,000,000,000 | 70 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... | Safe | null | null |
bool Item_subselect::eliminate_subselect_processor(void *arg)
{
unit->item= NULL;
unit->exclude();
eliminated= TRUE;
return FALSE;
} | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 259,401,781,270,132,940,000,000,000,000,000,000,000 | 7 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... | Safe | 89 | {"cwe_id": "CWE-89", "vulnerability_type": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes spec... |
MagickExport MagickBooleanType BilevelImageChannel(Image *image,
const ChannelType channel,const double threshold)
{
#define ThresholdImageTag "Threshold/Image"
CacheView
*image_view;
ExceptionInfo
*exception;
MagickBooleanType
status;
MagickOffsetType
progress;
ssize_t
y;
asser... | 0 | [
"CWE-125"
] | ImageMagick6 | 35c7032723d85eee7318ff6c82f031fa2666b773 | 53,549,345,027,391,600,000,000,000,000,000,000,000 | 116 | https://github.com/ImageMagick/ImageMagick/issues/1609 | 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"... |
cmsBool FileClose(cmsIOHANDLER* iohandler)
{
if (fclose((FILE*) iohandler ->stream) != 0) return FALSE;
_cmsFree(iohandler ->ContextID, iohandler);
return TRUE;
} | 0 | [] | Little-CMS | d2d902b9a03583ae482c782b2f243f7e5268a47d | 143,735,406,202,943,800,000,000,000,000,000,000,000 | 6 | >Changes from Richard Hughes | Safe | null | null |
_cairo_image_surface_create_from_jpeg (GInputStream *istream,
GthFileData *file_data,
int requested_size,
int *original_width_p,
int *original_height_p,
gboolean *loaded_original_p,
gpointer user_data,
... | 1 | [
"CWE-787"
] | gthumb | 14860321ce3235d420498c4f81f21003d1fb78f4 | 282,188,773,700,920,700,000,000,000,000,000,000,000 | 457 | jpeg loader: crash when the original size is too big for a cairo surface
Do not scan more than CAIRO_MAX_IMAGE_SIZE lines. | 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... |
free_cur_term()
{
# ifdef HAVE_DEL_CURTERM
if (cur_term)
del_curterm(cur_term);
# endif
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 335,151,882,982,000,520,000,000,000,000,000,000,000 | 7 | 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"... |
xmlTextReaderConstPrefix(xmlTextReaderPtr reader) {
xmlNodePtr node;
if ((reader == NULL) || (reader->node == NULL))
return(NULL);
if (reader->curnode != NULL)
node = reader->curnode;
else
node = reader->node;
if (node->type == XML_NAMESPACE_DECL) {
xmlNsPtr ns = (xmlNsPtr) node;
if (ns->prefix... | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 228,385,814,994,467,370,000,000,000,000,000,000,000 | 21 | 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 |
clientPackTermBound(String boundary, MemBuf *mb)
{
mb->appendf("\r\n--" SQUIDSTRINGPH "--\r\n", SQUIDSTRINGPRINT(boundary));
debugs(33, 6, "buf offset: " << mb->size);
} | 0 | [
"CWE-444"
] | squid | fd68382860633aca92065e6c343cfd1b12b126e7 | 87,016,585,840,179,750,000,000,000,000,000,000,000 | 5 | Improve Transfer-Encoding handling (#702)
Reject messages containing Transfer-Encoding header with coding other
than chunked or identity. Squid does not support other codings.
For simplicity and security sake, also reject messages where
Transfer-Encoding contains unnecessary complex values that are
technically equiva... | Safe | 444 | {"cwe_id": "CWE-444", "vulnerability_type": "Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')", "description": "The product acts as an intermediary HTTP agent\n (such as a proxy or firewall) in the data flow between two\n entities such as a client and server, but it does ... |
bool Field_vers_trx_id::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate, ulonglong trx_id)
{
ASSERT_COLUMN_MARKED_FOR_READ;
DBUG_ASSERT(ltime);
if (!table || !table->s)
return true;
DBUG_ASSERT(table->versioned(VERS_TRX_ID) ||
(table->versioned() && table->s->table_category == TABLE_CATEGORY_TEMPORARY))... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 93,969,577,404,259,040,000,000,000,000,000,000,000 | 40 | 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... |
static netdev_features_t bnx2x_features_check(struct sk_buff *skb,
struct net_device *dev,
netdev_features_t features)
{
features = vlan_features_check(skb, features);
return vxlan_features_check(skb, features);
} | 1 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 261,424,896,711,431,850,000,000,000,000,000,000,000 | 7 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... | Vulnerable | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.