func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
xdr_gprinc_ret(XDR *xdrs, gprinc_ret *objp)
{
if (!xdr_ui_4(xdrs, &objp->api_version)) {
return (FALSE);
}
if (!xdr_kadm5_ret_t(xdrs, &objp->code)) {
return (FALSE);
}
if(objp->code == KADM5_OK) {
if (!_xdr_kadm5_principal_ent_rec(xdrs, &objp->rec,
objp->api_version)) {
return (FALSE);
}
}
r... | 0 | [
"CWE-703"
] | krb5 | a197e92349a4aa2141b5dff12e9dd44c2a2166e3 | 76,058,282,858,112,050,000,000,000,000,000,000,000 | 17 | 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... |
bool is_unsigned() const { return flags & UNSIGNED_FLAG; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 172,469,989,872,779,100,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... |
OPJ_BOOL opj_j2k_read_header(opj_stream_private_t *p_stream,
opj_j2k_t* p_j2k,
opj_image_t** p_image,
opj_event_mgr_t* p_manager)
{
/* preconditions */
assert(p_j2k != 00);
assert(p_stream != 00);
assert(p_manager != ... | 0 | [
"CWE-20"
] | openjpeg | 73fdf28342e4594019af26eb6a347a34eceb6296 | 178,061,175,886,576,650,000,000,000,000,000,000,000 | 61 | opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only) |
static int session_close_stream_on_goaway(nghttp2_session *session,
int32_t last_stream_id,
int incoming) {
int rv;
nghttp2_stream *stream, *next_stream;
nghttp2_close_stream_on_goaway_arg arg = {session, NULL, last_stream_id,
... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 225,621,899,555,323,400,000,000,000,000,000,000,000 | 35 | Add nghttp2_option_set_max_outbound_ack |
GF_Box *minf_New()
{
ISOM_DECL_BOX_ALLOC(GF_MediaInformationBox, GF_ISOM_BOX_TYPE_MINF);
return (GF_Box *)tmp;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 123,571,399,949,773,680,000,000,000,000,000,000,000 | 5 | prevent dref memleak on invalid input (#1183) |
VncInfo *qmp_query_vnc(Error **errp)
{
VncInfo *info = g_malloc0(sizeof(*info));
VncDisplay *vd = vnc_display_find(NULL);
SocketAddress *addr = NULL;
if (vd == NULL || !vd->listener || !vd->listener->nsioc) {
info->enabled = false;
} else {
info->enabled = true;
/* for comp... | 0 | [
"CWE-401"
] | qemu | 6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0 | 196,348,476,847,325,300,000,000,000,000,000,000,000 | 63 | vnc: fix memory leak when vnc disconnect
Currently when qemu receives a vnc connect, it creates a 'VncState' to
represent this connection. In 'vnc_worker_thread_loop' it creates a
local 'VncState'. The connection 'VcnState' and local 'VncState' exchange
data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'.
... |
rpc_free_client(struct rpc_clnt *clnt)
{
dprintk("RPC: destroying %s client for %s\n",
clnt->cl_protname, clnt->cl_server);
if (!IS_ERR(clnt->cl_path.dentry)) {
rpc_remove_client_dir(clnt->cl_path.dentry);
rpc_put_mount();
}
if (clnt->cl_parent != clnt) {
rpc_release_client(clnt->cl_parent);
goto o... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 166,795,368,315,059,700,000,000,000,000,000,000,000 | 23 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
int usb_get_current_frame_number(struct usb_device *dev)
{
return usb_hcd_get_frame_number(dev);
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | 95,436,046,944,614,450,000,000,000,000,000,000,000 | 4 | USB: check usb_get_extra_descriptor for proper size
When reading an extra descriptor, we need to properly check the minimum
and maximum size allowed, to prevent from invalid data being sent by a
device.
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Co-developed-by... |
static int run_tool(char *tool_path, DYNAMIC_STRING *ds_res, ...)
{
int ret;
const char* arg;
va_list args;
DYNAMIC_STRING ds_cmdline;
DBUG_ENTER("run_tool");
DBUG_PRINT("enter", ("tool_path: %s", tool_path));
if (init_dynamic_string(&ds_cmdline, IF_WIN("\"", ""), FN_REFLEN, FN_REFLEN))
die("Out of ... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 162,093,725,923,382,700,000,000,000,000,000,000,000 | 40 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
PS_SERIALIZER_DECODE_FUNC(php_serialize) /* {{{ */
{
const char *endptr = val + vallen;
zval *session_vars;
php_unserialize_data_t var_hash;
PHP_VAR_UNSERIALIZE_INIT(var_hash);
ALLOC_INIT_ZVAL(session_vars);
if (php_var_unserialize(&session_vars, &val, endptr, &var_hash TSRMLS_CC)) {
var_push_dtor(&var_hash, &... | 1 | [
"CWE-416"
] | php-src | 3798eb6fd5dddb211b01d41495072fd9858d4e32 | 154,733,583,394,407,060,000,000,000,000,000,000,000 | 23 | Fix bug #72562 - destroy var_hash properly |
static int orinoco_ioctl_set_auth(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
struct orinoco_private *priv = ndev_priv(dev);
hermes_t *hw = &priv->hw;
struct iw_param *param = &wrqu->param;
unsigned long flags;
int ret = -EINPROGRESS;
if (orinoco_lock(... | 0 | [] | linux | 0a54917c3fc295cb61f3fb52373c173fd3b69f48 | 18,577,063,503,623,047,000,000,000,000,000,000,000 | 77 | orinoco: fix TKIP countermeasure behaviour
Enable the port when disabling countermeasures, and disable it on
enabling countermeasures.
This bug causes the response of the system to certain attacks to be
ineffective.
It also prevents wpa_supplicant from getting scan results, as
wpa_supplicant disables countermeasures... |
ext4_access_path(handle_t *handle, struct inode *inode,
struct ext4_ext_path *path)
{
int credits, err;
if (!ext4_handle_valid(handle))
return 0;
/*
* Check if need to extend journal credits
* 3 for leaf, sb, and inode plus 2 (bmap and group
* descriptor) for each block group; assume two block
* groups... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 273,722,746,823,871,300,000,000,000,000,000,000,000 | 22 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... |
static int ntop_interface_is_idle(lua_State* vm) {
NetworkInterface *ntop_interface = getCurrentInterface(vm);
ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__);
if(!ntop_interface) return(CONST_LUA_ERROR);
return(ntop_interface->idle());
} | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 218,176,253,668,758,100,000,000,000,000,000,000,000 | 7 | Security fix: prevents empty host from being used |
static uint32_t rtl8139_MultiIntr_read(RTL8139State *s)
{
uint32_t ret = s->MultiIntr;
DPRINTF("MultiIntr read(w) val=0x%04x\n", ret);
return ret;
} | 0 | [
"CWE-835"
] | qemu | 5311fb805a4403bba024e83886fa0e7572265de4 | 80,622,975,925,015,640,000,000,000,000,000,000,000 | 8 | rtl8139: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Buglink: https://bugs.launchpad.net/qemu/+bug/1910826... |
static X509_REQ * php_openssl_csr_from_zval(zval ** val, int makeresource, long * resourceval TSRMLS_DC)
{
X509_REQ * csr = NULL;
char * filename = NULL;
BIO * in;
if (resourceval) {
*resourceval = -1;
}
if (Z_TYPE_PP(val) == IS_RESOURCE) {
void * what;
int type;
what = zend_fetch_resource(val TSRMLS_C... | 0 | [
"CWE-200"
] | php-src | 270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e | 226,962,081,359,928,260,000,000,000,000,000,000,000 | 41 | Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only |
StrFormatSpec(const Char *str, unsigned width, FillChar fill)
: AlignSpec(width, fill), str_(str) {
internal::CharTraits<Char>::convert(FillChar());
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 60,208,365,425,574,820,000,000,000,000,000,000,000 | 4 | Fix segfault on complex pointer formatting (#642) |
static void bpf_map_write_active_inc(struct bpf_map *map)
{
atomic64_inc(&map->writecnt);
} | 0 | [
"CWE-367"
] | bpf | 353050be4c19e102178ccc05988101887c25ae53 | 95,243,999,174,722,380,000,000,000,000,000,000,000 | 4 | bpf: Fix toctou on read-only map's constant scalar tracking
Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is
checking whether maps are read-only both from BPF program side and user space
side, and then, given their content is constant, reading out their data via
map->ops->map_direct_value_ad... |
static const char * _pam_get_item_byname(pam_handle_t *pamh, const char *name)
{
/*
* This function just allows me to use names as given in the config
* file and translate them into the appropriate PAM_ITEM macro
*/
int item;
const void *itemval;
D(("Called."));
if (strcmp(name, "PAM_USER") == 0) {... | 0 | [
"CWE-119"
] | linux-pam | caf5e7f61c8d9288daa49b4f61962e6b1239121d | 275,573,657,718,396,230,000,000,000,000,000,000,000 | 34 | pam_env: correctly count leading whitespace when parsing environment file
* modules/pam_env/pam_env.c (_assemble_line): Correctly count leading
whitespace.
Fixes CVE-2011-3148.
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pam/+bug/874469 |
static void cherry_pick_list(struct commit_list *list, struct rev_info *revs)
{
struct commit_list *p;
int left_count = 0, right_count = 0;
int left_first;
struct patch_ids ids;
unsigned cherry_flag;
/* First count the commits on the left and on the right */
for (p = list; p; p = p->next) {
struct commit *com... | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 10,573,884,414,715,498,000,000,000,000,000,000,000 | 87 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
void RemoteIo::transfer(BasicIo& src)
{
if (src.open() != 0) {
throw Error(kerErrorMessage, "unable to open src when transferring");
}
write(src);
src.close();
} | 0 | [
"CWE-190"
] | exiv2 | c73d1e27198a389ce7caf52ac30f8e2120acdafd | 113,005,352,508,544,360,000,000,000,000,000,000,000 | 8 | Avoid negative integer overflow when `filesize < io_->tell()`.
This fixes #791. |
static int encode_lock(struct xdr_stream *xdr, const struct nfs_lock_args *args)
{
__be32 *p;
RESERVE_SPACE(32);
WRITE32(OP_LOCK);
WRITE32(nfs4_lock_type(args->fl, args->block));
WRITE32(args->reclaim);
WRITE64(args->fl->fl_start);
WRITE64(nfs4_lock_length(args->fl));
WRITE32(args->new_lock_owner);
if (args->... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 109,575,874,718,680,720,000,000,000,000,000,000,000 | 29 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
static inline bool is_frwd(struct usb_device *dev)
{
return ((le16_to_cpu(dev->descriptor.idVendor) == VENDOR_ID_FRWD) &&
(le16_to_cpu(dev->descriptor.idProduct) == PRODUCT_ID_CYPHIDCOM_FRWD));
} | 0 | [
"CWE-703"
] | linux | c55aee1bf0e6b6feec8b2927b43f7a09a6d5f754 | 132,656,266,923,774,700,000,000,000,000,000,000,000 | 5 | USB: cypress_m8: add endpoint sanity check
An attack using missing endpoints exists.
CVE-2016-3137
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
GF_Err sgpd_box_write(GF_Box *s, GF_BitStream *bs)
{
u32 i, nb_descs;
GF_SampleGroupDescriptionBox *p = (GF_SampleGroupDescriptionBox *)s;
GF_Err e;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u32(bs, p->grouping_type);
if (p->version>=1) gf_bs_write_u32(bs, p->default_length);
if (p->versi... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 218,743,263,986,273,500,000,000,000,000,000,000,000 | 24 | fixed #2255 |
static int __init hugepagesz_setup(char *s)
{
unsigned long size;
struct hstate *h;
parsed_valid_hugepagesz = false;
size = (unsigned long)memparse(s, NULL);
if (!arch_hugetlb_valid_size(size)) {
pr_err("HugeTLB: unsupported hugepagesz=%s\n", s);
return 0;
}
h = size_to_hstate(size);
if (h) {
/*
* h... | 0 | [
"CWE-362"
] | linux | 17743798d81238ab13050e8e2833699b54e15467 | 169,640,807,919,199,180,000,000,000,000,000,000,000 | 42 | mm/hugetlb: fix a race between hugetlb sysctl handlers
There is a race between the assignment of `table->data` and write value
to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on
the other thread.
CPU0: CPU1:
proc_sys_write
... |
input_csi_dispatch_rm(struct input_ctx *ictx)
{
u_int i;
for (i = 0; i < ictx->param_list_len; i++) {
switch (input_get(ictx, i, 0, -1)) {
case 4: /* IRM */
screen_write_mode_clear(&ictx->ctx, MODE_INSERT);
break;
case 34:
screen_write_mode_set(&ictx->ctx, MODE_BLINKING);
break;
default:
log_... | 0 | [] | tmux | 2ffbd5b5f05dded1564ba32a6a00b0b417439b2f | 162,176,420,757,995,950,000,000,000,000,000,000,000 | 18 | When searching for tabs, start from screen width, fixes out-of-bounds
read found by Kuang-che Wu. |
void jpc_qmfb_join_colgrp(jpc_fix_t *a, int numrows, int stride,
int parity)
{
int bufsize = JPC_CEILDIVPOW2(numrows, 1);
jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE];
jpc_fix_t *buf = joinbuf;
jpc_fix_t *srcptr;
jpc_fix_t *dstptr;
register jpc_fix_t *srcptr2;
register jpc_fix_t *dstptr2;
regist... | 1 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 13,372,672,139,245,177,000,000,000,000,000,000,000 | 77 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
*/
void free_netdev(struct net_device *dev)
{
struct napi_struct *p, *n;
might_sleep();
netif_free_tx_queues(dev);
netif_free_rx_queues(dev);
kfree(rcu_dereference_protected(dev->ingress_queue, 1));
/* Flush device addresses */
dev_addr_flush(dev);
list_for_each_entry_safe(p, n, &dev->napi_list, dev_list)
... | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 140,432,094,144,489,050,000,000,000,000,000,000,000 | 31 | 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... |
nextval_internal(Oid relid, bool check_permissions)
{
SeqTable elm;
Relation seqrel;
Buffer buf;
Page page;
HeapTuple pgstuple;
Form_pg_sequence pgsform;
HeapTupleData seqdatatuple;
Form_pg_sequence_data seq;
int64 incby,
maxv,
minv,
cache,
log,
fetch,
last;
int64 result,
next,... | 0 | [
"CWE-94"
] | postgres | b9b21acc766db54d8c337d508d0fe2f5bf2daab0 | 138,209,499,075,983,950,000,000,000,000,000,000,000 | 241 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
static inline void req_set_fail_links(struct io_kiocb *req)
{
if ((req->flags & (REQ_F_LINK | REQ_F_HARDLINK)) == REQ_F_LINK)
req->flags |= REQ_F_FAIL_LINK;
} | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 189,757,630,063,702,100,000,000,000,000,000,000,000 | 5 | io_uring: grab ->fs as part of async preparation
This passes it in to io-wq, so it assumes the right fs_struct when
executing async work that may need to do lookups.
Cc: stable@vger.kernel.org # 5.3+
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
static void str_free(OPENSSL_STRING str)
{
OPENSSL_free(str);
} | 0 | [
"CWE-125"
] | openssl | bb4d2ed4091408404e18b3326e3df67848ef63d0 | 23,394,480,602,017,394,000,000,000,000,000,000,000 | 4 | Fix append_ia5 function to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
inline void Cast(const RuntimeShape& input_shape, const SrcT* input_data,
const RuntimeShape& output_shape, DstT* output_data) {
ruy::profiler::ScopeLabel label("Cast");
auto input_map = MapAsVector(input_data, input_shape);
auto output_map = MapAsVector(output_data, output_shape);
output_map.a... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 121,987,797,897,782,560,000,000,000,000,000,000,000 | 7 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
emsg_core(char_u *s)
{
int attr;
char_u *p;
int r;
#ifdef FEAT_EVAL
int ignore = FALSE;
int severe;
#endif
#ifdef FEAT_EVAL
// When testing some errors are turned into a normal message.
if (ignore_error(s))
// don't call msg() if it results in a dialog
return msg_use_printf() ? FALSE ... | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 9,509,735,034,433,303,000,000,000,000,000,000,000 | 143 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
RZ_API RzGraph *rz_core_analysis_importxrefs(RzCore *core) {
RzBinObject *obj = rz_bin_cur_object(core->bin);
bool va = core->io->va || core->bin->is_debugger;
RzListIter *iter;
RzBinImport *imp;
if (!obj) {
return NULL;
}
RzGraph *graph = rz_graph_new();
if (!graph) {
return NULL;
}
rz_list_foreach (obj... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 85,509,700,922,359,520,000,000,000,000,000,000,000 | 24 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static void free_context_table(struct intel_iommu *iommu)
{
int i;
unsigned long flags;
struct context_entry *context;
spin_lock_irqsave(&iommu->lock, flags);
if (!iommu->root_entry) {
goto out;
}
for (i = 0; i < ROOT_ENTRY_NR; i++) {
context = iommu_context_addr(iommu, i, 0, 0);
if (context)
free_pgta... | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 59,329,944,919,395,800,000,000,000,000,000,000,000 | 28 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
Status CalculateOutputIndex(OpKernelContext* context, int dimension,
const vector<INDEX_TYPE>& parent_output_index,
INDEX_TYPE output_index_multiplier,
INDEX_TYPE output_size,
vector<INDEX_TYPE>* re... | 1 | [
"CWE-131",
"CWE-787"
] | tensorflow | c4d7afb6a5986b04505aca4466ae1951686c80f6 | 88,043,902,339,269,950,000,000,000,000,000,000,000 | 31 | Fix heap OOB / undefined behavior in `RaggedTensorToTensor`
PiperOrigin-RevId: 373244623
Change-Id: I2d6cbbc8c67b238a8815bf58097f7586d87c54f2 |
ins_compl_need_restart(void)
{
// Return TRUE if we didn't complete finding matches or when the
// 'completefunc' returned "always" in the "refresh" dictionary item.
return compl_was_interrupted
|| ((ctrl_x_mode_function() || ctrl_x_mode_omni())
&& compl_opt_refresh_always);
} | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 243,118,484,656,662,260,000,000,000,000,000,000,000 | 8 | 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. |
static int __init ip_tables_init(void)
{
int ret;
ret = register_pernet_subsys(&ip_tables_net_ops);
if (ret < 0)
goto err1;
/* Noone else will be downing sem now, so we won't sleep */
ret = xt_register_targets(ipt_builtin_tg, ARRAY_SIZE(ipt_builtin_tg));
if (ret < 0)
goto err2;
ret = xt_register_matches(ip... | 0 | [
"CWE-200"
] | linux-2.6 | 78b79876761b86653df89c48a7010b5cbd41a84a | 113,717,140,097,179,650,000,000,000,000,000,000,000 | 33 | 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... |
unix_sck_send_conn(hsm_com_client_hdl_t *hdl, int timeout)
{
hsm_com_con_data_t msg;
memset(&msg,0,sizeof(msg));
msg.header.cmd = HSM_COM_CMD_CONN;
msg.header.ver = HSM_COM_VER;
msg.header.trans_id = hdl->trans_id++;
msg.header.payload_len = sizeof(msg.key);
msg.key = HSM_COM_KEY;
if(unix_sck... | 0 | [
"CWE-362"
] | opa-fm | c5759e7b76f5bf844be6c6641cc1b356bbc83869 | 118,328,019,358,937,120,000,000,000,000,000,000,000 | 31 | Fix scripts and code that use well-known tmp files. |
cr_input_peek_byte (CRInput const * a_this, enum CRSeekPos a_origin,
gulong a_offset, guchar * a_byte)
{
gulong abs_offset = 0;
g_return_val_if_fail (a_this && PRIVATE (a_this)
&& a_byte, CR_BAD_PARAM_ERROR);
switch (a_origin) {
case C... | 0 | [
"CWE-125"
] | libcroco | 898e3a8c8c0314d2e6b106809a8e3e93cf9d4394 | 296,816,829,188,756,500,000,000,000,000,000,000,000 | 36 | input: check end of input before reading a byte
When reading bytes we weren't check that the index wasn't
out of bound and this could produce an invalid read which
could deal to a security bug. |
static bool is_dump_unreclaim_slabs(void)
{
unsigned long nr_lru;
nr_lru = global_node_page_state(NR_ACTIVE_ANON) +
global_node_page_state(NR_INACTIVE_ANON) +
global_node_page_state(NR_ACTIVE_FILE) +
global_node_page_state(NR_INACTIVE_FILE) +
global_node_page_state(NR_ISOLATED_ANON) +
global_node_page... | 0 | [
"CWE-416"
] | linux | 687cb0884a714ff484d038e9190edc874edcf146 | 291,678,228,162,820,420,000,000,000,000,000,000,000 | 14 | mm, oom_reaper: gather each vma to prevent leaking TLB entry
tlb_gather_mmu(&tlb, mm, 0, -1) means gathering the whole virtual memory
space. In this case, tlb->fullmm is true. Some archs like arm64
doesn't flush TLB when tlb->fullmm is true:
commit 5a7862e83000 ("arm64: tlbflush: avoid flushing when fullmm == 1")... |
LanLinkProvider::LanLinkProvider(
bool testMode,
quint16 udpBroadcastPort,
quint16 udpListenPort
)
: m_server(new Server(this))
, m_udpSocket(this)
, m_tcpPort(0)
, m_udpBroadcastPort(udpBroadcastPort)
, m_udpListenPort(udpListenPort)
, m_testMode(testMode)
, ... | 0 | [
"CWE-400",
"CWE-703"
] | kdeconnect-kde | 4fbd01a3d44a0bcca888c49a77ec7cfd10e113d7 | 270,381,931,039,280,500,000,000,000,000,000,000,000 | 30 | Limit identity packets to 8KiB
Healthy identity packages shouldn't be that big and we don't want to
allow systems around us to send us ever humongous packages that will
just leave us without any memory.
Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this. |
GF_Err gf_isom_hint_max_chunk_size(GF_ISOFile *movie, u32 trackNumber, u32 maxChunkSize)
{
GF_TrackBox *trak;
if (movie->openMode == GF_ISOM_OPEN_READ) return GF_ISOM_INVALID_MODE;
trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!trak || !maxChunkSize) return GF_BAD_PARAM;
trak->Media->information->s... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 253,091,228,686,066,060,000,000,000,000,000,000,000 | 11 | fixed #1706 |
GF_Err mfhd_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_MovieFragmentHeaderBox *ptr = (GF_MovieFragmentHeaderBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->sequence_number);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 110,115,861,313,648,640,000,000,000,000,000,000,000 | 11 | fixed #1587 |
static void umount_tree(struct mount *mnt, enum umount_tree_flags how)
{
LIST_HEAD(tmp_list);
struct mount *p;
if (how & UMOUNT_PROPAGATE)
propagate_mount_unlock(mnt);
/* Gather the mounts to umount */
for (p = mnt; p; p = next_mnt(p, mnt)) {
p->mnt.mnt_flags |= MNT_UMOUNT;
list_move(&p->mnt_list, &tmp_lis... | 0 | [
"CWE-200"
] | linux | e0c9c0afd2fc958ffa34b697972721d81df8a56f | 227,223,385,386,434,800,000,000,000,000,000,000,000 | 52 | mnt: Update detach_mounts to leave mounts connected
Now that it is possible to lazily unmount an entire mount tree and
leave the individual mounts connected to each other add a new flag
UMOUNT_CONNECTED to umount_tree to force this behavior and use
this flag in detach_mounts.
This closes a bug where the deletion of a... |
RAMBlock *qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
MemoryRegion *mr, Error **errp)
{
return qemu_ram_alloc_internal(size, size, NULL, host, false,
false, mr, errp);
} | 0 | [
"CWE-787"
] | qemu | 4bfb024bc76973d40a359476dc0291f46e435442 | 83,817,794,190,566,160,000,000,000,000,000,000,000 | 6 | memory: clamp cached translation in case it points to an MMIO region
In using the address_space_translate_internal API, address_space_cache_init
forgot one piece of advice that can be found in the code for
address_space_translate_internal:
/* MMIO registers can be expected to perform full-width accesses based onl... |
TEST(FormatterTest, CustomFormat) {
EXPECT_EQ("42", format("{0}", Answer()));
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 231,575,904,625,424,540,000,000,000,000,000,000,000 | 3 | Fix segfault on complex pointer formatting (#642) |
static void qxl_ram_set_dirty(PCIQXLDevice *qxl, void *ptr)
{
ram_addr_t addr = qxl->vga.vram_offset;
void *base = qxl->vga.vram_ptr;
intptr_t offset;
offset = ptr - base;
offset &= ~(TARGET_PAGE_SIZE-1);
assert(offset < qxl->vga.vram_size);
qxl_set_dirty(addr + offset, addr + offset + TARG... | 0 | [] | qemu-kvm | 5ff4e36c804157bd84af43c139f8cd3a59722db9 | 39,744,203,446,499,187,000,000,000,000,000,000,000 | 11 | qxl: async io support using new spice api
Some of the QXL port i/o commands are waiting for the spice server to
complete certain actions. Add async versions for these commands, so we
don't block the vcpu while the spice server processses the command.
Instead the qxl device will raise an IRQ when done.
The async comm... |
void LosslessScan::WriteFrameType(class ByteStream *io)
{
#if ACCUSOFT_CODE
if (m_bDifferential) {
io->PutWord(0xffc7); // differential lossless sequential
} else {
io->PutWord(0xffc3); // lossless sequential
}
#else
NOREF(io);
#endif
} | 0 | [
"CWE-119",
"CWE-703"
] | libjpeg | ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a | 70,160,976,324,939,210,000,000,000,000,000,000,000 | 12 | Added out-of-bounds checks for lossless symbol decoding and AC context
indices. Worked around some gcc warnings. Bumped to 1.64. |
GF_Err gf_isom_get_xml_metadata_description(GF_ISOFile *file, u32 track, u32 sampleDescription,
const char **_namespace, const char **schema_loc, const char **content_encoding)
{
GF_TrackBox *trak;
GF_MetaDataSampleEntryBox *ptr;
if (_namespace) *_namespace = NULL;
if (content_encoding) *content_encoding = ... | 0 | [
"CWE-476",
"CWE-401"
] | gpac | 328c6d682698fdb9878dbb4f282963d42c538c01 | 254,173,634,026,416,100,000,000,000,000,000,000,000 | 18 | fixed #1756 |
void readRawInto(float& f) {
static_assert(
sizeof(float) == sizeof(uint32_t),
"Carbon doubles can only be used on platforms where sizeof(float)"
" == sizeof(uint32_t)");
static_assert(
std::numeric_limits<float>::is_iec559,
"Carbon floats may only be used on platforms ... | 0 | [
"CWE-400",
"CWE-522",
"CWE-674"
] | mcrouter | 97e033b3bb0cb16b61bf49f0dc7f311a3e0edd1b | 146,388,400,089,522,470,000,000,000,000,000,000,000 | 12 | Attempt to make CarbonProtocolReader::skip tail recursive
Reviewed By: edenzik
Differential Revision: D17967570
fbshipit-source-id: fdc32e190a521349c7c8f4d6081902fa18eb0284 |
static Value evaluateExpression(const string& expressionName,
const vector<ImplicitValue>& operands) {
intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest());
VariablesParseState vps = expCtx->variablesParseState;
const BSONObj obj = BSON(expressionNam... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 226,656,369,084,793,250,000,000,000,000,000,000,000 | 9 | SERVER-38070 fix infinite loop in agg expression |
SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
u64 persistent_fid, u64 volatile_fid, int index,
struct cifs_search_info *srch_inf)
{
struct smb_rqst rqst;
struct smb2_query_directory_req *req;
struct smb2_query_directory_rsp *rsp = NULL;
struct kvec iov[2];
struct kvec rsp_iov;
... | 0 | [
"CWE-416",
"CWE-200"
] | linux | 6a3eb3360667170988f8a6477f6686242061488a | 287,732,377,084,209,460,000,000,000,000,000,000,000 | 146 | cifs: Fix use-after-free in SMB2_write
There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580
Read of size 8 at addr ffff8880b6a8e450 by task ln/4196
Should not release the 'req' because it will use in the trace.
Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de... |
fst_process_int_work_q(unsigned long /*void **/work_q)
{
unsigned long flags;
u64 work_intq;
int i;
/*
* Grab the queue exclusively
*/
dbg(DBG_INTR, "fst_process_int_work_q\n");
spin_lock_irqsave(&fst_work_q_lock, flags);
work_intq = fst_work_intq;
fst_work_intq = 0;
spin_unlock_irqrestore(&fst_work_q_loc... | 0 | [
"CWE-399"
] | linux | 96b340406724d87e4621284ebac5e059d67b2194 | 179,835,505,367,688,900,000,000,000,000,000,000,000 | 30 | farsync: fix info leak in ioctl
The fst_get_iface() code fails to initialize the two padding bytes of
struct sync_serial_settings after the ->loopback member. Add an explicit
memset(0) before filling the structure to avoid the info leak.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. ... |
bool Item_func_sp::check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 207,990,645,615,023,540,000,000,000,000,000,000,000 | 4 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
key_set(const char *key) {
int len = (int)strlen(key);
int64_t h = calc_hash(key, &len);
Slot *bucket = get_bucketp(h);
Slot s;
if (NULL != (s = (Slot)AGOO_MALLOC(sizeof(struct _slot)))) {
s->hash = h;
s->klen = len;
s->key = key;
s->next = *bucket;
*bucket = s;
}
} | 1 | [
"CWE-444",
"CWE-61"
] | agoo | 23d03535cf7b50d679a60a953a0cae9519a4a130 | 315,730,644,572,032,800,000,000,000,000,000,000,000 | 14 | Remote addr (#99)
* REMOTE_ADDR added
* Ready for merge |
static bool ehci_verify_pid(EHCIQueue *q, EHCIqtd *qtd)
{
int ep = get_field(q->qh.epchar, QH_EPCHAR_EP);
int pid = ehci_get_pid(qtd);
/* Note the pid changing is normal for ep 0 (the control ep) */
if (q->last_pid && ep != 0 && pid != q->last_pid) {
return false;
} else {
return t... | 0 | [] | qemu | 791f97758e223de3290592d169f8e6339c281714 | 202,704,601,975,599,470,000,000,000,000,000,000,000 | 12 | usb: ehci: fix memory leak in ehci_init_transfer
In ehci_init_transfer function, if the 'cpage' is bigger than 4,
it doesn't free the 'p->sgl' once allocated previously thus leading
a memory leak issue. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog... |
Process_Event( grEvent* event )
{
int i, axis;
switch ( event->key )
{
case grKeyEsc: /* ESC or q */
case grKEY( 'q' ):
return 0;
case grKeyF1:
case grKEY( '?' ):
Help();
return 1;
/* mode keys */
case grKEY( 'a' ):
antialias = !antialias... | 0 | [
"CWE-120"
] | freetype2-demos | b995299b73ba4cd259f221f500d4e63095508bec | 13,652,189,637,707,932,000,000,000,000,000,000,000 | 167 | Fix Savannah bug #30054.
* src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c,
src/ftview.c: Use precision for `%s' where appropriate to avoid
buffer overflows. |
fetch_from_evbuffer_socks_client(struct evbuffer *buf, int state,
char **reason)
{
ssize_t drain = 0;
uint8_t *data;
size_t datalen;
int r;
/* Linearize the SOCKS response in the buffer, up to 128 bytes.
* (parse_socks_client shouldn't need to see anything beyond that.) */... | 0 | [] | tor | 19df037e53331ae528b876f225be08f198e0f8b6 | 337,204,241,822,201,270,000,000,000,000,000,000,000 | 23 | Log malformed hostnames in socks5 request respecting SafeLogging |
ikev2_ke_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
uint32_t phase _U_, uint32_t doi _U_,
uint32_t proto _U_, int depth _U_)
{
struct ikev2_ke ke;
const struct ikev2_ke *k;
k = (const struct ikev2_ke *)ext;
ND_TCHECK(*ext);
UNALIGNED... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | 8dca25d26c7ca2caf6138267f6f17111212c156e | 79,409,021,639,592,495,000,000,000,000,000,000,000 | 27 | CVE-2017-13690/IKEv2: Fix some bounds checks.
Use a pointer of the correct type in ND_TCHECK(), or use ND_TCHECK2()
and provide the correct length.
While we're at it, remove the blank line between some checks and the
UNALIGNED_MEMCPY()s they protect.
Also, note the places where we print the entire payload.
This fix... |
static char *get_line(multipart_buffer *self TSRMLS_DC)
{
char* ptr = next_line(self);
if (!ptr) {
fill_buffer(self TSRMLS_CC);
ptr = next_line(self);
}
return ptr;
} | 0 | [
"CWE-399"
] | php-src | 4605d536d23b00813d11cc906bb48d39bdcf5f25 | 297,497,210,613,257,860,000,000,000,000,000,000,000 | 11 | Fixed bug #69364 - use smart_str to assemble strings |
void _quicklistBookmarkDelete(quicklist *ql, quicklistBookmark *bm) {
int index = bm - ql->bookmarks;
zfree(bm->name);
ql->bookmark_count--;
memmove(bm, bm+1, (ql->bookmark_count - index)* sizeof(*bm));
/* NOTE: We do not shrink (realloc) the quicklist yet (to avoid resonance,
* it may be re-us... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 314,724,499,975,248,020,000,000,000,000,000,000,000 | 8 | 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 void sig_server_setup_read(IRC_SERVER_SETUP_REC *rec, CONFIG_NODE *node)
{
g_return_if_fail(rec != NULL);
g_return_if_fail(node != NULL);
if (!IS_IRC_SERVER_SETUP(rec))
return;
rec->max_cmds_at_once = config_node_get_int(node, "cmds_max_at_once", 0);
rec->cmd_queue_speed = config_node_get_int(node, "cmd... | 0 | [
"CWE-416"
] | irssi | b8d3301d34f383f039071214872570385de1bb59 | 103,190,389,809,221,390,000,000,000,000,000,000,000 | 12 | SASL support
The only supported methods are PLAIN and EXTERNAL, the latter is untested as of
now.
The code gets the values from the keys named sasl_{mechanism,username,password}
specified for each chatnet. |
BOOL transport_tsg_connect(rdpTransport* transport, const char* hostname, UINT16 port)
{
rdpTsg* tsg = tsg_new(transport);
tsg->transport = transport;
transport->tsg = tsg;
transport->SplitInputOutput = TRUE;
if (transport->TlsIn == NULL)
transport->TlsIn = tls_new(transport->settings);
transport->TlsIn->soc... | 0 | [
"CWE-476",
"CWE-125"
] | FreeRDP | 0773bb9303d24473fe1185d85a424dfe159aff53 | 230,027,337,081,738,340,000,000,000,000,000,000,000 | 29 | nla: invalidate sec handle after creation
If sec pointer isn't invalidated after creation it is not possible
to check if the upper and lower pointers are valid.
This fixes a segfault in the server part if the client disconnects before
the authentication was finished. |
inline void Http2Stream::AddChunk(const uint8_t* data, size_t len) {
CHECK(!this->IsDestroyed());
if (this->statistics_.first_byte == 0)
this->statistics_.first_byte = uv_hrtime();
if (flags_ & NGHTTP2_STREAM_FLAG_EOS)
return;
char* buf = nullptr;
if (len > 0 && data != nullptr) {
buf = Malloc<cha... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 93,552,276,211,319,280,000,000,000,000,000,000,000 | 15 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
handler::ha_bulk_update_row(const uchar *old_data, const uchar *new_data,
ha_rows *dup_key_found)
{
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
m_lock_type == F_WRLCK);
mark_trx_read_write();
return bulk_update_row(old_data, new_data, dup_key_found);
} | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 217,400,435,219,505,400,000,000,000,000,000,000,000 | 9 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
request_is_satisfied (NautilusDirectory *directory,
NautilusFile *file,
Request request)
{
if (REQUEST_WANTS_TYPE (request, REQUEST_FILE_LIST) &&
!(directory->details->directory_loaded &&
directory->details->directory_loaded_sent_notifica... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 152,803,095,810,335,370,000,000,000,000,000,000,000 | 77 | 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 manager_unit_inactive_or_pending(Manager *m, const char *name) {
Unit *u;
assert(m);
assert(name);
/* Returns true if the unit is inactive or going down */
u = manager_get_unit(m, name);
if (!u)
return true;
return unit_inactive_or_pending(... | 0 | [
"CWE-20"
] | systemd | 531ac2b2349da02acc9c382849758e07eb92b020 | 232,635,449,777,719,840,000,000,000,000,000,000,000 | 13 | If the notification message length is 0, ignore the message (#4237)
Fixes #4234.
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org> |
UNKNOWN_null()
{
} | 0 | [
"CWE-787"
] | gnuplot | 963c7df3e0c5266efff260d0dff757dfe03d3632 | 151,607,280,992,652,330,000,000,000,000,000,000,000 | 3 | Better error handling for faulty font syntax
A missing close-quote in an enhanced text font specification could
cause a segfault.
Bug #2303 |
flatpak_dir_deploy_install (FlatpakDir *self,
const char *ref,
const char *origin,
const char **subpaths,
gboolean reinstall,
GCancellable *cancellable,
... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 170,894,156,317,963,600,000,000,000,000,000,000,000 | 111 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
GF_Err gf_isom_set_edit(GF_ISOFile *movie, u32 trackNumber, u64 EditTime, u64 EditDuration, u64 MediaTime, GF_ISOEditType EditMode)
{
return gf_isom_set_edit_internal(movie, trackNumber, EditTime, EditDuration, MediaTime, 0, EditMode);
} | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 164,336,416,440,115,780,000,000,000,000,000,000,000 | 4 | fixed #1706 |
struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct smbXcli_conn *conn,
uint16_t cmd,
uint32_t additional_flags,
uint32_t clear_flags,
uint32_t timeout_msec,
struct smbXcli_tcon *tcon,
struct smbXcli... | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 110,069,348,188,697,000,000,000,000,000,000,000,000 | 159 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
static int pow2gt (int x) { --x; x|=x>>1; x|=x>>2; x|=x>>4; x|=x>>8; x|=x>>16; return x+1; } | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 28,822,808,892,434,535,000,000,000,000,000,000,000 | 1 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
static int x509_get_pubkey( unsigned char **p,
const unsigned char *end,
x509_buf *pk_alg_oid,
mpi *N, mpi *E )
{
int ret;
size_t len;
unsigned char *end2;
if( ( ret = x509_get_alg( p, end, pk_alg_oid ) ) != 0 )
... | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 336,679,257,190,660,700,000,000,000,000,000,000,000 | 57 | RSA blinding on CRT operations to counter timing attacks |
SaveArgs(args)
char **args;
{
register char **ap, **pp;
register int argc = 0;
while (args[argc])
argc++;
if ((pp = ap = (char **)malloc((unsigned)(argc + 1) * sizeof(char **))) == 0)
Panic(0, "%s", strnomem);
while (argc--)
*pp++ = SaveStr(*args++);
*pp = 0;
return ap;
} | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 271,030,698,810,348,230,000,000,000,000,000,000,000 | 15 | 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 ... |
bool Item_outer_ref::fix_fields(THD *thd, Item **reference)
{
bool err;
/* outer_ref->check_cols() will be made in Item_direct_ref::fix_fields */
if ((*ref) && (*ref)->fix_fields_if_needed(thd, reference))
return TRUE;
err= Item_direct_ref::fix_fields(thd, reference);
if (!outer_ref)
outer_ref= *ref;
... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 186,168,817,483,780,360,000,000,000,000,000,000,000 | 13 | 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. |
const String *const_ptr_string() const
{
return &str_value;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 147,754,740,001,189,130,000,000,000,000,000,000,000 | 4 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
inline size_t WireFormatLite::SInt32SizePlusOne(int32_t value) {
return io::CodedOutputStream::VarintSize32PlusOne(ZigZagEncode32(value));
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 46,036,141,352,381,670,000,000,000,000,000,000,000 | 3 | Apply patch |
static int ext4_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
{
return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super, mnt);
} | 0 | [
"CWE-20"
] | linux-2.6 | 4ec110281379826c5cf6ed14735e47027c3c5765 | 229,622,839,776,509,330,000,000,000,000,000,000,000 | 5 | ext4: Add sanity checks for the superblock before mounting the filesystem
This avoids insane superblock configurations that could lead to kernel
oops due to null pointer derefences.
http://bugzilla.kernel.org/show_bug.cgi?id=12371
Thanks to David Maciejak at Fortinet's FortiGuard Global Security
Research Team who di... |
xmlRegExecGetValues(xmlRegExecCtxtPtr exec, int err,
int *nbval, int *nbneg,
xmlChar **values, int *terminal) {
int maxval;
int nb = 0;
if ((exec == NULL) || (nbval == NULL) || (nbneg == NULL) ||
(values == NULL) || (*nbval <= 0))
return(-1);
maxval = *nbval;
... | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 50,434,145,207,106,370,000,000,000,000,000,000,000 | 144 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
static inline cql_server::result_with_foreign_response_ptr convert_error_message_to_coordinator_result(messages::result_message* msg) {
return std::move(*dynamic_cast<messages::result_message::exception*>(msg)).get_exception();
} | 0 | [] | scylladb | 1c2eef384da439b0457b6d71c7e37d7268e471cb | 183,769,407,378,161,030,000,000,000,000,000,000,000 | 3 | transport/server.cc: Return correct size of decompressed lz4 buffer
An incorrect size is returned from the function, which could lead to
crashes or undefined behavior. Fix by erroring out in these cases.
Fixes #11476 |
static int selinux_socket_unix_may_send(struct socket *sock,
struct socket *other)
{
struct sk_security_struct *ssec = sock->sk->sk_security;
struct sk_security_struct *osec = other->sk->sk_security;
struct common_audit_data ad;
struct lsm_network_audit net = {0,};
ad.type = LSM_AUDIT_DATA_NET;
ad.u.net = &... | 0 | [
"CWE-264"
] | linux | 7b0d0b40cd78cadb525df760ee4cac151533c2b5 | 70,473,995,506,725,160,000,000,000,000,000,000,000 | 15 | selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID.
If the callee SID is bounded by the caller SID, then allowing
the transition to occur poses no risk of privilege escalation and we can
therefore safely allow the transition to occur. Add this exemption
for both the case where a transition was explicitl... |
save_typeahead(tasave_T *tp)
{
tp->save_typebuf = typebuf;
tp->typebuf_valid = (alloc_typebuf() == OK);
if (!tp->typebuf_valid)
typebuf = tp->save_typebuf;
tp->old_char = old_char;
tp->old_mod_mask = old_mod_mask;
old_char = -1;
tp->save_readbuf1 = readbuf1;
readbuf1.bh_first.b_next =... | 0 | [
"CWE-78"
] | vim | 53575521406739cf20bbe4e384d88e7dca11f040 | 39,677,806,623,951,740,000,000,000,000,000,000,000 | 19 | patch 8.1.1365: source command doesn't check for the sandbox
Problem: Source command doesn't check for the sandbox. (Armin Razmjou)
Solution: Check for the sandbox when sourcing a file. |
png_chunk_unknown_handling(png_const_structrp png_ptr, png_uint_32 chunk_name)
{
png_byte chunk_string[5];
PNG_CSTRING_FROM_CHUNK(chunk_string, chunk_name);
return png_handle_as_unknown(png_ptr, chunk_string);
} | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 300,687,281,645,908,720,000,000,000,000,000,000,000 | 7 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
static void cpu_load_update_nohz(struct rq *this_rq,
unsigned long curr_jiffies,
unsigned long load)
{
unsigned long pending_updates;
pending_updates = curr_jiffies - this_rq->last_load_update_tick;
if (pending_updates) {
this_rq->last_load_update_tick = curr_jiffies;
/*
* In the regular NOHZ case,... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 206,063,025,132,798,820,000,000,000,000,000,000,000 | 17 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
inline static int jas_int_asr(int x, int n)
{
// Ensure that the shift of a negative value appears to behave as a
// signed arithmetic shift.
assert(((-1) >> 1) == -1);
assert(n >= 0);
// The behavior is undefined when x is negative. */
// We tacitly assume the behavior is equivalent to a signed
// arithmetic ri... | 0 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 337,931,730,793,639,900,000,000,000,000,000,000,000 | 11 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
get_settable_routine_parameter()
{
return this;
} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 78,431,803,993,197,300,000,000,000,000,000,000,000 | 4 | 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... |
GF_Filter *gf_fs_new_filter(GF_FilterSession *fsess, const char *name, GF_Err *e)
{
GF_Filter *f;
char szRegName[25];
GF_FilterRegister *reg;
GF_SAFEALLOC(reg, GF_FilterRegister);
if (!reg) return NULL;
reg->flags = 0;
#ifndef GPAC_DISABLE_DOC
reg->author = "custom";
reg->description = "custom";
reg->help = ... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 66,550,695,877,242,210,000,000,000,000,000,000,000 | 26 | fixed crashes for very long path - cf #1908 |
static MagickBooleanType DrawStrokePolygon(Image *image,
const DrawInfo *draw_info,const PrimitiveInfo *primitive_info,
ExceptionInfo *exception)
{
DrawInfo
*clone_info;
MagickBooleanType
closed_path;
MagickStatusType
status;
PrimitiveInfo
*stroke_polygon;
const PrimitiveInfo
*p,
... | 0 | [] | ImageMagick | f4cdb3f3aab28273960ffacf1d356312b56ffd27 | 333,151,601,451,784,540,000,000,000,000,000,000,000 | 65 | https://github.com/ImageMagick/ImageMagick/issues/3338 |
static inline int skb_header_unclone(struct sk_buff *skb, gfp_t pri)
{
might_sleep_if(gfpflags_allow_blocking(pri));
if (skb_header_cloned(skb))
return pskb_expand_head(skb, 0, 0, pri);
return 0; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 27,418,127,604,136,774,000,000,000,000,000,000,000 | 9 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
STACK_OF(SSL_CIPHER) *srvr)
{
SSL_CIPHER *c,*ret=NULL;
STACK_OF(SSL_CIPHER) *prio, *allow;
int i,j,ok;
CERT *cert;
unsigned long alg,mask,emask;
/* Let's see which ciphers we can support */
cert=s->cert;
#if 0
/* Do not set the compare... | 0 | [
"CWE-310"
] | openssl | c6a876473cbff0fd323c8abcaace98ee2d21863d | 12,222,097,951,720,854,000,000,000,000,000,000,000 | 103 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
static gboolean avrcp_list_items_rsp(struct avctp *conn, uint8_t *operands,
size_t operand_count, void *user_data)
{
struct avrcp_browsing_header *pdu = (void *) operands;
struct avrcp *session = user_data;
struct avrcp_player *player = session->controller->player;
struct pending_list_items *p = player->p;
ui... | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 300,010,431,588,159,940,000,000,000,000,000,000,000 | 83 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
g_socket_client_get_tls_validation_flags (GSocketClient *client)
{
return client->priv->tls_validation_flags;
} | 0 | [
"CWE-754"
] | glib | d553d92d6e9f53cbe5a34166fcb919ba652c6a8e | 19,770,039,877,445,783,000,000,000,000,000,000,000 | 4 | gsocketclient: Fix criticals
This ensures the parent GTask is kept alive as long as an enumeration
is running and trying to connect.
Closes #1646
Closes #1649 |
static __inline__ int scm_check_creds(struct ucred *creds)
{
if ((creds->pid == task_tgid_vnr(current) || capable(CAP_SYS_ADMIN)) &&
((creds->uid == current->uid || creds->uid == current->euid ||
creds->uid == current->suid) || capable(CAP_SETUID)) &&
((creds->gid == current->gid || creds->gid == curr... | 0 | [] | linux-2.6 | f8d570a4745835f2238a33b537218a1bb03fc671 | 70,805,166,560,560,540,000,000,000,000,000,000,000 | 11 | net: Fix recursive descent in __scm_destroy().
__scm_destroy() walks the list of file descriptors in the scm_fp_list
pointed to by the scm_cookie argument.
Those, in turn, can close sockets and invoke __scm_destroy() again.
There is nothing which limits how deeply this can occur.
The idea for how to fix this is fro... |
static int ud_interception(struct kvm_vcpu *vcpu)
{
return handle_ud(vcpu);
} | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 19,489,476,778,565,370,000,000,000,000,000,000,000 | 4 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
static int exprIsConst(Expr *p, int initFlag, int iCur){
Walker w;
w.eCode = initFlag;
w.xExprCallback = exprNodeIsConstant;
w.xSelectCallback = sqlite3SelectWalkFail;
#ifdef SQLITE_DEBUG
w.xSelectCallback2 = sqlite3SelectWalkAssert2;
#endif
w.u.iCur = iCur;
sqlite3WalkExpr(&w, p);
return w.eCode;
} | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 164,879,529,344,470,940,000,000,000,000,000,000,000 | 12 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
static int pio_copy_data(struct kvm_vcpu *vcpu)
{
void *p = vcpu->arch.pio_data;
gva_t q = vcpu->arch.pio.guest_gva;
unsigned bytes;
int ret;
bytes = vcpu->arch.pio.size * vcpu->arch.pio.cur_count;
if (vcpu->arch.pio.in)
ret = kvm_write_guest_virt(q, p, bytes, vcpu);
else
ret = kvm_read_guest_virt(q, p, byt... | 0 | [
"CWE-476"
] | linux-2.6 | 59839dfff5eabca01cc4e20b45797a60a80af8cb | 76,448,913,610,965,350,000,000,000,000,000,000,000 | 14 | KVM: x86: check for cr3 validity in ioctl_set_sregs
Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:
"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries... |
jas_image_t *bmp_decode(jas_stream_t *in, char *optstr)
{
jas_image_t *image;
bmp_hdr_t hdr;
bmp_info_t *info;
uint_fast16_t cmptno;
jas_image_cmptparm_t cmptparms[3];
jas_image_cmptparm_t *cmptparm;
uint_fast16_t numcmpts;
long n;
image = 0;
info = 0;
if (optstr) {
jas_eprintf("warning: ignoring BMP dec... | 1 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 78,186,026,366,988,370,000,000,000,000,000,000,000 | 140 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
make_dos_time(uint hour, uint min, uint sec)
{
/* note the seconds are multiplied by 2 */
return (hour << 11 | min << 5 | sec >> 1);
} | 0 | [] | ghostpdl | 94d8955cb7725eb5f3557ddc02310c76124fdd1a | 169,083,352,822,646,620,000,000,000,000,000,000,000 | 5 | 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... |
int emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq)
{
int rc;
invalidate_registers(ctxt);
rc = __emulate_int_real(ctxt, irq);
if (rc == X86EMUL_CONTINUE)
writeback_registers(ctxt);
return rc;
} | 0 | [] | kvm | d1442d85cc30ea75f7d399474ca738e0bc96f715 | 88,917,120,243,227,760,000,000,000,000,000,000,000 | 10 | KVM: x86: Handle errors when RIP is set during far jumps
Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not
handle this case, and may result in failed vm-entry once the assignment is
done. The tricky part of doing so is that loading the new CS affects the
VMCS/VMCB state, so if we fail during... |
static int v9fs_xattr_set_acl(const struct xattr_handler *handler,
struct dentry *dentry, struct inode *inode,
const char *name, const void *value,
size_t size, int flags)
{
int retval;
struct posix_acl *acl;
struct v9fs_session_info *v9ses;
v9ses = v9fs_dentry2v9ses(dentry);
/*
* set... | 1 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 198,783,126,657,039,900,000,000,000,000,000,000,000 | 82 | posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't cl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.