func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
make_next_duplicate_name (const char *base, const char *suffix, int count, int max_length)
{
const char *format;
char *result;
int unshortened_length;
gboolean use_count;
if (count < 1) {
g_warning ("bad count %d in get_duplicate_name", count);
count = 1;
}
if (count <= 2) {
/* Handle special cases for ... | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 198,128,258,951,379,900,000,000,000,000,000,000,000 | 101 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
keylen(KEY s) {
size_t len = 0;
for (; *s; s++, len++)
;
return len;
} | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 18,764,249,992,657,935,000,000,000,000,000,000,000 | 6 | xmlparse.c: Deny internal entities closing the doctype |
static int ssl_parse_certificate_request( mbedtls_ssl_context *ssl )
{
const mbedtls_ssl_ciphersuite_t *ciphersuite_info =
ssl->transform_negotiate->ciphersuite_info;
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse certificate request" ) );
if( ! mbedtls_ssl_ciphersuite_cert_req_allowed( ciphersuite_info ) ... | 0 | [
"CWE-119",
"CWE-125",
"CWE-295"
] | mbedtls | a1098f81c252b317ad34ea978aea2bc47760b215 | 271,326,953,444,857,250,000,000,000,000,000,000,000 | 17 | Add bounds check before signature length read |
inline void writeU32(U32 u) { check(4); *ptr++ = u >> 24; *ptr++ = u >> 16;
*ptr++ = u >> 8; *ptr++ = u; } | 0 | [
"CWE-20",
"CWE-787"
] | tigervnc | 0943c006c7d900dfc0281639e992791d6c567438 | 208,100,469,881,106,240,000,000,000,000,000,000,000 | 2 | Use size_t for lengths in stream objects
Provides safety against them accidentally becoming negative because
of bugs in the calculations.
Also does the same to CharArray and friends as they were strongly
connection to the stream objects. |
term_push_title(int which)
{
if ((which & SAVE_RESTORE_TITLE) && T_CST != NULL && *T_CST != NUL)
{
OUT_STR(T_CST);
out_flush();
}
if ((which & SAVE_RESTORE_ICON) && T_SSI != NULL && *T_SSI != NUL)
{
OUT_STR(T_SSI);
out_flush();
}
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 96,285,131,423,998,920,000,000,000,000,000,000,000 | 14 | 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. |
static int __init af_unix_init(void)
{
int rc = -1;
BUILD_BUG_ON(sizeof(struct unix_skb_parms) > sizeof_field(struct sk_buff, cb));
rc = proto_register(&unix_dgram_proto, 1);
if (rc != 0) {
pr_crit("%s: Cannot create unix_sock SLAB cache!\n", __func__);
goto out;
}
rc = proto_register(&unix_stream_proto, 1... | 0 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 94,807,772,656,173,380,000,000,000,000,000,000,000 | 29 | af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations
are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred.
In order to fix this issue, this patch adds a new spinlock that needs
to be used whenever these fields are read o... |
icpyalloc (char const *string)
{
return icatalloc (NULL, string);
} | 0 | [
"CWE-189"
] | grep | cbbc1a45b9f843c811905c97c90a5d31f8e6c189 | 103,126,812,877,578,720,000,000,000,000,000,000,000 | 4 | grep: fix some core dumps with long lines etc.
These problems mostly occur because the code attempts to stuff
sizes into int or into unsigned int; this doesn't work on most
64-bit hosts and the errors can lead to core dumps.
* NEWS: Document this.
* src/dfa.c (token): Typedef to ptrdiff_t, since the enum's
range could... |
void rgw::auth::s3::LDAPEngine::shutdown() {
if (ldh) {
delete ldh;
ldh = nullptr;
}
} | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 229,211,011,322,202,440,000,000,000,000,000,000,000 | 6 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
bool JOIN::add_having_as_table_cond(JOIN_TAB *tab)
{
tmp_having->update_used_tables();
table_map used_tables= tab->table->map | OUTER_REF_TABLE_BIT;
/* If tmp table is not used then consider conditions of const table also */
if (!need_tmp)
used_tables|= const_table_map;
DBUG_ENTER("JOIN::add_having_as_t... | 0 | [
"CWE-89"
] | server | 5ba77222e9fe7af8ff403816b5338b18b342053c | 83,885,342,175,433,515,000,000,000,000,000,000,000 | 61 | MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
if the view has algorithm=temptable it is not updatable,
so DEFAULT() for its fields is meaningless,
and thus it's NULL or 0/'' for NOT NULL columns. |
int EC_EX_DATA_set_data(EC_EXTRA_DATA **ex_data, void *data,
void *(*dup_func) (void *),
void (*free_func) (void *),
void (*clear_free_func) (void *))
{
EC_EXTRA_DATA *d;
if (ex_data == NULL)
return 0;
for (d = *ex_data; d != ... | 0 | [] | openssl | 21c856b75d81eff61aa63b4f036bb64a85bf6d46 | 303,054,240,579,172,500,000,000,000,000,000,000,000 | 36 | [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA
mitigations for ECC currently use it. So the library currently falls
back to very old SCA-vulnerable code if the cofactor is not present.
This PR allows EC_GROUP_set_generator to ... |
dissect_notify_options_flags(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep)
{
guint32 flags;
static const int * hf_flags[] = {
&hf_notify_options_flags_refresh,
NULL
};
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
proto_... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 189,872,232,470,288,330,000,000,000,000,000,000,000 | 16 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
struct fid *fid, int fh_len, int fh_type)
{
struct inode *inode;
struct dentry *dentry = NULL;
u64 inum = fid->raw[2];
inum = (inum << 32) | fid->raw[1];
if (fh_len < 3)
return NULL;
inode = ilookup5(sb, (unsigned long)(inum + fid->raw[0]),
... | 0 | [
"CWE-200"
] | linux-2.6 | e84e2e132c9c66d8498e7710d4ea532d1feaaac5 | 33,143,536,216,263,360,000,000,000,000,000,000,000 | 20 | tmpfs: restore missing clear_highpage
tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in
which shmem_getpage receives the page from its caller instead of allocating.
We must cover this case by clear_highpage before SetPageUptodate, as before.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Sig... |
CopyKeyNamesToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info)
{
struct xkb_key *keys;
xkb_keycode_t min_key_code, max_key_code, kc;
min_key_code = info->min_key_code;
max_key_code = info->max_key_code;
/* If the keymap has no keys, let's just use the safest pair we know. */
if (min_key_co... | 0 | [
"CWE-476"
] | libxkbcommon | badb428e63387140720f22486b3acbd3d738859f | 261,369,925,892,225,080,000,000,000,000,000,000,000 | 28 | keycodes: don't try to copy zero key aliases
Move the aliases copy to within the (num_key_aliases > 0) block.
Passing info->aliases into this fuction with invalid aliases will
cause log messages but num_key_aliases stays on 0. The key_aliases array
is never allocated and remains NULL. We then loop through the aliases... |
rb_str_subpat(VALUE str, VALUE re, VALUE backref)
{
if (rb_reg_search(re, str, 0, 0) >= 0) {
VALUE match = rb_backref_get();
int nth = rb_reg_backref_number(match, backref);
return rb_reg_nth_match(nth, match);
}
return Qnil;
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 45,977,378,530,633,530,000,000,000,000,000,000,000 | 9 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void ip_mc_reset(struct in_device *in_dev)
{
struct net *net = dev_net(in_dev->dev);
in_dev->mr_qi = IGMP_QUERY_INTERVAL;
in_dev->mr_qri = IGMP_QUERY_RESPONSE_INTERVAL;
in_dev->mr_qrv = net->ipv4.sysctl_igmp_qrv;
} | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 183,336,282,778,462,100,000,000,000,000,000,000,000 | 8 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
void ide_dma_cb(void *opaque, int ret)
{
IDEState *s = opaque;
int n;
int64_t sector_num;
bool stay_active = false;
if (ret < 0) {
int op = BM_STATUS_DMA_RETRY;
if (s->dma_cmd == IDE_DMA_READ)
op |= BM_STATUS_RETRY_READ;
else if (s->dma_cmd == IDE_DMA_TRIM)
... | 0 | [
"CWE-189"
] | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 | 202,782,015,609,115,430,000,000,000,000,000,000,000 | 86 | ide: Correct improper smart self test counter reset in ide core.
The SMART self test counter was incorrectly being reset to zero,
not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
* We would write off the beginning of a dynamically allocated buffer
* We forgot the SMART history
Fix this.
Signed-o... |
notify_fifo_script(vector_t *strvec, const char *type, notify_fifo_t *fifo)
{
char *id_str;
if (vector_size(strvec) < 2) {
report_config_error(CONFIG_GENERAL_ERROR, "No %snotify_fifo_script specified", type);
return;
}
if (fifo->script) {
report_config_error(CONFIG_GENERAL_ERROR, "%snotify_fifo_script alrea... | 0 | [
"CWE-200"
] | keepalived | c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067 | 271,286,100,786,369,700,000,000,000,000,000,000,000 | 21 | Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and also
allows the umask to be specified in the configuration or as a command
line option.
Signed-off-by: Quentin Armitage <quentin@armit... |
xfs_trans_log_inode(
xfs_trans_t *tp,
xfs_inode_t *ip,
uint flags)
{
ASSERT(ip->i_itemp != NULL);
ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
/*
* First time we log the inode in a transaction, bump the inode change
* counter if it is configured for this to occur. We don't use
* inode_inc_version() because ... | 1 | [
"CWE-19"
] | linux | fc0561cefc04e7803c0f6501ca4f310a502f65b8 | 132,440,116,786,332,260,000,000,000,000,000,000,000 | 34 | xfs: optimise away log forces on timestamp updates for fdatasync
xfs: timestamp updates cause excessive fdatasync log traffic
Sage Weil reported that a ceph test workload was writing to the
log on every fdatasync during an overwrite workload. Event tracing
showed that the only metadata modification being made was the... |
http_client_check_auth_data_free (gpointer data, GClosure *closure)
{
CheckAuthData *auth = data;
g_free (auth->password);
g_free (auth->username);
g_slice_free (CheckAuthData, auth);
} | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 167,026,566,406,725,960,000,000,000,000,000,000,000 | 8 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
ext4_fsblk_t ext4_count_free_clusters(struct super_block *sb)
{
ext4_fsblk_t desc_count;
struct ext4_group_desc *gdp;
ext4_group_t i;
ext4_group_t ngroups = ext4_get_groups_count(sb);
struct ext4_group_info *grp;
#ifdef EXT4FS_DEBUG
struct ext4_super_block *es;
ext4_fsblk_t bitmap_count;
unsigned int x;
struct... | 0 | [] | linux | 7dac4a1726a9c64a517d595c40e95e2d0d135f6f | 186,606,909,827,160,840,000,000,000,000,000,000,000 | 62 | ext4: add validity checks for bitmap block numbers
An privileged attacker can cause a crash by mounting a crafted ext4
image which triggers a out-of-bounds read in the function
ext4_valid_block_bitmap() in fs/ext4/balloc.c.
This issue has been assigned CVE-2018-1093.
BugLink: https://bugzilla.kernel.org/show_bug.cgi... |
main (int argc, char *argv[])
{
struct nbd_handle *nbd;
/* We will connect to a custom nbdkit sh plugin which always fails
* on reads (with a precise spelling required for older nbdkit), and
* which delays responding to writes until a witness file no longer
* exists.
*/
const char *cmd[] = { "nbdkit",... | 1 | [
"CWE-252"
] | libnbd | c79706af4e7475bf58861a143b77b77a54e7a1cd | 210,147,865,841,950,040,000,000,000,000,000,000,000 | 406 | api: Add new API nbd_set_pread_initialize()
The recent patch series for CVE-2022-0485 demonstrated that when
applications using libnbd are not careful about error checking, the
difference on whether a data leak is at least sanitized (all zeroes,
partial reads, or data leftover from a prior read) vs. a dangerous
inform... |
int32_t blocks_added() const { return blocks_added_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 332,861,755,048,354,940,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
flatpak_dir_get_remote_comment (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 g_key_file_get_string (config, group, "xa.comment", NULL);
return NULL;
} | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 193,049,006,335,803,680,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... |
_rl_block_sigint ()
{
if (sigint_blocked)
return;
sigint_blocked = 1;
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 12,650,622,881,380,795,000,000,000,000,000,000,000 | 7 | bash-4.4-rc2 release |
secrets_return_error (DBusGMethodInvocation *context, GError *error)
{
nm_warning ("Error getting secrets: %s", error->message);
dbus_g_method_return_error (context, error);
g_error_free (error);
} | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 250,491,084,060,761,060,000,000,000,000,000,000,000 | 6 | editor: prevent any registration of objects on the system bus
D-Bus access-control is name-based; so requests for a specific name
are allowed/denied based on the rules in /etc/dbus-1/system.d. But
apparently apps still get a non-named service on the bus, and if we
register *any* object even though we don't have a nam... |
MONGO_EXPORT void mongo_dispose(mongo* conn) {
bson_free(conn);
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 334,415,114,417,913,600,000,000,000,000,000,000,000 | 3 | don't mix up int and size_t (first pass to fix that) |
int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl)
{
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(X509_CRL), bp, crl);
} | 0 | [
"CWE-310"
] | openssl | 684400ce192dac51df3d3e92b61830a6ef90be3e | 261,480,152,647,927,400,000,000,000,000,000,000,000 | 4 | Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. t... |
static int sg_proc_seq_show_version(struct seq_file *s, void *v)
{
seq_printf(s, "%d\t%s [%s]\n", sg_version_num, SG_VERSION_STR,
sg_version_date);
return 0;
} | 0 | [
"CWE-190",
"CWE-189"
] | linux | fdc81f45e9f57858da6351836507fbcf1b7583ee | 156,928,526,729,182,700,000,000,000,000,000,000,000 | 6 | sg_start_req(): use import_iovec()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName)
{
if (parser == NULL)
return XML_STATUS_ERROR;
/* Block after XML_Parse()/XML_ParseBuffer() has been called.
XXX There's no way for the caller to determine which of the
XXX possible error cases caused the XML_STATUS_ERROR return.
*/
... | 0 | [
"CWE-611"
] | libexpat | c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f | 330,494,204,761,377,840,000,000,000,000,000,000,000 | 19 | xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233) |
void LibRaw::adjust_bl()
{
if (O.user_black >= 0)
C.black = O.user_black;
for(int i=0; i<4; i++)
if(O.user_cblack[i]>-1000000)
C.cblack[i] = O.user_cblack[i];
// remove common part from C.cblack[]
int i = C.cblack[3];
int c;
for(c=0;c<3;c++) if (i > C.cblack[c]) i = C.cblack[c];
for(c=0;c<4;c+... | 0 | [
"CWE-119",
"CWE-787"
] | LibRaw | 2f912f5b33582961b1cdbd9fd828589f8b78f21d | 339,088,527,680,732,160,000,000,000,000,000,000,000 | 17 | fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef |
static int dns_connect_namesaver(struct dns_nameserver *ns)
{
struct dgram_conn *dgram = ns->dgram;
int fd;
/* Already connected */
if (dgram->t.sock.fd != -1)
return 0;
/* Create an UDP socket and connect it on the nameserver's IP/Port */
if ((fd = socket(ns->addr.ss_family, SOCK_DGRAM, IPPROTO_UDP)) == -1) ... | 0 | [
"CWE-125"
] | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | 145,904,884,797,087,420,000,000,000,000,000,000,000 | 33 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly acce... |
static int peer_recv_tpkt_pdu(freerdp_peer* client, wStream* s)
{
rdpRdp* rdp;
UINT16 length;
UINT16 pduType;
UINT16 pduLength;
UINT16 pduSource;
UINT16 channelId;
UINT16 securityFlags;
rdp = client->context->rdp;
if (!rdp_read_header(rdp, s, &length, &channelId))
{
fprintf(stderr, "Incorrect RDP header.\... | 0 | [
"CWE-476",
"CWE-125"
] | FreeRDP | 0773bb9303d24473fe1185d85a424dfe159aff53 | 174,311,248,981,388,860,000,000,000,000,000,000,000 | 60 | nla: invalidate sec handle after creation
If sec pointer isn't invalidated after creation it is not possible
to check if the upper and lower pointers are valid.
This fixes a segfault in the server part if the client disconnects before
the authentication was finished. |
get_first_track_num_generic(void *p_user_data)
{
const generic_img_private_t *p_env = p_user_data;
if (!p_env->toc_init)
p_env->cdio->op.read_toc (p_user_data);
return p_env->toc_init ? p_env->i_first_track : CDIO_INVALID_TRACK;
} | 0 | [
"CWE-415"
] | libcdio | dec2f876c2d7162da213429bce1a7140cdbdd734 | 182,888,245,598,667,400,000,000,000,000,000,000,000 | 9 | Removed wrong line |
write_xauth (char *number, FILE *output)
{
Xauth *xa, local_xa;
char *filename;
FILE *f;
struct utsname unames;
if (uname (&unames))
{
g_warning ("uname failed");
return;
}
filename = XauFileName ();
f = fopen (filename, "rb");
if (f == NULL)
return;
while (TRUE)
{
... | 0 | [
"CWE-20"
] | flatpak | 902fb713990a8f968ea4350c7c2a27ff46f1a6c4 | 2,168,345,570,765,928,200,000,000,000,000,000,000 | 43 | Use seccomp to filter out TIOCSTI ioctl
This would otherwise let the sandbox add input to the controlling tty. |
void InstanceKlass::eager_initialize(Thread *thread) {
if (!EagerInitialization) return;
if (this->is_not_initialized()) {
// abort if the the class has a class initializer
if (this->class_initializer() != NULL) return;
// abort if it is java.lang.Object (initialization is handled in genesis)
Klas... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 242,893,991,884,548,920,000,000,000,000,000,000,000 | 18 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
void RSA_Public_Decoder::ReadHeaderOpenSSL()
{
byte b = source_.next(); // peek
source_.prev();
if (b != INTEGER) { // have OpenSSL public format
GetSequence();
b = source_.next();
if (b != OBJECT_IDENTIFIER) {
source_.SetError(OBJECT_ID_E);
return;
... | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 24,380,940,635,320,240,000,000,000,000,000,000,000 | 41 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static int selinux_ptrace_traceme(struct task_struct *parent)
{
return task_has_perm(parent, current, PROCESS__PTRACE);
} | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 190,639,163,518,784,900,000,000,000,000,000,000,000 | 4 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
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... | 1 | [
"CWE-190",
"CWE-125"
] | ImageMagick | d8ab7f046587f2e9f734b687ba7e6e10147c294b | 118,934,047,121,602,630,000,000,000,000,000,000,000 | 810 | Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed) |
int zmq::curve_server_t::decode (msg_t *msg_)
{
zmq_assert (state == connected);
if (msg_->size () < 33) {
// Temporary support for security debugging
puts ("CURVE I: invalid CURVE client, sent malformed command");
errno = EPROTO;
return -1;
}
const uint8_t *message = ... | 0 | [] | libzmq | 0900a489213d74feb86fc0b343308fe7884a2a3c | 65,585,043,372,195,040,000,000,000,000,000,000,000 | 68 | Problem: curve messages can be replayed
Solution: ensure message short nonces are strictly increasing and validate them |
void merge_hevc_config(GF_HEVCConfig *dst_cfg, GF_HEVCConfig *src_cfg, Bool force_insert)
{
GF_HEVCConfig *cfg = HEVC_DuplicateConfig(src_cfg);
//merge all xPS
u32 i, j, count = cfg->param_array ? gf_list_count(cfg->param_array) : 0;
for (i=0; i<count; i++) {
GF_HEVCParamArray *ar_h = NULL;
u32 count2 = dst_cfg... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 35,726,704,331,174,290,000,000,000,000,000,000,000 | 49 | fix some exploitable overflows (#994, #997) |
void __init mnt_init(void)
{
unsigned u;
int err;
mnt_cache = kmem_cache_create("mnt_cache", sizeof(struct mount),
0, SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
mount_hashtable = alloc_large_system_hash("Mount-cache",
sizeof(struct hlist_head),
mhash_entries, 19,
0,
&m_hash_shift, &m_hash_mask, 0,... | 0 | [
"CWE-269"
] | user-namespace | a6138db815df5ee542d848318e5dae681590fccd | 321,244,699,731,837,940,000,000,000,000,000,000,000 | 39 | mnt: Only change user settable mount flags in remount
Kenton Varda <kenton@sandstorm.io> discovered that by remounting a
read-only bind mount read-only in a user namespace the
MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user
to the remount a read-only mount read-write.
Correct this by replacing t... |
static inline void timer_stats_timer_clear_start_info(struct timer_list *timer)
{
} | 1 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 217,949,733,122,059,550,000,000,000,000,000,000,000 | 3 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
void Compute(OpKernelContext* ctx) override {
const auto splits = ctx->input(0).flat<int64>();
const auto values = ctx->input(1).flat<Tidx>();
const Tensor& size_t = ctx->input(2);
const auto weights = ctx->input(3).flat<T>();
const int64 weights_size = weights.size();
Tidx size = size_t.scal... | 0 | [
"CWE-703",
"CWE-787"
] | tensorflow | eebb96c2830d48597d055d247c0e9aebaea94cd5 | 127,889,019,311,252,330,000,000,000,000,000,000,000 | 49 | Fix an invalid address vulnerability in `tf.raw_ops.RaggedBincount`.
PiperOrigin-RevId: 368293153
Change-Id: I4b4e493d3fd05e7dc55a55de3a041a80a4f275c3 |
STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
STACK_OF(SSL_CIPHER) **skp)
{
const SSL_CIPHER *c;
STACK_OF(SSL_CIPHER) *sk;
int i,n;
if (s->s3)
s->s3->send_connection_binding = 0;
n=ssl_put_cipher_by_char(s,NULL,NULL);
if (n == 0 || (num%n) != 0)
{
SSLerr(SSL_... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 7,049,608,518,587,604,000,000,000,000,000,000,000 | 93 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
do_unmount (UnmountData *data)
{
if (data->eject) {
g_mount_eject (data->mount,
0, NULL,
unmount_mount_callback,
data);
} else {
g_mount_unmount (data->mount,
0, NULL,
unmount_mount_callback,
data);
}
} | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 217,433,134,233,001,960,000,000,000,000,000,000,000 | 14 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
au_cleanup(void)
{
AutoPat *ap, **prev_ap;
AutoCmd *ac, **prev_ac;
event_T event;
if (autocmd_busy || !au_need_clean)
return;
// loop over all events
for (event = (event_T)0; (int)event < NUM_EVENTS;
event = (event_T)((int)event + 1))
{
// loop over all autocommand patterns
pre... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089 | 106,139,189,063,436,380,000,000,000,000,000,000,000 | 66 | patch 9.0.0061: ml_get error with nested autocommand
Problem: ml_get error with nested autocommand.
Solution: Also check line numbers for a nested autocommand. (closes #10761) |
reseq_anchor(Buffer *buf)
{
int i, j, n, nmark = (buf->hmarklist) ? buf->hmarklist->nmark : 0;
short *seqmap;
Anchor *a, *a1;
HmarkerList *ml = NULL;
if (!buf->href)
return;
n = nmark;
for (i = 0; i < buf->href->nanchor; i++) {
a = &buf->href->anchors[i];
if (a->hseq == -2)
n++;
... | 0 | [
"CWE-119"
] | w3m | 4e464819dd360ffd3d58fa2a89216fe413cfcc74 | 48,791,252,274,221,860,000,000,000,000,000,000,000 | 53 | Prevent segfault due to buffer overflows in addMultirowsForm
Bug-Debian: https://github.com/tats/w3m/issues/21
Bug-Debian: https://github.com/tats/w3m/issues/26 |
is_write_comp_null (gnutls_session_t session)
{
record_parameters_st *record_params;
_gnutls_epoch_get (session, EPOCH_WRITE_CURRENT, &record_params);
if (record_params->compression_algorithm == GNUTLS_COMP_NULL)
return 0;
return 1;
} | 0 | [
"CWE-310"
] | gnutls | 422214868061370aeeb0ac9cd0f021a5c350a57d | 80,827,668,568,058,800,000,000,000,000,000,000,000 | 10 | better check decrypted data. |
void on_rememberBtn_clicked() {
Preferences::instance()->setDeleteTorrentFilesAsDefault(checkPermDelete->isChecked());
rememberBtn->setEnabled(false);
} | 0 | [
"CWE-20",
"CWE-79"
] | qBittorrent | 6ca3e4f094da0a0017cb2d483ec1db6176bb0b16 | 280,189,758,934,429,780,000,000,000,000,000,000,000 | 4 | Add Utils::String::toHtmlEscaped |
ELFOBJ* Elf_(r_bin_elf_new_buf)(RBuffer *buf, bool verbose) {
ELFOBJ *bin = R_NEW0 (ELFOBJ);
bin->kv = sdb_new0 ();
bin->b = r_buf_new ();
bin->size = (ut32)buf->length;
bin->verbose = verbose;
if (!r_buf_set_bytes (bin->b, buf->buf, buf->length)) {
return Elf_(r_bin_elf_free) (bin);
}
if (!elf_init (bin)) {
... | 0 | [
"CWE-125"
] | radare2 | c6d0076c924891ad9948a62d89d0bcdaf965f0cd | 53,218,988,165,637,030,000,000,000,000,000,000,000 | 14 | Fix #8731 - Crash in ELF parser with negative 32bit number |
int c_shquote_consume_char(char **outp,
size_t *n_outp,
const char **inp,
size_t *n_inp) {
return c_shquote_consume_str(outp, n_outp, inp, n_inp, 1);
} | 0 | [
"CWE-787"
] | c-shquote | 7fd15f8e272136955f7ffc37df29fbca9ddceca1 | 157,431,603,746,634,180,000,000,000,000,000,000,000 | 6 | strnspn: fix buffer overflow
Fix the strnspn and strncspn functions to use a properly sized buffer.
It used to be 1 byte too short. Checking for `0xff` in a string will
thus write `0xff` once byte beyond the stack space of the local buffer.
Note that the public API does not allow to pass `0xff` to those
functions. Th... |
*/
static int __io_sqe_files_scm(struct io_ring_ctx *ctx, int nr, int offset)
{
struct sock *sk = ctx->ring_sock->sk;
struct scm_fp_list *fpl;
struct sk_buff *skb;
int i, nr_files;
fpl = kzalloc(sizeof(*fpl), GFP_KERNEL);
if (!fpl)
return -ENOMEM;
skb = alloc_skb(0, GFP_KERNEL);
if (!skb) {
kfree(fpl);
... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 189,510,027,226,014,160,000,000,000,000,000,000,000 | 48 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
CNF_GetMaxChange(int *delay, int *ignore, double *offset)
{
*delay = max_offset_delay;
*ignore = max_offset_ignore;
*offset = max_offset;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 5,870,191,600,787,673,000,000,000,000,000,000,000 | 6 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
set_session_maxage(cmd_parms * parms, void *dconf, const char *arg)
{
session_dir_conf *conf = dconf;
conf->maxage = atol(arg);
conf->maxage_set = 1;
return NULL;
} | 0 | [
"CWE-476"
] | httpd | 67bd9bfe6c38831e14fe7122f1d84391472498f8 | 41,485,512,754,615,500,000,000,000,000,000,000,000 | 9 | mod_session: save one apr_strtok() in session_identity_decode().
When the encoding is invalid (missing '='), no need to parse further.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887050 13f79535-47bb-0310-9956-ffa450edef68 |
TEST(EqOp, ElemMatchKey) {
BSONObj operand = BSON("a" << 5);
EqualityMatchExpression eq;
ASSERT(eq.init("a", operand["a"]).isOK());
MatchDetails details;
details.requestElemMatchKey();
ASSERT(!eq.matchesBSON(BSON("a" << 4), &details));
ASSERT(!details.hasElemMatchKey());
ASSERT(eq.matche... | 0 | [] | mongo | b0ef26c639112b50648a02d969298650fbd402a4 | 280,477,967,060,480,850,000,000,000,000,000,000,000 | 14 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
void imap_logout(struct ImapData **idata)
{
/* we set status here to let imap_handle_untagged know we _expect_ to
* receive a bye response (so it doesn't freak out and close the conn) */
(*idata)->status = IMAP_BYE;
imap_cmd_start(*idata, "LOGOUT");
if (ImapPollTimeout <= 0 || mutt_socket_poll((*idata)->conn... | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | 95e80bf9ff10f68cb6443f760b85df4117cb15eb | 91,916,831,492,808,200,000,000,000,000,000,000,000 | 15 | Quote path in imap_subscribe |
static void get_futex_key_refs(union futex_key *key)
{
if (!key->both.ptr)
return;
/*
* On MMU less systems futexes are always "private" as there is no per
* process address space. We need the smp wmb nevertheless - yes,
* arch/blackfin has MMU less SMP ...
*/
if (!IS_ENABLED(CONFIG_MMU)) {
smp_mb(); /*... | 0 | [
"CWE-416"
] | tip | 8019ad13ef7f64be44d4f892af9c840179009254 | 154,023,320,097,203,570,000,000,000,000,000,000,000 | 31 | futex: Fix inode life-time issue
As reported by Jann, ihold() does not in fact guarantee inode
persistence. And instead of making it so, replace the usage of inode
pointers with a per boot, machine wide, unique inode identifier.
This sequence number is global, but shared (file backed) futexes are
rare enough that thi... |
int iconvbufs(iconv_t ic, xbuf *in, xbuf *out, int flags)
{
ICONV_CONST char *ibuf;
size_t icnt, ocnt, opos;
char *obuf;
if (!out->size && flags & ICB_EXPAND_OUT) {
size_t siz = ROUND_UP_1024(in->len * 2);
alloc_xbuf(out, siz);
} else if (out->len+1 >= out->size) {
/* There is no room to even start storing ... | 0 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 27,436,208,892,451,654,000,000,000,000,000,000,000 | 102 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
static int netif_receive_skb_internal(struct sk_buff *skb)
{
int ret;
net_timestamp_check(netdev_tstamp_prequeue, skb);
if (skb_defer_rx_timestamp(skb))
return NET_RX_SUCCESS;
if (static_key_false(&generic_xdp_needed)) {
int ret;
preempt_disable();
rcu_read_lock();
ret = do_xdp_generic(rcu_dereferenc... | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 28,113,628,963,965,354,000,000,000,000,000,000,000 | 39 | 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... |
int32_t dmar_reserve_irte(const struct intr_source *intr_src, uint16_t num, uint16_t *start_id)
{
struct dmar_drhd_rt *dmar_unit;
union pci_bdf sid;
uint64_t mask = (1UL << num) - 1U;
int32_t ret = -EINVAL;
if (intr_src->is_msi) {
dmar_unit = device_to_dmaru((uint8_t)intr_src->src.msi.bits.b, intr_src->src.msi.... | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 230,543,647,036,484,950,000,000,000,000,000,000,000 | 26 | hv: validate input for dmar_free_irte function
Malicious input 'index' may trigger buffer
overflow on array 'irte_alloc_bitmap[]'.
This patch validate that 'index' shall be
less than 'CONFIG_MAX_IR_ENTRIES' and also
remove unnecessary check on 'index' in
'ptirq_free_irte()' function with this fix.
Tracked-On: ... |
static void frame_size_with_refs(GF_BitStream *bs, AV1State *state, Bool frame_size_override_flag)
{
Bool found_ref = GF_FALSE;
u32 i = 0;
for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
found_ref = gf_bs_read_int_log_idx(bs, 1, "found_ref", i);
if (found_ref == 1) {
#if 0
UpscaledWidth = RefUpscaledWidth[ref_fram... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 82,541,485,247,226,530,000,000,000,000,000,000,000 | 26 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
void sqlite3SelectDelete(sqlite3 *db, Select *p){
if( OK_IF_ALWAYS_TRUE(p) ) clearSelect(db, p, 1);
} | 0 | [
"CWE-20"
] | sqlite | e59c562b3f6894f84c715772c4b116d7b5c01348 | 204,423,012,976,590,050,000,000,000,000,000,000,000 | 3 | Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list.
FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba |
static inline void hrtimer_update_next_timer(struct hrtimer_cpu_base *cpu_base,
struct hrtimer *timer)
{
#ifdef CONFIG_HIGH_RES_TIMERS
cpu_base->next_timer = timer;
#endif
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 229,314,624,958,090,400,000,000,000,000,000,000,000 | 7 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
gst_rmdemux_parse_packet (GstRMDemux * rmdemux, GstBuffer * in, guint16 version)
{
guint16 id;
GstRMDemuxStream *stream;
gsize size, offset;
GstFlowReturn cret, ret;
GstClockTime timestamp;
gboolean key;
GstMapInfo map;
guint8 *data;
guint8 flags;
guint32 ts;
gst_buffer_map (in, &map, GST_MAP_REA... | 1 | [] | gst-plugins-ugly | 9726aaf78e6643a5955864f444852423de58de29 | 249,303,725,491,904,480,000,000,000,000,000,000,000 | 124 | rmdemux: Make sure we have enough data available when parsing audio/video packets
Otherwise there will be out-of-bounds reads and potential crashes.
Thanks to Natalie Silvanovich for reporting.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/37
Part-of: <https://gitlab.freedesktop.org/gstre... |
static inline int security_getprocattr(struct task_struct *p, char *name, char **value)
{
return -EINVAL;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 267,679,276,870,613,900,000,000,000,000,000,000,000 | 4 | 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 void mark_map_reg(struct bpf_reg_state *regs, u32 regno, u32 id,
enum bpf_reg_type type)
{
struct bpf_reg_state *reg = ®s[regno];
if (reg->type == PTR_TO_MAP_VALUE_OR_NULL && reg->id == id) {
if (type == UNKNOWN_VALUE) {
__mark_reg_unknown_value(regs, regno);
} else if (reg->map_ptr->inner_map_m... | 0 | [
"CWE-200"
] | linux | 0d0e57697f162da4aa218b5feafe614fb666db07 | 148,615,968,763,908,930,000,000,000,000,000,000,000 | 21 | bpf: don't let ldimm64 leak map addresses on unprivileged
The patch fixes two things at once:
1) It checks the env->allow_ptr_leaks and only prints the map address to
the log if we have the privileges to do so, otherwise it just dumps 0
as we would when kptr_restrict is enabled on %pK. Given the latter is
of... |
int mingw_execvp(const char *cmd, char *const *argv)
{
char *prog = path_lookup(cmd, 0);
if (prog) {
mingw_execv(prog, argv);
free(prog);
} else
errno = ENOENT;
return -1;
} | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 338,436,429,224,441,030,000,000,000,000,000,000,000 | 12 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
static unsigned long xfrm_hash_new_size(unsigned int state_hmask)
{
return ((state_hmask + 1) << 1) * sizeof(struct hlist_head);
} | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 45,747,256,070,268,520,000,000,000,000,000,000,000 | 4 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
static int __net_init xfrm6_tunnel_net_init(struct net *net)
{
struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net);
unsigned int i;
for (i = 0; i < XFRM6_TUNNEL_SPI_BYADDR_HSIZE; i++)
INIT_HLIST_HEAD(&xfrm6_tn->spi_byaddr[i]);
for (i = 0; i < XFRM6_TUNNEL_SPI_BYSPI_HSIZE; i++)
INIT_HLIST_HEAD(&xfrm6_t... | 0 | [] | linux-2.6 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | 70,865,111,193,893,570,000,000,000,000,000,000,000 | 13 | tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static inline void _kfree_skb_defer(struct sk_buff *skb)
{
struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
/* drop skb->head and call any destructors for packet */
skb_release_all(skb);
/* record skb to CPU local list */
nc->skb_cache[nc->skb_count++] = skb;
#ifdef CONFIG_SLUB
/* SLUB writes int... | 0 | [
"CWE-703",
"CWE-125"
] | linux | 8605330aac5a5785630aec8f64378a54891937cc | 29,551,045,108,962,580,000,000,000,000,000,000,000 | 22 | tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs
__sock_recv_timestamp can be called for both normal skbs (for
receive timestamps) and for skbs on the error queue (for transmit
timestamps).
Commit 1c885808e456
(tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING)
assumes any skb passed to __sock_recv_timest... |
ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location)
{
ssh_scp scp = NULL;
if (session == NULL) {
goto error;
}
scp = (ssh_scp)calloc(1, sizeof(struct ssh_scp_struct));
if (scp == NULL) {
ssh_set_error(session, SSH_FATAL,
"Error allocating ... | 0 | [] | libssh | 391c78de9d0f7baec3a44d86a76f4e1324eb9529 | 225,897,804,467,706,720,000,000,000,000,000,000,000 | 48 | CVE-2019-14889: scp: Don't allow file path longer than 32kb
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 0b5ee397260b6e08dffa2c1ce515a153aaeda765) |
RZ_API const char *rz_bin_dwarf_get_tag_name(ut64 tag) {
if (tag >= DW_TAG_LAST) {
return NULL;
}
return dwarf_tag_name_encodings[tag];
} | 0 | [
"CWE-787"
] | rizin | aa6917772d2f32e5a7daab25a46c72df0b5ea406 | 209,351,172,381,270,000,000,000,000,000,000,000,000 | 6 | Fix oob write for dwarf with abbrev with count 0 (Fix #2083) (#2086) |
follow_link(struct path *link, struct nameidata *nd, void **p)
{
struct dentry *dentry = link->dentry;
int error;
char *s;
BUG_ON(nd->flags & LOOKUP_RCU);
if (link->mnt == nd->path.mnt)
mntget(link->mnt);
error = -ELOOP;
if (unlikely(current->total_link_count >= 40))
goto out_put_nd_path;
cond_resched()... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 23adbe12ef7d3d4195e80800ab36b37bee28cd03 | 142,576,749,085,450,420,000,000,000,000,000,000,000 | 60 | fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces. For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.
This patch changes inode_capable to check for uid and gid mappings and
rena... |
xfrout_client_shutdown(void *arg, isc_result_t result) {
xfrout_ctx_t *xfr = (xfrout_ctx_t *) arg;
xfrout_fail(xfr, result, "aborted");
} | 0 | [
"CWE-732"
] | bind9 | 34348d9ee4db15307c6c42db294419b4df569f76 | 316,238,617,743,383,520,000,000,000,000,000,000,000 | 4 | denied axfr requests were not effective for writable DLZ zones
(cherry picked from commit d9077cd0038e59726e1956de18b4b7872038a283) |
static void cil_reset_devicetreecon(struct cil_devicetreecon *devicetreecon)
{
if (devicetreecon->context_str == NULL) {
cil_reset_context(devicetreecon->context);
}
} | 0 | [
"CWE-416"
] | selinux | f34d3d30c8325e4847a6b696fe7a3936a8a361f3 | 315,907,578,779,480,100,000,000,000,000,000,000,000 | 6 | libsepol/cil: Destroy classperms list when resetting classpermission
Nicolas Iooss reports:
A few months ago, OSS-Fuzz found a crash in the CIL compiler, which
got reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title
is misleading, or is caused by another issue that conflicts with... |
static double mp_image_w(_cimg_math_parser& mp) {
unsigned int ind = (unsigned int)mp.opcode[2];
if (ind!=~0U) ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listin.width());
const CImg<T> &img = ind==~0U?mp.imgout:mp.listout[ind];
return (double)img.width(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 222,010,677,080,236,150,000,000,000,000,000,000,000 | 6 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int PARSER_FLAGS(PyCompilerFlags *flags)
{
int parser_flags = 0;
if (!flags)
return 0;
if (flags->cf_flags & PyCF_DONT_IMPLY_DEDENT)
parser_flags |= PyPARSE_DONT_IMPLY_DEDENT;
if (flags->cf_flags & PyCF_IGNORE_COOKIE)
parser_flags |= PyPARSE_IGNORE_COOKIE;
if (flags->c... | 1 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 175,817,420,585,524,180,000,000,000,000,000,000,000 | 13 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
static unsigned long xen_get_debugreg(int reg)
{
return HYPERVISOR_get_debugreg(reg);
} | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 40,681,968,849,750,145,000,000,000,000,000,000,000 | 4 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
PHP_FUNCTION(enchant_broker_request_dict)
{
zval *broker;
enchant_broker *pbroker;
enchant_dict *dict;
EnchantDict *d;
char *tag;
int taglen;
int pos;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &broker, &tag, &taglen) == FAILURE) {
RETURN_FALSE;
}
PHP_ENCHANT_GET_BROKER;
if (taglen == 0... | 0 | [
"CWE-119"
] | php-src | bdfe457a2c1b47209e32783b3a6447e81baf179a | 290,261,600,071,308,600,000,000,000,000,000,000,000 | 49 | Port for for bug #68552 |
static inline int l2cap_config_rsp(struct l2cap_conn *conn,
struct l2cap_cmd_hdr *cmd, u16 cmd_len,
u8 *data)
{
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
u16 scid, flags, result;
struct l2cap_chan *chan;
int len = cmd_len - sizeof(*rsp);
int err = 0;
if (cmd_len < sizeof(*rsp))
... | 0 | [
"CWE-787"
] | linux | e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 | 128,457,994,289,064,120,000,000,000,000,000,000,000 | 111 | Bluetooth: Properly check L2CAP config option output buffer length
Validate the output buffer length for L2CAP config requests and responses
to avoid overflowing the stack buffer used for building the option blocks.
Cc: stable@vger.kernel.org
Signed-off-by: Ben Seri <ben@armis.com>
Signed-off-by: Marcel Holtmann <mar... |
spl_SplObjectStorageElement* spl_object_storage_get(spl_SplObjectStorage *intern, char *hash, int hash_len TSRMLS_DC) /* {{{ */
{
spl_SplObjectStorageElement *element;
if (zend_hash_find(&intern->storage, hash, hash_len, (void**)&element) == SUCCESS) {
return element;
} else {
return NULL;
}
} /* }}} */ | 0 | [] | php-src | a374dfab567ff7f0ab0dc150f14cc891b0340b47 | 234,267,578,872,518,140,000,000,000,000,000,000,000 | 9 | Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion |
static void pop_clear_cache(struct PopData *pop_data)
{
if (!pop_data->clear_cache)
return;
mutt_debug(1, "delete cached messages\n");
for (int i = 0; i < POP_CACHE_LEN; i++)
{
if (pop_data->cache[i].path)
{
unlink(pop_data->cache[i].path);
FREE(&pop_data->cache[i].path);
}
}
} | 0 | [
"CWE-241",
"CWE-824"
] | neomutt | 93b8ac558752d09e1c56d4f1bc82631316fa9c82 | 176,030,824,291,230,960,000,000,000,000,000,000,000 | 16 | Ensure UID in fetch_uidl |
void CWebServer::Cmd_UpdateMobileDevice(WebEmSession & session, const request& req, Json::Value &root)
{
if (session.rights != 2)
{
session.reply_status = reply::forbidden;
return; //Only admin user allowed
}
std::string sidx = request::findValue(&req, "idx");
std::string enabled = request::f... | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 318,533,425,861,245,830,000,000,000,000,000,000,000 | 25 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
rs_filter_graph(RSFilter *filter)
{
g_return_if_fail(RS_IS_FILTER(filter));
GString *str = g_string_new("digraph G {\n");
rs_filter_graph_helper(str, filter);
g_string_append_printf(str, "}\n");
g_file_set_contents("/tmp/rs-filter-graph", str->str, str->len, NULL);
if (0 != system("dot -Tpng >/tmp/rs-filter-gr... | 1 | [
"CWE-59"
] | rawstudio | 9c2cd3c93c05d009a91d84eedbb85873b0cb505d | 133,974,968,921,727,720,000,000,000,000,000,000,000 | 17 | Fixes insecure use of temporary file (CVE-2014-4978). |
void Item_func_nullif::split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
List<Item> &fields, uint flags)
{
if (m_cache)
{
flags|= SPLIT_SUM_SKIP_REGISTERED; // See Item_func::split_sum_func
m_cache->split_sum_func2_example(thd, ref_pointer_array, fields, flags);... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 239,011,554,606,612,850,000,000,000,000,000,000,000 | 14 | 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 ... |
static u32 psi_group_change(struct psi_group *group, int cpu,
unsigned int clear, unsigned int set)
{
struct psi_group_cpu *groupc;
unsigned int t, m;
enum psi_states s;
u32 state_mask = 0;
groupc = per_cpu_ptr(group->pcpu, cpu);
/*
* First we assess the aggregate resource states this CPU's
* tasks h... | 0 | [
"CWE-787"
] | linux | 6fcca0fa48118e6d63733eb4644c6cd880c15b8f | 189,390,178,582,859,130,000,000,000,000,000,000,000 | 50 | sched/psi: Fix OOB write when writing 0 bytes to PSI files
Issuing write() with count parameter set to 0 on any file under
/proc/pressure/ will cause an OOB write because of the access to
buf[buf_size-1] when NUL-termination is performed. Fix this by checking
for buf_size to be non-zero.
Signed-off-by: Suren Baghdasa... |
static char *cli_dfs_make_full_path(TALLOC_CTX *ctx,
struct cli_state *cli,
const char *dir)
{
char path_sep = '\\';
/* Ensure the extrapath doesn't start with a separator. */
while (IS_DIRECTORY_SEP(*dir)) {
dir++;
}
if (cli->requested_posix_capabilities & CIFS_UNIX_POSIX_PATHNAMES_CAP) {
path_sep... | 0 | [
"CWE-20"
] | samba | d724f835acb9f4886c0001af32cd325dbbf1f895 | 312,755,125,332,729,900,000,000,000,000,000,000,000 | 22 | CVE-2015-5296: s3:libsmb: force signing when requiring encryption in do_connect()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
initPageSetup (struct pagedef *page, struct pageseg *pagelist,
struct buffinfo seg_buffs[])
{
int i;
strcpy (page->name, "");
page->mode = PAGE_MODE_NONE;
page->res_unit = RESUNIT_NONE;
page->hres = 0.0;
page->vres = 0.0;
page->width = 0.0;
page->length = 0.0;
page->hmarg... | 0 | [
"CWE-125"
] | libtiff | 21d39de1002a5e69caa0574b2cc05d795d6fbfad | 279,647,025,439,857,160,000,000,000,000,000,000,000 | 35 | * tools/tiffcrop.c: fix multiple uint32 overflows in
writeBufferToSeparateStrips(), writeBufferToContigTiles() and
writeBufferToSeparateTiles() that could cause heap buffer overflows.
Reported by Henri Salo from Nixu Corporation.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 |
static __init int sctp_init(void)
{
int i;
int status = -EINVAL;
unsigned long goal;
unsigned long limit;
int max_share;
int order;
sock_skb_cb_check_size(sizeof(struct sctp_ulpevent));
/* Allocate bind_bucket and chunk caches. */
status = -ENOBUFS;
sctp_bucket_cachep = kmem_cache_create("sctp_bind_bucket",... | 1 | [
"CWE-119",
"CWE-787"
] | linux | 8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4 | 254,432,403,834,179,540,000,000,000,000,000,000,000 | 182 | sctp: fix race on protocol/netns initialization
Consider sctp module is unloaded and is being requested because an user
is creating a sctp socket.
During initialization, sctp will add the new protocol type and then
initialize pernet subsys:
status = sctp_v4_protosw_init();
if (status)
... |
void av_register_codec_parser(AVCodecParser *parser)
{
do {
parser->next = av_first_parser;
} while (parser->next != avpriv_atomic_ptr_cas((void * volatile *)&av_first_parser, parser->next, parser));
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | f31011e9abfb2ae75bb32bc44e2c34194c8dc40a | 35,105,363,449,638,974,000,000,000,000,000,000,000 | 6 | avcodec/parser: reset indexes on realloc failure
Fixes Ticket2982
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void hns_gmac_get_link_status(void *mac_drv, u32 *link_stat)
{
struct mac_driver *drv = (struct mac_driver *)mac_drv;
*link_stat = dsaf_get_dev_bit(drv, GMAC_AN_NEG_STATE_REG,
GMAC_AN_NEG_STAT_RX_SYNC_OK_B);
} | 0 | [
"CWE-119",
"CWE-703"
] | linux | 412b65d15a7f8a93794653968308fc100f2aa87c | 46,247,554,787,404,930,000,000,000,000,000,000,000 | 7 | net: hns: fix ethtool_get_strings overflow in hns driver
hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
is not enough for ethtool_get_strings(), which will cause random memory
corruption.
When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
the following can be observed ... |
static int decode_transquant_bypass_flag(thread_context* tctx)
{
logtrace(LogSlice,"# cu_transquant_bypass_enable_flag\n");
int value = decode_CABAC_bit(&tctx->cabac_decoder,
&tctx->ctx_model[CONTEXT_MODEL_CU_TRANSQUANT_BYPASS_FLAG]);
logtrace(LogSymbols,"$1 transquant_bypass_flag=%... | 0 | [] | libde265 | e83f3798dd904aa579425c53020c67e03735138d | 292,000,595,106,557,270,000,000,000,000,000,000,000 | 8 | fix check for valid PPS idx (#298) |
static CURLcode multi_reconnect_request(struct connectdata **connp)
{
CURLcode result = CURLE_OK;
struct connectdata *conn = *connp;
struct Curl_easy *data = conn->data;
/* This was a re-use of a connection and we got a write error in the
* DO-phase. Then we DISCONNECT this connection and have another attem... | 0 | [
"CWE-416"
] | curl | 75dc096e01ef1e21b6c57690d99371dedb2c0b80 | 70,852,289,438,817,220,000,000,000,000,000,000,000 | 53 | curl_multi_cleanup: clear connection pointer for easy handles
CVE-2016-5421
Bug: https://curl.haxx.se/docs/adv_20160803C.html
Reported-by: Marcelo Echeverria and Fernando Muñoz |
static int parseBN(BIGNUM **out, const char *in)
{
*out = NULL;
return BN_hex2bn(out, in);
} | 0 | [] | openssl | 336923c0c8d705cb8af5216b29a205662db0d590 | 259,343,725,775,129,400,000,000,000,000,000,000,000 | 5 | Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets
bn_sqr_comba8 does for instance compute a wrong result for the value:
a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45
The correct result is:
r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f
9... |
static inline MagickBooleanType IsPathWritable(const char *path)
{
if (IsPathAccessible(path) == MagickFalse)
return(MagickFalse);
if (access_utf8(path,W_OK) != 0)
return(MagickFalse);
return(MagickTrue);
} | 0 | [
"CWE-617"
] | ImageMagick | 12f34b60564de1cbec08e23e2413dab5b64daeb7 | 163,592,862,490,136,980,000,000,000,000,000,000,000 | 8 | https://github.com/ImageMagick/ImageMagick/issues/802 |
may_req_bg_color(void)
{
if (can_get_termresponse() && starting == 0)
{
int didit = FALSE;
# ifdef FEAT_TERMINAL
// Only request foreground if t_RF is set.
if (rfg_status.tr_progress == STATUS_GET && *T_RFG != NUL)
{
MAY_WANT_TO_LOG_THIS;
LOG_TR(("Sending FG request"));
out_str(T_RFG);
... | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 287,862,507,265,335,900,000,000,000,000,000,000,000 | 37 | 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. |
static void process_touch_command(conn *c, token_t *tokens, const size_t ntokens) {
char *key;
size_t nkey;
int32_t exptime_int = 0;
item *it;
assert(c != NULL);
set_noreply_maybe(c, tokens, ntokens);
if (tokens[KEY_TOKEN].length > KEY_MAX_LENGTH) {
out_string(c, "CLIENT_ERROR bad... | 0 | [
"CWE-190",
"CWE-667"
] | memcached | a8c4a82787b8b6c256d61bd5c42fb7f92d1bae00 | 60,800,824,535,728,745,000,000,000,000,000,000,000 | 41 | Don't overflow item refcount on get
Counts as a miss if the refcount is too high. ASCII multigets are the only
time refcounts can be held for so long.
doing a dirty read of refcount. is aligned.
trying to avoid adding an extra refcount branch for all calls of item_get due
to performance. might be able to move it in ... |
_copyCreateOpFamilyStmt(const CreateOpFamilyStmt *from)
{
CreateOpFamilyStmt *newnode = makeNode(CreateOpFamilyStmt);
COPY_NODE_FIELD(opfamilyname);
COPY_STRING_FIELD(amname);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 317,745,977,238,015,800,000,000,000,000,000,000,000 | 9 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static int __init io_uring_init(void)
{
#define __BUILD_BUG_VERIFY_ELEMENT(stype, eoffset, etype, ename) do { \
BUILD_BUG_ON(offsetof(stype, ename) != eoffset); \
BUILD_BUG_ON(sizeof(etype) != sizeof_field(stype, ename)); \
} while (0)
#define BUILD_BUG_SQE_ELEM(eoffset, etype, ename) \
__BUILD_BUG_VERIFY_ELEMENT(... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 302,176,134,130,548,320,000,000,000,000,000,000,000 | 70 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
char *__d_path(const struct path *path,
const struct path *root,
char *buf, int buflen)
{
char *res = buf + buflen;
int error;
prepend(&res, &buflen, "\0", 1);
error = prepend_path(path, root, &res, &buflen);
if (error < 0)
return ERR_PTR(error);
if (error > 0)
return NULL;
return res;
} | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 267,049,779,597,021,050,000,000,000,000,000,000,000 | 16 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.