func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
return get_date_from_string(thd, ltime, fuzzydate);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 338,317,544,152,524,560,000,000,000,000,000,000,000 | 4 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
cdf_read_sector_chain(const cdf_info_t *info, const cdf_header_t *h,
const cdf_sat_t *sat, const cdf_sat_t *ssat, const cdf_stream_t *sst,
cdf_secid_t sid, size_t len, cdf_stream_t *scn)
{
if (len < h->h_min_size_standard_stream && sst->sst_tab != NULL)
return cdf_read_short_sector_chain(h, ssat, sst, sid, ... | 0 | [
"CWE-119"
] | file | 1859fdb4e67c49c463c4e0078054335cd46ba295 | 188,069,364,442,234,100,000,000,000,000,000,000,000 | 11 | add more check found by cert's fuzzer. |
pkinit_get_kdc_cert(krb5_context context,
pkinit_plg_crypto_context plg_cryptoctx,
pkinit_req_crypto_context req_cryptoctx,
pkinit_identity_crypto_context id_cryptoctx,
krb5_principal princ)
{
krb5_error_code retval = KRB5KDC_ERR_PREAUT... | 0 | [
"CWE-476"
] | krb5 | f249555301940c6df3a2cdda13b56b5674eebc2e | 22,716,639,235,174,030,000,000,000,000,000,000,000 | 12 | PKINIT null pointer deref [CVE-2013-1415]
Don't dereference a null pointer when cleaning up.
The KDC plugin for PKINIT can dereference a null pointer when a
malformed packet causes processing to terminate early, leading to
a crash of the KDC process. An attacker would need to have a valid
PKINIT certificate or have ... |
static llparse_state_t llhttp__internal__run(
llhttp__internal_t* state,
const unsigned char* p,
const unsigned char* endp) {
int match;
switch ((llparse_state_t) (intptr_t) state->_current) {
case s_n_llhttp__internal__n_closed:
s_n_llhttp__internal__n_closed: {
if (p == endp) {
r... | 1 | [
"CWE-444"
] | node | 1da22eb48254f8c2d5f3c5865bb9f46e8b09ec60 | 108,721,879,315,258,920,000,000,000,000,000,000,000 | 6,632 | http: stricter Transfer-Encoding and header separator parsing
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
PR-URL: https://github.com/nodejs-private/node-private/p... |
static struct kvm *kvm_create_vm(unsigned long type)
{
struct kvm *kvm = kvm_arch_alloc_vm();
struct kvm_memslots *slots;
int r = -ENOMEM;
int i, j;
if (!kvm)
return ERR_PTR(-ENOMEM);
KVM_MMU_LOCK_INIT(kvm);
mmgrab(current->mm);
kvm->mm = current->mm;
kvm_eventfd_init(kvm);
mutex_init(&kvm->lock);
mutex... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 53,198,609,189,083,660,000,000,000,000,000,000,000 | 127 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
xfs_setattr_time(
struct xfs_inode *ip,
struct iattr *iattr)
{
struct inode *inode = VFS_I(ip);
ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
if (iattr->ia_valid & ATTR_ATIME)
inode->i_atime = iattr->ia_atime;
if (iattr->ia_valid & ATTR_CTIME)
inode->i_ctime = iattr->ia_ctime;
if (iattr->ia_valid & ATTR_MTI... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 1fb254aa983bf190cfd685d40c64a480a9bafaee | 271,117,925,469,358,270,000,000,000,000,000,000,000 | 15 | xfs: fix missing ILOCK unlock when xfs_setattr_nonsize fails due to EDQUOT
Benjamin Moody reported to Debian that XFS partially wedges when a chgrp
fails on account of being out of disk quota. I ran his reproducer
script:
# adduser dummy
# adduser dummy plugdev
# dd if=/dev/zero bs=1M count=100 of=test.img
# mkfs.x... |
httpClientDiscardBody(HTTPConnectionPtr connection)
{
TimeEventHandlerPtr handler;
assert(connection->reqoffset == 0);
assert(connection->flags & CONN_READER);
if(connection->reqte != TE_IDENTITY)
goto fail;
if(connection->bodylen < 0)
goto fail;
if(connection->bodylen < conn... | 1 | [
"CWE-617"
] | polipo | 0e2b44af619e46e365971ea52b97457bc0778cd3 | 293,766,975,657,776,960,000,000,000,000,000,000,000 | 70 | Try to read POST requests to local configuration interface correctly. |
int tls_parse_extension(SSL *s, TLSEXT_INDEX idx, int context,
RAW_EXTENSION *exts, X509 *x, size_t chainidx)
{
RAW_EXTENSION *currext = &exts[idx];
int (*parser)(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
size_t chainidx) = NULL;
/* Skip if the extension ... | 0 | [
"CWE-476"
] | openssl | fb9fa6b51defd48157eeb207f52181f735d96148 | 154,227,878,822,707,030,000,000,000,000,000,000,000 | 42 | ssl sigalg extension: fix NULL pointer dereference
As the variable peer_sigalgslen is not cleared on ssl rehandshake, it's
possible to crash an openssl tls secured server remotely by sending a
manipulated hello message in a rehandshake.
On such a manipulated rehandshake, tls1_set_shared_sigalgs() calls
tls12_shared_s... |
void tcp_synack_rtt_meas(struct sock *sk, struct request_sock *req)
{
struct rate_sample rs;
long rtt_us = -1L;
if (req && !req->num_retrans && tcp_rsk(req)->snt_synack)
rtt_us = tcp_stamp_us_delta(tcp_clock_us(), tcp_rsk(req)->snt_synack);
tcp_ack_update_rtt(sk, FLAG_SYN_ACKED, rtt_us, -1L, rtt_us, &rs);
} | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 179,321,012,183,090,330,000,000,000,000,000,000,000 | 10 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static void tc_cls_offload_cnt_update(struct tcf_block *block,
struct tcf_proto *tp, u32 *cnt,
u32 *flags, u32 diff, bool add)
{
lockdep_assert_held(&block->cb_lock);
spin_lock(&tp->lock);
if (add) {
if (!*cnt)
tcf_block_offload_inc(block, flags);
*cnt += diff;
} else {
*cnt -= diff;
... | 0 | [
"CWE-416"
] | linux | 04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5 | 16,255,250,081,091,946,000,000,000,000,000,000,000 | 18 | net: sched: fix use-after-free in tc_new_tfilter()
Whenever tc_new_tfilter() jumps back to replay: label,
we need to make sure @q and @chain local variables are cleared again,
or risk use-after-free as in [1]
For consistency, apply the same fix in tc_ctl_chain()
BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1... |
hugetlb_vmdelete_list(struct rb_root *root, pgoff_t start, pgoff_t end)
{
struct vm_area_struct *vma;
/*
* end == 0 indicates that the entire range after
* start should be unmapped.
*/
vma_interval_tree_foreach(vma, root, start, end ? end : ULONG_MAX) {
unsigned long v_offset;
unsigned long v_end;
/*
... | 0 | [] | linux | 9aacdd354d197ad64685941b36d28ea20ab88757 | 201,284,103,089,004,450,000,000,000,000,000,000,000 | 36 | fs/hugetlbfs/inode.c: fix bugs in hugetlb_vmtruncate_list()
Hillf Danton noticed bugs in the hugetlb_vmtruncate_list routine. The
argument end is of type pgoff_t. It was being converted to a vaddr
offset and passed to unmap_hugepage_range. However, end was also being
used as an argument to the vma_interval_tree_for... |
int emulator_write_emulated(unsigned long addr,
const void *val,
unsigned int bytes,
struct kvm_vcpu *vcpu)
{
/* Crossing a page boundary? */
if (((addr + bytes - 1) ^ addr) & PAGE_MASK) {
int rc, now;
now = -addr & ~PAGE_MASK;
rc = emulator_write_emulated_onepage(addr, val, now, vcpu);
... | 0 | [
"CWE-476"
] | linux-2.6 | 59839dfff5eabca01cc4e20b45797a60a80af8cb | 330,085,715,865,017,100,000,000,000,000,000,000,000 | 19 | KVM: x86: check for cr3 validity in ioctl_set_sregs
Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:
"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries... |
X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_REQ), fp, req);
} | 0 | [
"CWE-310"
] | openssl | 684400ce192dac51df3d3e92b61830a6ef90be3e | 198,377,394,875,359,000,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... |
qf_win_goto(win_T *win, linenr_T lnum)
{
win_T *old_curwin = curwin;
curwin = win;
curbuf = win->w_buffer;
curwin->w_cursor.lnum = lnum;
curwin->w_cursor.col = 0;
curwin->w_cursor.coladd = 0;
curwin->w_curswant = 0;
update_topline(); // scroll to show the line
redraw_later(UPD_VALI... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 240,160,353,374,659,400,000,000,000,000,000,000,000 | 16 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
zval *object;
zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 ... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 249,657,198,104,202,800,000,000,000,000,000,000,000 | 86 | - 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 inline PixelTrait GetPixelCyanTraits(const Image *restrict image)
{
return(image->channel_map[CyanPixelChannel].traits);
} | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 450bd716ed3b9186dd10f9e60f630a3d9eeea2a4 | 20,971,772,228,092,640,000,000,000,000,000,000,000 | 4 | |
fast_random_poll()
{
static int (*fnc)( void (*)(const void*, size_t, int), int) = NULL;
static int initialized = 0;
rndstats.fastpolls++;
if( !initialized ) {
if( !is_initialized )
initialize();
initialized = 1;
fnc = getfnc_fast_random_poll();
}
if( fnc ) {
(*fnc)( add_randomness, 1 ... | 0 | [
"CWE-200"
] | gnupg | c6dbfe89903d0c8191cf50ecf1abb3c8458b427a | 107,195,741,188,077,220,000,000,000,000,000,000,000 | 75 | random: Hash continuous areas in the csprng pool.
* cipher/random.c (mix_pool): Store the first hash at the end of the
pool.
--
This fixes a long standing bug (since 1998) in Libgcrypt and GnuPG.
An attacker who obtains 580 bytes of the random number from the
standard RNG can trivially predict the next 20 bytes of ou... |
static int cifs_copy_posix_acl(char *trgt, char *src, const int buflen,
const int acl_type, const int size_of_data_area)
{
int size = 0;
int i;
__u16 count;
struct cifs_posix_ace *pACE;
struct cifs_posix_acl *cifs_acl = (struct cifs_posix_acl *)src;
posix_acl_xattr_header *local_acl = (posix_acl_xattr_... | 0 | [
"CWE-362",
"CWE-119",
"CWE-189"
] | linux | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | 147,213,233,397,314,180,000,000,000,000,000,000,000 | 54 | cifs: fix possible memory corruption in CIFSFindNext
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.
If the server sends a v... |
_nc_mvcur_resume(void)
{
NCURSES_SP_NAME(_nc_mvcur_resume) (CURRENT_SCREEN);
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 209,915,225,688,620,730,000,000,000,000,000,000,000 | 4 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
bool Http2Session::AddSettings(Local<Function> callback) {
Local<Object> obj;
if (!env()->http2settings_constructor_template()
->NewInstance(env()->context())
.ToLocal(&obj)) {
return false;
}
BaseObjectPtr<Http2Settings> settings =
MakeDetachedBaseObject<Http2Settings>(this, ... | 0 | [
"CWE-416"
] | node | a3c33d4ce78f74d1cf1765704af5b427aa3840a6 | 181,062,120,213,950,450,000,000,000,000,000,000,000 | 23 | http2: update handling of rst_stream with error code NGHTTP2_CANCEL
The PR updates the handling of rst_stream frames and adds all streams
to the pending list on receiving rst frames with the error code
NGHTTP2_CANCEL.
The changes will remove dependency on the stream state that may allow
bypassing the checks in certai... |
void test_checkout_nasty__dot_path(void)
{
test_checkout_fails("refs/heads/dot_path", "./foobar");
} | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 3f7851eadca36a99627ad78cbe56a40d3776ed01 | 128,108,361,929,982,270,000,000,000,000,000,000,000 | 4 | Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS
A little-known feature of NTFS is that it offers to store metadata in
so-called "Alternate Data Streams" (inspired by Apple's "resource
forks") that are copied together with the file they are associated with.
These Alternate Data Streams can be accessed ... |
void qdisc_reset(struct Qdisc *qdisc)
{
const struct Qdisc_ops *ops = qdisc->ops;
if (ops->reset)
ops->reset(qdisc);
} | 0 | [
"CWE-399"
] | linux-2.6 | 2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0 | 277,886,066,569,488,970,000,000,000,000,000,000,000 | 7 | [NET]: Add preemption point in qdisc_run
The qdisc_run loop is currently unbounded and runs entirely in a
softirq. This is bad as it may create an unbounded softirq run.
This patch fixes this by calling need_resched and breaking out if
necessary.
It also adds a break out if the jiffies value changes since that woul... |
struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx)
{
static struct cgit_cmd cmds[] = {
def_cmd(HEAD, 1, 0),
def_cmd(about, 0, 1),
def_cmd(blob, 1, 0),
def_cmd(commit, 1, 1),
def_cmd(diff, 1, 1),
def_cmd(info, 1, 0),
def_cmd(log, 1, 1),
def_cmd(ls_cache, 0, 0),
def_cmd(objects, 1, 0),
def_cmd(p... | 0 | [] | cgit | 02a545e63454530c1639014d3239c14ced2022c6 | 156,010,204,768,308,270,000,000,000,000,000,000,000 | 34 | Add support for cloning over http
This patch implements basic support for cloning over http, based on the
work on git-http-backend by Shawn O. Pearce.
Signed-off-by: Lars Hjemli <hjemli@gmail.com> |
curlPost(instanceData *pData, uchar *message, int msglen, uchar **tpls)
{
CURLcode code;
CURL *curl = pData->curlHandle;
DEFiRet;
pData->reply = NULL;
pData->replyLen = 0;
if(pData->dynSrchIdx || pData->dynSrchType || pData->dynParent)
CHKiRet(setCurlURL(pData, tpls));
curl_easy_setopt(curl, CURLOPT_WRITEDA... | 0 | [
"CWE-399"
] | rsyslog | 80f88242982c9c6ad6ce8628fc5b94ea74051cf4 | 248,683,041,384,236,600,000,000,000,000,000,000,000 | 39 | bugfix: double-free in omelasticsearch
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=461
Thanks to Marius Ionescu for providing a detailled bug report |
int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd)
{
if (bd && bd == bd->bd_contains)
return 0;
/* Actually none of these is particularly useful on a partition,
* but they are safe.
*/
switch (cmd) {
case SCSI_IOCTL_GET_IDLUN:
case SCSI_IOCTL_GET_BUS_NUMBER:
case SCSI_IOCTL_GET_PCI:
case... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 0bfc96cb77224736dfa35c3c555d37b3646ef35e | 269,171,790,010,636,740,000,000,000,000,000,000,000 | 36 | block: fail SCSI passthrough ioctls on partition devices
Linux allows executing the SG_IO ioctl on a partition or LVM volume, and
will pass the command to the underlying block device. This is
well-known, but it is also a large security problem when (via Unix
permissions, ACLs, SELinux or a combination thereof) a prog... |
rpcapd_recv(SOCKET sock, char *buffer, size_t toread, uint32 *plen, char *errmsgbuf)
{
int nread;
char errbuf[PCAP_ERRBUF_SIZE]; // buffer for network errors
if (toread > *plen)
{
// Tell the client and continue.
pcap_snprintf(errmsgbuf, PCAP_ERRBUF_SIZE, "Message payload is too short");
return -2;
}
nrea... | 0 | [
"CWE-703",
"CWE-918"
] | libpcap | 33834cb2a4d035b52aa2a26742f832a112e90a0a | 299,295,474,243,224,070,000,000,000,000,000,000,000 | 21 | In the open request, reject capture sources that are URLs.
You shouldn't be able to ask a server to open a remote device on some
*other* server; just open it yourself.
This addresses Include Security issue F13: [libpcap] Remote Packet
Capture Daemon Allows Opening Capture URLs. |
TEST_P(RBACIntegrationTest, DeniedWithDenyAction) {
useAccessLog("%RESPONSE_CODE_DETAILS%");
config_helper_.addFilter(RBAC_CONFIG_WITH_DENY_ACTION);
initialize();
codec_client_ = makeHttpConnection(lookupPort("http"));
auto response = codec_client_->makeRequestWithBody(
Http::TestRequestHeaderMapImpl{... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 17,761,926,955,954,104,000,000,000,000,000,000,000 | 23 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
evdev_sendevents_set_mode(struct libinput_device *device,
enum libinput_config_send_events_mode mode)
{
struct evdev_device *evdev = evdev_device(device);
struct evdev_dispatch *dispatch = evdev->dispatch;
if (mode == dispatch->sendevents.current_mode)
return LIBINPUT_CONFIG_STATUS_SUCCESS;
switch(mode) {
... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 328,906,796,502,387,950,000,000,000,000,000,000,000 | 24 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
static noinline_for_stack void scrub_free_ctx(struct scrub_ctx *sctx)
{
int i;
if (!sctx)
return;
/* this can happen when scrub is cancelled */
if (sctx->curr != -1) {
struct scrub_bio *sbio = sctx->bios[sctx->curr];
for (i = 0; i < sbio->page_count; i++) {
WARN_ON(!sbio->pagev[i]->page);
scrub_block... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 238,625,159,972,525,440,000,000,000,000,000,000,000 | 30 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
archive_read_support_format_zip(struct archive *a)
{
int r;
r = archive_read_support_format_zip_streamable(a);
if (r != ARCHIVE_OK)
return r;
return (archive_read_support_format_zip_seekable(a));
} | 0 | [
"CWE-20"
] | libarchive | d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7 | 221,304,708,598,371,980,000,000,000,000,000,000,000 | 8 | Issue #656: Fix CVE-2016-1541, VU#862384
When reading OS X metadata entries in Zip archives that were stored
without compression, libarchive would use the uncompressed entry size
to allocate a buffer but would use the compressed entry size to limit
the amount of data copied into that buffer. Since the compressed
and... |
void SpatialMaxPoolGradGrad(OpKernelContext* context, Tensor* bottom_diff,
const Tensor& tensor_in, const Tensor& tensor_out,
const Tensor& top_diff,
const PoolParameters& params,
const Padding& pad... | 0 | [
"CWE-20"
] | tensorflow | 136b51f10903e044308cf77117c0ed9871350475 | 287,838,876,802,514,400,000,000,000,000,000,000,000 | 105 | Add missing validation to `maxpooling_op.cc`
PiperOrigin-RevId: 387932441
Change-Id: I43a0b24e6a12cc965611144ba035accd384594b9 |
void __exit ax25_dev_free(void)
{
ax25_dev *s, *ax25_dev;
spin_lock_bh(&ax25_dev_lock);
ax25_dev = ax25_dev_list;
while (ax25_dev != NULL) {
s = ax25_dev;
dev_put_track(ax25_dev->dev, &ax25_dev->dev_tracker);
ax25_dev = ax25_dev->next;
kfree(s);
}
ax25_dev_list = NULL;
spin_unlock_bh(&ax25_dev_lo... | 0 | [
"CWE-416"
] | linux | d01ffb9eee4af165d83b08dd73ebdf9fe94a519b | 28,274,206,441,175,214,000,000,000,000,000,000,000 | 15 | ax25: add refcount in ax25_dev to avoid UAF bugs
If we dereference ax25_dev after we call kfree(ax25_dev) in
ax25_dev_device_down(), it will lead to concurrency UAF bugs.
There are eight syscall functions suffer from UAF bugs, include
ax25_bind(), ax25_release(), ax25_connect(), ax25_ioctl(),
ax25_getname(), ax25_send... |
int security_tun_dev_create(void)
{
return security_ops->tun_dev_create();
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 198,263,511,245,266,340,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... |
_copyCreateOpClassStmt(const CreateOpClassStmt *from)
{
CreateOpClassStmt *newnode = makeNode(CreateOpClassStmt);
COPY_NODE_FIELD(opclassname);
COPY_NODE_FIELD(opfamilyname);
COPY_STRING_FIELD(amname);
COPY_NODE_FIELD(datatype);
COPY_NODE_FIELD(items);
COPY_SCALAR_FIELD(isDefault);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 167,185,672,740,267,250,000,000,000,000,000,000,000 | 13 | 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 keyring_instantiate(struct key *keyring,
const void *data, size_t datalen)
{
int ret;
ret = -EINVAL;
if (datalen == 0) {
/* make the keyring available by name if it has one */
keyring_publish_name(keyring);
ret = 0;
}
return ret;
} /* end keyring_instantiate() */ | 0 | [
"CWE-362"
] | linux-2.6 | cea7daa3589d6b550546a8c8963599f7c1a3ae5c | 259,267,216,714,409,000,000,000,000,000,000,000,000 | 15 | KEYS: find_keyring_by_name() can gain access to a freed keyring
find_keyring_by_name() can gain access to a keyring that has had its reference
count reduced to zero, and is thus ready to be freed. This then allows the
dead keyring to be brought back into use whilst it is being destroyed.
The following timeline illus... |
static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_sub_if_data *vlan;
struct ieee80211_local *local = sdata->local;
struct beacon_data *old_beacon;
struct probe_resp *old_probe_resp;
struct cfg80211_chan_... | 0 | [
"CWE-287"
] | linux | 3e493173b7841259a08c5c8e5cbe90adb349da7e | 32,828,885,984,008,647,000,000,000,000,000,000,000 | 75 | mac80211: Do not send Layer 2 Update frame before authorization
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-... |
f_getcmdcompltype(typval_T *argvars UNUSED, typval_T *rettv)
{
rettv->v_type = VAR_STRING;
rettv->vval.v_string = get_cmdline_completion();
} | 0 | [
"CWE-674",
"CWE-787"
] | vim | 51f0bfb88a3554ca2dde777d78a59880d1ee37a8 | 280,990,808,217,017,560,000,000,000,000,000,000,000 | 5 | patch 8.2.4975: recursive command line loop may cause a crash
Problem: Recursive command line loop may cause a crash.
Solution: Limit recursion of getcmdline(). |
MONGO_EXPORT int bson_append_start_object( bson *b, const char *name ) {
if ( bson_append_estart( b, BSON_OBJECT, name, 5 ) == BSON_ERROR ) return BSON_ERROR;
b->stack[ b->stackPos++ ] = b->cur - b->data;
bson_append32( b , &zero );
return BSON_OK;
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 3,533,854,221,558,780,000,000,000,000,000,000,000 | 6 | don't mix up int and size_t (first pass to fix that) |
mbfl_buffer_converter_feed_result(mbfl_buffer_converter *convd, mbfl_string *string,
mbfl_string *result)
{
if (convd == NULL || string == NULL || result == NULL) {
return NULL;
}
mbfl_buffer_converter_feed(convd, string);
if (convd->filter1 != NULL) {
mbfl_convert_filter_flush(convd->filter1);
}
if (c... | 1 | [
"CWE-119"
] | php-src | 64f42c73efc58e88671ad76b6b6bc8e2b62713e1 | 93,359,513,856,835,910,000,000,000,000,000,000,000 | 16 | Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut |
reset_lnums()
{
win_T *wp;
tabpage_T *tp;
FOR_ALL_TAB_WINDOWS(tp, wp)
if (wp->w_buffer == curbuf)
{
// Restore the value if the autocommand didn't change it.
if (EQUAL_POS(wp->w_save_cursor.w_cursor_corr, wp->w_cursor))
wp->w_cursor = wp->w_save_cursor.w_cursor_save;
if (wp->w_save_curso... | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 19,753,120,755,664,892,000,000,000,000,000,000,000 | 15 | patch 8.1.2136: using freed memory with autocmd from fuzzer
Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
Solution: Avoid using "wp" after autocommands. (closes #5041) |
TEST(FormatterTest, FormatInt) {
EXPECT_THROW_MSG(format("{0:v", 42),
FormatError, "missing '}' in format string");
check_unknown_types(42, "bBdoxXn", "integer");
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 114,554,223,282,090,500,000,000,000,000,000,000,000 | 5 | Fix segfault on complex pointer formatting (#642) |
mono_method_get_index (MonoMethod *method) {
MonoClass *klass = method->klass;
int i;
if (klass->rank)
/* constructed array methods are not in the MethodDef table */
return 0;
if (method->token)
return mono_metadata_token_index (method->token);
mono_class_setup_methods (klass);
if (klass->exception_type)... | 0 | [] | mono | 8e890a3bf80a4620e417814dc14886b1bbd17625 | 197,265,728,497,485,320,000,000,000,000,000,000,000 | 24 | Search for dllimported shared libs in the base directory, not cwd.
* loader.c: we don't search the current directory anymore for shared
libraries referenced in DllImport attributes, as it has a slight
security risk. We search in the same directory where the referencing
image was loaded from, instead. Fixes bug# 641915... |
static int xt_get_next_timeout(GSource *source)
{
static int has_compatible_appcontext = -1;
if (has_compatible_appcontext < 0) {
if ((has_compatible_appcontext = xt_has_compatible_appcontext()) == 0)
npw_printf("WARNING: xt_get_next_timeout() is not optimizable\n");
}
int timeout = XT_DEFAULT_TIMEOUT;
if... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 331,893,008,491,105,140,000,000,000,000,000,000,000 | 40 | Support all the new variables added |
static bool plugin_dl_foreach_internal(THD *thd, st_plugin_dl *plugin_dl,
st_maria_plugin *plug,
plugin_foreach_func *func, void *arg)
{
for (; plug->name; plug++)
{
st_plugin_int tmp, *plugin;
tmp.name.str= const_cast<char*>(plu... | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 298,304,987,903,430,400,000,000,000,000,000,000,000 | 34 | MDEV-26323 use-after-poison issue of MariaDB server |
static int __init ext4_init_fs(void)
{
int i, err;
ratelimit_state_init(&ext4_mount_msg_ratelimit, 30 * HZ, 64);
ext4_li_info = NULL;
mutex_init(&ext4_li_mtx);
/* Build-time check for flags consistency */
ext4_check_flag_values();
for (i = 0; i < EXT4_WQ_HASH_SZ; i++) {
mutex_init(&ext4__aio_mutex[i]);
in... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 249,223,875,772,219,330,000,000,000,000,000,000,000 | 65 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
dirvote_add_vote(const char *vote_body, const char **msg_out, int *status_out)
{
networkstatus_t *vote;
networkstatus_voter_info_t *vi;
trusted_dir_server_t *ds;
pending_vote_t *pending_vote = NULL;
const char *end_of_vote = NULL;
int any_failed = 0;
tor_assert(vote_body);
tor_assert(msg_out);
tor_ass... | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 35,903,711,468,001,424,000,000,000,000,000,000,000 | 157 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
R_API void r_bin_java_attribute_free(void /*RBinJavaAttrInfo*/ *a) {
RBinJavaAttrInfo *attr = a;
if (attr) {
IFDBG eprintf ("Deleting attr %s, %p\n", attr->name, attr);
if (attr && attr->metas && attr->metas->type_info) {
RBinJavaAttrMetas *a = attr->metas->type_info;
if (a && a->allocs && a->allocs->delete... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 304,745,169,601,340,000,000,000,000,000,000,000,000 | 14 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
long join_session_keyring(const char *name)
{
const struct cred *old;
struct cred *new;
struct key *keyring;
long ret, serial;
new = prepare_creds();
if (!new)
return -ENOMEM;
old = current_cred();
/* if no name is provided, install an anonymous keyring */
if (!name) {
ret = install_session_keyring_to_cr... | 0 | [
"CWE-20"
] | linux | 363b02dab09b3226f3bd1420dad9c72b79a42a76 | 330,657,846,055,677,640,000,000,000,000,000,000,000 | 69 | KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unione... |
pixConvolve(PIX *pixs,
L_KERNEL *kel,
l_int32 outdepth,
l_int32 normflag)
{
l_int32 i, j, id, jd, k, m, w, h, d, wd, hd, sx, sy, cx, cy, wplt, wpld;
l_int32 val;
l_uint32 *datat, *datad, *linet, *lined;
l_float32 sum;
L_KERNEL *keli, *keln;
PIX *pixt, *pix... | 0 | [] | leptonica | 480f5e74c24fdc2003c42a4e15d1f24c9e6ea469 | 75,288,874,902,795,110,000,000,000,000,000,000,000 | 84 | Fixed issue 21972 (oss-fuzz) Divide by zero in pixBlockconvGray(). |
static void psi_poll_work(struct kthread_work *work)
{
struct kthread_delayed_work *dwork;
struct psi_group *group;
u32 changed_states;
u64 now;
dwork = container_of(work, struct kthread_delayed_work, work);
group = container_of(dwork, struct psi_group, poll_work);
atomic_set(&group->poll_scheduled, 0);
mute... | 0 | [
"CWE-787"
] | linux | 6fcca0fa48118e6d63733eb4644c6cd880c15b8f | 169,589,262,570,446,010,000,000,000,000,000,000,000 | 46 | 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 void kvm_unload_vcpu_mmu(struct kvm_vcpu *vcpu)
{
int r;
r = vcpu_load(vcpu);
BUG_ON(r);
kvm_mmu_unload(vcpu);
vcpu_put(vcpu);
} | 0 | [] | linux | 6d1068b3a98519247d8ba4ec85cd40ac136dbdf9 | 138,464,224,286,433,950,000,000,000,000,000,000,000 | 8 | KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461)
On hosts without the XSAVE support unprivileged local user can trigger
oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest
cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN
ioctl.
invalid opcode: 0000 [#2]... |
static inline void shift_val(php_http_buffer_t *buf, zval *zvalue, const char *vss, size_t vsl, unsigned flags TSRMLS_DC)
{
if (Z_TYPE_P(zvalue) != IS_BOOL) {
zval *tmp = php_http_zsep(1, IS_STRING, zvalue);
prepare_value(flags, tmp TSRMLS_CC);
php_http_buffer_append(buf, vss, vsl);
php_http_buffer_append(buf... | 0 | [
"CWE-399",
"CWE-704"
] | ext-http | 17137d4ab1ce81a2cee0fae842340a344ef3da83 | 252,179,451,543,511,400,000,000,000,000,000,000,000 | 15 | fix bug #73055 |
int ssl_verify_cert_chain(SSL *s, STACK_OF(X509) *sk)
{
X509 *x;
int i = 0;
X509_STORE *verify_store;
X509_STORE_CTX *ctx = NULL;
X509_VERIFY_PARAM *param;
if ((sk == NULL) || (sk_X509_num(sk) == 0))
return 0;
if (s->cert->verify_store)
verify_store = s->cert->verify_store;... | 0 | [
"CWE-835"
] | openssl | 758754966791c537ea95241438454aa86f91f256 | 311,438,916,763,316,600,000,000,000,000,000,000,000 | 88 | Fix invalid handling of verify errors in libssl
In the event that X509_verify() returned an internal error result then
libssl would mishandle this and set rwstate to SSL_RETRY_VERIFY. This
subsequently causes SSL_get_error() to return SSL_ERROR_WANT_RETRY_VERIFY.
That return code is supposed to only ever be returned i... |
bool eof() override { return m_zipFile == nullptr; } | 0 | [
"CWE-22"
] | hhvm | 65c95a01541dd2fbc9c978ac53bed235b5376686 | 265,593,140,755,730,500,000,000,000,000,000,000,000 | 1 | ZipArchive::extractTo bug 70350
Summary:Don't allow upward directory traversal when extracting zip archive files.
Files in zip files with `..` or starting at main root `/` should be normalized
to something where the file being extracted winds up within the directory or
a subdirectory where the actual extraction is ta... |
void CUser::RemoveNetwork(CIRCNetwork* pNetwork) {
auto it = std::find(m_vIRCNetworks.begin(), m_vIRCNetworks.end(), pNetwork);
if (it != m_vIRCNetworks.end()) {
m_vIRCNetworks.erase(it);
}
} | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 319,968,879,071,728,300,000,000,000,000,000,000,000 | 6 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
int main(int argc, char **argv)
{
int exitcode = 0;
int ii = 0, num_cases = 0;
for (num_cases = 0; testcases[num_cases].description; num_cases++) {
/* Just counting */
}
printf("1..%d\n", num_cases);
for (ii = 0; testcases[ii].description != NULL; ++ii) {
fflush(stdout);
#ifnd... | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 176,679,045,843,909,550,000,000,000,000,000,000,000 | 31 | Issue 102: Piping null to the server will crash it |
int avdtp_unregister_sep(struct queue *lseps, struct avdtp_local_sep *sep)
{
if (!sep)
return -EINVAL;
if (sep->stream)
release_stream(sep->stream, sep->stream->session);
DBG("SEP %p unregistered: type:%d codec:%d seid:%d", sep,
sep->info.type, sep->codec, sep->info.seid);
util_clear_uid(&seids, sep->info... | 0 | [
"CWE-703"
] | bluez | 7a80d2096f1b7125085e21448112aa02f49f5e9a | 214,656,754,913,724,180,000,000,000,000,000,000,000 | 17 | avdtp: Fix accepting invalid/malformed capabilities
Check if capabilities are valid before attempting to copy them. |
G_DEFINE_TYPE (FrWindow, fr_window, GTK_TYPE_APPLICATION_WINDOW)
enum {
ARCHIVE_LOADED,
PROGRESS,
READY,
LAST_SIGNAL
}; | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 21,468,184,385,892,170,000,000,000,000,000,000,000 | 9 | libarchive: sanitize filenames before extracting |
static int get_send_sge(struct ib_qp_init_attr *attr, int wqe_size)
{
int max_sge;
if (attr->qp_type == IB_QPT_RC)
max_sge = (min_t(int, wqe_size, 512) -
sizeof(struct mlx5_wqe_ctrl_seg) -
sizeof(struct mlx5_wqe_raddr_seg)) /
sizeof(struct mlx5_wqe_data_seg);
else if (attr->qp_type == IB_QPT_XRC_IN... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 160,866,193,690,915,260,000,000,000,000,000,000,000 | 22 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
ReadNextCell( mat_t *mat, matvar_t *matvar )
{
size_t bytesread = 0, i;
int err;
matvar_t **cells = NULL;
size_t nelems = 1;
err = SafeMulDims(matvar, &nelems);
if ( err ) {
Mat_Critical("Integer multiplication overflow");
return bytesread;
}
matvar->data_size = sizeof(m... | 1 | [
"CWE-190",
"CWE-401"
] | matio | 5fa49ef9fc4368fe3d19b5fdaa36d8fa5e7f4606 | 269,891,821,070,945,960,000,000,000,000,000,000,000 | 294 | Fix integer addition overflow
As reported by https://github.com/tbeu/matio/issues/121 |
ms_escher_read_DgContainer (MSEscherState *state, MSEscherHeader *h)
{
return ms_escher_read_container (state, h, 0, FALSE);
} | 0 | [
"CWE-119"
] | gnumeric | b5480b69345b3c6d56ee0ed9c9e9880bb2a08cdc | 251,912,491,887,759,140,000,000,000,000,000,000,000 | 4 | xls: fuzzed file crash. |
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry,
struct nameidata *nd)
{
struct inode *inode = NULL;
struct hfs_find_data fd;
struct super_block *sb;
hfsplus_cat_entry entry;
int err;
u32 cnid, linkid = 0;
u16 type;
sb = dir->i_sb;
dentry->d_fsdata = NULL;
err = hfs_fi... | 0 | [
"CWE-264"
] | linux-2.6 | 6f24f892871acc47b40dd594c63606a17c714f77 | 250,071,784,079,331,580,000,000,000,000,000,000,000 | 95 | hfsplus: Fix potential buffer overflows
Commit ec81aecb2966 ("hfs: fix a potential buffer overflow") fixed a few
potential buffer overflows in the hfs filesystem. But as Timo Warns
pointed out, these changes also need to be made on the hfsplus
filesystem as well.
Reported-by: Timo Warns <warns@pre-sense.de>
Acked-by... |
static void carray(JF, js_Ast *list)
{
int i = 0;
while (list) {
if (list->a->type != EXP_UNDEF) {
emitline(J, F, list->a);
emitnumber(J, F, i++);
cexp(J, F, list->a);
emitline(J, F, list->a);
emit(J, F, OP_INITPROP);
} else {
++i;
}
list = list->b;
}
} | 0 | [
"CWE-670",
"CWE-119",
"CWE-787"
] | mujs | 1e5479084bc9852854feb1ba9bf68b52cd127e02 | 236,034,126,400,548,650,000,000,000,000,000,000,000 | 16 | Bug 700947: Add missing ENDTRY opcode in try/catch/finally byte code.
In one of the code branches in handling exceptions in the catch block
we forgot to call the ENDTRY opcode to pop the inner hidden try.
This leads to an unbalanced exception stack which can cause a crash
due to us jumping to a stack frame that has al... |
process_request_identities(SocketEntry *e)
{
Identity *id;
struct sshbuf *msg;
int r;
debug2_f("entering");
if ((msg = sshbuf_new()) == NULL)
fatal_f("sshbuf_new failed");
if ((r = sshbuf_put_u8(msg, SSH2_AGENT_IDENTITIES_ANSWER)) != 0 ||
(r = sshbuf_put_u32(msg, idtab->nentries)) != 0)
fatal_fr(r, "co... | 0 | [
"CWE-399",
"CWE-415"
] | openssh-portable | e04fd6dde16de1cdc5a4d9946397ff60d96568db | 88,143,248,712,688,050,000,000,000,000,000,000,000 | 25 | upstream: factor SSH_AGENT_CONSTRAIN_EXTENSION parsing into its own
function and remove an unused variable; ok dtucker@
OpenBSD-Commit-ID: e1a938657fbf7ef0ba5e73b30365734a0cc96559 |
CImgDisplay& assign(const CImgDisplay& disp) {
if (!disp) return assign();
_assign(disp._width,disp._height,disp._title,disp._normalization,disp._is_fullscreen,disp._is_closed);
std::memcpy(_data,disp._data,(cimg::X11_attr().nb_bits==8?sizeof(unsigned char):
ci... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 130,742,941,307,844,820,000,000,000,000,000,000,000 | 8 | Fix other issues in 'CImg<T>::load_bmp()'. |
void free_task(struct task_struct *tsk)
{
prop_local_destroy_single(&tsk->dirties);
account_kernel_stack(tsk->stack, -1);
free_thread_info(tsk->stack);
rt_mutex_debug_task_free(tsk);
ftrace_graph_exit_task(tsk);
free_task_struct(tsk);
} | 0 | [
"CWE-20"
] | linux | f106eee10038c2ee5b6056aaf3f6d5229be6dcdd | 40,052,672,603,596,080,000,000,000,000,000,000,000 | 9 | pids: fix fork_idle() to setup ->pids correctly
copy_process(pid => &init_struct_pid) doesn't do attach_pid/etc.
It shouldn't, but this means that the idle threads run with the wrong
pids copied from the caller's task_struct. In x86 case the caller is
either kernel_init() thread or keventd.
In particular, this means... |
void ESTreeIRGen::emitParameters(ESTree::FunctionLikeNode *funcNode) {
auto *newFunc = curFunction()->function;
LLVM_DEBUG(dbgs() << "IRGen function parameters.\n");
// Create a variable for every parameter.
for (auto paramDecl : funcNode->getSemInfo()->paramNames) {
Identifier paramName = getNameFieldFro... | 0 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 315,444,862,427,844,400,000,000,000,000,000,000,000 | 49 | Correctly restore whether or not a function is an inner generator
Summary:
If a generator was large enough to be lazily compiled, we would lose
that information when reconstituting the function's context. This meant
the function was generated as a regular function instead of a generator.
#utd-hermes-ignore-android
R... |
pango_ot_info_find_script (PangoOTInfo *info,
PangoOTTableType table_type,
PangoOTTag script_tag,
guint *script_index)
{
hb_ot_layout_table_type_t tt = get_hb_table_type (table_type);
return hb_ot_layout_table_find_script (info->layout, tt,
script_tag,
script_i... | 0 | [] | pango | 336bb3201096bdd0494d29926dd44e8cca8bed26 | 249,134,298,450,422,560,000,000,000,000,000,000,000 | 11 | [HB] Remove all references to the old code! |
static inline unsigned is_cached_header(const char *hdr)
{
size_t len;
struct mailbox_header_cache *thdr;
len = strlen(hdr);
if (len >= MAX_CACHED_HEADER_SIZE)
return BIT32_MAX;
thdr = mailbox_header_cache_lookup(hdr, len);
if (thdr)
return thdr->min_cache_version;
/* Don... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 196,398,074,129,194,520,000,000,000,000,000,000,000 | 21 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
static struct md_rdev *find_rdev_rcu(struct mddev *mddev, dev_t dev)
{
struct md_rdev *rdev;
rdev_for_each_rcu(rdev, mddev)
if (rdev->bdev->bd_dev == dev)
return rdev;
return NULL;
} | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 95,410,595,274,735,480,000,000,000,000,000,000,000 | 10 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
static int vidioc_enum_fmt_out(struct file *file, void *fh, struct v4l2_fmtdesc *f)
{
struct v4l2_loopback_device *dev;
const struct v4l2l_format *fmt;
dev = v4l2loopback_getdevice(file);
if (dev->ready_for_capture) {
const __u32 format = dev->pix_format.pixelformat;
/* format has been fixed by the writer, s... | 0 | [
"CWE-787"
] | v4l2loopback | 64a216af4c09c9ba9326057d7e78994271827eff | 83,619,228,195,517,170,000,000,000,000,000,000,000 | 39 | add explicit format specifier to printf() invocations
CWE-134 |
static int tls1_set_shared_sigalgs(SSL *s)
{
const unsigned char *pref, *allow, *conf;
size_t preflen, allowlen, conflen;
size_t nmatch;
TLS_SIGALGS *salgs = NULL;
CERT *c = s->cert;
conf = c->conf_sigalgs;
if (conf)
conflen = c->conf_sigalgslen;
else
{
conf = tls12_sigalgs;
conflen = sizeof(tls12_siga... | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 240,460,979,386,049,200,000,000,000,000,000,000,000 | 44 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
void qeth_core_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
struct qeth_card *card = dev->ml_priv;
strlcpy(info->driver, card->options.layer2 ? "qeth_l2" : "qeth_l3",
sizeof(info->driver));
strlcpy(info->version, "1.0", sizeof(info->version));
strlcpy(info->fw_version, card->info.mcl_lev... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 230,015,335,576,971,500,000,000,000,000,000,000,000 | 13 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
bson_iter_bool (const bson_iter_t *iter) /* IN */
{
BSON_ASSERT (iter);
if (ITER_TYPE (iter) == BSON_TYPE_BOOL) {
return bson_iter_bool_unsafe (iter);
}
return false;
} | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 202,028,171,140,619,600,000,000,000,000,000,000,000 | 10 | CDRIVER-2269 Check for zero string length in codewscope |
query_string(const query_string& qs):
url_(qs.url_)
{
for (auto p : qs.key_value_pairs_)
{
key_value_pairs_.push_back((char*)(p - qs.url_.c_str() + url_.c_str()));
}
} | 0 | [
"CWE-703"
] | Crow | 79eec91f00b5fb7df890d4e84b2f048b0841e044 | 291,187,674,941,250,770,000,000,000,000,000,000,000 | 8 | Fixed issue where an index in qs_parse is incorrectly incremented beyond the maximum possible value |
void set(TokenID in) {
seen |= dex(in);
if (dex(in) & (dex(TokenID::Sid) | dex(TokenID::Effect) |
dex(TokenID::Principal) | dex(TokenID::NotPrincipal) |
dex(TokenID::Action) | dex(TokenID::NotAction) |
dex(TokenID::Resource) | dex(TokenID::NotResource) |
dex(TokenID::Condition) | dex(Token... | 0 | [
"CWE-617"
] | ceph | b3118cabb8060a8cc6a01c4e8264cb18e7b1745a | 285,162,896,465,615,900,000,000,000,000,000,000,000 | 12 | rgw: Remove assertions in IAM Policy
A couple of them could be triggered by user input.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com> |
static void ext4_invalidatepage(struct page *page, unsigned int offset,
unsigned int length)
{
trace_ext4_invalidatepage(page, offset, length);
/* No journalling happens on data buffers when this function is used */
WARN_ON(page_has_buffers(page) && buffer_jbd(page_buffers(page)));
block_invalidatepage(page, ... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 232,499,944,953,972,460,000,000,000,000,000,000,000 | 10 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
struct sk_buff *skb_pad(struct sk_buff *skb, int pad)
{
struct sk_buff *nskb;
/* If the skbuff is non linear tailroom is always zero.. */
if (skb_tailroom(skb) >= pad) {
memset(skb->data+skb->len, 0, pad);
return skb;
}
nskb = skb_copy_expand(skb, skb_headroom(skb), skb_tailroom(skb) + pad, GFP_ATOMIC);
k... | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 128,170,755,445,716,170,000,000,000,000,000,000,000 | 16 | [IPv4/IPv6]: UFO Scatter-gather approach
Attached is kernel patch for UDP Fragmentation Offload (UFO) feature.
1. This patch incorporate the review comments by Jeff Garzik.
2. Renamed USO as UFO (UDP Fragmentation Offload)
3. udp sendfile support with UFO
This patches uses scatter-gather feature of skb to generate l... |
SPL_METHOD(Array, rewind)
{
zval *object = getThis();
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
spl_array_rewind(intern TSRMLS_CC);
} | 1 | [] | php-src | b7fa67742cd8d2b0ca0c0273b157f6ffee9ad6e2 | 330,217,919,528,450,320,000,000,000,000,000,000,000 | 11 | Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items) |
static int netlink_broadcast_deliver(struct sock *sk, struct sk_buff *skb)
{
struct netlink_sock *nlk = nlk_sk(sk);
if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf &&
!test_bit(0, &nlk->state)) {
skb_set_owner_r(skb, sk);
__netlink_sendskb(sk, skb);
return atomic_read(&sk->sk_rmem_alloc) > (sk->sk_rc... | 0 | [
"CWE-287",
"CWE-284"
] | linux | e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea | 191,468,522,024,546,280,000,000,000,000,000,000,000 | 12 | af_netlink: force credentials passing [CVE-2012-3520]
Pablo Neira Ayuso discovered that avahi and
potentially NetworkManager accept spoofed Netlink messages because of a
kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data
to the receiver if the sender did not provide such data, instead of not
includ... |
static int build_request(struct ceph_auth_client *ac, void *buf, void *end)
{
return 0;
} | 0 | [] | ceph-client | 2cb33cac622afde897aa02d3dcd9fbba8bae839e | 72,622,570,501,749,890,000,000,000,000,000,000,000 | 4 | libceph: Fix NULL pointer dereference in auth client code
A malicious monitor can craft an auth reply message that could cause a
NULL function pointer dereference in the client's kernel.
To prevent this, the auth_none protocol handler needs an empty
ceph_auth_client_ops->build_request() function.
CVE-2013-1059
Sign... |
static void nfs4_slot_sequence_acked(struct nfs4_slot *slot,
u32 seqnr)
{
slot->seq_nr_highest_sent = seqnr;
slot->seq_nr_last_acked = seqnr;
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 74,101,109,266,512,420,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... |
int CL_ServerStatus( char *serverAddress, char *serverStatusString, int maxLen ) {
int i;
netadr_t to;
serverStatus_t *serverStatus;
// if no server address then reset all server status requests
if ( !serverAddress ) {
for (i = 0; i < MAX_SERVERSTATUSREQUESTS; i++) {
cl_serverStatusList[i].address.port = 0;
... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 146,317,776,836,108,150,000,000,000,000,000,000,000 | 57 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
encode_restorefh(struct xdr_stream *xdr)
{
__be32 *p;
RESERVE_SPACE(4);
WRITE32(OP_RESTOREFH);
return 0;
} | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 3,602,898,935,256,854,400,000,000,000,000,000,000 | 9 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
iteration_early_exit()
{
return (requested_continue || requested_break);
} | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 175,724,569,915,673,850,000,000,000,000,000,000,000 | 4 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
void skcipher_geniv_free(struct crypto_instance *inst)
{
crypto_drop_skcipher(crypto_instance_ctx(inst));
kfree(inst);
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 178,399,887,395,798,370,000,000,000,000,000,000,000 | 5 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
static Image *ReadMIFFImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
#define BZipMaxExtent(x) ((x)+((x)/100)+600)
#define LZMAMaxExtent(x) ((x)+((x)/3)+128)
#define ZipMaxExtent(x) ((x)+(((x)+7) >> 3)+(((x)+63) >> 6)+11)
#if defined(MAGICKCORE_BZLIB_DELEGATE)
bz_stream
bzip_info;
#endif
c... | 1 | [
"CWE-770"
] | ImageMagick | 30a74ed25a4890acfa94f452d653d54c9628c87e | 224,386,054,154,436,650,000,000,000,000,000,000,000 | 1,254 | https://github.com/ImageMagick/ImageMagick/issues/545 |
static FxInfo **AcquireFxThreadSet(const Image *image,const char *expression,
ExceptionInfo *exception)
{
char
*fx_expression;
FxInfo
**fx_info;
double
alpha;
register ssize_t
i;
size_t
number_threads;
number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
fx_info=(FxIn... | 0 | [
"CWE-119",
"CWE-703"
] | ImageMagick | 3cbfb163cff9e5b8cdeace8312e9bfee810ed02b | 290,108,087,446,838,950,000,000,000,000,000,000,000 | 48 | https://github.com/ImageMagick/ImageMagick/issues/296 |
mlist_free(struct mlist *mlist)
{
struct mlist *ml, *next;
if (mlist == NULL)
return;
ml = mlist->next;
for (ml = mlist->next; (next = ml->next) != NULL; ml = next) {
if (ml->map)
apprentice_unmap(ml->map);
free(ml);
if (ml == mlist)
break;
}
} | 0 | [
"CWE-399"
] | file | 90018fe22ff8b74a22fcd142225b0a00f3f12677 | 251,501,037,596,685,600,000,000,000,000,000,000,000 | 16 | bump recursion to 15, and allow it to be set from the command line. |
process_compflags(
spellinfo_T *spin,
afffile_T *aff,
char_u *compflags)
{
char_u *p;
char_u *prevp;
unsigned flag;
compitem_T *ci;
int id;
int len;
char_u *tp;
char_u key[AH_KEY_LEN];
hashitem_T *hi;
// Make room for the old and the new compflags, concatenated wit... | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 167,793,144,578,947,960,000,000,000,000,000,000,000 | 76 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
QPDFObjectHandle::insertItem(int at, QPDFObjectHandle const& item)
{
assertArray();
return dynamic_cast<QPDF_Array*>(obj.getPointer())->insertItem(at, item);
} | 0 | [
"CWE-835"
] | qpdf | afe0242b263a9e1a8d51dd81e42ab6de2e5127eb | 84,373,538,496,353,010,000,000,000,000,000,000,000 | 5 | Handle object ID 0 (fixes #99)
This is CVE-2017-9208.
The QPDF library uses object ID 0 internally as a sentinel to
represent a direct object, but prior to this fix, was not blocking
handling of 0 0 obj or 0 0 R as a special case. Creating an object in
the file with 0 0 obj could cause various infinite loops. The PDF... |
unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask)
{
const struct block_device_operations *bdops = disk->fops;
struct disk_events *ev = disk->ev;
unsigned int pending;
unsigned int clearing = mask;
if (!ev) {
/* for drivers still using the old ->media_changed method */
if ((mask & DISK_EV... | 0 | [
"CWE-416"
] | linux-stable | 77da160530dd1dc94f6ae15a981f24e5f0021e84 | 209,281,917,167,385,240,000,000,000,000,000,000,000 | 43 | block: fix use-after-free in seq file
I got a KASAN report of use-after-free:
==================================================================
BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508
Read of size 8 by task trinity-c1/315
======================================... |
static int decode_lock_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
{
stateid->type = NFS4_LOCK_STATEID_TYPE;
return decode_stateid(xdr, stateid);
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 237,084,235,347,639,700,000,000,000,000,000,000,000 | 5 | 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 MagickBooleanType WriteHDRImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
char
header[MagickPathExtent];
const char
*property;
MagickBooleanType
status;
register const Quantum
*p;
register ssize_t
i,
x;
size_t
length;
ssize_t
count... | 1 | [
"CWE-190"
] | ImageMagick | 7db3fa20893d557259da6e99e111954de83d2495 | 27,546,864,259,041,620,000,000,000,000,000,000,000 | 170 | https://github.com/ImageMagick/ImageMagick/issues/1713 |
void e2fsck_rehash_dir_later(e2fsck_t ctx, ext2_ino_t ino)
{
if (!ctx->dirs_to_hash)
ext2fs_u32_list_create(&ctx->dirs_to_hash, 50);
if (ctx->dirs_to_hash)
ext2fs_u32_list_add(ctx->dirs_to_hash, ino);
} | 0 | [
"CWE-787"
] | e2fsprogs | 8dd73c149f418238f19791f9d666089ef9734dff | 181,533,073,821,470,200,000,000,000,000,000,000,000 | 7 | e2fsck: abort if there is a corrupted directory block when rehashing
In e2fsck pass 3a, when we are rehashing directories, at least in
theory, all of the directories should have had corruptions with
respect to directory entry structure fixed. However, it's possible
(for example, if the user declined a fix) that we ca... |
void kvm_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, unsigned int vector)
{
struct kvm_segment cs;
kvm_get_segment(vcpu, &cs, VCPU_SREG_CS);
cs.selector = vector << 8;
cs.base = vector << 12;
kvm_set_segment(vcpu, &cs, VCPU_SREG_CS);
kvm_rip_write(vcpu, 0);
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-120"
] | linux | a08d3b3b99efd509133946056531cdf8f3a0c09b | 228,309,572,226,133,000,000,000,000,000,000,000,000 | 10 | kvm: x86: fix emulator buffer overflow (CVE-2014-0049)
The problem occurs when the guest performs a pusha with the stack
address pointing to an mmio address (or an invalid guest physical
address) to start with, but then extending into an ordinary guest
physical address. When doing repeated emulated pushes
emulator_re... |
static void prepare_context(void)
{
memset(&ctx, 0, sizeof(ctx));
ctx.cfg.agefile = "info/web/last-modified";
ctx.cfg.nocache = 0;
ctx.cfg.cache_size = 0;
ctx.cfg.cache_max_create_time = 5;
ctx.cfg.cache_root = CGIT_CACHE_ROOT;
ctx.cfg.cache_about_ttl = 15;
ctx.cfg.cache_snapshot_ttl = 5;
ctx.cfg.cache_repo_tt... | 0 | [] | cgit | 1c581a072651524f3b0d91f33e22a42c4166dd96 | 42,223,263,377,572,096,000,000,000,000,000,000,000 | 78 | ui-blob: Do not accept mimetype from user |
static void perf_group_attach(struct perf_event *event)
{
struct perf_event *group_leader = event->group_leader, *pos;
/*
* We can have double attach due to group movement in perf_event_open.
*/
if (event->attach_state & PERF_ATTACH_GROUP)
return;
event->attach_state |= PERF_ATTACH_GROUP;
if (group_leader... | 0 | [
"CWE-284",
"CWE-264"
] | linux | f63a8daa5812afef4f06c962351687e1ff9ccb2b | 336,436,646,339,221,900,000,000,000,000,000,000,000 | 29 | perf: Fix event->ctx locking
There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.
It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.
What I did fail at is sensible runtime checks on the use of
... |
check_compat_entry_size_and_hooks(struct compat_ipt_entry *e,
struct xt_table_info *newinfo,
unsigned int *size,
const unsigned char *base,
const unsigned char *limit,
const unsigned int *hook_entries,
const unsigned int *underflows,
const char *name)
{
struct xt_entry_match *... | 1 | [
"CWE-284",
"CWE-264"
] | linux | ce683e5f9d045e5d67d1312a42b359cb2ab2a13c | 145,401,815,255,814,440,000,000,000,000,000,000,000 | 89 | netfilter: x_tables: check for bogus target offset
We're currently asserting that targetoff + targetsize <= nextoff.
Extend it to also check that targetoff is >= sizeof(xt_entry).
Since this is generic code, add an argument pointing to the start of the
match/target, we can then derive the base structure size from the... |
move_file_to_low_priority_queue (NautilusDirectory *directory,
NautilusFile *file)
{
/* Must add before removing to avoid ref underflow */
nautilus_file_queue_enqueue (directory->details->low_priority_queue,
file);
nautilus_file_queue_re... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 37,504,479,093,243,910,000,000,000,000,000,000,000 | 9 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.