func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void extcap_config() {
int i, argidx = 0;
struct ndpi_proto_sorter *protos;
u_int ndpi_num_supported_protocols = ndpi_get_ndpi_num_supported_protocols(ndpi_info_mod);
ndpi_proto_defaults_t *proto_defaults = ndpi_get_proto_defaults(ndpi_info_mod);
/* -i <interface> */
printf("arg {number=%d}{call=-i}{displa... | 0 | [
"CWE-125"
] | nDPI | b7e666e465f138ae48ab81976726e67deed12701 | 293,791,895,166,943,100,000,000,000,000,000,000,000 | 35 | Added fix to avoid potential heap buffer overflow in H.323 dissector
Modified HTTP report information to make it closer to the HTTP field names |
static uint32_t read_filter_data(struct rar5* rar, uint32_t offset) {
uint8_t linear_buf[4];
circular_memcpy(linear_buf, rar->cstate.window_buf,
rar->cstate.window_mask, offset, offset + 4);
return archive_le32dec(linear_buf);
} | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 110,317,872,741,313,750,000,000,000,000,000,000,000 | 6 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
f_remote_foreground(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
#ifdef FEAT_CLIENTSERVER
# ifdef WIN32
/* On Win32 it's done in this application. */
{
char_u *server_name = tv_get_string_chk(&argvars[0]);
if (server_name != NULL)
serverForeground(server_name);
}
# else
/* Send a foregrou... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 172,703,435,181,536,870,000,000,000,000,000,000,000 | 23 | 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. |
static void fq_tin_init(struct fq_tin *tin)
{
INIT_LIST_HEAD(&tin->new_flows);
INIT_LIST_HEAD(&tin->old_flows);
} | 0 | [
"CWE-330"
] | linux | 55667441c84fa5e0911a0aac44fb059c15ba6da2 | 157,771,166,142,712,680,000,000,000,000,000,000,000 | 5 | net/flow_dissector: switch to siphash
UDP IPv6 packets auto flowlabels are using a 32bit secret
(static u32 hashrnd in net/core/flow_dissector.c) and
apply jhash() over fields known by the receivers.
Attackers can easily infer the 32bit secret and use this information
to identify a device and/or user, since this 32bi... |
add_system_trust(gnutls_x509_trust_list_t list,
unsigned int tl_flags, unsigned int tl_vflags)
{
int ret, r = 0;
const char *crl_file =
#ifdef DEFAULT_CRL_FILE
DEFAULT_CRL_FILE;
#else
NULL;
#endif
#if defined(ENABLE_PKCS11) && defined(DEFAULT_TRUST_STORE_PKCS11)
ret =
gnutls_x509_trust_list_add_tr... | 0 | [
"CWE-20"
] | gnutls | b0a3048e56611a2deee4976aeba3b8c0740655a6 | 173,330,609,212,428,300,000,000,000,000,000,000,000 | 42 | env: use secure_getenv when reading environment variables |
static void test_simple_delete()
{
MYSQL_STMT *stmt;
int rc;
char szData[30]= {0};
int nData= 1;
MYSQL_RES *result;
MYSQL_BIND my_bind[2];
ulong length[2];
char query[MAX_TEST_QUERY_LENGTH];
myheader("test_simple_delete");
rc= mysql_autocommit(mysql, TRUE);
myquery(rc);
r... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 117,145,685,286,514,390,000,000,000,000,000,000,000 | 79 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
gro_result_t napi_gro_frags(struct napi_struct *napi)
{
struct sk_buff *skb = napi_frags_skb(napi);
if (!skb)
return GRO_DROP;
trace_napi_gro_frags_entry(skb);
return napi_frags_finish(napi, skb, dev_gro_receive(napi, skb)); | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 317,362,844,320,324,920,000,000,000,000,000,000,000 | 11 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
eb_reset(struct eb_objects *eb)
{
if (eb->and >= 0)
memset(eb->buckets, 0, (eb->and+1)*sizeof(struct hlist_head));
} | 0 | [] | linux | 3118a4f652c7b12c752f3222af0447008f9b2368 | 104,601,267,108,070,600,000,000,000,000,000,000,000 | 5 | drm/i915: bounds check execbuffer relocation count
It is possible to wrap the counter used to allocate the buffer for
relocation copies. This could lead to heap writing overflows.
CVE-2013-0913
v3: collapse test, improve comment
v2: move check into validate_exec_list
Signed-off-by: Kees Cook <keescook@chromium.org>... |
CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread)
{
/* When sending a SMTP payload we must detect CRLF. sequences making sure
they are sent as CRLF.. instead, as a . on the beginning of a line will
be deleted by the server when not part of an EOB terminator and a
genuine CRLF... | 0 | [
"CWE-200",
"CWE-119",
"CWE-787"
] | curl | ba1dbd78e5f1ed67c1b8d37ac89d90e5e330b628 | 32,769,697,945,289,500,000,000,000,000,000,000,000 | 100 | smtp: use the upload buffer size for scratch buffer malloc
... not the read buffer size, as that can be set smaller and thus cause
a buffer overflow! CVE-2018-0500
Reported-by: Peter Wu
Bug: https://curl.haxx.se/docs/adv_2018-70a2.html |
drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB)
{
SCREEN *sp;
AssertTCB();
SetSP();
/* we know how to recognize mouse events under "xterm" */
if (sp != 0) {
if (NonEmpty(key_mouse)) {
init_xterm_mouse(sp);
} else if (strstr(SP_TERMTYPE term_names, "xterm") != 0) {
if (_nc_add_to_try(&(sp->... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 80,931,004,780,877,200,000,000,000,000,000,000,000 | 17 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
CImg<T>& assign(const t *const values, const unsigned int size_x, const unsigned int size_y,
const unsigned int size_z, const unsigned int size_c,
const char *const axes_order) {
CImg<T>(values,size_x,size_y,size_z,size_c,axes_order).move_to(*this);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 126,495,091,803,129,910,000,000,000,000,000,000,000 | 5 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
Err(ErrorType e, const std::string &s)
: Exception(e, s) {}
| 0 | [
"CWE-190",
"CWE-125"
] | cryptopp | 07dbcc3d9644b18e05c1776db2a57fe04d780965 | 315,074,557,601,895,580,000,000,000,000,000,000,000 | 2 | Add Inflator::BadDistanceErr exception (Issue 414)
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings |
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_stat_akcipher rakcipher;
memset(&rakcipher, 0, sizeof(rakcipher));
strscpy(rakcipher.type, "akcipher", sizeof(rakcipher.type));
rakcipher.stat_encrypt_cnt = atomic64_read(&alg->stats.akcipher.encrypt_cnt);
rakcipher.st... | 0 | [
"CWE-400",
"CWE-284",
"CWE-401"
] | linux | c03b04dcdba1da39903e23cc4d072abf8f68f2dd | 135,636,004,090,380,690,000,000,000,000,000,000,000 | 18 | crypto: user - fix memory leak in crypto_reportstat
In crypto_reportstat, a new skb is created by nlmsg_new(). This skb is
leaked if crypto_reportstat_alg() fails. Required release for skb is
added.
Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto statistics")
Cc: <stable@vger.kernel.org>
Signed-off-by... |
static int rsa_cms_verify(CMS_SignerInfo *si)
{
int nid, nid2;
X509_ALGOR *alg;
EVP_PKEY_CTX *pkctx = CMS_SignerInfo_get0_pkey_ctx(si);
CMS_SignerInfo_get0_algs(si, NULL, NULL, NULL, &alg);
nid = OBJ_obj2nid(alg->algorithm);
if (nid == NID_rsaEncryption)
return 1;
if (nid == NID_rsas... | 0 | [] | openssl | 4b22cce3812052fe64fc3f6d58d8cc884e3cb834 | 232,992,505,409,990,400,000,000,000,000,000,000,000 | 18 | Reject invalid PSS parameters.
Fix a bug where invalid PSS parameters are not rejected resulting in a
NULL pointer exception. This can be triggered during certificate
verification so could be a DoS attack against a client or a server
enabling client authentication.
Thanks to Brian Carpenter for reporting this issues.... |
enum dc_status dce100_validate_global(
struct dc *dc,
struct dc_state *context)
{
if (!dce100_validate_surface_sets(context))
return DC_FAIL_SURFACE_VALIDATE;
return DC_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 101,141,349,437,550,350,000,000,000,000,000,000,000 | 9 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
struct mii_bus *of_mdio_find_bus(struct device_node *mdio_bus_np)
{
struct device *d;
if (!mdio_bus_np)
return NULL;
d = class_find_device(&mdio_bus_class, NULL, mdio_bus_np,
of_mdio_bus_match);
return d ? to_mii_bus(d) : NULL;
} | 0 | [
"CWE-416"
] | linux | 6ff7b060535e87c2ae14dd8548512abfdda528fb | 288,500,842,497,718,300,000,000,000,000,000,000,000 | 12 | mdio_bus: Fix use-after-free on device_register fails
KASAN has found use-after-free in fixed_mdio_bus_init,
commit 0c692d07842a ("drivers/net/phy/mdio_bus.c: call
put_device on device_register() failure") call put_device()
while device_register() fails,give up the last reference
to the device and allow mdiobus_releas... |
print_for_mkdir (char *dirname, int length, mode_t mode)
{
char modes[11];
if (verbose_option > 1)
{
/* File type and modes. */
modes[0] = 'd';
pax_decode_mode (mode, modes + 1);
if (block_number_option)
{
char buf[UINTMAX_STRSIZE_BOUND];
fprintf (stdlis, _("block %s: "),
... | 0 | [
"CWE-125"
] | tar | d9d4435692150fa8ff68e1b1a473d187cc3fd777 | 133,733,844,665,323,350,000,000,000,000,000,000,000 | 22 | Fix memory leak in read_header
Bug reported in https://savannah.gnu.org/bugs/?59897
* src/list.c (read_header): Don't return directly from the loop.
Instead set the status and break. Return the status. Free
next_long_name and next_long_link before returning. |
static int cache_update(struct server_data *srv, unsigned char *msg,
unsigned int msg_len)
{
int offset = protocol_offset(srv->protocol);
int err, qlen, ttl = 0;
uint16_t answers = 0, type = 0, class = 0;
struct domain_hdr *hdr = (void *)(msg + offset);
struct domain_question *q;
struct cache_entry *entry;
st... | 0 | [
"CWE-119"
] | connman | 5c281d182ecdd0a424b64f7698f32467f8f67b71 | 227,747,956,654,491,900,000,000,000,000,000,000,000 | 226 | dnsproxy: Fix crash on malformed DNS response
If the response query string is malformed, we might access memory
pass the end of "name" variable in parse_response(). |
bool GetResult()
{
return !fail;
}
| 0 | [
"CWE-190",
"CWE-125"
] | cryptopp | 07dbcc3d9644b18e05c1776db2a57fe04d780965 | 64,173,168,332,491,570,000,000,000,000,000,000,000 | 4 | Add Inflator::BadDistanceErr exception (Issue 414)
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings |
Frame *FrameFactory::createFrame(const ByteVector &origData, Header *tagHeader) const
{
ByteVector data = origData;
unsigned int version = tagHeader->majorVersion();
Frame::Header *header = new Frame::Header(data, version);
ByteVector frameID = header->frameID();
// A quick sanity check -- make sure that the... | 0 | [
"CWE-434",
"CWE-352"
] | taglib | cb9f07d9dcd791b63e622da43f7b232adaec0a9a | 164,509,800,331,360,380,000,000,000,000,000,000,000 | 201 | Don't assume TDRC is an instance of TextIdentificationFrame (#831)
If TDRC is encrypted, FrameFactory::createFrame() returns UnknownFrame
which causes problems in rebuildAggregateFrames() when it is assumed
that TDRC is a TextIdentificationFrame |
static inline int ok_inflater_write_byte_n(ok_inflater *inflater, const uint8_t b, int len) {
int bytes_remaining = len;
while (bytes_remaining > 0) {
int n = min(bytes_remaining, ok_inflater_can_write(inflater));
if (n == 0) {
return len - bytes_remaining;
}
memset(i... | 0 | [
"CWE-787"
] | ok-file-formats | e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e | 325,890,391,692,030,200,000,000,000,000,000,000,000 | 13 | ok_png: Disallow multiple IHDR chunks (#15) |
set_pid_flags (pid, flags)
pid_t pid;
int flags;
{
int slot;
slot = find_index_by_pid (pid);
if (slot == NO_PID)
return;
pid_list[slot].flags |= flags;
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 109,118,180,914,255,250,000,000,000,000,000,000,000 | 12 | bash-4.4-rc2 release |
allocUtf8Targets(Widget w, TScreen *screen)
{
Atom **resultp = &(screen->selection_targets_utf8);
if (*resultp == 0) {
Atom *result;
if (!overrideTargets(w, screen->utf8_select_types, &result)) {
result = TypeXtMallocN(Atom, 5);
if (result == NULL) {
TRACE(("Couldn't allocate utf-8 selection tar... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 326,611,790,608,209,000,000,000,000,000,000,000,000 | 33 | snapshot of project "xterm", label xterm-365d |
mark_source_chains(struct xt_table_info *newinfo,
unsigned int valid_hooks, void *entry0)
{
unsigned int hook;
/* No recursion; use packet counter to save back ptrs (reset
to 0 as we leave), and comefrom to save source hook bitmask */
for (hook = 0; hook < NF_IP_NUMHOOKS; hook++) {
unsigned int pos = new... | 0 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 8,298,829,214,595,508,000,000,000,000,000,000,000 | 93 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
void *dm_get_mdptr(struct mapped_device *md)
{
return md->interface_ptr;
} | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 273,939,414,893,527,200,000,000,000,000,000,000,000 | 4 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
int X509_check_host(X509 *x, const char *chk, size_t chklen,
unsigned int flags, char **peername)
{
if (chk == NULL)
return -2;
/*
* Embedded NULs are disallowed, except as the last character of a
* string of length 2 or more (tolerate caller including terminating
* NU... | 0 | [
"CWE-125"
] | openssl | bb4d2ed4091408404e18b3326e3df67848ef63d0 | 123,158,756,520,206,850,000,000,000,000,000,000,000 | 18 | Fix append_ia5 function to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
pcx_header_from_buffer (guint8 *buf)
{
gint i;
gint buf_offset = 0;
for (i = 0; pcx_header_buf_xlate[i].size != 0; i++)
{
g_memmove (pcx_header_buf_xlate[i].address, buf + buf_offset,
pcx_header_buf_xlate[i].size);
buf_offset += pcx_header_buf_xlate[i].size;
}
} | 0 | [
"CWE-190"
] | gimp | a9671395f6573e90316a9d748588c5435216f6ce | 86,091,005,356,457,600,000,000,000,000,000,000,000 | 12 | PCX: Avoid allocation overflows.
Multiplying gint values may overflow unless cast into a larger type. |
win_strncat_to_utf16le(struct archive_string *as16, const void *_p,
size_t length, struct archive_string_conv *sc)
{
return (win_strncat_to_utf16(as16, _p, length, sc, 0));
} | 0 | [
"CWE-476"
] | libarchive | 42a3408ac7df1e69bea9ea12b72e14f59f7400c0 | 294,699,664,492,052,400,000,000,000,000,000,000,000 | 5 | archive_strncat_l(): allocate and do not convert if length == 0
This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set
aes_set = AES_SET_MBS with aes_mbs.s == NULL.
Resolves possible null-pointer dereference reported by OSS-Fuzz.
Reported-By: OSS-Fuzz issue 286 |
static void http_server_error(struct session *t, struct stream_interface *si,
int err, int finst, int status, const struct chunk *msg)
{
channel_auto_read(si->ob);
channel_abort(si->ob);
channel_auto_close(si->ob);
channel_erase(si->ob);
channel_auto_close(si->ib);
channel_auto_read(si->ib);
if (status ... | 0 | [] | haproxy | aae75e3279c6c9bd136413a72dafdcd4986bb89a | 199,512,731,124,888,200,000,000,000,000,000,000,000 | 18 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
static int put_compat_flock64(struct flock *kfl, struct compat_flock64 __user *ufl)
{
if (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)) ||
__put_user(kfl->l_type, &ufl->l_type) ||
__put_user(kfl->l_whence, &ufl->l_whence) ||
__put_user(kfl->l_start, &ufl->l_start) ||
__put_user(kfl->l_len, &ufl->l_le... | 0 | [] | linux-2.6 | 822191a2fa1584a29c3224ab328507adcaeac1ab | 331,152,777,448,605,680,000,000,000,000,000,000,000 | 11 | [PATCH] skip data conversion in compat_sys_mount when data_page is NULL
OpenVZ Linux kernel team has found a problem with mounting in compat mode.
Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode
leads to oops:
Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp... |
static BIO *cms_get_text_bio(BIO *out, unsigned int flags)
{
BIO *rbio;
if (out == NULL)
rbio = BIO_new(BIO_s_null());
else if (flags & CMS_TEXT)
{
rbio = BIO_new(BIO_s_mem());
BIO_set_mem_eof_return(rbio, 0);
}
else
rbio = out;
return rbio;
} | 0 | [
"CWE-399",
"CWE-703"
] | openssl | cd30f03ac5bf2962f44bd02ae8d88245dff2f12c | 215,048,021,619,311,820,000,000,000,000,000,000,000 | 14 | Canonicalise input in CMS_verify.
If content is detached and not binary mode translate the input to
CRLF format. Before this change the input was verified verbatim
which lead to a discrepancy between sign and verify. |
cgiSetArray(const char *name, /* I - Name of variable */
int element, /* I - Element number (0 to N) */
const char *value) /* I - Value of variable */
{
int i; /* Looping var */
_cgi_var_t *var; /* Returned variable */
if (name == NULL || value == NULL || element < 0 || el... | 0 | [] | cups | b9ff93ce913ff633a3f667317e5a81fa7fe0d5d3 | 224,456,814,455,646,450,000,000,000,000,000,000,000 | 46 | CVE-2018-4700: Linux session cookies used a predictable random number seed. |
isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
{
char *eaz;
int si1;
int si2;
int ematch;
int wret;
int swapped;
int sidx = 0;
u_long flags;
isdn_net_dev *p;
isdn_net_phone *n;
char nr[ISDN_MSNLEN];
char *my_eaz;
/* Search name in netdev-chain */
if (!setup->phone[0]) {
nr[0] = '0';
... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 177,557,868,420,445,960,000,000,000,000,000,000,000 | 326 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
hfs_cat_get_record_offset(HFS_INFO * hfs, const hfs_btree_key_cat * needle)
{
HFS_CAT_GET_RECORD_OFFSET_DATA offset_data;
offset_data.off = 0;
offset_data.targ_key = needle;
if (hfs_cat_traverse(hfs, hfs_cat_get_record_offset_cb, &offset_data)) {
return 0;
}
return offset_data.off;
} | 0 | [
"CWE-190",
"CWE-284"
] | sleuthkit | 114cd3d0aac8bd1aeaf4b33840feb0163d342d5b | 215,448,320,308,456,300,000,000,000,000,000,000,000 | 10 | hfs: fix keylen check in hfs_cat_traverse()
If key->key_len is 65535, calculating "uint16_t keylen' would
cause an overflow:
uint16_t keylen;
...
keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len)
so the code bypasses the sanity check "if (keylen > nodesize)"
which results in crash later:
./too... |
shorten_fname(char_u *full_path, char_u *dir_name)
{
int len;
char_u *p;
if (full_path == NULL)
return NULL;
len = (int)STRLEN(dir_name);
if (fnamencmp(dir_name, full_path, len) == 0)
{
p = full_path + len;
#if defined(MSWIN)
/*
* MSWIN: when a file is in the root directory, dir_name will... | 0 | [
"CWE-200",
"CWE-668"
] | vim | 5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8 | 201,185,916,378,635,000,000,000,000,000,000,000,000 | 44 | patch 8.0.1263: others can read the swap file if a user is careless
Problem: Others can read the swap file if a user is careless with his
primary group.
Solution: If the group permission allows for reading but the world
permissions doesn't, make sure the group is right. |
static int doTerminateInstance(struct nc_state_t *nc, ncMetadata * pMeta, char *instanceId, int force, int *shutdownState, int *previousState)
{
ncInstance *instance = NULL;
int err = EUCA_ERROR;
char resourceName[1][MAX_SENSOR_NAME_LEN] = { {0} };
char resourceAlias[1][MAX_SENSOR_NAME_LEN] = { {0} };
... | 0 | [] | eucalyptus | c252889a46f41b4c396b89e005ec89836f2524be | 32,018,642,558,139,345,000,000,000,000,000,000,000 | 39 | Input validation, shellout hardening on back-end
- validating bucketName and bucketPath in BundleInstance
- validating device name in Attach and DetachVolume
- removed some uses of system() and popen()
Fixes EUCA-7572, EUCA-7520 |
void kvm_arch_commit_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
const struct kvm_memory_slot *old,
enum kvm_mr_change change)
{
int nr_mmu_pages = 0;
if ((mem->slot >= KVM_USER_MEM_SLOTS) && (change == KVM_MR_DELETE)) {
int ret;
ret = vm_munmap(old->userspace_addr,
... | 0 | [
"CWE-119",
"CWE-703",
"CWE-120"
] | linux | a08d3b3b99efd509133946056531cdf8f3a0c09b | 203,723,652,073,856,230,000,000,000,000,000,000,000 | 32 | kvm: x86: fix emulator buffer overflow (CVE-2014-0049)
The problem occurs when the guest performs a pusha with the stack
address pointing to an mmio address (or an invalid guest physical
address) to start with, but then extending into an ordinary guest
physical address. When doing repeated emulated pushes
emulator_re... |
void start_application(int no_sandbox, FILE *fp) {
// set environment
if (no_sandbox == 0) {
env_defaults();
env_apply();
}
// restore original umask
umask(orig_umask);
if (arg_debug) {
printf("starting application\n");
printf("LD_PRELOAD=%s\n", getenv("LD_PRELOAD"));
}
//*****************************... | 0 | [
"CWE-284",
"CWE-732"
] | firejail | eecf35c2f8249489a1d3e512bb07f0d427183134 | 279,562,710,826,601,750,000,000,000,000,000,000,000 | 135 | mount runtime seccomp files read-only (#2602)
avoid creating locations in the file system that are both writable and
executable (in this case for processes with euid of the user).
for the same reason also remove user owned libfiles
when it is not needed any more |
bit_write_CMC (Bit_Chain *restrict dat, Dwg_Color *restrict color)
{
bit_write_BS (dat, color->index);
if (dat->version >= R_2004)
{
bit_write_BL (dat, color->rgb);
bit_write_RC (dat, color->flag);
// wide?
if (color->flag & 1)
bit_write_TV (dat, color->name);
if (color->fl... | 0 | [
"CWE-703",
"CWE-125"
] | libredwg | 95cc9300430d35feb05b06a9badf678419463dbe | 276,841,136,580,081,360,000,000,000,000,000,000,000 | 14 | encode: protect from stack under-flow
From GH #178 fuzzing |
pixDitherOctindexWithCmap(PIX *pixs,
PIX *pixd,
l_uint32 *rtab,
l_uint32 *gtab,
l_uint32 *btab,
l_int32 *indexmap,
l_int32 difcap)
{
l_uint8 *... | 0 | [
"CWE-125"
] | leptonica | 5ee24b398bb67666f6d173763eaaedd9c36fb1e5 | 124,562,372,522,188,220,000,000,000,000,000,000,000 | 176 | Fixed issue 22140 in oss-fuzz: Heap-buffer-overflow
* color quantized pix must be 8 bpp before extra colors are added. |
ArgParser::argEndEncrypt()
{
o.encrypt = true;
o.decrypt = false;
o.copy_encryption = false;
this->option_table = &(this->main_option_table);
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 134,202,243,964,552,500,000,000,000,000,000,000,000 | 7 | 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 ... |
static int tcos_decipher(sc_card_t *card, const u8 * crgram, size_t crgram_len, u8 * out, size_t outlen)
{
sc_context_t *ctx;
sc_apdu_t apdu;
u8 rbuf[SC_MAX_APDU_BUFFER_SIZE];
u8 sbuf[SC_MAX_APDU_BUFFER_SIZE];
tcos_data *data;
int tcos3, r;
assert(card != NULL && crgram != NULL && out != NULL);
ctx = card->ctx... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 163,672,207,635,672,680,000,000,000,000,000,000,000 | 44 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
asmlinkage long xtensa_fadvise64_64(int fd, int advice,
unsigned long long offset, unsigned long long len)
{
return sys_fadvise64_64(fd, offset, len, advice);
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 312,538,891,171,183,100,000,000,000,000,000,000,000 | 5 | 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 ... |
do_ipt_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len)
{
int ret;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
switch (cmd) {
case IPT_SO_SET_REPLACE:
ret = do_replace(sock_net(sk), user, len);
break;
case IPT_SO_SET_ADD_COUNTERS:
ret = do_add_counters(sock_net(sk), user, len, 0);
... | 0 | [
"CWE-200"
] | linux-2.6 | 78b79876761b86653df89c48a7010b5cbd41a84a | 222,878,892,359,409,400,000,000,000,000,000,000,000 | 23 | netfilter: ip_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
in... |
int cli_caloff(const char *offstr, const struct cli_target_info *info, unsigned int target, uint32_t *offdata, uint32_t *offset_min, uint32_t *offset_max)
{
char offcpy[65];
unsigned int n, val;
char *pt;
if(!info) { /* decode offset string */
if(!offstr) {
cli_errmsg("cli_caloff: offstr == NULL\n");
... | 0 | [] | clamav-devel | 167c0079292814ec5523d0b97a9e1b002bf8819b | 21,879,849,124,973,377,000,000,000,000,000,000,000 | 170 | fix 0.99.3 false negative of virus Pdf.Exploit.CVE_2016_1046-1. |
bool moreJSObjs() const {
return nextjsobj != 0;
} | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 296,119,172,638,073,800,000,000,000,000,000,000,000 | 3 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
struct Sass_Options* ADDCALL sass_context_get_options(struct Sass_Context* ctx) { return ctx; } | 0 | [
"CWE-125"
] | libsass | 8f40dc03e5ab5a8b2ebeb72b31f8d1adbb2fd6ae | 256,147,722,637,554,130,000,000,000,000,000,000,000 | 1 | Optimize line_begin/end search in `handle_error`
There is no need to advance by UTF-8 code points when searching for an
ASCII character, because UTF-8 is a prefix-free encoding. |
static struct tun_flow_entry *tun_flow_create(struct tun_struct *tun,
struct hlist_head *head,
u32 rxhash, u16 queue_index)
{
struct tun_flow_entry *e = kmalloc(sizeof(*e), GFP_ATOMIC);
if (e) {
tun_debug(KERN_INFO, tun, "create flow: hash %u index %u\n",
rxhash, queue_index);
e->updat... | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 198,477,950,199,822,800,000,000,000,000,000,000,000 | 19 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
static u32 bs_get_ue(GF_BitStream *bs)
{
u8 coded;
u32 bits = 0, read = 0;
while (1) {
read = gf_bs_peek_bits(bs, 8, 0);
if (read) break;
//check whether we still have bits once the peek is done since we may have less than 8 bits available
if (!gf_bs_available(bs)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CODING, ("... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 286,855,510,205,423,470,000,000,000,000,000,000,000 | 20 | fix some exploitable overflows (#994, #997) |
static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fname, size_t fname_nbytes, const char *fval, size_t fval_nbytes, size_t max_line_len, const char *lfchars, php_iconv_enc_scheme_t enc_scheme, const char *out_charset, const char *enc)
{
php_iconv_err_t err = PHP_ICONV_ERR_SUCCESS;
iconv_t ... | 0 | [
"CWE-125"
] | php-src | 7cf7148a8f8f4f55fb04de2a517d740bb6253eac | 5,466,635,189,365,712,000,000,000,000,000,000,000 | 328 | Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow |
static __meminit void zone_pcp_init(struct zone *zone)
{
/*
* per cpu subsystem is not up at this point. The following code
* relies on the ability of the linker to provide the
* offset of a (static) per cpu variable into the per cpu area.
*/
zone->pageset = &boot_pageset;
if (populated_zone(zone))
printk... | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 113,035,244,684,699,850,000,000,000,000,000,000,000 | 14 | 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... |
static void scsi_block_realize(SCSIDevice *dev, Error **errp)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev);
AioContext *ctx;
int sg_version;
int rc;
if (!s->qdev.conf.blk) {
error_setg(errp, "drive property not set");
return;
}
if (s->rotation_rate) {
er... | 0 | [
"CWE-193"
] | qemu | b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8 | 279,237,966,511,984,520,000,000,000,000,000,000,000 | 63 | hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().
Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa... |
nogvl_mkdir(void *ptr)
{
struct mkdir_arg *m = ptr;
return (void *)(VALUE)mkdir(m->path, m->mode);
} | 0 | [
"CWE-22"
] | ruby | bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8 | 194,794,213,078,287,600,000,000,000,000,000,000,000 | 6 | dir.c: check NUL bytes
* dir.c (GlobPathValue): should be used in rb_push_glob only.
other methods should use FilePathValue.
https://hackerone.com/reports/302338
* dir.c (rb_push_glob): expand GlobPathValue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
get_next_token(memarea_t *area,
const char **s, const char *eos, token_rule_t *table)
{
/** Reject any object at least this big; it is probably an overflow, an
* attack, a bug, or some other nonsense. */
#define MAX_UNPARSED_OBJECT_SIZE (128*1024)
/** Reject any line at least this big; it is proba... | 0 | [
"CWE-399"
] | tor | 57e35ad3d91724882c345ac709666a551a977f0f | 228,504,982,945,056,870,000,000,000,000,000,000,000 | 157 | Avoid possible segfault when handling networkstatus vote with bad flavor
Fix for 6530; fix on 0.2.2.6-alpha. |
int Field_timestamp_with_dec::set_time()
{
THD *thd= get_thd();
set_notnull();
// Avoid writing microseconds into binlog for FSP=0
store_TIME(thd->query_start(), decimals() ? thd->query_start_sec_part() : 0);
return 0;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 284,442,712,056,648,500,000,000,000,000,000,000,000 | 8 | 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... |
inline void unlink_not_visible_thd(THD *thd)
{
mysql_mutex_lock(&LOCK_thread_count);
thd->unlink();
mysql_mutex_unlock(&LOCK_thread_count);
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 73,615,120,644,343,900,000,000,000,000,000,000,000 | 6 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
static int kvm_pv_enable_async_pf(struct kvm_vcpu *vcpu, u64 data)
{
gpa_t gpa = data & ~0x3f;
/* Bits 2:5 are resrved, Should be zero */
if (data & 0x3c)
return 1;
vcpu->arch.apf.msr_val = data;
if (!(data & KVM_ASYNC_PF_ENABLED)) {
kvm_clear_async_pf_completion_queue(vcpu);
kvm_async_pf_hash_reset(vcpu)... | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 174,014,451,585,737,470,000,000,000,000,000,000,000 | 23 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
SSL_CIPHER *ssl2_get_cipher_by_char(const unsigned char *p)
{
SSL_CIPHER c,*cp;
unsigned long id;
id=0x02000000L|((unsigned long)p[0]<<16L)|
((unsigned long)p[1]<<8L)|(unsigned long)p[2];
c.id=id;
cp = (SSL_CIPHER *)OBJ_bsearch((char *)&c,
(char *)ssl2_ciphers,
SSL2_NUM_CIPHERS,sizeof(SSL_CIPHER),
FP_ICC... | 0 | [
"CWE-310"
] | openssl | c6a876473cbff0fd323c8abcaace98ee2d21863d | 71,191,768,227,749,770,000,000,000,000,000,000,000 | 17 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
mrb_obj_instance_eval(mrb_state *mrb, mrb_value self)
{
mrb_value a, b;
if (mrb_get_args(mrb, "|S&", &a, &b) == 1) {
mrb_raise(mrb, E_NOTIMP_ERROR, "instance_eval with string not implemented");
}
return eval_under(mrb, self, b, mrb_singleton_class_ptr(mrb, self));
} | 0 | [
"CWE-122",
"CWE-787"
] | mruby | 47068ae07a5fa3aa9a1879cdfe98a9ce0f339299 | 272,337,136,474,382,700,000,000,000,000,000,000,000 | 9 | vm.c: packed arguments length may be zero for `send` method. |
CompositeDeepScanLine::Data::check_valid(const Header & header)
{
bool has_z=false;
bool has_alpha=false;
// check good channel names
for( ChannelList::ConstIterator i=header.channels().begin();i!=header.channels().end();++i)
{
std::string n(i.name());
if(n=="ZBack")
{
... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 94,665,288,890,363,720,000,000,000,000,000,000,000 | 55 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
sync_min_show(struct mddev *mddev, char *page)
{
return sprintf(page, "%d (%s)\n", speed_min(mddev),
mddev->sync_speed_min ? "local": "system");
} | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 4,777,662,863,925,592,000,000,000,000,000,000,000 | 5 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
static void inbound_frame_set_settings_entry(nghttp2_inbound_frame *iframe) {
nghttp2_settings_entry iv;
nghttp2_settings_entry *min_header_table_size_entry;
size_t i;
nghttp2_frame_unpack_settings_entry(&iv, iframe->sbuf.pos);
switch (iv.settings_id) {
case NGHTTP2_SETTINGS_HEADER_TABLE_SIZE:
case NGHT... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 85,027,065,831,338,530,000,000,000,000,000,000,000 | 44 | Add nghttp2_option_set_max_outbound_ack |
cmsBool CMSEXPORT cmsIT8SetDataRowCol(cmsHANDLE hIT8, int row, int col, const char* Val)
{
cmsIT8* it8 = (cmsIT8*) hIT8;
_cmsAssert(hIT8 != NULL);
return SetData(it8, row, col, Val);
} | 0 | [] | Little-CMS | 65e2f1df3495edc984f7e0d7b7b24e29d851e240 | 60,318,103,436,869,350,000,000,000,000,000,000,000 | 8 | Fix some warnings from static analysis |
ready_callback_key_compare_only_active (gconstpointer a,
gconstpointer b)
{
const ReadyCallback *callback_a;
callback_a = a;
/* Non active callbacks never match */
if (!callback_a->active)
{
return -1;
}
return ready_callback_key_compare (a,... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 11,171,190,533,432,722,000,000,000,000,000,000,000 | 15 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
static void aacdec_init(AACContext *c)
{
c->imdct_and_windowing = imdct_and_windowing;
c->apply_ltp = apply_ltp;
c->apply_tns = apply_tns;
c->windowing_and_mdct_ltp = windowing_and_mdct_ltp;
c->updat... | 0 | [
"CWE-703"
] | FFmpeg | 6e42ccb9dbc13836cd52cda594f819d17af9afa2 | 62,311,312,980,779,480,000,000,000,000,000,000,000 | 11 | avcodec/aacdec: Fix pulse position checks in decode_pulses()
Fixes out of array read
Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
int ioat2_dma_probe(struct ioatdma_device *device, int dca)
{
struct pci_dev *pdev = device->pdev;
struct dma_device *dma;
struct dma_chan *c;
struct ioat_chan_common *chan;
int err;
device->enumerate_channels = ioat2_enumerate_channels;
device->reset_hw = ioat2_reset_hw;
device->cleanup_fn = ioat2_cleanup_eve... | 1 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 272,537,608,786,770,780,000,000,000,000,000,000,000 | 42 | 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... |
static const SIGALG_LOOKUP *find_sig_alg(SSL *s, X509 *x, EVP_PKEY *pkey)
{
const SIGALG_LOOKUP *lu = NULL;
size_t i;
#ifndef OPENSSL_NO_EC
int curve = -1;
#endif
EVP_PKEY *tmppkey;
/* Look for a shared sigalgs matching possible certificates */
for (i = 0; i < s->shared_sigalgslen; i++) {
... | 0 | [
"CWE-476"
] | openssl | a87f3fe01a5a894aa27ccd6a239155fd129988e4 | 34,751,160,818,388,473,000,000,000,000,000,000,000 | 51 | Fix NULL dereference in SSL_check_chain() for TLS 1.3
In the tls1_check_sig_alg() helper function, we loop through the list of
"signature_algorithms_cert" values received from the client and attempt
to look up each one in turn in our internal table that maps wire
codepoint to string-form name, digest and/or signature ... |
rsvg_title_handler_end (RsvgSaxHandler * self, const char *name)
{
RsvgSaxHandlerTitle *z = (RsvgSaxHandlerTitle *) self;
RsvgHandle *ctx = z->ctx;
if (!strcmp (name, "title")) {
if (ctx->priv->handler != NULL) {
ctx->priv->handler->free (ctx->priv->handler);
ctx->priv->hand... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 58,320,391,012,744,480,000,000,000,000,000,000,000 | 12 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
ZSTD_encodeSequences_default(
void* dst, size_t dstCapacity,
FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable,
FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable,
FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable,
seqDef const*... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 247,463,898,072,839,200,000,000,000,000,000,000,000 | 13 | fixed T36302429 |
gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
struct iri *iri)
{
struct request *req;
char *type;
char *user, *passwd;
char *proxyauth;
int statcode;
int write_error;
wgint contlen, contrange;
struct url *conn;
FILE *fp;
int sock = -1;
int flags;
/* Set to... | 0 | [
"CWE-20"
] | wget | 3e25a9817f47fbb8660cc6a3b2f3eea239526c6c | 12,272,070,749,820,064,000,000,000,000,000,000,000 | 1,064 | Introduce --trust-server-names. Close CVE-2010-2252. |
__be32 ipv6_select_ident(struct net *net,
const struct in6_addr *daddr,
const struct in6_addr *saddr)
{
u32 id;
id = __ipv6_select_ident(net, daddr, saddr);
return htonl(id);
} | 0 | [
"CWE-327"
] | linux | 62f20e068ccc50d6ab66fdb72ba90da2b9418c99 | 67,778,131,189,189,410,000,000,000,000,000,000,000 | 9 | ipv6: use prandom_u32() for ID generation
This is a complement to commit aa6dd211e4b1 ("inet: use bigger hash
table for IP ID generation"), but focusing on some specific aspects
of IPv6.
Contary to IPv4, IPv6 only uses packet IDs with fragments, and with a
minimum MTU of 1280, it's much less easy to force a remote pe... |
cbq_reset(struct Qdisc* sch)
{
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *cl;
int prio;
unsigned h;
q->activemask = 0;
q->pmask = 0;
q->tx_class = NULL;
q->tx_borrowed = NULL;
del_timer(&q->wd_timer);
del_timer(&q->delay_timer);
q->toplevel = TC_CBQ_MAXLEVEL;
PSCHED_GET_TIME(q->now);
q-... | 0 | [
"CWE-200"
] | linux-2.6 | 8a47077a0b5aa2649751c46e7a27884e6686ccbf | 226,401,598,459,034,000,000,000,000,000,000,000,000 | 33 | [NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
u8 mwifiex_wmm_downgrade_tid(struct mwifiex_private *priv, u32 tid)
{
enum mwifiex_wmm_ac_e ac, ac_down;
u8 new_tid;
ac = mwifiex_wmm_convert_tos_to_ac(priv->adapter, tid);
ac_down = priv->wmm.ac_down_graded_vals[ac];
/* Send the index to tid array, picking from the array will be
* taken care by dequeuing func... | 0 | [
"CWE-787"
] | linux | 3a9b153c5591548612c3955c9600a98150c81875 | 312,975,774,894,539,430,000,000,000,000,000,000,000 | 15 | mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status()
mwifiex_ret_wmm_get_status() calls memcpy() without checking the
destination size.Since the source is given from remote AP which
contains illegal wmm elements , this may trigger a heap buffer
overflow.
Fix it by putting the length check before call... |
R_API DsoJsonObj *r_bin_java_get_field_json_definitions(RBinJavaObj *bin) {
RBinJavaField *fm_type = NULL;
RListIter *iter = NULL;
DsoJsonObj *json_list = dso_json_list_new ();
if (!bin) {
return json_list;
}
r_list_foreach (bin->fields_list, iter, fm_type) {
DsoJsonObj *field_proto = r_bin_java_get_field_jso... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 56,122,769,507,804,200,000,000,000,000,000,000,000 | 14 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static MagickBooleanType GetEXIFProperty(const Image *image,
const char *property,ExceptionInfo *exception)
{
#define MaxDirectoryStack 16
#define EXIF_DELIMITER "\n"
#define EXIF_NUM_FORMATS 12
#define EXIF_FMT_BYTE 1
#define EXIF_FMT_STRING 2
#define EXIF_FMT_USHORT 3
#define EXIF_FMT_ULONG 4
#define EXIF_FM... | 0 | [
"CWE-190",
"CWE-125"
] | ImageMagick | d8ab7f046587f2e9f734b687ba7e6e10147c294b | 170,922,128,188,994,920,000,000,000,000,000,000,000 | 814 | Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed) |
void Http1ServerConnectionImplTest::expectHeadersTest(Protocol p, bool allow_absolute_url,
Buffer::OwnedImpl& buffer,
TestRequestHeaderMapImpl& expected_headers) {
InSequence sequence;
// Make a new 'codec' ... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 166,764,120,269,513,930,000,000,000,000,000,000,000 | 22 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
static int nf_tables_getobj(struct sk_buff *skb, const struct nfnl_info *info,
const struct nlattr * const nla[])
{
struct netlink_ext_ack *extack = info->extack;
u8 genmask = nft_genmask_cur(info->net);
u8 family = info->nfmsg->nfgen_family;
const struct nft_table *table;
struct net *net = info->net;
stru... | 0 | [] | net | 520778042ccca019f3ffa136dd0ca565c486cedd | 232,483,581,732,989,800,000,000,000,000,000,000,000 | 77 | netfilter: nf_tables: disallow non-stateful expression in sets earlier
Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression
instantiation"), it is possible to attach stateful expressions to set
elements.
cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate
and destroy phase") in... |
static int bnx2x_afex_func_update(struct bnx2x *bp, u16 vifid,
u16 vlan_val, u8 allowed_prio)
{
struct bnx2x_func_state_params func_params = {NULL};
struct bnx2x_func_afex_update_params *f_update_params =
&func_params.params.afex_update;
func_params.f_obj = &bp->func_obj;
func_params.cmd = BNX2X_F_CMD_AFEX... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 158,735,330,955,433,880,000,000,000,000,000,000,000 | 24 | 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... |
GF_Err ainf_box_read(GF_Box *s,GF_BitStream *bs)
{
GF_AssetInformationBox *ptr = (GF_AssetInformationBox *) s;
ISOM_DECREASE_SIZE(s, 4)
ptr->profile_version = gf_bs_read_u32(bs);
return gf_isom_read_null_terminated_string(s, bs, s->size, &ptr->APID); | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 22,018,312,529,038,944,000,000,000,000,000,000,000 | 8 | fixed #1587 |
static void usbredir_log_data(USBRedirDevice *dev, const char *desc,
const uint8_t *data, int len)
{
if (dev->debug < usbredirparser_debug_data) {
return;
}
qemu_hexdump(stderr, desc, data, len);
} | 0 | [
"CWE-770"
] | qemu | 7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986 | 319,566,611,773,962,400,000,000,000,000,000,000,000 | 8 | usb/redir: avoid dynamic stack allocation (CVE-2021-3527)
Use autofree heap allocation instead.
Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket")
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id:... |
static VariLenAffix invertAffix(const VariLenAffix *affix)
{
return (VariLenAffix) {
.type =
(affix->type == AffixType_Suffix) ?
AffixType_Prefix : AffixType_Suffix,
.value =
mirror64bit(affix->value) >>
((sizeof(affix->value) * 8) - affix->bits),
... | 0 | [
"CWE-362"
] | qemu | 89fbea8737e8f7b954745a1ffc4238d377055305 | 257,771,363,080,603,450,000,000,000,000,000,000,000 | 12 | 9pfs: Fully restart unreclaim loop (CVE-2021-20181)
Depending on the client activity, the server can be asked to open a huge
number of file descriptors and eventually hit RLIMIT_NOFILE. This is
currently mitigated using a reclaim logic : the server closes the file
descriptors of idle fids, based on the assumption that... |
void pointZZ_pDouble(PointZZ_p * rop, const PointZZ_p * op, const CurveZZ_p * curve) {
mpz_t numer, denom, lambda;
mpz_inits(numer, denom, lambda, NULL);
// calculate lambda
mpz_mul(numer, op->x, op->x);
mpz_mul_ui(numer, numer, 3);
mpz_add(numer, numer, curve->a);
mpz_mul_ui(denom, op->y, ... | 1 | [
"CWE-347"
] | fastecdsa | e592f106edd5acf6dacedfab2ad16fe6c735c9d1 | 88,363,973,691,020,970,000,000,000,000,000,000,000 | 27 | Properly handle the point at infinity |
static int have_client_limits(cmd_rec *cmd) {
if (find_config(TOPLEVEL_CONF, CONF_PARAM, "MaxClientsPerClass", FALSE) != NULL) {
return TRUE;
}
if (find_config(TOPLEVEL_CONF, CONF_PARAM, "MaxClientsPerHost", FALSE) != NULL) {
return TRUE;
}
if (find_config(TOPLEVEL_CONF, CONF_PARAM, "MaxClientsPerUs... | 0 | [
"CWE-59",
"CWE-61"
] | proftpd | ecff21e0d0e84f35c299ef91d7fda088e516d4ed | 314,306,237,720,175,850,000,000,000,000,000,000,000 | 23 | Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks
is off, to 1.3.5 branch. |
static void qeth_configure_blkt_default(struct qeth_card *card, char *prcd)
{
QETH_DBF_TEXT(SETUP, 2, "cfgblkt");
if (prcd[74] == 0xF0 && prcd[75] == 0xF0 &&
prcd[76] >= 0xF1 && prcd[76] <= 0xF4) {
card->info.blkt.time_total = 0;
card->info.blkt.inter_packet = 0;
card->info.blkt.inter_packet_jumbo = 0;
}... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 7,600,626,275,942,356,000,000,000,000,000,000,000 | 15 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
inline void gesvd(char &JOB, int &M, int &N, float *lapA, int &MN,
float *lapS, float *lapU, float *lapV, float *WORK, int &LWORK, int &INFO) {
sgesvd_(&JOB,&JOB,&M,&N,lapA,&MN,lapS,lapU,&M,lapV,&N,WORK,&LWORK,&INFO); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 3,246,658,552,009,648,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
keyeq(KEY s1, KEY s2)
{
for (; *s1 == *s2; s1++, s2++)
if (*s1 == 0)
return XML_TRUE;
return XML_FALSE;
} | 0 | [
"CWE-119"
] | libexpat | ba0f9c3b40c264b8dd392e02a7a060a8fa54f032 | 314,372,253,425,390,900,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/ |
static inline rsRetVal tdlAdd(qqueue_t *pQueue, qDeqID deqID, int nElemDeq)
{
toDeleteLst_t *pNew;
toDeleteLst_t *pPrev;
DEFiRet;
ISOBJ_TYPE_assert(pQueue, qqueue);
assert(pQueue->toDeleteLst != NULL);
CHKmalloc(pNew = MALLOC(sizeof(toDeleteLst_t)));
pNew->deqID = deqID;
pNew->nElemDeq = nElemDeq;
/* now fi... | 0 | [
"CWE-772"
] | rsyslog | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 | 118,562,929,632,115,530,000,000,000,000,000,000,000 | 31 | bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225 |
const ZTracer::Endpoint* get_trace_endpoint() const {
return &trace_endpoint;
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 255,086,786,212,049,450,000,000,000,000,000,000,000 | 3 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
GF_Err vmhd_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_VideoMediaHeaderBox *ptr = (GF_VideoMediaHeaderBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u64(bs, ptr->reserved);
return GF_OK; | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 262,254,483,748,960,650,000,000,000,000,000,000,000 | 10 | prevent dref memleak on invalid input (#1183) |
static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
{
struct InStruct *in=(struct InStruct *)userp;
(void)handle; /* not used in here */
switch(cmd) {
case CURLIOCMD_RESTARTREAD:
/* mr libcurl kindly asks as to rewind the read data stream to start */
if(-1 == fseek(in->stream, 0, SEEK_S... | 0 | [
"CWE-125"
] | curl | 70b1900dd13d16f2e83f571407a614541d5ac9ba | 112,294,484,104,981,260,000,000,000,000,000,000,000 | 20 | 'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194)
pointed out that the warnf() function in the curl tool didn't properly deal
with the cases when excessively long words were used in the string to chop
up. |
static pte_t make_huge_pte(struct vm_area_struct *vma, struct page *page,
int writable)
{
pte_t entry;
if (writable) {
entry =
pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
} else {
entry = huge_pte_wrprotect(mk_pte(page, vma->vm_page_prot));
}
entry = pte_mkyoung(entry);
entry = pte_m... | 0 | [
"CWE-399"
] | linux | 90481622d75715bfcb68501280a917dbfe516029 | 264,880,898,572,009,960,000,000,000,000,000,000,000 | 16 | hugepages: fix use after free bug in "quota" handling
hugetlbfs_{get,put}_quota() are badly named. They don't interact with the
general quota handling code, and they don't much resemble its behaviour.
Rather than being about maintaining limits on on-disk block usage by
particular users, they are instead about maintai... |
static u16 map_class(u16 pol_value)
{
u16 i;
for (i = 1; i < current_mapping_size; i++) {
if (current_mapping[i].value == pol_value)
return i;
}
return SECCLASS_NULL;
} | 0 | [
"CWE-20"
] | linux | 2172fa709ab32ca60e86179dc67d0857be8e2c98 | 291,180,278,818,638,270,000,000,000,000,000,000,000 | 11 | SELinux: Fix kernel BUG on empty security contexts.
Setting an empty security context (length=0) on a file will
lead to incorrectly dereferencing the type and other fields
of the security context structure, yielding a kernel BUG.
As a zero-length security context is never valid, just reject
all such security contexts... |
static int tw5864_disable_input(struct tw5864_input *input)
{
struct tw5864_dev *dev = input->root;
unsigned long flags;
dev_dbg(&dev->pci->dev, "Disabling channel %d\n", input->nr);
spin_lock_irqsave(&dev->slock, flags);
input->enabled = 0;
spin_unlock_irqrestore(&dev->slock, flags);
return 0;
} | 0 | [
"CWE-476"
] | linux | 2e7682ebfc750177a4944eeb56e97a3f05734528 | 286,169,266,028,215,460,000,000,000,000,000,000,000 | 12 | media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame
'vb' null check should be done before dereferencing it in
tw5864_handle_frame, otherwise a NULL pointer dereference
may occur.
Fixes: 34d1324edd31 ("[media] pci: Add tw5864 driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-of... |
SRC_ReloadSources(void)
{
FILE *in;
int i;
for (i = 0; i < n_sources; i++) {
in = open_dumpfile(sources[i], 'r');
if (!in)
continue;
if (!SST_LoadFromFile(sources[i]->stats, in))
LOG(LOGS_WARN, "Could not load dump file for %s",
source_to_string(sources[i]));
else
LOG(... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 73,599,685,586,657,240,000,000,000,000,000,000,000 | 18 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
void blosc2_free_ctx(blosc2_context* context) {
release_threadpool(context);
if (context->serial_context != NULL) {
free_thread_context(context->serial_context);
}
if (context->dict_cdict != NULL) {
#ifdef HAVE_ZSTD
ZSTD_freeCDict(context->dict_cdict);
#endif
}
if (context->dict_ddict != NULL) {
#if... | 0 | [
"CWE-787"
] | c-blosc2 | c4c6470e88210afc95262c8b9fcc27e30ca043ee | 333,309,987,100,730,680,000,000,000,000,000,000,000 | 28 | Fixed asan heap buffer overflow when not enough space to write compressed block size. |
static int selinux_sem_alloc_security(struct sem_array *sma)
{
struct ipc_security_struct *isec;
struct common_audit_data ad;
u32 sid = current_sid();
int rc;
rc = ipc_alloc_security(current, &sma->sem_perm, SECCLASS_SEM);
if (rc)
return rc;
isec = sma->sem_perm.security;
COMMON_AUDIT_DATA_INIT(&ad, IPC);
... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 5,912,126,170,397,853,000,000,000,000,000,000,000 | 24 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static inline void free_task_struct(struct task_struct *tsk)
{
kmem_cache_free(task_struct_cachep, tsk);
} | 0 | [
"CWE-416",
"CWE-703"
] | linux | 2b7e8665b4ff51c034c55df3cff76518d1a9ee3a | 240,269,885,863,574,600,000,000,000,000,000,000,000 | 4 | fork: fix incorrect fput of ->exe_file causing use-after-free
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new erro... |
static void put_trace_buf(void)
{
/* Don't let the decrement of nesting leak before this */
barrier();
this_cpu_dec(trace_percpu_buffer->nesting);
} | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 151,274,970,754,355,400,000,000,000,000,000,000,000 | 6 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
ContentEncoding::~ContentEncoding() {
ContentCompression** comp_i = compression_entries_;
ContentCompression** const comp_j = compression_entries_end_;
while (comp_i != comp_j) {
ContentCompression* const comp = *comp_i++;
delete comp;
}
delete[] compression_entries_;
ContentEncryption** enc_i = ... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 280,732,946,800,237,030,000,000,000,000,000,000,000 | 21 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
static unsigned decode_digit(int cp)
{
return (unsigned) (cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
cp - 97 < 26 ? cp - 97 : base);
} | 0 | [
"CWE-190"
] | libidn2 | 3284eb342cd0ed1a18786e3fcdf0cdd7e76676bd | 182,661,065,010,559,330,000,000,000,000,000,000,000 | 5 | lib/puny_decode: Fix integer overflow (found by fuzzing) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.