func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void cliprdr_free_format_list(CLIPRDR_FORMAT_LIST* formatList)
{
UINT index = 0;
if (formatList == NULL)
return;
if (formatList->formats)
{
for (index = 0; index < formatList->numFormats; index++)
{
free(formatList->formats[index].formatName);
}
free(formatList->formats);
}
} | 1 | [
"CWE-125"
] | FreeRDP | b73143cf7ee5fe4cdabcbf56908aa15d8a883821 | 4,400,417,930,766,210,000,000,000,000,000,000,000 | 17 | Fixed oob read in cliprdr_read_format_list |
static int can_contain(cmark_syntax_extension *extension, cmark_node *node,
cmark_node_type child_type) {
if (node->type == CMARK_NODE_TABLE) {
return child_type == CMARK_NODE_TABLE_ROW;
} else if (node->type == CMARK_NODE_TABLE_ROW) {
return child_type == CMARK_NODE_TABLE_CELL;
} e... | 0 | [
"CWE-190"
] | cmark-gfm | b1687e6af1367c596ab75428b03af55666a66530 | 141,421,546,446,486,390,000,000,000,000,000,000,000 | 16 | prevent integer overflow in row_from_string
* added explicit check for UINT16_MAX boundary on row->n_columns
* added additional checks for row_from_string NULL returns to prevent NULL
dereferences on error cases
* added additional check to ensure n_columns between marker and header rows
always match prior to any ali... |
static int64_t alloc_block(BlockDriverState* bs, int64_t sector_num)
{
BDRVVPCState *s = bs->opaque;
int64_t bat_offset;
uint32_t index, bat_value;
int ret;
uint8_t bitmap[s->bitmap_size];
// Check if sector_num is valid
if ((sector_num < 0) || (sector_num > bs->total_sectors))
retu... | 0 | [
"CWE-20"
] | qemu | 97f1c45c6f456572e5b504b8614e4a69e23b8e3a | 273,343,768,685,938,360,000,000,000,000,000,000,000 | 46 | vpc/vhd: add bounds check for max_table_entries and block_size (CVE-2014-0144)
This adds checks to make sure that max_table_entries and block_size
are in sane ranges. Memory is allocated based on max_table_entries,
and block_size is used to calculate indices into that allocated
memory, so if these values are incorrec... |
static void inode_free_security(struct inode *inode)
{
struct inode_security_struct *isec = selinux_inode(inode);
struct superblock_security_struct *sbsec;
if (!isec)
return;
sbsec = selinux_superblock(inode->i_sb);
/*
* As not all inode security structures are in a list, we check for
* empty list outside o... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 225,854,222,432,839,420,000,000,000,000,000,000,000 | 24 | 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 ... |
static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs4_fs_locations *res)
{
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
xdr_init_decode(&xdr, &req->rq_rcv_buf, p);
status = decode_compound_hdr(&xdr, &hdr);
if (status != 0)
goto out;
if ((status = decode_putfh(&xdr)) ... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 222,175,501,398,114,040,000,000,000,000,000,000,000 | 19 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
static int fts3FindFunctionMethod(
sqlite3_vtab *pVtab, /* Virtual table handle */
int nArg, /* Number of SQL function arguments */
const char *zName, /* Name of SQL function */
void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), /* OUT: Result */
void **ppArg ... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 185,587,328,904,326,140,000,000,000,000,000,000,000 | 32 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
push_symbol(Str str, char symbol, int width, int n)
{
char buf[2], *p;
int i;
#ifdef USE_M17N
if (width == 2)
p = alt2_symbol[(int)symbol];
else
#endif
p = alt_symbol[(int)symbol];
for (i = 0; i < 2 && *p; i++, p++)
buf[i] = (*p == ' ') ? NBSP_CODE : *p;
Strcat(str, Sprintf("<_SYMBOL TYPE=%... | 1 | [
"CWE-119"
] | w3m | 0c3f5d0e0d9269ad47b8f4b061d7818993913189 | 1,681,337,008,445,070,000,000,000,000,000,000,000 | 19 | Prevent array index out of bounds for symbol
Bug-Debian: https://github.com/tats/w3m/issues/38 |
void sctp_assoc_control_transport(struct sctp_association *asoc,
struct sctp_transport *transport,
sctp_transport_cmd_t command,
sctp_sn_error_t error)
{
struct sctp_ulpevent *event;
struct sockaddr_storage addr;
int spc_state = 0;
bool ulp_notify = true;
/* Record the transition on the transpor... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | b69040d8e39f20d5215a03502a8e8b4c6ab78395 | 3,190,064,793,292,047,000,000,000,000,000,000,000 | 75 | net: sctp: fix panic on duplicate ASCONF chunks
When receiving a e.g. semi-good formed connection scan in the
form of ...
-------------- INIT[ASCONF; ASCONF_ACK] ------------->
<----------- INIT-ACK[ASCONF; ASCONF_ACK] ------------
-------------------- COOKIE-ECHO -------------------->
<-------------------- C... |
static int nf_tables_expr_parse(const struct nft_ctx *ctx,
const struct nlattr *nla,
struct nft_expr_info *info)
{
const struct nft_expr_type *type;
const struct nft_expr_ops *ops;
struct nlattr *tb[NFTA_EXPR_MAX + 1];
int err;
err = nla_parse_nested_deprecated(tb, NFTA_EXPR_MAX, nla,
nft_expr_poli... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 183,726,257,308,937,530,000,000,000,000,000,000,000 | 53 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
static int ocfs2_expand_nonsparse_inode(struct inode *inode,
struct buffer_head *di_bh,
loff_t pos, unsigned len,
struct ocfs2_write_ctxt *wc)
{
int ret;
loff_t newsize = pos + len;
BUG_ON(ocfs2_sparse_alloc(OCFS2_SB(inode->i_sb)));
if (newsize <= i_size_read(inode))
return 0;
ret = ocfs2_exten... | 0 | [
"CWE-362"
] | linux | 3e4c56d41eef5595035872a2ec5a483f42e8917f | 258,060,165,324,401,100,000,000,000,000,000,000,000 | 24 | ocfs2: ip_alloc_sem should be taken in ocfs2_get_block()
ip_alloc_sem should be taken in ocfs2_get_block() when reading file in
DIRECT mode to prevent concurrent access to extent tree with
ocfs2_dio_end_io_write(), which may cause BUGON in the following
situation:
read file 'A' end_io... |
dtls1_buffer_message(SSL *s, int is_ccs)
{
pitem *item;
hm_fragment *frag;
unsigned char seq64be[8];
/* this function is called immediately after a message has
* been serialized */
OPENSSL_assert(s->init_off == 0);
frag = dtls1_hm_fragment_new(s->init_num, 0);
if (!frag)
return 0;
memcpy(frag->fragment... | 0 | [] | openssl | bff1ce4e6a1c57c3d0a5f9e4f85ba6385fccfe8b | 34,148,193,234,520,266,000,000,000,000,000,000,000 | 63 | Avoid double free when processing DTLS packets.
The |item| variable, in both of these cases, may contain a pointer to a
|pitem| structure within |s->d1->buffered_messages|. It was being freed
in the error case while still being in |buffered_messages|. When the
error later caused the |SSL*| to be destroyed, the item wo... |
static int firm_set_dtr(struct usb_serial_port *port, __u8 onoff)
{
struct whiteheat_set_rdb dtr_command;
dtr_command.port = port->port_number + 1;
dtr_command.state = onoff;
return firm_send_command(port, WHITEHEAT_SET_DTR,
(__u8 *)&dtr_command, sizeof(dtr_command));
} | 0 | [
"CWE-399"
] | linux | cbb4be652d374f64661137756b8f357a1827d6a4 | 117,932,179,341,850,660,000,000,000,000,000,000,000 | 9 | USB: whiteheat: fix potential null-deref at probe
Fix potential null-pointer dereference at probe by making sure that the
required endpoints are present.
The whiteheat driver assumes there are at least five pairs of bulk
endpoints, of which the final pair is used for the "command port". An
attempt to bind to an inter... |
GF_Err styl_box_size(GF_Box *s)
{
GF_TextStyleBox*ptr = (GF_TextStyleBox*)s;
s->size += 2 + ptr->entry_count * GPP_STYLE_SIZE;
return GF_OK;
} | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 135,690,606,329,026,390,000,000,000,000,000,000,000 | 7 | fixed #1768 |
get_dirstack (self)
SHELL_VAR *self;
{
ARRAY *a;
WORD_LIST *l;
l = get_directory_stack (0);
a = array_from_word_list (l);
array_dispose (array_cell (self));
dispose_words (l);
var_setarray (self, a);
return self;
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 174,385,099,404,547,840,000,000,000,000,000,000,000 | 13 | commit bash-20120224 snapshot |
template<typename t>
CImg<T>& dijkstra(const unsigned int starting_node, const unsigned int ending_node,
CImg<t>& previous_node) {
return get_dijkstra(starting_node,ending_node,previous_node).move_to(*this); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 200,335,336,498,200,530,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
bool eq_def(const Field *field) const
{
return (Field::eq_def(field) && decimals() == field->decimals());
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 63,033,082,347,326,360,000,000,000,000,000,000,000 | 4 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
ip6t_ext_hdr(u8 nexthdr)
{
return (nexthdr == IPPROTO_HOPOPTS) ||
(nexthdr == IPPROTO_ROUTING) ||
(nexthdr == IPPROTO_FRAGMENT) ||
(nexthdr == IPPROTO_ESP) ||
(nexthdr == IPPROTO_AH) ||
(nexthdr == IPPROTO_NONE) ||
(nexthdr == IPPROTO_DSTOPTS);
} | 0 | [
"CWE-200"
] | linux-2.6 | 6a8ab060779779de8aea92ce3337ca348f973f54 | 336,986,787,724,827,860,000,000,000,000,000,000,000 | 10 | ipv6: netfilter: ip6_tables: fix infoleak to userspace
Structures ip6t_replace, compat_ip6t_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 sen... |
void CLASS kodak_c330_load_raw()
{
uchar *pixel;
int row, col, y, cb, cr, rgb[3], c;
pixel = (uchar *) calloc (raw_width, 2*sizeof *pixel);
merror (pixel, "kodak_c330_load_raw()");
#ifdef LIBRAW_LIBRARY_BUILD
try {
#endif
for (row=0; row < height; row++) {
#ifdef LIBRAW_LIBRARY_BUILD
checkCancel();
#en... | 1 | [
"CWE-787"
] | LibRaw | 8682ad204392b914ab1cc6ebcca9c27c19c1a4b4 | 87,363,785,747,908,690,000,000,000,000,000,000,000 | 36 | 0.18.17 |
_isBidi (const uint32_t *label, size_t llen)
{
while (llen-- > 0) {
int bc = uc_bidi_category (*label++);
if (bc == UC_BIDI_R || bc == UC_BIDI_AL || bc == UC_BIDI_AN)
return 1;
}
return 0;
} | 1 | [
"CWE-190"
] | libidn2 | 16853b6973a1e72fee2b7cccda85472cb9951305 | 291,301,499,512,973,870,000,000,000,000,000,000,000 | 11 | lib/bidi: Fix integer overflow (found by fuzzing) |
ftp_syst(ftpbuf_t *ftp)
{
char *syst, *end;
if (ftp == NULL) {
return NULL;
}
/* default to cached value */
if (ftp->syst) {
return ftp->syst;
}
if (!ftp_putcmd(ftp, "SYST", NULL)) {
return NULL;
}
if (!ftp_getresp(ftp) || ftp->resp != 215) {
return NULL;
}
syst = ftp->inbuf;
while (*syst == ' ') ... | 0 | [
"CWE-189"
] | php-src | ac2832935435556dc593784cd0087b5e576bbe4d | 325,449,201,236,079,300,000,000,000,000,000,000,000 | 31 | Fix bug #69545 - avoid overflow when reading list |
build_toporder_info (class ipa_topo_info *topo)
{
topo->order = XCNEWVEC (struct cgraph_node *, symtab->cgraph_count);
topo->stack = XCNEWVEC (struct cgraph_node *, symtab->cgraph_count);
gcc_checking_assert (topo->stack_top == 0);
topo->nnodes = ipa_reduced_postorder (topo->order, true,
ignore_edge_p);
} | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 18,417,727,004,568,525,000,000,000,000,000,000,000 | 9 | Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)
2019-12-21 Martin Jambor <mjambor@suse.cz>
PR ipa/93015
* ipa-cp.c (ipcp_store_vr_results): Check that info exists
testsuite/
* gcc.dg/lto/pr93015_0.c: New test.
From-SVN: r279695 |
static void rgb_background(struct vc_data *vc, const struct rgb *c)
{
/* For backgrounds, err on the dark side. */
vc->state.color = (vc->state.color & 0x0f)
| (c->r&0x80) >> 1 | (c->g&0x80) >> 2 | (c->b&0x80) >> 3;
} | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 82,656,927,598,375,220,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->... |
static void apparmor_cred_transfer(struct cred *new, const struct cred *old)
{
const struct aa_task_cxt *old_cxt = old->security;
struct aa_task_cxt *new_cxt = new->security;
aa_dup_task_context(new_cxt, old_cxt);
} | 0 | [
"CWE-20"
] | linux | a5b2c5b2ad5853591a6cac6134cd0f599a720865 | 305,210,964,195,710,940,000,000,000,000,000,000,000 | 7 | AppArmor: fix oops in apparmor_setprocattr
When invalid parameters are passed to apparmor_setprocattr a NULL deref
oops occurs when it tries to record an audit message. This is because
it is passing NULL for the profile parameter for aa_audit. But aa_audit
now requires that the profile passed is not NULL.
Fix this by... |
_outPlanInfo(StringInfo str, const Plan *node)
{
WRITE_FLOAT_FIELD(startup_cost, "%.2f");
WRITE_FLOAT_FIELD(total_cost, "%.2f");
WRITE_FLOAT_FIELD(plan_rows, "%.0f");
WRITE_INT_FIELD(plan_width);
WRITE_NODE_FIELD(targetlist);
WRITE_NODE_FIELD(qual);
WRITE_NODE_FIELD(lefttree);
WRITE_NODE_FIELD(righttree);
WRIT... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 124,947,165,017,945,400,000,000,000,000,000,000,000 | 14 | 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... |
GooString *PDFDoc::getDocInfoStringEntry(const char *key) {
Object infoObj = getDocInfo();
if (!infoObj.isDict()) {
return nullptr;
}
Object entryObj = infoObj.dictLookup(key);
GooString *result;
if (entryObj.isString()) {
result = entryObj.takeString();
} else {
result = nullptr;
}
... | 0 | [
"CWE-20"
] | poppler | 9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f | 192,683,229,871,259,700,000,000,000,000,000,000,000 | 18 | PDFDoc::setup: Fix return value
At that point xref can have gone wrong since extractPDFSubtype() can
have caused a reconstruct that broke stuff so instead of unconditionally
returning true, return xref->isOk()
Fixes #706 |
bool Item_field::fix_fields(THD *thd, Item **reference)
{
DBUG_ASSERT(fixed == 0);
Field *from_field= (Field *)not_found_field;
bool outer_fixed= false;
SELECT_LEX *select= thd->lex->current_select;
if (select && select->in_tvc)
{
my_error(ER_FIELD_REFERENCE_IN_TVC, MYF(0), full_name());
return(1);... | 1 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 13,911,727,292,575,295,000,000,000,000,000,000,000 | 262 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
imap_complete_hosts (char *dest, size_t len)
{
BUFFY* mailbox;
CONNECTION* conn;
int rc = -1;
size_t matchlen;
matchlen = mutt_strlen (dest);
for (mailbox = Incoming; mailbox; mailbox = mailbox->next)
{
if (!mutt_strncmp (dest, mutt_b2s (mailbox->pathbuf), matchlen))
{
if (rc)
{
... | 0 | [
"CWE-200",
"CWE-319"
] | mutt | 3e88866dc60b5fa6aaba6fd7c1710c12c1c3cd01 | 204,294,435,943,764,020,000,000,000,000,000,000,000 | 49 | 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... |
void SetAttrValue(const TensorShapeProto& value, AttrValue* out) {
*out->mutable_shape() = value;
} | 0 | [
"CWE-369",
"CWE-674"
] | tensorflow | e07e1c3d26492c06f078c7e5bf2d138043e199c1 | 96,109,878,380,503,080,000,000,000,000,000,000,000 | 3 | Prevent memory overflow in ParseAttrValue from nested tensors.
PiperOrigin-RevId: 370108442
Change-Id: I84d64a5e8895a6aeffbf4749841b4c54d51b5889 |
eval_index(
char_u **arg,
typval_T *rettv,
evalarg_T *evalarg,
int verbose) // give error messages
{
int evaluate = evalarg != NULL
&& (evalarg->eval_flags & EVAL_EVALUATE);
int empty1 = FALSE, empty2 = FALSE;
typval_T var1, var2;
int range = FALSE;
char_u *key = NULL;
... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 605ec91e5a7330d61be313637e495fa02a6dc264 | 324,934,896,483,379,000,000,000,000,000,000,000,000 | 133 | patch 8.2.3847: illegal memory access when using a lambda with an error
Problem: Illegal memory access when using a lambda with an error.
Solution: Avoid skipping over the NUL after a string. |
find_end_event(
char_u *arg,
int have_group) // TRUE when group name was found
{
char_u *pat;
char_u *p;
if (*arg == '*')
{
if (arg[1] && !VIM_ISWHITE(arg[1]))
{
semsg(_(e_illegal_character_after_star_str), arg);
return NULL;
}
pat = arg + 1;
}
else
{
for (... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089 | 60,512,894,754,338,340,000,000,000,000,000,000,000 | 32 | patch 9.0.0061: ml_get error with nested autocommand
Problem: ml_get error with nested autocommand.
Solution: Also check line numbers for a nested autocommand. (closes #10761) |
void lex_init(void)
{
uint i;
DBUG_ENTER("lex_init");
for (i=0 ; i < array_elements(symbols) ; i++)
symbols[i].length=(uchar) strlen(symbols[i].name);
for (i=0 ; i < array_elements(sql_functions) ; i++)
sql_functions[i].length=(uchar) strlen(sql_functions[i].name);
DBUG_VOID_RETURN;
} | 0 | [
"CWE-476"
] | server | 3a52569499e2f0c4d1f25db1e81617a9d9755400 | 187,504,051,360,769,850,000,000,000,000,000,000,000 | 11 | MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294
The asserion failure was caused by this query
select /*id=1*/ from t1
where
col= ( select /*id=2*/ from ... where corr_cond1
union
select /*id=4*/ from ... where corr_cond2)
Here,
- select with id=2 was correlated due to corr_cond1.... |
e_ews_config_utils_get_widget_toplevel_window (GtkWidget *widget)
{
if (!widget)
return NULL;
if (!GTK_IS_WINDOW (widget))
widget = gtk_widget_get_toplevel (widget);
if (GTK_IS_WINDOW (widget))
return GTK_WINDOW (widget);
return NULL;
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 67,991,174,821,472,150,000,000,000,000,000,000,000 | 13 | 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 |
MagickPrivate MagickBooleanType XQueryColorCompliance(const char *target,
XColor *color)
{
Colormap
colormap;
static Display
*display = (Display *) NULL;
Status
status;
XColor
xcolor;
/*
Initialize color return value.
*/
assert(color != (XColor *) NULL);
color->red=0;
color->... | 0 | [] | ImageMagick | f391a5f4554fe47eb56d6277ac32d1f698572f0e | 140,717,364,723,217,500,000,000,000,000,000,000,000 | 48 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
static int _find_waiter(struct waiter *w, uint32_t *jp)
{
return (w->jobid == *jp);
} | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 224,787,816,277,918,680,000,000,000,000,000,000,000 | 4 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
uripClose(void * context) {
if (context == NULL) return(-1);
urip_cur = NULL;
urip_rlen = 0;
return(0);
} | 0 | [
"CWE-125"
] | libxml2 | a820dbeac29d330bae4be05d9ecd939ad6b4aa33 | 156,953,218,641,106,590,000,000,000,000,000,000,000 | 6 | Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.s... |
xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
xmlListPtr ref_list;
xmlRefTablePtr table;
xmlChar *ID;
xmlRemoveMemo target;
if (doc == NULL) return(-1);
if (attr == NULL) return(-1);
table = (xmlRefTablePtr) doc->refs;
if (table == NULL)
return(-1);
ID = xmlNodeListGetStr... | 0 | [] | libxml2 | 932cc9896ab41475d4aa429c27d9afd175959d74 | 214,482,737,079,528,060,000,000,000,000,000,000,000 | 46 | Fix buffer size checks in xmlSnprintfElementContent
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.
Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
Thanks to Marcel Böhme and Thuan Pham for the report. |
QPDF::calculateHOutline(
std::map<int, QPDFXRefEntry> const& xref,
std::map<int, qpdf_offset_t> const& lengths,
std::map<int, int> const& obj_renumber)
{
HGeneric& cho = this->m->c_outline_data;
if (cho.nobjects == 0)
{
return;
}
HGeneric& ho = this->m->outline_hints;
ho.first_ob... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 148,116,970,927,084,520,000,000,000,000,000,000,000 | 22 | 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 ... |
inline unsigned count_digits(uint64_t n) {
// Based on http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10
// and the benchmark https://github.com/localvoid/cxx-benchmark-count-digits.
int t = (64 - FMT_BUILTIN_CLZLL(n | 1)) * 1233 >> 12;
return to_unsigned(t) - (n < Data::POWERS_OF_10_64[t]) + 1;
... | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 185,218,229,935,191,450,000,000,000,000,000,000,000 | 6 | Fix segfault on complex pointer formatting (#642) |
xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){
xmlNodePtr cur = NULL;
xmlXPathObjectPtr obj = NULL;
long val;
xmlChar str[30];
xmlDocPtr doc;
if (nargs == 0) {
cur = ctxt->context->node;
} else if (nargs == 1) {
xmlNodeSetPtr nodelist;
int i, ret;
if ((ctxt->value ==... | 0 | [] | libxslt | 6c99c519d97e5fcbec7a9537d190efb442e4e833 | 206,727,646,622,063,200,000,000,000,000,000,000,000 | 65 | Crash when passing an uninitialized variable to document()
https://bugzilla.gnome.org/show_bug.cgi?id=685330
Missing check for NULL |
eval_isnamec1(int c)
{
return ASCII_ISALPHA(c) || c == '_';
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | 605ec91e5a7330d61be313637e495fa02a6dc264 | 103,623,751,654,219,400,000,000,000,000,000,000,000 | 4 | patch 8.2.3847: illegal memory access when using a lambda with an error
Problem: Illegal memory access when using a lambda with an error.
Solution: Avoid skipping over the NUL after a string. |
static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx)
{
php_curl *ch = (php_curl *) ctx;
php_curl_write *t = ch->handlers->write_header;
size_t length = size * nmemb;
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
switch (t->method) {
case PHP_CURL_STDOUT:
/* Handle spec... | 0 | [] | php-src | 0ea75af9be8a40836951fc89f723dd5390b8b46f | 115,317,003,119,831,000,000,000,000,000,000,000,000 | 75 | Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER) |
static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
{
struct nfs4_server_caps_arg args = {
.fhandle = fhandle,
};
struct nfs4_server_caps_res res = {};
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SERVER_CAPS],
.rpc_argp = &args,
.rpc_resp = &res,... | 0 | [
"CWE-703",
"CWE-189"
] | linux | bf118a342f10dafe44b14451a1392c3254629a1f | 107,425,286,645,647,230,000,000,000,000,000,000,000 | 52 | NFSv4: include bitmap in nfsv4 get acl data
The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and... |
authdir_policy_valid_address(uint32_t addr, uint16_t port)
{
if (! addr_policy_permits_address(addr, port, authdir_invalid_policy))
return 0;
return !addr_is_in_cc_list(addr, get_options()->AuthDirInvalidCCs);
} | 0 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 126,744,127,040,946,280,000,000,000,000,000,000,000 | 6 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
long do_sigpending(void __user *set, unsigned long sigsetsize)
{
long error = -EINVAL;
sigset_t pending;
if (sigsetsize > sizeof(sigset_t))
goto out;
spin_lock_irq(¤t->sighand->siglock);
sigorsets(&pending, ¤t->pending.signal,
¤t->signal->shared_pending.signal);
spin_unlock_irq(¤t-... | 0 | [] | linux-2.6 | 0083fc2c50e6c5127c2802ad323adf8143ab7856 | 330,009,348,740,986,940,000,000,000,000,000,000,000 | 23 | do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in
the structure on 64-bit hosts, and that copying the structure from
kernel to user space can leak information from the kernel stack in those
padding bytes.
Avoid the whole issue b... |
bool __weak kvm_arch_dy_has_pending_interrupt(struct kvm_vcpu *vcpu)
{
return false; | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 186,028,007,590,471,240,000,000,000,000,000,000,000 | 4 | 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... |
static void flush_change(H264Context *h)
{
int i, j;
h->outputed_poc = h->next_outputed_poc = INT_MIN;
h->prev_interlaced_frame = 1;
idr(h);
h->prev_frame_num = -1;
if (h->cur_pic_ptr) {
h->cur_pic_ptr->reference = 0;
for (j=i=0; h->delayed_pic[i]; i++)
if ... | 0 | [
"CWE-703"
] | FFmpeg | 29ffeef5e73b8f41ff3a3f2242d356759c66f91f | 145,800,008,831,434,810,000,000,000,000,000,000,000 | 27 | avcodec/h264: do not trust last_pic_droppable when marking pictures as done
This simplifies the code and fixes a deadlock
Fixes Ticket2927
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void scalar_min_max_mul(struct bpf_reg_state *dst_reg,
struct bpf_reg_state *src_reg)
{
s64 smin_val = src_reg->smin_value;
u64 umin_val = src_reg->umin_value;
u64 umax_val = src_reg->umax_value;
dst_reg->var_off = tnum_mul(dst_reg->var_off, src_reg->var_off);
if (smin_val < 0 || dst_reg->smin_va... | 0 | [] | linux | 294f2fc6da27620a506e6c050241655459ccd6bd | 305,266,281,143,365,700,000,000,000,000,000,000,000 | 35 | bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds()
Currently, for all op verification we call __red_deduce_bounds() and
__red_bound_offset() but we only call __update_reg_bounds() in bitwise
ops. However, we could benefit from calling __update_reg_bounds() in
BPF_ADD, BPF_SUB, and BPF_MUL case... |
gstd_get_display_name(gss_name_t client)
{
OM_uint32 maj;
OM_uint32 min;
gss_buffer_desc buf;
char *ret;
maj = gss_display_name(&min, client, &buf, NULL);
GSTD_GSS_ERROR(maj, min, NULL, "gss_display_name");
if ((ret = (char *)malloc(buf.length + 1)) == NULL) {
LOG(LOG_ERR, ("unable to malloc"));
gss_relea... | 0 | [
"CWE-400",
"CWE-703"
] | knc | f237f3e09ecbaf59c897f5046538a7b1a3fa40c1 | 8,850,270,864,907,287,000,000,000,000,000,000,000 | 23 | knc: fix a couple of memory leaks.
One of these can be remotely triggered during the authentication
phase which leads to a remote DoS possibility.
Pointed out by: Imre Rad <radimre83@gmail.com> |
bool st_select_lex::add_group_to_list(THD *thd, Item *item, bool asc)
{
return add_to_list(thd, group_list, item, asc);
} | 0 | [
"CWE-476"
] | server | 3a52569499e2f0c4d1f25db1e81617a9d9755400 | 199,970,563,220,452,650,000,000,000,000,000,000,000 | 4 | MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294
The asserion failure was caused by this query
select /*id=1*/ from t1
where
col= ( select /*id=2*/ from ... where corr_cond1
union
select /*id=4*/ from ... where corr_cond2)
Here,
- select with id=2 was correlated due to corr_cond1.... |
ModuleExport size_t RegisterSFWImage(void)
{
MagickInfo
*entry;
entry=AcquireMagickInfo("SFW","SFW","Seattle Film Works");
entry->decoder=(DecodeImageHandler *) ReadSFWImage;
entry->magick=(IsImageFormatHandler *) IsSFW;
entry->flags|=CoderDecoderSeekableStreamFlag;
entry->flags^=CoderAdjoinFlag;
(vo... | 0 | [
"CWE-119"
] | ImageMagick | d4145e664aea3752ca6d3bf1ee825352b595dab5 | 47,499,817,498,175,100,000,000,000,000,000,000,000 | 13 | https://github.com/ImageMagick/ImageMagick/issues/682 |
inline double DistanceTransform(double x) {
static bool linear = FLAGS_linear;
if (linear) {
return x;
} else {
/* Using log^2 scale because log scale produces big white gap at the bottom
of image. */
return log(x) * log(x);
}
} | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 279,599,794,825,595,800,000,000,000,000,000,000,000 | 10 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
static struct dwc3_trb *dwc3_ep_prev_trb(struct dwc3_ep *dep, u8 index)
{
u8 tmp = index;
if (!tmp)
tmp = DWC3_TRB_NUM - 1;
return &dep->trb_pool[tmp - 1];
} | 0 | [
"CWE-703",
"CWE-667",
"CWE-189"
] | linux | c91815b596245fd7da349ecc43c8def670d2269e | 4,174,882,567,518,535,300,000,000,000,000,000,000 | 9 | usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_... |
uint32 get_field_buffer_size(void) { return value.alloced_length(); } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 233,333,893,067,550,600,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
WALInsertSlotReleaseOne(int slotno)
{
volatile XLogInsertSlot *slot = &XLogCtl->Insert.insertSlots[slotno].slot;
PGPROC *head;
PGPROC *proc;
/* Acquire mutex. Time spent holding mutex should be short! */
SpinLockAcquire(&slot->mutex);
/* we must be holding it */
Assert(slot->exclusive == 1 && slot->owne... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 340,096,065,303,526,440,000,000,000,000,000,000,000 | 79 | 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... |
set_ref_in_insexpand_funcs(int copyID)
{
int abort = FALSE;
abort = set_ref_in_callback(&cfu_cb, copyID);
abort = abort || set_ref_in_callback(&ofu_cb, copyID);
abort = abort || set_ref_in_callback(&tsrfu_cb, copyID);
return abort;
} | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 278,641,298,776,835,020,000,000,000,000,000,000,000 | 10 | patch 9.0.0020: with some completion reading past end of string
Problem: With some completion reading past end of string.
Solution: Check the length of the string. |
char *string(char *buf, char *end, const char *s, struct printf_spec spec)
{
int len = 0;
size_t lim = spec.precision;
if ((unsigned long)s < PAGE_SIZE)
s = "(null)";
while (lim--) {
char c = *s++;
if (!c)
break;
if (buf < end)
*buf = c;
++buf;
++len;
}
return widen_string(buf, len, end, spec)... | 0 | [
"CWE-200"
] | linux | ad67b74d2469d9b82aaa572d76474c95bc484d57 | 123,115,635,652,379,900,000,000,000,000,000,000,000 | 19 | printk: hash addresses printed with %p
Currently there exist approximately 14 000 places in the kernel where
addresses are being printed using an unadorned %p. This potentially
leaks sensitive information regarding the Kernel layout in memory. Many
of these calls are stale, instead of fixing every call lets hash the
a... |
static void bh_put(struct gfs2_quota_data *qd)
{
struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
mutex_lock(&sdp->sd_quota_mutex);
gfs2_assert(sdp, qd->qd_bh_count);
if (!--qd->qd_bh_count) {
brelse(qd->qd_bh);
qd->qd_bh = NULL;
qd->qd_bh_qc = NULL;
}
mutex_unlock(&sdp->sd_quota_mutex);
} | 0 | [
"CWE-399"
] | linux-2.6 | 7e619bc3e6252dc746f64ac3b486e784822e9533 | 143,382,261,977,236,950,000,000,000,000,000,000,000 | 13 | GFS2: Fix writing to non-page aligned gfs2_quota structures
This is the upstream fix for this bug. This patch differs
from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte
value field of the quota. In upstream quota code, we're
required to write the entire quota (88 bytes) which can be split
across... |
static struct xps_map *expand_xps_map(struct xps_map *map, int attr_index,
u16 index, bool is_rxqs_map)
{
struct xps_map *new_map;
int alloc_len = XPS_MIN_MAP_ALLOC;
int i, pos;
for (pos = 0; map && pos < map->len; pos++) {
if (map->queues[pos] != index)
continue;
return map;
}
/* Need to add ... | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 77,082,994,703,338,890,000,000,000,000,000,000,000 | 39 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx)
{
u32 exit_intr_info;
if (!(vmx->exit_reason == EXIT_REASON_MCE_DURING_VMENTRY
|| vmx->exit_reason == EXIT_REASON_EXCEPTION_NMI))
return;
vmx->exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
exit_intr_info = vmx->exit_intr_info;
/* Handle mach... | 0 | [
"CWE-388"
] | linux | ef85b67385436ddc1998f45f1d6a210f935b3388 | 98,979,761,716,345,050,000,000,000,000,000,000,000 | 22 | kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF)
When L2 exits to L0 due to "exception or NMI", software exceptions
(#BP and #OF) for which L1 has requested an intercept should be
handled by L1 rather than L0. Previously, only hardware exceptions
were forwarded to L1.
Signed-off-by: Jim Mattson <jma... |
xps_setlogop(gx_device_vector *vdev, gs_logical_operation_t lop,
gs_logical_operation_t diff)
{
if_debug2m('_', vdev->memory, "xps_setlogop(%u,%u) set logical operation\n",
lop, diff);
/* XPS can fake some simpler modes, but we ignore this for now. */
return 0;
} | 0 | [] | ghostpdl | 94d8955cb7725eb5f3557ddc02310c76124fdd1a | 329,540,880,923,050,070,000,000,000,000,000,000,000 | 8 | Bug 701818: better handling of error during PS/PDF image
In the xps device, if an error occurred after xps_begin_image() but before
xps_image_end_image(), *if* the Postscript had called 'restore' as part of the
error handling, the image enumerator would have been freed (by the restore)
despite the xps device still hol... |
lseg_in(PG_FUNCTION_ARGS)
{
char *str = PG_GETARG_CSTRING(0);
LSEG *lseg;
int isopen;
char *s;
lseg = (LSEG *) palloc(sizeof(LSEG));
if ((!path_decode(TRUE, 2, str, &isopen, &s, &(lseg->p[0])))
|| (*s != '\0'))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 243,344,770,022,564,700,000,000,000,000,000,000,000 | 21 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
secure_getenv (const char *name)
{
if (getauxval (AT_SECURE))
return NULL;
return getenv (name);
} | 0 | [
"CWE-190"
] | p11-kit | bd670b1d4984b27d6a397b9ddafaf89ab26e4e7f | 30,960,635,763,342,315,000,000,000,000,000,000,000 | 6 | Follow-up to arithmetic overflow fix
Check if nmemb is zero in p11_rpc_message_alloc_extra_array to avoid a
division by zero trap. Additionally, change the reallocarray
compatibility shim so that it won't assert when resizing an array to
zero, and add the same nmemb != 0 check there. |
curwin_init(void)
{
win_init_empty(curwin);
} | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 273,784,350,465,031,900,000,000,000,000,000,000,000 | 4 | patch 8.1.2136: using freed memory with autocmd from fuzzer
Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
Solution: Avoid using "wp" after autocommands. (closes #5041) |
static void cmd_nctcp(const char *data, IRC_SERVER_REC *server,
WI_ITEM_REC *item)
{
const char *target, *text;
void *free_arg;
CMD_IRC_SERVER(server);
if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST,
&target, &text))
return;
if (g_strcmp0(target, "*") == 0)
target = item ==... | 0 | [
"CWE-416"
] | irssi | 36564717c9f701e3a339da362ab46d220d27e0c1 | 58,987,587,515,742,625,000,000,000,000,000,000,000 | 19 | Merge branch 'security' into 'master'
Security
See merge request irssi/irssi!34
(cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f) |
xml_node_iter_get_current (xmlNodeIter *iter)
{
return iter->cur_node;
} | 0 | [] | gvfs | f81ff2108ab3b6e370f20dcadd8708d23f499184 | 7,688,080,329,731,066,000,000,000,000,000,000,000 | 4 | dav: don't unescape the uri twice
path_equal tries to unescape path before comparing. Unfortunately
this function is used also for already unescaped paths. Therefore
unescaping can fail. This commit reverts changes which was done in
commit 50af53d and unescape just uris, which aren't unescaped yet.
https://bugzilla.g... |
SYSCALL_DEFINE1(osf_utsname, char __user *, name)
{
int error;
down_read(&uts_sem);
error = -EFAULT;
if (copy_to_user(name + 0, utsname()->sysname, 32))
goto out;
if (copy_to_user(name + 32, utsname()->nodename, 32))
goto out;
if (copy_to_user(name + 64, utsname()->release, 32))
goto out;
if (copy_to_user... | 0 | [
"CWE-703",
"CWE-264",
"CWE-189"
] | linux | 21c5977a836e399fc710ff2c5367845ed5c2527f | 66,108,529,206,650,780,000,000,000,000,000,000,000 | 22 | alpha: fix several security issues
Fix several security issues in Alpha-specific syscalls. Untested, but
mostly trivial.
1. Signedness issue in osf_getdomainname allows copying out-of-bounds
kernel memory to userland.
2. Signedness issue in osf_sysinfo allows copying large amounts of
kernel memory to userland.
3. ... |
static int vcpu_mmio_read(struct kvm_vcpu *vcpu, gpa_t addr, int len, void *v)
{
if (vcpu->arch.apic &&
!kvm_iodevice_read(&vcpu->arch.apic->dev, addr, len, v))
return 0;
return kvm_io_bus_read(vcpu->kvm, KVM_MMIO_BUS, addr, len, v);
} | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 53,323,160,952,588,200,000,000,000,000,000,000,000 | 8 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
void AbstractSqlStorage::dbConnect(QSqlDatabase &db)
{
if (!db.open()) {
quWarning() << "Unable to open database" << displayName() << "for thread" << QThread::currentThread();
quWarning() << "-" << db.lastError().text();
}
else {
if (!initDbSession(db)) {
quWarning() << "... | 0 | [
"CWE-89"
] | quassel | 6605882f41331c80f7ac3a6992650a702ec71283 | 19,940,179,961,668,175,000,000,000,000,000,000,000 | 13 | Execute initDbSession() on DB reconnects
Previously, the initDbSession() function would only be run on the
initial connect. Since the initDbSession() code in PostgreSQL is
used to fix the CVE-2013-4422 SQL Injection bug, this means that
Quassel was still vulnerable to that CVE if the PostgreSQL server
is restarted or... |
static int mcryptd_create_hash(struct crypto_template *tmpl, struct rtattr **tb,
struct mcryptd_queue *queue)
{
struct hashd_instance_ctx *ctx;
struct ahash_instance *inst;
struct hash_alg_common *halg;
struct crypto_alg *alg;
u32 type = 0;
u32 mask = 0;
int err;
mcryptd_check_internal(tb, &type, &mas... | 1 | [
"CWE-476",
"CWE-284"
] | linux | 48a992727d82cb7db076fa15d372178743b1f4cd | 327,830,603,762,624,040,000,000,000,000,000,000,000 | 65 | crypto: mcryptd - Check mcryptd algorithm compatibility
Algorithms not compatible with mcryptd could be spawned by mcryptd
with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name
construct. This causes mcryptd to crash the kernel if an arbitrary
"alg" is incompatible and not intended to be used with mcr... |
static int phar_hex_str(const char *digest, size_t digest_len, char **signature) /* {{{ */
{
int pos = -1;
size_t len = 0;
*signature = (char*)safe_pemalloc(digest_len, 2, 1, PHAR_G(persist));
for (; len < digest_len; ++len) {
(*signature)[++pos] = hexChars[((const unsigned char *)digest)[len] >> 4];
(*signat... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 0bfb970f43acd1e81d11be1154805f86655f15d5 | 20,340,399,852,849,933,000,000,000,000,000,000,000 | 14 | Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile
(cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2) |
static inline size_t drbg_max_request_bytes(struct drbg_state *drbg)
{
/* SP800-90A requires the limit 2**19 bits, but we return bytes */
return (1 << 16);
} | 0 | [
"CWE-476"
] | linux | 8fded5925d0a733c46f8d0b5edd1c9b315882b1d | 34,544,298,412,647,603,000,000,000,000,000,000,000 | 5 | crypto: drbg - Convert to new rng interface
This patch converts the DRBG implementation to the new low-level
rng interface.
This allows us to get rid of struct drbg_gen by using the new RNG
API instead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephan Mueller <smueller@chronox.de> |
static void set_xsi_nil(xmlNodePtr node)
{
set_ns_prop(node, XSI_NAMESPACE, "nil", "true");
} | 0 | [
"CWE-19"
] | php-src | c8eaca013a3922e8383def6158ece2b63f6ec483 | 211,339,995,846,373,400,000,000,000,000,000,000,000 | 4 | Added type checks |
static int php_stream_memory_set_option(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC) /* {{{ */
{
php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract;
size_t newsize;
switch(option) {
case PHP_STREAM_OPTION_TRUNCATE_API:
switch (value) {
case PHP_STREAM_TRUNCATE_SU... | 0 | [
"CWE-20"
] | php-src | 6297a117d77fa3a0df2e21ca926a92c231819cd5 | 85,578,455,705,201,210,000,000,000,000,000,000,000 | 32 | Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input |
changedir_func(
char_u *new_dir,
int forceit,
cdscope_T scope)
{
char_u *tofree;
char_u *pdir = NULL;
int dir_differs;
int retval = FALSE;
if (new_dir == NULL || allbuf_locked())
return FALSE;
if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() && !forceit)
{
emsg(_("E74... | 0 | [
"CWE-122"
] | vim | 35a319b77f897744eec1155b736e9372c9c5575f | 208,495,858,138,984,860,000,000,000,000,000,000,000 | 92 | patch 8.2.3489: ml_get error after search with range
Problem: ml_get error after search with range.
Solution: Limit the line number to the buffer line count. |
translate_into_utf8(const char* str, const char* enc) {
PyObject *utf8;
PyObject* buf = PyUnicode_Decode(str, strlen(str), enc, NULL);
if (buf == NULL)
return NULL;
utf8 = PyUnicode_AsUTF8String(buf);
Py_DECREF(buf);
return utf8;
} | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 126,218,811,763,087,450,000,000,000,000,000,000,000 | 9 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
void zinterstoreCommand(client *c) {
zunionInterGenericCommand(c,c->argv[1], SET_OP_INTER);
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 21,510,137,668,712,295,000,000,000,000,000,000,000 | 3 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
static zend_bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progress *progress TSRMLS_DC) /* {{{ */
{
zval **ppid;
if (!PG(http_globals)[where]) {
return 0;
}
if (zend_hash_find(Z_ARRVAL_P(PG(http_globals)[where]), PS(session_name), progress->sname_len+1, (void **)&ppid) == SUCCESS
&& Z_TYP... | 0 | [
"CWE-264"
] | php-src | 25e8fcc88fa20dc9d4c47184471003f436927cde | 134,664,801,185,121,900,000,000,000,000,000,000,000 | 17 | Strict session |
static void install_list_entry(const char *lib) {
assert(lib);
// filename check
int len = strlen(lib);
if (strcspn(lib, "\\&!?\"'<>%^(){}[];,") != (size_t)len ||
strstr(lib, "..")) {
fprintf(stderr, "Error: \"%s\" is an invalid library\n", lib);
exit(1);
}
// if this is a full path, use it as is
if (*lib... | 0 | [
"CWE-284",
"CWE-732"
] | firejail | eecf35c2f8249489a1d3e512bb07f0d427183134 | 260,745,975,098,883,600,000,000,000,000,000,000,000 | 50 | mount runtime seccomp files read-only (#2602)
avoid creating locations in the file system that are both writable and
executable (in this case for processes with euid of the user).
for the same reason also remove user owned libfiles
when it is not needed any more |
ConnectionManagerStats ConnectionManagerImpl::generateStats(const std::string& prefix,
Stats::Scope& scope) {
return ConnectionManagerStats(
{ALL_HTTP_CONN_MAN_STATS(POOL_COUNTER_PREFIX(scope, prefix), POOL_GAUGE_PREFIX(scope, prefix),
... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 128,823,687,489,467,530,000,000,000,000,000,000,000 | 7 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static void defer_open_done(struct tevent_req *req)
{
struct defer_open_state *state = tevent_req_callback_data(
req, struct defer_open_state);
NTSTATUS status;
bool ret;
status = dbwrap_record_watch_recv(req, talloc_tos(), NULL);
TALLOC_FREE(req);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(5, ("dbwrap_record_wat... | 0 | [] | samba | 60f922bf1bd8816eacbb32c24793ad1f97a1d9f2 | 132,797,743,562,475,090,000,000,000,000,000,000,000 | 24 | Fix bug #10229 - No access check verification on stream files.
https://bugzilla.samba.org/show_bug.cgi?id=10229
We need to check if the requested access mask
could be used to open the underlying file (if
it existed), as we're passing in zero for the
access mask to the base filename.
Signed-off-by: Jeremy Allison <jr... |
static void delay(int ms)
{
unsigned long timeout = jiffies + ((ms * HZ) / 1000);
while (time_before(jiffies, timeout))
cpu_relax();
} | 0 | [
"CWE-401"
] | linux | 29eb31542787e1019208a2e1047bb7c76c069536 | 217,794,484,032,867,000,000,000,000,000,000,000,000 | 6 | yam: fix a memory leak in yam_siocdevprivate()
ym needs to be free when ym->cmd != SIOCYAMSMCS.
Fixes: 0781168e23a2 ("yam: fix a missing-check bug")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
void cgsem_destroy(cgsem_t *cgsem)
{
sem_destroy(cgsem);
} | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 32,497,349,174,831,500,000,000,000,000,000,000,000 | 4 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
obj_to_asn1null(VALUE obj)
{
ASN1_NULL *null;
if(!NIL_P(obj))
ossl_raise(eASN1Error, "nil expected");
if(!(null = ASN1_NULL_new()))
ossl_raise(eASN1Error, NULL);
return null;
} | 0 | [
"CWE-119"
] | openssl | 1648afef33c1d97fb203c82291b8a61269e85d3b | 171,052,876,035,628,980,000,000,000,000,000,000,000 | 11 | asn1: fix out-of-bounds read in decoding constructed objects
OpenSSL::ASN1.{decode,decode_all,traverse} have a bug of out-of-bounds
read. int_ossl_asn1_decode0_cons() does not give the correct available
length to ossl_asn1_decode() when decoding the inner components of a
constructed object. This can cause out-of-bound... |
static void vfs_init_default(connection_struct *conn)
{
DEBUG(3, ("Initialising default vfs hooks\n"));
vfs_init_custom(conn, DEFAULT_VFS_MODULE_NAME);
} | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 188,734,883,996,025,700,000,000,000,000,000,000,000 | 5 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
void splice_from_pipe_begin(struct splice_desc *sd)
{
sd->num_spliced = 0;
sd->need_wakeup = false;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8d0207652cbe27d1f962050737848e5ad4671958 | 201,915,136,497,132,870,000,000,000,000,000,000,000 | 5 | ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <viro@z... |
TEST_F(HttpHealthCheckerImplTest, ZeroRetryInterval) {
const std::string host = "fake_cluster";
const std::string path = "/healthcheck";
const std::string yaml = R"EOF(
timeout: 1s
interval: 1s
no_traffic_interval: 1s
interval_jitter_percent: 40
unhealthy_threshold: 2
healthy_threshold: 2
... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 59,656,553,675,695,855,000,000,000,000,000,000,000 | 47 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
bool Item::fix_fields(THD *thd, Item **ref)
{
// We do not check fields which are fixed during construction
DBUG_ASSERT(fixed == 0 || basic_const_item());
fixed= 1;
return FALSE;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 233,902,767,212,099,200,000,000,000,000,000,000,000 | 8 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
const CImg<T>& _save_pnk(std::FILE *const file, const char *const filename) const {
if (!file && !filename)
throw CImgArgumentException(_cimg_instance
"save_pnk(): Specified filename is (null).",
cimg_instance);
if (is_empt... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 257,371,453,395,314,200,000,000,000,000,000,000,000 | 55 | . |
ofputil_pull_ofp11_group_mod(struct ofpbuf *msg, enum ofp_version ofp_version,
struct ofputil_group_mod *gm)
{
const struct ofp11_group_mod *ogm;
enum ofperr error;
ogm = ofpbuf_pull(msg, sizeof *ogm);
gm->command = ntohs(ogm->command);
gm->type = ogm->type;
gm->gro... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 141,968,198,712,821,020,000,000,000,000,000,000,000 | 26 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static void *ddgencharlist(void *_fv,int32 *len) {
int i,j,cnt, gid;
FontView *fv = (FontView *) _fv;
SplineFont *sf = fv->b.sf;
EncMap *map = fv->b.map;
char *data;
for ( i=cnt=0; i<map->enccount; ++i ) if ( fv->b.selected[i] && (gid=map->map[i])!=-1 && sf->glyphs[gid]!=NULL )
cnt += strlen(s... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 142,736,547,770,668,650,000,000,000,000,000,000,000 | 23 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
move_files_prepare (CopyMoveJob *job,
const char *dest_fs_id,
char **dest_fs_type,
GList **fallbacks)
{
CommonJob *common;
GList *l;
GFile *src;
gboolean same_fs;
int i;
GdkPoint *point;
int total, left;
common ... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 303,611,540,442,373,460,000,000,000,000,000,000,000 | 54 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
bool is_result_field() { return result_field != 0; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 259,886,618,672,557,070,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
MHD_create_post_processor (struct MHD_Connection *connection,
size_t buffer_size,
MHD_PostDataIterator iter,
void *iter_cls)
{
struct MHD_PostProcessor *ret;
const char *encoding;
const char *boundary;
size_t blen;
if ( (buffer_... | 0 | [
"CWE-120"
] | libmicrohttpd | a110ae6276660bee3caab30e9ff3f12f85cf3241 | 94,606,575,714,493,860,000,000,000,000,000,000,000 | 74 | fix buffer overflow and add test |
xfs_merge_ioc_xflags(
unsigned int flags,
unsigned int start)
{
unsigned int xflags = start;
if (flags & FS_IMMUTABLE_FL)
xflags |= XFS_XFLAG_IMMUTABLE;
else
xflags &= ~XFS_XFLAG_IMMUTABLE;
if (flags & FS_APPEND_FL)
xflags |= XFS_XFLAG_APPEND;
else
xflags &= ~XFS_XFLAG_APPEND;
if (flags & FS_SYNC_FL)
... | 0 | [
"CWE-200"
] | linux-2.6 | af24ee9ea8d532e16883251a6684dfa1be8eec29 | 160,441,832,999,232,290,000,000,000,000,000,000,000 | 29 | xfs: zero proper structure size for geometry calls
Commit 493f3358cb289ccf716c5a14fa5bb52ab75943e5 added this call to
xfs_fs_geometry() in order to avoid passing kernel stack data back
to user space:
+ memset(geo, 0, sizeof(*geo));
Unfortunately, one of the callers of that function passes the
address of a smal... |
xmlParseElementStart(xmlParserCtxtPtr ctxt) {
const xmlChar *name;
const xmlChar *prefix = NULL;
const xmlChar *URI = NULL;
xmlParserNodeInfo node_info;
int line, tlen = 0;
xmlNodePtr ret;
int nsNr = ctxt->nsNr;
if (((unsigned int) ctxt->nameNr > xmlParserMaxDepth) &&
((ctxt->op... | 0 | [] | libxml2 | 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 | 77,283,806,347,955,370,000,000,000,000,000,000,000 | 126 | Fix infinite loop in xmlStringLenDecodeEntities
When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef
return NULL which cause a infinite loop in xmlStringLenDecodeEntities
Found with libFuzzer.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> |
int nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl,
struct posix_acl **dpacl, unsigned int flags)
{
struct posix_acl_state effective_acl_state, default_acl_state;
struct nfs4_ace *ace;
int ret;
ret = init_state(&effective_acl_state, acl->naces);
if (ret)
return ret;
ret = init_sta... | 0 | [
"CWE-119"
] | linux-2.6 | 91b80969ba466ba4b915a4a1d03add8c297add3f | 232,241,552,094,274,920,000,000,000,000,000,000,000 | 60 | nfsd: fix buffer overrun decoding NFSv4 acl
The array we kmalloc() here is not large enough.
Thanks to Johann Dahm and David Richter for bug report and testing.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: David Richter <richterd@citi.umich.edu>
Tested-by: Johann Dahm <jdahm@umich.edu> |
png_handle_pHYs(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
{
png_byte buf[9];
png_uint_32 res_x, res_y;
int unit_type;
png_debug(1, "in png_handle_pHYs");
if ((png_ptr->mode & PNG_HAVE_IHDR) == 0)
png_chunk_error(png_ptr, "missing IHDR");
else if ((png_ptr->mode & PNG_HAVE... | 0 | [
"CWE-120"
] | libpng | a901eb3ce6087e0afeef988247f1a1aa208cb54d | 298,011,215,727,571,720,000,000,000,000,000,000,000 | 42 | [libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta). |
SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
struct files_struct *fsp)
{
VFS_FIND(sys_acl_get_fd);
return handle->fns->sys_acl_get_fd(handle, fsp);
} | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 232,936,942,958,833,160,000,000,000,000,000,000,000 | 6 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
void Compute(OpKernelContext* context) override {
core::RefCountPtr<BoostedTreesEnsembleResource> tree_ensemble_resource;
OP_REQUIRES_OK(context, LookupResource(context, HandleFromInput(context, 0),
&tree_ensemble_resource));
tf_shared_lock l(*tree_ensemble_resou... | 0 | [
"CWE-416"
] | tensorflow | 5ecec9c6fbdbc6be03295685190a45e7eee726ab | 4,619,534,207,414,563,400,000,000,000,000,000,000 | 15 | Prevent use after free.
A very old version of the code used `result` as a simple pointer to a resource. Two years later, the pointer got changed to a `unique_ptr` but author forgot to remove the call to `Unref`. Three years after that, we finally uncover the UAF.
PiperOrigin-RevId: 387924872
Change-Id: I70fb6f199164d... |
static void snoop_urb_data(struct urb *urb, unsigned len)
{
int i, size;
len = min(len, usbfs_snoop_max);
if (!usbfs_snoop || len == 0)
return;
if (urb->num_sgs == 0) {
print_hex_dump(KERN_DEBUG, "data: ", DUMP_PREFIX_NONE, 32, 1,
urb->transfer_buffer, len, 1);
return;
}
for (i = 0; i < urb->num_sgs &... | 0 | [
"CWE-200"
] | linux | 681fef8380eb818c0b845fca5d2ab1dcbab114ee | 268,553,818,540,846,440,000,000,000,000,000,000,000 | 21 | USB: usbfs: fix potential infoleak in devio
The stack object “ci” has a total size of 8 bytes. Its last 3 bytes
are padding bytes which are not initialized and leaked to userland
via “copy_to_user”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.