func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
bool ContentSettingsObserver::AllowScriptFromSource(
bool enabled_per_settings,
const blink::WebURL& script_url) {
if (IsWhitelistedForContentSettings())
return true;
bool allow = enabled_per_settings;
GURL secondary_url(script_url);
if (content_settings_manager_->content_settings()) {
allow =
... | 0 | [
"CWE-20",
"CWE-200"
] | muon | c18663aa171c6cdf03da3e8c70df8663645b97c4 | 178,503,114,112,066,560,000,000,000,000,000,000,000 | 22 | Issue: 15232 AllowScript should use atom::ContentSettingsManager like other Allow* methods in the observer |
void mysql_parse(THD *thd, char *rawbuf, uint length,
Parser_state *parser_state,
bool is_com_multi,
bool is_next_command)
{
DBUG_ENTER("mysql_parse");
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
/*
Warning.
The purpose of query_cache_send_... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 170,966,274,807,066,350,000,000,000,000,000,000,000 | 129 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
static void hugetlb_register_all_nodes(void) { } | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 152,133,326,265,723,540,000,000,000,000,000,000,000 | 1 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
bool test_r_str_word_count(void) {
mu_assert_eq (r_str_word_count ("let's test\nradare2 \t libraries!"), 4,
"words in a string");
mu_end;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 55,202,539,759,861,200,000,000,000,000,000,000,000 | 5 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
uECC_VLI_API void uECC_vli_square(uECC_word_t *result,
const uECC_word_t *left,
wordcount_t num_words) {
uECC_word_t r0 = 0;
uECC_word_t r1 = 0;
uECC_word_t r2 = 0;
wordcount_t i, k;
for (k = 0; k < num_words * 2 - 1; ++k) {
... | 0 | [
"CWE-415"
] | micro-ecc | 1b5f5cea5145c96dd8791b9b2c41424fc74c2172 | 23,591,504,749,828,050,000,000,000,000,000,000,000 | 26 | Fix for #168 |
static int i40e_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
void *cb_priv)
{
struct i40e_netdev_priv *np = cb_priv;
if (!tc_cls_can_offload_and_chain0(np->vsi->netdev, type_data))
return -EOPNOTSUPP;
switch (type) {
case TC_SETUP_CLSFLOWER:
return i40e_setup_tc_cls_flower(np, type_data);... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 177,817,970,162,467,630,000,000,000,000,000,000,000 | 16 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
sf_set_chunk (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info)
{ SF_PRIVATE *psf ;
VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
if (chunk_info == NULL || chunk_info->data == NULL)
return SFE_BAD_CHUNK_PTR ;
if (psf->set_chunk)
return psf->set_chunk (psf, chunk_info) ;
return SFE_BAD_CHUNK_FORMAT... | 0 | [
"CWE-119",
"CWE-787"
] | libsndfile | 708e996c87c5fae77b104ccfeb8f6db784c32074 | 259,890,267,982,073,560,000,000,000,000,000,000,000 | 13 | src/ : Move to a variable length header buffer
Previously, the `psf->header` buffer was a fixed length specified by
`SF_HEADER_LEN` which was set to `12292`. This was problematic for
two reasons; this value was un-necessarily large for the majority
of files and too small for some others.
Now the size of the header bu... |
static u16 frag_get_pending_idx(skb_frag_t *frag)
{
return (u16)frag->page_offset;
} | 0 | [
"CWE-399"
] | net-next | e9d8b2c2968499c1f96563e6522c56958d5a1d0d | 71,572,060,091,056,140,000,000,000,000,000,000,000 | 4 | xen-netback: disable rogue vif in kthread context
When netback discovers frontend is sending malformed packet it will
disables the interface which serves that frontend.
However disabling a network interface involving taking a mutex which
cannot be done in softirq context, so we need to defer this process to
kthread c... |
void qemu_chr_be_event(CharDriverState *s, int event)
{
/* Keep track if the char device is open */
switch (event) {
case CHR_EVENT_OPENED:
s->be_open = 1;
break;
case CHR_EVENT_CLOSED:
s->be_open = 0;
break;
}
if (!s->chr_event)
r... | 1 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 292,097,660,542,612,630,000,000,000,000,000,000,000 | 16 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
{
return 1;
} | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 272,970,020,442,031,640,000,000,000,000,000,000,000 | 4 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
mlx5_rx_queue_count(void *rx_queue)
{
struct mlx5_rxq_data *rxq = rx_queue;
struct rte_eth_dev *dev;
if (!rxq) {
rte_errno = EINVAL;
return -rte_errno;
}
dev = &rte_eth_devices[rxq->port_id];
if (dev->rx_pkt_burst == NULL ||
dev->rx_pkt_burst == rte_eth_pkt_burst_dummy) {
rte_errno = ENOTSUP;
retu... | 0 | [] | dpdk | 60b254e3923d007bcadbb8d410f95ad89a2f13fa | 289,303,697,789,857,450,000,000,000,000,000,000,000 | 20 | net/mlx5: fix Rx queue recovery mechanism
The local variables are getting inconsistent in data receiving routines
after queue error recovery.
Receive queue consumer index is getting wrong, need to reset one to the
size of the queue (as RQ was fully replenished in recovery procedure).
In MPRQ case, also the local cons... |
err_badarraysub (s)
const char *s;
{
report_error ("%s: %s", s, _(bash_badsub_errmsg));
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 320,257,581,890,753,470,000,000,000,000,000,000,000 | 5 | commit bash-20120224 snapshot |
int uwsgi_tmpfd() {
int fd = -1;
char *tmpdir = getenv("TMPDIR");
if (!tmpdir) {
tmpdir = "/tmp";
}
#ifdef O_TMPFILE
fd = open(tmpdir, O_TMPFILE | O_RDWR, S_IRUSR | S_IWUSR);
if (fd >= 0) {
return fd;
}
// fallback to old style
#endif
char *template = uwsgi_concat2(tmpdir, "/uwsgiXXXXXX");
fd = mkstemp(te... | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 224,110,607,461,329,670,000,000,000,000,000,000,000 | 19 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
{
unsigned char arg[128];
int ret = 0;
unsigned int copylen;
struct net *net = sock_net(sk);
struct netns_ipvs *ipvs = net_ipvs(net);
BUG_ON(!net);
if (!capable(CAP_NET_ADMIN))
return -EPERM;
if (cmd < IP_VS_BASE_CTL || cmd > IP_VS_SO_G... | 1 | [
"CWE-200"
] | linux | 2d8a041b7bfe1097af21441cb77d6af95f4f4680 | 316,828,511,940,653,720,000,000,000,000,000,000,000 | 159 | ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing... |
static inline struct ppp_net *ppp_pernet(struct net *net)
{
BUG_ON(!net);
return net_generic(net, ppp_net_id);
} | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 72,591,009,496,703,910,000,000,000,000,000,000,000 | 6 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
static void nfs4_delegreturn_prepare(struct rpc_task *task, void *data)
{
struct nfs4_delegreturndata *d_data;
d_data = (struct nfs4_delegreturndata *)data;
if (nfs4_setup_sequence(d_data->res.server,
&d_data->args.seq_args,
&d_data->res.seq_res, 1, task))
return;
rpc_call_start(task);
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | bf118a342f10dafe44b14451a1392c3254629a1f | 113,104,465,775,238,370,000,000,000,000,000,000,000 | 12 | 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... |
Http::Stream::getTail() const
{
if (http->client_stream.tail)
return static_cast<clientStreamNode *>(http->client_stream.tail->data);
return nullptr;
} | 0 | [
"CWE-20"
] | squid | 6c9c44d0e9cf7b72bb233360c5308aa063af3d69 | 62,661,362,382,849,690,000,000,000,000,000,000,000 | 7 | Handle more partial responses (#791) |
static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh,
struct nlattr **attrs)
{
struct xfrm_userpolicy_id *pi = nlmsg_data(nlh);
struct xfrm_migrate m[XFRM_MAX_DEPTH];
struct xfrm_kmaddress km, *kmp;
u8 type;
int err;
int n = 0;
struct net *net = sock_net(skb->sk);
if (attrs[XFRMA_MIGRATE]... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 305,121,519,853,441,100,000,000,000,000,000,000,000 | 31 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
inline SegmentBuilder::SegmentBuilder(BuilderArena* arena, SegmentId id, decltype(nullptr),
ReadLimiter* readLimiter)
: SegmentReader(arena, id, nullptr, readLimiter), pos(nullptr), readOnly(false) {} | 0 | [
"CWE-400",
"CWE-703"
] | capnproto | 104870608fde3c698483fdef6b97f093fc15685d | 78,442,074,655,760,370,000,000,000,000,000,000,000 | 3 | SECURITY: CPU usage amplification attack.
Details: https://github.com/sandstorm-io/capnproto/tree/master/security-advisories/2014-03-02-0-all-cpu-amplification.md |
aclequal(const Acl *left_acl, const Acl *right_acl)
{
/* Check for cases where one or both are empty/null */
if (left_acl == NULL || ACL_NUM(left_acl) == 0)
{
if (right_acl == NULL || ACL_NUM(right_acl) == 0)
return true;
else
return false;
}
else
{
if (right_acl == NULL || ACL_NUM(right_acl) == 0)
... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 5,584,933,187,140,242,000,000,000,000,000,000,000 | 26 | Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role. Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members. Plug that hole by recognizing tha... |
static inline int ext4_ext_space_block_idx(struct inode *inode, int check)
{
int size;
size = (inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header))
/ sizeof(struct ext4_extent_idx);
if (!check) {
#ifdef AGGRESSIVE_TEST
if (size > 5)
size = 5;
#endif
}
return size;
} | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 103,941,286,556,719,100,000,000,000,000,000,000,000 | 14 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
bash_directory_expansion (dirname)
char **dirname;
{
char *d, *nd;
d = savestring (*dirname);
if ((rl_directory_rewrite_hook) && (*rl_directory_rewrite_hook) (&d))
{
free (*dirname);
*dirname = d;
}
else if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d))
{
... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 302,109,223,983,626,940,000,000,000,000,000,000,000 | 25 | Bash-4.4 patch 7 |
Result parse_and_get_value(const char *s, T &val,
const char *path = nullptr) const {
auto n = strlen(s);
return parse_and_get_value(s, n, val, path);
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 228,737,725,003,005,630,000,000,000,000,000,000,000 | 5 | Fix #122 |
_XimProtoICFree(
Xic ic)
{
#ifdef XIM_CONNECTABLE
Xim im = (Xim)ic->core.im;
#endif
Xfree(ic->private.proto.preedit_font);
ic->private.proto.preedit_font = NULL;
Xfree(ic->private.proto.status_font);
ic->private.proto.status_font = NULL;
if (ic->private.proto.commit_info) {
_XimFre... | 0 | [
"CWE-190"
] | libx11 | 1a566c9e00e5f35c1f9e7f3d741a02e5170852b2 | 161,324,991,102,793,200,000,000,000,000,000,000,000 | 45 | Zero out buffers in functions
It looks like uninitialized stack or heap memory can leak
out via padding bytes.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> |
static struct page *follow_page_mask(struct vm_area_struct *vma,
unsigned long address, unsigned int flags,
struct follow_page_context *ctx)
{
pgd_t *pgd;
struct page *page;
struct mm_struct *mm = vma->vm_mm;
ctx->page_mask = 0;
/* make this handle hugepd */
page = follow_huge_addr(mm, address... | 0 | [
"CWE-362"
] | linux | 17839856fd588f4ab6b789f482ed3ffd7c403e1f | 138,038,117,421,965,490,000,000,000,000,000,000,000 | 39 | gup: document and work around "COW can break either way" issue
Doing a "get_user_pages()" on a copy-on-write page for reading can be
ambiguous: the page can be COW'ed at any time afterwards, and the
direction of a COW event isn't defined.
Yes, whoever writes to it will generally do the COW, but if the thread
that did... |
static void dump_table(char *table, char *db)
{
char ignore_flag;
char buf[200], table_buff[NAME_LEN+3];
DYNAMIC_STRING query_string;
char table_type[NAME_LEN];
char *result_table, table_buff2[NAME_LEN*2+3], *opt_quoted_table;
int error= 0;
ulong rownr, row_break, total_length, init_length;
uint... | 0 | [] | server | 5a43a31ee81bc181eeb5ef2bf0704befa6e0594d | 255,001,015,987,891,170,000,000,000,000,000,000,000 | 487 | mysqldump: comments and identifiers with new lines
don't let identifiers with new lines to break a comment |
static void
xmlXPathOptimizeExpression(xmlXPathCompExprPtr comp, xmlXPathStepOpPtr op)
{
/*
* Try to rewrite "descendant-or-self::node()/foo" to an optimized
* internal representation.
*/
if ((op->op == XPATH_OP_COLLECT /* 11 */) &&
(op->ch1 != -1) &&
(op->ch2 == -1 /* no predicate... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 217,837,651,282,250,930,000,000,000,000,000,000,000 | 62 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
static u32 inet6_addr_hash(const struct in6_addr *addr)
{
return hash_32(ipv6_addr_hash(addr), IN6_ADDR_HSIZE_SHIFT);
} | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 325,682,115,226,420,350,000,000,000,000,000,000,000 | 4 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
Item_string(const char *str,uint length,
CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE,
uint repertoire= MY_REPERTOIRE_UNICODE30)
: m_cs_specified(FALSE)
{
str_value.set_or_copy_aligned(str, length, cs);
collation.set(cs, dv, repertoire);
/*
We have to have ... | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 221,532,494,537,971,170,000,000,000,000,000,000,000 | 25 | 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... |
void tfra_box_del(GF_Box *s)
{
GF_TrackFragmentRandomAccessBox *ptr = (GF_TrackFragmentRandomAccessBox *)s;
if (ptr == NULL) return;
if (ptr->entries) gf_free(ptr->entries);
gf_free(ptr);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 245,377,163,133,931,460,000,000,000,000,000,000,000 | 7 | fixed #1587 |
void Run() override {
LegacyDepthwiseConvImpl(params_, input_shape_, input_data_, filter_shape_,
filter_data_, bias_shape_, bias_data_,
output_shape_, output_data_, thread_start_,
thread_end_, thread_dim_);
} | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 150,389,232,095,015,200,000,000,000,000,000,000,000 | 6 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
flac_byterate (SF_PRIVATE *psf)
{
if (psf->file.mode == SFM_READ)
return (psf->datalength * psf->sf.samplerate) / psf->sf.frames ;
return -1 ;
} /* flac_byterate */ | 0 | [
"CWE-119",
"CWE-369"
] | libsndfile | 60b234301adf258786d8b90be5c1d437fc8799e0 | 74,718,203,395,553,210,000,000,000,000,000,000,000 | 7 | src/flac.c: Improve error handling
Especially when dealing with corrupt or malicious files. |
void blk_queue_exit(struct request_queue *q)
{
percpu_ref_put(&q->q_usage_counter);
} | 0 | [
"CWE-416",
"CWE-703"
] | linux | 54648cf1ec2d7f4b6a71767799c45676a138ca24 | 332,192,131,525,386,300,000,000,000,000,000,000,000 | 4 | block: blk_init_allocated_queue() set q->fq as NULL in the fail case
We find the memory use-after-free issue in __blk_drain_queue()
on the kernel 4.14. After read the latest kernel 4.18-rc6 we
think it has the same problem.
Memory is allocated for q->fq in the blk_init_allocated_queue().
If the elevator init function... |
void fs_logger3(const char *msg1, const char *msg2, const char *msg3) {
FsMsg *ptr = newmsg();
char *str;
if (asprintf(&str, "%s %s %s", msg1, msg2, msg3) == -1)
errExit("asprintf");
ptr->msg = str;
insertmsg(ptr);
} | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 41,006,567,961,545,910,000,000,000,000,000,000,000 | 8 | fixing CVE-2022-31214 |
static int sctp_getsockopt_reconfig_supported(struct sock *sk, int len,
char __user *optval,
int __user *optlen)
{
struct sctp_assoc_value params;
struct sctp_association *asoc;
int retval = -EFAULT;
if (len < sizeof(params)) {
retval = -EINVAL;
goto out;
}
len = sizeof(params);
if (c... | 0 | [
"CWE-362"
] | linux | b166a20b07382b8bc1dcee2a448715c9c2c81b5b | 311,385,543,675,461,520,000,000,000,000,000,000,000 | 38 | net/sctp: fix race condition in sctp_destroy_sock
If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock
held and sp->do_auto_asconf is true, then an element is removed
from the auto_asconf_splist without any proper locking.
This can happen in the following functions:
1. In sctp_accept, if sctp_sock_m... |
static int peer_recv_fastpath_pdu(freerdp_peer* client, wStream* s)
{
rdpRdp* rdp;
UINT16 length;
rdpFastPath* fastpath;
rdp = client->context->rdp;
fastpath = rdp->fastpath;
//if (!fastpath_read_header_rdp(fastpath, s, &length))
// return -1;
fastpath_read_header_rdp(fastpath, s, &length);
if ((length == 0... | 0 | [
"CWE-476",
"CWE-125"
] | FreeRDP | 0773bb9303d24473fe1185d85a424dfe159aff53 | 126,922,071,983,515,260,000,000,000,000,000,000,000 | 27 | 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. |
static void stream_joined(h2_mplx *m, h2_stream *stream)
{
ap_assert(!h2_task_has_started(stream->task) || stream->task->worker_done);
h2_ihash_remove(m->shold, stream->id);
h2_ihash_add(m->spurge, stream);
} | 0 | [
"CWE-770"
] | mod_h2 | dd05d49abe0f67512ce9ed5ba422d7711effecfb | 90,333,003,621,582,180,000,000,000,000,000,000,000 | 7 | * fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now,
mpm event backport to 2.4.x up for vote).
* Fixes stream cleanup when connection throttling is in place.
* Counts stream resets by client on streams initiated by client as cause
for connection throttling.
* Header length checks are no... |
int32_t FontData::Size() const {
return std::min<int32_t>(array_->Size() - bound_offset_, bound_length_);
} | 0 | [
"CWE-703",
"CWE-189"
] | sfntly | de776d4ef06ca29c240de3444348894f032b03ff | 301,830,965,253,392,200,000,000,000,000,000,000,000 | 3 | Check for integer overflow in sfntly::FontData::Bound().
Also delete dead code and cleanup some nits.
This is cl/96914065. |
static int __tracing_resize_ring_buffer(struct trace_array *tr,
unsigned long size, int cpu)
{
int ret;
/*
* If kernel or user changes the size of the ring buffer
* we use the size that was given, and we can forget about
* expanding it later.
*/
ring_buffer_expanded = true;
/* May be called before bu... | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 233,167,316,620,955,700,000,000,000,000,000,000,000 | 65 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
static void php_session_save_current_state(TSRMLS_D) /* {{{ */
{
int ret = FAILURE;
IF_SESSION_VARS() {
if (PS(mod_data) || PS(mod_user_implemented)) {
char *val;
int vallen;
val = php_session_encode(&vallen TSRMLS_CC);
if (val) {
ret = PS(mod)->s_write(&PS(mod_data), PS(id), val, vallen TSRMLS_C... | 0 | [
"CWE-264"
] | php-src | 25e8fcc88fa20dc9d4c47184471003f436927cde | 106,188,437,858,444,740,000,000,000,000,000,000,000 | 31 | Strict session |
make_temptable_name_n(char *tempname, int n)
{
StringInfoData namebuf;
initStringInfo(&namebuf);
appendStringInfoString(&namebuf, tempname);
appendStringInfo(&namebuf, "_%i", n);
return namebuf.data;
} | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 191,583,674,862,294,600,000,000,000,000,000,000,000 | 9 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
static void scalar32_min_max_rsh(struct bpf_reg_state *dst_reg,
struct bpf_reg_state *src_reg)
{
struct tnum subreg = tnum_subreg(dst_reg->var_off);
u32 umax_val = src_reg->u32_max_value;
u32 umin_val = src_reg->u32_min_value;
/* BPF_RSH is an unsigned shift. If the value in dst_reg might
* be negative, th... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 86,538,237,346,265,060,000,000,000,000,000,000,000 | 31 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
static enum io_wq_cancel io_wqe_cancel_work(struct io_wqe *wqe,
struct io_wq_work *cwork)
{
struct io_wq_work *work;
unsigned long flags;
bool found = false;
cwork->flags |= IO_WQ_WORK_CANCEL;
/*
* First check pending list, if we're lucky we can just remove it
* from there. CANCEL_OK means that the ... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 147,088,504,930,065,650,000,000,000,000,000,000,000 | 41 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
xmlXPtrNewCollapsedRange(xmlNodePtr start) {
xmlXPathObjectPtr ret;
if (start == NULL)
return(NULL);
ret = xmlXPtrNewRangeInternal(start, -1, NULL, -1);
return(ret);
} | 0 | [
"CWE-119"
] | libxml2 | c1d1f7121194036608bf555f08d3062a36fd344b | 290,592,094,934,274,270,000,000,000,000,000,000,000 | 9 | Disallow namespace nodes in XPointer ranges
Namespace nodes must be copied to avoid use-after-free errors.
But they don't necessarily have a physical representation in a
document, so simply disallow them in XPointer ranges.
Found with afl-fuzz.
Fixes CVE-2016-4658. |
htmlParseElementInternal(htmlParserCtxtPtr ctxt) {
const xmlChar *name;
const htmlElemDesc * info;
htmlParserNodeInfo node_info = { 0, };
int failed;
if ((ctxt == NULL) || (ctxt->input == NULL)) {
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
"htmlParseElementInternal: context error\n", NULL, ... | 0 | [
"CWE-119"
] | libxml2 | e724879d964d774df9b7969fc846605aa1bac54c | 61,387,677,769,719,890,000,000,000,000,000,000,000 | 83 | Fix parsing short unclosed comment uninitialized access
For https://bugzilla.gnome.org/show_bug.cgi?id=746048
The HTML parser was too optimistic when processing comments and
didn't check for the end of the stream on the first 2 characters |
proto_tree_prime_with_hfid(proto_tree *tree _U_, const gint hfid)
{
header_field_info *hfinfo;
PROTO_REGISTRAR_GET_NTH(hfid, hfinfo);
/* this field is referenced by a filter so increase the refcount.
also increase the refcount for the parent, i.e the protocol.
*/
hfinfo->ref_type = HF_REF_TYPE_DIRECT;
/* onl... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 58,498,243,364,663,515,000,000,000,000,000,000,000 | 24 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static JSString *retrieve_geo_info(JSContext *cx, HandleObject self) {
RootedString address_str(cx, address(self));
if (!address_str) {
address_str = retrieve_address(cx, self);
if (!address_str)
return nullptr;
}
RootedString geo(cx, get_geo_info(cx, address_str));
if (!geo)
return nullptr... | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 225,829,105,531,291,720,000,000,000,000,000,000,000 | 15 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
explicit SparseSegmentReductionSqrtNOp(OpKernelConstruction* context)
: SparseSegmentReductionOpBase<Device, T>(
context, false /*is_mean*/, true /*is_sqrtn*/,
false /* has_num_segments */, T(0) /* default_value */) {} | 0 | [
"CWE-703",
"CWE-681",
"CWE-787"
] | tensorflow | db4f9717c41bccc3ce10099ab61996b246099892 | 329,128,234,610,526,640,000,000,000,000,000,000,000 | 4 | Fix heap buffer overflow in UnsortedSegmentSum.
When Index=int32, data_size and num_segments were truncated from int64 to int32. This truncation can produce negative numbers, which causes UnsortedSegmentFunctor to access out of bounds memory.
Also:
- Switches some indexing calculations to int64 to avoid signed intege... |
static uint64_t pxa2xx_mm_read(void *opaque, hwaddr addr,
unsigned size)
{
PXA2xxState *s = (PXA2xxState *) opaque;
switch (addr) {
case MDCNFG ... SA1110:
if ((addr & 3) == 0)
return s->mm_regs[addr >> 2];
default:
printf("%s: Bad register " ... | 0 | [
"CWE-119"
] | qemu | caa881abe0e01f9931125a0977ec33c5343e4aa7 | 242,138,433,778,856,900,000,000,000,000,000,000,000 | 16 | pxa2xx: avoid buffer overrun on incoming migration
CVE-2013-4533
s->rx_level is read from the wire and used to determine how many bytes
to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the
length of s->rx_fifo[] the buffer can be overrun with arbitrary data
from the wire.
Fix this by validating rx_leve... |
int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,
const union ib_gid *dgid,
u8 *dmac, const struct ib_gid_attr *sgid_attr,
int *hoplimit)
{
struct rdma_dev_addr dev_addr;
struct resolve_cb_context ctx;
union {
struct sockaddr_in _sockaddr_in;
struct sockaddr_in6 _sockaddr_in6;
} sgid_ad... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 3,444,094,511,144,182,000,000,000,000,000,000,000 | 37 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
TEST_F(QueryPlannerTest, ExplodeForSortWorksWithShardingFilter) {
params.options = QueryPlannerParams::NO_TABLE_SCAN;
params.options |= QueryPlannerParams::INCLUDE_SHARD_FILTER;
params.shardKey = BSON("c" << 1);
addIndex(BSON("a" << 1 << "b" << 1));
runQuerySortProj(fromjson("{a: {$in: [1, 3]}}"), ... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 334,860,856,459,779,800,000,000,000,000,000,000,000 | 16 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
bool controller::trylock_reload_mutex() {
if (reload_mutex.try_lock()) {
LOG(level::DEBUG, "controller::trylock_reload_mutex succeeded");
return true;
}
LOG(level::DEBUG, "controller::trylock_reload_mutex failed");
return false;
} | 0 | [
"CWE-943",
"CWE-787"
] | newsbeuter | 96e9506ae9e252c548665152d1b8968297128307 | 248,858,493,661,823,030,000,000,000,000,000,000,000 | 8 | Sanitize inputs to bookmark-cmd (#591)
Newsbeuter didn't properly shell-escape the arguments passed to
bookmarking command, which allows a remote attacker to perform remote
code execution by crafting an RSS item whose title and/or URL contain
something interpretable by the shell (most notably subshell
invocations.)
T... |
u_int32_t ndpi_bytestream_to_ipv4(const u_int8_t *str, u_int16_t max_chars_to_read, u_int16_t *bytes_read) {
u_int32_t val;
u_int16_t read = 0;
u_int16_t oldread;
u_int32_t c;
/* ip address must be X.X.X.X with each X between 0 and 255 */
oldread = read;
c = ndpi_bytestream_to_number(str, max_chars_to_re... | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 128,995,616,338,939,000,000,000,000,000,000,000,000 | 39 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
gen_k( gcry_mpi_t p, int small_k )
{
gcry_mpi_t k = mpi_alloc_secure( 0 );
gcry_mpi_t temp = mpi_alloc( mpi_get_nlimbs(p) );
gcry_mpi_t p_1 = mpi_copy(p);
unsigned int orig_nbits = mpi_get_nbits(p);
unsigned int nbits, nbytes;
char *rndbuf = NULL;
if (small_k)
{
/* Using a k much lesser than p ... | 0 | [
"CWE-200"
] | libgcrypt | 35cd81f134c0da4e7e6fcfe40d270ee1251f52c2 | 298,415,309,935,501,400,000,000,000,000,000,000,000 | 76 | cipher: Use ciphertext blinding for Elgamal decryption.
* cipher/elgamal.c (USE_BLINDING): New.
(decrypt): Rewrite to use ciphertext blinding.
--
CVE-id: CVE-2014-3591
As a countermeasure to a new side-channel attacks on sliding windows
exponentiation we blind the ciphertext for Elgamal decryption. This
is similar ... |
inline int MatchingElementsSize(const RuntimeShape& shape,
const RuntimeShape& check_shape_0) {
const int size_1 = shape.FlatSize();
const int size_2 = check_shape_0.FlatSize();
TFLITE_CHECK_EQ(size_1, size_2);
return size_1;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 8ee24e7949a203d234489f9da2c5bf45a7d5157d | 261,286,778,320,997,500,000,000,000,000,000,000,000 | 7 | [tflite] Ensure `MatchingDim` does not allow buffer overflow.
We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ... |
static int dump_tablespaces(char* ts_where)
{
MYSQL_ROW row;
MYSQL_RES *tableres;
char buf[FN_REFLEN];
DYNAMIC_STRING sqlbuf;
int first= 0;
/*
The following are used for parsing the EXTRA field
*/
char extra_format[]= "UNDO_BUFFER_SIZE=";
char *ubs;
char *endsemi;
DBUG_ENTER("dump_tablespaces"... | 1 | [] | server | 5a43a31ee81bc181eeb5ef2bf0704befa6e0594d | 244,471,294,100,279,140,000,000,000,000,000,000,000 | 184 | mysqldump: comments and identifiers with new lines
don't let identifiers with new lines to break a comment |
int tls1_process_sigalgs(SSL *s)
{
size_t i;
uint32_t *pvalid = s->s3.tmp.valid_flags;
if (!tls1_set_shared_sigalgs(s))
return 0;
for (i = 0; i < SSL_PKEY_NUM; i++)
pvalid[i] = 0;
for (i = 0; i < s->shared_sigalgslen; i++) {
const SIGALG_LOOKUP *sigptr = s->shared_sigalgs[... | 0 | [
"CWE-476"
] | openssl | 5235ef44b93306a14d0b6c695b13c64b16e1fdec | 114,950,492,753,863,620,000,000,000,000,000,000,000 | 24 | Fix SSL_check_chain()
The function SSL_check_chain() can be used by applications to check that
a cert and chain is compatible with the negotiated parameters. This could
be useful (for example) from the certificate callback. Unfortunately this
function was applying TLSv1.2 sig algs rules and did not work correctly if
T... |
md_is_dec_entity_contents(MD_CTX* ctx, const CHAR* text, OFF beg, OFF max_end, OFF* p_end)
{
OFF off = beg;
MD_UNUSED(ctx);
while(off < max_end && ISDIGIT_(text[off]) && off - beg <= 8)
off++;
if(1 <= off - beg && off - beg <= 7) {
*p_end = off;
return TRUE;
} else {
... | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 237,015,900,437,981,700,000,000,000,000,000,000,000 | 15 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
static void io_queue_iowq(struct io_kiocb *req, bool *dont_use)
{
struct io_kiocb *link = io_prep_linked_timeout(req);
struct io_uring_task *tctx = req->task->io_uring;
BUG_ON(!tctx);
BUG_ON(!tctx->io_wq);
/* init ->work of the whole link before punting */
io_prep_async_link(req);
/*
* Not expected to happe... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 198,562,805,161,728,600,000,000,000,000,000,000,000 | 28 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
find_inlist_lock_noload(struct list_head *head, const char *name, int *error,
struct mutex *mutex)
{
struct {
struct list_head list;
char name[EBT_FUNCTION_MAXNAMELEN];
} *e;
mutex_lock(mutex);
list_for_each_entry(e, head, list) {
if (strcmp(e->name, name) == 0)
return e;
}
*error = -ENOENT;
mutex_u... | 0 | [
"CWE-787"
] | linux | b71812168571fa55e44cdd0254471331b9c4c4c6 | 186,810,449,846,641,070,000,000,000,000,000,000,000 | 17 | netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets
We need to make sure the offsets are not out of range of the
total size.
Also check that they are in ascending order.
The WARN_ON triggered by syzkaller (it sets panic_on_warn) is
changed to also bail out, no point in continuing parsing.
Briefly tested... |
void set_mysql_extended_error(MYSQL *mysql, int errcode,
const char *sqlstate,
const char *format, ...)
{
NET *net;
va_list args;
DBUG_ENTER("set_mysql_extended_error");
DBUG_PRINT("enter", ("error :%d '%s'", errcode, format));
DBUG_ASS... | 0 | [
"CWE-254"
] | mysql-server | 13380bf81f6bc20d39549f531f9acebdfb5a8c37 | 97,603,378,176,081,610,000,000,000,000,000,000,000 | 20 | Bug #22295186: CERTIFICATE VALIDATION BUG IN MYSQL MAY ALLOW MITM |
int bgp_packet_set_marker(struct stream *s, uint8_t type)
{
int i;
/* Fill in marker. */
for (i = 0; i < BGP_MARKER_SIZE; i++)
stream_putc(s, 0xff);
/* Dummy total length. This field is should be filled in later on. */
stream_putw(s, 0);
/* BGP packet type. */
stream_putc(s, type);
/* Return current strea... | 0 | [
"CWE-125"
] | frr | ff6db1027f8f36df657ff2e5ea167773752537ed | 144,652,716,484,750,780,000,000,000,000,000,000,000 | 17 | bgpd: Make sure hdr length is at a minimum of what is expected
Ensure that if the capability length specified is enough data.
Signed-off-by: Donald Sharp <sharpd@nvidia.com> |
static int nfs4_xdr_dec_open_confirm(struct rpc_rqst *rqstp, __be32 *p, struct nfs_open_confirmres *res)
{
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
status = decode_compound_hdr(&xdr, &hdr);
if (status)
... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 206,666,285,267,573,850,000,000,000,000,000,000,000 | 17 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data,
int alen)
{
int len = RTA_LENGTH(alen);
struct rtattr *rta;
if (NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len) > maxlen) {
fprintf(stderr,
"addattr_l ERROR: message exceeded bound of %d\n",
maxlen);
return -1;
}
rta = NLMSG_TAI... | 0 | [] | iproute2 | 8c50b728b226f6254251282697ce38a72639a6fc | 154,085,427,224,960,070,000,000,000,000,000,000,000 | 20 | libnetlink: fix use-after-free of message buf
In __rtnl_talk_iov() main loop, err is a pointer to memory in dynamically
allocated 'buf' that is used to store netlink messages. If netlink message
is an error message, buf is deallocated before returning with error code.
However, on return err->error code is checked one ... |
ews_handle_dl_expansion_param (ESoapParameter *subparam,
EwsAsyncData *async_data)
{
gboolean includes_last_item;
GSList *mailboxes = NULL;
gchar *prop;
subparam = e_soap_parameter_get_first_child_by_name (subparam, "DLExpansion");
prop = e_soap_parameter_get_property (subparam, "In... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 156,547,239,746,740,040,000,000,000,000,000,000,000 | 31 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
void check_result()
{
const char* mess= "Result content mismatch\n";
DBUG_ENTER("check_result");
DBUG_ASSERT(result_file_name);
DBUG_PRINT("enter", ("result_file_name: %s", result_file_name));
switch (compare_files(log_file.file_name(), result_file_name)) {
case RESULT_OK:
break; /* ok */
case RESUL... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 218,154,099,018,723,600,000,000,000,000,000,000,000 | 51 | WL#9072: Backport WL#8785 to 5.5 |
PJ_DEF(pj_status_t) pjsip_endpt_send_response2( pjsip_endpoint *endpt,
pjsip_rx_data *rdata,
pjsip_tx_data *tdata,
void *token,
pjsip_send_callback cb)
{
pjsip_response_addr res_addr;
pj_status_t status;
status = pjsip_get_response_addr(tdata->pool, rdata, &res_addr);
... | 0 | [
"CWE-297",
"CWE-295"
] | pjproject | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | 53,025,625,882,217,170,000,000,000,000,000,000,000 | 18 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved |
bool Segment::MakeNewCluster(uint64_t frame_timestamp_ns) {
const int32_t new_size = cluster_list_size_ + 1;
if (new_size > cluster_list_capacity_) {
// Add more clusters.
const int32_t new_capacity =
(cluster_list_capacity_ <= 0) ? 1 : cluster_list_capacity_ * 2;
Cluster** const clusters =
... | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 257,326,426,350,171,700,000,000,000,000,000,000,000 | 74 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
static int read_channel_info (WavpackContext *wpc, WavpackMetadata *wpmd)
{
int bytecnt = wpmd->byte_length, shift = 0, mask_bits;
unsigned char *byteptr = (unsigned char *)wpmd->data;
uint32_t mask = 0;
if (!bytecnt || bytecnt > 7)
return FALSE;
if (!wpc->config.num_channels) {
/... | 0 | [
"CWE-125"
] | WavPack | bba5389dc598a92bdf2b297c3ea34620b6679b5b | 244,119,508,635,036,600,000,000,000,000,000,000,000 | 49 | issue #54: fix potential out-of-bounds heap read |
static inline struct pipe_inode_info *pipe_info(struct inode *inode)
{
if (S_ISFIFO(inode->i_mode))
return inode->i_pipe;
return NULL;
} | 0 | [
"CWE-94"
] | linux-2.6 | 8811930dc74a503415b35c4a79d14fb0b408a361 | 224,878,968,080,345,000,000,000,000,000,000,000,000 | 7 | splice: missing user pointer access verification
vmsplice_to_user() must always check the user pointer and length
with access_ok() before copying. Likewise, for the slow path of
copy_from_user_mmap_sem() we need to check that we may read from
the user region.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Wojc... |
static inline bool tcp_packet_delayed(const struct tcp_sock *tp)
{
return !tp->retrans_stamp ||
(tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr &&
before(tp->rx_opt.rcv_tsecr, tp->retrans_stamp));
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 100,291,419,142,531,130,000,000,000,000,000,000,000 | 6 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static void _launch_complete_wait(uint32_t job_id)
{
int i, j, empty;
time_t start = time(NULL);
struct timeval now;
struct timespec timeout;
slurm_mutex_lock(&job_state_mutex);
for (i = 0; ; i++) {
empty = -1;
for (j = 0; j < JOB_STATE_CNT; j++) {
if (job_id == active_job_id[j])
break;
if ((active... | 0 | [
"CWE-284"
] | slurm | 92362a92fffe60187df61f99ab11c249d44120ee | 275,816,006,971,511,230,000,000,000,000,000,000,000 | 45 | Fix security issue in _prolog_error().
Fix security issue caused by insecure file path handling triggered by
the failure of a Prolog script. To exploit this a user needs to
anticipate or cause the Prolog to fail for their job.
(This commit is slightly different from the fix to the 15.08 branch.)
CVE-2016-10030. |
static ssize_t poison_store(struct kmem_cache *s,
const char *buf, size_t length)
{
if (any_slab_objects(s))
return -EBUSY;
s->flags &= ~SLAB_POISON;
if (buf[0] == '1')
s->flags |= SLAB_POISON;
calculate_sizes(s, -1);
return length;
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 90,634,176,088,797,890,000,000,000,000,000,000,000 | 12 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
const char *SoundTouch::getVersionString()
{
static const char *_version = SOUNDTOUCH_VERSION;
return _version;
}
| 0 | [
"CWE-617"
] | soundtouch | 107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 | 263,246,546,411,402,220,000,000,000,000,000,000,000 | 6 | Replaced illegal-number-of-channel assertions with run-time exception |
static int stbi__pnm_isdigit(char c)
{
return c >= '0' && c <= '9';
} | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 8,812,306,820,655,075,000,000,000,000,000,000,000 | 4 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
static inline void dont_mount(struct dentry *dentry)
{
spin_lock(&dentry->d_lock);
dentry->d_flags |= DCACHE_CANT_MOUNT;
spin_unlock(&dentry->d_lock);
} | 0 | [
"CWE-284"
] | linux | 54d5ca871e72f2bb172ec9323497f01cd5091ec7 | 223,819,052,765,974,930,000,000,000,000,000,000,000 | 6 | vfs: add vfs_select_inode() helper
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org> # v4.2+ |
int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p,
int (*put_cb)(const SSL_CIPHER *, unsigned char *))
{
int i,j=0;
SSL_CIPHER *c;
unsigned char *q;
#ifndef OPENSSL_NO_KRB5
int nokrb5 = !kssl_tgt_is_available(s->kssl_ctx);
#endif /* OPENSSL_NO_KRB5 */
if (sk == NULL) return(0)... | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 128,787,056,286,316,400,000,000,000,000,000,000,000 | 48 | Add SRP support. |
f_term_start(typval_T *argvars, typval_T *rettv)
{
jobopt_T opt;
buf_T *buf;
init_job_options(&opt);
if (argvars[1].v_type != VAR_UNKNOWN
&& get_job_options(&argvars[1], &opt,
JO_TIMEOUT_ALL + JO_STOPONEXIT
+ JO_CALLBACK + JO_OUT_CALLBACK + JO_ERR_CALLBACK
+ JO_EXIT_CB + JO_CLOSE_CAL... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 52,687,427,876,013,180,000,000,000,000,000,000,000 | 23 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
static void brcmf_driver_register(struct work_struct *work)
{
#ifdef CONFIG_BRCMFMAC_SDIO
brcmf_sdio_register();
#endif
#ifdef CONFIG_BRCMFMAC_USB
brcmf_usb_register();
#endif
#ifdef CONFIG_BRCMFMAC_PCIE
brcmf_pcie_register();
#endif
} | 0 | [
"CWE-20"
] | linux | a4176ec356c73a46c07c181c6d04039fafa34a9f | 70,006,437,824,616,110,000,000,000,000,000,000,000 | 12 | brcmfmac: add subtype check for event handling in data path
For USB there is no separate channel being used to pass events
from firmware to the host driver and as such are passed over the
data path. In order to detect mock event messages an additional
check is needed on event subtype. This check is added conditionally... |
static struct snd_pcm *snd_pcm_get(struct snd_card *card, int device)
{
struct snd_pcm *pcm;
list_for_each_entry(pcm, &snd_pcm_devices, list) {
if (pcm->card == card && pcm->device == device)
return pcm;
}
return NULL;
} | 0 | [
"CWE-416"
] | linux | 362bca57f5d78220f8b5907b875961af9436e229 | 53,762,218,792,624,110,000,000,000,000,000,000,000 | 10 | ALSA: pcm: prevent UAF in snd_pcm_info
When the device descriptor is closed, the `substream->runtime` pointer
is freed. But another thread may be in the ioctl handler, case
SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which
calls snd_pcm_info() which accesses the now freed `substream->runtime`.
Note:... |
static int nntp_group_poll(struct NntpData *nntp_data, int update_stat)
{
char buf[LONG_STRING] = "";
anum_t count, first, last;
/* use GROUP command to poll newsgroup */
if (nntp_query(nntp_data, buf, sizeof(buf)) < 0)
return -1;
if (sscanf(buf, "211 " ANUM " " ANUM " " ANUM, &count, &first, &last) != 3... | 0 | [
"CWE-20"
] | neomutt | 9e927affe3a021175f354af5fa01d22657c20585 | 231,198,945,897,513,960,000,000,000,000,000,000,000 | 37 | Add alloc fail check in nntp_fetch_headers |
rb_glob_error(const char *path, VALUE a, const void *enc, int error)
{
int status;
struct glob_error_args args;
VALUE (*errfunc)(VALUE) = glob_func_error;
if (error == EACCES) {
errfunc = glob_func_warning;
}
args.path = path;
args.enc = enc;
args.error = error;
rb_protect(errfunc,... | 0 | [
"CWE-22"
] | ruby | bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8 | 224,049,127,146,874,780,000,000,000,000,000,000,000 | 15 | dir.c: check NUL bytes
* dir.c (GlobPathValue): should be used in rb_push_glob only.
other methods should use FilePathValue.
https://hackerone.com/reports/302338
* dir.c (rb_push_glob): expand GlobPathValue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
void __fastcall TCustomCommandOptionsDialog::DoHelp()
{
UnicodeString HelpPage;
if (!FCommand->OptionsPage.IsEmpty())
{
HelpPage = FCommand->OptionsPage;
}
else
{
HelpPage = FCommand->HomePage;
}
if (!HelpPage.IsEmpty())
{
OpenBrowser(HelpPage);
}
else
{
TCusto... | 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 308,235,208,837,516,170,000,000,000,000,000,000,000 | 21 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
MagickExport TokenInfo *AcquireTokenInfo(void)
{
TokenInfo
*token_info;
token_info=(TokenInfo *) AcquireMagickMemory(sizeof(*token_info));
if (token_info == (TokenInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
token_info->signature=MagickCoreSignature;
return(tok... | 0 | [
"CWE-125"
] | ImageMagick | 787f9dc99c8d186ae26ed53ddec54bd0a6f90852 | 258,713,727,810,531,200,000,000,000,000,000,000,000 | 11 | https://github.com/ImageMagick/ImageMagick/issues/539 |
static int smack_msg_msg_alloc_security(struct msg_msg *msg)
{
msg->security = current_security();
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 164,166,530,552,835,970,000,000,000,000,000,000,000 | 5 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
column_privilege_check(Oid tableoid, AttrNumber attnum,
Oid roleid, AclMode mode)
{
AclResult aclresult;
HeapTuple attTuple;
Form_pg_attribute attributeForm;
/*
* First check if we have the privilege at the table level. We check
* existence of the pg_class row before risking calling pg_class_aclcheck.... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 270,107,272,817,927,300,000,000,000,000,000,000,000 | 45 | Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role. Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members. Plug that hole by recognizing tha... |
static long ppc_del_hwdebug(struct task_struct *child, long data)
{
#ifdef CONFIG_HAVE_HW_BREAKPOINT
int ret = 0;
struct thread_struct *thread = &(child->thread);
struct perf_event *bp;
#endif /* CONFIG_HAVE_HW_BREAKPOINT */
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
int rc;
if (data <= 4)
rc = del_instruction_bp(child, ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c1fa0768a8713b135848f78fd43ffc208d8ded70 | 18,693,050,226,691,350,000,000,000,000,000,000,000 | 46 | powerpc/tm: Flush TM only if CPU has TM feature
Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump")
added code to access TM SPRs in flush_tmregs_to_thread(). However
flush_tmregs_to_thread() does not check if TM feature is available on
CPU before trying to access TM SPRs in order to copy live state to
th... |
unsigned readbuf(__G__ buf, size) /* return number of bytes read into buf */
__GDEF
char *buf;
register unsigned size;
{
register unsigned count;
unsigned n;
n = size;
while (size) {
if (G.incnt <= 0) {
if ((G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) == 0)
... | 0 | [
"CWE-400"
] | unzip | 41beb477c5744bc396fa1162ee0c14218ec12213 | 88,073,510,757,861,650,000,000,000,000,000,000,000 | 34 | Fix bug in undefer_input() that misplaced the input state. |
static void printer_reset_interface(struct printer_dev *dev)
{
unsigned long flags;
if (dev->interface < 0)
return;
DBG(dev, "%s\n", __func__);
if (dev->in_ep->desc)
usb_ep_disable(dev->in_ep);
if (dev->out_ep->desc)
usb_ep_disable(dev->out_ep);
spin_lock_irqsave(&dev->lock, flags);
dev->in_ep->desc =... | 0 | [
"CWE-416"
] | linux | e8d5f92b8d30bb4ade76494490c3c065e12411b1 | 161,249,777,138,159,100,000,000,000,000,000,000,000 | 21 | usb: gadget: function: printer: fix use-after-free in __lock_acquire
Fix this by increase object reference count.
BUG: KASAN: use-after-free in __lock_acquire+0x3fd4/0x4180
kernel/locking/lockdep.c:3831
Read of size 8 at addr ffff8880683b0018 by task syz-executor.0/3377
CPU: 1 PID: 3377 Comm: syz-executor.0 Not tain... |
pfm_resume_after_ovfl(pfm_context_t *ctx, unsigned long ovfl_regs, struct pt_regs *regs)
{
pfm_buffer_fmt_t *fmt = ctx->ctx_buf_fmt;
pfm_ovfl_ctrl_t rst_ctrl;
int state;
int ret = 0;
state = ctx->ctx_state;
/*
* Unlock sampling buffer and reset index atomically
* XXX: not really needed when blocking
*/
if... | 0 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 222,052,332,777,973,300,000,000,000,000,000,000,000 | 40 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
CaptureScope(const std::shared_ptr<Ope> &ope) : ope_(ope) {} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 231,507,115,018,096,940,000,000,000,000,000,000,000 | 1 | Fix #122 |
bmexec_trans (kwset_t kwset, char const *text, size_t size)
{
unsigned char const *d1;
char const *ep, *sp, *tp;
int d;
int len = kwset->mind;
char const *trans = kwset->trans;
if (len == 0)
return 0;
if (len > size)
return -1;
if (len == 1)
{
tp = memchr_kwset (text, size, kwset);
... | 1 | [
"CWE-119"
] | grep | 83a95bd8c8561875b948cadd417c653dbe7ef2e2 | 274,856,701,367,742,540,000,000,000,000,000,000,000 | 80 | grep -F: fix a heap buffer (read) overrun
grep's read buffer is often filled to its full size, except when
reading the final buffer of a file. In that case, the number of
bytes read may be far less than the size of the buffer. However, for
certain unusual pattern/text combinations, grep -F would mistakenly
examine b... |
CtPtr ProtocolV1::wait_connect_reply_auth() {
ldout(cct, 20) << __func__ << dendl;
ldout(cct, 10) << __func__
<< " reply.authorizer_len=" << connect_reply.authorizer_len
<< dendl;
ceph_assert(connect_reply.authorizer_len < 4096);
return READ(connect_reply.authorizer_len, han... | 0 | [
"CWE-294"
] | ceph | 6c14c2fb5650426285428dfe6ca1597e5ea1d07d | 57,268,835,902,551,625,000,000,000,000,000,000,000 | 11 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
void imap_parser_unref(struct imap_parser **_parser)
{
struct imap_parser *parser = *_parser;
*_parser = NULL;
i_assert(parser->refcount > 0);
if (--parser->refcount > 0)
return;
pool_unref(&parser->pool);
i_free(parser);
} | 0 | [
"CWE-787"
] | core | 85fcb895ca7f0bcb8ee72047fe0e1e78532ff90b | 43,090,077,192,716,010,000,000,000,000,000,000,000 | 13 | lib-imap: Don't accept strings with NULs
IMAP doesn't allow NULs except in binary literals. We'll still allow them
in regular literals as well, but just not in strings.
This fixes a bug with unescaping a string with NULs: str_unescape() could
have been called for memory that points outside the allocated string,
causi... |
can_bs(
int what) // BS_INDENT, BS_EOL, BS_START or BS_NOSTOP
{
#ifdef FEAT_JOB_CHANNEL
if (what == BS_START && bt_prompt(curbuf))
return FALSE;
#endif
switch (*p_bs)
{
case '3': return TRUE;
case '2': return (what != BS_NOSTOP);
case '1': return (what != BS_START);
case '0': return FALS... | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 127,495,149,210,520,490,000,000,000,000,000,000,000 | 16 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
xmlFreeNotationTableEntry(void *nota, const xmlChar *name ATTRIBUTE_UNUSED) {
xmlFreeNotation((xmlNotationPtr) nota);
} | 0 | [
"CWE-416"
] | libxml2 | 652dd12a858989b14eed4e84e453059cd3ba340e | 18,057,335,676,310,741,000,000,000,000,000,000,000 | 3 | [CVE-2022-23308] Use-after-free of ID and IDREF attributes
If a document is parsed with XML_PARSE_DTDVALID and without
XML_PARSE_NOENT, the value of ID attributes has to be normalized after
potentially expanding entities in xmlRemoveID. Otherwise, later calls
to xmlGetID can return a pointer to previously freed memory... |
rsvg_filter_primitive_image_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts)
{
const char *value;
RsvgFilterPrimitiveImage *filter;
filter = (RsvgFilterPrimitiveImage *) self;
filter->ctx = ctx;
if (rsvg_property_bag_size (atts)) {
if ((value = rsvg_property_bag_lookup ... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 104,170,230,719,184,930,000,000,000,000,000,000,000 | 29 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
static void setbrightness(struct gspca_dev *gspca_dev, s32 val)
{
struct sd *sd = (struct sd *) gspca_dev;
static const struct ov_i2c_regvals brit_7660[][7] = {
{{0x0f, 0x6a}, {0x24, 0x40}, {0x25, 0x2b}, {0x26, 0x90},
{0x27, 0xe0}, {0x28, 0xe0}, {0x2c, 0xe0}},
{{0x0f, 0x6a}, {0x24, 0x50}, {0x25, 0x40}, {0x26, ... | 0 | [
"CWE-476"
] | linux | 998912346c0da53a6dbb71fab3a138586b596b30 | 313,747,308,863,968,130,000,000,000,000,000,000,000 | 46 | media: ov519: add missing endpoint sanity checks
Make sure to check that we have at least one endpoint before accessing
the endpoint array to avoid dereferencing a NULL-pointer on stream
start.
Note that these sanity checks are not redundant as the driver is mixing
looking up altsettings by index and by number, which... |
static int alloc_loaded_vmcs(struct loaded_vmcs *loaded_vmcs)
{
loaded_vmcs->vmcs = alloc_vmcs();
if (!loaded_vmcs->vmcs)
return -ENOMEM;
loaded_vmcs->shadow_vmcs = NULL;
loaded_vmcs_init(loaded_vmcs);
if (cpu_has_vmx_msr_bitmap()) {
loaded_vmcs->msr_bitmap = (unsigned long *)__get_free_page(GFP_KERNEL);
i... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 191,168,859,952,045,170,000,000,000,000,000,000,000 | 29 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
xmlGetProp(const xmlNode *node, const xmlChar *name) {
xmlAttrPtr prop;
prop = xmlHasProp(node, name);
if (prop == NULL)
return(NULL);
return(xmlGetPropNodeValueInternal(prop));
} | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 128,794,614,224,020,350,000,000,000,000,000,000,000 | 8 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.