func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
camel_imapx_server_get_message_sync (CamelIMAPXServer *is,
CamelIMAPXMailbox *mailbox,
CamelFolderSummary *summary,
CamelDataCache *message_cache,
const gchar *message_uid,
GCancellable *cancellable,
GError **error)
{
CamelMessageInfo *mi;
CamelStream *result_stre... | 0 | [] | evolution-data-server | f26a6f672096790d0bbd76903db4c9a2e44f116b | 294,188,492,091,281,400,000,000,000,000,000,000,000 | 164 | [IMAPx] 'STARTTLS not supported' error ignored
When a user has setup the STARTTLS encryption method, but the server doesn't
support it, then an error should be shown to the user, instead of using
unsecure connection. There had been two bugs in the existing code which
prevented this error from being used and the failur... |
BIGNUM *BN_dup(const BIGNUM *a)
{
BIGNUM *t;
if (a == NULL) return NULL;
bn_check_top(a);
t = BN_new();
if (t == NULL) return NULL;
if(!BN_copy(t, a))
{
BN_free(t);
return NULL;
}
bn_check_top(t);
return t;
} | 0 | [
"CWE-310"
] | openssl | f9b6c0ba4c02497782f801e3c45688f3efaac55c | 174,673,470,536,020,200,000,000,000,000,000,000,000 | 17 | Fix for CVE-2014-0076
Fix for the attack described in the paper "Recovering OpenSSL
ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack"
by Yuval Yarom and Naomi Benger. Details can be obtained from:
http://eprint.iacr.org/2014/140
Thanks to Yuval Yarom and Naomi Benger for discovering this
flaw and to Yuva... |
static int fuse_file_flock(struct file *file, int cmd, struct file_lock *fl)
{
struct inode *inode = file_inode(file);
struct fuse_conn *fc = get_fuse_conn(inode);
int err;
if (fc->no_flock) {
err = locks_lock_file_wait(file, fl);
} else {
struct fuse_file *ff = file->private_data;
/* emulate flock with PO... | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 271,620,671,962,347,160,000,000,000,000,000,000,000 | 18 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
OperatorUpd(Oid baseId, Oid commId, Oid negId, bool isDelete)
{
Relation pg_operator_desc;
HeapTuple tup;
/*
* If we're making an operator into its own commutator, then we need a
* command-counter increment here, since we've just inserted the tuple
* we're about to update. But when we're dropping an operator... | 0 | [
"CWE-94"
] | postgres | b9b21acc766db54d8c337d508d0fe2f5bf2daab0 | 41,935,224,623,768,825,000,000,000,000,000,000,000 | 109 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
CtPtr ProtocolV2::handle_hello(ceph::bufferlist &payload)
{
ldout(cct, 20) << __func__
<< " payload.length()=" << payload.length() << dendl;
if (state != HELLO_CONNECTING && state != HELLO_ACCEPTING) {
lderr(cct) << __func__ << " not in hello exchange state!" << dendl;
return _fault();
}
auto hello... | 0 | [
"CWE-323"
] | ceph | 20b7bb685c5ea74c651ca1ea547ac66b0fee7035 | 276,363,106,901,822,460,000,000,000,000,000,000,000 | 91 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... |
PHP_FE(tidy_get_head, arginfo_tidy_get_head)
PHP_FE(tidy_get_html, arginfo_tidy_get_html) | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 264,420,417,781,543,930,000,000,000,000,000,000,000 | 2 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static int can_open_cached(struct nfs4_state *state, fmode_t mode,
int open_mode, enum open_claim_type4 claim)
{
int ret = 0;
if (open_mode & (O_EXCL|O_TRUNC))
goto out;
switch (claim) {
case NFS4_OPEN_CLAIM_NULL:
case NFS4_OPEN_CLAIM_FH:
goto out;
default:
break;
}
switch (mode & (FMODE_READ|FMODE_WRI... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 246,990,328,818,459,500,000,000,000,000,000,000,000 | 30 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
Crypto& SSL::useCrypto()
{
return crypto_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 124,180,188,719,048,870,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static void do_one_tree(struct dentry *dentry)
{
shrink_dcache_parent(dentry);
d_walk(dentry, dentry, umount_check, NULL);
d_drop(dentry);
dput(dentry);
} | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 166,359,506,189,682,630,000,000,000,000,000,000,000 | 7 | 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... |
static ATCA_STATUS atcab_read_joinEUI( uint8_t* joinEUI )
{
ATCA_STATUS status = ATCA_GEN_FAIL;
uint8_t read_buf[ATCA_BLOCK_SIZE];
if( joinEUI == NULL )
{
return ATCA_BAD_PARAM;
}
do
{
status = atcab_read_zone( ATCA_ZONE_DATA, TNGLORA_JOIN_EUI_SLOT, 0, 0, read_buf, ATCA... | 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 32,098,428,551,630,790,000,000,000,000,000,000,000 | 22 | Added received buffer size checks. |
static void probe_profile(struct btd_profile *profile, void *data)
{
struct btd_adapter *adapter = data;
int err;
if (profile->adapter_probe == NULL)
return;
err = profile->adapter_probe(profile, adapter);
if (err < 0) {
btd_error(adapter->dev_id, "%s: %s (%d)", profile->name,
strerror(-err), -err);
... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 195,081,224,844,205,670,000,000,000,000,000,000,000 | 17 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
check_marks_read(void)
{
if (!curbuf->b_marks_read && get_viminfo_parameter('\'') > 0
&& curbuf->b_ffname != NULL)
read_viminfo(NULL, VIF_WANT_MARKS);
/* Always set b_marks_read; needed when 'viminfo' is changed to include
* the ' parameter after opening a buffer. */
curbuf->b_marks_read = TR... | 0 | [
"CWE-200",
"CWE-668"
] | vim | 5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8 | 111,409,696,882,741,400,000,000,000,000,000,000,000 | 10 | 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. |
void arch_disarm_kprobe(struct kprobe *p)
{
text_poke(p->addr, &p->opcode, 1);
} | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 304,336,539,623,047,170,000,000,000,000,000,000,000 | 4 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
void SSL_set_connect_state(SSL *s)
{
s->server=0;
s->shutdown=0;
s->state=SSL_ST_CONNECT|SSL_ST_BEFORE;
s->handshake_func=s->method->ssl_connect;
/* clear the current cipher */
ssl_clear_cipher_ctx(s);
} | 0 | [
"CWE-310"
] | openssl | c6a876473cbff0fd323c8abcaace98ee2d21863d | 300,339,345,232,023,900,000,000,000,000,000,000,000 | 9 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
rrset_msg(struct ub_packed_rrset_key* rrset, struct regional* region,
time_t now, struct query_info* q)
{
struct dns_msg* msg;
struct packed_rrset_data* d = (struct packed_rrset_data*)
rrset->entry.data;
if(now > d->ttl)
return NULL;
msg = gen_dns_msg(region, q, 1); /* only the CNAME (or other) RRset */
if(!... | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 19,620,418,452,888,833,000,000,000,000,000,000,000 | 28 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
struct file *interpreter, unsigned long *interp_map_addr,
unsigned long no_base, struct elf_phdr *interp_elf_phdata)
{
struct elf_phdr *eppnt;
unsigned long load_addr = 0;
int load_addr_set = 0;
unsigned long last_bss = 0, elf_bss = 0;
unsigned... | 0 | [
"CWE-362"
] | linux | 9f834ec18defc369d73ccf9e87a2790bfa05bf46 | 7,807,225,461,624,504,000,000,000,000,000,000,000 | 122 | binfmt_elf: switch to new creds when switching to new mm
We used to delay switching to the new credentials until after we had
mapped the executable (and possible elf interpreter). That was kind of
odd to begin with, since the new executable will actually then _run_
with the new creds, but whatever.
The bigger proble... |
int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics)
{
struct nlattr *mx;
int i, valid = 0;
mx = nla_nest_start(skb, RTA_METRICS);
if (mx == NULL)
return -ENOBUFS;
for (i = 0; i < RTAX_MAX; i++) {
if (metrics[i]) {
if (i == RTAX_CC_ALGO - 1) {
char tmp[TCP_CA_NAME_MAX], *name;
name = tcp_... | 0 | [
"CWE-200"
] | net | 5f8e44741f9f216e33736ea4ec65ca9ac03036e6 | 20,231,747,892,153,765,000,000,000,000,000,000,000 | 44 | net: fix infoleak in rtnetlink
The stack object “map” has a total size of 32 bytes. Its last 4
bytes are padding generated by compiler. These padding bytes are
not initialized and sent out via “nla_put”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net> |
grub_ext2_read_inode (struct grub_ext2_data *data,
int ino, struct grub_ext2_inode *inode)
{
struct grub_ext2_block_group blkgrp;
struct grub_ext2_sblock *sblock = &data->sblock;
int inodes_per_block;
unsigned int blkno;
unsigned int blkoff;
grub_disk_addr_t base;
/* It is easier to calculate if ... | 0 | [
"CWE-119"
] | grub | ac8cac1dac50daaf1c390d701cca3b55e16ee768 | 235,718,838,198,896,640,000,000,000,000,000,000,000 | 39 | * grub-core/fs/ext2.c: Remove variable length arrays. |
add_connection_cb (PolKitAction *action,
gboolean gained_privilege,
GError *error,
gpointer user_data)
{
ConnectionAddInfo *info = (ConnectionAddInfo *) user_data;
GtkWindow *parent = nm_connection_editor_get_window (info->editor);
gboolean done = TRUE;
if (gained_privilege) {
add_connection... | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 202,436,891,858,364,240,000,000,000,000,000,000,000 | 29 | 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... |
static int rawv6_send_hdrinc(struct sock *sk, void *from, int length,
struct flowi6 *fl6, struct dst_entry **dstp,
unsigned int flags)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6hdr *iph;
struct sk_buff *skb;
int err;
struct rt6_info *rt = (struct rt6_info *)*dstp;
int hlen = LL_RESERVED_SPACE(rt->d... | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 34,596,725,186,936,958,000,000,000,000,000,000,000 | 62 | inet: prevent leakage of uninitialized memory to user in recv syscalls
Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called wit... |
static int mm_account_pinned_pages(struct mmpin *mmp, size_t size)
{
unsigned long max_pg, num_pg, new_pg, old_pg;
struct user_struct *user;
if (capable(CAP_IPC_LOCK) || !size)
return 0;
num_pg = (size >> PAGE_SHIFT) + 2; /* worst case */
max_pg = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT;
user = mmp->user ? : cu... | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 138,752,841,324,869,400,000,000,000,000,000,000,000 | 29 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static void rose_idletimer_expiry(struct timer_list *t)
{
struct rose_sock *rose = from_timer(rose, t, idletimer);
struct sock *sk = &rose->sock;
bh_lock_sock(sk);
rose_clear_queues(sk);
rose_write_internal(sk, ROSE_CLEAR_REQUEST);
rose_sk(sk)->state = ROSE_STATE_2;
rose_start_t3timer(sk);
sk->sk_state ... | 0 | [
"CWE-416"
] | linux | 9cc02ede696272c5271a401e4f27c262359bc2f6 | 148,295,853,002,443,430,000,000,000,000,000,000,000 | 24 | net: rose: fix UAF bugs caused by timer handler
There are UAF bugs in rose_heartbeat_expiry(), rose_timer_expiry()
and rose_idletimer_expiry(). The root cause is that del_timer()
could not stop the timer handler that is running and the refcount
of sock is not managed properly.
One of the UAF bugs is shown below:
... |
QPDFObjectHandle::isArray()
{
dereference();
return QPDFObjectTypeAccessor<QPDF_Array>::check(m->obj.getPointer());
} | 0 | [
"CWE-399",
"CWE-674"
] | qpdf | b4d6cf6836ce025ba1811b7bbec52680c7204223 | 86,802,968,296,106,300,000,000,000,000,000,000,000 | 5 | Limit depth of nesting in direct objects (fixes #202)
This fixes CVE-2018-9918. |
static xmlChar *
xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) {
xmlChar buf[XML_MAX_NAMELEN + 5];
int len = 0, l;
int c;
/*
* Handler for more complex cases
*/
c = CUR_CHAR(l);
if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
(c == '[... | 0 | [] | libxml2 | 03c6723043775122313f107695066e5744189a08 | 31,335,328,131,055,710,000,000,000,000,000,000,000 | 70 | Handling of XPath function arguments in error case
The XPath engine tries to guarantee that every XPath function can pop
'nargs' non-NULL values off the stack. libxslt, for example, relies on
this assumption. But the check isn't thorough enough if there are errors
during the evaluation of arguments. This can lead to s... |
DefaultFile(int scheme)
{
switch (scheme) {
case SCM_HTTP:
#ifdef USE_SSL
case SCM_HTTPS:
#endif /* USE_SSL */
return allocStr(HTTP_DEFAULT_FILE, -1);
#ifdef USE_GOPHER
case SCM_GOPHER:
return allocStr("1", -1);
#endif /* USE_GOPHER */
case SCM_LOCAL:
case SCM_LOCAL_CGI:
case SCM_FTP... | 0 | [
"CWE-119"
] | w3m | ba9d78faeba9024c3e8840579c3b0e959ae2cb0f | 63,109,249,414,092,500,000,000,000,000,000,000,000 | 20 | Prevent global-buffer-overflow in parseURL()
Bug-Debian: https://github.com/tats/w3m/issues/41 |
static int dnxhd_decode_row(AVCodecContext *avctx, void *data,
int rownb, int threadnb)
{
const DNXHDContext *ctx = avctx->priv_data;
uint32_t offset = ctx->mb_scan_index[rownb];
RowContext *row = ctx->rows + threadnb;
int x, ret;
row->last_dc[0] =
row->last_dc[1] =
... | 0 | [
"CWE-125",
"CWE-252"
] | FFmpeg | 7150f9575671f898382c370acae35f9087a30ba1 | 321,503,687,420,055,400,000,000,000,000,000,000,000 | 26 | avcodec/dnxhddec: check and propagate function return value
Similar to CVE-2013-0868, here return value check for 'init_vlc' is needed.
crafted DNxHD data can cause unspecified impact.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com> |
long_format (struct cpio_file_stat *file_hdr, char *link_name)
{
char mbuf[11];
char tbuf[40];
time_t when;
mode_string (file_hdr->c_mode, mbuf);
mbuf[10] = '\0';
/* Get time values ready to print. */
when = file_hdr->c_mtime;
strcpy (tbuf, ctime (&when));
if (current_time - when > 6L * 30L * 24L *... | 0 | [] | cpio | 746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d | 193,411,189,990,079,200,000,000,000,000,000,000,000 | 47 | Fix memory overrun on reading improperly created link records.
See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
* src/copyin.c (get_link_name): New function.
(list_file, copyin_link): use get_link_name
* tests/symlink-bad-length.at: New file.
* tests/symlink-long.at: New file.
* tests/Makefile.am... |
static void _prb_refresh_rx_retire_blk_timer(struct tpacket_kbdq_core *pkc)
{
mod_timer(&pkc->retire_blk_timer,
jiffies + pkc->tov_in_jiffies);
pkc->last_kactive_blk_num = pkc->kactive_blk_num;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 138,300,062,901,642,800,000,000,000,000,000,000,000 | 6 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
int MACH0_(get_bits_from_hdr)(struct MACH0_(mach_header)* hdr) {
if (hdr->magic == MH_MAGIC_64 || hdr->magic == MH_CIGAM_64) {
return 64;
}
if ((hdr->cpusubtype & CPU_SUBTYPE_MASK) == (CPU_SUBTYPE_ARM_V7K << 24)) {
return 16;
}
return 32;
} | 0 | [
"CWE-415",
"CWE-125"
] | radare2 | 60208765887f5f008b3b9a883f3addc8bdb9c134 | 33,180,411,167,853,280,000,000,000,000,000,000,000 | 9 | Fix #9970 - heap oobread in mach0 parser (#10026) |
transcode_utf8(std::string const& utf8_val, std::string& result,
encoding_e encoding, char unknown)
{
bool okay = true;
result.clear();
if (encoding == e_utf16)
{
result += "\xfe\xff";
}
size_t len = utf8_val.length();
for (size_t i = 0; i < len; ++i)
{
boo... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 315,059,243,116,057,600,000,000,000,000,000,000,000 | 72 | 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 ... |
llhttp_t* llhttp_alloc(llhttp_type_t type) {
llhttp_t* parser = malloc(sizeof(llhttp_t));
llhttp_init(parser, type, &wasm_settings);
return parser;
} | 0 | [
"CWE-444"
] | node | af488f8dc82d69847992ea1cd2f53dc8082b3b91 | 237,442,065,686,208,600,000,000,000,000,000,000,000 | 5 | deps: update llhttp to 6.0.4
Refs: https://hackerone.com/reports/1238099
Refs: https://hackerone.com/reports/1238709
Refs: https://github.com/nodejs-private/llhttp-private/pull/6
Refs: https://github.com/nodejs-private/llhttp-private/pull/5
CVE-ID: CVE-2021-22959
CVE-ID: CVE-2021-22960
PR-URL: https://github.com/node... |
int sc_asn1_decode(sc_context_t *ctx, struct sc_asn1_entry *asn1,
const u8 *in, size_t len, const u8 **newp, size_t *len_left)
{
return asn1_decode(ctx, asn1, in, len, newp, len_left, 0, 0);
} | 0 | [
"CWE-119",
"CWE-787"
] | OpenSC | 412a6142c27a5973c61ba540e33cdc22d5608e68 | 115,876,649,646,874,940,000,000,000,000,000,000,000 | 5 | fixed out of bounds access of ASN.1 Bitstring
Credit to OSS-Fuzz |
block_autocmds(void)
{
# ifdef FEAT_EVAL
// Remember the value of v:termresponse.
if (autocmd_blocked == 0)
old_termresponse = get_vim_var_str(VV_TERMRESPONSE);
# endif
++autocmd_blocked;
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | 5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089 | 34,353,524,180,795,597,000,000,000,000,000,000,000 | 9 | 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) |
static bool check_buffer(RzBuffer *buff) {
if (rz_buf_size(buff) > 4) {
ut8 buf[LUAC_MAGIC_SIZE];
rz_buf_read_at(buff, LUAC_MAGIC_OFFSET, buf, LUAC_MAGIC_SIZE);
return !memcmp(buf, LUAC_MAGIC, LUAC_MAGIC_SIZE);
}
return false;
} | 0 | [
"CWE-200",
"CWE-787"
] | rizin | 05bbd147caccc60162d6fba9baaaf24befa281cd | 21,033,614,655,270,323,000,000,000,000,000,000,000 | 8 | Fix oob read on _luac_build_info and luac memleaks |
njs_function_prototype_create(njs_vm_t *vm, njs_object_prop_t *prop,
njs_value_t *value, njs_value_t *setval, njs_value_t *retval)
{
njs_value_t *proto, proto_value, *cons;
njs_object_t *prototype;
njs_function_t *function;
if (setval == NULL) {
prototype = njs_object_alloc(vm);
... | 0 | [
"CWE-416"
] | njs | 6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6 | 83,409,257,255,792,610,000,000,000,000,000,000,000 | 41 | Fixed recursive async function calls.
Previously, PromiseCapability record was stored (function->context)
directly in function object during a function invocation. This is
not correct, because PromiseCapability record should be linked to
current execution context. As a result, function->context is
overwritten with c... |
pkcs11rsa_todns(const dst_key_t *key, isc_buffer_t *data) {
pk11_object_t *rsa;
CK_ATTRIBUTE *attr;
isc_region_t r;
unsigned int e_bytes = 0, mod_bytes = 0;
CK_BYTE *exponent = NULL, *modulus = NULL;
REQUIRE(key->keydata.pkey != NULL);
rsa = key->keydata.pkey;
for (attr = pk11_attribute_first(rsa);
att... | 0 | [
"CWE-617"
] | bind9 | 8d807cc21655eaa6e6a08afafeec3682c0f3f2ab | 249,637,258,499,931,900,000,000,000,000,000,000,000 | 52 | Fix crash in pk11_numbits() when native-pkcs11 is used
When pk11_numbits() is passed a user provided input that contains all
zeroes (via crafted DNS message), it would crash with assertion
failure. Fix that by properly handling such input. |
g_file_trash (GFile *file,
GCancellable *cancellable,
GError **error)
{
GFileIface *iface;
g_return_val_if_fail (G_IS_FILE (file), FALSE);
if (g_cancellable_set_error_if_cancelled (cancellable, error))
return FALSE;
iface = G_FILE_GET_IFACE (file);
if (iface-... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 293,401,252,671,464,400,000,000,000,000,000,000,000 | 23 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
read_CE(struct archive_read *a, struct iso9660 *iso9660)
{
struct read_ce_queue *heap;
const unsigned char *b, *p, *end;
struct file_info *file;
size_t step;
int r;
/* Read data which RRIP "CE" extension points. */
heap = &(iso9660->read_ce_req);
step = iso9660->logical_block_size;
while (heap->cnt &&
he... | 0 | [
"CWE-190"
] | libarchive | 3ad08e01b4d253c66ae56414886089684155af22 | 223,083,570,728,286,400,000,000,000,000,000,000,000 | 45 | Issue 717: Fix integer overflow when computing location of volume descriptor
The multiplication here defaulted to 'int' but calculations
of file positions should always use int64_t. A simple cast
suffices to fix this since the base location is always 32 bits
for ISO, so multiplying by the sector size will never over... |
invoke_NPN_RetainObject(NPObject *npobj)
{
npw_return_val_if_fail(rpc_method_invoke_possible(g_rpc_connection),
npobj->referenceCount);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_RETAIN_OBJECT,
RPC_TYPE_NP_OBJECT, npobj,
RPC_TYPE_INVALID);
if (error != RPC_ERRO... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 190,579,745,636,061,170,000,000,000,000,000,000,000 | 25 | Support all the new variables added |
static char *anal_fcn_autoname(RCore *core, RAnalFunction *fcn, int dump, int mode) {
int use_getopt = 0;
int use_isatty = 0;
PJ *pj = NULL;
char *do_call = NULL;
RAnalRef *ref;
RListIter *iter;
RList *refs = r_anal_function_get_refs (fcn);
if (mode == 'j') {
// start a new JSON object
pj = r_core_pj_new (c... | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 17,541,881,754,585,524,000,000,000,000,000,000,000 | 105 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
__u32 __skb_get_hash_flowi6(struct sk_buff *skb, struct flowi6 *fl6)
{
struct flow_keys keys;
memset(&keys, 0, sizeof(keys));
memcpy(&keys.addrs.v6addrs.src, &fl6->saddr,
sizeof(keys.addrs.v6addrs.src));
memcpy(&keys.addrs.v6addrs.dst, &fl6->daddr,
sizeof(keys.addrs.v6addrs.dst));
keys.control.ad... | 0 | [
"CWE-20",
"CWE-665",
"CWE-703"
] | linux | a6e544b0a88b53114bfa5a57e21b7be7a8dfc9d0 | 244,126,231,768,768,400,000,000,000,000,000,000,000 | 22 | flow_dissector: Jump to exit code in __skb_flow_dissect
Instead of returning immediately (on a parsing failure for instance) we
jump to cleanup code. This always sets protocol values in key_control
(even on a failure there is still valid information in the key_tags that
was set before the problem was hit).
Signed-off... |
static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
{
struct curl_llist_element *curr;
if(!pipeline)
return;
curr = pipeline->head;
while(curr) {
struct curl_llist_element *next = curr->next;
struct SessionHandle *data = (struct SessionHandle *) curr->ptr;
#ifdef DEBUGBUILD ... | 0 | [
"CWE-200"
] | curl | b3875606925536f82fc61f3114ac42f29eaf6945 | 78,494,556,485,631,880,000,000,000,000,000,000,000 | 26 | curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds
When duplicating a handle, the data to post was duplicated using
strdup() when it could be binary and contain zeroes and it was not even
zero terminated! This caused read out of bounds crashes/segfaults.
Since the lib/strdup.c file no longer is easily sha... |
static gboolean process_discover(gpointer data)
{
struct avdtp *session = data;
session->discover->id = 0;
finalize_discovery(session, 0);
return FALSE;
} | 0 | [
"CWE-703"
] | bluez | 7a80d2096f1b7125085e21448112aa02f49f5e9a | 222,447,263,176,224,420,000,000,000,000,000,000,000 | 10 | avdtp: Fix accepting invalid/malformed capabilities
Check if capabilities are valid before attempting to copy them. |
isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED)
{
callbacks++;
if (quiet)
return(0);
fprintf(SAXdebug, "SAX.isStandalone()\n");
return(0);
} | 0 | [
"CWE-125"
] | libxml2 | a820dbeac29d330bae4be05d9ecd939ad6b4aa33 | 171,769,369,370,834,240,000,000,000,000,000,000,000 | 8 | Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.s... |
int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
{
struct trace_event_call *call = &event_bprint;
struct ring_buffer_event *event;
struct ring_buffer *buffer;
struct trace_array *tr = &global_trace;
struct bprint_entry *entry;
unsigned long flags;
char *tbuffer;
int len = 0, size, pc;
if (u... | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 253,947,971,610,352,670,000,000,000,000,000,000,000 | 57 | 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... |
static MagickBooleanType WriteMAPImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
MagickBooleanType
status;
register const Quantum
*p;
register ssize_t
i,
x;
register unsigned char
*q;
size_t
depth,
packet_size;
ssize_t
y;
unsigned char
... | 1 | [
"CWE-772",
"CWE-401"
] | ImageMagick | 1dc0ac5016f1c4d50b100a086526d6a2453a5444 | 159,066,263,482,123,240,000,000,000,000,000,000,000 | 103 | https://github.com/ImageMagick/ImageMagick/issues/573 |
int32_t ZrtpStateClass::startTimer(zrtpTimer_t *t) {
t->time = t->start;
t->counter = 0;
return parent->activateTimer(t->time);
} | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 96,020,048,564,668,400,000,000,000,000,000,000,000 | 6 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
static void hsr_check_announce(struct net_device *hsr_dev,
unsigned char old_operstate)
{
struct hsr_priv *hsr;
hsr = netdev_priv(hsr_dev);
if ((hsr_dev->operstate == IF_OPER_UP)
&& (old_operstate != IF_OPER_UP)) {
/* Went up */
hsr->announce_count = 0;
hsr->announce_timer.expires = jiffies +
... | 0 | [
"CWE-772",
"CWE-269",
"CWE-401"
] | linux | 6caabe7f197d3466d238f70915d65301f1716626 | 309,756,836,570,222,400,000,000,000,000,000,000,000 | 20 | net: hsr: fix memory leak in hsr_dev_finalize()
If hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER) failed to
add port, it directly returns res and forgets to free the node
that allocated in hsr_create_self_node(), and forgets to delete
the node->mac_list linked in hsr->self_node_db.
BUG: memory leak
unreferenced object 0xf... |
static int dccp_feat_activate(struct sock *sk, u8 feat_num, bool local,
dccp_feat_val const *fval)
{
return __dccp_feat_activate(sk, dccp_feat_index(feat_num), local, fval);
} | 0 | [
"CWE-401"
] | linux | 1d3ff0950e2b40dc861b1739029649d03f591820 | 13,467,887,334,643,454,000,000,000,000,000,000,000 | 5 | dccp: Fix memleak in __feat_register_sp
If dccp_feat_push_change fails, we forget free the mem
which is alloced by kmemdup in dccp_feat_clone_sp_val.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e8ef967a54f4 ("dccp: Registration routines for changing feature values")
Reviewed-by: Mukesh Ojha <mojha@codeaurora.o... |
static int perf_swevent_init(struct perf_event *event)
{
u64 event_id = event->attr.config;
if (event->attr.type != PERF_TYPE_SOFTWARE)
return -ENOENT;
/*
* no branch sampling for software events
*/
if (has_branch_stack(event))
return -EOPNOTSUPP;
switch (event_id) {
case PERF_COUNT_SW_CPU_CLOCK:
case... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8176cced706b5e5d15887584150764894e94e02f | 320,055,926,719,347,900,000,000,000,000,000,000,000 | 38 | perf: Treat attr.config as u64 in perf_swevent_init()
Trinity discovered that we fail to check all 64 bits of
attr.config passed by user space, resulting to out-of-bounds
access of the perf_swevent_enabled array in
sw_perf_event_destroy().
Introduced in commit b0a873ebb ("perf: Register PMU
implementations").
Signed... |
pk_transaction_is_finished_with_lock_required (PkTransaction *transaction)
{
g_autoptr(PkError) error_code = NULL;
g_return_val_if_fail (PK_IS_TRANSACTION (transaction), FALSE);
error_code = pk_results_get_error_code (transaction->priv->results);
if (error_code != NULL &&
pk_error_get_code (error_code) == PK... | 0 | [
"CWE-287"
] | PackageKit | 7e8a7905ea9abbd1f384f05f36a4458682cd4697 | 183,683,003,712,359,100,000,000,000,000,000,000,000 | 13 | Do not set JUST_REINSTALL on any kind of auth failure
If we try to continue the auth queue when it has been cancelled (or failed)
then we fall upon the obscure JUST_REINSTALL transaction flag which only the
DNF backend actually verifies.
Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem. |
static struct slave *bond_get_old_active(struct bonding *bond,
struct slave *new_active)
{
struct slave *slave;
struct list_head *iter;
bond_for_each_slave(bond, slave, iter) {
if (slave == new_active)
continue;
if (ether_addr_equal(bond->dev->dev_addr, slave->dev->dev_addr))
return slave;
}
ret... | 0 | [
"CWE-476",
"CWE-703"
] | linux | 105cd17a866017b45f3c45901b394c711c97bf40 | 146,377,958,274,872,450,000,000,000,000,000,000,000 | 16 | bonding: fix null dereference in bond_ipsec_add_sa()
If bond doesn't have real device, bond->curr_active_slave is null.
But bond_ipsec_add_sa() dereferences bond->curr_active_slave without
null checking.
So, null-ptr-deref would occur.
Test commands:
ip link add bond0 type bond
ip link set bond0 up
ip x s... |
window_find_string(struct window *w, const char *s)
{
u_int x, y;
x = w->sx / 2;
y = w->sy / 2;
if (strcasecmp(s, "top") == 0)
y = 0;
else if (strcasecmp(s, "bottom") == 0)
y = w->sy - 1;
else if (strcasecmp(s, "left") == 0)
x = 0;
else if (strcasecmp(s, "right") == 0)
x = w->sx - 1;
else if (strcasec... | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 281,982,199,536,755,170,000,000,000,000,000,000,000 | 32 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
rfc2307bis_group_memberships_build(hash_entry_t *item, void *user_data)
{
struct rfc2307bis_group_memberships_state *mstate = talloc_get_type(
user_data, struct rfc2307bis_group_memberships_state);
struct sdap_nested_group *group;
char *group_name;
TALLOC_CTX *tmp_ctx;
errno_... | 0 | [
"CWE-264"
] | sssd | 0b6b4b7669b46d3d0b0ebefbc0e1621965444717 | 111,466,980,409,942,190,000,000,000,000,000,000,000 | 59 | IPA: process non-posix nested groups
Do not expect objectClass to be posixGroup but rather more general
groupofnames.
Resolves:
https://fedorahosted.org/sssd/ticket/2343
Reviewed-by: Michal Židek <mzidek@redhat.com>
(cherry picked from commit bc8c93ffe881271043492c938c626a9be948000e) |
static float php_ifd_get_float(char *data) {
/* Copy to avoid alignment issues */
float f;
memcpy(&f, data, sizeof(float));
return f;
} | 0 | [
"CWE-125"
] | php-src | d348cfb96f2543565691010ade5e0346338be5a7 | 124,991,932,097,464,460,000,000,000,000,000,000,000 | 6 | Fixed bug #78910 |
int mp_pack(lua_State *L) {
int nargs = lua_gettop(L);
int i;
mp_buf *buf;
if (nargs == 0)
return luaL_argerror(L, 0, "MessagePack pack needs input.");
buf = mp_buf_new(L);
for(i = 1; i <= nargs; i++) {
/* Copy argument i to top of stack for _encode processing;
* the e... | 1 | [
"CWE-119",
"CWE-787"
] | redis | 52a00201fca331217c3b4b8b634f6a0f57d6b7d3 | 212,377,241,862,374,940,000,000,000,000,000,000,000 | 30 | Security: fix Lua cmsgpack library stack overflow.
During an auditing effort, the Apple Vulnerability Research team discovered
a critical Redis security issue affecting the Lua scripting part of Redis.
-- Description of the problem
Several years ago I merged a pull request including many small changes at
the Lua Msg... |
void SM_io_parser<Decorator_>::debug() const
{
out << "\nDEBUG Plane_map\n";
out << "Vertices: " << this->number_of_svertices() << "\n";
out << "SHalfedges: " << this->number_of_shalfedges() << "\n";
out << "Loop: " << this->number_of_shalfloops() << "\n";
SVertex_iterator vit;
CGAL_forall_svertices(v... | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 265,350,150,342,773,470,000,000,000,000,000,000,000 | 17 | Fix Nef_2 and Nef_S2 IO |
struct dentry *kern_path_create(int dfd, const char *pathname,
struct path *path, unsigned int lookup_flags)
{
return filename_create(dfd, getname_kernel(pathname),
path, lookup_flags);
} | 0 | [
"CWE-284"
] | linux | 9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca | 127,849,302,470,610,900,000,000,000,000,000,000,000 | 6 | vfs: rename: check backing inode being equal
If a file is renamed to a hardlink of itself POSIX specifies that rename(2)
should do nothing and return success.
This condition is checked in vfs_rename(). However it won't detect hard
links on overlayfs where these are given separate inodes on the overlayfs
layer.
Over... |
testingAccountingGetCountBytesIndirect(XML_Parser parser) {
if (! parser)
return 0;
return parser->m_accounting.countBytesIndirect;
} | 0 | [
"CWE-400",
"CWE-703"
] | libexpat | 9b4ce651b26557f16103c3a366c91934ecd439ab | 114,384,546,255,817,540,000,000,000,000,000,000,000 | 5 | Prevent stack exhaustion in build_model
It is possible to trigger stack exhaustion in build_model function if
depth of nested children in DTD element is large enough. This happens
because build_node is a recursively called function within build_model.
The code has been adjusted to run iteratively. It uses the already... |
decode_OFPAT_RAW_SET_DL_DST(const struct ofp_action_dl_addr *a,
enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
ofpact_put_SET_ETH_DST(out)->mac = a->dl_addr;
return 0;
} | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 106,994,796,437,569,110,000,000,000,000,000,000,000 | 7 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static int hso_serial_chars_in_buffer(struct tty_struct *tty)
{
struct hso_serial *serial = tty->driver_data;
int chars;
unsigned long flags;
/* sanity check */
if (serial == NULL)
return 0;
spin_lock_irqsave(&serial->serial_lock, flags);
chars = serial->tx_buffer_count;
spin_unlock_irqrestore(&serial->seri... | 0 | [
"CWE-125"
] | linux | 5146f95df782b0ac61abde36567e718692725c89 | 265,796,641,278,456,150,000,000,000,000,000,000,000 | 16 | USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
The function hso_probe reads if_num from the USB device (as an u8) and uses
it without a length check to index an array, resulting in an OOB memory read
in hso_probe or hso_get_config_data.
Add a length check for both locations and updated hso_probe to ... |
TEST_P(DownstreamProtocolIntegrationTest, TestDelayedConnectionTeardownTimeoutTrigger) {
config_helper_.prependFilter("{ name: encoder-decoder-buffer-filter, typed_config: { \"@type\": "
"type.googleapis.com/google.protobuf.Empty } }");
config_helper_.setBufferLimits(1024, 1024);
co... | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 248,168,171,445,448,380,000,000,000,000,000,000,000 | 34 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
camel_imapx_server_stop_idle_sync (CamelIMAPXServer *is,
GCancellable *cancellable,
GError **error)
{
GCancellable *idle_cancellable;
gulong handler_id = 0;
gint64 wait_end_time;
gboolean success = TRUE;
g_return_val_if_fail (CAMEL_IS_IMAPX_SERVER (is), FALSE);
g_mutex_lock (&is->priv->idle_lock);... | 0 | [
"CWE-476"
] | evolution-data-server | 2cc39592b532cf0dc994fd3694b8e6bf924c9ab5 | 243,903,750,848,015,040,000,000,000,000,000,000,000 | 117 | I#189 - Crash on malformed server response with minimal capabilities
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189 |
int journal_importer_process_data(JournalImporter *imp) {
int r;
switch(imp->state) {
case IMPORTER_STATE_LINE: {
char *line, *sep;
size_t n = 0;
assert(imp->data_size == 0);
r = get_line(imp, &line, &n);
if (r < ... | 0 | [
"CWE-770"
] | systemd | ef4d6abe7c7fab6cbff975b32e76b09feee56074 | 231,240,821,861,370,900,000,000,000,000,000,000,000 | 132 | journal-remote: set a limit on the number of fields in a message
Existing use of E2BIG is replaced with ENOBUFS (entry too long), and E2BIG is
reused for the new error condition (too many fields).
This matches the change done for systemd-journald, hence forming the second
part of the fix for CVE-2018-16865
(https://b... |
DLLIMPORT int cfg_setmulti(cfg_t *cfg, const char *name, unsigned int nvalues, char **values)
{
cfg_opt_t *opt;
if (!cfg || !name || !values) {
errno = EINVAL;
return CFG_FAIL;
}
opt = cfg_getopt(cfg, name);
if (!opt) {
errno = ENOENT;
return CFG_FAIL;
}
return cfg_opt_setmulti(cfg, opt, nvalues, valu... | 0 | [] | libconfuse | d73777c2c3566fb2647727bb56d9a2295b81669b | 46,485,878,997,542,160,000,000,000,000,000,000,000 | 17 | Fix #163: unterminated username used with getpwnam()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com> |
static int split_equal(NETSPLIT_REC *n1, NETSPLIT_REC *n2)
{
return g_ascii_strcasecmp(n1->nick, n2->nick);
} | 0 | [
"CWE-416"
] | irssi | a6cae91cecba2e8cf11ed779c5da5a229472575c | 63,166,521,844,915,565,000,000,000,000,000,000,000 | 4 | Merge pull request #812 from ailin-nemui/tape-netsplit
revert netsplit print optimisation
(cherry picked from commit 7de1378dab8081932d9096e19ae3d0921e560230) |
static void fm10k_type_trans(struct fm10k_ring *rx_ring,
union fm10k_rx_desc __maybe_unused *rx_desc,
struct sk_buff *skb)
{
struct net_device *dev = rx_ring->netdev;
struct fm10k_l2_accel *l2_accel = rcu_dereference_bh(rx_ring->l2_accel);
/* check to see if DGLORT belongs to a MACVLAN */
if (l2_ac... | 0 | [
"CWE-476"
] | linux | 01ca667133d019edc9f0a1f70a272447c84ec41f | 162,115,720,091,896,520,000,000,000,000,000,000,000 | 27 | fm10k: Fix a potential NULL pointer dereference
Syzkaller report this:
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),... |
xdr_encode_nfstime4(__be32 *p, const struct timespec64 *t)
{
p = xdr_encode_hyper(p, t->tv_sec);
*p++ = cpu_to_be32(t->tv_nsec);
return p;
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 66,918,899,163,379,230,000,000,000,000,000,000,000 | 6 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp)
{
int maxv, dummy;
char c, p, t;
if (!x) x = &dummy;
if (!y) y = &dummy;
if (!comp) comp = &dummy;
stbi__rewind(s);
// Get identifier
p = (char) stbi__get8(s);
t = (char) stbi__get8(s);
if (p != 'P' || (t != '5'... | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 75,874,736,324,933,780,000,000,000,000,000,000,000 | 38 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
static void netlink_update_socket_mc(struct netlink_sock *nlk,
unsigned int group,
int is_new)
{
int old, new = !!is_new, subscriptions;
old = test_bit(group - 1, nlk->groups);
subscriptions = nlk->subscriptions - old + new;
if (new)
__set_bit(group - 1, nlk->groups);
else
__clear_bit(group ... | 0 | [] | linux-2.6 | 16e5726269611b71c930054ffe9b858c1cea88eb | 279,697,349,389,364,150,000,000,000,000,000,000,000 | 15 | af_unix: dont send SCM_CREDENTIALS by default
Since commit 7361c36c5224 (af_unix: Allow credentials to work across
user and pid namespaces) af_unix performance dropped a lot.
This is because we now take a reference on pid and cred in each write(),
and release them in read(), usually done from another process,
eventua... |
static int snd_ctl_elem_user_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct user_element *ue = kcontrol->private_data;
unsigned int size = ue->elem_data_size;
char *src = ue->elem_data +
snd_ctl_get_ioff(kcontrol, &ucontrol->id) * size;
memcpy(&ucontrol->value, src, size);... | 0 | [
"CWE-416",
"CWE-125"
] | linux | 6ab55ec0a938c7f943a4edba3d6514f775983887 | 151,925,348,446,064,530,000,000,000,000,000,000,000 | 11 | ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()
Since the user can control the arguments provided to the kernel by the
ioctl() system call, an out-of-bounds bug occurs when the 'id->name'
provided by the user does not end with '\0'.
The following log can reveal it:
[ 10.002313] BUG: KASAN: stack-out-... |
encoding_table_get_obj_core(table, enc, error_mode)
VALUE table;
VALUE enc;
VALUE error_mode;
{
return Qnil;
} | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 287,629,517,315,521,300,000,000,000,000,000,000,000 | 7 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void pre_svm_run(struct vcpu_svm *svm)
{
int cpu = raw_smp_processor_id();
struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
/* FIXME: handle wraparound of asid_generation */
if (svm->asid_generation != sd->asid_generation)
new_asid(svm, sd);
} | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 137,538,093,459,904,630,000,000,000,000,000,000,000 | 10 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
static void credit_entropy_bits(struct entropy_store *r, int nbits)
{
int entropy_count, orig, has_initialized = 0;
const int pool_size = r->poolinfo->poolfracbits;
int nfrac = nbits << ENTROPY_SHIFT;
if (!nbits)
return;
retry:
entropy_count = orig = READ_ONCE(r->entropy_count);
if (nfrac < 0) {
/* Debit */... | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 108,625,315,718,618,500,000,000,000,000,000,000,000 | 78 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
format_SET_MPLS_TTL(const struct ofpact_mpls_ttl *a,
const struct ofpact_format_params *fp)
{
ds_put_format(fp->s, "%sset_mpls_ttl(%s%"PRIu8"%s)%s",
colors.paren, colors.end, a->ttl,
colors.paren, colors.end);
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 61,149,855,772,994,580,000,000,000,000,000,000,000 | 7 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
unsigned int vector(const unsigned int siz, const double value) { // Insert new initialized vector
const unsigned int pos = vector(siz);
double *ptr = &mem[pos] + 1;
for (unsigned int i = 0; i<siz; ++i) *(ptr++) = value;
return pos; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 313,192,773,713,536,270,000,000,000,000,000,000,000 | 6 | Fix other issues in 'CImg<T>::load_bmp()'. |
const VerifyCallback SSL_CTX::getVerifyCallback() const
{
return verifyCallback_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 246,825,347,863,795,040,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static __poll_t pidfd_poll(struct file *file, struct poll_table_struct *pts)
{
struct pid *pid = file->private_data;
__poll_t poll_flags = 0;
poll_wait(file, &pid->wait_pidfd, pts);
/*
* Inform pollers only when the whole thread group exits.
* If the thread group leader exits before all other threads in the
... | 0 | [
"CWE-665",
"CWE-362"
] | linux | b4e00444cab4c3f3fec876dc0cccc8cbb0d1a948 | 176,966,392,638,968,680,000,000,000,000,000,000,000 | 17 | fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
current->group_leader->exit_signal may change during copy_process() if
current->real_parent exits.
Move the assignment inside tasklist_lock to avoid the race.
Signed-off-by: Eddy Wu <eddy_wu@trendmicro.com>
Acked-by: Oleg Nesterov <oleg@redhat.... |
void SGeometry::next_geometry()
{
// to do: maybe implement except. and such on error conds.
this->cur_geometry_ind++;
this->cur_part_ind = 0;
this->current_vert_ind = 0;
} | 0 | [
"CWE-787"
] | gdal | 767e3a56144f676ca738ef8f700e0e56035bd05a | 199,508,203,358,997,200,000,000,000,000,000,000,000 | 8 | netCDF: avoid buffer overflow. master only. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15143. Credit to OSS Fuzz |
zzip_mem_entry_extra_block (ZZIP_MEM_ENTRY* entry, short datatype)
{
int i = 2;
while (1) {
ZZIP_EXTRA_BLOCK* ext = entry->zz_ext[i];
if (ext) {
while (ext->z_datatype) {
if (datatype == zzip_extra_block_get_datatype (ext)) {
return ext;
}
___ char* e = (char*) ext;
e += zzip_extra_block_he... | 0 | [
"CWE-119"
] | zziplib | 596d9dfce2624e849417d4301e8d67935608aa5e | 264,815,600,097,173,580,000,000,000,000,000,000,000 | 20 | memdisk
(.) |
bool OAuth2CookieValidator::timestampIsValid() const {
uint64_t expires;
if (!absl::SimpleAtoi(expires_, &expires)) {
return false;
}
const auto current_epoch = time_source_.systemTime().time_since_epoch();
return std::chrono::seconds(expires) > current_epoch;
} | 0 | [
"CWE-416"
] | envoy | 7ffda4e809dec74449ebc330cebb9d2f4ab61360 | 54,861,785,736,350,530,000,000,000,000,000,000,000 | 9 | oauth2: do not blindly accept requests with a token in the Authorization headera (781)
The logic was broken because it assumed an additional call would be
performed to the auth server, which isn't the case. Per the filter
documentation, a request is only considered subsequently authenticated
if there's valid cookie th... |
static int read_fragment_table(long long *directory_table_end)
{
int res, i;
int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
int indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
long long fragment_table_index[indexes];
TRACE("read_fragment_table: %d fragments, reading %d fragment indexes "
"from 0... | 1 | [
"CWE-20",
"CWE-190"
] | squashfs-tools | f95864afe8833fe3ad782d714b41378e860977b1 | 7,390,250,434,118,839,000,000,000,000,000,000,000 | 52 | unsquashfs-4: Add more sanity checks + fix CVE-2015-4645/6
Add more filesystem table sanity checks to Unsquashfs-4 and
also properly fix CVE-2015-4645 and CVE-2015-4646.
The CVEs were raised due to Unsquashfs having variable
oveflow and stack overflow in a number of vulnerable
functions.
The suggested patch only "fi... |
write_return(void)
{
term.curs.wrapnext = false;
if (term.curs.x < term.marg_left)
term.curs.x = 0;
else
term.curs.x = term.marg_left;
enable_progress();
} | 0 | [
"CWE-703",
"CWE-770"
] | mintty | bd52109993440b6996760aaccb66e68e782762b9 | 215,310,038,380,326,600,000,000,000,000,000,000,000 | 9 | tame some window operations, just in case |
bool AuthorizationSession::isCoauthorizedWith(UserNameIterator userNameIter) {
if (!getAuthorizationManager().isAuthEnabled()) {
return true;
}
if (!userNameIter.more() && !getAuthenticatedUserNames().more()) {
return true;
}
for (; userNameIter.more(); userNameIter.next()) {
... | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 168,964,121,223,722,970,000,000,000,000,000,000,000 | 20 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
int vfs_rmdir(struct inode *dir, struct dentry *dentry)
{
int error = may_delete(dir, dentry, 1);
if (error)
return error;
if (!dir->i_op->rmdir)
return -EPERM;
vfs_dq_init(dir);
mutex_lock(&dentry->d_inode->i_mutex);
dentry_unhash(dentry);
if (d_mountpoint(dentry))
error = -EBUSY;
else {
error = se... | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 53,939,288,634,401,910,000,000,000,000,000,000,000 | 32 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
TEST(WriterTest, WriteDouble) {
CHECK_WRITE(4.2);
CHECK_WRITE(-4.2);
CHECK_WRITE(std::numeric_limits<double>::min());
CHECK_WRITE(std::numeric_limits<double>::max());
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 199,542,267,169,282,100,000,000,000,000,000,000,000 | 6 | Fix segfault on complex pointer formatting (#642) |
void ReserveSizeIfNeeded(int estimated_size) {
// Reserve a bit extra to account for escaped chars.
if (estimated_size > buffer_len_)
Resize(estimated_size + 8);
} | 0 | [] | envoy | 3b5acb2f43548862dadb243de7cf3994986a8e04 | 84,509,008,987,883,420,000,000,000,000,000,000,000 | 5 | http, url: Bring back chromium_url and http_parser_parse_url (#198)
* Revert GURL as HTTP URL parser utility
This reverts:
1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d
2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32
3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62
Signed-off-by: Dhi Aurrahman <dio@tetrat... |
bool HTTPSession::onNativeProtocolUpgradeImpl(
HTTPCodec::StreamID streamID, std::unique_ptr<HTTPCodec> codec,
const std::string& protocolString) {
CHECK_EQ(streamID, 1);
HTTPTransaction* txn = findTransaction(streamID);
CHECK(txn);
// only HTTP1xCodec calls onNativeProtocolUpgrade
CHECK(!codec_->supports... | 0 | [
"CWE-20"
] | proxygen | 0600ebe59c3e82cd012def77ca9ca1918da74a71 | 258,291,412,445,146,730,000,000,000,000,000,000,000 | 61 | Check that a secondary auth manager is set before dereferencing.
Summary: CVE-2018-6343
Reviewed By: mingtaoy
Differential Revision: D12994423
fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7 |
network_prefix(int ae, int plen, unsigned int omitted,
const unsigned char *p, const unsigned char *dp,
unsigned int len, unsigned char *p_r)
{
unsigned pb;
unsigned char prefix[16];
int ret = -1;
if(plen >= 0)
pb = (plen + 7) / 8;
else if(ae == 1)
pb =... | 0 | [
"CWE-787"
] | frr | c3793352a8d76d2eee1edc38a9a16c1c8a6573f4 | 112,911,107,978,908,100,000,000,000,000,000,000,000 | 58 | babeld: fix #10502 #10503 by repairing the checks on length
This patch repairs the checking conditions on length in four functions:
babel_packet_examin, parse_hello_subtlv, parse_ihu_subtlv, and parse_update_subtlv
Signed-off-by: qingkaishi <qingkaishi@gmail.com> |
static int jas_icctxtdesc_copy(jas_iccattrval_t *attrval,
jas_iccattrval_t *othattrval)
{
jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc;
/* Avoid compiler warnings about unused parameters. */
attrval = 0;
othattrval = 0;
txtdesc = 0;
/* Not yet implemented. */
abort();
return -1;
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 31,465,295,540,651,007,000,000,000,000,000,000,000 | 14 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
static void test_conversion()
{
MYSQL_STMT *stmt;
const char *stmt_text;
int rc;
MYSQL_BIND my_bind[1];
char buff[4];
ulong length;
myheader("test_conversion");
stmt_text= "DROP TABLE IF EXISTS t1";
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
myquery(rc);
stmt_text= "CREATE TABLE ... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 281,434,038,487,460,870,000,000,000,000,000,000,000 | 66 | 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... |
GF_Box *pdin_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_ProgressiveDownloadBox, GF_ISOM_BOX_TYPE_PDIN);
return (GF_Box *)tmp;
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 67,691,830,414,478,370,000,000,000,000,000,000,000 | 5 | fixed #2255 |
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_op *op_data = opline+1;
zend_free_op free_op1, free_op_data1;
zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 237,343,646,791,753,830,000,000,000,000,000,000,000 | 113 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
int32_t PersianCalendar::monthStart(int32_t year, int32_t month) const {
return handleComputeMonthStart(year,month,TRUE);
} | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 237,401,980,739,890,140,000,000,000,000,000,000,000 | 3 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
boost::optional<int> ExpressionDateToParts::evaluateIso8601Flag(const Document& root) const {
if (!_iso8601) {
return false;
}
auto iso8601Output = _iso8601->evaluate(root);
if (iso8601Output.nullish()) {
return boost::none;
}
uassert(40521,
str::stream() << "iso86... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 173,030,602,418,981,870,000,000,000,000,000,000,000 | 18 | SERVER-38070 fix infinite loop in agg expression |
static void compile_backtrackingpath(compiler_common *common, struct backtrack_common *current)
{
DEFINE_COMPILER;
then_trap_backtrack *save_then_trap = common->then_trap;
while (current)
{
if (current->nextbacktracks != NULL)
set_jumps(current->nextbacktracks, LABEL());
switch(*current->cc)
{
case O... | 0 | [
"CWE-125"
] | php-src | 8947fd9e9fdce87cd6c59817b1db58e789538fe9 | 74,776,674,898,723,070,000,000,000,000,000,000,000 | 187 | Fix #78338: Array cross-border reading in PCRE
We backport r1092 from pcre2. |
getScanlineChunkOffsetTableSize(const Header& header)
{
const Box2i &dataWindow = header.dataWindow();
vector<size_t> bytesPerLine;
size_t maxBytesPerLine = bytesPerLineTable (header,
bytesPerLine);
int linesInBuffer = numLinesInBuffer ( header.compressi... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 83,031,490,172,481,420,000,000,000,000,000,000,000 | 15 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
JanetArray *janet_array(int32_t capacity) {
JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
Janet *data = NULL;
if (capacity > 0) {
janet_vm.next_collection += capacity * sizeof(Janet);
data = (Janet *) janet_malloc(sizeof(Janet) * (size_t) capacity);
if (N... | 0 | [
"CWE-787"
] | janet | 7fda7709ff15ab4b4cdea57619365eb2798f15c4 | 52,806,918,991,898,600,000,000,000,000,000,000,000 | 15 | fix negative count passed to cfun_array_new_filled |
cheader_write (cheader_t *ch, GDataOutputStream *out,
GCancellable *cancellable, GError **error)
{
GOutputStream *stream = g_filter_output_stream_get_base_stream (G_FILTER_OUTPUT_STREAM (out));
if (!W1 ('M') || !W1 ('S') || !W1 ('C') || !W1 ('F') ||
!W4 (ch->res1) ||
!W4 (ch->siz... | 0 | [
"CWE-787"
] | gcab | c512f6ff0c82a1139b36db2b28f93edc01c74b4b | 61,885,604,315,113,870,000,000,000,000,000,000,000 | 32 | trivial: Allocate cdata_t on the heap
Using a 91kB stack allocation for one object isn't awesome, and it also allows
us to use g_autoptr() to simplify gcab_folder_extract() |
void loongarch_cpu_set_irq(void *opaque, int irq, int level)
{
LoongArchCPU *cpu = opaque;
CPULoongArchState *env = &cpu->env;
CPUState *cs = CPU(cpu);
if (irq < 0 || irq >= N_IRQS) {
return;
}
env->CSR_ESTAT = deposit64(env->CSR_ESTAT, irq, 1, level != 0);
if (FIELD_EX64(env->CSR... | 0 | [] | qemu | 3517fb726741c109cae7995f9ea46f0cab6187d6 | 317,971,524,658,870,480,000,000,000,000,000,000,000 | 18 | target/loongarch: Clean up tlb when cpu reset
We should make sure that tlb is clean when cpu reset.
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20220705070950.2364243-1-gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.