func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void enable_keepalive(int sockfd)
{
int ka = 1;
if (setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &ka, sizeof(ka)) < 0)
fprintf(stderr, "unable to set SO_KEEPALIVE on socket: %s\n",
strerror(errno));
} | 0 | [
"CWE-706"
] | git | f82a97eb9197c1e3768e72648f37ce0ca3233734 | 72,578,412,397,206,050,000,000,000,000,000,000,000 | 8 | mingw: handle `subst`-ed "DOS drives"
Over a decade ago, in 25fe217b86c (Windows: Treat Windows style path
names., 2008-03-05), Git was taught to handle absolute Windows paths,
i.e. paths that start with a drive letter and a colon.
Unbeknownst to us, while drive letters of physical drives are limited to
letters of th... |
static inline int io_import_iovec(int rw, struct io_kiocb *req,
struct iovec **iovec, struct io_rw_state *s,
unsigned int issue_flags)
{
*iovec = __io_import_iovec(rw, req, s, issue_flags);
if (unlikely(IS_ERR(*iovec)))
return PTR_ERR(*iovec);
iov_iter_save_state(&s->iter, &s->iter_state);
return 0;
... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 175,038,756,660,150,200,000,000,000,000,000,000,000 | 11 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
int ext4_get_block_dax(struct inode *inode, sector_t iblock,
struct buffer_head *bh_result, int create)
{
int flags = EXT4_GET_BLOCKS_PRE_IO | EXT4_GET_BLOCKS_UNWRIT_EXT;
if (create)
flags |= EXT4_GET_BLOCKS_CREATE;
ext4_debug("ext4_get_block_dax: inode %lu, create flag %d\n",
inode->i_ino, create);
ret... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 187,401,123,383,482,370,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... |
ia64_do_show_stack (struct unw_frame_info *info, void *arg)
{
unsigned long ip, sp, bsp;
char buf[128]; /* don't make it so big that it overflows the stack! */
printk("\nCall Trace:\n");
do {
unw_get_ip(info, &ip);
if (ip == 0)
break;
unw_get_sp(info, &sp);
unw_get_bsp(info, &bsp);
snprintf(buf, si... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 21,318,235,978,887,850,000,000,000,000,000,000,000 | 20 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static void domain_exit(struct dmar_domain *domain)
{
struct page *freelist = NULL;
/* Domain 0 is reserved, so dont process it */
if (!domain)
return;
/* Remove associated devices and clear attached or cached domains */
rcu_read_lock();
domain_remove_dev_info(domain);
rcu_read_unlock();
/* destroy iovas *... | 0 | [] | linux | fb58fdcd295b914ece1d829b24df00a17a9624bc | 269,059,008,887,144,630,000,000,000,000,000,000,000 | 22 | iommu/vt-d: Do not enable ATS for untrusted devices
Currently Linux automatically enables ATS (Address Translation Service)
for any device that supports it (and IOMMU is turned on). ATS is used to
accelerate DMA access as the device can cache translations locally so
there is no need to do full translation on IOMMU sid... |
peek_from_buf(char *string, size_t string_len, const buf_t *buf)
{
chunk_t *chunk;
tor_assert(string);
/* make sure we don't ask for too much */
tor_assert(string_len <= buf->datalen);
/* assert_buf_ok(buf); */
chunk = buf->head;
while (string_len) {
size_t copy = string_len;
tor_assert(chunk);
... | 0 | [] | tor | 19df037e53331ae528b876f225be08f198e0f8b6 | 337,030,088,100,731,000,000,000,000,000,000,000,000 | 21 | Log malformed hostnames in socks5 request respecting SafeLogging |
static void FVMenuPasteAfter(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
int pos = FVAnyCharSelected(fv);
if ( pos<0 )
return;
PasteIntoFV(&fv->b,2,NULL);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 130,040,170,607,535,270,000,000,000,000,000,000,000 | 7 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
R_API int r_core_seek_size(RCore *core, ut64 addr, int bsize) {
ut8 *bump;
int ret = false;
if (bsize < 0) {
return false;
}
if (bsize == core->blocksize) {
return true;
}
if (r_sandbox_enable (0)) {
// TODO : restrict to filesize?
if (bsize > 1024*32) {
eprintf ("Sandbox mode restricts blocksize bigg... | 0 | [
"CWE-415",
"CWE-703"
] | radare2 | cb8b683758edddae2d2f62e8e63a738c39f92683 | 114,196,009,407,638,830,000,000,000,000,000,000,000 | 41 | Fix #16303 - c->table_query double free (#16318) |
static int btrfs_flush_all_pending_stuffs(struct btrfs_trans_handle *trans,
struct btrfs_root *root)
{
int flush_on_commit = btrfs_test_opt(root, FLUSHONCOMMIT);
int snap_pending = 0;
int ret;
if (!flush_on_commit) {
spin_lock(&root->fs_info->trans_lock);
if (!list_empty(&trans->transaction->pending_sna... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 139,679,051,597,311,430,000,000,000,000,000,000,000 | 41 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... |
static struct dentry *bm_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return mount_single(fs_type, flags, data, bm_fill_super);
} | 0 | [
"CWE-200"
] | linux-2.6 | b66c5984017533316fd1951770302649baf1aa33 | 12,898,433,445,818,138,000,000,000,000,000,000,000 | 5 | exec: do not leave bprm->interp on stack
If a series of scripts are executed, each triggering module loading via
unprintable bytes in the script header, kernel stack contents can leak
into the command line.
Normally execution of binfmt_script and binfmt_misc happens recursively.
However, when modules are enabled, and... |
RangeVarCallbackOwnsRelation(const RangeVar *relation,
Oid relId, Oid oldRelId, void *arg)
{
HeapTuple tuple;
/* Nothing to do if the relation was not found. */
if (!OidIsValid(relId))
return;
tuple = SearchSysCache1(RELOID, ObjectIdGetDatum(relId));
if (!HeapTupleIsValid(tuple)) /* should not happen ... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 207,261,884,499,609,000,000,000,000,000,000,000,000 | 26 | 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... |
inline void reset_binlog_local_stmt_filter()
{
m_binlog_filter_state= BINLOG_FILTER_UNKNOWN;
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 41,043,243,829,685,814,000,000,000,000,000,000,000 | 4 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
static sci_t dev_to_sci(struct net_device *dev, __be16 port)
{
return make_sci(dev->dev_addr, port);
} | 0 | [
"CWE-119"
] | net | 5294b83086cc1c35b4efeca03644cf9d12282e5b | 222,275,260,814,380,200,000,000,000,000,000,000,000 | 4 | macsec: dynamically allocate space for sglist
We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80... |
dns_zone_getstatscounters(dns_zone_t *zone) {
/*
* This function is obsoleted.
*/
UNUSED(zone);
return (NULL);
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 37,734,046,966,561,256,000,000,000,000,000,000,000 | 7 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
static int hevc_decode_extradata(HEVCContext *s, uint8_t *buf, int length, int first)
{
int ret, i;
ret = ff_hevc_decode_extradata(buf, length, &s->ps, &s->sei, &s->is_nalff,
&s->nal_length_size, s->avctx->err_recognition,
s->apply_defdispwi... | 0 | [
"CWE-476"
] | FFmpeg | 9ccc633068c6fe76989f487c8932bd11886ad65b | 231,605,713,565,619,550,000,000,000,000,000,000,000 | 21 | avcodec/hevcdec: Avoid only partly skiping duplicate first slices
Fixes: NULL pointer dereference and out of array access
Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432
Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304
This also fi... |
uint WavInFile::getSampleRate() const
{
return header.format.sample_rate;
}
| 0 | [
"CWE-119"
] | soundtouch | 9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e | 208,237,717,415,294,550,000,000,000,000,000,000,000 | 4 | Added minimum size check for WAV header block lengh values |
static void hwsim_mcast_config_msg(struct sk_buff *mcast_skb,
struct genl_info *info)
{
if (info)
genl_notify(&hwsim_genl_family, mcast_skb, info,
HWSIM_MCGRP_CONFIG, GFP_KERNEL);
else
genlmsg_multicast(&hwsim_genl_family, mcast_skb, 0,
HWSIM_MCGRP_CONFIG, GFP_KERNEL);
} | 0 | [
"CWE-703",
"CWE-772"
] | linux | 0ddcff49b672239dda94d70d0fcf50317a9f4b51 | 300,957,162,099,355,400,000,000,000,000,000,000,000 | 10 | mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
'hwname' is malloced in hwsim_new_radio_nl() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.
Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length")
Signed-off-by: Wei Yongjun <we... |
static int cypress_port_remove(struct usb_serial_port *port)
{
struct cypress_private *priv;
priv = usb_get_serial_port_data(port);
kfifo_free(&priv->write_fifo);
kfree(priv);
return 0;
} | 0 | [
"CWE-703"
] | linux | c55aee1bf0e6b6feec8b2927b43f7a09a6d5f754 | 281,114,904,147,195,740,000,000,000,000,000,000,000 | 11 | USB: cypress_m8: add endpoint sanity check
An attack using missing endpoints exists.
CVE-2016-3137
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
AP_DECLARE(void) ap_hook_check_authz(ap_HOOK_auth_checker_t *pf,
const char * const *aszPre,
const char * const *aszSucc,
int nOrder, int type)
{
if ((type & AP_AUTH_INTERNAL_MASK) == AP_AUTH_INTERNAL_PER_... | 0 | [] | httpd | eb986059aa5aa0b6c1d52714ea83e3dd758afdd1 | 29,165,840,634,847,450,000,000,000,000,000,000,000 | 11 | Merge r1889036 from trunk:
legacy default slash-matching behavior w/ 'MergeSlashes OFF'
Submitted By: Ruediger Pluem
Reviewed By: covener, rpluem, ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1889038 13f79535-47bb-0310-9956-ffa450edef68 |
static bool Run(OpKernelContext* ctx, const Tensor& input,
const Tensor& filter, int batch, int input_rows,
int input_cols, int in_depth, int filter_rows,
int filter_cols, int pad_rows, int pad_cols, int out_rows,
int out_cols, int out_depth, int... | 0 | [
"CWE-369"
] | tensorflow | b12aa1d44352de21d1a6faaf04172d8c2508b42b | 147,180,028,757,827,790,000,000,000,000,000,000,000 | 35 | Fix one more FPE.
PiperOrigin-RevId: 369346568
Change-Id: I840fd575962adc879713a4c9cc59e6da3331caa7 |
ves_icall_System_GC_KeepAlive (MonoObject *obj)
{
MONO_ARCH_SAVE_REGS;
/*
* Does nothing.
*/
} | 0 | [
"CWE-399",
"CWE-264"
] | mono | 8eb1189099e02372fd45ca1c67230eccf1edddc0 | 188,999,206,290,129,300,000,000,000,000,000,000,000 | 8 | Implement a reference queue API.
* gc.c: A reference queue allows one to queue
callbcks for when objects are collected.
It allows for safe cleanup of objects that can
only be done when it is effectively collected.
The major difference with regular finalization
is that the collector makes sure the object
was col... |
psutil_ppid_map(PyObject *self, PyObject *args) {
PyObject *py_pid = NULL;
PyObject *py_ppid = NULL;
PyObject *py_retdict = PyDict_New();
HANDLE handle = NULL;
PROCESSENTRY32 pe = {0};
pe.dwSize = sizeof(PROCESSENTRY32);
if (py_retdict == NULL)
return NULL;
handle = CreateToolhe... | 0 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 303,387,918,423,285,680,000,000,000,000,000,000,000 | 42 | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)
These files contain loops that convert system data into python objects
and during the process they create objects and dereference their
refcounts after they have been added to the resulting list.
However, in case of errors during the creat... |
ex_spell(exarg_T *eap)
{
spell_add_word(eap->arg, (int)STRLEN(eap->arg),
eap->cmdidx == CMD_spellwrong ? SPELL_ADD_BAD :
eap->cmdidx == CMD_spellrare ? SPELL_ADD_RARE : SPELL_ADD_GOOD,
eap->forceit ? 0 : (int)eap->line2,
eap->cmdidx == CMD_spellundo);
} | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 108,549,948,667,649,260,000,000,000,000,000,000,000 | 8 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc)
{
TIFFPredictorState* sp = PredictorState(tif);
tmsize_t stride = sp->stride;
uint32 *wp = (uint32*) cp0;
tmsize_t wc = cc/4;
if((cc%(4*stride))!=0)
{
TIFFErrorExt(tif->tif_clientdata, "horDiff32",
"%s", "(cc%(4*stride))!=0");
... | 0 | [
"CWE-119",
"CWE-787"
] | libtiff | 3ca657a8793dd011bf869695d72ad31c779c3cc1 | 142,157,480,448,131,800,000,000,000,000,000,000,000 | 24 | * libtiff/tif_predict.h, libtiff/tif_predict.c:
Replace assertions by runtime checks to avoid assertions in debug mode,
or buffer overflows in release mode. Can happen when dealing with
unusual tile size like YCbCr with subsampling. Reported as MSVR 35105
by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities &... |
static void test_map_wrapping(void)
{
uc_engine *uc;
OK(uc_open(UC_ARCH_X86, UC_MODE_64, &uc));
uc_assert_err(UC_ERR_ARG, uc_mem_map(uc, (~0ll - 0x4000) & ~0xfff, 0x8000,
UC_PROT_ALL));
OK(uc_close(uc));
} | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 58,526,297,347,406,890,000,000,000,000,000,000,000 | 10 | Fix crash when mapping a big memory and calling uc_close |
xfs_attr_leaf_removename(xfs_da_args_t *args)
{
xfs_inode_t *dp;
struct xfs_buf *bp;
int error, committed, forkoff;
trace_xfs_attr_leaf_removename(args);
/*
* Remove the attribute.
*/
dp = args->dp;
args->blkno = 0;
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
if (error)
re... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59 | 160,456,693,485,461,100,000,000,000,000,000,000,000 | 52 | xfs: remote attribute overwrite causes transaction overrun
Commit e461fcb ("xfs: remote attribute lookups require the value
length") passes the remote attribute length in the xfs_da_args
structure on lookup so that CRC calculations and validity checking
can be performed correctly by related code. This, unfortunately h... |
get_rrset_trust(struct msg_parse* msg, struct rrset_parse* rrset)
{
uint16_t AA = msg->flags & BIT_AA;
if(rrset->section == LDNS_SECTION_ANSWER) {
if(AA) {
/* RFC2181 says remainder of CNAME chain is nonauth*/
if(msg->rrset_first &&
msg->rrset_first->section==LDNS_SECTION_ANSWER
&& msg->rrset_first->... | 0 | [
"CWE-787"
] | unbound | 6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640 | 20,433,556,955,397,946,000,000,000,000,000,000,000 | 35 | - Fix Out of Bound Write Compressed Names in rdata_copy(),
reported by X41 D-Sec. |
static int handle_preemption_timer(struct kvm_vcpu *vcpu)
{
kvm_lapic_expired_hv_timer(vcpu);
return 1;
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 38,601,276,441,311,460,000,000,000,000,000,000,000 | 5 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
openpgp_md_algo_name (int algo)
{
switch (algo)
{
case DIGEST_ALGO_MD5: return "MD5";
case DIGEST_ALGO_SHA1: return "SHA1";
case DIGEST_ALGO_RMD160: return "RIPEMD160";
case DIGEST_ALGO_SHA256: return "SHA256";
case DIGEST_ALGO_SHA384: return "SHA384";
case DIGEST_ALGO_SHA512: return ... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 36,732,091,523,518,677,000,000,000,000,000,000,000 | 14 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static ssize_t match_busid_show(struct device_driver *drv, char *buf)
{
int i;
char *out = buf;
spin_lock(&busid_table_lock);
for (i = 0; i < MAX_BUSID; i++)
if (busid_table[i].name[0])
out += sprintf(out, "%s ", busid_table[i].name);
spin_unlock(&busid_table_lock);
out += sprintf(out, "\n");
return out -... | 1 | [
"CWE-362"
] | linux | 22076557b07c12086eeb16b8ce2b0b735f7a27e7 | 206,405,040,670,966,400,000,000,000,000,000,000,000 | 14 | usbip: usbip_host: fix NULL-ptr deref and use-after-free errors
usbip_host updates device status without holding lock from stub probe,
disconnect and rebind code paths. When multiple requests to import a
device are received, these unprotected code paths step all over each
other and drive fails with NULL-ptr deref and ... |
wrap_nettle_mac_update(void *_ctx, const void *text, size_t textsize)
{
struct nettle_mac_ctx *ctx = _ctx;
ctx->update(ctx->ctx_ptr, textsize, text);
return GNUTLS_E_SUCCESS;
} | 0 | [
"CWE-476"
] | gnutls | 3db352734472d851318944db13be73da61300568 | 51,318,898,369,861,940,000,000,000,000,000,000,000 | 8 | wrap_nettle_hash_fast: avoid calling _update with zero-length input
As Nettle's hash update functions internally call memcpy, providing
zero-length input may cause undefined behavior.
Signed-off-by: Daiki Ueno <ueno@gnu.org> |
static int pinctrl_copy_args(const struct device_node *np,
const __be32 *list,
int index, int nr_cells, int nr_elem,
struct of_phandle_args *out_args)
{
int i;
memset(out_args, 0, sizeof(*out_args));
out_args->np = (struct device_node *)np;
out_args->args_count = nr_cells + 1;
if (index >... | 0 | [
"CWE-125"
] | linux | be4c60b563edee3712d392aaeb0943a768df7023 | 155,445,517,768,455,250,000,000,000,000,000,000,000 | 21 | pinctrl: devicetree: Avoid taking direct reference to device name string
When populating the pinctrl mapping table entries for a device, the
'dev_name' field for each entry is initialised to point directly at the
string returned by 'dev_name()' for the device and subsequently used by
'create_pinctrl()' when looking up... |
void ACL_internal_schema_registry::register_schema
(const LEX_STRING *name, const ACL_internal_schema_access *access)
{
DBUG_ASSERT(m_registry_array_size < array_elements(registry_array));
/* Not thread safe, and does not need to be. */
registry_array[m_registry_array_size].m_name= name;
registry_array[m_reg... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 146,878,702,615,179,130,000,000,000,000,000,000,000 | 10 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
static void free_ctx(struct rcu_head *head)
{
struct perf_event_context *ctx;
ctx = container_of(head, struct perf_event_context, rcu_head);
kfree(ctx->task_ctx_data);
kfree(ctx);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 258,270,328,356,278,750,000,000,000,000,000,000,000 | 8 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
kadm5_setkey_principal_3(void *server_handle,
krb5_principal principal,
krb5_boolean keepold,
int n_ks_tuple, krb5_key_salt_tuple *ks_tuple,
krb5_keyblock *keyblocks,
int n_keys)
{
krb5_db_en... | 0 | [
"CWE-522",
"CWE-255"
] | krb5 | af0ed4df4dfae762ab5fb605f5a0c8f59cb4f6ca | 311,031,084,015,743,630,000,000,000,000,000,000,000 | 225 | Return only new keys in randkey [CVE-2014-5351]
In kadmind's randkey operation, if a client specifies the keepold
flag, do not include the preserved old keys in the response.
CVE-2014-5351:
An authenticated remote attacker can retrieve the current keys for a
service principal when generating a new set of keys for th... |
char *am_getfile(apr_pool_t *conf, server_rec *s, const char *file)
{
apr_status_t rv;
char buffer[512];
apr_finfo_t finfo;
char *data;
apr_file_t *fd;
apr_size_t nbytes;
if (file == NULL)
return NULL;
if ((rv = apr_file_open(&fd, file, APR_READ, 0, conf)) != 0) {
ap_lo... | 0 | [
"CWE-200"
] | mod_auth_mellon | 47a767d5f37d1d3a1c004abbf8bb80d1b7eab328 | 107,421,529,952,297,620,000,000,000,000,000,000,000 | 42 | Ensure that all generated session IDs are cryptographically strong.
We used to call RAND_pseudo_bytes, which will generate cryptographically
strong random bytes in most cases. Under memory pressure or other error
conditions, it can return weak random bytes.
It is unlikely that there is a way for an attacker to set up... |
static void mac80211_hwsim_sta_notify(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
enum sta_notify_cmd cmd,
struct ieee80211_sta *sta)
{
hwsim_check_magic(vif);
switch (cmd) {
case STA_NOTIFY_SLEEP:
case STA_NOTIFY_AWAKE:
/* TODO: make good use of these flags */
break;
def... | 0 | [
"CWE-703",
"CWE-772"
] | linux | 0ddcff49b672239dda94d70d0fcf50317a9f4b51 | 153,017,522,857,786,460,000,000,000,000,000,000,000 | 17 | mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
'hwname' is malloced in hwsim_new_radio_nl() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.
Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length")
Signed-off-by: Wei Yongjun <we... |
static int xen_blkbk_parse_indirect(struct blkif_request *req,
struct pending_req *pending_req,
struct seg_buf seg[],
struct phys_req *preq)
{
struct grant_page **pages = pending_req->indirect_pages;
struct xen_blkif_ring *ring = pending_req->ring;
int indirect_grefs, rc, n, nseg, i;
struct ... | 0 | [
"CWE-200"
] | linux | 089bc0143f489bd3a4578bdff5f4ca68fb26f341 | 26,432,030,577,503,870,000,000,000,000,000,000,000 | 52 | xen-blkback: don't leak stack data via response ring
Rather than constructing a local structure instance on the stack, fill
the fields directly on the shared ring, just like other backends do.
Build on the fact that all response structure flavors are actually
identical (the old code did make this assumption too).
Thi... |
reAnchorPos(Buffer *buf, Line *l, char *p1, char *p2,
Anchor *(*anchorproc) (Buffer *, char *, char *, int, int))
{
Anchor *a;
int spos, epos;
int i, hseq = -2;
spos = p1 - l->lineBuf;
epos = p2 - l->lineBuf;
for (i = spos; i < epos; i++) {
if (l->propBuf[i] & (PE_ANCHOR | PE_FORM))
... | 0 | [
"CWE-119"
] | w3m | 4e464819dd360ffd3d58fa2a89216fe413cfcc74 | 106,449,511,916,005,260,000,000,000,000,000,000,000 | 41 | Prevent segfault due to buffer overflows in addMultirowsForm
Bug-Debian: https://github.com/tats/w3m/issues/21
Bug-Debian: https://github.com/tats/w3m/issues/26 |
int blobAddData(blob *b, const unsigned char *data, size_t len)
{
#if HAVE_CLI_GETPAGESIZE
static int pagesize = 0;
int growth;
#endif
assert(b != NULL);
#ifdef CL_DEBUG
assert(b->magic == BLOBCLASS);
#endif
assert(data != NULL);
if (len == 0)
return 0;
if (b->isClosed) {
... | 0 | [
"CWE-476"
] | clamav-devel | 8bb3716be9c7ab7c6a3a1889267b1072f48af87b | 64,282,054,212,846,220,000,000,000,000,000,000,000 | 96 | fuzz-22348 null deref in egg utf8 conversion
Corrected memory leaks and a null dereference in the egg utf8 conversion. |
LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value) {
bool is_oop = type == T_OBJECT || type == T_ARRAY;
LIR_Opr result = new_register(type);
value.load_item();
// Because we want a 2-arg form of xchg and xadd
__ move(value.result(), result);
assert(type == T_INT || is_oop LP64_O... | 0 | [] | jdk11u-dev | 9a62b8af48af6c506d2fc4a3482116de26357f16 | 260,635,689,366,168,100,000,000,000,000,000,000,000 | 16 | 8272014: Better array indexing
Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f |
ElectronBrowserClient::CreateThrottlesForNavigation(
content::NavigationHandle* handle) {
std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
throttles.push_back(std::make_unique<ElectronNavigationThrottle>(handle));
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
throttles.push_back(
std::m... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 34,138,063,843,484,996,000,000,000,000,000,000,000 | 12 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
inline int web_client_api_request_v1_alarm_variables(RRDHOST *host, struct web_client *w, char *url) {
return web_client_api_request_single_chart(host, w, url, health_api_v1_chart_variables2json);
} | 0 | [
"CWE-113",
"CWE-200",
"CWE-94",
"CWE-74"
] | netdata | 92327c9ec211bd1616315abcb255861b130b97ca | 183,219,485,979,015,800,000,000,000,000,000,000,000 | 3 | fixed vulnerabilities identified by red4sec.com (#4521) |
xfs_reclaim_inodes(
xfs_mount_t *mp,
int mode)
{
int nr_to_scan = INT_MAX;
return xfs_reclaim_inodes_ag(mp, mode, &nr_to_scan);
} | 0 | [
"CWE-476"
] | linux | afca6c5b2595fc44383919fba740c194b0b76aff | 26,896,924,714,377,330,000,000,000,000,000,000,000 | 8 | xfs: validate cached inodes are free when allocated
A recent fuzzed filesystem image cached random dcache corruption
when the reproducer was run. This often showed up as panics in
lookup_slow() on a null inode->i_ops pointer when doing pathwalks.
BUG: unable to handle kernel NULL pointer dereference at 00000000000000... |
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
{
YYFPRINTF (yyoutput, "%s %s (",
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep);
YYFPRINTF (yyoutput, ")");
} | 1 | [
"CWE-19"
] | ntp | fe46889f7baa75fc8e6c0fcde87706d396ce1461 | 270,036,958,032,462,000,000,000,000,000,000,000,000 | 8 | [Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn. |
GF_Err prft_box_read(GF_Box *s,GF_BitStream *bs)
{
GF_ProducerReferenceTimeBox *ptr = (GF_ProducerReferenceTimeBox *) s;
ISOM_DECREASE_SIZE(ptr, 12);
ptr->refTrackID = gf_bs_read_u32(bs);
ptr->ntp = gf_bs_read_u64(bs);
if (ptr->version==0) {
ISOM_DECREASE_SIZE(ptr, 4);
ptr->timestamp = gf_bs_read_u32(bs);
}... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 108,906,748,177,493,130,000,000,000,000,000,000,000 | 16 | fixed #1587 |
static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long elements, int objprops)
{
while (elements-- > 0) {
zval *key, *data, **old_data;
ALLOC_INIT_ZVAL(key);
if (!php_var_unserialize(&key, p, max, NULL TSRMLS_CC)) {
zval_dtor(key);
FREE_ZVAL(key);
return 0;
}
if (Z_TYPE_... | 1 | [] | php-src | 646572d6d3847d68124b03936719f60936b49a38 | 166,802,099,844,548,040,000,000,000,000,000,000,000 | 65 | Fixed bug #68976 - Use After Free Vulnerability in unserialize() |
static __u8 *ch_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
if (*rsize >= 18 && rdesc[11] == 0x3c && rdesc[12] == 0x02) {
hid_info(hdev, "fixing up Cherry Cymotion report descriptor\n");
rdesc[11] = rdesc[16] = 0xff;
rdesc[12] = rdesc[17] = 0x03;
}
return rdesc;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ab25786c87eb20857bbb715c3ae34ec8fd6a214 | 196,065,448,578,069,850,000,000,000,000,000,000,000 | 10 | HID: fix a couple of off-by-ones
There are a few very theoretical off-by-one bugs in report descriptor size
checking when performing a pre-parsing fixup. Fix those.
Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jir... |
enum_field_types Item_singlerow_subselect::field_type() const
{
return engine->field_type();
} | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 190,839,985,728,227,460,000,000,000,000,000,000,000 | 4 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
init_session_id (GSListener *listener)
{
g_free (listener->priv->session_id);
listener->priv->session_id = query_session_id (listener);
gs_debug ("Got session-id: %s", listener->priv->session_id);
} | 0 | [] | gnome-screensaver | 284c9924969a49dbf2d5fae1d680d3310c4df4a3 | 323,820,861,363,463,450,000,000,000,000,000,000,000 | 6 | Remove session inhibitors if the originator falls of the bus
This fixes a problem where totem leaves inhibitors behind, see
bug 600488. |
pack_unpack(VALUE str, VALUE fmt)
{
int mode = rb_block_given_p() ? UNPACK_BLOCK : UNPACK_ARRAY;
return pack_unpack_internal(str, fmt, mode);
} | 0 | [] | ruby | a2958f6743664006d21fc0bafd4ca6214df1d429 | 339,080,515,824,464,400,000,000,000,000,000,000,000 | 5 | merge revision(s) 65125:
infect taint flag on Array#pack and String#unpack
with the directives "B", "b", "H" and "h".
* pack.c (pack_pack, pack_unpack_internal): infect taint flag.
* test/ruby/test_pack.rb: add test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@65128 b2dd03c8-39d4-4... |
flatpak_dir_get_origin (FlatpakDir *self,
FlatpakDecomposed *ref,
GCancellable *cancellable,
GError **error)
{
g_autoptr(GBytes) deploy_data = NULL;
deploy_data = flatpak_dir_get_deploy_data (self, ref, FLATPAK_DEPLOY_VER... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 19,726,301,543,692,834,000,000,000,000,000,000,000 | 14 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
static u32 avi_write (FILE *fd, char *buf, u32 len)
{
u32 r = 0;
while (r < len) {
s32 n = (u32) gf_fwrite (buf + r, len - r, fd);
if (n < 0)
return n;
r += n;
}
return r;
} | 0 | [
"CWE-835"
] | gpac | 7f060bbb72966cae80d6fee338d0b07fa3fc06e1 | 290,310,381,184,791,860,000,000,000,000,000,000,000 | 13 | fixed #2159 |
asmlinkage long sys_set_tid_address(int __user *tidptr)
{
current->clear_child_tid = tidptr;
return task_pid_vnr(current);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8141c7f3e7aee618312fa1c15109e1219de784a7 | 183,906,586,869,784,540,000,000,000,000,000,000,000 | 6 | Move "exit_robust_list" into mm_release()
We don't want to get rid of the futexes just at exit() time, we want to
drop them when doing an execve() too, since that gets rid of the
previous VM image too.
Doing it at mm_release() time means that we automatically always do it
when we disassociate a VM map from the task.
... |
static KernelInfo *imagick_createKernel(KernelValueType *values, size_t width, size_t height, size_t origin_x, size_t origin_y)
{
KernelInfo *kernel_info;
#if MagickLibVersion >= 0x700
unsigned int i;
ExceptionInfo *_exception_info = (ExceptionInfo *) NULL;
//TODO - inspect exception info
kernel_info=AcquireKerne... | 0 | [
"CWE-787"
] | imagick | 7187b37250b87edb75160c7beda980f2fa308f5d | 217,165,608,752,139,600,000,000,000,000,000,000,000 | 42 | Bounds check kernel origin position. |
gnutls_x509_crt_get_subject(gnutls_x509_crt_t cert, gnutls_x509_dn_t * dn)
{
return get_dn(cert, "tbsCertificate.subject.rdnSequence", dn);
} | 0 | [
"CWE-295"
] | gnutls | 6e76e9b9fa845b76b0b9a45f05f4b54a052578ff | 139,562,445,733,023,270,000,000,000,000,000,000,000 | 4 | on certificate import check whether the two signature algorithms match |
printer_read(struct file *fd, char __user *buf, size_t len, loff_t *ptr)
{
struct printer_dev *dev = fd->private_data;
unsigned long flags;
size_t size;
size_t bytes_copied;
struct usb_request *req;
/* This is a pointer to the current USB rx request. */
struct usb_request *current_rx_req;
/* This is ... | 0 | [
"CWE-416"
] | linux | e8d5f92b8d30bb4ade76494490c3c065e12411b1 | 159,497,662,206,531,850,000,000,000,000,000,000,000 | 140 | usb: gadget: function: printer: fix use-after-free in __lock_acquire
Fix this by increase object reference count.
BUG: KASAN: use-after-free in __lock_acquire+0x3fd4/0x4180
kernel/locking/lockdep.c:3831
Read of size 8 at addr ffff8880683b0018 by task syz-executor.0/3377
CPU: 1 PID: 3377 Comm: syz-executor.0 Not tain... |
static int __sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
struct msghdr *msg_sys, unsigned flags, int nosec)
{
struct compat_msghdr __user *msg_compat =
(struct compat_msghdr __user *)msg;
struct iovec iovstack[UIO_FASTIOV];
struct iovec *iov = iovstack;
unsigned long cmsg_ptr;
int err, iov... | 0 | [] | linux-2.6 | 644595f89620ba8446cc555be336d24a34464950 | 239,767,242,599,000,500,000,000,000,000,000,000,000 | 93 | compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c
Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct
timeval and struct timespec to userspace in net/socket.c.
Signed-off-by: H. Peter Anvin <hpa@zytor.com> |
Item_int(THD *thd, int32 i,uint length= MY_INT32_NUM_DECIMAL_DIGITS):
Item_num(thd), value((longlong) i)
{ max_length=length; fixed= 1; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 14,577,023,364,024,010,000,000,000,000,000,000,000 | 3 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
struct se_portal_group *tcm_loop_make_naa_tpg(
struct se_wwn *wwn,
struct config_group *group,
const char *name)
{
struct tcm_loop_hba *tl_hba = container_of(wwn,
struct tcm_loop_hba, tl_hba_wwn);
struct tcm_loop_tpg *tl_tpg;
char *tpgt_str, *end_ptr;
int ret;
unsigned short int tpgt;
tpgt_str = strstr(nam... | 1 | [
"CWE-119",
"CWE-787"
] | linux | 12f09ccb4612734a53e47ed5302e0479c10a50f8 | 178,858,899,638,093,280,000,000,000,000,000,000,000 | 44 | loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> |
Http2Options::Http2Options(Environment* env) {
nghttp2_option_new(&options_);
// We manually handle flow control within a session in order to
// implement backpressure -- that is, we only send WINDOW_UPDATE
// frames to the remote peer as data is actually consumed by user
// code. This ensures that the flow ... | 1 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 211,784,718,481,386,240,000,000,000,000,000,000,000 | 78 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
static int io_register_restrictions(struct io_ring_ctx *ctx, void __user *arg,
unsigned int nr_args)
{
struct io_uring_restriction *res;
size_t size;
int i, ret;
/* Restrictions allowed only if rings started disabled */
if (!(ctx->flags & IORING_SETUP_R_DISABLED))
return -EBADFD;
/* We allow only a s... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 143,178,482,110,671,580,000,000,000,000,000,000,000 | 69 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
*/
static bool bfq_bfqq_is_slow(struct bfq_data *bfqd, struct bfq_queue *bfqq,
bool compensate, enum bfqq_expiration reason,
unsigned long *delta_ms)
{
ktime_t delta_ktime;
u32 delta_usecs;
bool slow = BFQQ_SEEKY(bfqq); /* if delta too short, use seekyness */
if (!bfq_bfqq_sync(bfqq))
return false;
... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 208,035,948,625,685,220,000,000,000,000,000,000,000 | 56 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
f_ch_sendexpr(typval_T *argvars, typval_T *rettv)
{
ch_expr_common(argvars, rettv, FALSE);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 322,923,231,837,719,540,000,000,000,000,000,000,000 | 4 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static int unpack_pkt(git_pkt **out, const char *line, size_t len)
{
git_pkt_unpack *pkt;
GIT_UNUSED(len);
pkt = git__malloc(sizeof(*pkt));
GITERR_CHECK_ALLOC(pkt);
pkt->type = GIT_PKT_UNPACK;
if (!git__prefixcmp(line, "unpack ok"))
pkt->unpack_ok = 1;
else
pkt->unpack_ok = 0;
*out = (git_pkt *)pkt;
re... | 0 | [
"CWE-119",
"CWE-787"
] | libgit2 | 66e3774d279672ee51c3b54545a79d20d1ada834 | 180,012,112,747,129,340,000,000,000,000,000,000,000 | 18 | smart_pkt: verify packet length exceeds PKT_LEN_SIZE
Each packet line in the Git protocol is prefixed by a four-byte
length of how much data will follow, which we parse in
`git_pkt_parse_line`. The transmitted length can either be equal
to zero in case of a flush packet or has to be at least of length
four, as it also... |
hook_info_hashtable (struct t_weechat_plugin *plugin, const char *info_name,
const char *description, const char *args_description,
const char *output_description,
t_hook_callback_info_hashtable *callback,
void *callback_data)
{
str... | 0 | [
"CWE-20"
] | weechat | efb795c74fe954b9544074aafcebb1be4452b03a | 122,143,045,091,631,730,000,000,000,000,000,000,000 | 42 | core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) |
static int sctp_getsockopt_rtoinfo(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_rtoinfo rtoinfo;
struct sctp_association *asoc;
if (len < sizeof (struct sctp_rtoinfo))
return -EINVAL;
len = sizeof(struct sctp_rtoinfo);
if (copy_from_user(&rtoinfo, optval, len))
re... | 0 | [
"CWE-362"
] | linux | b166a20b07382b8bc1dcee2a448715c9c2c81b5b | 117,240,380,800,308,000,000,000,000,000,000,000,000 | 42 | net/sctp: fix race condition in sctp_destroy_sock
If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock
held and sp->do_auto_asconf is true, then an element is removed
from the auto_asconf_splist without any proper locking.
This can happen in the following functions:
1. In sctp_accept, if sctp_sock_m... |
GF_Err stts_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
GF_TimeToSampleBox *ptr = (GF_TimeToSampleBox *)s;
#ifndef GPAC_DISABLE_ISOM_WRITE
ptr->w_LastDTS = 0;
#endif
ISOM_DECREASE_SIZE(ptr, 4);
ptr->nb_entries = gf_bs_read_u32(bs);
if (ptr->size < ptr->nb_entries * 8) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINE... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 256,301,894,797,211,530,000,000,000,000,000,000,000 | 58 | fixed #1757 |
void ZrtpStateClass::evCommitSent(void) {
DEBUGOUT((cout << "Checking for match in CommitSend.\n"));
char *msg, first, middle, last, secondLast;
uint8_t *pkt;
uint32_t errorCode = 0;
if (event->type == ZrtpPacket) {
pkt = event->packet;
msg = (char *)pkt + 4;
first = tolo... | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 89,725,194,974,897,020,000,000,000,000,000,000,000 | 187 | 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 |
template<typename tz, typename tc>
CImg<T>& draw_line(CImg<tz>& zbuffer,
int x0, int y0, const float z0,
int x1, int y1, const float z1,
const CImg<tc>& texture,
const int tx0, const int ty0,
const... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 11,932,655,172,484,430,000,000,000,000,000,000,000 | 78 | . |
ex_autocmd(exarg_T *eap)
{
/*
* Disallow autocommands from .exrc and .vimrc in current
* directory for security reasons.
*/
if (secure)
{
secure = 2;
eap->errmsg =
_(e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search);
}
else if (eap->cmdidx == CMD_autocmd)
do_aut... | 0 | [
"CWE-122"
] | vim | 35a319b77f897744eec1155b736e9372c9c5575f | 310,574,192,762,369,500,000,000,000,000,000,000,000 | 17 | patch 8.2.3489: ml_get error after search with range
Problem: ml_get error after search with range.
Solution: Limit the line number to the buffer line count. |
gimp_channel_convert (GimpItem *item,
GimpImage *dest_image,
GType old_type)
{
GimpChannel *channel = GIMP_CHANNEL (item);
GimpDrawable *drawable = GIMP_DRAWABLE (item);
if (! gimp_drawable_is_gray (drawable))
{
gimp_drawable_convert_type (drawable, d... | 0 | [
"CWE-703"
] | gimp | 6ab90ecbbd7cc95901933f62227fd140c0576d55 | 305,027,433,562,984,840,000,000,000,000,000,000,000 | 67 | app: fix #8230 crash in gimp_layer_invalidate_boundary when channel is NULL
gimp_channel_is_empty returns FALSE if channel is NULL. This causes
gimp_layer_invalidate_boundary to crash if the mask channel is NULL.
With a NULL channel gimp_channel_is_empty should return TRUE, just like
the similar gimp_image_is_empty d... |
Opal::Call::OnClosedMediaStream (OpalMediaStream & stream)
{
StreamType type = (stream.GetMediaFormat().GetMediaType() == OpalMediaType::Audio ()) ? Audio : Video;
bool is_transmitting = false;
std::string stream_name;
stream_name = std::string ((const char *) stream.GetMediaFormat ().GetEncodingName ());
st... | 0 | [] | ekiga | 7d09807257963a4f5168a01aec1795a398746372 | 290,196,755,178,477,730,000,000,000,000,000,000,000 | 12 | Validate UTF-8 strings before showing them
Closes bug #653009. |
xfs_alloc_space_available(
struct xfs_alloc_arg *args,
xfs_extlen_t min_free,
int flags)
{
struct xfs_perag *pag = args->pag;
xfs_extlen_t alloc_len, longest;
xfs_extlen_t reservation; /* blocks that are still reserved */
int available;
xfs_extlen_t agflcount;
if (flags & XFS_ALLOC_FLAG_FREEING)
ret... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | d0c7feaf87678371c2c09b3709400be416b2dc62 | 299,388,094,944,575,650,000,000,000,000,000,000,000 | 45 | xfs: add agf freeblocks verify in xfs_agf_verify
We recently used fuzz(hydra) to test XFS and automatically generate
tmp.img(XFS v5 format, but some metadata is wrong)
xfs_repair information(just one AG):
agf_freeblks 0, counted 3224 in ag 0
agf_longest 536874136, counted 3224 in ag 0
sb_fdblocks 613, counted 3228
T... |
iasecc_emulate_fcp(struct sc_context *ctx, struct sc_apdu *apdu)
{
unsigned char dummy_df_fcp[] = {
0x62,0xFF,
0x82,0x01,0x38,
0x8A,0x01,0x05,
0xA1,0x04,0x8C,0x02,0x02,0x00,
0x84,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
};
LOG_FUNC_CALLED(ctx);
i... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 176,776,630,660,953,570,000,000,000,000,000,000,000 | 28 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
int bcf_read(htsFile *fp, const bcf_hdr_t *h, bcf1_t *v)
{
if (fp->format.format == vcf) return vcf_read(fp,h,v);
int ret = bcf_read1_core(fp->fp.bgzf, v);
if (ret == 0) ret = bcf_record_check(h, v);
if ( ret!=0 || !h->keep_samples ) return ret;
return bcf_subset_format(h,v);
} | 0 | [
"CWE-787"
] | htslib | dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c | 59,715,034,301,581,060,000,000,000,000,000,000,000 | 8 | Fix check for VCF record size
The check for excessive record size in vcf_parse_format() only
looked at individual fields. It was therefore possible to
exceed the limit and overflow fmt_aux_t::offset by having
multiple fields with a combined size that went over INT_MAX.
Fix by including the amount of memory used so fa... |
std::string read_file(const std::string &fname)
{
scoped_istream s = istream_file(fname);
return read_stream(*s);
} | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 277,848,908,302,021,870,000,000,000,000,000,000,000 | 5 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
u32 __user *uaddr2, u32 val2, u32 val3)
{
int cmd = op & FUTEX_CMD_MASK;
unsigned int flags = 0;
if (!(op & FUTEX_PRIVATE_FLAG))
flags |= FLAGS_SHARED;
if (op & FUTEX_CLOCK_REALTIME) {
flags |= FLAGS_CLOCKRT;
if (cmd != FUTEX_WAIT && cmd ... | 0 | [
"CWE-190"
] | linux | fbe0e839d1e22d88810f3ee3e2f1479be4c0aa4a | 9,478,705,988,633,352,000,000,000,000,000,000,000 | 56 | futex: Prevent overflow by strengthen input validation
UBSAN reports signed integer overflow in kernel/futex.c:
UBSAN: Undefined behaviour in kernel/futex.c:2041:18
signed integer overflow:
0 - -2147483648 cannot be represented in type 'int'
Add a sanity check to catch negative values of nr_wake and nr_requeue.
... |
e_mail_formatter_format_address (EMailFormatter *formatter,
GString *out,
struct _camel_header_address *a,
const gchar *field,
gboolean no_links,
gboolean ... | 0 | [
"CWE-347"
] | evolution | f66cd3e1db301d264563b4222a3574e2e58e2b85 | 293,652,469,910,094,300,000,000,000,000,000,000,000 | 121 | eds-I#3 - [GPG] Mails that are not encrypted look encrypted
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/3 |
StrUtil_IsEmpty(const char *str) // IN:
{
ASSERT(str != NULL);
return str[0] == '\0';
} | 0 | [
"CWE-362"
] | open-vm-tools | c1304ce8bfd9c0c33999e496bf7049d5c3d45821 | 150,051,667,030,688,420,000,000,000,000,000,000,000 | 5 | randomly generate tmp directory name, and add StrUtil_ReplaceAll() function. |
channel_forward_accept(LIBSSH2_LISTENER *listener)
{
int rc;
do {
rc = _libssh2_transport_read(listener->session);
} while(rc > 0);
if(_libssh2_list_first(&listener->queue)) {
LIBSSH2_CHANNEL *channel = _libssh2_list_first(&listener->queue);
/* detach channel from listener's q... | 0 | [
"CWE-787"
] | libssh2 | dc109a7f518757741590bb993c0c8412928ccec2 | 198,233,388,021,830,960,000,000,000,000,000,000,000 | 31 | Security fixes (#315)
* Bounds checks
Fixes for CVEs
https://www.libssh2.org/CVE-2019-3863.html
https://www.libssh2.org/CVE-2019-3856.html
* Packet length bounds check
CVE
https://www.libssh2.org/CVE-2019-3855.html
* Response length check
CVE
https://www.libssh2.org/CVE-2019-3859.html
* Bounds ch... |
static void async_ctrl_callback(struct urb *urb)
{
struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context;
int status = urb->status;
if (status < 0)
dev_dbg(&urb->dev->dev, "%s failed with %d", __func__, status);
kfree(req);
usb_free_urb(urb);
} | 0 | [
"CWE-119",
"CWE-284"
] | linux | 5593523f968bc86d42a035c6df47d5e0979b5ace | 28,715,174,141,329,180,000,000,000,000,000,000,000 | 10 | pegasus: Use heap buffers for all register access
Allocating USB buffers on the stack is not portable, and no longer
works on x86_64 (with VMAP_STACK enabled as per default).
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
References: https://bugs.debian.org/852556
Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@... |
static SQLITE_NOINLINE void sqlite3ConstructBloomFilter(
WhereInfo *pWInfo, /* The WHERE clause */
int iLevel, /* Index in pWInfo->a[] that is pLevel */
WhereLevel *pLevel, /* Make a Bloom filter for this FROM term */
Bitmask notReady /* Loops that are not ready */
){
int addrOnce; ... | 0 | [
"CWE-129"
] | sqlite | effc07ec9c6e08d3bd17665f8800054770f8c643 | 102,579,356,924,461,120,000,000,000,000,000,000,000 | 105 | Fix the whereKeyStats() routine (part of STAT4 processing only) so that it
is able to cope with row-value comparisons against the primary key index
of a WITHOUT ROWID table.
[forum:/forumpost/3607259d3c|Forum post 3607259d3c].
FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb |
BOOL rdp_read_flow_control_pdu(wStream* s, UINT16* type)
{
/*
* Read flow control PDU - documented in FlowPDU section in T.128
* http://www.itu.int/rec/T-REC-T.128-199802-S/en
* The specification for the PDU has pad8bits listed BEFORE pduTypeFlow.
* However, so far pad8bits has always been observed to arrive A... | 0 | [
"CWE-125"
] | FreeRDP | 9301bfe730c66180263248b74353daa99f5a969b | 255,705,413,238,686,470,000,000,000,000,000,000,000 | 22 | Fixed #6007: Boundary checks in rdp_read_flow_control_pdu |
void kvm_apic_set_version(struct kvm_vcpu *vcpu)
{
struct kvm_lapic *apic = vcpu->arch.apic;
u32 v = APIC_VERSION;
if (!lapic_in_kernel(vcpu))
return;
/*
* KVM emulates 82093AA datasheet (with in-kernel IOAPIC implementation)
* which doesn't have EOI register; Some buggy OSes (e.g. Windows with
* Hyper-V ... | 0 | [
"CWE-703",
"CWE-459"
] | linux | f7d8a19f9a056a05c5c509fa65af472a322abfee | 183,032,846,843,449,660,000,000,000,000,000,000,000 | 20 | Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET"
Revert a change to open code bits of kvm_lapic_set_base() when emulating
APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base
and apic_hw_disabled being unsyncrhonized when the APIC is created. If
kvm_arch_vcpu_crea... |
__must_hold(&req->ctx->timeout_lock)
{
if (task && head->task != task)
return false;
return cancel_all;
} | 1 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 159,771,237,095,245,780,000,000,000,000,000,000,000 | 6 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
ssh_gai_strerror(int gaierr)
{
if (gaierr == EAI_SYSTEM && errno != 0)
return strerror(errno);
return gai_strerror(gaierr);
} | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 116,223,778,869,561,100,000,000,000,000,000,000,000 | 6 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
static void rbd_dev_image_unlock(struct rbd_device *rbd_dev)
{
down_write(&rbd_dev->lock_rwsem);
if (__rbd_is_lock_owner(rbd_dev))
__rbd_release_lock(rbd_dev);
up_write(&rbd_dev->lock_rwsem);
} | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 122,919,761,934,623,520,000,000,000,000,000,000,000 | 7 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
CuePoint::~CuePoint() { delete[] m_track_positions; } | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 250,281,102,018,984,570,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
convert_16_bit (const gchar *src,
gchar *dst,
guint32 len)
{
/* Convert 16 bit to 8 bit dropping low byte
*/
gint i;
IFDBG(3) g_debug ("Start 16 bit conversion");
for (i = 0; i < len >> 1; ++i)
{
*dst = *src;
dst++;
src += 2;
}
IFDBG(3... | 0 | [
"CWE-190"
] | gimp | 88eccea84aa375197cc04a2a0e2e29debb56bfa5 | 215,234,323,256,205,770,000,000,000,000,000,000,000 | 19 | Harden the PSD plugin against integer overflows.
Issues discovered by Stefan Cornelius, Secunia Research, advisory SA37232
and CVE identifier CVE-2009-3909. Fixes bug #600741.
(cherry picked from commit 9cc8d78ff33b7a36852b74e64b427489cad44d0e) |
static void show_migration_types(unsigned char type)
{
static const char types[MIGRATE_TYPES] = {
[MIGRATE_UNMOVABLE] = 'U',
[MIGRATE_MOVABLE] = 'M',
[MIGRATE_RECLAIMABLE] = 'E',
[MIGRATE_HIGHATOMIC] = 'H',
#ifdef CONFIG_CMA
[MIGRATE_CMA] = 'C',
#endif
#ifdef CONFIG_MEMORY_ISOLATION
[MIGRATE_ISOLATE] = 'I... | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 97,309,627,126,211,550,000,000,000,000,000,000,000 | 26 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
static int wdm_release(struct inode *inode, struct file *file)
{
struct wdm_device *desc = file->private_data;
mutex_lock(&wdm_mutex);
/* using write lock to protect desc->count */
mutex_lock(&desc->wlock);
desc->count--;
mutex_unlock(&desc->wlock);
if (!desc->count) {
if (!test_bit(WDM_DISCONNECTING, &desc... | 0 | [
"CWE-119",
"CWE-269"
] | linux | c0f5ecee4e741667b2493c742b60b6218d40b3aa | 83,380,253,738,364,130,000,000,000,000,000,000,000 | 25 | USB: cdc-wdm: fix buffer overflow
The buffer for responses must not overflow.
If this would happen, set a flag, drop the data and return
an error after user space has read all remaining data.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
CC: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundati... |
void ElectronBrowserClient::RenderProcessHostDestroyed(
content::RenderProcessHost* host) {
int process_id = host->GetID();
pending_processes_.erase(process_id);
renderer_is_subframe_.erase(process_id);
host->RemoveObserver(this);
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 304,882,456,984,562,020,000,000,000,000,000,000,000 | 7 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
TfLiteStatus Subgraph::Invoke() {
if (!consistent_) {
ReportError("Invoke called on model that is not consistent.");
return kTfLiteError;
}
TfLiteStatus status = kTfLiteOk;
if (state_ == kStateUninvokable) {
ReportError("Invoke called on model that is not ready.");
return kTfLiteError;
} else... | 0 | [
"CWE-476",
"CWE-703"
] | tensorflow | 0b5662bc2be13a8c8f044d925d87fb6e56247cd8 | 211,435,286,180,559,530,000,000,000,000,000,000,000 | 107 | [tflite] Ensure input tensors don't have `nullptr` buffers.
A crafted TFLite model can force a node to have as input a tensor backed by a `nullptr` buffer. That is, by carefully changing the buffer index in the flatbuffer serialization, we can force the TFLite interpreter to consider a read-only tensor to be a read-wr... |
format_nid(const u_char *data)
{
static char buf[4][sizeof("01:01:01:01")];
static int i = 0;
i = (i + 1) % 4;
snprintf(buf[i], sizeof(buf[i]), "%02x:%02x:%02x:%02x",
data[0], data[1], data[2], data[3]);
return buf[i];
} | 0 | [
"CWE-125"
] | tcpdump | 83a412a5275cac973c5841eca3511c766bed778d | 277,635,931,540,965,500,000,000,000,000,000,000,000 | 9 | (for 4.9.3) CVE-2018-16228/HNCP: make buffer access safer
print_prefix() has a buffer and does not initialize it. It may call
decode_prefix6(), which also does not initialize the buffer on invalid
input. When that happens, make sure to return from print_prefix() before
trying to print the [still uninitialized] buffer.... |
static int __ext4_ext_check(const char *function, struct inode *inode,
struct ext4_extent_header *eh,
int depth)
{
const char *error_msg;
int max = 0;
if (unlikely(eh->eh_magic != EXT4_EXT_MAGIC)) {
error_msg = "invalid magic";
goto corrupted;
}
if (unlikely(le16_to_cpu(eh->eh_depth) != depth)) {
... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 102,774,319,310,844,570,000,000,000,000,000,000,000 | 44 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
{
struct shmid_kernel *shp;
int err, version;
struct ipc_namespace *ns;
if (cmd < 0 || shmid < 0)
return -EINVAL;
version = ipc_parse_version(&cmd);
ns = current->nsproxy->ipc_ns;
switch (cmd) {
case IPC_INFO:
case SHM_INFO:
cas... | 1 | [
"CWE-362"
] | linux | a399b29dfbaaaf91162b2dc5a5875dd51bbfa2a1 | 156,914,640,344,384,610,000,000,000,000,000,000,000 | 87 | ipc,shm: fix shm_file deletion races
When IPC_RMID races with other shm operations there's potential for
use-after-free of the shm object's associated file (shm_file).
Here's the race before this patch:
TASK 1 TASK 2
------ ------
shm_rmid()
ipc_lock_object()
... |
static unsigned LoadWPG2Flags(Image *image,char Precision,float *Angle,tCTM *CTM)
{
const unsigned char TPR=1,TRN=2,SKW=4,SCL=8,ROT=0x10,OID=0x20,LCK=0x80;
ssize_t x;
unsigned DenX;
unsigned Flags;
(void) memset(*CTM,0,sizeof(*CTM)); /*CTM.erase();CTM.resize(3,3);*/
(*CTM)[0][0]=1;
(*CTM)[1][1]=1;
(*CTM)[2][2]... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | fc43974d34318c834fbf78570ca1a3764ed8c7d7 | 169,315,119,212,831,000,000,000,000,000,000,000,000 | 59 | Ensure image extent does not exceed maximum |
pq_recvbuf(void)
{
if (PqRecvPointer > 0)
{
if (PqRecvLength > PqRecvPointer)
{
/* still some unread data, left-justify it in the buffer */
memmove(PqRecvBuffer, PqRecvBuffer + PqRecvPointer,
PqRecvLength - PqRecvPointer);
PqRecvLength -= PqRecvPointer;
PqRecvPointer = 0;
}
else
PqRecvLeng... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 77,474,495,624,570,190,000,000,000,000,000,000,000 | 55 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
static int smack_inode_rmdir(struct inode *dir, struct dentry *dentry)
{
struct smk_audit_info ad;
int rc;
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY);
smk_ad_setfield_u_fs_path_dentry(&ad, dentry);
/*
* You need write access to the thing you're removing
*/
rc = smk_curacc(smk_of_inode(d_backing_inode... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 86,608,516,507,002,110,000,000,000,000,000,000,000 | 25 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.