func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static struct kvm_memslots *kvm_get_inactive_memslots(struct kvm *kvm, int as_id)
{
struct kvm_memslots *active = __kvm_memslots(kvm, as_id);
int node_idx_inactive = active->node_idx ^ 1;
return &kvm->__memslots[as_id][node_idx_inactive]; | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 125,215,820,023,230,480,000,000,000,000,000,000,000 | 7 | 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... |
int X509V3_add_value(const char *name, const char *value,
STACK_OF(CONF_VALUE) **extlist)
{
return x509v3_add_len_value(name, value,
value != NULL ? strlen((const char *)value) : 0,
extlist);
} | 0 | [
"CWE-125"
] | openssl | bb4d2ed4091408404e18b3326e3df67848ef63d0 | 250,385,536,961,142,000,000,000,000,000,000,000,000 | 7 | Fix append_ia5 function to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
static unsigned char asn1_octets_decode(struct asn1_ctx *ctx,
unsigned char *eoc,
unsigned char **octets,
unsigned int *len)
{
unsigned char *ptr;
*len = 0;
*octets = kmalloc(eoc - ctx->pointer, GFP_ATOMIC);
if (*octets == NULL) {
if (net_ratelimit())
printk("OOM in bsalg (%d)\n", __LINE__);
... | 0 | [
"CWE-119"
] | linux-2.6 | ddb2c43594f22843e9f3153da151deaba1a834c5 | 280,575,123,991,460,170,000,000,000,000,000,000,000 | 27 | asn1: additional sanity checking during BER decoding
- Don't trust a length which is greater than the working buffer.
An invalid length could cause overflow when calculating buffer size
for decoding oid.
- An oid length of zero is invalid and allows for an off-by-one error when
decoding oid because the first su... |
main(int argc, char **argv)
{
char *term;
int errret;
bool cmdline = TRUE;
int c;
char buf[BUFSIZ];
int result = 0;
int fd;
TTY tty_settings;
bool opt_x = FALSE; /* clear scrollback if possible */
bool is_alias;
bool need_tty;
prg_name = check_aliases(_nc_rootname(argv[... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 164,274,776,577,175,400,000,000,000,000,000,000,000 | 101 | 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... |
_equalA_ArrayExpr(const A_ArrayExpr *a, const A_ArrayExpr *b)
{
COMPARE_NODE_FIELD(elements);
COMPARE_LOCATION_FIELD(location);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 184,139,215,169,760,700,000,000,000,000,000,000,000 | 7 | 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... |
SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id,
long, min_nr,
long, nr,
struct io_event __user *, events,
struct __kernel_timespec __user *, timeout)
{
struct timespec64 ts;
int ret;
if (timeout && unlikely(get_timespec64(&ts, timeout)))
return -EFAULT;
ret = do_io_getevents(ctx_id, min_nr, nr, e... | 0 | [
"CWE-416"
] | linux | 84c4e1f89fefe70554da0ab33be72c9be7994379 | 55,316,639,402,799,840,000,000,000,000,000,000,000 | 17 | aio: simplify - and fix - fget/fput for io_submit()
Al Viro root-caused a race where the IOCB_CMD_POLL handling of
fget/fput() could cause us to access the file pointer after it had
already been freed:
"In more details - normally IOCB_CMD_POLL handling looks so:
1) io_submit(2) allocates aio_kiocb instance and p... |
FastHufDecoder::decode
(const unsigned char *src,
int numSrcBits,
unsigned short *dst,
int numDstElems)
{
if (numSrcBits < 128)
throw IEX_NAMESPACE::InputExc ("Error choosing Huffman decoder implementation "
"(insufficient number of bits).");
/... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 307,877,920,882,410,760,000,000,000,000,000,000,000 | 193 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
R_API int r_core_cmd_buffer(RCore *core, const char *buf) {
char *ptr, *optr, *str = strdup (buf);
if (!str) {
return false;
}
optr = str;
ptr = strchr (str, '\n');
while (ptr) {
*ptr = '\0';
r_core_cmd (core, optr, 0);
optr = ptr + 1;
ptr = strchr (str, '\n');
}
r_core_cmd (core, optr, 0);
free (str... | 0 | [
"CWE-78"
] | radare2 | dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7 | 321,691,665,854,856,800,000,000,000,000,000,000,000 | 17 | Fix #14990 - multiple quoted command parsing issue ##core
> "?e hello""?e world"
hello
world"
> "?e hello";"?e world"
hello
world |
static void credential_apply_config(struct credential *c)
{
if (c->configured)
return;
git_config(credential_config_callback, c);
c->configured = 1;
if (!c->use_http_path && proto_is_http(c->protocol)) {
FREE_AND_NULL(c->path);
}
} | 0 | [
"CWE-522",
"CWE-61"
] | git | 9a6bbee8006c24b46a85d29e7b38cfa79e9ab21b | 19,664,545,316,810,522,000,000,000,000,000,000,000 | 11 | credential: avoid writing values with newlines
The credential protocol that we use to speak to helpers can't represent
values with newlines in them. This was an intentional design choice to
keep the protocol simple, since none of the values we pass should
generally have newlines.
However, if we _do_ encounter a newli... |
static u32 __peek_user_compat(struct task_struct *child, addr_t addr)
{
struct compat_user *dummy32 = NULL;
addr_t offset;
__u32 tmp;
if (addr < (addr_t) &dummy32->regs.acrs) {
struct pt_regs *regs = task_pt_regs(child);
/*
* psw and gprs are stored on the stack
*/
if (addr == (addr_t) &dummy32->regs.p... | 0 | [
"CWE-264",
"CWE-269"
] | linux | dab6cf55f81a6e16b8147aed9a843e1691dcd318 | 225,981,714,267,794,100,000,000,000,000,000,000,000 | 63 | s390/ptrace: fix PSW mask check
The PSW mask check of the PTRACE_POKEUSR_AREA command is incorrect.
The PSW_MASK_USER define contains the PSW_MASK_ASC bits, the ptrace
interface accepts all combinations for the address-space-control
bits. To protect the kernel space the PSW mask check in ptrace needs
to reject the add... |
repodata_lookup_str(Repodata *data, Id solvid, Id keyname)
{
unsigned char *dp;
Repokey *key;
Id id;
dp = find_key_data(data, solvid, keyname, &key);
if (!dp)
return 0;
if (key->type == REPOKEY_TYPE_STR)
return (const char *)dp;
if (key->type == REPOKEY_TYPE_CONSTANTID)
id = key->size;
else... | 0 | [
"CWE-125"
] | libsolv | fdb9c9c03508990e4583046b590c30d958f272da | 32,773,814,280,976,303,000,000,000,000,000,000,000 | 21 | repodata_schema2id: fix heap-buffer-overflow in memcmp
When the length of last schema in data->schemadata is
less than length of input schema, we got a read overflow
in asan test.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> |
static void check(char const* filename,
std::vector<std::string> const& color_spaces,
std::vector<std::string> const& filters)
{
// Each stream is compressed the way it is supposed to be. We will
// add additional tests in qpdf.test to exercise QPDFWriter more
// fully. I... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 23,305,781,689,712,470,000,000,000,000,000,000,000 | 139 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC) /* {{{ */
{
cwd_state new_state;
int f;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
if (virtual_file_ex(&new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) {
CWD_STATE_FREE(&new_state);
return -1;
}
f = creat(new_state.cwd, mode);
CWD_STATE_FREE... | 0 | [
"CWE-190"
] | php-src | 0218acb7e756a469099c4ccfb22bce6c2bd1ef87 | 294,916,668,706,022,850,000,000,000,000,000,000,000 | 16 | Fix for bug #72513 |
rsvg_filter_primitive_merge_node_render (RsvgFilterPrimitive * self, RsvgFilterContext * ctx)
{
/* todo */
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 95,471,626,298,636,850,000,000,000,000,000,000,000 | 4 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
static size_t my_setstacksize(pthread_attr_t *attr, size_t stacksize)
{
size_t guard_size __attribute__((unused))= 0;
#if defined(__ia64__) || defined(__ia64)
/*
On IA64, half of the requested stack size is used for "normal stack"
and half for "register stack". The space measured by check_stack_overrun
... | 0 | [
"CWE-362"
] | server | 347eeefbfc658c8531878218487d729f4e020805 | 238,678,447,343,239,200,000,000,000,000,000,000,000 | 60 | don't use my_copystat in the server
it was supposed to be used in command-line tools only.
Different fix for 4e5473862e:
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE |
print_rsc_history(pe_working_set_t * data_set, node_t * node, xmlNode * rsc_entry)
{
GListPtr gIter = NULL;
GListPtr op_list = NULL;
gboolean print_name = TRUE;
GListPtr sorted_op_list = NULL;
const char *rsc_id = crm_element_value(rsc_entry, XML_ATTR_ID);
resource_t *rsc = pe_find_resource(data... | 0 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 48,323,421,633,044,530,000,000,000,000,000,000,000 | 93 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
FindFragmentMapEntry(AP4_Array<FragmentMapEntry>& fragment_map, AP4_UI64 fragment_offset) {
int first = 0;
int last = fragment_map.ItemCount();
while (first < last) {
int middle = (last+first)/2;
AP4_UI64 middle_value = fragment_map[middle].before;
if (fragment_offset < middle_value)... | 0 | [
"CWE-476",
"CWE-703"
] | Bento4 | 4d3f0bebd5f8518fd775f671c12bea58c68e814e | 29,788,214,894,591,097,000,000,000,000,000,000,000 | 17 | fixed possible crashes on malformed inputs. |
TEST_F(QueryPlannerTest, ElemMatchWithAllElemMatchChild2) {
// true means multikey
addIndex(BSON("a.b.c.d" << 1), true);
runQuery(
fromjson("{'a.b': {$elemMatch: {c: {$all: "
"[{$elemMatch: {d: {$gt: 1, $lt: 3}}}]}}}}"));
assertNumSolutions(3U);
assertSolutionExists("{cscan... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 26,470,843,127,794,760,000,000,000,000,000,000,000 | 16 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
void LosslessScan::StartMeasureScan(class BufferCtrl *ctrl)
{
#if ACCUSOFT_CODE
int i;
FindComponentDimensions();
for(i = 0;i < m_ucCount;i++) {
m_pDCCoder[i] = NULL;
m_pDCStatistics[i] = m_pScan->DCHuffmanStatisticsOf(i);
}
assert(ctrl->isLineBased());
m_pLineCtrl = dynamic_cast<LineBu... | 0 | [
"CWE-119",
"CWE-703"
] | libjpeg | ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a | 191,766,819,404,398,880,000,000,000,000,000,000,000 | 23 | Added out-of-bounds checks for lossless symbol decoding and AC context
indices. Worked around some gcc warnings. Bumped to 1.64. |
static void tg3_phy_eee_enable(struct tg3 *tp)
{
u32 val;
if (tp->link_config.active_speed == SPEED_1000 &&
(tg3_asic_rev(tp) == ASIC_REV_5717 ||
tg3_asic_rev(tp) == ASIC_REV_5719 ||
tg3_flag(tp, 57765_CLASS)) &&
!tg3_phy_toggle_auxctl_smdsp(tp, true)) {
val = MII_TG3_DSP_TAP26_ALNOKO |
... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 7,609,921,349,043,901,000,000,000,000,000,000,000 | 18 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
buf_new_with_capacity(size_t size)
{
buf_t *b = buf_new();
b->default_chunk_size = preferred_chunk_size(size);
return b;
} | 0 | [] | tor | 19df037e53331ae528b876f225be08f198e0f8b6 | 101,595,421,648,882,660,000,000,000,000,000,000,000 | 6 | Log malformed hostnames in socks5 request respecting SafeLogging |
int gnutls_x509_tlsfeatures_add(gnutls_x509_tlsfeatures_t f, unsigned int feature)
{
if (f == NULL) {
gnutls_assert();
return GNUTLS_E_INVALID_REQUEST;
}
if (feature > UINT16_MAX)
return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
if (f->size >= sizeof(f->feature)/sizeof(f->feature[0]))
return gnutls_ass... | 0 | [
"CWE-415"
] | gnutls | c5aaa488a3d6df712dc8dff23a049133cab5ec1b | 336,078,738,831,264,000,000,000,000,000,000,000,000 | 17 | gnutls_x509_ext_import_proxy: fix issue reading the policy language
If the language was set but the policy wasn't, that could lead to
a double free, as the value returned to the user was freed. |
parse_STACK_PUSH(char *arg, const struct ofpact_parse_params *pp)
{
return nxm_parse_stack_action(ofpact_put_STACK_PUSH(pp->ofpacts), arg);
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 247,557,846,168,234,120,000,000,000,000,000,000,000 | 4 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
static bool reqsk_queue_unlink(struct request_sock_queue *queue,
struct request_sock *req)
{
struct inet_hashinfo *hashinfo = req_to_sk(req)->sk_prot->h.hashinfo;
bool found = false;
if (sk_hashed(req_to_sk(req))) {
spinlock_t *lock = inet_ehash_lockp(hashinfo, req->rsk_hash);
spin_lock(lock);
foun... | 0 | [
"CWE-200",
"CWE-415"
] | linux | 657831ffc38e30092a2d5f03d385d710eb88b09a | 71,184,038,022,385,050,000,000,000,000,000,000,000 | 17 | dccp/tcp: do not inherit mc_list from parent
syzkaller found a way to trigger double frees from ip_mc_drop_socket()
It turns out that leave a copy of parent mc_list at accept() time,
which is very bad.
Very similar to commit 8b485ce69876 ("tcp: do not inherit
fastopen_req from parent")
Initial report from Pray3r, c... |
input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh)
{
Authctxt *authctxt = ssh->authctxt;
Gssctxt *gssctxt;
gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
gss_buffer_desc recv_tok;
OM_uint32 maj_status;
int r;
u_char *p;
size_t len;
if (authctxt == NULL || (authctxt->methoddata == NULL && !use_priv... | 0 | [
"CWE-200",
"CWE-362",
"CWE-703"
] | src | 779974d35b4859c07bc3cb8a12c74b43b0a7d1e0 | 164,400,969,008,583,980,000,000,000,000,000,000,000 | 36 | delay bailout for invalid authenticating user until after the packet
containing the request has been fully parsed. Reported by Dariusz Tytko
and Michał Sajdak; ok deraadt |
static void reds_mig_disconnect(RedsState *reds)
{
if (reds_main_channel_connected(reds)) {
reds_disconnect(reds);
} else {
reds_mig_cleanup(reds);
}
} | 0 | [] | spice | ca5bbc5692e052159bce1a75f55dc60b36078749 | 120,624,967,224,174,060,000,000,000,000,000,000,000 | 8 | With OpenSSL 1.1: Disable client-initiated renegotiation.
Fixes issue #49
Fixes BZ#1904459
Signed-off-by: Julien Ropé <jrope@redhat.com>
Reported-by: BlackKD
Acked-by: Frediano Ziglio <fziglio@redhat.com> |
dict_stack_clear(int len)
{
while (dict_stack.ga_len > len)
dict_stack_drop();
} | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 329,196,046,400,679,740,000,000,000,000,000,000,000 | 5 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
static void ip4_frag_init_run(struct sk_buff *skb)
{
BUILD_BUG_ON(sizeof(struct ipfrag_skb_cb) > sizeof(skb->cb));
FRAG_CB(skb)->next_frag = NULL;
FRAG_CB(skb)->frag_run_len = skb->len;
} | 0 | [
"CWE-20"
] | linux | 5d407b071dc369c26a38398326ee2be53651cfe4 | 12,518,328,237,136,654,000,000,000,000,000,000,000 | 7 | ip: frags: fix crash in ip_do_fragment()
A kernel crash occurrs when defragmented packet is fragmented
in ip_do_fragment().
In defragment routine, skb_orphan() is called and
skb->ip_defrag_offset is set. but skb->sk and
skb->ip_defrag_offset are same union member. so that
frag->sk is not NULL.
Hence crash occurrs in s... |
vte_sequence_handler_application_keypad (VteTerminal *terminal, GValueArray *params)
{
_vte_debug_print(VTE_DEBUG_KEYBOARD,
"Entering application keypad mode.\n");
terminal->pvt->keypad_mode = VTE_KEYMODE_APPLICATION;
} | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 86,270,603,173,377,260,000,000,000,000,000,000,000 | 6 | fix bug #548272
svn path=/trunk/; revision=2365 |
set_sock_addr(struct sockaddr_un *address, const char *socket_name)
{
memset(address, 0, sizeof(struct sockaddr_un));
address->sun_family = AF_UNIX;
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
address->sun_len = QB_SUN_LEN(address);
#endif
if (!use_filesystem_sockets()) {
snprintf(address->sun_path + 1, UNIX_PATH_MAX... | 0 | [
"CWE-59"
] | libqb | e322e98dc264bc5911d6fe1d371e55ac9f95a71e | 241,698,351,201,251,840,000,000,000,000,000,000,000 | 15 | ipc: use O_EXCL on SHM files, and randomize the names
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> |
static void DefragTrackerPrintStats (void)
{
} | 0 | [
"CWE-358"
] | suricata | 4a04f814b15762eb446a5ead4d69d021512df6f8 | 144,446,945,458,328,750,000,000,000,000,000,000,000 | 3 | defrag - take protocol into account during re-assembly
The IP protocol was not being used to match fragments with
their packets allowing a carefully constructed packet
with a different protocol to be matched, allowing re-assembly
to complete, creating a packet that would not be re-assembled
by the destination host. |
static void io_clean_op(struct io_kiocb *req)
{
if (req->flags & REQ_F_BUFFER_SELECTED) {
spin_lock(&req->ctx->completion_lock);
io_put_kbuf_comp(req);
spin_unlock(&req->ctx->completion_lock);
}
if (req->flags & REQ_F_NEED_CLEANUP) {
switch (req->opcode) {
case IORING_OP_READV:
case IORING_OP_READ_FIXE... | 1 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 88,164,988,667,475,120,000,000,000,000,000,000,000 | 76 | 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... |
static inline void ip4_frags_ctl_register(void)
{
} | 0 | [] | linux | 3ef0eb0db4bf92c6d2510fe5c4dc51852746f206 | 233,254,458,737,440,330,000,000,000,000,000,000,000 | 3 | net: frag, move LRU list maintenance outside of rwlock
Updating the fragmentation queues LRU (Least-Recently-Used) list,
required taking the hash writer lock. However, the LRU list isn't
tied to the hash at all, so we can use a separate lock for it.
Original-idea-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Je... |
check_allowed_to_delegate_to(krb5_context context, krb5_const_principal client,
const krb5_db_entry *server,
krb5_const_principal proxy)
{
/* Can't get a TGT (otherwise it would be unconstrained delegation) */
if (krb5_is_tgs_principal(proxy))
re... | 0 | [
"CWE-476"
] | krb5 | 93b4a6306a0026cf1cc31ac4bd8a49ba5d034ba7 | 225,834,247,818,558,500,000,000,000,000,000,000,000 | 14 | Fix S4U2Self KDC crash when anon is restricted
In validate_as_request(), when enforcing restrict_anonymous_to_tgt,
use client.princ instead of request->client; the latter is NULL when
validating S4U2Self requests.
CVE-2016-3120:
In MIT krb5 1.9 and later, an authenticated attacker can cause krb5kdc
to dereference a ... |
Error HeifContext::set_primary_item(heif_item_id id)
{
auto iter = m_all_images.find(id);
if (iter == m_all_images.end()) {
return Error(heif_error_Usage_error,
heif_suberror_No_or_invalid_primary_item,
"Cannot set primary item as the ID does not exist.");
}
set_primary_im... | 0 | [
"CWE-125"
] | libheif | f7399b62d7fbc596f1b2871578c1d2053bedf1dd | 264,695,895,368,092,160,000,000,000,000,000,000,000 | 13 | Handle case where referenced "iref" box doesn't exist (fixes #138). |
nfsd4_encode_commit(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_commit *commit)
{
struct xdr_stream *xdr = &resp->xdr;
__be32 *p;
if (!nfserr) {
p = xdr_reserve_space(xdr, NFS4_VERIFIER_SIZE);
if (!p)
return nfserr_resource;
p = xdr_encode_opaque_fixed(p, commit->co_verf.data,
NFS4_VE... | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 180,812,388,726,064,760,000,000,000,000,000,000,000 | 14 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
bool Curl_allow_auth_to_host(struct Curl_easy *data)
{
struct connectdata *conn = data->conn;
return (!data->state.this_is_a_follow ||
data->set.allow_auth_to_other_hosts ||
(data->state.first_host &&
strcasecompare(data->state.first_host, conn->host.name) &&
(data->state.f... | 0 | [] | curl | 48d7064a49148f03942380967da739dcde1cdc24 | 227,845,702,349,343,770,000,000,000,000,000,000,000 | 10 | cookie: apply limits
- Send no more than 150 cookies per request
- Cap the max length used for a cookie: header to 8K
- Cap the max number of received Set-Cookie: headers to 50
Bug: https://curl.se/docs/CVE-2022-32205.html
CVE-2022-32205
Reported-by: Harry Sintonen
Closes #9048 |
static void hns_gmac_set_promisc(void *mac_drv, u8 en)
{
struct mac_driver *drv = mac_drv;
if (drv->mac_cb->mac_type == HNAE_PORT_DEBUG)
hns_gmac_set_uc_match(mac_drv, en);
} | 0 | [
"CWE-119",
"CWE-703"
] | linux | 412b65d15a7f8a93794653968308fc100f2aa87c | 150,500,732,544,049,820,000,000,000,000,000,000,000 | 7 | net: hns: fix ethtool_get_strings overflow in hns driver
hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
is not enough for ethtool_get_strings(), which will cause random memory
corruption.
When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
the following can be observed ... |
int nsim_bpf_dev_init(struct nsim_dev *nsim_dev)
{
int err;
INIT_LIST_HEAD(&nsim_dev->bpf_bound_progs);
INIT_LIST_HEAD(&nsim_dev->bpf_bound_maps);
nsim_dev->ddir_bpf_bound_progs = debugfs_create_dir("bpf_bound_progs",
nsim_dev->ddir);
if (IS_ERR(nsim_dev->ddir_bpf_bound_progs))
return PTR_ERR(nsim_d... | 0 | [] | net | 481221775d53d6215a6e5e9ce1cce6d2b4ab9a46 | 305,475,279,557,373,440,000,000,000,000,000,000,000 | 27 | netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
since it may cause a potential kernel information leak issue, as follows:
1. nsim_bpf_map_alloc calls nsim_map_alloc_elem to allocate elements for
a new map.
2.... |
schannel_connect_step2(struct Curl_easy *data, struct connectdata *conn,
int sockindex)
{
int i;
ssize_t nread = -1, written = -1;
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
unsigned char *reallocated_buffer;
SecBuffer outbuf[3];
SecBufferDesc outbuf_desc;
SecBuffer i... | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 196,485,751,260,903,740,000,000,000,000,000,000,000 | 287 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
void __i40e_del_filter(struct i40e_vsi *vsi, struct i40e_mac_filter *f)
{
if (!f)
return;
/* If the filter was never added to firmware then we can just delete it
* directly and we don't want to set the status to remove or else an
* admin queue command will unnecessarily fire.
*/
if ((f->state == I40E_FILTER... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 224,698,425,545,652,300,000,000,000,000,000,000,000 | 20 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
pfkey_satype2proto(uint8_t satype)
{
switch (satype) {
case SADB_SATYPE_UNSPEC:
return IPSEC_PROTO_ANY;
case SADB_SATYPE_AH:
return IPPROTO_AH;
case SADB_SATYPE_ESP:
return IPPROTO_ESP;
case SADB_X_SATYPE_IPCOMP:
return IPPROTO_COMP;
break;
default:
return 0;
}
/* NOTREACHED */
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 98,691,970,244,477,650,000,000,000,000,000,000,000 | 17 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
R_API bool r_cmd_alias_del(RCmd *cmd, const char *k) {
return ht_pp_delete(cmd->aliases, k);
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 0052500c1ed5bf8263b26b9fd7773dbdc6f170c4 | 138,904,055,837,787,130,000,000,000,000,000,000,000 | 3 | Fix heap OOB read in macho.iterate_chained_fixups ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer 'tests_65305'
mrmacete:
* Return early if segs_count is 0
* Initialize segs_count also for reconstructed fixups
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Francesco Tamagni <mrm... |
_copySubqueryScan(const SubqueryScan *from)
{
SubqueryScan *newnode = makeNode(SubqueryScan);
/*
* copy node superclass fields
*/
CopyScanFields((const Scan *) from, (Scan *) newnode);
/*
* copy remainder of node
*/
COPY_NODE_FIELD(subplan);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 126,611,484,625,202,370,000,000,000,000,000,000,000 | 16 | 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... |
finish_incsearch_highlighting(
int gotesc,
incsearch_state_T *is_state,
int call_update_screen)
{
if (is_state->did_incsearch)
{
is_state->did_incsearch = FALSE;
if (gotesc)
curwin->w_cursor = is_state->save_cursor;
else
{
if (!EQUAL_POS(is_state->save_cursor, is_state->search_start))
{
... | 0 | [
"CWE-416"
] | vim | 1c3dd8ddcba63c1af5112e567215b3cec2de11d0 | 196,581,023,678,562,950,000,000,000,000,000,000,000 | 35 | patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Problem: Using freed memory with cmdwin and BufEnter autocmd.
Solution: Make sure pointer to b_p_iminsert is still valid. |
asn1_der_decoding_startEnd (asn1_node element, const void *ider, int ider_len,
const char *name_element, int *start, int *end)
{
asn1_node node, node_to_find;
int result = ASN1_DER_ERROR;
node = element;
if (node == NULL)
return ASN1_ELEMENT_NOT_FOUND;
node_to_find = asn1_find_node (node, name_e... | 0 | [
"CWE-119"
] | libtasn1 | f979435823a02f842c41d49cd41cc81f25b5d677 | 294,363,546,766,840,900,000,000,000,000,000,000,000 | 45 | _asn1_extract_der_octet: prevent past of boundary access
Reported by Hanno Böck. |
static inline void io_bitmap_share(struct task_struct *tsk) { } | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 47,747,580,272,539,295,000,000,000,000,000,000,000 | 1 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
static int vmx_restore_vmx_ept_vpid_cap(struct vcpu_vmx *vmx, u64 data)
{
u64 vmx_ept_vpid_cap;
vmx_ept_vpid_cap = vmx_control_msr(vmx->nested.msrs.ept_caps,
vmx->nested.msrs.vpid_caps);
/* Every bit is either reserved or a feature bit. */
if (!is_bitwise_subset(vmx_ept_vpid_cap, data, -1ULL))
return -E... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 299,528,235,401,256,150,000,000,000,000,000,000,000 | 15 | 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... |
static int inode_has_perm(const struct cred *cred,
struct inode *inode,
u32 perms,
struct common_audit_data *adp)
{
struct inode_security_struct *isec;
u32 sid;
validate_creds(cred);
if (unlikely(IS_PRIVATE(inode)))
return 0;
sid = cred_sid(cred);
isec = inode->i_security;
return avc_has_per... | 0 | [
"CWE-264"
] | linux | 7b0d0b40cd78cadb525df760ee4cac151533c2b5 | 109,586,206,776,117,570,000,000,000,000,000,000,000 | 18 | selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID.
If the callee SID is bounded by the caller SID, then allowing
the transition to occur poses no risk of privilege escalation and we can
therefore safely allow the transition to occur. Add this exemption
for both the case where a transition was explicitl... |
void register_sysctl_root(struct ctl_table_root *root)
{
} | 0 | [
"CWE-20",
"CWE-399"
] | linux | 93362fa47fe98b62e4a34ab408c4a418432e7939 | 166,263,241,095,271,240,000,000,000,000,000,000,000 | 3 | sysctl: Drop reference added by grab_header in proc_sys_readdir
Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference
added by grab_header when return from !dir_emit_dots path.
It can cause any path called unregister_sysctl_table will
wait forever.
The calltrace of CVE-2016-9191:
[ 5535.960522] Call Trace:
[ ... |
static int set_max_cos_est(int chip_id)
{
switch (chip_id) {
case BCM57710:
case BCM57711:
case BCM57711E:
return BNX2X_MULTI_TX_COS_E1X;
case BCM57712:
case BCM57712_MF:
return BNX2X_MULTI_TX_COS_E2_E3A0;
case BCM57800:
case BCM57800_MF:
case BCM57810:
case BCM57810_MF:
case BCM57840_4_10:
case BCM5784... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 311,945,688,604,212,970,000,000,000,000,000,000,000 | 33 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
void __comps_rtree_set(COMPS_RTree * rt, char * key, size_t len, void * data)
{
COMPS_HSListItem *it, *lesser;
COMPS_HSList *subnodes;
COMPS_RTreeData *rtd;
static COMPS_RTreeData *rtdata;
size_t offset=0, _len;
unsigned x, found = 0;
void *ndata;
char ended;//, tmpch;
if (rt->subn... | 0 | [
"CWE-416",
"CWE-862"
] | libcomps | e3a5d056633677959ad924a51758876d415e7046 | 25,786,509,387,773,774,000,000,000,000,000,000,000 | 105 | Fix UAF in comps_objmrtree_unite function
The added field is not used at all in many places and it is probably the
left-over of some copy-paste. |
static int md5_final(struct shash_desc *desc, u8 *out)
{
struct md5_state *mctx = shash_desc_ctx(desc);
const unsigned int offset = mctx->byte_count & 0x3f;
char *p = (char *)mctx->block + offset;
int padding = 56 - (offset + 1);
*p++ = 0x80;
if (padding < 0) {
memset(p, 0x00, padding + sizeof (u64));
md5_tr... | 0 | [
"CWE-703"
] | linux | bc0b96b54a21246e377122d54569eef71cec535f | 28,311,950,788,231,104,000,000,000,000,000,000,000 | 27 | crypto: Move md5_transform to lib/md5.c
We are going to use this for TCP/IP sequence number and fragment ID
generation.
Signed-off-by: David S. Miller <davem@davemloft.net> |
Client::Client(FwdState *theFwdState): AsyncJob("Client"),
completed(false),
currentOffset(0),
responseBodyBuffer(NULL),
fwd(theFwdState),
requestSender(NULL),
#if USE_ADAPTATION
adaptedHeadSource(NULL),
adaptationAccessCheckPending(false),
startedAdaptation(false),
#endif
receivedWh... | 0 | [
"CWE-20"
] | squid | 1e05a85bd28c22c9ca5d3ac9f5e86d6269ec0a8c | 25,734,588,276,558,700,000,000,000,000,000,000,000 | 22 | Handle more partial responses (#791) |
static int btrfs_ioctl_set_fslabel(struct file *file, void __user *arg)
{
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_super_block *super_block = fs_info->super_copy;
struct btrfs_trans_handle *trans;
ch... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 229,793,453,773,331,150,000,000,000,000,000,000,000 | 42 | 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... |
static inline double get_dither_value(VignetteContext *s)
{
double dv = 0;
if (s->do_dither) {
dv = s->dither / (double)(1LL<<32);
s->dither = s->dither * 1664525 + 1013904223;
}
return dv;
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | e43a0a232dbf6d3c161823c2e07c52e76227a1bc | 240,932,570,655,144,060,000,000,000,000,000,000,000 | 9 | avfilter: fix plane validity checks
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
void OSD::clear_temp_objects()
{
dout(10) << __func__ << dendl;
vector<coll_t> ls;
store->list_collections(ls);
for (vector<coll_t>::iterator p = ls.begin(); p != ls.end(); ++p) {
spg_t pgid;
if (!p->is_pg(&pgid))
continue;
// list temp objects
dout(20) << " clearing temps in " << *p << "... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 49,696,490,929,332,300,000,000,000,000,000,000,000 | 54 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
static MagickBooleanType WriteGROUP4Image(const ImageInfo *image_info,
Image *image)
{
char
filename[MaxTextExtent];
FILE
*file;
Image
*huffman_image;
ImageInfo
*write_info;
int
unique_file;
MagickBooleanType
status;
register ssize_t
i;
ssize_t
count;
TIFF
... | 0 | [
"CWE-400"
] | ImageMagick6 | 0701e59f00194897494fa2be74cee8ca626d8f6f | 338,050,829,465,767,800,000,000,000,000,000,000,000 | 140 | https://github.com/ImageMagick/ImageMagick/issues/664 |
int btrfs_relocate_chunk(struct btrfs_fs_info *fs_info, u64 chunk_offset)
{
struct btrfs_root *root = fs_info->chunk_root;
struct btrfs_trans_handle *trans;
struct btrfs_block_group *block_group;
u64 length;
int ret;
/*
* Prevent races with automatic removal of unused block groups.
* After we relocate and be... | 0 | [
"CWE-476",
"CWE-703"
] | linux | e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091 | 100,018,446,015,209,020,000,000,000,000,000,000,000 | 66 | btrfs: fix NULL pointer dereference when deleting device by invalid id
[BUG]
It's easy to trigger NULL pointer dereference, just by removing a
non-existing device id:
# mkfs.btrfs -f -m single -d single /dev/test/scratch1 \
/dev/test/scratch2
# mount /dev/test/scratch1 /mnt/btrfs
# btrfs device remove 3 /... |
sctp_disposition_t sctp_sf_shutdown_sent_abort(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
if (!sctp_vtag_verify_either(chunk, asoc))
return sctp_sf_pdiscard(ep, asoc, type... | 0 | [
"CWE-20"
] | linux-2.6 | ba0166708ef4da7eeb61dd92bbba4d5a749d6561 | 128,125,923,549,359,800,000,000,000,000,000,000,000 | 43 | sctp: Fix kernel panic while process protocol violation parameter
Since call to function sctp_sf_abort_violation() need paramter 'arg' with
'struct sctp_chunk' type, it will read the chunk type and chunk length from
the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen()
always with 'struct sctp_paramh... |
int32_t Grego::dayOfWeek(double day) {
int32_t dow;
ClockMath::floorDivide(day + UCAL_THURSDAY, 7, dow);
return (dow == 0) ? UCAL_SATURDAY : dow;
} | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 103,923,493,087,016,910,000,000,000,000,000,000,000 | 5 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle)
{
struct Qdisc *q;
read_lock_bh(&qdisc_tree_lock);
list_for_each_entry(q, &dev->qdisc_list, list) {
if (q->handle == handle) {
read_unlock_bh(&qdisc_tree_lock);
return q;
}
}
read_unlock_bh(&qdisc_tree_lock);
return NULL;
} | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 116,981,024,603,985,600,000,000,000,000,000,000,000 | 14 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int io_sq_offload_start(struct io_ring_ctx *ctx,
struct io_uring_params *p)
{
struct io_wq_data data;
unsigned concurrency;
int ret;
init_waitqueue_head(&ctx->sqo_wait);
mmgrab(current->mm);
ctx->sqo_mm = current->mm;
if (ctx->flags & IORING_SETUP_SQPOLL) {
ret = -EPERM;
if (!capable(CAP_S... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 176,802,347,020,723,880,000,000,000,000,000,000,000 | 70 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
static unsigned int fanout_demux_rollover(struct packet_fanout *f,
struct sk_buff *skb,
unsigned int idx, unsigned int skip,
unsigned int num)
{
unsigned int i, j;
i = j = min_t(int, f->next[idx], num - 1);
do {
if (i != skip && packet_rcv_has_room(pkt_sk(f->arr[i]), skb)) {
if (i != j)
... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 159,592,546,474,545,950,000,000,000,000,000,000,000 | 20 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
imap_parser_create(struct istream *input, struct ostream *output,
size_t max_line_size)
{
struct imap_parser *parser;
parser = i_new(struct imap_parser, 1);
parser->refcount = 1;
parser->pool = pool_alloconly_create(MEMPOOL_GROWING"IMAP parser",
1024);
parser->input = input;
parser->output = outpu... | 0 | [
"CWE-787"
] | core | 85fcb895ca7f0bcb8ee72047fe0e1e78532ff90b | 313,655,465,891,764,760,000,000,000,000,000,000,000 | 17 | lib-imap: Don't accept strings with NULs
IMAP doesn't allow NULs except in binary literals. We'll still allow them
in regular literals as well, but just not in strings.
This fixes a bug with unescaping a string with NULs: str_unescape() could
have been called for memory that points outside the allocated string,
causi... |
int __init snd_card_info_init(void)
{
struct snd_info_entry *entry;
entry = snd_info_create_module_entry(THIS_MODULE, "cards", NULL);
if (! entry)
return -ENOMEM;
entry->c.text.read = snd_card_info_read;
if (snd_info_register(entry) < 0) {
snd_info_free_entry(entry);
return -ENOMEM;
}
snd_card_info_entry ... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 07f4d9d74a04aa7c72c5dae0ef97565f28f17b92 | 320,032,197,579,963,380,000,000,000,000,000,000,000 | 27 | ALSA: control: Protect user controls against concurrent access
The user-control put and get handlers as well as the tlv do not protect against
concurrent access from multiple threads. Since the state of the control is not
updated atomically it is possible that either two write operations or a write
and a read operatio... |
char *cJSON_PrintBuffered(cJSON *item,int prebuffer,int fmt)
{
printbuffer p;
p.buffer=(char*)cJSON_malloc(prebuffer);
p.length=prebuffer;
p.offset=0;
return print_value(item,0,fmt,&p);
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 88,877,338,949,800,500,000,000,000,000,000,000,000 | 8 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
set_of(union DateData *x, int of)
{
assert(complex_dat_p(x));
get_c_jd(x);
get_c_df(x);
clear_civil(x);
x->c.of = of;
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 303,808,026,866,288,200,000,000,000,000,000,000,000 | 8 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
static MagickBooleanType ExportQuantumPixel(const Image *image,
const RectangleInfo *roi,const char *magick_restrict map,
const QuantumType *quantum_map,void *pixels,ExceptionInfo *exception)
{
register const Quantum
*magick_restrict p;
register Quantum
*magick_restrict q;
register ssize_t
x;
... | 0 | [
"CWE-190"
] | ImageMagick | 406da3af9e09649cda152663c179902edf5ab3ac | 163,899,627,072,460,720,000,000,000,000,000,000,000 | 209 | https://github.com/ImageMagick/ImageMagick/issues/1732 |
static char *uncompress(int16_t field_count, char *start, char *end,
char *ptr, char *uncompressed, int uncomp_len,
char **uncompressed_ptr)
{
char *uptr = *uncompressed_ptr; /* position in result buffer */
debug("count %d ptr %p end %p uptr %p", field_count, ptr, end, uptr);
while (field_count-- > 0 && ptr ... | 1 | [
"CWE-787"
] | connman | e4079a20f617a4b076af503f6e4e8b0304c9f2cb | 3,365,568,518,852,253,400,000,000,000,000,000,000 | 130 | dnsproxy: Add length checks to prevent buffer overflow
Fixes: CVE-2021-26675 |
ptvcursor_free(ptvcursor_t *ptvc)
{
ptvcursor_free_subtree_levels(ptvc);
/*g_free(ptvc);*/
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 196,103,901,809,134,220,000,000,000,000,000,000,000 | 5 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static void cleanup_entry(struct ip6t_entry *e, struct net *net)
{
struct xt_tgdtor_param par;
struct xt_entry_target *t;
struct xt_entry_match *ematch;
/* Cleanup all matches */
xt_ematch_foreach(ematch, e)
cleanup_match(ematch, net);
t = ip6t_get_target(e);
par.net = net;
par.target = t->u.kernel.t... | 0 | [
"CWE-476"
] | linux | 57ebd808a97d7c5b1e1afb937c2db22beba3c1f8 | 85,261,180,140,418,980,000,000,000,000,000,000,000 | 20 | netfilter: add back stackpointer size checks
The rationale for removing the check is only correct for rulesets
generated by ip(6)tables.
In iptables, a jump can only occur to a user-defined chain, i.e.
because we size the stack based on number of user-defined chains we
cannot exceed stack size.
However, the underlyi... |
dissect_kafka_offset_commit_response_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset, kafka_api_version_t api_version)
{
proto_item *subti;
proto_tree *subtree;
int topic_start, topic_len;
subtree = proto_tree_add_subtree(tree, tvb,... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 284,317,343,256,609,930,000,000,000,000,000,000,000 | 28 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
g_markup_parse_context_end_parse (GMarkupParseContext *context,
GError **error)
{
g_return_val_if_fail (context != NULL, FALSE);
g_return_val_if_fail (!context->parsing, FALSE);
g_return_val_if_fail (context->state != STATE_ERROR, FALSE);
if (context->partial_chu... | 1 | [
"CWE-476"
] | glib | fccef3cc822af74699cca84cd202719ae61ca3b9 | 274,879,747,675,392,830,000,000,000,000,000,000,000 | 112 | gmarkup: Fix crash in error handling path for closing elements
If something which looks like a closing tag is left unfinished, but
isn’t paired to an opening tag in the document, the error handling code
would do a null pointer dereference. Avoid that, at the cost of
introducing a new translatable error message.
Inclu... |
uint32_t vga_ioport_read(void *opaque, uint32_t addr)
{
VGACommonState *s = opaque;
int val, index;
if (vga_ioport_invalid(s, addr)) {
val = 0xff;
} else {
switch(addr) {
case VGA_ATT_W:
if (s->ar_flip_flop == 0) {
val = s->ar_index;
} els... | 0 | [
"CWE-200"
] | qemu | c1b886c45dc70f247300f549dce9833f3fa2def5 | 311,991,646,058,632,650,000,000,000,000,000,000,000 | 91 | vbe: rework sanity checks
Plug a bunch of holes in the bochs dispi interface parameter checking.
Add a function doing verification on all registers. Call that
unconditionally on every register write. That way we should catch
everything, even changing one register affecting the valid range of
another register.
Some ... |
void __init migration_init(void)
{
void *cpu = (void *)(long)smp_processor_id();
int err;
/* Start one for the boot CPU: */
err = migration_call(&migration_notifier, CPU_UP_PREPARE, cpu);
BUG_ON(err == NOTIFY_BAD);
migration_call(&migration_notifier, CPU_ONLINE, cpu);
register_cpu_notifier(&migration_notifier);... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 39,000,821,600,947,270,000,000,000,000,000,000,000 | 11 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
static void mtrr_lookup_var_next(struct mtrr_iter *iter)
{
__mtrr_lookup_var_next(iter);
} | 0 | [
"CWE-284"
] | linux | 9842df62004f366b9fed2423e24df10542ee0dc5 | 271,446,268,766,695,270,000,000,000,000,000,000,000 | 4 | KVM: MTRR: remove MSR 0x2f8
MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support
was introduced by 9ba075a664df ("KVM: MTRR support").
0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the
size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8,
which made access to ... |
HandleFileDownloadCancelRequest(rfbClientPtr cl, rfbTightClientPtr rtcp)
{
int n = 0;
char *reason = NULL;
rfbClientToServerTightMsg msg;
memset(&msg, 0, sizeof(rfbClientToServerTightMsg));
if((n = rfbReadExact(cl, ((char *)&msg)+1, sz_rfbFileDownloadCancelMsg-1)) <= 0) {
if (n < 0)
rfbLog("File [%s]: M... | 1 | [
"CWE-416"
] | libvncserver | ca2a5ac02fbbadd0a21fabba779c1ea69173d10b | 26,239,629,721,356,180,000,000,000,000,000,000,000 | 55 | tightvnc-filetransfer: fix heap use-after-free
One can only guess what the intended semantics were here, but as every
other rfbCloseClient() call in this file is followed by an immediate
return, let's assume this was forgotton in this case.
Anyway, don't forget to clean up to not leak memory.
Closes #241 |
start_thread_common(struct pt_regs *regs, unsigned long new_ip,
unsigned long new_sp,
unsigned int _cs, unsigned int _ss, unsigned int _ds)
{
loadsegment(fs, 0);
loadsegment(es, _ds);
loadsegment(ds, _ds);
load_gs_index(0);
current->thread.usersp = new_sp;
regs->ip = new_ip;
regs->sp = new_sp;
thi... | 0 | [
"CWE-200",
"CWE-401"
] | linux | f647d7c155f069c1a068030255c300663516420e | 170,357,679,270,701,350,000,000,000,000,000,000,000 | 16 | x86_64, switch_to(): Load TLS descriptors before switching DS and ES
Otherwise, if buggy user code points DS or ES into the TLS
array, they would be corrupted after a context switch.
This also significantly improves the comments and documents some
gotchas in the code.
Before this patch, the both tests below failed. ... |
void spk_ttyio_release(void)
{
if (!speakup_tty)
return;
tty_lock(speakup_tty);
if (speakup_tty->ops->close)
speakup_tty->ops->close(speakup_tty, NULL);
tty_ldisc_flush(speakup_tty);
tty_unlock(speakup_tty);
tty_kclose(speakup_tty);
} | 0 | [
"CWE-362",
"CWE-763"
] | linux | d4122754442799187d5d537a9c039a49a67e57f1 | 129,137,389,658,622,740,000,000,000,000,000,000,000 | 14 | speakup: Do not let the line discipline be used several times
Speakup has only one speakup_tty variable to store the tty it is managing. This
makes sense since its codebase currently assumes that there is only one user who
controls the screen reading.
That however means that we have to forbid using the line disciplin... |
lys_extension_instances_free(struct ly_ctx *ctx, struct lys_ext_instance **e, unsigned int size,
void (*private_destructor)(const struct lys_node *node, void *priv))
{
unsigned int i, j, k;
struct lyext_substmt *substmt;
void **pp, **start;
struct lys_node *siter, *snext;
#... | 0 | [
"CWE-617"
] | libyang | 5ce30801f9ccc372bbe9b7c98bb5324b15fb010a | 192,102,403,856,397,300,000,000,000,000,000,000,000 | 194 | schema tree BUGFIX freeing nodes with no module set
Context must be passed explicitly for these cases.
Fixes #1452 |
static void net_configure_bridge(Bridge *br) {
assert(br);
assert(br->dev);
// check the bridge device exists
char sysbridge[30 + strlen(br->dev)];
sprintf(sysbridge, "/sys/class/net/%s/bridge", br->dev);
struct stat s;
int rv = stat(sysbridge, &s);
if (rv == 0) {
// this is a bridge device
br->macvlan = 0... | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 221,175,172,779,047,850,000,000,000,000,000,000,000 | 79 | fixing CVE-2022-31214 |
void plist_bin_init(void)
{
/* init binary plist stuff */
#ifdef DEBUG
char *env_debug = getenv("PLIST_BIN_DEBUG");
if (env_debug && !strcmp(env_debug, "1")) {
plist_bin_debug = 1;
}
#endif
} | 0 | [
"CWE-119",
"CWE-787"
] | libplist | fbd8494d5e4e46bf2e90cb6116903e404374fb56 | 288,818,279,519,075,570,000,000,000,000,000,000,000 | 10 | bplist: Make sure to bail out if malloc() fails in parse_string_node()
Credit to Wang Junjie <zhunkibatu@gmail.com> (#93) |
numeric_to_char(PG_FUNCTION_ARGS)
{
Numeric value = PG_GETARG_NUMERIC(0);
text *fmt = PG_GETARG_TEXT_P(1);
NUMDesc Num;
FormatNode *format;
text *result;
bool shouldFree;
int out_pre_spaces = 0,
sign = 0;
char *numstr,
*orgnum,
*p;
Numeric x;
NUM_TOCHAR_prepare;
/*
* On Dat... | 0 | [
"CWE-120"
] | postgres | 0150ab567bcf5e5913e2b62a1678f84cc272441f | 127,428,938,851,118,000,000,000,000,000,000,000,000 | 118 | to_char(): prevent accesses beyond the allocated buffer
Previously very long field masks for floats could access memory
beyond the existing buffer allocated to hold the result.
Reported by Andres Freund and Peter Geoghegan. Backpatch to all
supported versions.
Security: CVE-2015-0241 |
MagickPrivate ClassType GetPixelCacheStorageClass(const Cache cache)
{
CacheInfo
*magick_restrict cache_info;
assert(cache != (Cache) NULL);
cache_info=(CacheInfo *) cache;
assert(cache_info->signature == MagickCoreSignature);
if (cache_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,Get... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | aecd0ada163a4d6c769cec178955d5f3e9316f2f | 160,230,998,492,150,740,000,000,000,000,000,000,000 | 13 | Set pixel cache to undefined if any resource limit is exceeded |
static ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb,
const struct iovec *iov, loff_t offset,
unsigned long nr_segs)
{
struct file *file = iocb->ki_filp;
struct inode *inode = file->f_mapping->host;
struct ext4_inode_info *ei = EXT4_I(inode);
handle_t *handle;
ssize_t ret;
int orphan = 0... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 167,588,862,415,010,500,000,000,000,000,000,000,000 | 80 | 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... |
static ssize_t cpu_rt_runtime_write(struct cgroup *cgrp, struct cftype *cft,
struct file *file,
const char __user *userbuf,
size_t nbytes, loff_t *unused_ppos)
{
char buffer[64];
int retval = 0;
s64 val;
char *end;
if (!nbytes)
return -EINVAL;
if (nbytes >= sizeof(buffer))
return -E2BIG;
if (cop... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 57,533,177,670,478,720,000,000,000,000,000,000,000 | 32 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
static __init int test_ringbuffer(void)
{
struct task_struct *rb_hammer;
struct trace_buffer *buffer;
int cpu;
int ret = 0;
if (security_locked_down(LOCKDOWN_TRACEFS)) {
pr_warn("Lockdown is enabled, skipping ring buffer tests\n");
return 0;
}
pr_info("Running ring buffer tests...\n");
buffer = ring_buff... | 0 | [
"CWE-362"
] | linux | bbeb97464eefc65f506084fd9f18f21653e01137 | 181,571,027,205,497,730,000,000,000,000,000,000,000 | 160 | tracing: Fix race in trace_open and buffer resize call
Below race can come, if trace_open and resize of
cpu buffer is running parallely on different cpus
CPUX CPUY
ring_buffer_resize
atomic_read(&buffer->resize_disabled)
tracing_open
tracing_reset_online_cpus
ring_buffer_... |
static noinstr void xen_set_debugreg(int reg, unsigned long val)
{
HYPERVISOR_set_debugreg(reg, val);
} | 0 | [
"CWE-703"
] | linux | 96e8fc5818686d4a1591bb6907e7fdb64ef29884 | 184,090,931,708,914,030,000,000,000,000,000,000,000 | 4 | x86/xen: Use clear_bss() for Xen PV guests
Instead of clearing the bss area in assembly code, use the clear_bss()
function.
This requires to pass the start_info address as parameter to
xen_start_kernel() in order to avoid the xen_start_info being zeroed
again.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-of... |
static int ip_mc_del_src(struct in_device *in_dev, __be32 *pmca, int sfmode,
int sfcount, __be32 *psfsrc, int delta)
{
struct ip_mc_list *pmc;
int changerec = 0;
int i, err;
if (!in_dev)
return -ENODEV;
rcu_read_lock();
for_each_pmc_rcu(in_dev, pmc) {
if (*pmca == pmc->multiaddr)
break;
}
if (!pmc) ... | 0 | [
"CWE-399",
"CWE-703",
"CWE-369"
] | linux | a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27 | 156,181,497,848,173,240,000,000,000,000,000,000,000 | 62 | igmp: Avoid zero delay when receiving odd mixture of IGMP queries
Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
behavior on v3 query during v2-compatibility mode') added yet another
case for query parsing, which can result in max_delay = 0. Substitute
a value of 1, as in the usual v3 case.
Rep... |
COMPAT_SYSCALL_DEFINE2(clock_settime, clockid_t, which_clock,
struct compat_timespec __user *, tp)
{
const struct k_clock *kc = clockid_to_kclock(which_clock);
struct timespec64 ts;
if (!kc || !kc->clock_set)
return -EINVAL;
if (compat_get_timespec64(&ts, tp))
return -EFAULT;
return kc->clock_set(w... | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 235,309,210,452,407,000,000,000,000,000,000,000,000 | 14 | posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callb... |
pdf14_pop_transparency_group(gs_gstate *pgs, pdf14_ctx *ctx,
const pdf14_nonseparable_blending_procs_t * pblend_procs,
int tos_num_color_comp, cmm_profile_t *curr_icc_profile, gx_device *dev)
{
pdf14_buf *tos = ctx->stack;
pdf14_buf *nos = tos->saved;
pdf14_mask_t *mask_stack = tos->mask_stack;
... | 0 | [] | ghostpdl | c432131c3fdb2143e148e8ba88555f7f7a63b25e | 170,616,323,856,036,320,000,000,000,000,000,000,000 | 130 | Bug 699661: Avoid sharing pointers between pdf14 compositors
If a copdevice is triggered when the pdf14 compositor is the device, we make
a copy of the device, then throw an error because, by default we're only allowed
to copy the device prototype - then freeing it calls the finalize, which frees
several pointers shar... |
test_gui_scrollbar(dict_T *args)
{
char_u *which;
long value;
int dragging;
scrollbar_T *sb = NULL;
if (!dict_has_key(args, "which")
|| !dict_has_key(args, "value")
|| !dict_has_key(args, "dragging"))
return FALSE;
which = dict_get_string(args, "which", FALSE);
value = (long)di... | 0 | [
"CWE-416"
] | vim | 249e1b903a9c0460d618f6dcc59aeb8c03b24b20 | 324,000,923,512,248,800,000,000,000,000,000,000,000 | 35 | patch 9.0.0213: using freed memory with error in assert argument
Problem: Using freed memory with error in assert argument.
Solution: Make a copy of the error. |
i915_gem_execbuffer2_ioctl(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct drm_i915_gem_execbuffer2 *args = data;
struct drm_i915_gem_exec_object2 *exec2_list;
struct drm_syncobj **fences = NULL;
const size_t count = args->buffer_count;
int err;
if (!check_buffer_count(count)) {
DRM_D... | 0 | [
"CWE-20"
] | linux | 594cc251fdd0d231d342d88b2fdff4bc42fb0690 | 287,198,683,790,903,970,000,000,000,000,000,000,000 | 84 | make 'user_access_begin()' do 'access_ok()'
Originally, the rule used to be that you'd have to do access_ok()
separately, and then user_access_begin() before actually doing the
direct (optimized) user access.
But experience has shown that people then decide not to do access_ok()
at all, and instead rely on it being i... |
dump_select_menu(win, how, item)
winid win UNUSED;
int how UNUSED;
menu_item **item;
{
*item = (menu_item *) 0;
return 0;
} | 0 | [
"CWE-120",
"CWE-269"
] | NetHack | f3def5c0b999478da2d0a8f0b6a7c370a2065f77 | 241,852,192,245,370,600,000,000,000,000,000,000,000 | 8 | command line triggered buffer overruns
Prevent extremely long command line arguments from overflowing local
buffers in raw_printf or config_error_add. The increased buffer
sizes they recently got to deal with long configuration file values
aren't sufficient to handle command line induced overflows.
choose_windows(co... |
static void Bfree(Bigint *v)
{
if (v) {
_THREAD_PRIVATE_MUTEX_LOCK(dtoa_mutex);
v->next = freelist[v->k];
freelist[v->k] = v;
_THREAD_PRIVATE_MUTEX_UNLOCK(dtoa_mutex);
}
} | 0 | [
"CWE-119"
] | php-src | 37da90248deb2188e8ee50e4753ad6340679b425 | 260,776,787,585,723,440,000,000,000,000,000,000,000 | 9 | Added missing allocation checks |
psutil_linux_prlimit(PyObject *self, PyObject *args) {
long pid;
int ret, resource;
struct rlimit old, new;
struct rlimit *newp = NULL;
PyObject *py_soft = NULL;
PyObject *py_hard = NULL;
if (! PyArg_ParseTuple(args, "li|OO", &pid, &resource, &py_soft, &py_hard))
return NULL;
/... | 0 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 323,539,773,408,962,120,000,000,000,000,000,000,000 | 50 | 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... |
Status AuthorizationManagerImpl::getRoleDescription(OperationContext* opCtx,
const RoleName& roleName,
PrivilegeFormat privileges,
AuthenticationRestrictionsFormat ... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 305,824,719,428,645,770,000,000,000,000,000,000,000 | 8 | SERVER-38984 Validate unique User ID on UserCache hit |
int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[])
{
int j, k;
int n, dN, d0, d1;
BN_ULONG zz, *z;
bn_check_top(a);
if (!p[0]) {
/* reduction mod 1 => return 0 */
BN_zero(r);
return 1;
}
/*
* Since the algorithm does reduction in the r value, if a ... | 0 | [
"CWE-399",
"CWE-703"
] | openssl | 4924b37ee01f71ae19c94a8934b80eeb2f677932 | 190,531,339,232,326,740,000,000,000,000,000,000,000 | 91 | bn/bn_gf2m.c: avoid infinite loop wich malformed ECParamters.
CVE-2015-1788
Reviewed-by: Matt Caswell <matt@openssl.org> |
SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
{
int errno = 0;
down_read(&uts_sem);
if (copy_to_user(name, utsname(), sizeof *name))
errno = -EFAULT;
up_read(&uts_sem);
if (!errno && override_release(name->release, sizeof(name->release)))
errno = -EFAULT;
if (!errno && override_architecture(n... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 304,192,615,879,517,450,000,000,000,000,000,000,000 | 15 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.