func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void reply_spnego_ntlmssp(struct smb_request *req,
uint16 vuid,
AUTH_NTLMSSP_STATE **auth_ntlmssp_state,
DATA_BLOB *ntlmssp_blob, NTSTATUS nt_status,
const char *OID,
bool wrap)
{
DATA_BLOB response;
struct auth_serversupplied_info *server_info = NULL;
struct smbd_server_connection *s... | 0 | [
"CWE-119"
] | samba | 9280051bfba337458722fb157f3082f93cbd9f2b | 106,907,367,785,920,740,000,000,000,000,000,000,000 | 86 | s3: Fix an uninitialized variable read
Found by Laurent Gaffie <laurent.gaffie@gmail.com>
Thanks for that,
Volker
Fix bug #7254 (An uninitialized variable read could cause an smbd crash). |
__releases(dentry->d_inode->i_lock)
{
struct inode *inode = dentry->d_inode;
bool hashed = !d_unhashed(dentry);
if (hashed)
raw_write_seqcount_begin(&dentry->d_seq);
__d_clear_type_and_inode(dentry);
hlist_del_init(&dentry->d_u.d_alias);
if (hashed)
raw_write_seqcount_end(&dentry->d_seq);
spin_unlock(&dent... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 142,509,946,463,556,180,000,000,000,000,000,000,000 | 20 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
static void control_intr(struct virtqueue *vq)
{
struct ports_device *portdev;
portdev = vq->vdev->priv;
schedule_work(&portdev->control_work);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c4baad50297d84bde1a7ad45e50c73adae4a2192 | 39,035,467,319,540,046,000,000,000,000,000,000,000 | 7 | virtio-console: avoid DMA from stack
put_chars() stuffs the buffer it gets into an sg, but that buffer may be
on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it
manifested as printks getting turned into NUL bytes).
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat... |
ast_for_with_stmt(struct compiling *c, const node *n0, bool is_async)
{
const node * const n = is_async ? CHILD(n0, 1) : n0;
int i, n_items, nch_minus_type, has_type_comment, end_lineno, end_col_offset;
asdl_seq *items, *body;
string type_comment;
REQ(n, with_stmt);
has_type_comment = TYPE(CHI... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 185,898,933,456,734,900,000,000,000,000,000,000,000 | 43 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
#ifndef GPAC_DISABLE_ISOM_WRITE
static u32 sgpd_size_entry(u32 grouping_type, void *entry)
{
switch (grouping_type) {
case GF_ISOM_SAMPLE_GROUP_ROLL:
case GF_ISOM_SAMPLE_GROUP_PROL:
return 2;
case GF_ISOM_SAMPLE_GROUP_TELE:
case GF_ISOM_SAMPLE_GROUP_RAP:
case GF_ISOM_SAMPLE_GROUP_SAP:
case GF_ISOM_SAMPLE_GROUP... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 299,357,869,328,531,920,000,000,000,000,000,000,000 | 35 | fixed #1757 |
static int matches_aliases(server_rec *s, const char *host)
{
int i;
apr_array_header_t *names;
/* match ServerName */
if (!strcasecmp(host, s->server_hostname)) {
return 1;
}
/* search all the aliases from ServerAlias directive */
names = s->names;
if (names) {
char **... | 0 | [] | httpd | ecebcc035ccd8d0e2984fe41420d9e944f456b3c | 17,938,599,602,176,301,000,000,000,000,000,000,000 | 31 | Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk:
*) core: Split ap_create_request() from ap_read_request(). [Graham Leggett]
*) core, h2: common ap_parse_request_line() and ap_check_request_header()
code. [Yann Ylavic]
... |
GF_Err gf_media_avc_change_color(GF_AVCConfig *avcc, s32 fullrange, s32 vidformat, s32 colorprim, s32 transfer, s32 colmatrix)
{
GF_VUIInfo vuii;
memset(&vuii, 0, sizeof(GF_VUIInfo));
vuii.ar_num = -1;
vuii.ar_den = -1;
vuii.fullrange = fullrange;
vuii.video_format = vidformat;
vuii.color_prim = colorprim;
vuii... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 5,354,776,727,758,470,000,000,000,000,000,000,000 | 13 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
parsestatus(netdissect_options *ndo,
const uint32_t *dp, int *er)
{
int errnum;
ND_TCHECK(dp[0]);
errnum = EXTRACT_32BITS(&dp[0]);
if (er)
*er = errnum;
if (errnum != 0) {
if (!ndo->ndo_qflag)
ND_PRINT((ndo, " ERROR: %s",
tok2str(status2str, "unk %d", errnum)));
nfserr = 1;
}
return... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 7a923447fd49a069a0fd3b6c3547438ab5ee2123 | 314,010,798,987,738,780,000,000,000,000,000,000,000 | 20 | CVE-2017-13001/NFS: Don't copy more data than is in the file handle.
Also, put the buffer on the stack; no reason to make it static. (65
bytes isn't a lot.)
This fixes a buffer over-read discovered by Kamil Frankowicz.
Add a test using the capture file supplied by the reporter(s). |
session_worker_child_watch (GPid pid,
int status,
GdmSessionWorker *worker)
{
g_debug ("GdmSessionWorker: child (pid:%d) done (%s:%d)",
(int) pid,
WIFEXITED (status) ? "status"
:... | 0 | [] | gdm | c25ef9245be4e0be2126ef3d075df4401949b570 | 166,718,740,293,424,460,000,000,000,000,000,000,000 | 37 | Store the face and dmrc files in a cache. Refer to bug #565151. |
int vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads,
unsigned count)
{
int start, n, r;
start = vq->last_used_idx & (vq->num - 1);
n = vq->num - start;
if (n < count) {
r = __vhost_add_used_n(vq, heads, n);
if (r < 0)
return r;
heads += n;
count -= n;
}
r = __vhost_ad... | 0 | [
"CWE-120"
] | linux | 060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 | 267,523,542,575,055,560,000,000,000,000,000,000,000 | 33 | vhost: make sure log_num < in_num
The code assumes log_num < in_num everywhere, and that is true as long as
in_num is incremented by descriptor iov count, and log_num by 1. However
this breaks if there's a zero sized descriptor.
As a result, if a malicious guest creates a vring desc with desc.len = 0,
it may cause th... |
static int emulate_string_inst(struct pt_regs *regs, u32 instword)
{
u8 rT = (instword >> 21) & 0x1f;
u8 rA = (instword >> 16) & 0x1f;
u8 NB_RB = (instword >> 11) & 0x1f;
u32 num_bytes;
unsigned long EA;
int pos = 0;
/* Early out if we are an invalid form of lswx */
if ((instword & PPC_INST_STRING_MASK) == PPC... | 0 | [] | linux | 5d176f751ee3c6eededd984ad409bff201f436a7 | 126,849,740,765,992,570,000,000,000,000,000,000,000 | 71 | powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR ... |
MaybeLocal<Object> X509Certificate::GetCert(
Environment* env,
const SSLPointer& ssl) {
ClearErrorOnReturn clear_error_on_return;
X509* cert = SSL_get_certificate(ssl.get());
if (cert == nullptr)
return MaybeLocal<Object>();
X509Pointer ptr(X509_dup(cert));
return New(env, std::move(ptr));
} | 0 | [
"CWE-295"
] | node | 466e5415a2b7b3574ab5403acb87e89a94a980d1 | 47,835,371,061,633,070,000,000,000,000,000,000,000 | 11 | crypto,tls: implement safe x509 GeneralName format
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even ... |
const char* XMLRPC_GetValueBase64(XMLRPC_VALUE value) {
return ((value && value->type == xmlrpc_base64) ? value->str.str : 0);
} | 0 | [
"CWE-119"
] | php-src | 88412772d295ebf7dd34409534507dc9bcac726e | 29,424,368,393,754,428,000,000,000,000,000,000,000 | 3 | Fix bug #68027 - fix date parsing in XMLRPC lib |
int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, const DnsAnswerFlags flags, size_t *start, size_t *rdata_start) {
size_t saved_size, rdlength_offset, end, rdlength, rds;
uint32_t ttl;
int r;
assert(p);
assert(rr);
saved_size = p->size;
r = ... | 0 | [
"CWE-20",
"CWE-476"
] | systemd | a924f43f30f9c4acaf70618dd2a055f8b0f166be | 277,024,461,159,139,470,000,000,000,000,000,000,000 | 346 | resolved: bugfix of null pointer p->question dereferencing (#6020)
See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396 |
static void InsertSampler( FlowSource_t *fs, exporter_v9_domain_t *exporter, int32_t id, uint16_t mode, uint32_t interval) {
generic_sampler_t *sampler;
dbg_printf("[%u] Insert Sampler: Exporter is 0x%llu\n", exporter->info.id, (long long unsigned)exporter);
if ( !exporter->sampler ) {
// no samplers so far
sam... | 0 | [] | nfdump | ff0e855bd1f51bed9fc5d8559c64d3cfb475a5d8 | 269,076,380,483,709,600,000,000,000,000,000,000,000 | 85 | Fix security issues in netflow_v9.c and ipfix.c |
int __sk_mem_schedule(struct sock *sk, int size, int kind)
{
struct proto *prot = sk->sk_prot;
int amt = sk_mem_pages(size);
long allocated;
sk->sk_forward_alloc += amt * SK_MEM_QUANTUM;
allocated = sk_memory_allocated_add(sk, amt);
if (mem_cgroup_sockets_enabled && sk->sk_memcg &&
!mem_cgroup_charge_skme... | 0 | [
"CWE-119",
"CWE-787"
] | linux | b98b0bc8c431e3ceb4b26b0dfc8db509518fb290 | 155,640,908,612,088,700,000,000,000,000,000,000,000 | 79 | net: avoid signed overflows for SO_{SND|RCV}BUFFORCE
CAP_NET_ADMIN users should not be allowed to set negative
sk_sndbuf or sk_rcvbuf values, as it can lead to various memory
corruptions, crashes, OOM...
Note that before commit 82981930125a ("net: cleanups in
sock_setsockopt()"), the bug was even more serious, since ... |
nm_gconf_get_bytearray_helper (GConfClient *client,
const char *path,
const char *key,
const char *setting,
GByteArray **value)
{
char *gc_key;
GConfValue *gc_value;
GByteArray *array;
gboolea... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 88,224,582,649,413,790,000,000,000,000,000,000,000 | 50 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
import_one (ctrl_t ctrl,
const char *fname, KBNODE keyblock, struct stats_s *stats,
unsigned char **fpr,size_t *fpr_len,unsigned int options,
int from_sk )
{
PKT_public_key *pk;
PKT_public_key *pk_orig;
KBNODE node, uidnode;
KBNODE keyblock_orig = NULL;
u32 keyid[2];
int rc... | 0 | [
"CWE-20"
] | gnupg | f0b33b6fb8e0586e9584a7a409dcc31263776a67 | 317,172,042,889,104,900,000,000,000,000,000,000,000 | 349 | gpg: Import only packets which are allowed in a keyblock.
* g10/import.c (valid_keyblock_packet): New.
(read_block): Store only valid packets.
--
A corrupted key, which for example included a mangled public key
encrypted packet, used to corrupt the keyring. This change skips all
packets which are not allowed in a ke... |
static inline void status_report(struct tty_struct *tty)
{
static const char teminal_ok[] = "\033[0n";
respond_string(teminal_ok, strlen(teminal_ok), tty->port);
} | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 162,044,434,989,527,990,000,000,000,000,000,000,000 | 6 | vt: Disable KD_FONT_OP_COPY
It's buggy:
On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
> We recently discovered a slab-out-of-bounds read in fbcon in the latest
> kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that
> "fbcon_do_set_font" did not handle "vc->vc_font.data" and
> "vc->... |
BSONObj spec() {
return BSON("$or" << BSON_ARRAY(false << false << true));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 147,917,278,351,366,200,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
static struct page *alloc_fresh_gigantic_page_node(struct hstate *h, int nid)
{
struct page *page;
page = alloc_gigantic_page(nid, h);
if (page) {
prep_compound_gigantic_page(page, huge_page_order(h));
prep_new_huge_page(h, page, nid);
}
return page;
} | 0 | [
"CWE-362",
"CWE-119"
] | linux | 1e3921471354244f70fe268586ff94a97a6dd4df | 336,583,989,864,425,260,000,000,000,000,000,000,000 | 12 | userfaultfd: hugetlbfs: prevent UFFDIO_COPY to fill beyond the end of i_size
This oops:
kernel BUG at fs/hugetlbfs/inode.c:484!
RIP: remove_inode_hugepages+0x3d0/0x410
Call Trace:
hugetlbfs_setattr+0xd9/0x130
notify_change+0x292/0x410
do_truncate+0x65/0xa0
do_sys_ftruncate.constprop.3+0x11a/0x18... |
greedy_search(JOIN *join,
table_map remaining_tables,
uint search_depth,
uint prune_level,
uint use_cond_selectivity)
{
double record_count= 1.0;
double read_time= 0.0;
uint idx= join->const_tables; // index into 'join->best... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 74,631,955,048,978,390,000,000,000,000,000,000,000 | 97 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
static bool create_canon_ace_lists(files_struct *fsp, SMB_STRUCT_STAT *pst,
DOM_SID *pfile_owner_sid,
DOM_SID *pfile_grp_sid,
canon_ace **ppfile_ace, canon_ace **ppdir_ace,
SEC_ACL *dacl)
{
bool all_aces_are_inherit_only = (fsp->is_directory ? True : False);
canon_ace *file_ace = NULL;
ca... | 0 | [
"CWE-264"
] | samba | d6c28913f3109d1327a3d1369b6eafd3874b2dca | 204,546,760,932,536,100,000,000,000,000,000,000,000 | 335 | Bug 6488: acl_group_override() call in posix acls references an uninitialized variable.
(cherry picked from commit f92195e3a1baaddda47a5d496f9488c8445b41ad) |
func_unref(char_u *name)
{
ufunc_T *fp = NULL;
if (name == NULL || !func_name_refcount(name))
return;
fp = find_func(name, FALSE, NULL);
if (fp == NULL && numbered_function(name))
{
#ifdef EXITFREE
if (!entered_free_all_mem)
#endif
internal_error("func_unref()");
}
func_ptr_unref(fp)... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 297,241,851,629,683,800,000,000,000,000,000,000,000 | 16 | 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 int regulator_mode_constrain(struct regulator_dev *rdev, int *mode)
{
switch (*mode) {
case REGULATOR_MODE_FAST:
case REGULATOR_MODE_NORMAL:
case REGULATOR_MODE_IDLE:
case REGULATOR_MODE_STANDBY:
break;
default:
rdev_err(rdev, "invalid mode %x specified\n", *mode);
return -EINVAL;
}
if (!rdev->con... | 0 | [
"CWE-416"
] | linux | 60a2362f769cf549dc466134efe71c8bf9fbaaba | 56,162,298,589,733,400,000,000,000,000,000,000,000 | 33 | regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org> |
GetQualifiedName(
TPMI_DH_OBJECT handle, // IN: handle of the object
TPM2B_NAME *qualifiedName // OUT: qualified name of the object
)
{
OBJECT *object;
switch(HandleGetType(handle))
{
case TPM_HT_PERMANENT:
qualifiedName->t.size = sizeof(TPM_HANDLE);
UINT32_TO_BYTE_ARR... | 0 | [
"CWE-119"
] | libtpms | ea62fd9679f8c6fc5e79471b33cfbd8227bfed72 | 175,592,929,396,997,130,000,000,000,000,000,000,000 | 25 | tpm2: Initialize a whole OBJECT before using it
Initialize a whole OBJECT before using it. This is necessary since
an OBJECT may also be used as a HASH_OBJECT via the ANY_OBJECT
union and that HASH_OBJECT can leave bad size inidicators in TPM2B
buffer in the OBJECT. To get rid of this problem we reset the whole
OBJECT... |
static void Ins_JROT( INS_ARG )
{
if ( args[1] != 0 )
{
CUR.IP += (Int)(args[0]);
CUR.step_ins = FALSE;
/* See JMPR below */
if(CUR.IP > CUR.codeSize ||
(CUR.code[CUR.IP] != 0x2D && CUR.code[CUR.IP - 1] == 0x2D))
CUR.IP -= 1;
}
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 300,588,853,822,862,780,000,000,000,000,000,000,000 | 13 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static int ti_cpu_rev(struct edge_ti_manuf_descriptor *desc)
{
return TI_GET_CPU_REVISION(desc->CpuRev_BoardRev);
} | 0 | [
"CWE-191"
] | linux | 654b404f2a222f918af9b0cd18ad469d0c941a8e | 236,801,734,292,674,980,000,000,000,000,000,000,000 | 4 | USB: serial: io_ti: fix information leak in completion handler
Add missing sanity check to the bulk-in completion handler to avoid an
integer underflow that can be triggered by a malicious device.
This avoids leaking 128 kB of memory content from after the URB transfer
buffer to user space.
Fixes: 8c209e6782ca ("USB... |
static int64_t mxf_set_current_edit_unit(MXFContext *mxf, AVStream *st, int64_t current_offset, int resync)
{
int64_t next_ofs = -1;
MXFTrack *track = st->priv_data;
int64_t edit_unit = av_rescale_q(track->sample_count, st->time_base, av_inv_q(track->edit_rate));
int64_t new_edit_unit;
MXFIndexTable... | 0 | [
"CWE-125"
] | FFmpeg | bab0716c7f4793ec42e05a5aa7e80d82a0dd4e75 | 137,062,788,660,454,150,000,000,000,000,000,000,000 | 37 | avformat/mxfdec: Fix av_log context
Fixes: out of array access
Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
bool Item_subselect::exec()
{
subselect_engine *org_engine= engine;
DBUG_ENTER("Item_subselect::exec");
DBUG_ASSERT(fixed);
DBUG_ASSERT(!eliminated);
/*
Do not execute subselect in case of a fatal error
or if the query has been killed.
*/
if (thd->is_error() || thd->killed)
DBUG_RETURN(true)... | 0 | [
"CWE-89"
] | server | 5100b20b15edd93200f34a79d25f1b14e46a677e | 248,122,995,292,450,250,000,000,000,000,000,000,000 | 38 | MDEV-26047: MariaDB server crash at Item_subselect::init_expr_cache_tracker
The cause of crash:
remove_redundant_subquery_clauses() removes redundant item expressions.
The primary goal of this is to remove the subquery items.
The removal process unlinks the subquery from SELECT_LEX tree, but does
not remove it from SE... |
add_ctype_to_cc(CClassNode* cc, int ctype, int not, ScanEnv* env)
{
#define ASCII_LIMIT 127
int c, r;
int ascii_mode;
int is_single;
const OnigCodePoint *ranges;
OnigCodePoint limit;
OnigCodePoint sb_out;
OnigEncoding enc = env->enc;
ascii_mode = IS_ASCII_MODE_CTYPE_OPTION(ctype, env->options);
... | 0 | [
"CWE-125"
] | oniguruma | aa0188eaedc056dca8374ac03d0177429b495515 | 15,064,257,956,128,108,000,000,000,000,000,000,000 | 103 | fix #163: heap-buffer-overflow in gb18030_mbc_enc_len |
static inline MagickBooleanType CopyPixel(const Image *image,
const Quantum *source,Quantum *destination)
{
register ssize_t
i;
if (source == (const Quantum *) NULL)
{
destination[RedPixelChannel]=ClampToQuantum(image->background_color.red);
destination[GreenPixelChannel]=ClampToQuantum(
... | 0 | [
"CWE-476"
] | ImageMagick | 76f94fa2d9ae5d96e15929b6b6ce0c866fc44c69 | 85,710,530,237,998,830,000,000,000,000,000,000,000 | 26 | https://github.com/ImageMagick/ImageMagick/issues/746
https://github.com/ImageMagick/ImageMagick/issues/741 |
static int rsi_load_9116_bootup_params(struct rsi_common *common)
{
struct sk_buff *skb;
struct rsi_boot_params_9116 *boot_params;
rsi_dbg(MGMT_TX_ZONE, "%s: Sending boot params frame\n", __func__);
skb = dev_alloc_skb(sizeof(struct rsi_boot_params_9116));
if (!skb)
return -ENOMEM;
memset(skb->data, 0, sizeof... | 0 | [
"CWE-400",
"CWE-401"
] | linux | d563131ef23cbc756026f839a82598c8445bc45f | 109,013,052,552,468,400,000,000,000,000,000,000,000 | 43 | rsi: release skb if rsi_prepare_beacon fails
In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should
be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
bool WebContents::EmitNavigationEvent(
const std::string& event,
content::NavigationHandle* navigation_handle) {
bool is_main_frame = navigation_handle->IsInMainFrame();
int frame_tree_node_id = navigation_handle->GetFrameTreeNodeId();
content::FrameTreeNode* frame_tree_node =
content::FrameTreeNode... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 72,983,471,035,902,830,000,000,000,000,000,000,000 | 25 | 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
... |
static int fuse_dentry_delete(const struct dentry *dentry)
{
return time_before64(fuse_dentry_time(dentry), get_jiffies_64());
} | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 157,637,742,357,114,120,000,000,000,000,000,000,000 | 4 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
static int StreamTcpPacketStateSynRecv(ThreadVars *tv, Packet *p,
StreamTcpThread *stt, TcpSession *ssn, PacketQueue *pq)
{
if (ssn == NULL)
return -1;
if (p->tcph->th_flags & TH_RST) {
if (!StreamTcpValidateRst(ssn, p))
return -1;
uint8_t reset = TR... | 0 | [
"CWE-436",
"CWE-94"
] | suricata | fa692df37a796c3330c81988d15ef1a219afc006 | 89,595,187,401,309,560,000,000,000,000,000,000,000 | 390 | stream: reject broken ACK packets
Fix evasion posibility by rejecting packets with a broken ACK field.
These packets have a non-0 ACK field, but do not have a ACK flag set.
Bug #3324.
Reported-by: Nicolas Adba |
static void perf_adjust_freq_unthr_context(struct perf_event_context *ctx,
int needs_unthr)
{
struct perf_event *event;
struct hw_perf_event *hwc;
u64 now, period = TICK_NSEC;
s64 delta;
/*
* only need to iterate over all events iff:
* - context have events in frequency mode (needs freq adjust)
* - ... | 0 | [
"CWE-284",
"CWE-264"
] | linux | f63a8daa5812afef4f06c962351687e1ff9ccb2b | 156,424,769,149,939,790,000,000,000,000,000,000,000 | 66 | perf: Fix event->ctx locking
There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.
It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.
What I did fail at is sensible runtime checks on the use of
... |
int RESTArgs::get_time(struct req_state *s, const string& name,
const utime_t& def_val, utime_t *val, bool *existed)
{
bool exists;
string sval = s->info.args.get(name, &exists);
if (existed)
*existed = exists;
if (!exists) {
*val = def_val;
return 0;
}
uint64_t epoch, nsec;
int r... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 278,400,805,941,135,300,000,000,000,000,000,000,000 | 24 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static inline void tg3_tx_set_bd(struct tg3_tx_buffer_desc *txbd,
dma_addr_t mapping, u32 len, u32 flags,
u32 mss, u32 vlan)
{
txbd->addr_hi = ((u64) mapping >> 32);
txbd->addr_lo = ((u64) mapping & 0xffffffff);
txbd->len_flags = (len << TXD_LEN_SHIFT) | (flags & 0x0000ffff);
txbd->vlan_tag = (mss << TXD_... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 59,973,208,221,855,645,000,000,000,000,000,000,000 | 9 | 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 ... |
**/
CImg<Tdouble> get_stats(const unsigned int variance_method=1) const {
if (is_empty()) return CImg<doubleT>();
const T *const p_end = end(), *pm = _data, *pM = _data;
double S = 0, S2 = 0, P = 1;
const ulongT siz = size();
T m = *pm, M = *pM;
cimg_pragma_openmp(parallel r... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 173,738,050,637,744,120,000,000,000,000,000,000,000 | 42 | Fix other issues in 'CImg<T>::load_bmp()'. |
static inline int security_task_setscheduler(struct task_struct *p,
int policy,
struct sched_param *lp)
{
return cap_task_setscheduler(p, policy, lp);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 269,955,825,830,391,300,000,000,000,000,000,000,000 | 6 | 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... |
v9fs_stat2inode_dotl(struct p9_stat_dotl *stat, struct inode *inode,
unsigned int flags)
{
umode_t mode;
struct v9fs_inode *v9inode = V9FS_I(inode);
if ((stat->st_result_mask & P9_STATS_BASIC) == P9_STATS_BASIC) {
inode->i_atime.tv_sec = stat->st_atime_sec;
inode->i_atime.tv_nsec = stat->st_atime_nsec;
... | 0 | [
"CWE-835"
] | linux | 5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f | 332,481,863,261,389,840,000,000,000,000,000,000,000 | 66 | 9p: use inode->i_lock to protect i_size_write() under 32-bit
Use inode->i_lock to protect i_size_write(), else i_size_read() in
generic_fillattr() may loop infinitely in read_seqcount_begin() when
multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl()
simultaneously under 32-bit SMP environment, and a... |
static inline struct sock *udp_v4_mcast_next(struct net *net, struct sock *sk,
__be16 loc_port, __be32 loc_addr,
__be16 rmt_port, __be32 rmt_addr,
int dif)
{
struct hlist_nulls_node *node;
struct sock *s = sk;
unsigned short hnum = ntohs(loc_port);
sk_nulls_for_each_from(s, node) {
... | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 144,625,016,311,581,400,000,000,000,000,000,000,000 | 29 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static __init void init_smack_known_list(void)
{
/*
* Initialize rule list locks
*/
mutex_init(&smack_known_huh.smk_rules_lock);
mutex_init(&smack_known_hat.smk_rules_lock);
mutex_init(&smack_known_floor.smk_rules_lock);
mutex_init(&smack_known_star.smk_rules_lock);
mutex_init(&smack_known_web.smk_rules_lock)... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 59,290,961,850,121,730,000,000,000,000,000,000,000 | 27 | 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 ... |
GF_Err gnrm_box_size(GF_Box *s)
{
GF_GenericSampleEntryBox *ptr = (GF_GenericSampleEntryBox *)s;
s->type = GF_ISOM_BOX_TYPE_GNRM;
ptr->size += 8+ptr->data_size;
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 49,695,693,548,336,950,000,000,000,000,000,000,000 | 7 | fixed #1587 |
void dpy_gfx_copy(QemuConsole *con, int src_x, int src_y,
int dst_x, int dst_y, int w, int h)
{
DisplayState *s = con->ds;
DisplayChangeListener *dcl;
if (!qemu_console_is_visible(con)) {
return;
}
QLIST_FOREACH(dcl, &s->listeners, next) {
if (con != (dcl->con ? dc... | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 145,332,591,131,920,800,000,000,000,000,000,000,000 | 20 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
inline void do_write_sync(std::vector<asio::const_buffer>& buffers)
{
asio::write(adaptor_.socket(), buffers, [&](asio::error_code ec, std::size_t) {
if (!ec)
{
return false;
}
else
{
... | 0 | [
"CWE-416"
] | Crow | fba01dc76d6ea940ad7c8392e8f39f9647241d8e | 248,755,917,875,383,470,000,000,000,000,000,000,000 | 17 | Prevent HTTP pipelining which Crow doesn't support. |
MFixLine(p, y, mc)
struct win *p;
int y;
struct mchar *mc;
{
struct mline *ml = &p->w_mlines[y];
if (mc->attr && ml->attr == null)
{
if ((ml->attr = (unsigned char *)calloc(p->w_width + 1, 1)) == 0)
{
ml->attr = null;
mc->attr = p->w_rend.attr = 0;
WMsg(p, 0, "Warning: no space for attr - turned... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 206,615,001,610,372,340,000,000,000,000,000,000,000 | 59 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
php_http_url_t *php_http_url_parse(const char *str, size_t len, unsigned flags TSRMLS_DC)
{
size_t maxlen = 3 * len;
struct parse_state *state = ecalloc(1, sizeof(*state) + maxlen);
state->end = str + len;
state->ptr = str;
state->flags = flags;
state->maxlen = maxlen;
TSRMLS_SET_CTX(state->ts);
if (!parse_sc... | 1 | [
"CWE-119"
] | ext-http | 3724cd76a28be1d6049b5537232e97ac567ae1f5 | 238,300,026,944,275,850,000,000,000,000,000,000,000 | 36 | fix bug #71719 (Buffer overflow in HTTP url parsing functions)
The parser's offset was not reset when we softfail in scheme
parsing and continue to parse a path.
Thanks to hlt99 at blinkenshell dot org for the report. |
static int sort_dvi_down(const void *p1, const void *p2)
{
return ((long *)p1)[0] - ((long *)p2)[0];
} | 0 | [
"CWE-20"
] | evince | d4139205b010ed06310d14284e63114e88ec6de2 | 189,625,051,641,516,400,000,000,000,000,000,000,000 | 4 | backends: Fix several security issues in the dvi-backend.
See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. |
int hw_atl_utils_fw_downld_dwords(struct aq_hw_s *self, u32 a,
u32 *p, u32 cnt)
{
int err = 0;
u32 val;
err = readx_poll_timeout_atomic(hw_atl_sem_ram_get,
self, val, val == 1U,
1U, 10000U);
if (err < 0) {
bool is_locked;
hw_atl_reg_glb_cpu_sem_set(self, 1U, HW_ATL_FW_SM_RAM);
is_locked = h... | 0 | [
"CWE-787"
] | net | b922f622592af76b57cbc566eaeccda0b31a3496 | 120,807,791,984,516,860,000,000,000,000,000,000,000 | 45 | atlantic: Fix OOB read and write in hw_atl_utils_fw_rpc_wait
This bug report shows up when running our research tools. The
reports is SOOB read, but it seems SOOB write is also possible
a few lines below.
In details, fw.len and sw.len are inputs coming from io. A len
over the size of self->rpc triggers SOOB. The patc... |
dissect_blip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, _U_ void *data)
{
proto_tree *blip_tree;
gint offset = 0;
/* Set the protcol column to say BLIP */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BLIP");
/* Clear out stuff in the info column */
col_clear(pinfo->cinfo,COL_INFO);
// ------------------... | 0 | [
"CWE-476"
] | wireshark | 4a948427100b6c109f4ec7b4361f0d2aec5e5c3f | 126,311,140,020,855,400,000,000,000,000,000,000,000 | 162 | BLIP: Fix decompression buffer bug
Until now, mistakenly, the buffer for decompressing compressed BLIP messages
has been statically allocated as 16 Kb, but that is not valid behavior.
16 Kb is the maximum size of a _compressed_ frame. In theory, due to the
ability to zipbomb, there is virtually no upper bound on what... |
int net_get(int s, void *arg, int *len)
{
struct net_hdr nh;
int plen;
if (net_read_exact(s, &nh, sizeof(nh)) == -1)
{
return -1;
}
plen = ntohl(nh.nh_len);
if (!(plen <= *len))
printf("PLEN %d type %d len %d\n",
plen, nh.nh_type, *len);
assert(plen <= *len && plen > 0); /* XXX */
*len ... | 0 | [
"CWE-20",
"CWE-787"
] | aircrack-ng | 88702a3ce4c28a973bf69023cd0312f412f6193e | 48,368,137,250,891,780,000,000,000,000,000,000,000 | 24 | OSdep: Fixed segmentation fault that happens with a malicious server sending a negative length (Closes #16 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2419 28c6078b-6c39-48e3-add9-af49d547ecab |
xfs_alloc_read_agfl(
xfs_mount_t *mp, /* mount point structure */
xfs_trans_t *tp, /* transaction pointer */
xfs_agnumber_t agno, /* allocation group number */
xfs_buf_t **bpp) /* buffer for the ag free block array */
{
xfs_buf_t *bp; /* return value */
int error;
ASSERT(agno != NULLAGNUMBER);
error = xf... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | d0c7feaf87678371c2c09b3709400be416b2dc62 | 23,169,877,829,617,473,000,000,000,000,000,000,000 | 20 | 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... |
static inline uint32_t htx_free_data_space(const struct htx *htx)
{
uint32_t free = htx_free_space(htx);
if (free < sizeof(struct htx_blk))
return 0;
return (free - sizeof(struct htx_blk));
} | 0 | [
"CWE-190"
] | haproxy | 3b69886f7dcc3cfb3d166309018e6cfec9ce2c95 | 140,756,956,588,875,590,000,000,000,000,000,000,000 | 8 | BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer
Ori Hollander of JFrog Security reported that htx_add_header() and
htx_add_trailer() were missing a length check on the header name. While
this does not allow to overwrite any memory area, it results in bits of
the header name length to sli... |
i_apply_case_fold(OnigCodePoint from, OnigCodePoint to[],
int to_len, void* arg)
{
IApplyCaseFoldArg* iarg;
ScanEnv* env;
CClassNode* cc;
CClassNode* asc_cc;
BitSetRef bs;
int add_flag, r;
iarg = (IApplyCaseFoldArg* )arg;
env = iarg->env;
cc = iarg->cc;
asc_cc = iarg->asc_cc;
bs = cc->bs;
... | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 139,951,535,107,238,130,000,000,000,000,000,000,000 | 100 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
static int tipc_sendmsg(struct socket *sock,
struct msghdr *m, size_t dsz)
{
struct sock *sk = sock->sk;
int ret;
lock_sock(sk);
ret = __tipc_sendmsg(sock, m, dsz);
release_sock(sk);
return ret;
} | 0 | [
"CWE-703"
] | linux | 45e093ae2830cd1264677d47ff9a95a71f5d9f9c | 85,441,286,997,262,940,000,000,000,000,000,000,000 | 12 | tipc: check nl sock before parsing nested attributes
Make sure the socket for which the user is listing publication exists
before parsing the socket netlink attributes.
Prior to this patch a call without any socket caused a NULL pointer
dereference in tipc_nl_publ_dump().
Tested-and-reported-by: Baozeng Ding <splovi... |
png_check_chunk_name(png_structrp png_ptr, png_uint_32 chunk_name)
{
int i;
png_debug(1, "in png_check_chunk_name");
for (i=1; i<=4; ++i)
{
int c = chunk_name & 0xff;
if (c < 65 || c > 122 || (c > 90 && c < 97))
png_chunk_error(png_ptr, "invalid chunk type");
chunk_name >>= 8;... | 0 | [
"CWE-120"
] | libpng | a901eb3ce6087e0afeef988247f1a1aa208cb54d | 251,515,594,105,549,600,000,000,000,000,000,000,000 | 16 | [libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta). |
int ext4_mb_init_group(struct super_block *sb, ext4_group_t group, gfp_t gfp)
{
struct ext4_group_info *this_grp;
struct ext4_buddy e4b;
struct page *page;
int ret = 0;
might_sleep();
mb_debug(1, "init group %u\n", group);
this_grp = ext4_get_group_info(sb, group);
/*
* This ensures that we don't reinit the... | 0 | [
"CWE-416"
] | linux | 8844618d8aa7a9973e7b527d038a2a589665002c | 231,005,119,026,378,000,000,000,000,000,000,000,000 | 60 | ext4: only look at the bg_flags field if it is valid
The bg_flags field in the block group descripts is only valid if the
uninit_bg or metadata_csum feature is enabled. We were not
consistently looking at this field; fix this.
Also block group #0 must never have uninitialized allocation bitmaps,
or need to be zeroed... |
fill4 (unsigned short data[/*n*/], int n)
{
for (int i = 0; i < n; ++i)
data[i] = i & USHRT_MAX;
} | 0 | [
"CWE-190"
] | openexr | 51a92d67f53c08230734e74564c807043cbfe41e | 86,003,367,165,073,430,000,000,000,000,000,000,000 | 5 | check for valid Huf code lengths (#849)
* check for valid Huf code lengths
* test non-fast huf decoder in testHuf
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static void cmd_window_rsize(const char *data)
{
char rsizestr[MAX_INT_STRLEN];
int rsize;
if (!is_numeric(data, 0)) return;
rsize = atoi(data);
rsize -= MAIN_WINDOW_TEXT_WIDTH(WINDOW_MAIN(active_win));
if (rsize == 0) return;
ltoa(rsizestr, rsize < 0 ? -rsize : rsize);
if (rsize < 0)
cmd_window_rshrink(rs... | 0 | [
"CWE-476"
] | irssi | 5b5bfef03596d95079c728f65f523570dd7b03aa | 256,882,537,519,056,140,000,000,000,000,000,000,000 | 17 | check the error condition of mainwindow_create |
bool Arg_comparator::set_cmp_func_string()
{
THD *thd= current_thd;
func= is_owner_equal_func() ? &Arg_comparator::compare_e_string :
&Arg_comparator::compare_string;
if (compare_type() == STRING_RESULT &&
(*a)->result_type() == STRING_RESULT &&
(*b)->result_type() == S... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 329,199,827,716,717,650,000,000,000,000,000,000,000 | 36 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static int do_qib_user_sdma_queue_create(struct file *fp)
{
struct qib_filedata *fd = fp->private_data;
struct qib_ctxtdata *rcd = fd->rcd;
struct qib_devdata *dd = rcd->dd;
if (dd->flags & QIB_HAS_SEND_DMA) {
fd->pq = qib_user_sdma_queue_create(&dd->pcidev->dev,
dd->unit,
rcd->ctxt,
... | 0 | [
"CWE-284",
"CWE-264"
] | linux | e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 | 210,038,865,497,004,370,000,000,000,000,000,000,000 | 18 | IB/security: Restrict use of the write() interface
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl(). This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory... |
static bool stack_slot_scratched(const struct bpf_verifier_env *env, u64 regno)
{
return (env->scratched_stack_slots >> regno) & 1;
} | 0 | [
"CWE-787"
] | linux | 64620e0a1e712a778095bd35cbb277dc2259281f | 174,859,003,093,025,400,000,000,000,000,000,000,000 | 4 | bpf: Fix out of bounds access for ringbuf helpers
Both bpf_ringbuf_submit() and bpf_ringbuf_discard() have ARG_PTR_TO_ALLOC_MEM
in their bpf_func_proto definition as their first argument. They both expect
the result from a prior bpf_ringbuf_reserve() call which has a return type of
RET_PTR_TO_ALLOC_MEM_OR_NULL.
Meani... |
c_pdf14trans_equal(const gs_composite_t * pct0, const gs_composite_t * pct1)
{
return false;
} | 0 | [
"CWE-416"
] | ghostpdl | 90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb | 271,919,930,069,348,930,000,000,000,000,000,000,000 | 4 | Bug 697456. Dont create new ctx when pdf14 device reenabled
This bug had yet another weird case where the user created a
file that pushed the pdf14 device twice. We were in that case,
creating a new ctx and blowing away the original one with out
proper clean up. To avoid, only create a new one when we need it. |
static inline int dma_submit_error(dma_cookie_t cookie)
{
return cookie < 0 ? cookie : 0;
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 117,646,721,342,459,300,000,000,000,000,000,000,000 | 4 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static int imap_open_mailbox (CONTEXT* ctx)
{
IMAP_DATA *idata;
IMAP_STATUS* status;
char buf[LONG_STRING];
char bufout[LONG_STRING*2];
int count = 0;
IMAP_MBOX mx, pmx;
int rc;
const char *condstore;
if (imap_parse_path (ctx->path, &mx))
{
mutt_error (_("%s is an invalid IMAP path"), ctx->path... | 0 | [
"CWE-200",
"CWE-319"
] | mutt | 3e88866dc60b5fa6aaba6fd7c1710c12c1c3cd01 | 157,975,209,057,246,970,000,000,000,000,000,000,000 | 244 | Prevent possible IMAP MITM via PREAUTH response.
This is similar to CVE-2014-2567 and CVE-2020-12398. STARTTLS is not
allowed in the Authenticated state, so previously Mutt would
implicitly mark the connection as authenticated and skip any
encryption checking/enabling.
No credentials are exposed, but it does allow m... |
cmsBool PreOptimize(cmsPipeline* Lut)
{
cmsBool AnyOpt = FALSE, Opt;
do {
Opt = FALSE;
// Remove all identities
Opt |= _Remove1Op(Lut, cmsSigIdentityElemType);
// Remove XYZ2Lab followed by Lab2XYZ
Opt |= _Remove2Op(Lut, cmsSigXYZ2LabElemType, cmsSigLab2XYZElemType);
... | 0 | [
"CWE-125"
] | Little-CMS | d41071eb8cfea7aa10a9262c12bd95d5d9d81c8f | 298,420,975,397,289,500,000,000,000,000,000,000,000 | 38 | Contributed fixes from Oracle
Two minor glitches |
compat_do_replace(struct net *net, void __user *user, unsigned int len)
{
int ret;
struct compat_ipt_replace tmp;
struct xt_table_info *newinfo;
void *loc_cpu_entry;
struct ipt_entry *iter;
if (copy_from_user(&tmp, user, sizeof(tmp)) != 0)
return -EFAULT;
/* overflow check */
if (tmp.size >= INT_MAX / num_p... | 0 | [
"CWE-200"
] | linux-2.6 | 78b79876761b86653df89c48a7010b5cbd41a84a | 235,254,525,974,751,800,000,000,000,000,000,000,000 | 52 | netfilter: ip_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
in... |
_outWithCheckOption(StringInfo str, const WithCheckOption *node)
{
WRITE_NODE_TYPE("WITHCHECKOPTION");
WRITE_STRING_FIELD(viewname);
WRITE_NODE_FIELD(qual);
WRITE_BOOL_FIELD(cascaded);
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 200,337,381,261,472,550,000,000,000,000,000,000,000 | 8 | 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... |
RequestXLogSwitch(void)
{
XLogRecPtr RecPtr;
XLogRecData rdata;
/* XLOG SWITCH, alone among xlog record types, has no data */
rdata.buffer = InvalidBuffer;
rdata.data = NULL;
rdata.len = 0;
rdata.next = NULL;
RecPtr = XLogInsert(RM_XLOG_ID, XLOG_SWITCH, &rdata);
return RecPtr;
} | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 252,198,097,040,820,000,000,000,000,000,000,000,000 | 15 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
static void gx_ttfExport__SetWidth(ttfExport *self, FloatPoint *p)
{
gx_ttfExport *e = (gx_ttfExport *)self;
e->w.x = float2fixed(p->x);
e->w.y = float2fixed(p->y);
} | 0 | [
"CWE-125"
] | ghostpdl | 937ccd17ac65935633b2ebc06cb7089b91e17e6b | 186,571,058,284,412,100,000,000,000,000,000,000,000 | 7 | Bug 698056: make bounds check in gx_ttfReader__Read more robust |
TEST_P(DownstreamProtocolIntegrationTest, HittingDecoderFilterLimit) {
config_helper_.addFilter("{ name: envoy.http_dynamo_filter, config: {} }");
config_helper_.setBufferLimits(1024, 1024);
initialize();
codec_client_ = makeHttpConnection(lookupPort("http"));
// Envoy will likely connect and proxy some uns... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 120,679,909,009,473,940,000,000,000,000,000,000,000 | 31 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
generate_cache_handler (LDAPOp *op,
LDAPMessage *res)
{
LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp *) op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
LDAPMessage *e;
gint msg_type;
EDataBookView *book_view;
GTimeVal start, end;
gulong diff;
if (enable_de... | 0 | [] | evolution-data-server | 34bad61738e2127736947ac50e0c7969cc944972 | 199,634,041,656,446,800,000,000,000,000,000,000,000 | 92 | Bug 796174 - strcat() considered unsafe for buffer overflow |
static RList *methods(RBinFile *arch) {
RBinDexObj *bin;
if (!arch || !arch->o || !arch->o->bin_obj) {
return NULL;
}
bin = (RBinDexObj*) arch->o->bin_obj;
if (!bin->methods_list) {
dex_loadcode (arch, bin);
}
return bin->methods_list;
} | 0 | [
"CWE-125"
] | radare2 | ead645853a63bf83d8386702cad0cf23b31d7eeb | 239,610,675,773,967,460,000,000,000,000,000,000,000 | 11 | fix #6857 |
#ifdef CONFIG_KVM_COMPAT
static long kvm_vcpu_compat_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
struct kvm_vcpu *vcpu = filp->private_data;
void __user *argp = compat_ptr(arg);
int r;
if (vcpu->kvm->mm != current->mm || vcpu->kvm->vm_dead)
return -EIO;
switch (ioctl) {
case KVM_SE... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 46,693,594,551,161,520,000,000,000,000,000,000,000 | 40 | 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... |
void opj_j2k_copy_tile_quantization_parameters( opj_j2k_t *p_j2k )
{
OPJ_UINT32 i;
opj_cp_t *l_cp = NULL;
opj_tcp_t *l_tcp = NULL;
opj_tccp_t *l_ref_tccp = NULL;
opj_tccp_t *l_copied_tccp = NULL;
OPJ_UINT32 l_size;
/* preconditions */
assert(p_j2k != 00);... | 0 | [] | openjpeg | 0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0 | 279,362,825,210,585,200,000,000,000,000,000,000,000 | 28 | [trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492) |
static int pf_detect(void)
{
struct pf_unit *pf = units;
int k, unit;
printk("%s: %s version %s, major %d, cluster %d, nice %d\n",
name, name, PF_VERSION, major, cluster, nice);
par_drv = pi_register_driver(name);
if (!par_drv) {
pr_err("failed to register %s driver\n", name);
return -1;
}
k = 0;
... | 0 | [
"CWE-476",
"CWE-125"
] | linux | 58ccd2d31e502c37e108b285bf3d343eb00c235b | 27,863,968,266,425,910,000,000,000,000,000,000,000 | 54 | paride/pf: Fix potential NULL pointer dereference
Syzkaller report this:
pf: pf version 1.04, major 47, cluster 64, nice 0
pf: No ATAPI disk detected
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 9887... |
static void init()
{
gs.filenum = -1;
gs.image = 0;
gs.altimage = 0;
gs.nexttmid = 0;
gs.vp.width = 0;
gs.vp.height = 0;
gs.vp.data = 0;
gs.viewportwidth = -1;
gs.viewportheight = -1;
} | 0 | [
"CWE-119"
] | jasper | 65536647d380571d1a9a6c91fa03775fb5bbd256 | 312,822,512,407,783,480,000,000,000,000,000,000,000 | 12 | A new experimental memory allocator has been introduced. The allocator
is experimental in the sense that its API is not considered stable and
the allocator may change or disappear entirely in future versions of
the code. This new allocator tracks how much memory is being used by
jas_malloc and friends. A maximum upp... |
__perf_event_account_interrupt(struct perf_event *event, int throttle)
{
struct hw_perf_event *hwc = &event->hw;
int ret = 0;
u64 seq;
seq = __this_cpu_read(perf_throttled_seq);
if (seq != hwc->interrupts_seq) {
hwc->interrupts_seq = seq;
hwc->interrupts = 1;
} else {
hwc->interrupts++;
if (unlikely(thro... | 0 | [
"CWE-190"
] | linux | 1572e45a924f254d9570093abde46430c3172e3d | 171,196,423,173,487,500,000,000,000,000,000,000,000 | 34 | perf/core: Fix the perf_cpu_time_max_percent check
Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input
value from user-space.
If not, we can set a big value and some vars will overflow like
"sysctl_perf_event_sample_rate" which will cause a lot of unexpected
problems.
Signed-off-by: Tan Xiaojun ... |
static void check_suspend_mode(GuestSuspendMode mode, Error **errp)
{
SYSTEM_POWER_CAPABILITIES sys_pwr_caps;
Error *local_err = NULL;
ZeroMemory(&sys_pwr_caps, sizeof(sys_pwr_caps));
if (!GetPwrCapabilities(&sys_pwr_caps)) {
error_setg(&local_err, QERR_QGA_COMMAND_FAILED,
"f... | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 295,794,687,519,341,200,000,000,000,000,000,000,000 | 33 | qga: check bytes count read by guest-file-read
While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Pra... |
ConnectionHandlerImpl::findActiveTcpListenerByAddress(const Network::Address::Instance& address) {
// This is a linear operation, may need to add a map<address, listener> to improve performance.
// However, linear performance might be adequate since the number of listeners is small.
// We do not return stopped li... | 0 | [
"CWE-835"
] | envoy | c8de199e2971f79cbcbc6b5eadc8c566b28705d1 | 17,796,200,842,816,350,000,000,000,000,000,000,000 | 30 | listener: clean up accept filter before creating connection (#8922)
Signed-off-by: Yuchen Dai <silentdai@gmail.com> |
static int ext4_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk)
{
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
int ret;
bool allocated = false;
/*
* If the cluster containing lblk is shared with a delayed,
* written, or unwritten extent in a bigalloc file system, it's
* already been accounted... | 0 | [
"CWE-416",
"CWE-401"
] | linux | 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a | 45,833,282,472,158,680,000,000,000,000,000,000,000 | 47 | ext4: add more paranoia checking in ext4_expand_extra_isize handling
It's possible to specify a non-zero s_want_extra_isize via debugging
option, and this can cause bad things(tm) to happen when using a file
system with an inode size of 128 bytes.
Add better checking when the file system is mounted, as well as when
w... |
static const char *cache_id(const char *id)
{
static char clean[SHORT_STRING];
mutt_str_strfcpy(clean, id, sizeof(clean));
mutt_file_sanitize_filename(clean, true);
return clean;
} | 0 | [
"CWE-241",
"CWE-824"
] | neomutt | 93b8ac558752d09e1c56d4f1bc82631316fa9c82 | 96,140,334,141,722,470,000,000,000,000,000,000,000 | 7 | Ensure UID in fetch_uidl |
f_ch_readraw(typval_T *argvars, typval_T *rettv)
{
common_channel_read(argvars, rettv, TRUE, FALSE);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 207,944,479,045,949,330,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 void *_umm_malloc( size_t size ) {
unsigned short int blocks;
unsigned short int blockSize = 0;
unsigned short int bestSize;
unsigned short int bestBlock;
unsigned short int cf;
if (umm_heap == NULL) {
umm_init();
}
/*
* the very first thing we do is figure out if we're being asked to ... | 0 | [
"CWE-190"
] | mongoose-os | b338266c0492cccdb8d8a93ee0b9217bc5a04036 | 274,588,988,909,952,950,000,000,000,000,000,000,000 | 136 | Fix umm_malloc() |
insert_op1 (op, loc, arg, end)
re_opcode_t op;
unsigned char *loc;
int arg;
unsigned char *end;
{
register unsigned char *pfrom = end;
register unsigned char *pto = end + 3;
while (pfrom != loc)
*--pto = *--pfrom;
store_op1 (op, loc, arg);
} | 0 | [
"CWE-190",
"CWE-252"
] | glibc | 2864e767053317538feafa815046fff89e5a16be | 142,216,545,576,025,040,000,000,000,000,000,000,000 | 14 | Update.
1999-11-09 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to
directory with the reference since this is as secure as using the
object with the dependency.
(_dl_dst_substitute): Likewise.
* elf/dl-load.c (_dl_dst_count): Change strings in first two
strncmp ... |
static int cn_printf(struct core_name *cn, const char *fmt, ...)
{
char *cur;
int need;
int ret;
va_list arg;
va_start(arg, fmt);
need = vsnprintf(NULL, 0, fmt, arg);
va_end(arg);
if (likely(need < cn->size - cn->used - 1))
goto out_printf;
ret = expand_corename(cn);
if (ret)
goto expand_fail;
out_pri... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 148,281,047,635,214,370,000,000,000,000,000,000,000 | 29 | 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... |
xdr_chrand_arg(XDR *xdrs, chrand_arg *objp)
{
if (!xdr_ui_4(xdrs, &objp->api_version)) {
return (FALSE);
}
if (!xdr_krb5_principal(xdrs, &objp->princ)) {
return (FALSE);
}
return (TRUE);
} | 0 | [
"CWE-703"
] | krb5 | a197e92349a4aa2141b5dff12e9dd44c2a2166e3 | 146,745,819,300,943,700,000,000,000,000,000,000,000 | 10 | Fix kadm5/gssrpc XDR double free [CVE-2014-9421]
[MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free
partial deserialization results upon failure to deserialize. This
responsibility belongs to the callers, svctcp_getargs() and
svcudp_getargs(); doing it in the unwrap function results in freeing
the result... |
timeout_connect(int sockfd, const struct sockaddr *serv_addr,
socklen_t addrlen, int *timeoutp)
{
int optval = 0;
socklen_t optlen = sizeof(optval);
/* No timeout: just do a blocking connect() */
if (timeoutp == NULL || *timeoutp <= 0)
return connect(sockfd, serv_addr, addrlen);
set_nonblock(sockfd);
for ... | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 193,119,327,193,392,520,000,000,000,000,000,000,000 | 38 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
_public_ PAM_EXTERN int pam_sm_open_session(
pam_handle_t *handle,
int flags,
int argc, const char **argv) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL, *reply = NULL;
... | 0 | [
"CWE-863"
] | systemd | 83d4ab55336ff8a0643c6aa627b31e351a24040a | 197,237,057,821,222,860,000,000,000,000,000,000,000 | 335 | pam-systemd: use secure_getenv() rather than getenv()
And explain why in a comment. |
pch_says_nonexistent (bool which)
{
return p_says_nonexistent[which];
} | 0 | [
"CWE-59"
] | patch | 44a987e02f04b9d81a0db4a611145cad1093a2d3 | 279,778,520,962,661,130,000,000,000,000,000,000,000 | 4 | Add line number overflow checking
* bootstrap.conf: use intprops module.
* src/common.h: Define LINENUM_MIN and LINENUM_MAX macros.
* src/pch.c (another_hunk): Add line number overflow checking. Based on Robert
C. Seacord's INT32-C document for integer overflow checking and Tobias
Stoeckmann's "integer overflows and ... |
QPDF::flattenPagesTree()
{
// If not already done, flatten the /Pages structure and
// initialize pageobj_to_pages_pos.
if (! this->m->pageobj_to_pages_pos.empty())
{
return;
}
// Push inherited objects down to the /Page level. As a side
// effect this->m->all_pages will also be g... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 322,755,649,374,562,660,000,000,000,000,000,000,000 | 31 | 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 ... |
Invocation(OperationContext*, const OpMsgRequest& request, BasicCommand* command)
: CommandInvocation(command),
_command(command),
_request(&request),
_dbName(_request->getDatabase().toString()) {} | 0 | [
"CWE-20"
] | mongo | 722f06f3217c029ef9c50062c8cc775966fd7ead | 317,824,427,202,606,500,000,000,000,000,000,000,000 | 5 | SERVER-38275 ban find explain with UUID |
ews_get_transitions_group (ESoapParameter *node)
{
EEwsCalendarTransitionsGroup *tg = NULL;
EEwsCalendarTo *transition = NULL;
ESoapParameter *param = NULL;
gchar *id = NULL;
GSList *absolute_date_transitions = NULL;
GSList *recurring_date_transitions = NULL;
GSList *recurring_day_transitions = NULL;
id = e_so... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 213,346,456,897,177,100,000,000,000,000,000,000,000 | 31 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
inline const WCHAR *GetDirW(int index)
{
WCHAR *ptr = dirTableW[index];
if (!ptr) {
/* simulate the existence of this drive */
ptr = szLocalBufferW;
ptr[0] = 'A' + index;
ptr[1] = ':';
ptr[2] = '\\';
ptr[3] = 0;
}
return ptr;
}; | 0 | [] | perl5 | 52236464559c6e410a4587d3c6da9639e75f3ec1 | 293,365,112,092,533,800,000,000,000,000,000,000,000 | 13 | avoid invalid memory access in MapPath[AW]
This issue was assigned CVE-2015-8608. [perl #126755] |
static unsigned short de_get16(void *ptr, guint endian)
{
unsigned short val;
memcpy(&val, ptr, sizeof(val));
val = DE_ENDIAN16(val);
return val;
} | 0 | [
"CWE-787"
] | gdk-pixbuf | c2a40a92fe3df4111ed9da51fe3368c079b86926 | 8,754,576,071,310,304,000,000,000,000,000,000,000 | 9 | jpeg: Throw error when number of color components is unsupported
Explicitly check "3" or "4" output color components.
gdk-pixbuf assumed that the value of output_components to be either
3 or 4, but not an invalid value (9) or an unsupported value (1).
The way the buffer size was deduced was using a naive "== 4" chec... |
gs_grab_finalize (GObject *object)
{
GSGrab *grab;
g_return_if_fail (object != NULL);
g_return_if_fail (GS_IS_GRAB (object));
grab = GS_GRAB (object);
g_return_if_fail (grab->priv != NULL);
gtk_widget_destroy (grab->priv->invisible);
G_OBJECT_CLASS (gs_grab_p... | 0 | [] | gnome-screensaver | f93a22c175090cf02e80bc3ee676b53f1251f685 | 290,926,850,137,339,900,000,000,000,000,000,000,000 | 15 | Nullify grab window variables when windows are destroyed
If we don't do this then there is a time period where the
grab window variables contain dangling pointers which can
cause crashes.
Part of fix for
https://bugzilla.gnome.org/show_bug.cgi?id=609789 |
static int read_pbkdf2_params(ASN1_TYPE pbes2_asn,
const gnutls_datum_t * der,
struct pbkdf2_params *params)
{
int params_start, params_end;
int params_len, len, result;
ASN1_TYPE pbkdf2_asn = ASN1_TYPE_EMPTY;
char oid[64];
memset(params, 0, sizeof(params));
/* Check the key ... | 0 | [] | gnutls | 112d537da5f3500f14316db26d18c37d678a5e0e | 181,573,386,104,191,920,000,000,000,000,000,000,000 | 102 | some changes for 64bit machines. |
static int usbvision_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
{
struct usb_usbvision *usbvision = video_drvdata(file);
int res;
if (mutex_lock_interruptible(&usbvision->v4l2_lock))
return -ERESTARTSYS;
res = usbvision_mmap(file, vma);
mutex_unlock(&usbvision->v4l2_lock);
return res;
} | 0 | [
"CWE-17"
] | media_tree | fa52bd506f274b7619955917abfde355e3d19ffe | 41,225,232,450,617,926,000,000,000,000,000,000,000 | 11 | [media] usbvision: fix crash on detecting device with invalid configuration
The usbvision driver crashes when a specially crafted usb device with invalid
number of interfaces or endpoints is detected. This fix adds checks that the
device has proper configuration expected by the driver.
Reported-by: Ralf Spenneberg <r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.