CVE ID
stringlengths 13
43
⌀ | CVE Page
stringlengths 45
48
⌀ | CWE ID
stringclasses 90
values | codeLink
stringlengths 46
139
| commit_id
stringlengths 6
81
| commit_message
stringlengths 3
13.3k
⌀ | func_after
stringlengths 14
241k
| func_before
stringlengths 14
241k
| lang
stringclasses 3
values | project
stringclasses 309
values | vul
int8 0
1
|
---|---|---|---|---|---|---|---|---|---|---|
CVE-2016-1674
|
https://www.cvedetails.com/cve/CVE-2016-1674/
| null |
https://github.com/chromium/chromium/commit/14ff9d0cded8ae8032ef027d1f33c6666a695019
|
14ff9d0cded8ae8032ef027d1f33c6666a695019
|
[Extensions] Add more bindings access checks
BUG=598165
Review URL: https://codereview.chromium.org/1854983002
Cr-Commit-Position: refs/heads/master@{#385282}
|
void AutomationInternalCustomBindings::IsInteractPermitted(
const v8::FunctionCallbackInfo<v8::Value>& args) {
const Extension* extension = context()->extension();
CHECK(extension);
const AutomationInfo* automation_info = AutomationInfo::Get(extension);
CHECK(automation_info);
args.GetReturnValue().Set(
v8::Boolean::New(GetIsolate(), automation_info->interact));
}
|
void AutomationInternalCustomBindings::IsInteractPermitted(
const v8::FunctionCallbackInfo<v8::Value>& args) {
const Extension* extension = context()->extension();
CHECK(extension);
const AutomationInfo* automation_info = AutomationInfo::Get(extension);
CHECK(automation_info);
args.GetReturnValue().Set(
v8::Boolean::New(GetIsolate(), automation_info->interact));
}
|
C
|
Chrome
| 0 |
CVE-2015-8374
|
https://www.cvedetails.com/cve/CVE-2015-8374/
|
CWE-200
|
https://github.com/torvalds/linux/commit/0305cd5f7fca85dae392b9ba85b116896eb7c1c7
|
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
|
Btrfs: fix truncation of compressed and inlined extents
When truncating a file to a smaller size which consists of an inline
extent that is compressed, we did not discard (or made unusable) the
data between the new file size and the old file size, wasting metadata
space and allowing for the truncated data to be leaked and the data
corruption/loss mentioned below.
We were also not correctly decrementing the number of bytes used by the
inode, we were setting it to zero, giving a wrong report for callers of
the stat(2) syscall. The fsck tool also reported an error about a mismatch
between the nbytes of the file versus the real space used by the file.
Now because we weren't discarding the truncated region of the file, it
was possible for a caller of the clone ioctl to actually read the data
that was truncated, allowing for a security breach without requiring root
access to the system, using only standard filesystem operations. The
scenario is the following:
1) User A creates a file which consists of an inline and compressed
extent with a size of 2000 bytes - the file is not accessible to
any other users (no read, write or execution permission for anyone
else);
2) The user truncates the file to a size of 1000 bytes;
3) User A makes the file world readable;
4) User B creates a file consisting of an inline extent of 2000 bytes;
5) User B issues a clone operation from user A's file into its own
file (using a length argument of 0, clone the whole range);
6) User B now gets to see the 1000 bytes that user A truncated from
its file before it made its file world readbale. User B also lost
the bytes in the range [1000, 2000[ bytes from its own file, but
that might be ok if his/her intention was reading stale data from
user A that was never supposed to be public.
Note that this contrasts with the case where we truncate a file from 2000
bytes to 1000 bytes and then truncate it back from 1000 to 2000 bytes. In
this case reading any byte from the range [1000, 2000[ will return a value
of 0x00, instead of the original data.
This problem exists since the clone ioctl was added and happens both with
and without my recent data loss and file corruption fixes for the clone
ioctl (patch "Btrfs: fix file corruption and data loss after cloning
inline extents").
So fix this by truncating the compressed inline extents as we do for the
non-compressed case, which involves decompressing, if the data isn't already
in the page cache, compressing the truncated version of the extent, writing
the compressed content into the inline extent and then truncate it.
The following test case for fstests reproduces the problem. In order for
the test to pass both this fix and my previous fix for the clone ioctl
that forbids cloning a smaller inline extent into a larger one,
which is titled "Btrfs: fix file corruption and data loss after cloning
inline extents", are needed. Without that other fix the test fails in a
different way that does not leak the truncated data, instead part of
destination file gets replaced with zeroes (because the destination file
has a larger inline extent than the source).
seq=`basename $0`
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
tmp=/tmp/$$
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
rm -f $tmp.*
}
# get standard environment, filters and checks
. ./common/rc
. ./common/filter
# real QA test starts here
_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_require_cloner
rm -f $seqres.full
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount "-o compress"
# Create our test files. File foo is going to be the source of a clone operation
# and consists of a single inline extent with an uncompressed size of 512 bytes,
# while file bar consists of a single inline extent with an uncompressed size of
# 256 bytes. For our test's purpose, it's important that file bar has an inline
# extent with a size smaller than foo's inline extent.
$XFS_IO_PROG -f -c "pwrite -S 0xa1 0 128" \
-c "pwrite -S 0x2a 128 384" \
$SCRATCH_MNT/foo | _filter_xfs_io
$XFS_IO_PROG -f -c "pwrite -S 0xbb 0 256" $SCRATCH_MNT/bar | _filter_xfs_io
# Now durably persist all metadata and data. We do this to make sure that we get
# on disk an inline extent with a size of 512 bytes for file foo.
sync
# Now truncate our file foo to a smaller size. Because it consists of a
# compressed and inline extent, btrfs did not shrink the inline extent to the
# new size (if the extent was not compressed, btrfs would shrink it to 128
# bytes), it only updates the inode's i_size to 128 bytes.
$XFS_IO_PROG -c "truncate 128" $SCRATCH_MNT/foo
# Now clone foo's inline extent into bar.
# This clone operation should fail with errno EOPNOTSUPP because the source
# file consists only of an inline extent and the file's size is smaller than
# the inline extent of the destination (128 bytes < 256 bytes). However the
# clone ioctl was not prepared to deal with a file that has a size smaller
# than the size of its inline extent (something that happens only for compressed
# inline extents), resulting in copying the full inline extent from the source
# file into the destination file.
#
# Note that btrfs' clone operation for inline extents consists of removing the
# inline extent from the destination inode and copy the inline extent from the
# source inode into the destination inode, meaning that if the destination
# inode's inline extent is larger (N bytes) than the source inode's inline
# extent (M bytes), some bytes (N - M bytes) will be lost from the destination
# file. Btrfs could copy the source inline extent's data into the destination's
# inline extent so that we would not lose any data, but that's currently not
# done due to the complexity that would be needed to deal with such cases
# (specially when one or both extents are compressed), returning EOPNOTSUPP, as
# it's normally not a very common case to clone very small files (only case
# where we get inline extents) and copying inline extents does not save any
# space (unlike for normal, non-inlined extents).
$CLONER_PROG -s 0 -d 0 -l 0 $SCRATCH_MNT/foo $SCRATCH_MNT/bar
# Now because the above clone operation used to succeed, and due to foo's inline
# extent not being shinked by the truncate operation, our file bar got the whole
# inline extent copied from foo, making us lose the last 128 bytes from bar
# which got replaced by the bytes in range [128, 256[ from foo before foo was
# truncated - in other words, data loss from bar and being able to read old and
# stale data from foo that should not be possible to read anymore through normal
# filesystem operations. Contrast with the case where we truncate a file from a
# size N to a smaller size M, truncate it back to size N and then read the range
# [M, N[, we should always get the value 0x00 for all the bytes in that range.
# We expected the clone operation to fail with errno EOPNOTSUPP and therefore
# not modify our file's bar data/metadata. So its content should be 256 bytes
# long with all bytes having the value 0xbb.
#
# Without the btrfs bug fix, the clone operation succeeded and resulted in
# leaking truncated data from foo, the bytes that belonged to its range
# [128, 256[, and losing data from bar in that same range. So reading the
# file gave us the following content:
#
# 0000000 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1
# *
# 0000200 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a
# *
# 0000400
echo "File bar's content after the clone operation:"
od -t x1 $SCRATCH_MNT/bar
# Also because the foo's inline extent was not shrunk by the truncate
# operation, btrfs' fsck, which is run by the fstests framework everytime a
# test completes, failed reporting the following error:
#
# root 5 inode 257 errors 400, nbytes wrong
status=0
exit
Cc: [email protected]
Signed-off-by: Filipe Manana <[email protected]>
|
static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip,
int skip_sum)
{
struct inode *inode = dip->inode;
struct btrfs_root *root = BTRFS_I(inode)->root;
struct bio *bio;
struct bio *orig_bio = dip->orig_bio;
struct bio_vec *bvec = orig_bio->bi_io_vec;
u64 start_sector = orig_bio->bi_iter.bi_sector;
u64 file_offset = dip->logical_offset;
u64 submit_len = 0;
u64 map_length;
int nr_pages = 0;
int ret;
int async_submit = 0;
map_length = orig_bio->bi_iter.bi_size;
ret = btrfs_map_block(root->fs_info, rw, start_sector << 9,
&map_length, NULL, 0);
if (ret)
return -EIO;
if (map_length >= orig_bio->bi_iter.bi_size) {
bio = orig_bio;
dip->flags |= BTRFS_DIO_ORIG_BIO_SUBMITTED;
goto submit;
}
/* async crcs make it difficult to collect full stripe writes. */
if (btrfs_get_alloc_profile(root, 1) & BTRFS_BLOCK_GROUP_RAID56_MASK)
async_submit = 0;
else
async_submit = 1;
bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev, start_sector, GFP_NOFS);
if (!bio)
return -ENOMEM;
bio->bi_private = dip;
bio->bi_end_io = btrfs_end_dio_bio;
btrfs_io_bio(bio)->logical = file_offset;
atomic_inc(&dip->pending_bios);
while (bvec <= (orig_bio->bi_io_vec + orig_bio->bi_vcnt - 1)) {
if (map_length < submit_len + bvec->bv_len ||
bio_add_page(bio, bvec->bv_page, bvec->bv_len,
bvec->bv_offset) < bvec->bv_len) {
/*
* inc the count before we submit the bio so
* we know the end IO handler won't happen before
* we inc the count. Otherwise, the dip might get freed
* before we're done setting it up
*/
atomic_inc(&dip->pending_bios);
ret = __btrfs_submit_dio_bio(bio, inode, rw,
file_offset, skip_sum,
async_submit);
if (ret) {
bio_put(bio);
atomic_dec(&dip->pending_bios);
goto out_err;
}
start_sector += submit_len >> 9;
file_offset += submit_len;
submit_len = 0;
nr_pages = 0;
bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev,
start_sector, GFP_NOFS);
if (!bio)
goto out_err;
bio->bi_private = dip;
bio->bi_end_io = btrfs_end_dio_bio;
btrfs_io_bio(bio)->logical = file_offset;
map_length = orig_bio->bi_iter.bi_size;
ret = btrfs_map_block(root->fs_info, rw,
start_sector << 9,
&map_length, NULL, 0);
if (ret) {
bio_put(bio);
goto out_err;
}
} else {
submit_len += bvec->bv_len;
nr_pages++;
bvec++;
}
}
submit:
ret = __btrfs_submit_dio_bio(bio, inode, rw, file_offset, skip_sum,
async_submit);
if (!ret)
return 0;
bio_put(bio);
out_err:
dip->errors = 1;
/*
* before atomic variable goto zero, we must
* make sure dip->errors is perceived to be set.
*/
smp_mb__before_atomic();
if (atomic_dec_and_test(&dip->pending_bios))
bio_io_error(dip->orig_bio);
/* bio_end_io() will handle error, so we needn't return it */
return 0;
}
|
static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip,
int skip_sum)
{
struct inode *inode = dip->inode;
struct btrfs_root *root = BTRFS_I(inode)->root;
struct bio *bio;
struct bio *orig_bio = dip->orig_bio;
struct bio_vec *bvec = orig_bio->bi_io_vec;
u64 start_sector = orig_bio->bi_iter.bi_sector;
u64 file_offset = dip->logical_offset;
u64 submit_len = 0;
u64 map_length;
int nr_pages = 0;
int ret;
int async_submit = 0;
map_length = orig_bio->bi_iter.bi_size;
ret = btrfs_map_block(root->fs_info, rw, start_sector << 9,
&map_length, NULL, 0);
if (ret)
return -EIO;
if (map_length >= orig_bio->bi_iter.bi_size) {
bio = orig_bio;
dip->flags |= BTRFS_DIO_ORIG_BIO_SUBMITTED;
goto submit;
}
/* async crcs make it difficult to collect full stripe writes. */
if (btrfs_get_alloc_profile(root, 1) & BTRFS_BLOCK_GROUP_RAID56_MASK)
async_submit = 0;
else
async_submit = 1;
bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev, start_sector, GFP_NOFS);
if (!bio)
return -ENOMEM;
bio->bi_private = dip;
bio->bi_end_io = btrfs_end_dio_bio;
btrfs_io_bio(bio)->logical = file_offset;
atomic_inc(&dip->pending_bios);
while (bvec <= (orig_bio->bi_io_vec + orig_bio->bi_vcnt - 1)) {
if (map_length < submit_len + bvec->bv_len ||
bio_add_page(bio, bvec->bv_page, bvec->bv_len,
bvec->bv_offset) < bvec->bv_len) {
/*
* inc the count before we submit the bio so
* we know the end IO handler won't happen before
* we inc the count. Otherwise, the dip might get freed
* before we're done setting it up
*/
atomic_inc(&dip->pending_bios);
ret = __btrfs_submit_dio_bio(bio, inode, rw,
file_offset, skip_sum,
async_submit);
if (ret) {
bio_put(bio);
atomic_dec(&dip->pending_bios);
goto out_err;
}
start_sector += submit_len >> 9;
file_offset += submit_len;
submit_len = 0;
nr_pages = 0;
bio = btrfs_dio_bio_alloc(orig_bio->bi_bdev,
start_sector, GFP_NOFS);
if (!bio)
goto out_err;
bio->bi_private = dip;
bio->bi_end_io = btrfs_end_dio_bio;
btrfs_io_bio(bio)->logical = file_offset;
map_length = orig_bio->bi_iter.bi_size;
ret = btrfs_map_block(root->fs_info, rw,
start_sector << 9,
&map_length, NULL, 0);
if (ret) {
bio_put(bio);
goto out_err;
}
} else {
submit_len += bvec->bv_len;
nr_pages++;
bvec++;
}
}
submit:
ret = __btrfs_submit_dio_bio(bio, inode, rw, file_offset, skip_sum,
async_submit);
if (!ret)
return 0;
bio_put(bio);
out_err:
dip->errors = 1;
/*
* before atomic variable goto zero, we must
* make sure dip->errors is perceived to be set.
*/
smp_mb__before_atomic();
if (atomic_dec_and_test(&dip->pending_bios))
bio_io_error(dip->orig_bio);
/* bio_end_io() will handle error, so we needn't return it */
return 0;
}
|
C
|
linux
| 0 |
CVE-2016-5219
|
https://www.cvedetails.com/cve/CVE-2016-5219/
|
CWE-416
|
https://github.com/chromium/chromium/commit/a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
cheaper by minimizing the round-trip to the GPU thread.
Bug: 881152, 957001
Change-Id: Iadfa798af29225e752c710ca5c25f50b3dd3101a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586630
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657568}
|
void GLES2Implementation::RemoveMappedBufferRangeByTarget(GLenum target) {
GLuint buffer = GetBoundBufferHelper(target);
RemoveMappedBufferRangeById(buffer);
}
|
void GLES2Implementation::RemoveMappedBufferRangeByTarget(GLenum target) {
GLuint buffer = GetBoundBufferHelper(target);
RemoveMappedBufferRangeById(buffer);
}
|
C
|
Chrome
| 0 |
CVE-2016-1616
|
https://www.cvedetails.com/cve/CVE-2016-1616/
|
CWE-254
|
https://github.com/chromium/chromium/commit/297ae873b471a46929ea39697b121c0b411434ee
|
297ae873b471a46929ea39697b121c0b411434ee
|
Custom buttons should only handle accelerators when focused.
BUG=541415
Review URL: https://codereview.chromium.org/1437523005
Cr-Commit-Position: refs/heads/master@{#360130}
|
bool CustomButton::IsHotTracked() const {
return state_ == STATE_HOVERED;
}
|
bool CustomButton::IsHotTracked() const {
return state_ == STATE_HOVERED;
}
|
C
|
Chrome
| 0 |
CVE-2017-11721
|
https://www.cvedetails.com/cve/CVE-2017-11721/
|
CWE-119
|
https://github.com/ioquake/ioq3/commit/d2b1d124d4055c2fcbe5126863487c52fd58cca1
|
d2b1d124d4055c2fcbe5126863487c52fd58cca1
|
Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits
Prevent reading past end of message in MSG_ReadBits. If read past
end of msg->data buffer (16348 bytes) the engine could SEGFAULT.
Make MSG_WriteBits use an exact buffer overflow check instead of
possibly failing with a few bytes left.
|
float MSG_ReadDeltaKeyFloat( msg_t *msg, int key, float oldV ) {
if ( MSG_ReadBits( msg, 1 ) ) {
floatint_t fi;
fi.i = MSG_ReadBits( msg, 32 ) ^ key;
return fi.f;
}
return oldV;
}
|
float MSG_ReadDeltaKeyFloat( msg_t *msg, int key, float oldV ) {
if ( MSG_ReadBits( msg, 1 ) ) {
floatint_t fi;
fi.i = MSG_ReadBits( msg, 32 ) ^ key;
return fi.f;
}
return oldV;
}
|
C
|
ioq3
| 0 |
CVE-2014-8109
|
https://www.cvedetails.com/cve/CVE-2014-8109/
|
CWE-264
|
https://github.com/apache/httpd/commit/3f1693d558d0758f829c8b53993f1749ddf6ffcb
|
3f1693d558d0758f829c8b53993f1749ddf6ffcb
|
Merge r1642499 from trunk:
*) SECURITY: CVE-2014-8109 (cve.mitre.org)
mod_lua: Fix handling of the Require line when a LuaAuthzProvider is
used in multiple Require directives with different arguments.
PR57204 [Edward Lu <Chaosed0 gmail.com>]
Submitted By: Edward Lu
Committed By: covener
Submitted by: covener
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1642861 13f79535-47bb-0310-9956-ffa450edef68
|
static apr_status_t lua_output_filter_handle(ap_filter_t *f, apr_bucket_brigade *pbbIn) {
request_rec *r = f->r;
int rc;
lua_State *L;
lua_filter_ctx* ctx;
conn_rec *c = r->connection;
apr_bucket *pbktIn;
apr_status_t rv;
/* Set up the initial filter context and acquire the function.
* The corresponding Lua function should yield here.
*/
if (!f->ctx) {
rc = lua_setup_filter_ctx(f,r,&ctx);
if (rc == APR_EGENERAL) {
return HTTP_INTERNAL_SERVER_ERROR;
}
if (rc == APR_ENOENT) {
/* No filter entry found (or the script declined to filter), just pass on the buckets */
ap_remove_output_filter(f);
return ap_pass_brigade(f->next,pbbIn);
}
else {
/* We've got a willing lua filter, setup and check for a prefix */
size_t olen;
apr_bucket *pbktOut;
const char* output = lua_tolstring(ctx->L, 1, &olen);
f->ctx = ctx;
ctx->tmpBucket = apr_brigade_create(r->pool, c->bucket_alloc);
if (olen > 0) {
pbktOut = apr_bucket_heap_create(output, olen, NULL, c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktOut);
rv = ap_pass_brigade(f->next, ctx->tmpBucket);
apr_brigade_cleanup(ctx->tmpBucket);
if (rv != APR_SUCCESS) {
return rv;
}
}
}
}
ctx = (lua_filter_ctx*) f->ctx;
L = ctx->L;
/* While the Lua function is still yielding, pass in buckets to the coroutine */
if (!ctx->broken) {
for (pbktIn = APR_BRIGADE_FIRST(pbbIn);
pbktIn != APR_BRIGADE_SENTINEL(pbbIn);
pbktIn = APR_BUCKET_NEXT(pbktIn))
{
const char *data;
apr_size_t len;
apr_bucket *pbktOut;
/* read the bucket */
apr_bucket_read(pbktIn,&data,&len,APR_BLOCK_READ);
/* Push the bucket onto the Lua stack as a global var */
lua_pushlstring(L, data, len);
lua_setglobal(L, "bucket");
/* If Lua yielded, it means we have something to pass on */
if (lua_resume(L, 0) == LUA_YIELD) {
size_t olen;
const char* output = lua_tolstring(L, 1, &olen);
if (olen > 0) {
pbktOut = apr_bucket_heap_create(output, olen, NULL,
c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktOut);
rv = ap_pass_brigade(f->next, ctx->tmpBucket);
apr_brigade_cleanup(ctx->tmpBucket);
if (rv != APR_SUCCESS) {
return rv;
}
}
}
else {
ctx->broken = 1;
ap_lua_release_state(L, ctx->spec, r);
ap_remove_output_filter(f);
apr_brigade_cleanup(pbbIn);
apr_brigade_cleanup(ctx->tmpBucket);
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02663)
"lua: Error while executing filter: %s",
lua_tostring(L, -1));
return HTTP_INTERNAL_SERVER_ERROR;
}
}
/* If we've safely reached the end, do a final call to Lua to allow for any
finishing moves by the script, such as appending a tail. */
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(pbbIn))) {
apr_bucket *pbktEOS;
lua_pushnil(L);
lua_setglobal(L, "bucket");
if (lua_resume(L, 0) == LUA_YIELD) {
apr_bucket *pbktOut;
size_t olen;
const char* output = lua_tolstring(L, 1, &olen);
if (olen > 0) {
pbktOut = apr_bucket_heap_create(output, olen, NULL,
c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktOut);
}
}
pbktEOS = apr_bucket_eos_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktEOS);
ap_lua_release_state(L, ctx->spec, r);
rv = ap_pass_brigade(f->next, ctx->tmpBucket);
apr_brigade_cleanup(ctx->tmpBucket);
if (rv != APR_SUCCESS) {
return rv;
}
}
}
/* Clean up */
apr_brigade_cleanup(pbbIn);
return APR_SUCCESS;
}
|
static apr_status_t lua_output_filter_handle(ap_filter_t *f, apr_bucket_brigade *pbbIn) {
request_rec *r = f->r;
int rc;
lua_State *L;
lua_filter_ctx* ctx;
conn_rec *c = r->connection;
apr_bucket *pbktIn;
apr_status_t rv;
/* Set up the initial filter context and acquire the function.
* The corresponding Lua function should yield here.
*/
if (!f->ctx) {
rc = lua_setup_filter_ctx(f,r,&ctx);
if (rc == APR_EGENERAL) {
return HTTP_INTERNAL_SERVER_ERROR;
}
if (rc == APR_ENOENT) {
/* No filter entry found (or the script declined to filter), just pass on the buckets */
ap_remove_output_filter(f);
return ap_pass_brigade(f->next,pbbIn);
}
else {
/* We've got a willing lua filter, setup and check for a prefix */
size_t olen;
apr_bucket *pbktOut;
const char* output = lua_tolstring(ctx->L, 1, &olen);
f->ctx = ctx;
ctx->tmpBucket = apr_brigade_create(r->pool, c->bucket_alloc);
if (olen > 0) {
pbktOut = apr_bucket_heap_create(output, olen, NULL, c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktOut);
rv = ap_pass_brigade(f->next, ctx->tmpBucket);
apr_brigade_cleanup(ctx->tmpBucket);
if (rv != APR_SUCCESS) {
return rv;
}
}
}
}
ctx = (lua_filter_ctx*) f->ctx;
L = ctx->L;
/* While the Lua function is still yielding, pass in buckets to the coroutine */
if (!ctx->broken) {
for (pbktIn = APR_BRIGADE_FIRST(pbbIn);
pbktIn != APR_BRIGADE_SENTINEL(pbbIn);
pbktIn = APR_BUCKET_NEXT(pbktIn))
{
const char *data;
apr_size_t len;
apr_bucket *pbktOut;
/* read the bucket */
apr_bucket_read(pbktIn,&data,&len,APR_BLOCK_READ);
/* Push the bucket onto the Lua stack as a global var */
lua_pushlstring(L, data, len);
lua_setglobal(L, "bucket");
/* If Lua yielded, it means we have something to pass on */
if (lua_resume(L, 0) == LUA_YIELD) {
size_t olen;
const char* output = lua_tolstring(L, 1, &olen);
if (olen > 0) {
pbktOut = apr_bucket_heap_create(output, olen, NULL,
c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktOut);
rv = ap_pass_brigade(f->next, ctx->tmpBucket);
apr_brigade_cleanup(ctx->tmpBucket);
if (rv != APR_SUCCESS) {
return rv;
}
}
}
else {
ctx->broken = 1;
ap_lua_release_state(L, ctx->spec, r);
ap_remove_output_filter(f);
apr_brigade_cleanup(pbbIn);
apr_brigade_cleanup(ctx->tmpBucket);
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02663)
"lua: Error while executing filter: %s",
lua_tostring(L, -1));
return HTTP_INTERNAL_SERVER_ERROR;
}
}
/* If we've safely reached the end, do a final call to Lua to allow for any
finishing moves by the script, such as appending a tail. */
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(pbbIn))) {
apr_bucket *pbktEOS;
lua_pushnil(L);
lua_setglobal(L, "bucket");
if (lua_resume(L, 0) == LUA_YIELD) {
apr_bucket *pbktOut;
size_t olen;
const char* output = lua_tolstring(L, 1, &olen);
if (olen > 0) {
pbktOut = apr_bucket_heap_create(output, olen, NULL,
c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktOut);
}
}
pbktEOS = apr_bucket_eos_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktEOS);
ap_lua_release_state(L, ctx->spec, r);
rv = ap_pass_brigade(f->next, ctx->tmpBucket);
apr_brigade_cleanup(ctx->tmpBucket);
if (rv != APR_SUCCESS) {
return rv;
}
}
}
/* Clean up */
apr_brigade_cleanup(pbbIn);
return APR_SUCCESS;
}
|
C
|
httpd
| 0 |
CVE-2014-3645
|
https://www.cvedetails.com/cve/CVE-2014-3645/
|
CWE-20
|
https://github.com/torvalds/linux/commit/bfd0a56b90005f8c8a004baf407ad90045c2b11e
|
bfd0a56b90005f8c8a004baf407ad90045c2b11e
|
nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our current nested EPT implementation, when L1 changes its EPT table
for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in
the course of this modification already calls INVEPT. But if last level
of shadow page is unsync not all L1's changes to EPT12 are intercepted,
which means roots need to be synced when L1 calls INVEPT. Global INVEPT
should not be different since roots are synced by kvm_mmu_load() each
time EPTP02 changes.
Reviewed-by: Xiao Guangrong <[email protected]>
Signed-off-by: Nadav Har'El <[email protected]>
Signed-off-by: Jun Nakajima <[email protected]>
Signed-off-by: Xinhao Xu <[email protected]>
Signed-off-by: Yang Zhang <[email protected]>
Signed-off-by: Gleb Natapov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static pfn_t spte_to_pfn(u64 pte)
{
return (pte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT;
}
|
static pfn_t spte_to_pfn(u64 pte)
{
return (pte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT;
}
|
C
|
linux
| 0 |
CVE-2011-2840
|
https://www.cvedetails.com/cve/CVE-2011-2840/
|
CWE-20
|
https://github.com/chromium/chromium/commit/2db5a2048dfcacfe5ad4311c2b1e435c4c67febc
|
2db5a2048dfcacfe5ad4311c2b1e435c4c67febc
|
chromeos: fix bug where "aw snap" page replaces first tab if it was a NTP when closing window with > 1 tab.
BUG=chromium-os:12088
TEST=verify bug per bug report.
Review URL: http://codereview.chromium.org/6882058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83031 0039d316-1c4b-4281-b951-d872f2087c98
|
void Browser::ToggleEncodingAutoDetect() {
UserMetrics::RecordAction(UserMetricsAction("AutoDetectChange"), profile_);
encoding_auto_detect_.SetValue(!encoding_auto_detect_.GetValue());
if (encoding_auto_detect_.GetValue()) {
TabContents* contents = GetSelectedTabContents();
if (contents)
contents->ResetOverrideEncoding();
}
}
|
void Browser::ToggleEncodingAutoDetect() {
UserMetrics::RecordAction(UserMetricsAction("AutoDetectChange"), profile_);
encoding_auto_detect_.SetValue(!encoding_auto_detect_.GetValue());
if (encoding_auto_detect_.GetValue()) {
TabContents* contents = GetSelectedTabContents();
if (contents)
contents->ResetOverrideEncoding();
}
}
|
C
|
Chrome
| 0 |
CVE-2011-1078
|
https://www.cvedetails.com/cve/CVE-2011-1078/
|
CWE-200
|
https://github.com/torvalds/linux/commit/c4c896e1471aec3b004a693c689f60be3b17ac86
|
c4c896e1471aec3b004a693c689f60be3b17ac86
|
Bluetooth: sco: fix information leak to userspace
struct sco_conninfo has one padding byte in the end. Local variable
cinfo of type sco_conninfo is copied to userspace with this uninizialized
one byte, leading to old stack contents leak.
Signed-off-by: Vasiliy Kulikov <[email protected]>
Signed-off-by: Gustavo F. Padovan <[email protected]>
|
static int sco_conn_del(struct hci_conn *hcon, int err)
{
struct sco_conn *conn = hcon->sco_data;
struct sock *sk;
if (!conn)
return 0;
BT_DBG("hcon %p conn %p, err %d", hcon, conn, err);
/* Kill socket */
sk = sco_chan_get(conn);
if (sk) {
bh_lock_sock(sk);
sco_sock_clear_timer(sk);
sco_chan_del(sk, err);
bh_unlock_sock(sk);
sco_sock_kill(sk);
}
hcon->sco_data = NULL;
kfree(conn);
return 0;
}
|
static int sco_conn_del(struct hci_conn *hcon, int err)
{
struct sco_conn *conn = hcon->sco_data;
struct sock *sk;
if (!conn)
return 0;
BT_DBG("hcon %p conn %p, err %d", hcon, conn, err);
/* Kill socket */
sk = sco_chan_get(conn);
if (sk) {
bh_lock_sock(sk);
sco_sock_clear_timer(sk);
sco_chan_del(sk, err);
bh_unlock_sock(sk);
sco_sock_kill(sk);
}
hcon->sco_data = NULL;
kfree(conn);
return 0;
}
|
C
|
linux
| 0 |
CVE-2018-1000039
|
https://www.cvedetails.com/cve/CVE-2018-1000039/
|
CWE-416
|
http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=f597300439e62f5e921f0d7b1e880b5c1a1f1607;hp=093fc3b098dc5fadef5d8ad4b225db9fb124758b
|
f597300439e62f5e921f0d7b1e880b5c1a1f1607
| null |
pdf_cmap_wmode(fz_context *ctx, pdf_cmap *cmap)
{
return cmap->wmode;
}
|
pdf_cmap_wmode(fz_context *ctx, pdf_cmap *cmap)
{
return cmap->wmode;
}
|
C
|
ghostscript
| 0 |
CVE-2015-7513
|
https://www.cvedetails.com/cve/CVE-2015-7513/
| null |
https://github.com/torvalds/linux/commit/0185604c2d82c560dab2f2933a18f797e74ab5a8
|
0185604c2d82c560dab2f2933a18f797e74ab5a8
|
KVM: x86: Reload pit counters for all channels when restoring state
Currently if userspace restores the pit counters with a count of 0
on channels 1 or 2 and the guest attempts to read the count on those
channels, then KVM will perform a mod of 0 and crash. This will ensure
that 0 values are converted to 65536 as per the spec.
This is CVE-2015-7513.
Signed-off-by: Andy Honig <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static void pvclock_update_vm_gtod_copy(struct kvm *kvm)
{
#ifdef CONFIG_X86_64
struct kvm_arch *ka = &kvm->arch;
int vclock_mode;
bool host_tsc_clocksource, vcpus_matched;
vcpus_matched = (ka->nr_vcpus_matched_tsc + 1 ==
atomic_read(&kvm->online_vcpus));
/*
* If the host uses TSC clock, then passthrough TSC as stable
* to the guest.
*/
host_tsc_clocksource = kvm_get_time_and_clockread(
&ka->master_kernel_ns,
&ka->master_cycle_now);
ka->use_master_clock = host_tsc_clocksource && vcpus_matched
&& !backwards_tsc_observed
&& !ka->boot_vcpu_runs_old_kvmclock;
if (ka->use_master_clock)
atomic_set(&kvm_guest_has_master_clock, 1);
vclock_mode = pvclock_gtod_data.clock.vclock_mode;
trace_kvm_update_master_clock(ka->use_master_clock, vclock_mode,
vcpus_matched);
#endif
}
|
static void pvclock_update_vm_gtod_copy(struct kvm *kvm)
{
#ifdef CONFIG_X86_64
struct kvm_arch *ka = &kvm->arch;
int vclock_mode;
bool host_tsc_clocksource, vcpus_matched;
vcpus_matched = (ka->nr_vcpus_matched_tsc + 1 ==
atomic_read(&kvm->online_vcpus));
/*
* If the host uses TSC clock, then passthrough TSC as stable
* to the guest.
*/
host_tsc_clocksource = kvm_get_time_and_clockread(
&ka->master_kernel_ns,
&ka->master_cycle_now);
ka->use_master_clock = host_tsc_clocksource && vcpus_matched
&& !backwards_tsc_observed
&& !ka->boot_vcpu_runs_old_kvmclock;
if (ka->use_master_clock)
atomic_set(&kvm_guest_has_master_clock, 1);
vclock_mode = pvclock_gtod_data.clock.vclock_mode;
trace_kvm_update_master_clock(ka->use_master_clock, vclock_mode,
vcpus_matched);
#endif
}
|
C
|
linux
| 0 |
CVE-2012-5148
|
https://www.cvedetails.com/cve/CVE-2012-5148/
|
CWE-20
|
https://github.com/chromium/chromium/commit/e89cfcb9090e8c98129ae9160c513f504db74599
|
e89cfcb9090e8c98129ae9160c513f504db74599
|
Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167122 0039d316-1c4b-4281-b951-d872f2087c98
|
void Browser::OnWindowDidShow() {
if (window_has_shown_)
return;
window_has_shown_ = true;
#if defined(OS_MACOSX) || defined(OS_WIN)
static bool is_first_browser_window = true;
if (is_first_browser_window &&
!startup_metric_utils::WasNonBrowserUIDisplayed()) {
is_first_browser_window = false;
const base::Time* process_creation_time =
base::CurrentProcessInfo::CreationTime();
if (process_creation_time) {
UMA_HISTOGRAM_LONG_TIMES(
"Startup.BrowserWindowDisplay",
base::Time::Now() - *process_creation_time);
}
}
#endif // defined(OS_MACOSX) || defined(OS_WIN)
if (!is_type_tabbed())
return;
GlobalErrorService* service =
GlobalErrorServiceFactory::GetForProfile(profile());
GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
if (error)
error->ShowBubbleView(this);
}
|
void Browser::OnWindowDidShow() {
if (window_has_shown_)
return;
window_has_shown_ = true;
#if defined(OS_MACOSX) || defined(OS_WIN)
static bool is_first_browser_window = true;
if (is_first_browser_window &&
!startup_metric_utils::WasNonBrowserUIDisplayed()) {
is_first_browser_window = false;
const base::Time* process_creation_time =
base::CurrentProcessInfo::CreationTime();
if (process_creation_time) {
UMA_HISTOGRAM_LONG_TIMES(
"Startup.BrowserWindowDisplay",
base::Time::Now() - *process_creation_time);
}
}
#endif // defined(OS_MACOSX) || defined(OS_WIN)
if (!is_type_tabbed())
return;
GlobalErrorService* service =
GlobalErrorServiceFactory::GetForProfile(profile());
GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
if (error)
error->ShowBubbleView(this);
}
|
C
|
Chrome
| 0 |
CVE-2017-18234
|
https://www.cvedetails.com/cve/CVE-2017-18234/
|
CWE-416
|
https://cgit.freedesktop.org/exempi/commit/?id=c26d5beb60a5a85f76259f50ed3e08c8169b0a0c
|
c26d5beb60a5a85f76259f50ed3e08c8169b0a0c
| null |
ImportSingleTIFF_Double ( const TIFF_Manager::TagInfo & tagInfo, const bool nativeEndian,
SXMPMeta * xmp, const char * xmpNS, const char * xmpProp )
{
try { // Don't let errors with one stop the others.
double binValue = *((double*)tagInfo.dataPtr);
if ( ! nativeEndian ) Flip8 ( &binValue );
xmp->SetProperty_Float ( xmpNS, xmpProp, binValue ); // ! Yes, SetProperty_Float.
} catch ( ... ) {
}
} // ImportSingleTIFF_Double
|
ImportSingleTIFF_Double ( const TIFF_Manager::TagInfo & tagInfo, const bool nativeEndian,
SXMPMeta * xmp, const char * xmpNS, const char * xmpProp )
{
try { // Don't let errors with one stop the others.
double binValue = *((double*)tagInfo.dataPtr);
if ( ! nativeEndian ) Flip8 ( &binValue );
xmp->SetProperty_Float ( xmpNS, xmpProp, binValue ); // ! Yes, SetProperty_Float.
} catch ( ... ) {
}
} // ImportSingleTIFF_Double
|
CPP
|
exempi
| 0 |
CVE-2018-7757
|
https://www.cvedetails.com/cve/CVE-2018-7757/
|
CWE-772
|
https://github.com/torvalds/linux/commit/4a491b1ab11ca0556d2fda1ff1301e862a2d44c4
|
4a491b1ab11ca0556d2fda1ff1301e862a2d44c4
|
scsi: libsas: fix memory leak in sas_smp_get_phy_events()
We've got a memory leak with the following producer:
while true;
do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null;
done
The buffer req is allocated and not freed after we return. Fix it.
Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver")
Signed-off-by: Jason Yan <[email protected]>
CC: John Garry <[email protected]>
CC: chenqilin <[email protected]>
CC: chenxiang <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
static int sas_expander_discover(struct domain_device *dev)
{
struct expander_device *ex = &dev->ex_dev;
int res = -ENOMEM;
ex->ex_phy = kzalloc(sizeof(*ex->ex_phy)*ex->num_phys, GFP_KERNEL);
if (!ex->ex_phy)
return -ENOMEM;
res = sas_ex_phy_discover(dev, -1);
if (res)
goto out_err;
return 0;
out_err:
kfree(ex->ex_phy);
ex->ex_phy = NULL;
return res;
}
|
static int sas_expander_discover(struct domain_device *dev)
{
struct expander_device *ex = &dev->ex_dev;
int res = -ENOMEM;
ex->ex_phy = kzalloc(sizeof(*ex->ex_phy)*ex->num_phys, GFP_KERNEL);
if (!ex->ex_phy)
return -ENOMEM;
res = sas_ex_phy_discover(dev, -1);
if (res)
goto out_err;
return 0;
out_err:
kfree(ex->ex_phy);
ex->ex_phy = NULL;
return res;
}
|
C
|
linux
| 0 |
CVE-2013-2884
|
https://www.cvedetails.com/cve/CVE-2013-2884/
|
CWE-399
|
https://github.com/chromium/chromium/commit/4ac8bc08e3306f38a5ab3e551aef6ad43753579c
|
4ac8bc08e3306f38a5ab3e551aef6ad43753579c
|
Set Attr.ownerDocument in Element#setAttributeNode()
Attr objects can move across documents by setAttributeNode().
So It needs to reset ownerDocument through TreeScopeAdoptr::adoptIfNeeded().
BUG=248950
TEST=set-attribute-node-from-iframe.html
Review URL: https://chromiumcodereview.appspot.com/17583003
git-svn-id: svn://svn.chromium.org/blink/trunk@152938 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
KURL Element::baseURI() const
{
const AtomicString& baseAttribute = getAttribute(baseAttr);
KURL base(KURL(), baseAttribute);
if (!base.protocol().isEmpty())
return base;
ContainerNode* parent = parentNode();
if (!parent)
return base;
const KURL& parentBase = parent->baseURI();
if (parentBase.isNull())
return base;
return KURL(parentBase, baseAttribute);
}
|
KURL Element::baseURI() const
{
const AtomicString& baseAttribute = getAttribute(baseAttr);
KURL base(KURL(), baseAttribute);
if (!base.protocol().isEmpty())
return base;
ContainerNode* parent = parentNode();
if (!parent)
return base;
const KURL& parentBase = parent->baseURI();
if (parentBase.isNull())
return base;
return KURL(parentBase, baseAttribute);
}
|
C
|
Chrome
| 0 |
CVE-2011-2491
|
https://www.cvedetails.com/cve/CVE-2011-2491/
|
CWE-399
|
https://github.com/torvalds/linux/commit/0b760113a3a155269a3fba93a409c640031dd68f
|
0b760113a3a155269a3fba93a409c640031dd68f
|
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: Vasily Averin <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Cc: [email protected]
|
nlmclnt_lock(struct nlm_rqst *req, struct file_lock *fl)
{
struct rpc_cred *cred = nfs_file_cred(fl->fl_file);
struct nlm_host *host = req->a_host;
struct nlm_res *resp = &req->a_res;
struct nlm_wait *block = NULL;
unsigned char fl_flags = fl->fl_flags;
unsigned char fl_type;
int status = -ENOLCK;
if (nsm_monitor(host) < 0)
goto out;
req->a_args.state = nsm_local_state;
fl->fl_flags |= FL_ACCESS;
status = do_vfs_lock(fl);
fl->fl_flags = fl_flags;
if (status < 0)
goto out;
block = nlmclnt_prepare_block(host, fl);
again:
/*
* Initialise resp->status to a valid non-zero value,
* since 0 == nlm_lck_granted
*/
resp->status = nlm_lck_blocked;
for(;;) {
/* Reboot protection */
fl->fl_u.nfs_fl.state = host->h_state;
status = nlmclnt_call(cred, req, NLMPROC_LOCK);
if (status < 0)
break;
/* Did a reclaimer thread notify us of a server reboot? */
if (resp->status == nlm_lck_denied_grace_period)
continue;
if (resp->status != nlm_lck_blocked)
break;
/* Wait on an NLM blocking lock */
status = nlmclnt_block(block, req, NLMCLNT_POLL_TIMEOUT);
if (status < 0)
break;
if (resp->status != nlm_lck_blocked)
break;
}
/* if we were interrupted while blocking, then cancel the lock request
* and exit
*/
if (resp->status == nlm_lck_blocked) {
if (!req->a_args.block)
goto out_unlock;
if (nlmclnt_cancel(host, req->a_args.block, fl) == 0)
goto out_unblock;
}
if (resp->status == nlm_granted) {
down_read(&host->h_rwsem);
/* Check whether or not the server has rebooted */
if (fl->fl_u.nfs_fl.state != host->h_state) {
up_read(&host->h_rwsem);
goto again;
}
/* Ensure the resulting lock will get added to granted list */
fl->fl_flags |= FL_SLEEP;
if (do_vfs_lock(fl) < 0)
printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", __func__);
up_read(&host->h_rwsem);
fl->fl_flags = fl_flags;
status = 0;
}
if (status < 0)
goto out_unlock;
/*
* EAGAIN doesn't make sense for sleeping locks, and in some
* cases NLM_LCK_DENIED is returned for a permanent error. So
* turn it into an ENOLCK.
*/
if (resp->status == nlm_lck_denied && (fl_flags & FL_SLEEP))
status = -ENOLCK;
else
status = nlm_stat_to_errno(resp->status);
out_unblock:
nlmclnt_finish_block(block);
out:
nlmclnt_release_call(req);
return status;
out_unlock:
/* Fatal error: ensure that we remove the lock altogether */
dprintk("lockd: lock attempt ended in fatal error.\n"
" Attempting to unlock.\n");
nlmclnt_finish_block(block);
fl_type = fl->fl_type;
fl->fl_type = F_UNLCK;
down_read(&host->h_rwsem);
do_vfs_lock(fl);
up_read(&host->h_rwsem);
fl->fl_type = fl_type;
fl->fl_flags = fl_flags;
nlmclnt_async_call(cred, req, NLMPROC_UNLOCK, &nlmclnt_unlock_ops);
return status;
}
|
nlmclnt_lock(struct nlm_rqst *req, struct file_lock *fl)
{
struct rpc_cred *cred = nfs_file_cred(fl->fl_file);
struct nlm_host *host = req->a_host;
struct nlm_res *resp = &req->a_res;
struct nlm_wait *block = NULL;
unsigned char fl_flags = fl->fl_flags;
unsigned char fl_type;
int status = -ENOLCK;
if (nsm_monitor(host) < 0)
goto out;
req->a_args.state = nsm_local_state;
fl->fl_flags |= FL_ACCESS;
status = do_vfs_lock(fl);
fl->fl_flags = fl_flags;
if (status < 0)
goto out;
block = nlmclnt_prepare_block(host, fl);
again:
/*
* Initialise resp->status to a valid non-zero value,
* since 0 == nlm_lck_granted
*/
resp->status = nlm_lck_blocked;
for(;;) {
/* Reboot protection */
fl->fl_u.nfs_fl.state = host->h_state;
status = nlmclnt_call(cred, req, NLMPROC_LOCK);
if (status < 0)
break;
/* Did a reclaimer thread notify us of a server reboot? */
if (resp->status == nlm_lck_denied_grace_period)
continue;
if (resp->status != nlm_lck_blocked)
break;
/* Wait on an NLM blocking lock */
status = nlmclnt_block(block, req, NLMCLNT_POLL_TIMEOUT);
if (status < 0)
break;
if (resp->status != nlm_lck_blocked)
break;
}
/* if we were interrupted while blocking, then cancel the lock request
* and exit
*/
if (resp->status == nlm_lck_blocked) {
if (!req->a_args.block)
goto out_unlock;
if (nlmclnt_cancel(host, req->a_args.block, fl) == 0)
goto out_unblock;
}
if (resp->status == nlm_granted) {
down_read(&host->h_rwsem);
/* Check whether or not the server has rebooted */
if (fl->fl_u.nfs_fl.state != host->h_state) {
up_read(&host->h_rwsem);
goto again;
}
/* Ensure the resulting lock will get added to granted list */
fl->fl_flags |= FL_SLEEP;
if (do_vfs_lock(fl) < 0)
printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", __func__);
up_read(&host->h_rwsem);
fl->fl_flags = fl_flags;
status = 0;
}
if (status < 0)
goto out_unlock;
/*
* EAGAIN doesn't make sense for sleeping locks, and in some
* cases NLM_LCK_DENIED is returned for a permanent error. So
* turn it into an ENOLCK.
*/
if (resp->status == nlm_lck_denied && (fl_flags & FL_SLEEP))
status = -ENOLCK;
else
status = nlm_stat_to_errno(resp->status);
out_unblock:
nlmclnt_finish_block(block);
out:
nlmclnt_release_call(req);
return status;
out_unlock:
/* Fatal error: ensure that we remove the lock altogether */
dprintk("lockd: lock attempt ended in fatal error.\n"
" Attempting to unlock.\n");
nlmclnt_finish_block(block);
fl_type = fl->fl_type;
fl->fl_type = F_UNLCK;
down_read(&host->h_rwsem);
do_vfs_lock(fl);
up_read(&host->h_rwsem);
fl->fl_type = fl_type;
fl->fl_flags = fl_flags;
nlmclnt_async_call(cred, req, NLMPROC_UNLOCK, &nlmclnt_unlock_ops);
return status;
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/ec14f31eca3a51f665432973552ee575635132b3
|
ec14f31eca3a51f665432973552ee575635132b3
|
[EFL] Change the behavior of ewk_view_scale_set.
https://bugs.webkit.org/show_bug.cgi?id=70078
Reviewed by Eric Seidel.
Remove center point basis zoom alignment from ewk_view_scale_set to call
Page::setPageScaleFactor without any adjustment.
* ewk/ewk_view.cpp:
(ewk_view_scale_set):
* ewk/ewk_view.h:
git-svn-id: svn://svn.chromium.org/blink/trunk@103288 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* smartData)
{
EWK_VIEW_PRIV_GET(smartData, priv);
WebCore::FocusController* focusController = priv->page->focusController();
DBG("ewkView=%p, fc=%p", smartData->self, focusController);
EINA_SAFETY_ON_NULL_RETURN_VAL(focusController, false);
focusController->setActive(false);
focusController->setFocused(false);
return true;
}
|
static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* smartData)
{
EWK_VIEW_PRIV_GET(smartData, priv);
WebCore::FocusController* focusController = priv->page->focusController();
DBG("ewkView=%p, fc=%p", smartData->self, focusController);
EINA_SAFETY_ON_NULL_RETURN_VAL(focusController, false);
focusController->setActive(false);
focusController->setFocused(false);
return true;
}
|
C
|
Chrome
| 0 |
CVE-2009-0397
|
https://www.cvedetails.com/cve/CVE-2009-0397/
|
CWE-119
|
https://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=bdc20b9baf13564d9a061343416395f8f9a92b53
|
bdc20b9baf13564d9a061343416395f8f9a92b53
| null |
gst_qtdemux_push_event (GstQTDemux * qtdemux, GstEvent * event)
{
guint n;
GST_DEBUG_OBJECT (qtdemux, "pushing %s event on all source pads",
GST_EVENT_TYPE_NAME (event));
for (n = 0; n < qtdemux->n_streams; n++) {
GstPad *pad;
if ((pad = qtdemux->streams[n]->pad))
gst_pad_push_event (pad, gst_event_ref (event));
}
gst_event_unref (event);
}
|
gst_qtdemux_push_event (GstQTDemux * qtdemux, GstEvent * event)
{
guint n;
GST_DEBUG_OBJECT (qtdemux, "pushing %s event on all source pads",
GST_EVENT_TYPE_NAME (event));
for (n = 0; n < qtdemux->n_streams; n++) {
GstPad *pad;
if ((pad = qtdemux->streams[n]->pad))
gst_pad_push_event (pad, gst_event_ref (event));
}
gst_event_unref (event);
}
|
C
|
gstreamer
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/9ad7483d8e7c20e9f1a5a08d00150fb51899f14c
|
9ad7483d8e7c20e9f1a5a08d00150fb51899f14c
|
Shutdown Timebomb - In canary, get a callstack if it takes longer than
10 minutes. In Dev, get callstack if it takes longer than 20 minutes.
In Beta (50 minutes) and Stable (100 minutes) it is same as before.
BUG=519321
[email protected]
Review URL: https://codereview.chromium.org/1409333005
Cr-Commit-Position: refs/heads/master@{#355586}
|
void ThreadWatcher::OnPingMessage(const BrowserThread::ID& thread_id,
const base::Closure& callback_task) {
DCHECK(BrowserThread::CurrentlyOn(thread_id));
WatchDogThread::PostTask(FROM_HERE, callback_task);
}
|
void ThreadWatcher::OnPingMessage(const BrowserThread::ID& thread_id,
const base::Closure& callback_task) {
DCHECK(BrowserThread::CurrentlyOn(thread_id));
WatchDogThread::PostTask(FROM_HERE, callback_task);
}
|
C
|
Chrome
| 0 |
CVE-2012-3400
|
https://www.cvedetails.com/cve/CVE-2012-3400/
|
CWE-119
|
https://github.com/torvalds/linux/commit/adee11b2085bee90bd8f4f52123ffb07882d6256
|
adee11b2085bee90bd8f4f52123ffb07882d6256
|
udf: Avoid run away loop when partition table length is corrupted
Check provided length of partition table so that (possibly maliciously)
corrupted partition table cannot cause accessing data beyond current buffer.
Signed-off-by: Jan Kara <[email protected]>
|
void _udf_warn(struct super_block *sb, const char *function,
const char *fmt, ...)
{
struct va_format vaf;
va_list args;
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
pr_warn("warning (device %s): %s: %pV", sb->s_id, function, &vaf);
va_end(args);
}
|
void _udf_warn(struct super_block *sb, const char *function,
const char *fmt, ...)
{
struct va_format vaf;
va_list args;
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
pr_warn("warning (device %s): %s: %pV", sb->s_id, function, &vaf);
va_end(args);
}
|
C
|
linux
| 0 |
CVE-2017-7865
|
https://www.cvedetails.com/cve/CVE-2017-7865/
|
CWE-787
|
https://github.com/FFmpeg/FFmpeg/commit/2080bc33717955a0e4268e738acf8c1eeddbf8cb
|
2080bc33717955a0e4268e738acf8c1eeddbf8cb
|
avcodec/utils: correct align value for interplay
Fixes out of array access
Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
|
int attribute_align_arg ff_codec_open2_recursive(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
{
int ret = 0;
ff_unlock_avcodec(codec);
ret = avcodec_open2(avctx, codec, options);
ff_lock_avcodec(avctx, codec);
return ret;
}
|
int attribute_align_arg ff_codec_open2_recursive(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
{
int ret = 0;
ff_unlock_avcodec(codec);
ret = avcodec_open2(avctx, codec, options);
ff_lock_avcodec(avctx, codec);
return ret;
}
|
C
|
FFmpeg
| 0 |
CVE-2016-10165
|
https://www.cvedetails.com/cve/CVE-2016-10165/
|
CWE-125
|
https://github.com/mm2/Little-CMS/commit/5ca71a7bc18b6897ab21d815d15e218e204581e2
|
5ca71a7bc18b6897ab21d815d15e218e204581e2
|
Added an extra check to MLU bounds
Thanks to Ibrahim el-sayed for spotting the bug
|
void Type_ColorantOrderType_Free(struct _cms_typehandler_struct* self, void* Ptr)
{
_cmsFree(self ->ContextID, Ptr);
}
|
void Type_ColorantOrderType_Free(struct _cms_typehandler_struct* self, void* Ptr)
{
_cmsFree(self ->ContextID, Ptr);
}
|
C
|
Little-CMS
| 0 |
CVE-2016-1586
|
https://www.cvedetails.com/cve/CVE-2016-1586/
|
CWE-20
|
https://git.launchpad.net/oxide/commit/?id=29014da83e5fc358d6bff0f574e9ed45e61a35ac
|
29014da83e5fc358d6bff0f574e9ed45e61a35ac
| null |
void OxideQQuickWebView::dropEvent(QDropEvent* event) {
Q_D(OxideQQuickWebView);
QQuickItem::dropEvent(event);
d->contents_view_->handleDropEvent(event);
}
|
void OxideQQuickWebView::dropEvent(QDropEvent* event) {
Q_D(OxideQQuickWebView);
QQuickItem::dropEvent(event);
d->contents_view_->handleDropEvent(event);
}
|
CPP
|
launchpad
| 0 |
CVE-2014-7822
|
https://www.cvedetails.com/cve/CVE-2014-7822/
|
CWE-264
|
https://github.com/torvalds/linux/commit/8d0207652cbe27d1f962050737848e5ad4671958
|
8d0207652cbe27d1f962050737848e5ad4671958
|
->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <[email protected]>
|
static void fill_zero(struct inode *inode, pgoff_t index,
loff_t start, loff_t len)
{
struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
struct page *page;
if (!len)
return;
f2fs_balance_fs(sbi);
f2fs_lock_op(sbi);
page = get_new_data_page(inode, NULL, index, false);
f2fs_unlock_op(sbi);
if (!IS_ERR(page)) {
f2fs_wait_on_page_writeback(page, DATA);
zero_user(page, start, len);
set_page_dirty(page);
f2fs_put_page(page, 1);
}
}
|
static void fill_zero(struct inode *inode, pgoff_t index,
loff_t start, loff_t len)
{
struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
struct page *page;
if (!len)
return;
f2fs_balance_fs(sbi);
f2fs_lock_op(sbi);
page = get_new_data_page(inode, NULL, index, false);
f2fs_unlock_op(sbi);
if (!IS_ERR(page)) {
f2fs_wait_on_page_writeback(page, DATA);
zero_user(page, start, len);
set_page_dirty(page);
f2fs_put_page(page, 1);
}
}
|
C
|
linux
| 0 |
CVE-2017-5061
|
https://www.cvedetails.com/cve/CVE-2017-5061/
|
CWE-362
|
https://github.com/chromium/chromium/commit/5d78b84d39bd34bc9fce9d01c0dcd5a22a330d34
|
5d78b84d39bd34bc9fce9d01c0dcd5a22a330d34
|
(Reland) Discard compositor frames from unloaded web content
This is a reland of https://codereview.chromium.org/2707243005/ with a
small change to fix an uninitialized memory error that fails on MSAN
bots.
BUG=672847
[email protected], [email protected]
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2731283003
Cr-Commit-Position: refs/heads/master@{#454954}
|
void LayerTreeHost::BeginMainFrame(const BeginFrameArgs& args) {
client_->BeginMainFrame(args);
}
|
void LayerTreeHost::BeginMainFrame(const BeginFrameArgs& args) {
client_->BeginMainFrame(args);
}
|
C
|
Chrome
| 0 |
CVE-2016-6290
|
https://www.cvedetails.com/cve/CVE-2016-6290/
|
CWE-416
|
https://git.php.net/?p=php-src.git;a=commit;h=3798eb6fd5dddb211b01d41495072fd9858d4e32
|
3798eb6fd5dddb211b01d41495072fd9858d4e32
| null |
static inline void strcpy_gmt(char *ubuf, time_t *when) /* {{{ */
{
char buf[MAX_STR];
struct tm tm, *res;
int n;
res = php_gmtime_r(when, &tm);
if (!res) {
ubuf[0] = '\0';
return;
}
n = slprintf(buf, sizeof(buf), "%s, %02d %s %d %02d:%02d:%02d GMT", /* SAFE */
week_days[tm.tm_wday], tm.tm_mday,
month_names[tm.tm_mon], tm.tm_year + 1900,
tm.tm_hour, tm.tm_min,
tm.tm_sec);
memcpy(ubuf, buf, n);
ubuf[n] = '\0';
}
/* }}} */
|
static inline void strcpy_gmt(char *ubuf, time_t *when) /* {{{ */
{
char buf[MAX_STR];
struct tm tm, *res;
int n;
res = php_gmtime_r(when, &tm);
if (!res) {
ubuf[0] = '\0';
return;
}
n = slprintf(buf, sizeof(buf), "%s, %02d %s %d %02d:%02d:%02d GMT", /* SAFE */
week_days[tm.tm_wday], tm.tm_mday,
month_names[tm.tm_mon], tm.tm_year + 1900,
tm.tm_hour, tm.tm_min,
tm.tm_sec);
memcpy(ubuf, buf, n);
ubuf[n] = '\0';
}
/* }}} */
|
C
|
php
| 0 |
CVE-2016-2476
|
https://www.cvedetails.com/cve/CVE-2016-2476/
|
CWE-119
|
https://android.googlesource.com/platform/frameworks/av/+/295c883fe3105b19bcd0f9e07d54c6b589fc5bff
|
295c883fe3105b19bcd0f9e07d54c6b589fc5bff
|
DO NOT MERGE Verify OMX buffer sizes prior to access
Bug: 27207275
Change-Id: I4412825d1ee233d993af0a67708bea54304ff62d
|
android::SoftOMXComponent *createSoftOMXComponent(
const char *name, const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData, OMX_COMPONENTTYPE **component) {
return new android::SoftAACEncoder(name, callbacks, appData, component);
}
|
android::SoftOMXComponent *createSoftOMXComponent(
const char *name, const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData, OMX_COMPONENTTYPE **component) {
return new android::SoftAACEncoder(name, callbacks, appData, component);
}
|
C
|
Android
| 0 |
CVE-2012-3552
|
https://www.cvedetails.com/cve/CVE-2012-3552/
|
CWE-362
|
https://github.com/torvalds/linux/commit/f6d8bd051c391c1c0458a30b2a7abcd939329259
|
f6d8bd051c391c1c0458a30b2a7abcd939329259
|
inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can change inet->opt pointer and free old one under us.
Use RCU to protect inet->opt (changed to inet->inet_opt).
Instead of handling atomic refcounts, just copy ip_options when
necessary, to avoid cache line dirtying.
We cant insert an rcu_head in struct ip_options since its included in
skb->cb[], so this patch is large because I had to introduce a new
ip_options_rcu structure.
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int dccp_v4_init_sock(struct sock *sk)
{
static __u8 dccp_v4_ctl_sock_initialized;
int err = dccp_init_sock(sk, dccp_v4_ctl_sock_initialized);
if (err == 0) {
if (unlikely(!dccp_v4_ctl_sock_initialized))
dccp_v4_ctl_sock_initialized = 1;
inet_csk(sk)->icsk_af_ops = &dccp_ipv4_af_ops;
}
return err;
}
|
static int dccp_v4_init_sock(struct sock *sk)
{
static __u8 dccp_v4_ctl_sock_initialized;
int err = dccp_init_sock(sk, dccp_v4_ctl_sock_initialized);
if (err == 0) {
if (unlikely(!dccp_v4_ctl_sock_initialized))
dccp_v4_ctl_sock_initialized = 1;
inet_csk(sk)->icsk_af_ops = &dccp_ipv4_af_ops;
}
return err;
}
|
C
|
linux
| 0 |
CVE-2015-6768
|
https://www.cvedetails.com/cve/CVE-2015-6768/
|
CWE-264
|
https://github.com/chromium/chromium/commit/4c8b008f055f79e622344627fed7f820375a4f01
|
4c8b008f055f79e622344627fed7f820375a4f01
|
Change Document::detach() to RELEASE_ASSERT all subframes are gone.
BUG=556724,577105
Review URL: https://codereview.chromium.org/1667573002
Cr-Commit-Position: refs/heads/master@{#373642}
|
PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, ExceptionState& exceptionState)
{
QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, exceptionState));
if (qName == QualifiedName::null())
return nullptr;
RefPtrWillBeRawPtr<Element> element;
if (CustomElement::isValidName(qName.localName()) && registrationContext())
element = registrationContext()->createCustomTagElement(*this, qName);
else
element = createElement(qName, false);
if (!typeExtension.isEmpty())
CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element.get(), typeExtension);
return element.release();
}
|
PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, ExceptionState& exceptionState)
{
QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, exceptionState));
if (qName == QualifiedName::null())
return nullptr;
RefPtrWillBeRawPtr<Element> element;
if (CustomElement::isValidName(qName.localName()) && registrationContext())
element = registrationContext()->createCustomTagElement(*this, qName);
else
element = createElement(qName, false);
if (!typeExtension.isEmpty())
CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element.get(), typeExtension);
return element.release();
}
|
C
|
Chrome
| 0 |
CVE-2012-5148
|
https://www.cvedetails.com/cve/CVE-2012-5148/
|
CWE-20
|
https://github.com/chromium/chromium/commit/e89cfcb9090e8c98129ae9160c513f504db74599
|
e89cfcb9090e8c98129ae9160c513f504db74599
|
Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167122 0039d316-1c4b-4281-b951-d872f2087c98
|
gboolean TabStripGtk::OnDragDataReceived(GtkWidget* widget,
GdkDragContext* context,
gint x, gint y,
GtkSelectionData* data,
guint info, guint time) {
bool success = false;
if (info == ui::TEXT_URI_LIST ||
info == ui::NETSCAPE_URL ||
info == ui::TEXT_PLAIN) {
success = CompleteDrop(gtk_selection_data_get_data(data),
info == ui::TEXT_PLAIN);
}
gtk_drag_finish(context, success, FALSE, time);
return TRUE;
}
|
gboolean TabStripGtk::OnDragDataReceived(GtkWidget* widget,
GdkDragContext* context,
gint x, gint y,
GtkSelectionData* data,
guint info, guint time) {
bool success = false;
if (info == ui::TEXT_URI_LIST ||
info == ui::NETSCAPE_URL ||
info == ui::TEXT_PLAIN) {
success = CompleteDrop(gtk_selection_data_get_data(data),
info == ui::TEXT_PLAIN);
}
gtk_drag_finish(context, success, FALSE, time);
return TRUE;
}
|
C
|
Chrome
| 0 |
CVE-2011-2350
|
https://www.cvedetails.com/cve/CVE-2011-2350/
|
CWE-20
|
https://github.com/chromium/chromium/commit/b944f670bb7a8a919daac497a4ea0536c954c201
|
b944f670bb7a8a919daac497a4ea0536c954c201
|
[JSC] Implement a helper method createNotEnoughArgumentsError()
https://bugs.webkit.org/show_bug.cgi?id=85102
Reviewed by Geoffrey Garen.
In bug 84787, kbr@ requested to avoid hard-coding
createTypeError(exec, "Not enough arguments") here and there.
This patch implements createNotEnoughArgumentsError(exec)
and uses it in JSC bindings.
c.f. a corresponding bug for V8 bindings is bug 85097.
Source/JavaScriptCore:
* runtime/Error.cpp:
(JSC::createNotEnoughArgumentsError):
(JSC):
* runtime/Error.h:
(JSC):
Source/WebCore:
Test: bindings/scripts/test/TestObj.idl
* bindings/scripts/CodeGeneratorJS.pm: Modified as described above.
(GenerateArgumentsCountCheck):
* bindings/js/JSDataViewCustom.cpp: Ditto.
(WebCore::getDataViewMember):
(WebCore::setDataViewMember):
* bindings/js/JSDeprecatedPeerConnectionCustom.cpp:
(WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
* bindings/js/JSWebKitMutationObserverCustom.cpp:
(WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
(WebCore::JSWebKitMutationObserver::observe):
* bindings/js/JSWorkerCustom.cpp:
(WebCore::JSWorkerConstructor::constructJSWorker):
* bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests.
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionIdbKey):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert3):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
git-svn-id: svn://svn.chromium.org/blink/trunk@115536 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
JSObject* JSTestCustomNamedGetterPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSTestCustomNamedGetter>(exec, globalObject);
}
|
JSObject* JSTestCustomNamedGetterPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSTestCustomNamedGetter>(exec, globalObject);
}
|
C
|
Chrome
| 0 |
CVE-2012-2875
|
https://www.cvedetails.com/cve/CVE-2012-2875/
| null |
https://github.com/chromium/chromium/commit/d345af9ed62ee5f431be327967f41c3cc3fe936a
|
d345af9ed62ee5f431be327967f41c3cc3fe936a
|
[BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
https://bugs.webkit.org/show_bug.cgi?id=105143
RIM PR 171941
Reviewed by Rob Buis.
Internally reviewed by George Staikos.
Source/WebCore:
TouchPoint instances now provide document coordinates for the viewport
and content position of the touch event. The pixel coordinates stored
in the TouchPoint should no longer be needed in WebKit.
Also adapt to new method names and encapsulation of TouchPoint data
members.
No change in behavior, no new tests.
* platform/blackberry/PlatformTouchPointBlackBerry.cpp:
(WebCore::PlatformTouchPoint::PlatformTouchPoint):
Source/WebKit/blackberry:
TouchPoint instances now provide document coordinates for the viewport
and content position of the touch event. The pixel coordinates stored
in the TouchPoint should no longer be needed in WebKit. One exception
is when passing events to a full screen plugin.
Also adapt to new method names and encapsulation of TouchPoint data
members.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::touchEvent):
(BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
(BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin):
(BlackBerry::WebKit::WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
* WebKitSupport/InputHandler.h:
(InputHandler):
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::doFatFingers):
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
* WebKitSupport/TouchEventHandler.h:
(TouchEventHandler):
Tools:
Adapt to new method names and encapsulation of TouchPoint data members.
* DumpRenderTree/blackberry/EventSender.cpp:
(addTouchPointCallback):
(updateTouchPointCallback):
(touchEndCallback):
(releaseTouchPointCallback):
(sendTouchEvent):
git-svn-id: svn://svn.chromium.org/blink/trunk@137880 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
bool WebPagePrivate::compositorDrawsRootLayer() const
{
#if USE(ACCELERATED_COMPOSITING)
if (Platform::userInterfaceThreadMessageClient()->isCurrentThread())
return m_compositor && m_compositor->drawsRootLayer();
RenderView* renderView = m_mainFrame->contentRenderer();
if (!renderView || !renderView->layer() || !renderView->layer()->backing())
return false;
return !renderView->layer()->backing()->paintingGoesToWindow();
#else
return false;
#endif
}
|
bool WebPagePrivate::compositorDrawsRootLayer() const
{
#if USE(ACCELERATED_COMPOSITING)
if (Platform::userInterfaceThreadMessageClient()->isCurrentThread())
return m_compositor && m_compositor->drawsRootLayer();
RenderView* renderView = m_mainFrame->contentRenderer();
if (!renderView || !renderView->layer() || !renderView->layer()->backing())
return false;
return !renderView->layer()->backing()->paintingGoesToWindow();
#else
return false;
#endif
}
|
C
|
Chrome
| 0 |
CVE-2014-1715
|
https://www.cvedetails.com/cve/CVE-2014-1715/
|
CWE-22
|
https://github.com/chromium/chromium/commit/ce70785c73a2b7cf2b34de0d8439ca31929b4743
|
ce70785c73a2b7cf2b34de0d8439ca31929b4743
|
Consistently check if a block can handle pagination strut propagation.
https://codereview.chromium.org/1360753002 got it right for inline child
layout, but did nothing for block child layout.
BUG=329421
[email protected],[email protected]
Review URL: https://codereview.chromium.org/1387553002
Cr-Commit-Position: refs/heads/master@{#352429}
|
bool LayoutBlockFlow::containsFloat(LayoutBox* layoutBox) const
{
return m_floatingObjects && m_floatingObjects->set().contains<FloatingObjectHashTranslator>(layoutBox);
}
|
bool LayoutBlockFlow::containsFloat(LayoutBox* layoutBox) const
{
return m_floatingObjects && m_floatingObjects->set().contains<FloatingObjectHashTranslator>(layoutBox);
}
|
C
|
Chrome
| 0 |
CVE-2012-5139
|
https://www.cvedetails.com/cve/CVE-2012-5139/
|
CWE-416
|
https://github.com/chromium/chromium/commit/9e417dae2833230a651989bb4e56b835355dda39
|
9e417dae2833230a651989bb4e56b835355dda39
|
Tests were marked as Flaky.
BUG=151811,151810
[email protected],[email protected]
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/10968052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158204 0039d316-1c4b-4281-b951-d872f2087c98
|
TestSSLConfigService(bool ev_enabled, bool online_rev_checking)
: ev_enabled_(ev_enabled),
online_rev_checking_(online_rev_checking) {
}
|
TestSSLConfigService(bool ev_enabled, bool online_rev_checking)
: ev_enabled_(ev_enabled),
online_rev_checking_(online_rev_checking) {
}
|
C
|
Chrome
| 0 |
CVE-2016-1631
|
https://www.cvedetails.com/cve/CVE-2016-1631/
|
CWE-264
|
https://github.com/chromium/chromium/commit/dd77c2a41c72589d929db0592565125ca629fb2c
|
dd77c2a41c72589d929db0592565125ca629fb2c
|
Fix PPB_Flash_MessageLoop.
This CL suspends script callbacks and resource loads while running nested message loop using PPB_Flash_MessageLoop.
BUG=569496
Review URL: https://codereview.chromium.org/1559113002
Cr-Commit-Position: refs/heads/master@{#374529}
|
bool run_called() const { return run_called_; }
|
bool run_called() const { return run_called_; }
|
C
|
Chrome
| 0 |
CVE-2017-0637
|
https://www.cvedetails.com/cve/CVE-2017-0637/
|
CWE-119
|
https://android.googlesource.com/platform/external/libhevc/+/ebaa71da6362c497310377df509651974401d258
|
ebaa71da6362c497310377df509651974401d258
|
Correct Tiles rows and cols check
Bug: 36231493
Bug: 34064500
Change-Id: Ib17b2c68360685c5a2c019e1497612a130f9f76a
(cherry picked from commit 07ef4e7138e0e13d61039530358343a19308b188)
|
IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
{
IHEVCD_ERROR_T ret = (IHEVCD_ERROR_T)IHEVCD_SUCCESS;
WORD32 value;
WORD32 i;
WORD32 vps_id;
WORD32 sps_max_sub_layers;
WORD32 sps_id;
WORD32 sps_temporal_id_nesting_flag;
sps_t *ps_sps;
profile_tier_lvl_info_t s_ptl;
bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
WORD32 ctb_log2_size_y = 0;
BITS_PARSE("video_parameter_set_id", value, ps_bitstrm, 4);
vps_id = value;
vps_id = CLIP3(vps_id, 0, MAX_VPS_CNT - 1);
BITS_PARSE("sps_max_sub_layers_minus1", value, ps_bitstrm, 3);
sps_max_sub_layers = value + 1;
sps_max_sub_layers = CLIP3(sps_max_sub_layers, 1, 7);
BITS_PARSE("sps_temporal_id_nesting_flag", value, ps_bitstrm, 1);
sps_temporal_id_nesting_flag = value;
ret = ihevcd_profile_tier_level(ps_bitstrm, &(s_ptl), 1,
(sps_max_sub_layers - 1));
UEV_PARSE("seq_parameter_set_id", value, ps_bitstrm);
sps_id = value;
if((sps_id >= MAX_SPS_CNT) || (sps_id < 0))
{
if(ps_codec->i4_sps_done)
return IHEVCD_UNSUPPORTED_SPS_ID;
else
sps_id = 0;
}
ps_sps = (ps_codec->s_parse.ps_sps_base + MAX_SPS_CNT - 1);
ps_sps->i1_sps_id = sps_id;
ps_sps->i1_vps_id = vps_id;
ps_sps->i1_sps_max_sub_layers = sps_max_sub_layers;
ps_sps->i1_sps_temporal_id_nesting_flag = sps_temporal_id_nesting_flag;
/* This is used only during initialization to get reorder count etc */
ps_codec->i4_sps_id = sps_id;
memcpy(&ps_sps->s_ptl, &s_ptl, sizeof(profile_tier_lvl_info_t));
UEV_PARSE("chroma_format_idc", value, ps_bitstrm);
ps_sps->i1_chroma_format_idc = value;
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_YUV420)
{
ps_codec->s_parse.i4_error_code = IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
return (IHEVCD_ERROR_T)IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
}
if(CHROMA_FMT_IDC_YUV444_PLANES == ps_sps->i1_chroma_format_idc)
{
BITS_PARSE("separate_colour_plane_flag", value, ps_bitstrm, 1);
ps_sps->i1_separate_colour_plane_flag = value;
}
else
{
ps_sps->i1_separate_colour_plane_flag = 0;
}
UEV_PARSE("pic_width_in_luma_samples", value, ps_bitstrm);
ps_sps->i2_pic_width_in_luma_samples = value;
UEV_PARSE("pic_height_in_luma_samples", value, ps_bitstrm);
ps_sps->i2_pic_height_in_luma_samples = value;
if((0 >= ps_sps->i2_pic_width_in_luma_samples) || (0 >= ps_sps->i2_pic_height_in_luma_samples))
return IHEVCD_INVALID_PARAMETER;
/* i2_pic_width_in_luma_samples and i2_pic_height_in_luma_samples
should be multiples of min_cb_size. Here these are aligned to 8,
i.e. smallest CB size */
ps_sps->i2_pic_width_in_luma_samples = ALIGN8(ps_sps->i2_pic_width_in_luma_samples);
ps_sps->i2_pic_height_in_luma_samples = ALIGN8(ps_sps->i2_pic_height_in_luma_samples);
BITS_PARSE("pic_cropping_flag", value, ps_bitstrm, 1);
ps_sps->i1_pic_cropping_flag = value;
if(ps_sps->i1_pic_cropping_flag)
{
UEV_PARSE("pic_crop_left_offset", value, ps_bitstrm);
ps_sps->i2_pic_crop_left_offset = value;
UEV_PARSE("pic_crop_right_offset", value, ps_bitstrm);
ps_sps->i2_pic_crop_right_offset = value;
UEV_PARSE("pic_crop_top_offset", value, ps_bitstrm);
ps_sps->i2_pic_crop_top_offset = value;
UEV_PARSE("pic_crop_bottom_offset", value, ps_bitstrm);
ps_sps->i2_pic_crop_bottom_offset = value;
}
else
{
ps_sps->i2_pic_crop_left_offset = 0;
ps_sps->i2_pic_crop_right_offset = 0;
ps_sps->i2_pic_crop_top_offset = 0;
ps_sps->i2_pic_crop_bottom_offset = 0;
}
UEV_PARSE("bit_depth_luma_minus8", value, ps_bitstrm);
if(0 != value)
return IHEVCD_UNSUPPORTED_BIT_DEPTH;
UEV_PARSE("bit_depth_chroma_minus8", value, ps_bitstrm);
if(0 != value)
return IHEVCD_UNSUPPORTED_BIT_DEPTH;
UEV_PARSE("log2_max_pic_order_cnt_lsb_minus4", value, ps_bitstrm);
ps_sps->i1_log2_max_pic_order_cnt_lsb = value + 4;
BITS_PARSE("sps_sub_layer_ordering_info_present_flag", value, ps_bitstrm, 1);
ps_sps->i1_sps_sub_layer_ordering_info_present_flag = value;
i = (ps_sps->i1_sps_sub_layer_ordering_info_present_flag ? 0 : (ps_sps->i1_sps_max_sub_layers - 1));
for(; i < ps_sps->i1_sps_max_sub_layers; i++)
{
UEV_PARSE("max_dec_pic_buffering", value, ps_bitstrm);
ps_sps->ai1_sps_max_dec_pic_buffering[i] = value + 1;
if(ps_sps->ai1_sps_max_dec_pic_buffering[i] > MAX_DPB_SIZE)
{
return IHEVCD_INVALID_PARAMETER;
}
UEV_PARSE("num_reorder_pics", value, ps_bitstrm);
ps_sps->ai1_sps_max_num_reorder_pics[i] = value;
if(ps_sps->ai1_sps_max_num_reorder_pics[i] > ps_sps->ai1_sps_max_dec_pic_buffering[i])
{
return IHEVCD_INVALID_PARAMETER;
}
UEV_PARSE("max_latency_increase", value, ps_bitstrm);
ps_sps->ai1_sps_max_latency_increase[i] = value;
}
UEV_PARSE("log2_min_coding_block_size_minus3", value, ps_bitstrm);
ps_sps->i1_log2_min_coding_block_size = value + 3;
UEV_PARSE("log2_diff_max_min_coding_block_size", value, ps_bitstrm);
ps_sps->i1_log2_diff_max_min_coding_block_size = value;
ctb_log2_size_y = ps_sps->i1_log2_min_coding_block_size + ps_sps->i1_log2_diff_max_min_coding_block_size;
UEV_PARSE("log2_min_transform_block_size_minus2", value, ps_bitstrm);
ps_sps->i1_log2_min_transform_block_size = value + 2;
UEV_PARSE("log2_diff_max_min_transform_block_size", value, ps_bitstrm);
ps_sps->i1_log2_diff_max_min_transform_block_size = value;
ps_sps->i1_log2_max_transform_block_size = ps_sps->i1_log2_min_transform_block_size +
ps_sps->i1_log2_diff_max_min_transform_block_size;
if ((ps_sps->i1_log2_max_transform_block_size < 0) ||
(ps_sps->i1_log2_max_transform_block_size > MIN(ctb_log2_size_y, 5)))
{
return IHEVCD_INVALID_PARAMETER;
}
ps_sps->i1_log2_ctb_size = ps_sps->i1_log2_min_coding_block_size +
ps_sps->i1_log2_diff_max_min_coding_block_size;
if((ps_sps->i1_log2_min_coding_block_size < 3) ||
(ps_sps->i1_log2_min_transform_block_size < 2) ||
(ps_sps->i1_log2_diff_max_min_transform_block_size < 0) ||
(ps_sps->i1_log2_max_transform_block_size > ps_sps->i1_log2_ctb_size) ||
(ps_sps->i1_log2_ctb_size < 4) ||
(ps_sps->i1_log2_ctb_size > 6))
{
return IHEVCD_INVALID_PARAMETER;
}
ps_sps->i1_log2_min_pcm_coding_block_size = 0;
ps_sps->i1_log2_diff_max_min_pcm_coding_block_size = 0;
UEV_PARSE("max_transform_hierarchy_depth_inter", value, ps_bitstrm);
ps_sps->i1_max_transform_hierarchy_depth_inter = value;
UEV_PARSE("max_transform_hierarchy_depth_intra", value, ps_bitstrm);
ps_sps->i1_max_transform_hierarchy_depth_intra = value;
/* String has a d (enabled) in order to match with HM */
BITS_PARSE("scaling_list_enabled_flag", value, ps_bitstrm, 1);
ps_sps->i1_scaling_list_enable_flag = value;
if(ps_sps->i1_scaling_list_enable_flag)
{
COPY_DEFAULT_SCALING_LIST(ps_sps->pi2_scaling_mat);
BITS_PARSE("sps_scaling_list_data_present_flag", value, ps_bitstrm, 1);
ps_sps->i1_sps_scaling_list_data_present_flag = value;
if(ps_sps->i1_sps_scaling_list_data_present_flag)
ihevcd_scaling_list_data(ps_codec, ps_sps->pi2_scaling_mat);
}
else
{
COPY_FLAT_SCALING_LIST(ps_sps->pi2_scaling_mat);
}
/* String is asymmetric_motion_partitions_enabled_flag instead of amp_enabled_flag in order to match with HM */
BITS_PARSE("asymmetric_motion_partitions_enabled_flag", value, ps_bitstrm, 1);
ps_sps->i1_amp_enabled_flag = value;
BITS_PARSE("sample_adaptive_offset_enabled_flag", value, ps_bitstrm, 1);
ps_sps->i1_sample_adaptive_offset_enabled_flag = value;
BITS_PARSE("pcm_enabled_flag", value, ps_bitstrm, 1);
ps_sps->i1_pcm_enabled_flag = value;
if(ps_sps->i1_pcm_enabled_flag)
{
BITS_PARSE("pcm_sample_bit_depth_luma", value, ps_bitstrm, 4);
ps_sps->i1_pcm_sample_bit_depth_luma = value + 1;
BITS_PARSE("pcm_sample_bit_depth_chroma", value, ps_bitstrm, 4);
ps_sps->i1_pcm_sample_bit_depth_chroma = value + 1;
UEV_PARSE("log2_min_pcm_coding_block_size_minus3", value, ps_bitstrm);
ps_sps->i1_log2_min_pcm_coding_block_size = value + 3;
UEV_PARSE("log2_diff_max_min_pcm_coding_block_size", value, ps_bitstrm);
ps_sps->i1_log2_diff_max_min_pcm_coding_block_size = value;
BITS_PARSE("pcm_loop_filter_disable_flag", value, ps_bitstrm, 1);
ps_sps->i1_pcm_loop_filter_disable_flag = value;
}
UEV_PARSE("num_short_term_ref_pic_sets", value, ps_bitstrm);
ps_sps->i1_num_short_term_ref_pic_sets = value;
ps_sps->i1_num_short_term_ref_pic_sets = CLIP3(ps_sps->i1_num_short_term_ref_pic_sets, 0, MAX_STREF_PICS_SPS);
for(i = 0; i < ps_sps->i1_num_short_term_ref_pic_sets; i++)
ihevcd_short_term_ref_pic_set(ps_bitstrm, &ps_sps->as_stref_picset[0], ps_sps->i1_num_short_term_ref_pic_sets, i, &ps_sps->as_stref_picset[i]);
BITS_PARSE("long_term_ref_pics_present_flag", value, ps_bitstrm, 1);
ps_sps->i1_long_term_ref_pics_present_flag = value;
if(ps_sps->i1_long_term_ref_pics_present_flag)
{
UEV_PARSE("num_long_term_ref_pics_sps", value, ps_bitstrm);
ps_sps->i1_num_long_term_ref_pics_sps = value;
for(i = 0; i < ps_sps->i1_num_long_term_ref_pics_sps; i++)
{
BITS_PARSE("lt_ref_pic_poc_lsb_sps[ i ]", value, ps_bitstrm, ps_sps->i1_log2_max_pic_order_cnt_lsb);
ps_sps->ai1_lt_ref_pic_poc_lsb_sps[i] = value;
BITS_PARSE("used_by_curr_pic_lt_sps_flag[ i ]", value, ps_bitstrm, 1);
ps_sps->ai1_used_by_curr_pic_lt_sps_flag[i] = value;
}
}
BITS_PARSE("sps_temporal_mvp_enable_flag", value, ps_bitstrm, 1);
ps_sps->i1_sps_temporal_mvp_enable_flag = value;
/* Print matches HM 8-2 */
BITS_PARSE("sps_strong_intra_smoothing_enable_flag", value, ps_bitstrm, 1);
ps_sps->i1_strong_intra_smoothing_enable_flag = value;
BITS_PARSE("vui_parameters_present_flag", value, ps_bitstrm, 1);
ps_sps->i1_vui_parameters_present_flag = value;
if(ps_sps->i1_vui_parameters_present_flag)
ihevcd_parse_vui_parameters(ps_bitstrm,
&ps_sps->s_vui_parameters,
ps_sps->i1_sps_max_sub_layers - 1);
BITS_PARSE("sps_extension_flag", value, ps_bitstrm, 1);
if((UWORD8 *)ps_bitstrm->pu4_buf > ps_bitstrm->pu1_buf_max)
{
return IHEVCD_INVALID_PARAMETER;
}
{
WORD32 numerator;
WORD32 ceil_offset;
ceil_offset = (1 << ps_sps->i1_log2_ctb_size) - 1;
numerator = ps_sps->i2_pic_width_in_luma_samples;
ps_sps->i2_pic_wd_in_ctb = ((numerator + ceil_offset) /
(1 << ps_sps->i1_log2_ctb_size));
numerator = ps_sps->i2_pic_height_in_luma_samples;
ps_sps->i2_pic_ht_in_ctb = ((numerator + ceil_offset) /
(1 << ps_sps->i1_log2_ctb_size));
ps_sps->i4_pic_size_in_ctb = ps_sps->i2_pic_ht_in_ctb *
ps_sps->i2_pic_wd_in_ctb;
if(0 == ps_codec->i4_sps_done)
ps_codec->s_parse.i4_next_ctb_indx = ps_sps->i4_pic_size_in_ctb;
numerator = ps_sps->i2_pic_width_in_luma_samples;
ps_sps->i2_pic_wd_in_min_cb = numerator /
(1 << ps_sps->i1_log2_min_coding_block_size);
numerator = ps_sps->i2_pic_height_in_luma_samples;
ps_sps->i2_pic_ht_in_min_cb = numerator /
(1 << ps_sps->i1_log2_min_coding_block_size);
}
if((0 != ps_codec->i4_first_pic_done) &&
((ps_codec->i4_wd != ps_sps->i2_pic_width_in_luma_samples) ||
(ps_codec->i4_ht != ps_sps->i2_pic_height_in_luma_samples)))
{
ps_codec->i4_reset_flag = 1;
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
}
/* Update display width and display height */
{
WORD32 disp_wd, disp_ht;
WORD32 crop_unit_x, crop_unit_y;
crop_unit_x = 1;
crop_unit_y = 1;
if(CHROMA_FMT_IDC_YUV420 == ps_sps->i1_chroma_format_idc)
{
crop_unit_x = 2;
crop_unit_y = 2;
}
disp_wd = ps_sps->i2_pic_width_in_luma_samples;
disp_wd -= ps_sps->i2_pic_crop_left_offset * crop_unit_x;
disp_wd -= ps_sps->i2_pic_crop_right_offset * crop_unit_x;
disp_ht = ps_sps->i2_pic_height_in_luma_samples;
disp_ht -= ps_sps->i2_pic_crop_top_offset * crop_unit_y;
disp_ht -= ps_sps->i2_pic_crop_bottom_offset * crop_unit_y;
if((0 >= disp_wd) || (0 >= disp_ht))
return IHEVCD_INVALID_PARAMETER;
ps_codec->i4_disp_wd = disp_wd;
ps_codec->i4_disp_ht = disp_ht;
ps_codec->i4_wd = ps_sps->i2_pic_width_in_luma_samples;
ps_codec->i4_ht = ps_sps->i2_pic_height_in_luma_samples;
{
WORD32 ref_strd;
ref_strd = ALIGN32(ps_sps->i2_pic_width_in_luma_samples + PAD_WD);
if(ps_codec->i4_strd < ref_strd)
{
ps_codec->i4_strd = ref_strd;
}
}
if(0 == ps_codec->i4_share_disp_buf)
{
if(ps_codec->i4_disp_strd < ps_codec->i4_disp_wd)
{
ps_codec->i4_disp_strd = ps_codec->i4_disp_wd;
}
}
else
{
if(ps_codec->i4_disp_strd < ps_codec->i4_strd)
{
ps_codec->i4_disp_strd = ps_codec->i4_strd;
}
}
}
ps_codec->i4_sps_done = 1;
return ret;
}
|
IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
{
IHEVCD_ERROR_T ret = (IHEVCD_ERROR_T)IHEVCD_SUCCESS;
WORD32 value;
WORD32 i;
WORD32 vps_id;
WORD32 sps_max_sub_layers;
WORD32 sps_id;
WORD32 sps_temporal_id_nesting_flag;
sps_t *ps_sps;
profile_tier_lvl_info_t s_ptl;
bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
WORD32 ctb_log2_size_y = 0;
BITS_PARSE("video_parameter_set_id", value, ps_bitstrm, 4);
vps_id = value;
vps_id = CLIP3(vps_id, 0, MAX_VPS_CNT - 1);
BITS_PARSE("sps_max_sub_layers_minus1", value, ps_bitstrm, 3);
sps_max_sub_layers = value + 1;
sps_max_sub_layers = CLIP3(sps_max_sub_layers, 1, 7);
BITS_PARSE("sps_temporal_id_nesting_flag", value, ps_bitstrm, 1);
sps_temporal_id_nesting_flag = value;
ret = ihevcd_profile_tier_level(ps_bitstrm, &(s_ptl), 1,
(sps_max_sub_layers - 1));
UEV_PARSE("seq_parameter_set_id", value, ps_bitstrm);
sps_id = value;
if((sps_id >= MAX_SPS_CNT) || (sps_id < 0))
{
if(ps_codec->i4_sps_done)
return IHEVCD_UNSUPPORTED_SPS_ID;
else
sps_id = 0;
}
ps_sps = (ps_codec->s_parse.ps_sps_base + MAX_SPS_CNT - 1);
ps_sps->i1_sps_id = sps_id;
ps_sps->i1_vps_id = vps_id;
ps_sps->i1_sps_max_sub_layers = sps_max_sub_layers;
ps_sps->i1_sps_temporal_id_nesting_flag = sps_temporal_id_nesting_flag;
/* This is used only during initialization to get reorder count etc */
ps_codec->i4_sps_id = sps_id;
memcpy(&ps_sps->s_ptl, &s_ptl, sizeof(profile_tier_lvl_info_t));
UEV_PARSE("chroma_format_idc", value, ps_bitstrm);
ps_sps->i1_chroma_format_idc = value;
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_YUV420)
{
ps_codec->s_parse.i4_error_code = IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
return (IHEVCD_ERROR_T)IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
}
if(CHROMA_FMT_IDC_YUV444_PLANES == ps_sps->i1_chroma_format_idc)
{
BITS_PARSE("separate_colour_plane_flag", value, ps_bitstrm, 1);
ps_sps->i1_separate_colour_plane_flag = value;
}
else
{
ps_sps->i1_separate_colour_plane_flag = 0;
}
UEV_PARSE("pic_width_in_luma_samples", value, ps_bitstrm);
ps_sps->i2_pic_width_in_luma_samples = value;
UEV_PARSE("pic_height_in_luma_samples", value, ps_bitstrm);
ps_sps->i2_pic_height_in_luma_samples = value;
if((0 >= ps_sps->i2_pic_width_in_luma_samples) || (0 >= ps_sps->i2_pic_height_in_luma_samples))
return IHEVCD_INVALID_PARAMETER;
/* i2_pic_width_in_luma_samples and i2_pic_height_in_luma_samples
should be multiples of min_cb_size. Here these are aligned to 8,
i.e. smallest CB size */
ps_sps->i2_pic_width_in_luma_samples = ALIGN8(ps_sps->i2_pic_width_in_luma_samples);
ps_sps->i2_pic_height_in_luma_samples = ALIGN8(ps_sps->i2_pic_height_in_luma_samples);
BITS_PARSE("pic_cropping_flag", value, ps_bitstrm, 1);
ps_sps->i1_pic_cropping_flag = value;
if(ps_sps->i1_pic_cropping_flag)
{
UEV_PARSE("pic_crop_left_offset", value, ps_bitstrm);
ps_sps->i2_pic_crop_left_offset = value;
UEV_PARSE("pic_crop_right_offset", value, ps_bitstrm);
ps_sps->i2_pic_crop_right_offset = value;
UEV_PARSE("pic_crop_top_offset", value, ps_bitstrm);
ps_sps->i2_pic_crop_top_offset = value;
UEV_PARSE("pic_crop_bottom_offset", value, ps_bitstrm);
ps_sps->i2_pic_crop_bottom_offset = value;
}
else
{
ps_sps->i2_pic_crop_left_offset = 0;
ps_sps->i2_pic_crop_right_offset = 0;
ps_sps->i2_pic_crop_top_offset = 0;
ps_sps->i2_pic_crop_bottom_offset = 0;
}
UEV_PARSE("bit_depth_luma_minus8", value, ps_bitstrm);
if(0 != value)
return IHEVCD_UNSUPPORTED_BIT_DEPTH;
UEV_PARSE("bit_depth_chroma_minus8", value, ps_bitstrm);
if(0 != value)
return IHEVCD_UNSUPPORTED_BIT_DEPTH;
UEV_PARSE("log2_max_pic_order_cnt_lsb_minus4", value, ps_bitstrm);
ps_sps->i1_log2_max_pic_order_cnt_lsb = value + 4;
BITS_PARSE("sps_sub_layer_ordering_info_present_flag", value, ps_bitstrm, 1);
ps_sps->i1_sps_sub_layer_ordering_info_present_flag = value;
i = (ps_sps->i1_sps_sub_layer_ordering_info_present_flag ? 0 : (ps_sps->i1_sps_max_sub_layers - 1));
for(; i < ps_sps->i1_sps_max_sub_layers; i++)
{
UEV_PARSE("max_dec_pic_buffering", value, ps_bitstrm);
ps_sps->ai1_sps_max_dec_pic_buffering[i] = value + 1;
if(ps_sps->ai1_sps_max_dec_pic_buffering[i] > MAX_DPB_SIZE)
{
return IHEVCD_INVALID_PARAMETER;
}
UEV_PARSE("num_reorder_pics", value, ps_bitstrm);
ps_sps->ai1_sps_max_num_reorder_pics[i] = value;
if(ps_sps->ai1_sps_max_num_reorder_pics[i] > ps_sps->ai1_sps_max_dec_pic_buffering[i])
{
return IHEVCD_INVALID_PARAMETER;
}
UEV_PARSE("max_latency_increase", value, ps_bitstrm);
ps_sps->ai1_sps_max_latency_increase[i] = value;
}
UEV_PARSE("log2_min_coding_block_size_minus3", value, ps_bitstrm);
ps_sps->i1_log2_min_coding_block_size = value + 3;
UEV_PARSE("log2_diff_max_min_coding_block_size", value, ps_bitstrm);
ps_sps->i1_log2_diff_max_min_coding_block_size = value;
ctb_log2_size_y = ps_sps->i1_log2_min_coding_block_size + ps_sps->i1_log2_diff_max_min_coding_block_size;
UEV_PARSE("log2_min_transform_block_size_minus2", value, ps_bitstrm);
ps_sps->i1_log2_min_transform_block_size = value + 2;
UEV_PARSE("log2_diff_max_min_transform_block_size", value, ps_bitstrm);
ps_sps->i1_log2_diff_max_min_transform_block_size = value;
ps_sps->i1_log2_max_transform_block_size = ps_sps->i1_log2_min_transform_block_size +
ps_sps->i1_log2_diff_max_min_transform_block_size;
if ((ps_sps->i1_log2_max_transform_block_size < 0) ||
(ps_sps->i1_log2_max_transform_block_size > MIN(ctb_log2_size_y, 5)))
{
return IHEVCD_INVALID_PARAMETER;
}
ps_sps->i1_log2_ctb_size = ps_sps->i1_log2_min_coding_block_size +
ps_sps->i1_log2_diff_max_min_coding_block_size;
if((ps_sps->i1_log2_min_coding_block_size < 3) ||
(ps_sps->i1_log2_min_transform_block_size < 2) ||
(ps_sps->i1_log2_diff_max_min_transform_block_size < 0) ||
(ps_sps->i1_log2_max_transform_block_size > ps_sps->i1_log2_ctb_size) ||
(ps_sps->i1_log2_ctb_size < 4) ||
(ps_sps->i1_log2_ctb_size > 6))
{
return IHEVCD_INVALID_PARAMETER;
}
ps_sps->i1_log2_min_pcm_coding_block_size = 0;
ps_sps->i1_log2_diff_max_min_pcm_coding_block_size = 0;
UEV_PARSE("max_transform_hierarchy_depth_inter", value, ps_bitstrm);
ps_sps->i1_max_transform_hierarchy_depth_inter = value;
UEV_PARSE("max_transform_hierarchy_depth_intra", value, ps_bitstrm);
ps_sps->i1_max_transform_hierarchy_depth_intra = value;
/* String has a d (enabled) in order to match with HM */
BITS_PARSE("scaling_list_enabled_flag", value, ps_bitstrm, 1);
ps_sps->i1_scaling_list_enable_flag = value;
if(ps_sps->i1_scaling_list_enable_flag)
{
COPY_DEFAULT_SCALING_LIST(ps_sps->pi2_scaling_mat);
BITS_PARSE("sps_scaling_list_data_present_flag", value, ps_bitstrm, 1);
ps_sps->i1_sps_scaling_list_data_present_flag = value;
if(ps_sps->i1_sps_scaling_list_data_present_flag)
ihevcd_scaling_list_data(ps_codec, ps_sps->pi2_scaling_mat);
}
else
{
COPY_FLAT_SCALING_LIST(ps_sps->pi2_scaling_mat);
}
/* String is asymmetric_motion_partitions_enabled_flag instead of amp_enabled_flag in order to match with HM */
BITS_PARSE("asymmetric_motion_partitions_enabled_flag", value, ps_bitstrm, 1);
ps_sps->i1_amp_enabled_flag = value;
BITS_PARSE("sample_adaptive_offset_enabled_flag", value, ps_bitstrm, 1);
ps_sps->i1_sample_adaptive_offset_enabled_flag = value;
BITS_PARSE("pcm_enabled_flag", value, ps_bitstrm, 1);
ps_sps->i1_pcm_enabled_flag = value;
if(ps_sps->i1_pcm_enabled_flag)
{
BITS_PARSE("pcm_sample_bit_depth_luma", value, ps_bitstrm, 4);
ps_sps->i1_pcm_sample_bit_depth_luma = value + 1;
BITS_PARSE("pcm_sample_bit_depth_chroma", value, ps_bitstrm, 4);
ps_sps->i1_pcm_sample_bit_depth_chroma = value + 1;
UEV_PARSE("log2_min_pcm_coding_block_size_minus3", value, ps_bitstrm);
ps_sps->i1_log2_min_pcm_coding_block_size = value + 3;
UEV_PARSE("log2_diff_max_min_pcm_coding_block_size", value, ps_bitstrm);
ps_sps->i1_log2_diff_max_min_pcm_coding_block_size = value;
BITS_PARSE("pcm_loop_filter_disable_flag", value, ps_bitstrm, 1);
ps_sps->i1_pcm_loop_filter_disable_flag = value;
}
UEV_PARSE("num_short_term_ref_pic_sets", value, ps_bitstrm);
ps_sps->i1_num_short_term_ref_pic_sets = value;
ps_sps->i1_num_short_term_ref_pic_sets = CLIP3(ps_sps->i1_num_short_term_ref_pic_sets, 0, MAX_STREF_PICS_SPS);
for(i = 0; i < ps_sps->i1_num_short_term_ref_pic_sets; i++)
ihevcd_short_term_ref_pic_set(ps_bitstrm, &ps_sps->as_stref_picset[0], ps_sps->i1_num_short_term_ref_pic_sets, i, &ps_sps->as_stref_picset[i]);
BITS_PARSE("long_term_ref_pics_present_flag", value, ps_bitstrm, 1);
ps_sps->i1_long_term_ref_pics_present_flag = value;
if(ps_sps->i1_long_term_ref_pics_present_flag)
{
UEV_PARSE("num_long_term_ref_pics_sps", value, ps_bitstrm);
ps_sps->i1_num_long_term_ref_pics_sps = value;
for(i = 0; i < ps_sps->i1_num_long_term_ref_pics_sps; i++)
{
BITS_PARSE("lt_ref_pic_poc_lsb_sps[ i ]", value, ps_bitstrm, ps_sps->i1_log2_max_pic_order_cnt_lsb);
ps_sps->ai1_lt_ref_pic_poc_lsb_sps[i] = value;
BITS_PARSE("used_by_curr_pic_lt_sps_flag[ i ]", value, ps_bitstrm, 1);
ps_sps->ai1_used_by_curr_pic_lt_sps_flag[i] = value;
}
}
BITS_PARSE("sps_temporal_mvp_enable_flag", value, ps_bitstrm, 1);
ps_sps->i1_sps_temporal_mvp_enable_flag = value;
/* Print matches HM 8-2 */
BITS_PARSE("sps_strong_intra_smoothing_enable_flag", value, ps_bitstrm, 1);
ps_sps->i1_strong_intra_smoothing_enable_flag = value;
BITS_PARSE("vui_parameters_present_flag", value, ps_bitstrm, 1);
ps_sps->i1_vui_parameters_present_flag = value;
if(ps_sps->i1_vui_parameters_present_flag)
ihevcd_parse_vui_parameters(ps_bitstrm,
&ps_sps->s_vui_parameters,
ps_sps->i1_sps_max_sub_layers - 1);
BITS_PARSE("sps_extension_flag", value, ps_bitstrm, 1);
if((UWORD8 *)ps_bitstrm->pu4_buf > ps_bitstrm->pu1_buf_max)
{
return IHEVCD_INVALID_PARAMETER;
}
{
WORD32 numerator;
WORD32 ceil_offset;
ceil_offset = (1 << ps_sps->i1_log2_ctb_size) - 1;
numerator = ps_sps->i2_pic_width_in_luma_samples;
ps_sps->i2_pic_wd_in_ctb = ((numerator + ceil_offset) /
(1 << ps_sps->i1_log2_ctb_size));
numerator = ps_sps->i2_pic_height_in_luma_samples;
ps_sps->i2_pic_ht_in_ctb = ((numerator + ceil_offset) /
(1 << ps_sps->i1_log2_ctb_size));
ps_sps->i4_pic_size_in_ctb = ps_sps->i2_pic_ht_in_ctb *
ps_sps->i2_pic_wd_in_ctb;
if(0 == ps_codec->i4_sps_done)
ps_codec->s_parse.i4_next_ctb_indx = ps_sps->i4_pic_size_in_ctb;
numerator = ps_sps->i2_pic_width_in_luma_samples;
ps_sps->i2_pic_wd_in_min_cb = numerator /
(1 << ps_sps->i1_log2_min_coding_block_size);
numerator = ps_sps->i2_pic_height_in_luma_samples;
ps_sps->i2_pic_ht_in_min_cb = numerator /
(1 << ps_sps->i1_log2_min_coding_block_size);
}
if((0 != ps_codec->i4_first_pic_done) &&
((ps_codec->i4_wd != ps_sps->i2_pic_width_in_luma_samples) ||
(ps_codec->i4_ht != ps_sps->i2_pic_height_in_luma_samples)))
{
ps_codec->i4_reset_flag = 1;
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
}
/* Update display width and display height */
{
WORD32 disp_wd, disp_ht;
WORD32 crop_unit_x, crop_unit_y;
crop_unit_x = 1;
crop_unit_y = 1;
if(CHROMA_FMT_IDC_YUV420 == ps_sps->i1_chroma_format_idc)
{
crop_unit_x = 2;
crop_unit_y = 2;
}
disp_wd = ps_sps->i2_pic_width_in_luma_samples;
disp_wd -= ps_sps->i2_pic_crop_left_offset * crop_unit_x;
disp_wd -= ps_sps->i2_pic_crop_right_offset * crop_unit_x;
disp_ht = ps_sps->i2_pic_height_in_luma_samples;
disp_ht -= ps_sps->i2_pic_crop_top_offset * crop_unit_y;
disp_ht -= ps_sps->i2_pic_crop_bottom_offset * crop_unit_y;
if((0 >= disp_wd) || (0 >= disp_ht))
return IHEVCD_INVALID_PARAMETER;
ps_codec->i4_disp_wd = disp_wd;
ps_codec->i4_disp_ht = disp_ht;
ps_codec->i4_wd = ps_sps->i2_pic_width_in_luma_samples;
ps_codec->i4_ht = ps_sps->i2_pic_height_in_luma_samples;
{
WORD32 ref_strd;
ref_strd = ALIGN32(ps_sps->i2_pic_width_in_luma_samples + PAD_WD);
if(ps_codec->i4_strd < ref_strd)
{
ps_codec->i4_strd = ref_strd;
}
}
if(0 == ps_codec->i4_share_disp_buf)
{
if(ps_codec->i4_disp_strd < ps_codec->i4_disp_wd)
{
ps_codec->i4_disp_strd = ps_codec->i4_disp_wd;
}
}
else
{
if(ps_codec->i4_disp_strd < ps_codec->i4_strd)
{
ps_codec->i4_disp_strd = ps_codec->i4_strd;
}
}
}
ps_codec->i4_sps_done = 1;
return ret;
}
|
C
|
Android
| 0 |
CVE-2013-7421
|
https://www.cvedetails.com/cve/CVE-2013-7421/
|
CWE-264
|
https://github.com/torvalds/linux/commit/5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypto API,
as demonstrated by Mathias Krause:
https://lkml.org/lkml/2013/3/4/70
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
static inline void BLEND_OP(int I, u32 *W)
{
W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16];
}
|
static inline void BLEND_OP(int I, u32 *W)
{
W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16];
}
|
C
|
linux
| 0 |
CVE-2014-7840
|
https://www.cvedetails.com/cve/CVE-2014-7840/
|
CWE-20
|
https://git.qemu.org/?p=qemu.git;a=commit;h=0be839a2701369f669532ea5884c15bead1c6e08
|
0be839a2701369f669532ea5884c15bead1c6e08
| null |
uint64_t dup_mig_bytes_transferred(void)
{
return acct_info.dup_pages * TARGET_PAGE_SIZE;
}
|
uint64_t dup_mig_bytes_transferred(void)
{
return acct_info.dup_pages * TARGET_PAGE_SIZE;
}
|
C
|
qemu
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/d193f6bb5aa5bdc05e07f314abacf7d7bc466d3d
|
d193f6bb5aa5bdc05e07f314abacf7d7bc466d3d
|
cc: Make the PictureLayerImpl raster source null until commit.
No need to make a raster source that is never used.
R=enne, vmpstr
BUG=387116
Review URL: https://codereview.chromium.org/809433003
Cr-Commit-Position: refs/heads/master@{#308466}
|
size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded();
return tilings_->GPUMemoryUsageInBytes();
}
|
size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded();
return tilings_->GPUMemoryUsageInBytes();
}
|
C
|
Chrome
| 0 |
CVE-2017-5130
|
https://www.cvedetails.com/cve/CVE-2017-5130/
|
CWE-787
|
https://github.com/chromium/chromium/commit/ce1446c00f0fd8f5a3b00727421be2124cb7370f
|
ce1446c00f0fd8f5a3b00727421be2124cb7370f
|
Roll libxml to 3939178e4cb797417ff033b1e04ab4b038e224d9
Removes a few patches fixed upstream:
https://git.gnome.org/browse/libxml2/commit/?id=e26630548e7d138d2c560844c43820b6767251e3
https://git.gnome.org/browse/libxml2/commit/?id=94691dc884d1a8ada39f073408b4bb92fe7fe882
Stops using the NOXXE flag which was reverted upstream:
https://git.gnome.org/browse/libxml2/commit/?id=030b1f7a27c22f9237eddca49ec5e620b6258d7d
Changes the patch to uri.c to not add limits.h, which is included
upstream.
Bug: 722079
Change-Id: I4b8449ed33f95de23c54c2cde99970c2df2781ac
Reviewed-on: https://chromium-review.googlesource.com/535233
Reviewed-by: Scott Graham <[email protected]>
Commit-Queue: Dominic Cooney <[email protected]>
Cr-Commit-Position: refs/heads/master@{#480755}
|
htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
(ctxt->instate == XML_PARSER_EOF))
return;
if (ctxt != NULL)
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_HTML, error,
XML_ERR_ERROR, NULL, 0,
(const char *) str1, (const char *) str2,
NULL, 0, 0,
msg, str1, str2);
if (ctxt != NULL)
ctxt->wellFormed = 0;
}
|
htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
(ctxt->instate == XML_PARSER_EOF))
return;
if (ctxt != NULL)
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_HTML, error,
XML_ERR_ERROR, NULL, 0,
(const char *) str1, (const char *) str2,
NULL, 0, 0,
msg, str1, str2);
if (ctxt != NULL)
ctxt->wellFormed = 0;
}
|
C
|
Chrome
| 0 |
CVE-2017-9077
|
https://www.cvedetails.com/cve/CVE-2017-9077/
| null |
https://github.com/torvalds/linux/commit/83eaddab4378db256d00d295bda6ca997cd13a52
|
83eaddab4378db256d00d295bda6ca997cd13a52
|
ipv6/dccp: do not inherit ipv6_mc_list from parent
Like commit 657831ffc38e ("dccp/tcp: do not inherit mc_list from parent")
we should clear ipv6_mc_list etc. for IPv6 sockets too.
Cc: Eric Dumazet <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
{
const struct in6_addr *dest, *src;
__u16 destp, srcp;
int timer_active;
unsigned long timer_expires;
const struct inet_sock *inet = inet_sk(sp);
const struct tcp_sock *tp = tcp_sk(sp);
const struct inet_connection_sock *icsk = inet_csk(sp);
const struct fastopen_queue *fastopenq = &icsk->icsk_accept_queue.fastopenq;
int rx_queue;
int state;
dest = &sp->sk_v6_daddr;
src = &sp->sk_v6_rcv_saddr;
destp = ntohs(inet->inet_dport);
srcp = ntohs(inet->inet_sport);
if (icsk->icsk_pending == ICSK_TIME_RETRANS ||
icsk->icsk_pending == ICSK_TIME_REO_TIMEOUT ||
icsk->icsk_pending == ICSK_TIME_LOSS_PROBE) {
timer_active = 1;
timer_expires = icsk->icsk_timeout;
} else if (icsk->icsk_pending == ICSK_TIME_PROBE0) {
timer_active = 4;
timer_expires = icsk->icsk_timeout;
} else if (timer_pending(&sp->sk_timer)) {
timer_active = 2;
timer_expires = sp->sk_timer.expires;
} else {
timer_active = 0;
timer_expires = jiffies;
}
state = sk_state_load(sp);
if (state == TCP_LISTEN)
rx_queue = sp->sk_ack_backlog;
else
/* Because we don't lock the socket,
* we might find a transient negative value.
*/
rx_queue = max_t(int, tp->rcv_nxt - tp->copied_seq, 0);
seq_printf(seq,
"%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
"%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %lu %lu %u %u %d\n",
i,
src->s6_addr32[0], src->s6_addr32[1],
src->s6_addr32[2], src->s6_addr32[3], srcp,
dest->s6_addr32[0], dest->s6_addr32[1],
dest->s6_addr32[2], dest->s6_addr32[3], destp,
state,
tp->write_seq - tp->snd_una,
rx_queue,
timer_active,
jiffies_delta_to_clock_t(timer_expires - jiffies),
icsk->icsk_retransmits,
from_kuid_munged(seq_user_ns(seq), sock_i_uid(sp)),
icsk->icsk_probes_out,
sock_i_ino(sp),
atomic_read(&sp->sk_refcnt), sp,
jiffies_to_clock_t(icsk->icsk_rto),
jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
tp->snd_cwnd,
state == TCP_LISTEN ?
fastopenq->max_qlen :
(tcp_in_initial_slowstart(tp) ? -1 : tp->snd_ssthresh)
);
}
|
static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
{
const struct in6_addr *dest, *src;
__u16 destp, srcp;
int timer_active;
unsigned long timer_expires;
const struct inet_sock *inet = inet_sk(sp);
const struct tcp_sock *tp = tcp_sk(sp);
const struct inet_connection_sock *icsk = inet_csk(sp);
const struct fastopen_queue *fastopenq = &icsk->icsk_accept_queue.fastopenq;
int rx_queue;
int state;
dest = &sp->sk_v6_daddr;
src = &sp->sk_v6_rcv_saddr;
destp = ntohs(inet->inet_dport);
srcp = ntohs(inet->inet_sport);
if (icsk->icsk_pending == ICSK_TIME_RETRANS ||
icsk->icsk_pending == ICSK_TIME_REO_TIMEOUT ||
icsk->icsk_pending == ICSK_TIME_LOSS_PROBE) {
timer_active = 1;
timer_expires = icsk->icsk_timeout;
} else if (icsk->icsk_pending == ICSK_TIME_PROBE0) {
timer_active = 4;
timer_expires = icsk->icsk_timeout;
} else if (timer_pending(&sp->sk_timer)) {
timer_active = 2;
timer_expires = sp->sk_timer.expires;
} else {
timer_active = 0;
timer_expires = jiffies;
}
state = sk_state_load(sp);
if (state == TCP_LISTEN)
rx_queue = sp->sk_ack_backlog;
else
/* Because we don't lock the socket,
* we might find a transient negative value.
*/
rx_queue = max_t(int, tp->rcv_nxt - tp->copied_seq, 0);
seq_printf(seq,
"%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
"%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %lu %lu %u %u %d\n",
i,
src->s6_addr32[0], src->s6_addr32[1],
src->s6_addr32[2], src->s6_addr32[3], srcp,
dest->s6_addr32[0], dest->s6_addr32[1],
dest->s6_addr32[2], dest->s6_addr32[3], destp,
state,
tp->write_seq - tp->snd_una,
rx_queue,
timer_active,
jiffies_delta_to_clock_t(timer_expires - jiffies),
icsk->icsk_retransmits,
from_kuid_munged(seq_user_ns(seq), sock_i_uid(sp)),
icsk->icsk_probes_out,
sock_i_ino(sp),
atomic_read(&sp->sk_refcnt), sp,
jiffies_to_clock_t(icsk->icsk_rto),
jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
tp->snd_cwnd,
state == TCP_LISTEN ?
fastopenq->max_qlen :
(tcp_in_initial_slowstart(tp) ? -1 : tp->snd_ssthresh)
);
}
|
C
|
linux
| 0 |
CVE-2014-4014
|
https://www.cvedetails.com/cve/CVE-2014-4014/
|
CWE-264
|
https://github.com/torvalds/linux/commit/23adbe12ef7d3d4195e80800ab36b37bee28cd03
|
23adbe12ef7d3d4195e80800ab36b37bee28cd03
|
fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces. For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.
This patch changes inode_capable to check for uid and gid mappings and
renames it to capable_wrt_inode_uidgid, which should make it more
obvious what it does.
Fixes CVE-2014-4014.
Cc: Theodore Ts'o <[email protected]>
Cc: Serge Hallyn <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: [email protected]
Signed-off-by: Andy Lutomirski <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
void clear_nlink(struct inode *inode)
{
if (inode->i_nlink) {
inode->__i_nlink = 0;
atomic_long_inc(&inode->i_sb->s_remove_count);
}
}
|
void clear_nlink(struct inode *inode)
{
if (inode->i_nlink) {
inode->__i_nlink = 0;
atomic_long_inc(&inode->i_sb->s_remove_count);
}
}
|
C
|
linux
| 0 |
CVE-2012-5148
|
https://www.cvedetails.com/cve/CVE-2012-5148/
|
CWE-20
|
https://github.com/chromium/chromium/commit/e89cfcb9090e8c98129ae9160c513f504db74599
|
e89cfcb9090e8c98129ae9160c513f504db74599
|
Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167122 0039d316-1c4b-4281-b951-d872f2087c98
|
int TabStripModel::GetIndexOfFirstWebContentsOpenedBy(const WebContents* opener,
int start_index) const {
DCHECK(opener);
DCHECK(ContainsIndex(start_index));
for (int i = 0; i < start_index; ++i) {
if (contents_data_[i]->opener == opener)
return i;
}
return kNoTab;
}
|
int TabStripModel::GetIndexOfFirstWebContentsOpenedBy(const WebContents* opener,
int start_index) const {
DCHECK(opener);
DCHECK(ContainsIndex(start_index));
for (int i = 0; i < start_index; ++i) {
if (contents_data_[i]->opener == opener)
return i;
}
return kNoTab;
}
|
C
|
Chrome
| 0 |
CVE-2010-1166
|
https://www.cvedetails.com/cve/CVE-2010-1166/
|
CWE-189
|
https://cgit.freedesktop.org/xorg/xserver/commit/?id=d2f813f7db
|
d2f813f7db157fc83abc4b3726821c36ee7e40b1
| null |
fbCombineMaskC (CARD32 *src, CARD32 *mask)
{
CARD32 a = *mask;
CARD32 x;
CARD16 xa;
if (!a)
{
WRITE(src, 0);
return;
}
x = READ(src);
if (a == 0xffffffff)
{
x = x >> 24;
x |= x << 8;
x |= x << 16;
WRITE(mask, x);
return;
}
xa = x >> 24;
FbByteMulC(x, a);
WRITE(src, x);
FbByteMul(a, xa);
WRITE(mask, a);
}
|
fbCombineMaskC (CARD32 *src, CARD32 *mask)
{
CARD32 a = *mask;
CARD32 x;
CARD16 xa;
if (!a)
{
WRITE(src, 0);
return;
}
x = READ(src);
if (a == 0xffffffff)
{
x = x >> 24;
x |= x << 8;
x |= x << 16;
WRITE(mask, x);
return;
}
xa = x >> 24;
FbByteMulC(x, a);
WRITE(src, x);
FbByteMul(a, xa);
WRITE(mask, a);
}
|
C
|
xserver
| 0 |
CVE-2012-5136
|
https://www.cvedetails.com/cve/CVE-2012-5136/
|
CWE-20
|
https://github.com/chromium/chromium/commit/401d30ef93030afbf7e81e53a11b68fc36194502
|
401d30ef93030afbf7e81e53a11b68fc36194502
|
Refactoring: Move m_mayDisplaySeamlesslyWithParent down to Document
The member is used only in Document, thus no reason to
stay in SecurityContext.
TEST=none
BUG=none
[email protected], abarth, haraken, hayato
Review URL: https://codereview.chromium.org/27615003
git-svn-id: svn://svn.chromium.org/blink/trunk@159829 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
const Vector<IconURL>& Document::shortcutIconURLs()
{
return iconURLs(Favicon);
}
|
const Vector<IconURL>& Document::shortcutIconURLs()
{
return iconURLs(Favicon);
}
|
C
|
Chrome
| 0 |
CVE-2016-2392
|
https://www.cvedetails.com/cve/CVE-2016-2392/
| null |
https://git.qemu.org/?p=qemu.git;a=commit;h=80eecda8e5d09c442c24307f340840a5b70ea3b9
|
80eecda8e5d09c442c24307f340840a5b70ea3b9
| null |
static void usb_net_handle_reset(USBDevice *dev)
{
}
|
static void usb_net_handle_reset(USBDevice *dev)
{
}
|
C
|
qemu
| 0 |
CVE-2012-2875
|
https://www.cvedetails.com/cve/CVE-2012-2875/
| null |
https://github.com/chromium/chromium/commit/3ea4ba8af75eb37860c15d02af94f272e5bbc235
|
3ea4ba8af75eb37860c15d02af94f272e5bbc235
|
Crash fix in fileapi::FileSystemOperation::DidGetUsageAndQuotaAndRunTask
https://chromiumcodereview.appspot.com/10008047 introduced delete-with-inflight-tasks in Write sequence but I failed to convert this callback to use WeakPtr().
BUG=128178
TEST=manual test
Review URL: https://chromiumcodereview.appspot.com/10408006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137635 0039d316-1c4b-4281-b951-d872f2087c98
|
void FileSystemOperation::CreateDirectory(const GURL& path_url,
bool exclusive,
bool recursive,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationCreateDirectory));
base::PlatformFileError result = SetUpFileSystemPath(
path_url, &src_path_, &src_util_, PATH_FOR_CREATE);
if (result != base::PLATFORM_FILE_OK) {
callback.Run(result);
delete this;
return;
}
GetUsageAndQuotaThenRunTask(
src_path_.origin(), src_path_.type(),
base::Bind(&FileSystemOperation::DoCreateDirectory,
base::Unretained(this), callback, exclusive, recursive),
base::Bind(callback, base::PLATFORM_FILE_ERROR_FAILED));
}
|
void FileSystemOperation::CreateDirectory(const GURL& path_url,
bool exclusive,
bool recursive,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationCreateDirectory));
base::PlatformFileError result = SetUpFileSystemPath(
path_url, &src_path_, &src_util_, PATH_FOR_CREATE);
if (result != base::PLATFORM_FILE_OK) {
callback.Run(result);
delete this;
return;
}
GetUsageAndQuotaThenRunTask(
src_path_.origin(), src_path_.type(),
base::Bind(&FileSystemOperation::DoCreateDirectory,
base::Unretained(this), callback, exclusive, recursive),
base::Bind(callback, base::PLATFORM_FILE_ERROR_FAILED));
}
|
C
|
Chrome
| 0 |
CVE-2017-8924
|
https://www.cvedetails.com/cve/CVE-2017-8924/
|
CWE-191
|
https://github.com/torvalds/linux/commit/654b404f2a222f918af9b0cd18ad469d0c941a8e
|
654b404f2a222f918af9b0cd18ad469d0c941a8e
|
USB: serial: io_ti: fix information leak in completion handler
Add missing sanity check to the bulk-in completion handler to avoid an
integer underflow that can be triggered by a malicious device.
This avoids leaking 128 kB of memory content from after the URB transfer
buffer to user space.
Fixes: 8c209e6782ca ("USB: make actual_length in struct urb field u32")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <[email protected]> # 2.6.30
Signed-off-by: Johan Hovold <[email protected]>
|
static int download_fw(struct edgeport_serial *serial)
{
struct device *dev = &serial->serial->interface->dev;
int status = 0;
struct usb_interface_descriptor *interface;
const struct firmware *fw;
const char *fw_name = "edgeport/down3.bin";
struct edgeport_fw_hdr *fw_hdr;
status = request_firmware(&fw, fw_name, dev);
if (status) {
dev_err(dev, "Failed to load image \"%s\" err %d\n",
fw_name, status);
return status;
}
if (check_fw_sanity(serial, fw)) {
status = -EINVAL;
goto out;
}
fw_hdr = (struct edgeport_fw_hdr *)fw->data;
/* If on-board version is newer, "fw_version" will be updated later. */
serial->fw_version = (fw_hdr->major_version << 8) +
fw_hdr->minor_version;
/*
* This routine is entered by both the BOOT mode and the Download mode
* We can determine which code is running by the reading the config
* descriptor and if we have only one bulk pipe it is in boot mode
*/
serial->product_info.hardware_type = HARDWARE_TYPE_TIUMP;
/* Default to type 2 i2c */
serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
status = choose_config(serial->serial->dev);
if (status)
goto out;
interface = &serial->serial->interface->cur_altsetting->desc;
if (!interface) {
dev_err(dev, "%s - no interface set, error!\n", __func__);
status = -ENODEV;
goto out;
}
/*
* Setup initial mode -- the default mode 0 is TI_MODE_CONFIGURING
* if we have more than one endpoint we are definitely in download
* mode
*/
if (interface->bNumEndpoints > 1) {
serial->product_info.TiMode = TI_MODE_DOWNLOAD;
status = do_download_mode(serial, fw);
} else {
/* Otherwise we will remain in configuring mode */
serial->product_info.TiMode = TI_MODE_CONFIGURING;
status = do_boot_mode(serial, fw);
}
out:
release_firmware(fw);
return status;
}
|
static int download_fw(struct edgeport_serial *serial)
{
struct device *dev = &serial->serial->interface->dev;
int status = 0;
struct usb_interface_descriptor *interface;
const struct firmware *fw;
const char *fw_name = "edgeport/down3.bin";
struct edgeport_fw_hdr *fw_hdr;
status = request_firmware(&fw, fw_name, dev);
if (status) {
dev_err(dev, "Failed to load image \"%s\" err %d\n",
fw_name, status);
return status;
}
if (check_fw_sanity(serial, fw)) {
status = -EINVAL;
goto out;
}
fw_hdr = (struct edgeport_fw_hdr *)fw->data;
/* If on-board version is newer, "fw_version" will be updated later. */
serial->fw_version = (fw_hdr->major_version << 8) +
fw_hdr->minor_version;
/*
* This routine is entered by both the BOOT mode and the Download mode
* We can determine which code is running by the reading the config
* descriptor and if we have only one bulk pipe it is in boot mode
*/
serial->product_info.hardware_type = HARDWARE_TYPE_TIUMP;
/* Default to type 2 i2c */
serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
status = choose_config(serial->serial->dev);
if (status)
goto out;
interface = &serial->serial->interface->cur_altsetting->desc;
if (!interface) {
dev_err(dev, "%s - no interface set, error!\n", __func__);
status = -ENODEV;
goto out;
}
/*
* Setup initial mode -- the default mode 0 is TI_MODE_CONFIGURING
* if we have more than one endpoint we are definitely in download
* mode
*/
if (interface->bNumEndpoints > 1) {
serial->product_info.TiMode = TI_MODE_DOWNLOAD;
status = do_download_mode(serial, fw);
} else {
/* Otherwise we will remain in configuring mode */
serial->product_info.TiMode = TI_MODE_CONFIGURING;
status = do_boot_mode(serial, fw);
}
out:
release_firmware(fw);
return status;
}
|
C
|
linux
| 0 |
CVE-2017-12996
|
https://www.cvedetails.com/cve/CVE-2017-12996/
|
CWE-125
|
https://github.com/the-tcpdump-group/tcpdump/commit/6fca58f5f9c96749a575f52e20598ad43f5bdf30
|
6fca58f5f9c96749a575f52e20598ad43f5bdf30
|
CVE-2017-12996/PIMv2: Make sure PIM TLVs have the right length.
We do bounds checks based on the TLV length, so if the TLV's length is
too short, and we don't check for that, we could end up fetching data
past the end of the TLV - including past the length of the captured data
in the packet.
This fixes a buffer over-read discovered by Forcepoint's security
researchers Otto Airamo & Antti Levomäki.
Add tests using the capture files supplied by the reporter(s).
|
pimv1_print(netdissect_options *ndo,
register const u_char *bp, register u_int len)
{
register const u_char *ep;
register u_char type;
ep = (const u_char *)ndo->ndo_snapend;
if (bp >= ep)
return;
ND_TCHECK(bp[1]);
type = bp[1];
ND_PRINT((ndo, " %s", tok2str(pimv1_type_str, "[type %u]", type)));
switch (type) {
case PIMV1_TYPE_QUERY:
if (ND_TTEST(bp[8])) {
switch (bp[8] >> 4) {
case 0:
ND_PRINT((ndo, " Dense-mode"));
break;
case 1:
ND_PRINT((ndo, " Sparse-mode"));
break;
case 2:
ND_PRINT((ndo, " Sparse-Dense-mode"));
break;
default:
ND_PRINT((ndo, " mode-%d", bp[8] >> 4));
break;
}
}
if (ndo->ndo_vflag) {
ND_TCHECK2(bp[10],2);
ND_PRINT((ndo, " (Hold-time "));
unsigned_relts_print(ndo, EXTRACT_16BITS(&bp[10]));
ND_PRINT((ndo, ")"));
}
break;
case PIMV1_TYPE_REGISTER:
ND_TCHECK2(bp[8], 20); /* ip header */
ND_PRINT((ndo, " for %s > %s", ipaddr_string(ndo, &bp[20]),
ipaddr_string(ndo, &bp[24])));
break;
case PIMV1_TYPE_REGISTER_STOP:
ND_TCHECK2(bp[12], sizeof(struct in_addr));
ND_PRINT((ndo, " for %s > %s", ipaddr_string(ndo, &bp[8]),
ipaddr_string(ndo, &bp[12])));
break;
case PIMV1_TYPE_RP_REACHABILITY:
if (ndo->ndo_vflag) {
ND_TCHECK2(bp[22], 2);
ND_PRINT((ndo, " group %s", ipaddr_string(ndo, &bp[8])));
if (EXTRACT_32BITS(&bp[12]) != 0xffffffff)
ND_PRINT((ndo, "/%s", ipaddr_string(ndo, &bp[12])));
ND_PRINT((ndo, " RP %s hold ", ipaddr_string(ndo, &bp[16])));
unsigned_relts_print(ndo, EXTRACT_16BITS(&bp[22]));
}
break;
case PIMV1_TYPE_ASSERT:
ND_TCHECK2(bp[16], sizeof(struct in_addr));
ND_PRINT((ndo, " for %s > %s", ipaddr_string(ndo, &bp[16]),
ipaddr_string(ndo, &bp[8])));
if (EXTRACT_32BITS(&bp[12]) != 0xffffffff)
ND_PRINT((ndo, "/%s", ipaddr_string(ndo, &bp[12])));
ND_TCHECK2(bp[24], 4);
ND_PRINT((ndo, " %s pref %d metric %d",
(bp[20] & 0x80) ? "RP-tree" : "SPT",
EXTRACT_32BITS(&bp[20]) & 0x7fffffff,
EXTRACT_32BITS(&bp[24])));
break;
case PIMV1_TYPE_JOIN_PRUNE:
case PIMV1_TYPE_GRAFT:
case PIMV1_TYPE_GRAFT_ACK:
if (ndo->ndo_vflag)
pimv1_join_prune_print(ndo, &bp[8], len - 8);
break;
}
ND_TCHECK(bp[4]);
if ((bp[4] >> 4) != 1)
ND_PRINT((ndo, " [v%d]", bp[4] >> 4));
return;
trunc:
ND_PRINT((ndo, "[|pim]"));
return;
}
|
pimv1_print(netdissect_options *ndo,
register const u_char *bp, register u_int len)
{
register const u_char *ep;
register u_char type;
ep = (const u_char *)ndo->ndo_snapend;
if (bp >= ep)
return;
ND_TCHECK(bp[1]);
type = bp[1];
ND_PRINT((ndo, " %s", tok2str(pimv1_type_str, "[type %u]", type)));
switch (type) {
case PIMV1_TYPE_QUERY:
if (ND_TTEST(bp[8])) {
switch (bp[8] >> 4) {
case 0:
ND_PRINT((ndo, " Dense-mode"));
break;
case 1:
ND_PRINT((ndo, " Sparse-mode"));
break;
case 2:
ND_PRINT((ndo, " Sparse-Dense-mode"));
break;
default:
ND_PRINT((ndo, " mode-%d", bp[8] >> 4));
break;
}
}
if (ndo->ndo_vflag) {
ND_TCHECK2(bp[10],2);
ND_PRINT((ndo, " (Hold-time "));
unsigned_relts_print(ndo, EXTRACT_16BITS(&bp[10]));
ND_PRINT((ndo, ")"));
}
break;
case PIMV1_TYPE_REGISTER:
ND_TCHECK2(bp[8], 20); /* ip header */
ND_PRINT((ndo, " for %s > %s", ipaddr_string(ndo, &bp[20]),
ipaddr_string(ndo, &bp[24])));
break;
case PIMV1_TYPE_REGISTER_STOP:
ND_TCHECK2(bp[12], sizeof(struct in_addr));
ND_PRINT((ndo, " for %s > %s", ipaddr_string(ndo, &bp[8]),
ipaddr_string(ndo, &bp[12])));
break;
case PIMV1_TYPE_RP_REACHABILITY:
if (ndo->ndo_vflag) {
ND_TCHECK2(bp[22], 2);
ND_PRINT((ndo, " group %s", ipaddr_string(ndo, &bp[8])));
if (EXTRACT_32BITS(&bp[12]) != 0xffffffff)
ND_PRINT((ndo, "/%s", ipaddr_string(ndo, &bp[12])));
ND_PRINT((ndo, " RP %s hold ", ipaddr_string(ndo, &bp[16])));
unsigned_relts_print(ndo, EXTRACT_16BITS(&bp[22]));
}
break;
case PIMV1_TYPE_ASSERT:
ND_TCHECK2(bp[16], sizeof(struct in_addr));
ND_PRINT((ndo, " for %s > %s", ipaddr_string(ndo, &bp[16]),
ipaddr_string(ndo, &bp[8])));
if (EXTRACT_32BITS(&bp[12]) != 0xffffffff)
ND_PRINT((ndo, "/%s", ipaddr_string(ndo, &bp[12])));
ND_TCHECK2(bp[24], 4);
ND_PRINT((ndo, " %s pref %d metric %d",
(bp[20] & 0x80) ? "RP-tree" : "SPT",
EXTRACT_32BITS(&bp[20]) & 0x7fffffff,
EXTRACT_32BITS(&bp[24])));
break;
case PIMV1_TYPE_JOIN_PRUNE:
case PIMV1_TYPE_GRAFT:
case PIMV1_TYPE_GRAFT_ACK:
if (ndo->ndo_vflag)
pimv1_join_prune_print(ndo, &bp[8], len - 8);
break;
}
ND_TCHECK(bp[4]);
if ((bp[4] >> 4) != 1)
ND_PRINT((ndo, " [v%d]", bp[4] >> 4));
return;
trunc:
ND_PRINT((ndo, "[|pim]"));
return;
}
|
C
|
tcpdump
| 0 |
CVE-2013-2206
|
https://www.cvedetails.com/cve/CVE-2013-2206/
| null |
https://github.com/torvalds/linux/commit/f2815633504b442ca0b0605c16bf3d88a3a0fcea
|
f2815633504b442ca0b0605c16bf3d88a3a0fcea
|
sctp: Use correct sideffect command in duplicate cookie handling
When SCTP is done processing a duplicate cookie chunk, it tries
to delete a newly created association. For that, it has to set
the right association for the side-effect processing to work.
However, when it uses the SCTP_CMD_NEW_ASOC command, that performs
more work then really needed (like hashing the associationa and
assigning it an id) and there is no point to do that only to
delete the association as a next step. In fact, it also creates
an impossible condition where an association may be found by
the getsockopt() call, and that association is empty. This
causes a crash in some sctp getsockopts.
The solution is rather simple. We simply use SCTP_CMD_SET_ASOC
command that doesn't have all the overhead and does exactly
what we need.
Reported-by: Karl Heiss <[email protected]>
Tested-by: Karl Heiss <[email protected]>
CC: Neil Horman <[email protected]>
Signed-off-by: Vlad Yasevich <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
sctp_disposition_t sctp_sf_do_8_5_1_E_sa(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
/* Make sure that the SHUTDOWN_ACK chunk has a valid length. */
if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
return sctp_sf_violation_chunklen(net, ep, asoc, type, arg,
commands);
/* Although we do have an association in this case, it corresponds
* to a restarted association. So the packet is treated as an OOTB
* packet and the state function that handles OOTB SHUTDOWN_ACK is
* called with a NULL association.
*/
SCTP_INC_STATS(net, SCTP_MIB_OUTOFBLUES);
return sctp_sf_shut_8_4_5(net, ep, NULL, type, arg, commands);
}
|
sctp_disposition_t sctp_sf_do_8_5_1_E_sa(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
/* Make sure that the SHUTDOWN_ACK chunk has a valid length. */
if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
return sctp_sf_violation_chunklen(net, ep, asoc, type, arg,
commands);
/* Although we do have an association in this case, it corresponds
* to a restarted association. So the packet is treated as an OOTB
* packet and the state function that handles OOTB SHUTDOWN_ACK is
* called with a NULL association.
*/
SCTP_INC_STATS(net, SCTP_MIB_OUTOFBLUES);
return sctp_sf_shut_8_4_5(net, ep, NULL, type, arg, commands);
}
|
C
|
linux
| 0 |
CVE-2016-5185
|
https://www.cvedetails.com/cve/CVE-2016-5185/
|
CWE-416
|
https://github.com/chromium/chromium/commit/f2d26633cbd50735ac2af30436888b71ac0abad3
|
f2d26633cbd50735ac2af30436888b71ac0abad3
|
[Autofill] Remove AutofillPopupViewViews and associated feature.
Bug: 906135,831603
Change-Id: I3c982f8b3ffb4928c7c878e74e10113999106499
Reviewed-on: https://chromium-review.googlesource.com/c/1387124
Reviewed-by: Robert Kaplow <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Reviewed-by: Fabio Tirelo <[email protected]>
Reviewed-by: Tommy Martino <[email protected]>
Commit-Queue: Mathieu Perreault <[email protected]>
Cr-Commit-Position: refs/heads/master@{#621360}
|
void AutofillPopupSeparatorView::GetAccessibleNodeData(
ui::AXNodeData* node_data) {
node_data->role = ax::mojom::Role::kSplitter;
}
|
void AutofillPopupSeparatorView::GetAccessibleNodeData(
ui::AXNodeData* node_data) {
node_data->role = ax::mojom::Role::kSplitter;
}
|
C
|
Chrome
| 0 |
CVE-2013-6630
|
https://www.cvedetails.com/cve/CVE-2013-6630/
|
CWE-189
|
https://github.com/chromium/chromium/commit/805eabb91d386c86bd64336c7643f6dfa864151d
|
805eabb91d386c86bd64336c7643f6dfa864151d
|
Convert ARRAYSIZE_UNSAFE -> arraysize in base/.
[email protected]
BUG=423134
Review URL: https://codereview.chromium.org/656033009
Cr-Commit-Position: refs/heads/master@{#299835}
|
const std::string& group_name() const { return group_name_; }
|
const std::string& group_name() const { return group_name_; }
|
C
|
Chrome
| 0 |
CVE-2012-3511
|
https://www.cvedetails.com/cve/CVE-2012-3511/
|
CWE-362
|
https://github.com/torvalds/linux/commit/9ab4233dd08036fe34a89c7dc6f47a8bf2eb29eb
|
9ab4233dd08036fe34a89c7dc6f47a8bf2eb29eb
|
mm: Hold a file reference in madvise_remove
Otherwise the code races with munmap (causing a use-after-free
of the vma) or with close (causing a use-after-free of the struct
file).
The bug was introduced by commit 90ed52ebe481 ("[PATCH] holepunch: fix
mmap_sem i_mutex deadlock")
Cc: Hugh Dickins <[email protected]>
Cc: Miklos Szeredi <[email protected]>
Cc: Badari Pulavarty <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: [email protected]
Signed-off-by: Andy Lutomirski <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
static long madvise_willneed(struct vm_area_struct * vma,
struct vm_area_struct ** prev,
unsigned long start, unsigned long end)
{
struct file *file = vma->vm_file;
if (!file)
return -EBADF;
if (file->f_mapping->a_ops->get_xip_mem) {
/* no bad return value, but ignore advice */
return 0;
}
*prev = vma;
start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
if (end > vma->vm_end)
end = vma->vm_end;
end = ((end - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
force_page_cache_readahead(file->f_mapping, file, start, end - start);
return 0;
}
|
static long madvise_willneed(struct vm_area_struct * vma,
struct vm_area_struct ** prev,
unsigned long start, unsigned long end)
{
struct file *file = vma->vm_file;
if (!file)
return -EBADF;
if (file->f_mapping->a_ops->get_xip_mem) {
/* no bad return value, but ignore advice */
return 0;
}
*prev = vma;
start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
if (end > vma->vm_end)
end = vma->vm_end;
end = ((end - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
force_page_cache_readahead(file->f_mapping, file, start, end - start);
return 0;
}
|
C
|
linux
| 0 |
CVE-2014-0185
|
https://www.cvedetails.com/cve/CVE-2014-0185/
|
CWE-264
|
https://github.com/php/php-src/commit/35ceea928b12373a3b1e3eecdc32ed323223a40d
|
35ceea928b12373a3b1e3eecdc32ed323223a40d
|
Fix bug #67060: use default mode of 660
|
int fpm_unix_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
{
int is_root = !geteuid();
int made_chroot = 0;
if (wp->config->rlimit_files) {
struct rlimit r;
r.rlim_max = r.rlim_cur = (rlim_t) wp->config->rlimit_files;
if (0 > setrlimit(RLIMIT_NOFILE, &r)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to set rlimit_files for this pool. Please check your system limits or decrease rlimit_files. setrlimit(RLIMIT_NOFILE, %d)", wp->config->name, wp->config->rlimit_files);
}
}
if (wp->config->rlimit_core) {
struct rlimit r;
r.rlim_max = r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t) RLIM_INFINITY : (rlim_t) wp->config->rlimit_core;
if (0 > setrlimit(RLIMIT_CORE, &r)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to set rlimit_core for this pool. Please check your system limits or decrease rlimit_core. setrlimit(RLIMIT_CORE, %d)", wp->config->name, wp->config->rlimit_core);
}
}
if (is_root && wp->config->chroot && *wp->config->chroot) {
if (0 > chroot(wp->config->chroot)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to chroot(%s)", wp->config->name, wp->config->chroot);
return -1;
}
made_chroot = 1;
}
if (wp->config->chdir && *wp->config->chdir) {
if (0 > chdir(wp->config->chdir)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to chdir(%s)", wp->config->name, wp->config->chdir);
return -1;
}
} else if (made_chroot) {
chdir("/");
}
if (is_root) {
if (wp->config->process_priority != 64) {
if (setpriority(PRIO_PROCESS, 0, wp->config->process_priority) < 0) {
zlog(ZLOG_SYSERROR, "[pool %s] Unable to set priority for this new process", wp->config->name);
return -1;
}
}
if (wp->set_gid) {
if (0 > setgid(wp->set_gid)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to setgid(%d)", wp->config->name, wp->set_gid);
return -1;
}
}
if (wp->set_uid) {
if (0 > initgroups(wp->config->user, wp->set_gid)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to initgroups(%s, %d)", wp->config->name, wp->config->user, wp->set_gid);
return -1;
}
if (0 > setuid(wp->set_uid)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to setuid(%d)", wp->config->name, wp->set_uid);
return -1;
}
}
}
#ifdef HAVE_PRCTL
if (0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to prctl(PR_SET_DUMPABLE)", wp->config->name);
}
#endif
if (0 > fpm_clock_init()) {
return -1;
}
return 0;
}
/* }}} */
|
int fpm_unix_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
{
int is_root = !geteuid();
int made_chroot = 0;
if (wp->config->rlimit_files) {
struct rlimit r;
r.rlim_max = r.rlim_cur = (rlim_t) wp->config->rlimit_files;
if (0 > setrlimit(RLIMIT_NOFILE, &r)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to set rlimit_files for this pool. Please check your system limits or decrease rlimit_files. setrlimit(RLIMIT_NOFILE, %d)", wp->config->name, wp->config->rlimit_files);
}
}
if (wp->config->rlimit_core) {
struct rlimit r;
r.rlim_max = r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t) RLIM_INFINITY : (rlim_t) wp->config->rlimit_core;
if (0 > setrlimit(RLIMIT_CORE, &r)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to set rlimit_core for this pool. Please check your system limits or decrease rlimit_core. setrlimit(RLIMIT_CORE, %d)", wp->config->name, wp->config->rlimit_core);
}
}
if (is_root && wp->config->chroot && *wp->config->chroot) {
if (0 > chroot(wp->config->chroot)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to chroot(%s)", wp->config->name, wp->config->chroot);
return -1;
}
made_chroot = 1;
}
if (wp->config->chdir && *wp->config->chdir) {
if (0 > chdir(wp->config->chdir)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to chdir(%s)", wp->config->name, wp->config->chdir);
return -1;
}
} else if (made_chroot) {
chdir("/");
}
if (is_root) {
if (wp->config->process_priority != 64) {
if (setpriority(PRIO_PROCESS, 0, wp->config->process_priority) < 0) {
zlog(ZLOG_SYSERROR, "[pool %s] Unable to set priority for this new process", wp->config->name);
return -1;
}
}
if (wp->set_gid) {
if (0 > setgid(wp->set_gid)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to setgid(%d)", wp->config->name, wp->set_gid);
return -1;
}
}
if (wp->set_uid) {
if (0 > initgroups(wp->config->user, wp->set_gid)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to initgroups(%s, %d)", wp->config->name, wp->config->user, wp->set_gid);
return -1;
}
if (0 > setuid(wp->set_uid)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to setuid(%d)", wp->config->name, wp->set_uid);
return -1;
}
}
}
#ifdef HAVE_PRCTL
if (0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to prctl(PR_SET_DUMPABLE)", wp->config->name);
}
#endif
if (0 > fpm_clock_init()) {
return -1;
}
return 0;
}
/* }}} */
|
C
|
php-src
| 0 |
CVE-2018-6038
|
https://www.cvedetails.com/cve/CVE-2018-6038/
|
CWE-125
|
https://github.com/chromium/chromium/commit/9b99a43fc119a2533a87e2357cad8f603779a7b9
|
9b99a43fc119a2533a87e2357cad8f603779a7b9
|
Implement 2D texture uploading from client array with FLIP_Y or PREMULTIPLY_ALPHA.
BUG=774174
TEST=https://github.com/KhronosGroup/WebGL/pull/2555
[email protected]
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I4f4e7636314502451104730501a5048a5d7b9f3f
Reviewed-on: https://chromium-review.googlesource.com/808665
Commit-Queue: Zhenyao Mo <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#522003}
|
void Pack<WebGLImageConversion::kDataFormatRGB32F,
WebGLImageConversion::kAlphaDoNothing,
float,
float>(const float* source,
float* destination,
unsigned pixels_per_row) {
for (unsigned i = 0; i < pixels_per_row; ++i) {
destination[0] = source[0];
destination[1] = source[1];
destination[2] = source[2];
source += 4;
destination += 3;
}
}
|
void Pack<WebGLImageConversion::kDataFormatRGB32F,
WebGLImageConversion::kAlphaDoNothing,
float,
float>(const float* source,
float* destination,
unsigned pixels_per_row) {
for (unsigned i = 0; i < pixels_per_row; ++i) {
destination[0] = source[0];
destination[1] = source[1];
destination[2] = source[2];
source += 4;
destination += 3;
}
}
|
C
|
Chrome
| 0 |
CVE-2014-3173
|
https://www.cvedetails.com/cve/CVE-2014-3173/
|
CWE-119
|
https://github.com/chromium/chromium/commit/ee7579229ff7e9e5ae28bf53aea069251499d7da
|
ee7579229ff7e9e5ae28bf53aea069251499d7da
|
Framebuffer clear() needs to consider the situation some draw buffers are disabled.
This is when we expose DrawBuffers extension.
BUG=376951
TEST=the attached test case, webgl conformance
[email protected],[email protected]
Review URL: https://codereview.chromium.org/315283002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275338 0039d316-1c4b-4281-b951-d872f2087c98
|
uint32 GLES2DecoderImpl::GetTextureUploadCount() {
return texture_state_.texture_upload_count +
async_pixel_transfer_manager_->GetTextureUploadCount();
}
|
uint32 GLES2DecoderImpl::GetTextureUploadCount() {
return texture_state_.texture_upload_count +
async_pixel_transfer_manager_->GetTextureUploadCount();
}
|
C
|
Chrome
| 0 |
CVE-2011-4324
|
https://www.cvedetails.com/cve/CVE-2011-4324/
| null |
https://github.com/torvalds/linux/commit/dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
|
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
|
NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <[email protected]>
|
static void nfs_alloc_unique_id(struct rb_root *root, struct nfs_unique_id *new,
__u64 minval, int maxbits)
{
struct rb_node **p, *parent;
struct nfs_unique_id *pos;
__u64 mask = ~0ULL;
if (maxbits < 64)
mask = (1ULL << maxbits) - 1ULL;
/* Ensure distribution is more or less flat */
get_random_bytes(&new->id, sizeof(new->id));
new->id &= mask;
if (new->id < minval)
new->id += minval;
retry:
p = &root->rb_node;
parent = NULL;
while (*p != NULL) {
parent = *p;
pos = rb_entry(parent, struct nfs_unique_id, rb_node);
if (new->id < pos->id)
p = &(*p)->rb_left;
else if (new->id > pos->id)
p = &(*p)->rb_right;
else
goto id_exists;
}
rb_link_node(&new->rb_node, parent, p);
rb_insert_color(&new->rb_node, root);
return;
id_exists:
for (;;) {
new->id++;
if (new->id < minval || (new->id & mask) != new->id) {
new->id = minval;
break;
}
parent = rb_next(parent);
if (parent == NULL)
break;
pos = rb_entry(parent, struct nfs_unique_id, rb_node);
if (new->id < pos->id)
break;
}
goto retry;
}
|
static void nfs_alloc_unique_id(struct rb_root *root, struct nfs_unique_id *new,
__u64 minval, int maxbits)
{
struct rb_node **p, *parent;
struct nfs_unique_id *pos;
__u64 mask = ~0ULL;
if (maxbits < 64)
mask = (1ULL << maxbits) - 1ULL;
/* Ensure distribution is more or less flat */
get_random_bytes(&new->id, sizeof(new->id));
new->id &= mask;
if (new->id < minval)
new->id += minval;
retry:
p = &root->rb_node;
parent = NULL;
while (*p != NULL) {
parent = *p;
pos = rb_entry(parent, struct nfs_unique_id, rb_node);
if (new->id < pos->id)
p = &(*p)->rb_left;
else if (new->id > pos->id)
p = &(*p)->rb_right;
else
goto id_exists;
}
rb_link_node(&new->rb_node, parent, p);
rb_insert_color(&new->rb_node, root);
return;
id_exists:
for (;;) {
new->id++;
if (new->id < minval || (new->id & mask) != new->id) {
new->id = minval;
break;
}
parent = rb_next(parent);
if (parent == NULL)
break;
pos = rb_entry(parent, struct nfs_unique_id, rb_node);
if (new->id < pos->id)
break;
}
goto retry;
}
|
C
|
linux
| 0 |
CVE-2016-1652
|
https://www.cvedetails.com/cve/CVE-2016-1652/
|
CWE-79
|
https://github.com/chromium/chromium/commit/7c5aa07be11cd63d953fbe66370c5869a52170bf
|
7c5aa07be11cd63d953fbe66370c5869a52170bf
|
Use install_static::GetAppGuid instead of the hardcoded string in BrandcodeConfigFetcher.
Bug: 769756
Change-Id: Ifdcb0a5145ffad1d563562e2b2ea2390ff074cdc
Reviewed-on: https://chromium-review.googlesource.com/1213178
Reviewed-by: Dominic Battré <[email protected]>
Commit-Queue: Vasilii Sukhanov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#590275}
|
bool XmlConfigParser::IsParsingData() const {
const std::string data_path[] = {"response", "app", "data"};
return elements_.size() == arraysize(data_path) &&
std::equal(elements_.begin(), elements_.end(), data_path);
}
|
bool XmlConfigParser::IsParsingData() const {
const std::string data_path[] = {"response", "app", "data"};
return elements_.size() == arraysize(data_path) &&
std::equal(elements_.begin(), elements_.end(), data_path);
}
|
C
|
Chrome
| 0 |
CVE-2014-3564
|
https://www.cvedetails.com/cve/CVE-2014-3564/
|
CWE-119
|
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=2cbd76f7911fc215845e89b50d6af5ff4a83dd77
|
2cbd76f7911fc215845e89b50d6af5ff4a83dd77
| null |
gpgsm_sign (void *engine, gpgme_data_t in, gpgme_data_t out,
gpgme_sig_mode_t mode, int use_armor, int use_textmode,
int include_certs, gpgme_ctx_t ctx /* FIXME */)
{
engine_gpgsm_t gpgsm = engine;
gpgme_error_t err;
char *assuan_cmd;
int i;
gpgme_key_t key;
if (!gpgsm)
return gpg_error (GPG_ERR_INV_VALUE);
/* FIXME: This does not work as RESET does not reset it so we can't
revert back to default. */
if (include_certs != GPGME_INCLUDE_CERTS_DEFAULT)
{
/* FIXME: Make sure that if we run multiple operations, that we
can reset any previously set value in case the default is
requested. */
if (asprintf (&assuan_cmd, "OPTION include-certs %i", include_certs) < 0)
return gpg_error_from_syserror ();
err = gpgsm_assuan_simple_command (gpgsm->assuan_ctx, assuan_cmd,
NULL, NULL);
free (assuan_cmd);
if (err)
return err;
}
for (i = 0; (key = gpgme_signers_enum (ctx, i)); i++)
{
const char *s = key->subkeys ? key->subkeys->fpr : NULL;
if (s && strlen (s) < 80)
{
char buf[100];
strcpy (stpcpy (buf, "SIGNER "), s);
err = gpgsm_assuan_simple_command (gpgsm->assuan_ctx, buf,
gpgsm->status.fnc,
gpgsm->status.fnc_value);
}
else
err = gpg_error (GPG_ERR_INV_VALUE);
gpgme_key_unref (key);
if (err)
return err;
}
gpgsm->input_cb.data = in;
err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data));
if (err)
return err;
gpgsm->output_cb.data = out;
err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor"
: map_data_enc (gpgsm->output_cb.data));
if (err)
return err;
gpgsm_clear_fd (gpgsm, MESSAGE_FD);
gpgsm->inline_data = NULL;
err = start (gpgsm, mode == GPGME_SIG_MODE_DETACH
? "SIGN --detached" : "SIGN");
return err;
}
|
gpgsm_sign (void *engine, gpgme_data_t in, gpgme_data_t out,
gpgme_sig_mode_t mode, int use_armor, int use_textmode,
int include_certs, gpgme_ctx_t ctx /* FIXME */)
{
engine_gpgsm_t gpgsm = engine;
gpgme_error_t err;
char *assuan_cmd;
int i;
gpgme_key_t key;
if (!gpgsm)
return gpg_error (GPG_ERR_INV_VALUE);
/* FIXME: This does not work as RESET does not reset it so we can't
revert back to default. */
if (include_certs != GPGME_INCLUDE_CERTS_DEFAULT)
{
/* FIXME: Make sure that if we run multiple operations, that we
can reset any previously set value in case the default is
requested. */
if (asprintf (&assuan_cmd, "OPTION include-certs %i", include_certs) < 0)
return gpg_error_from_syserror ();
err = gpgsm_assuan_simple_command (gpgsm->assuan_ctx, assuan_cmd,
NULL, NULL);
free (assuan_cmd);
if (err)
return err;
}
for (i = 0; (key = gpgme_signers_enum (ctx, i)); i++)
{
const char *s = key->subkeys ? key->subkeys->fpr : NULL;
if (s && strlen (s) < 80)
{
char buf[100];
strcpy (stpcpy (buf, "SIGNER "), s);
err = gpgsm_assuan_simple_command (gpgsm->assuan_ctx, buf,
gpgsm->status.fnc,
gpgsm->status.fnc_value);
}
else
err = gpg_error (GPG_ERR_INV_VALUE);
gpgme_key_unref (key);
if (err)
return err;
}
gpgsm->input_cb.data = in;
err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data));
if (err)
return err;
gpgsm->output_cb.data = out;
err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor"
: map_data_enc (gpgsm->output_cb.data));
if (err)
return err;
gpgsm_clear_fd (gpgsm, MESSAGE_FD);
gpgsm->inline_data = NULL;
err = start (gpgsm, mode == GPGME_SIG_MODE_DETACH
? "SIGN --detached" : "SIGN");
return err;
}
|
C
|
gnupg
| 0 |
CVE-2016-6263
|
https://www.cvedetails.com/cve/CVE-2016-6263/
|
CWE-125
|
https://git.savannah.gnu.org/cgit/libidn.git/commit/?id=1fbee57ef3c72db2206dd87e4162108b2f425555
|
1fbee57ef3c72db2206dd87e4162108b2f425555
| null |
stringprep_unichar_to_utf8 (uint32_t c, char *outbuf)
{
return g_unichar_to_utf8 (c, outbuf);
}
|
stringprep_unichar_to_utf8 (uint32_t c, char *outbuf)
{
return g_unichar_to_utf8 (c, outbuf);
}
|
C
|
savannah
| 0 |
CVE-2016-7411
|
https://www.cvedetails.com/cve/CVE-2016-7411/
|
CWE-119
|
https://github.com/php/php-src/commit/6a7cc8ff85827fa9ac715b3a83c2d9147f33cd43?w=1
|
6a7cc8ff85827fa9ac715b3a83c2d9147f33cd43?w=1
|
Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction
|
ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects TSRMLS_DC)
{
zend_uint i;
if (!objects->object_buckets) {
return;
}
for (i = 1; i < objects->top ; i++) {
if (objects->object_buckets[i].valid) {
objects->object_buckets[i].destructor_called = 1;
}
}
}
|
ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects TSRMLS_DC)
{
zend_uint i;
if (!objects->object_buckets) {
return;
}
for (i = 1; i < objects->top ; i++) {
if (objects->object_buckets[i].valid) {
objects->object_buckets[i].destructor_called = 1;
}
}
}
|
C
|
php-src
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/27c68f543e5eba779902447445dfb05ec3f5bf75
|
27c68f543e5eba779902447445dfb05ec3f5bf75
|
Revert of Add accelerated VP9 decode infrastructure and an implementation for VA-API. (patchset #7 id:260001 of https://codereview.chromium.org/1318863003/ )
Reason for revert:
I think this patch broke compile step for Chromium Linux ChromeOS MSan Builder.
First failing build:
http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Linux%20ChromeOS%20MSan%20Builder/builds/8310
All recent builds:
http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Linux%20ChromeOS%20MSan%20Builder?numbuilds=200
Sorry for the revert. I'll re-revert if I'm wrong.
Cheers,
Tommy
Original issue's description:
> Add accelerated VP9 decode infrastructure and an implementation for VA-API.
>
> - Add a hardware/platform-independent VP9Decoder class and related
> infrastructure, implementing AcceleratedVideoDecoder interface. VP9Decoder
> performs the initial stages of the decode process, which are to be done
> on host/in software, such as stream parsing and reference frame management.
>
> - Add a VP9Accelerator interface, used by the VP9Decoder to offload the
> remaining stages of the decode process to hardware. VP9Accelerator
> implementations are platform-specific.
>
> - Add the first implementation of VP9Accelerator - VaapiVP9Accelerator - and
> integrate it with VaapiVideoDecodeAccelerator, for devices which provide
> hardware VP9 acceleration through VA-API. Hook it up to the new
> infrastructure and VP9Decoder.
>
> - Extend Vp9Parser to provide functionality required by VP9Decoder and
> VP9Accelerator, including superframe parsing, handling of loop filter
> and segmentation initialization, state persistence across frames and
> resetting when needed. Also add code calculating segmentation dequants
> and loop filter levels.
>
> - Update vp9_parser_unittest to the new Vp9Parser interface and flow.
>
> TEST=vp9_parser_unittest,vda_unittest,Chrome VP9 playback
> BUG=chrome-os-partner:41469,chrome-os-partner:41470,chromium:525331
> [email protected]
>
> Committed: https://crrev.com/e3cc0a661b8abfdc74f569940949bc1f336ece40
> Cr-Commit-Position: refs/heads/master@{#349312}
[email protected],[email protected],[email protected],[email protected],[email protected]
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chrome-os-partner:41469,chrome-os-partner:41470,chromium:525331
Review URL: https://codereview.chromium.org/1357513002
Cr-Commit-Position: refs/heads/master@{#349443}
|
bool VaapiWrapper::SubmitBuffer(VABufferType va_buffer_type,
size_t size,
void* buffer) {
base::AutoLock auto_lock(*va_lock_);
VABufferID buffer_id;
VAStatus va_res = vaCreateBuffer(va_display_, va_context_id_,
va_buffer_type, size,
1, buffer, &buffer_id);
VA_SUCCESS_OR_RETURN(va_res, "Failed to create a VA buffer", false);
switch (va_buffer_type) {
case VASliceParameterBufferType:
case VASliceDataBufferType:
case VAEncSliceParameterBufferType:
pending_slice_bufs_.push_back(buffer_id);
break;
default:
pending_va_bufs_.push_back(buffer_id);
break;
}
return true;
}
|
bool VaapiWrapper::SubmitBuffer(VABufferType va_buffer_type,
size_t size,
void* buffer) {
base::AutoLock auto_lock(*va_lock_);
VABufferID buffer_id;
VAStatus va_res = vaCreateBuffer(va_display_, va_context_id_,
va_buffer_type, size,
1, buffer, &buffer_id);
VA_SUCCESS_OR_RETURN(va_res, "Failed to create a VA buffer", false);
switch (va_buffer_type) {
case VASliceParameterBufferType:
case VASliceDataBufferType:
case VAEncSliceParameterBufferType:
pending_slice_bufs_.push_back(buffer_id);
break;
default:
pending_va_bufs_.push_back(buffer_id);
break;
}
return true;
}
|
C
|
Chrome
| 0 |
CVE-2013-6663
|
https://www.cvedetails.com/cve/CVE-2013-6663/
|
CWE-399
|
https://github.com/chromium/chromium/commit/fb5dce12f0462056fc9f66967b0f7b2b7bcd88f5
|
fb5dce12f0462056fc9f66967b0f7b2b7bcd88f5
|
One polymer_config.js to rule them all.
[email protected],[email protected],[email protected]
BUG=425626
Review URL: https://codereview.chromium.org/1224783005
Cr-Commit-Position: refs/heads/master@{#337882}
|
void OobeUI::OnShutdownPolicyChanged(bool reboot_on_shutdown) {
core_handler_->UpdateShutdownAndRebootVisibility(reboot_on_shutdown);
}
|
void OobeUI::OnShutdownPolicyChanged(bool reboot_on_shutdown) {
core_handler_->UpdateShutdownAndRebootVisibility(reboot_on_shutdown);
}
|
C
|
Chrome
| 0 |
CVE-2011-3084
|
https://www.cvedetails.com/cve/CVE-2011-3084/
|
CWE-264
|
https://github.com/chromium/chromium/commit/744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
Allow browser to handle all WebUI navigations.
BUG=113496
TEST="Google Dashboard" link in Sync settings loads in new process.
Review URL: http://codereview.chromium.org/9663045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126949 0039d316-1c4b-4281-b951-d872f2087c98
|
WebKit::WebUserMediaClient* RenderViewImpl::userMediaClient() {
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
if (!cmd_line->HasSwitch(switches::kEnableMediaStream))
return NULL;
EnsureMediaStreamImpl();
return media_stream_impl_;
}
|
WebKit::WebUserMediaClient* RenderViewImpl::userMediaClient() {
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
if (!cmd_line->HasSwitch(switches::kEnableMediaStream))
return NULL;
EnsureMediaStreamImpl();
return media_stream_impl_;
}
|
C
|
Chrome
| 0 |
CVE-2017-15415
|
https://www.cvedetails.com/cve/CVE-2017-15415/
|
CWE-119
|
https://github.com/chromium/chromium/commit/dc5edc9c05901feeac616c075d0337e634f3a02a
|
dc5edc9c05901feeac616c075d0337e634f3a02a
|
Serialize struct tm in a safe way.
BUG=765512
Change-Id: If235b8677eb527be2ac0fe621fc210e4116a7566
Reviewed-on: https://chromium-review.googlesource.com/679441
Commit-Queue: Chris Palmer <[email protected]>
Reviewed-by: Julien Tinnes <[email protected]>
Cr-Commit-Position: refs/heads/master@{#503948}
|
void CloseFds(const std::vector<int>& fds) {
for (const auto& it : fds) {
PCHECK(0 == IGNORE_EINTR(close(it)));
}
}
|
void CloseFds(const std::vector<int>& fds) {
for (const auto& it : fds) {
PCHECK(0 == IGNORE_EINTR(close(it)));
}
}
|
C
|
Chrome
| 0 |
CVE-2019-5810
|
https://www.cvedetails.com/cve/CVE-2019-5810/
|
CWE-200
|
https://github.com/chromium/chromium/commit/0bd10e13a008389ec14bbe7cc95f17d82ea151c1
|
0bd10e13a008389ec14bbe7cc95f17d82ea151c1
|
[autofill] Pin preview font-family to a system font
Bug: 916838
Change-Id: I4e874105262f2e15a11a7a18a7afd204e5827400
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1423109
Reviewed-by: Fabio Tirelo <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Commit-Queue: Roger McFarlane <[email protected]>
Cr-Commit-Position: refs/heads/master@{#640884}
|
WebInputElement GetInputElementById(const WebString& id) {
return GetMainFrame()
->GetDocument()
.GetElementById(id)
.To<WebInputElement>();
}
|
WebInputElement GetInputElementById(const WebString& id) {
return GetMainFrame()
->GetDocument()
.GetElementById(id)
.To<WebInputElement>();
}
|
C
|
Chrome
| 0 |
CVE-2013-0904
|
https://www.cvedetails.com/cve/CVE-2013-0904/
|
CWE-119
|
https://github.com/chromium/chromium/commit/b2b21468c1f7f08b30a7c1755316f6026c50eb2a
|
b2b21468c1f7f08b30a7c1755316f6026c50eb2a
|
Separate repaint and layout requirements of StyleDifference (Step 1)
Previously StyleDifference was an enum that proximately bigger values
imply smaller values (e.g. StyleDifferenceLayout implies
StyleDifferenceRepaint). This causes unnecessary repaints in some cases
on layout change.
Convert StyleDifference to a structure containing relatively independent
flags.
This change doesn't directly improve the result, but can make further
repaint optimizations possible.
Step 1 doesn't change any functionality. RenderStyle still generate the
legacy StyleDifference enum when comparing styles and convert the result
to the new StyleDifference. Implicit requirements are not handled during
the conversion.
Converted call sites to use the new StyleDifference according to the
following conversion rules:
- diff == StyleDifferenceEqual (&& !context) => diff.hasNoChange()
- diff == StyleDifferenceRepaint => diff.needsRepaintObjectOnly()
- diff == StyleDifferenceRepaintLayer => diff.needsRepaintLayer()
- diff == StyleDifferenceRepaint || diff == StyleDifferenceRepaintLayer => diff.needsRepaintLayer()
- diff >= StyleDifferenceRepaint => diff.needsRepaint() || diff.needsLayout()
- diff >= StyleDifferenceRepaintLayer => diff.needsRepaintLayer() || diff.needsLayout()
- diff > StyleDifferenceRepaintLayer => diff.needsLayout()
- diff == StyleDifferencePositionedMovementLayoutOnly => diff.needsPositionedMovementLayoutOnly()
- diff == StyleDifferenceLayout => diff.needsFullLayout()
BUG=358460
TEST=All existing layout tests.
[email protected], [email protected], [email protected]
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171983
Review URL: https://codereview.chromium.org/236203020
git-svn-id: svn://svn.chromium.org/blink/trunk@172331 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void RenderBlock::removePercentHeightDescendantIfNeeded(RenderBox* descendant)
{
if (!hasPercentHeightContainerMap())
return;
if (!hasPercentHeightDescendant(descendant))
return;
removePercentHeightDescendant(descendant);
}
|
void RenderBlock::removePercentHeightDescendantIfNeeded(RenderBox* descendant)
{
if (!hasPercentHeightContainerMap())
return;
if (!hasPercentHeightDescendant(descendant))
return;
removePercentHeightDescendant(descendant);
}
|
C
|
Chrome
| 0 |
CVE-2011-1292
|
https://www.cvedetails.com/cve/CVE-2011-1292/
|
CWE-399
|
https://github.com/chromium/chromium/commit/5f372f899b8709dac700710b5f0f90959dcf9ecb
|
5f372f899b8709dac700710b5f0f90959dcf9ecb
|
Add support for autofill server experiments
BUG=none
TEST=unit_tests --gtest_filter=AutoFillMetricsTest.QualityMetricsWithExperimentId:AutoFillQueryXmlParserTest.ParseExperimentId
Review URL: http://codereview.chromium.org/6260027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73216 0039d316-1c4b-4281-b951-d872f2087c98
|
void AutoFillManager::UnpackGUIDs(int id,
std::string* cc_guid,
std::string* profile_guid) {
int cc_id = id >> std::numeric_limits<unsigned short>::digits &
std::numeric_limits<unsigned short>::max();
int profile_id = id & std::numeric_limits<unsigned short>::max();
*cc_guid = IDToGUID(cc_id);
*profile_guid = IDToGUID(profile_id);
}
|
void AutoFillManager::UnpackGUIDs(int id,
std::string* cc_guid,
std::string* profile_guid) {
int cc_id = id >> std::numeric_limits<unsigned short>::digits &
std::numeric_limits<unsigned short>::max();
int profile_id = id & std::numeric_limits<unsigned short>::max();
*cc_guid = IDToGUID(cc_id);
*profile_guid = IDToGUID(profile_id);
}
|
C
|
Chrome
| 0 |
CVE-2016-3834
|
https://www.cvedetails.com/cve/CVE-2016-3834/
|
CWE-200
|
https://android.googlesource.com/platform/frameworks/av/+/1f24c730ab6ca5aff1e3137b340b8aeaeda4bdbc
|
1f24c730ab6ca5aff1e3137b340b8aeaeda4bdbc
|
DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak
Subtract address of a random static object from pointers being routed
through app process.
Bug: 28466701
Change-Id: Idcbfe81e9507433769672f3dc6d67db5eeed4e04
|
bool StreamingProcessor::threadLoop() {
status_t res;
{
Mutex::Autolock l(mMutex);
while (!mRecordingFrameAvailable) {
res = mRecordingFrameAvailableSignal.waitRelative(
mMutex, kWaitDuration);
if (res == TIMED_OUT) return true;
}
mRecordingFrameAvailable = false;
}
do {
res = processRecordingFrame();
} while (res == OK);
return true;
}
|
bool StreamingProcessor::threadLoop() {
status_t res;
{
Mutex::Autolock l(mMutex);
while (!mRecordingFrameAvailable) {
res = mRecordingFrameAvailableSignal.waitRelative(
mMutex, kWaitDuration);
if (res == TIMED_OUT) return true;
}
mRecordingFrameAvailable = false;
}
do {
res = processRecordingFrame();
} while (res == OK);
return true;
}
|
C
|
Android
| 0 |
CVE-2011-3193
|
https://www.cvedetails.com/cve/CVE-2011-3193/
|
CWE-119
|
https://cgit.freedesktop.org/harfbuzz.old/commit/?id=81c8ef785b079980ad5b46be4fe7c7bf156dbf65
|
81c8ef785b079980ad5b46be4fe7c7bf156dbf65
| null |
static void Free_ContextPos2( HB_ContextPosFormat2* cpf2 )
{
HB_UShort n, count;
HB_PosClassSet* pcs;
if ( cpf2->PosClassSet )
{
count = cpf2->PosClassSetCount;
pcs = cpf2->PosClassSet;
for ( n = 0; n < count; n++ )
Free_PosClassSet( &pcs[n] );
FREE( pcs );
}
_HB_OPEN_Free_ClassDefinition( &cpf2->ClassDef );
_HB_OPEN_Free_Coverage( &cpf2->Coverage );
}
|
static void Free_ContextPos2( HB_ContextPosFormat2* cpf2 )
{
HB_UShort n, count;
HB_PosClassSet* pcs;
if ( cpf2->PosClassSet )
{
count = cpf2->PosClassSetCount;
pcs = cpf2->PosClassSet;
for ( n = 0; n < count; n++ )
Free_PosClassSet( &pcs[n] );
FREE( pcs );
}
_HB_OPEN_Free_ClassDefinition( &cpf2->ClassDef );
_HB_OPEN_Free_Coverage( &cpf2->Coverage );
}
|
C
|
harfbuzz
| 0 |
CVE-2018-6063
|
https://www.cvedetails.com/cve/CVE-2018-6063/
|
CWE-787
|
https://github.com/chromium/chromium/commit/673ce95d481ea9368c4d4d43ac756ba1d6d9e608
|
673ce95d481ea9368c4d4d43ac756ba1d6d9e608
|
Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which
were assuming that the call actually has any control over the memory
protection applied to a handle when mapped.
Where fixing usage is infeasible for this CL, TODOs are added to
annotate follow-up work.
Also updates the API and documentation to (hopefully) improve clarity
and avoid similar mistakes from being made in the future.
BUG=792900
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I0578aaa9ca3bfcb01aaf2451315d1ede95458477
Reviewed-on: https://chromium-review.googlesource.com/818282
Reviewed-by: Wei Li <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Sadrul Chowdhury <[email protected]>
Reviewed-by: Yuzhu Shen <[email protected]>
Reviewed-by: Robert Sesek <[email protected]>
Commit-Queue: Ken Rockot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#530268}
|
void BrowserChildProcessHostImpl::TerminateAll() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
BrowserChildProcessList copy = g_child_process_list.Get();
for (BrowserChildProcessList::iterator it = copy.begin();
it != copy.end(); ++it) {
delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl.
}
}
|
void BrowserChildProcessHostImpl::TerminateAll() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
BrowserChildProcessList copy = g_child_process_list.Get();
for (BrowserChildProcessList::iterator it = copy.begin();
it != copy.end(); ++it) {
delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl.
}
}
|
C
|
Chrome
| 0 |
CVE-2014-9718
|
https://www.cvedetails.com/cve/CVE-2014-9718/
|
CWE-399
|
https://git.qemu.org/?p=qemu.git;a=commit;h=3251bdcf1c67427d964517053c3d185b46e618e8
|
3251bdcf1c67427d964517053c3d185b46e618e8
| null |
void ide_set_inactive(IDEState *s, bool more)
{
s->bus->dma->aiocb = NULL;
if (s->bus->dma->ops->set_inactive) {
s->bus->dma->ops->set_inactive(s->bus->dma, more);
}
ide_cmd_done(s);
}
|
void ide_set_inactive(IDEState *s, bool more)
{
s->bus->dma->aiocb = NULL;
if (s->bus->dma->ops->set_inactive) {
s->bus->dma->ops->set_inactive(s->bus->dma, more);
}
ide_cmd_done(s);
}
|
C
|
qemu
| 0 |
CVE-2018-6060
|
https://www.cvedetails.com/cve/CVE-2018-6060/
|
CWE-416
|
https://github.com/chromium/chromium/commit/fd6a5115103b3e6a52ce15858c5ad4956df29300
|
fd6a5115103b3e6a52ce15858c5ad4956df29300
|
Revert "Keep AudioHandlers alive until they can be safely deleted."
This reverts commit 071df33edf2c8b4375fa432a83953359f93ea9e4.
Reason for revert:
This CL seems to cause an AudioNode leak on the Linux leak bot.
The log is:
https://ci.chromium.org/buildbot/chromium.webkit/WebKit%20Linux%20Trusty%20Leak/14252
* webaudio/AudioNode/audionode-connect-method-chaining.html
* webaudio/Panner/pannernode-basic.html
* webaudio/dom-exceptions.html
Original change's description:
> Keep AudioHandlers alive until they can be safely deleted.
>
> When an AudioNode is disposed, the handler is also disposed. But add
> the handler to the orphan list so that the handler stays alive until
> the context can safely delete it. If we don't do this, the handler
> may get deleted while the audio thread is processing the handler (due
> to, say, channel count changes and such).
>
> For an realtime context, always save the handler just in case the
> audio thread is running after the context is marked as closed (because
> the audio thread doesn't instantly stop when requested).
>
> For an offline context, only need to do this when the context is
> running because the context is guaranteed to be stopped if we're not
> in the running state. Hence, there's no possibility of deleting the
> handler while the graph is running.
>
> This is a revert of
> https://chromium-review.googlesource.com/c/chromium/src/+/860779, with
> a fix for the leak.
>
> Bug: 780919
> Change-Id: Ifb6b5fcf3fbc373f5779256688731245771da33c
> Reviewed-on: https://chromium-review.googlesource.com/862723
> Reviewed-by: Hongchan Choi <[email protected]>
> Commit-Queue: Raymond Toy <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#528829}
[email protected],[email protected]
Change-Id: Ibf406bf6ed34ea1f03e86a64a1e5ba6de0970c6f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 780919
Reviewed-on: https://chromium-review.googlesource.com/863402
Reviewed-by: Taiju Tsuiki <[email protected]>
Commit-Queue: Taiju Tsuiki <[email protected]>
Cr-Commit-Position: refs/heads/master@{#528888}
|
unsigned AudioNode::numberOfInputs() const {
return Handler().NumberOfInputs();
}
|
unsigned AudioNode::numberOfInputs() const {
return Handler().NumberOfInputs();
}
|
C
|
Chrome
| 0 |
CVE-2012-2890
|
https://www.cvedetails.com/cve/CVE-2012-2890/
|
CWE-399
|
https://github.com/chromium/chromium/commit/a6f7726de20450074a01493e4e85409ce3f2595a
|
a6f7726de20450074a01493e4e85409ce3f2595a
|
Unreviewed, rolling out r147402.
http://trac.webkit.org/changeset/147402
https://bugs.webkit.org/show_bug.cgi?id=112903
Source/WebCore:
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
LayoutTests:
* http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html:
* http/tests/security/XFrameOptions/x-frame-options-deny.html:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny.html:
* http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:
git-svn-id: svn://svn.chromium.org/blink/trunk@147450 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
String Document::referrer() const
{
if (frame())
return frame()->loader()->referrer();
return String();
}
|
String Document::referrer() const
{
if (frame())
return frame()->loader()->referrer();
return String();
}
|
C
|
Chrome
| 0 |
CVE-2012-2900
|
https://www.cvedetails.com/cve/CVE-2012-2900/
| null |
https://github.com/chromium/chromium/commit/9597042cad54926f50d58f5ada39205eb734d7be
|
9597042cad54926f50d58f5ada39205eb734d7be
|
Revert 137988 - VAVDA is the hardware video decode accelerator for Chrome on Linux and ChromeOS for Intel CPUs (Sandy Bridge and newer).
This CL enables VAVDA acceleration for ChromeOS, both for HTML5 video and Flash.
The feature is currently hidden behind a command line flag and can be enabled by adding the --enable-vaapi parameter to command line.
BUG=117062
TEST=Manual runs of test streams.
Change-Id: I386e16739e2ef2230f52a0a434971b33d8654699
Review URL: https://chromiumcodereview.appspot.com/9814001
This is causing crbug.com/129103
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10411066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138208 0039d316-1c4b-4281-b951-d872f2087c98
|
void GpuProcessHost::EstablishGpuChannel(
int client_id,
bool share_context,
const EstablishChannelCallback& callback) {
DCHECK(CalledOnValidThread());
TRACE_EVENT0("gpu", "GpuProcessHostUIShim::EstablishGpuChannel");
if (!GpuDataManagerImpl::GetInstance()->GpuAccessAllowed()) {
EstablishChannelError(
callback, IPC::ChannelHandle(),
base::kNullProcessHandle, content::GPUInfo());
return;
}
if (Send(new GpuMsg_EstablishChannel(client_id, share_context))) {
channel_requests_.push(callback);
} else {
EstablishChannelError(
callback, IPC::ChannelHandle(),
base::kNullProcessHandle, content::GPUInfo());
}
}
|
void GpuProcessHost::EstablishGpuChannel(
int client_id,
bool share_context,
const EstablishChannelCallback& callback) {
DCHECK(CalledOnValidThread());
TRACE_EVENT0("gpu", "GpuProcessHostUIShim::EstablishGpuChannel");
if (!GpuDataManagerImpl::GetInstance()->GpuAccessAllowed()) {
EstablishChannelError(
callback, IPC::ChannelHandle(),
base::kNullProcessHandle, content::GPUInfo());
return;
}
if (Send(new GpuMsg_EstablishChannel(client_id, share_context))) {
channel_requests_.push(callback);
} else {
EstablishChannelError(
callback, IPC::ChannelHandle(),
base::kNullProcessHandle, content::GPUInfo());
}
}
|
C
|
Chrome
| 0 |
CVE-2015-6763
|
https://www.cvedetails.com/cve/CVE-2015-6763/
| null |
https://github.com/chromium/chromium/commit/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables secure text input
when activated and it's in the secure text entry mode.
RenderWidgetHostViewMac did the similar thing for ages following the
WebKit example.
views::Textfield needs to do the same thing in a fashion that's
sycnrhonized with RenderWidgetHostViewMac, otherwise the race conditions
are possible when the Textfield gets focus, activates the secure text
input mode and the RWHVM loses focus immediately afterwards and disables
the secure text input instead of leaving it in the enabled state.
BUG=818133,677220
Change-Id: I6db6c4b59e4a1a72cbb7f8c7056f71b04a3df08b
Reviewed-on: https://chromium-review.googlesource.com/943064
Commit-Queue: Michail Pishchagin <[email protected]>
Reviewed-by: Pavel Feldman <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Peter Kasting <[email protected]>
Cr-Commit-Position: refs/heads/master@{#542517}
|
bool HTMLInputElement::checked() const {
input_type_->ReadingChecked();
return is_checked_;
}
|
bool HTMLInputElement::checked() const {
input_type_->ReadingChecked();
return is_checked_;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/f7fdd2894ef51ee234882fa2457bb1f2a8895cbe
|
f7fdd2894ef51ee234882fa2457bb1f2a8895cbe
|
Makes the extension resize gripper only visible when the mouse is over
it.
BUG=45750
TEST=see bug
Review URL: http://codereview.chromium.org/2800022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50515 0039d316-1c4b-4281-b951-d872f2087c98
|
void ResizeGripper::OnMouseReleased(const views::MouseEvent& event,
bool canceled) {
if (canceled)
ReportResizeAmount(initial_position_, true);
else
ReportResizeAmount(event.x(), true);
SetGripperVisible(HitTest(event.location()));
}
|
void ResizeGripper::OnMouseReleased(const views::MouseEvent& event,
bool canceled) {
if (canceled)
ReportResizeAmount(initial_position_, true);
else
ReportResizeAmount(event.x(), true);
}
|
C
|
Chrome
| 1 |
CVE-2018-6178
|
https://www.cvedetails.com/cve/CVE-2018-6178/
|
CWE-254
|
https://github.com/chromium/chromium/commit/fbeba958bb83c05ec8cc54e285a4a9ca10d1b311
|
fbeba958bb83c05ec8cc54e285a4a9ca10d1b311
|
Allow to specify elide behavior for confrim infobar message
Used in "<extension name> is debugging this browser" infobar.
Bug: 823194
Change-Id: Iff6627097c020cccca8f7cc3e21a803a41fd8f2c
Reviewed-on: https://chromium-review.googlesource.com/1048064
Commit-Queue: Dmitry Gozman <[email protected]>
Reviewed-by: Devlin <[email protected]>
Reviewed-by: Peter Kasting <[email protected]>
Cr-Commit-Position: refs/heads/master@{#557245}
|
base::string16 ConfirmInfoBarDelegate::GetButtonLabel(
InfoBarButton button) const {
return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
IDS_APP_OK : IDS_APP_CANCEL);
}
|
base::string16 ConfirmInfoBarDelegate::GetButtonLabel(
InfoBarButton button) const {
return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
IDS_APP_OK : IDS_APP_CANCEL);
}
|
C
|
Chrome
| 0 |
CVE-2011-2918
|
https://www.cvedetails.com/cve/CVE-2011-2918/
|
CWE-399
|
https://github.com/torvalds/linux/commit/a8b0ca17b80e92faab46ee7179ba9e99ccb61233
|
a8b0ca17b80e92faab46ee7179ba9e99ccb61233
|
perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter indicated if we could do wakeups from the current
context, if not, we would set some state and self-IPI and let the
resulting interrupt do the wakeup.
For the various event classes:
- hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from
the PMI-tail (ARM etc.)
- tracepoint: nmi=0; since tracepoint could be from NMI context.
- software: nmi=[0,1]; some, like the schedule thing cannot
perform wakeups, and hence need 0.
As one can see, there is very little nmi=1 usage, and the down-side of
not using it is that on some platforms some software events can have a
jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).
The up-side however is that we can remove the nmi parameter and save a
bunch of conditionals in fast paths.
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Michael Cree <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Deng-Cheng Zhu <[email protected]>
Cc: Anton Blanchard <[email protected]>
Cc: Eric B Munson <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jason Wessel <[email protected]>
Cc: Don Zickus <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
|
static int perf_swevent_add(struct perf_event *event, int flags)
{
struct swevent_htable *swhash = &__get_cpu_var(swevent_htable);
struct hw_perf_event *hwc = &event->hw;
struct hlist_head *head;
if (is_sampling_event(event)) {
hwc->last_period = hwc->sample_period;
perf_swevent_set_period(event);
}
hwc->state = !(flags & PERF_EF_START);
head = find_swevent_head(swhash, event);
if (WARN_ON_ONCE(!head))
return -EINVAL;
hlist_add_head_rcu(&event->hlist_entry, head);
return 0;
}
|
static int perf_swevent_add(struct perf_event *event, int flags)
{
struct swevent_htable *swhash = &__get_cpu_var(swevent_htable);
struct hw_perf_event *hwc = &event->hw;
struct hlist_head *head;
if (is_sampling_event(event)) {
hwc->last_period = hwc->sample_period;
perf_swevent_set_period(event);
}
hwc->state = !(flags & PERF_EF_START);
head = find_swevent_head(swhash, event);
if (WARN_ON_ONCE(!head))
return -EINVAL;
hlist_add_head_rcu(&event->hlist_entry, head);
return 0;
}
|
C
|
linux
| 0 |
CVE-2012-0028
|
https://www.cvedetails.com/cve/CVE-2012-0028/
|
CWE-264
|
https://github.com/torvalds/linux/commit/8141c7f3e7aee618312fa1c15109e1219de784a7
|
8141c7f3e7aee618312fa1c15109e1219de784a7
|
Move "exit_robust_list" into mm_release()
We don't want to get rid of the futexes just at exit() time, we want to
drop them when doing an execve() too, since that gets rid of the
previous VM image too.
Doing it at mm_release() time means that we automatically always do it
when we disassociate a VM map from the task.
Reported-by: [email protected]
Cc: Andrew Morton <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Brad Spengler <[email protected]>
Cc: Alex Efros <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
void mmput(struct mm_struct *mm)
{
might_sleep();
if (atomic_dec_and_test(&mm->mm_users)) {
exit_aio(mm);
exit_mmap(mm);
set_mm_exe_file(mm, NULL);
if (!list_empty(&mm->mmlist)) {
spin_lock(&mmlist_lock);
list_del(&mm->mmlist);
spin_unlock(&mmlist_lock);
}
put_swap_token(mm);
mmdrop(mm);
}
}
|
void mmput(struct mm_struct *mm)
{
might_sleep();
if (atomic_dec_and_test(&mm->mm_users)) {
exit_aio(mm);
exit_mmap(mm);
set_mm_exe_file(mm, NULL);
if (!list_empty(&mm->mmlist)) {
spin_lock(&mmlist_lock);
list_del(&mm->mmlist);
spin_unlock(&mmlist_lock);
}
put_swap_token(mm);
mmdrop(mm);
}
}
|
C
|
linux
| 0 |
CVE-2015-0278
|
https://www.cvedetails.com/cve/CVE-2015-0278/
|
CWE-264
|
https://github.com/libuv/libuv/commit/66ab38918c911bcff025562cf06237d7fedaba0c
|
66ab38918c911bcff025562cf06237d7fedaba0c
|
unix: call setgoups before calling setuid/setgid
Partial fix for #1093
|
int uv_process_kill(uv_process_t* process, int signum) {
return uv_kill(process->pid, signum);
}
|
int uv_process_kill(uv_process_t* process, int signum) {
return uv_kill(process->pid, signum);
}
|
C
|
libuv
| 0 |
CVE-2013-2916
|
https://www.cvedetails.com/cve/CVE-2013-2916/
| null |
https://github.com/chromium/chromium/commit/47a054e9ad826421b789097d82b44c102ab6ac97
|
47a054e9ad826421b789097d82b44c102ab6ac97
|
Don't wait to notify client of spoof attempt if a modal dialog is created.
BUG=281256
TEST=See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/23620020
git-svn-id: svn://svn.chromium.org/blink/trunk@157196 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void FrameLoader::receivedMainResourceError(const ResourceError& error)
{
RefPtr<Frame> protect(m_frame);
RefPtr<DocumentLoader> loader = activeDocumentLoader();
if (m_frame->document()->parser())
m_frame->document()->parser()->stopParsing();
ResourceError c(ResourceError::cancelledError(KURL()));
if (error.errorCode() != c.errorCode() || error.domain() != c.domain())
handleFallbackContent();
if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
m_client->dispatchDidFailProvisionalLoad(error);
if (loader != m_provisionalDocumentLoader)
return;
m_provisionalDocumentLoader->detachFromFrame();
m_provisionalDocumentLoader = 0;
m_progressTracker->progressCompleted();
m_state = FrameStateComplete;
RefPtr<HistoryItem> item = m_frame->page()->mainFrame()->loader()->history()->currentItem();
if (isBackForwardLoadType(loadType()) && !history()->provisionalItem() && item)
m_frame->page()->backForward().setCurrentItem(item.get());
}
checkCompleted();
if (m_frame->page())
checkLoadComplete();
}
|
void FrameLoader::receivedMainResourceError(const ResourceError& error)
{
RefPtr<Frame> protect(m_frame);
RefPtr<DocumentLoader> loader = activeDocumentLoader();
if (m_frame->document()->parser())
m_frame->document()->parser()->stopParsing();
ResourceError c(ResourceError::cancelledError(KURL()));
if (error.errorCode() != c.errorCode() || error.domain() != c.domain())
handleFallbackContent();
if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
m_client->dispatchDidFailProvisionalLoad(error);
if (loader != m_provisionalDocumentLoader)
return;
m_provisionalDocumentLoader->detachFromFrame();
m_provisionalDocumentLoader = 0;
m_progressTracker->progressCompleted();
m_state = FrameStateComplete;
RefPtr<HistoryItem> item = m_frame->page()->mainFrame()->loader()->history()->currentItem();
if (isBackForwardLoadType(loadType()) && !history()->provisionalItem() && item)
m_frame->page()->backForward().setCurrentItem(item.get());
}
checkCompleted();
if (m_frame->page())
checkLoadComplete();
}
|
C
|
Chrome
| 0 |
CVE-2016-9442
|
https://www.cvedetails.com/cve/CVE-2016-9442/
|
CWE-119
|
https://github.com/tats/w3m/commit/d43527cfa0dbb3ccefec4a6f7b32c1434739aa29
|
d43527cfa0dbb3ccefec4a6f7b32c1434739aa29
|
Merge pull request #27 from kcwu/fix-strgrow
Fix potential heap buffer corruption due to Strgrow
|
Strfree(Str x)
{
GC_free(x->ptr);
GC_free(x);
}
|
Strfree(Str x)
{
GC_free(x->ptr);
GC_free(x);
}
|
C
|
w3m
| 0 |
CVE-2019-11222
|
https://www.cvedetails.com/cve/CVE-2019-11222/
|
CWE-119
|
https://github.com/gpac/gpac/commit/f36525c5beafb78959c3a07d6622c9028de348da
|
f36525c5beafb78959c3a07d6622c9028de348da
|
fix buffer overrun in gf_bin128_parse
closes #1204
closes #1205
|
s32 gf_gettimeofday(struct timeval *tp, void *tz) {
return gettimeofday(tp, tz);
}
|
s32 gf_gettimeofday(struct timeval *tp, void *tz) {
return gettimeofday(tp, tz);
}
|
C
|
gpac
| 0 |
CVE-2013-7421
|
https://www.cvedetails.com/cve/CVE-2013-7421/
|
CWE-264
|
https://github.com/torvalds/linux/commit/5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypto API,
as demonstrated by Mathias Krause:
https://lkml.org/lkml/2013/3/4/70
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
static void xts_fallback_exit(struct crypto_tfm *tfm)
{
struct s390_xts_ctx *xts_ctx = crypto_tfm_ctx(tfm);
crypto_free_blkcipher(xts_ctx->fallback);
xts_ctx->fallback = NULL;
}
|
static void xts_fallback_exit(struct crypto_tfm *tfm)
{
struct s390_xts_ctx *xts_ctx = crypto_tfm_ctx(tfm);
crypto_free_blkcipher(xts_ctx->fallback);
xts_ctx->fallback = NULL;
}
|
C
|
linux
| 0 |
CVE-2018-6096
|
https://www.cvedetails.com/cve/CVE-2018-6096/
| null |
https://github.com/chromium/chromium/commit/36f801fdbec07d116a6f4f07bb363f10897d6a51
|
36f801fdbec07d116a6f4f07bb363f10897d6a51
|
If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8fc017
Reviewed-on: https://chromium-review.googlesource.com/852378
Reviewed-by: Nasko Oskov <[email protected]>
Reviewed-by: Philip Jägenstedt <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#533790}
|
void DOMWindow::focus(LocalDOMWindow* incumbent_window) {
if (!GetFrame())
return;
Page* page = GetFrame()->GetPage();
if (!page)
return;
DCHECK(incumbent_window);
ExecutionContext* incumbent_execution_context =
incumbent_window->GetExecutionContext();
bool allow_focus = incumbent_execution_context->IsWindowInteractionAllowed();
if (allow_focus) {
incumbent_execution_context->ConsumeWindowInteraction();
} else {
DCHECK(IsMainThread());
allow_focus =
opener() && (opener() != this) &&
(ToDocument(incumbent_execution_context)->domWindow() == opener());
}
if (GetFrame()->IsMainFrame() && allow_focus)
page->GetChromeClient().Focus(incumbent_window->GetFrame());
page->GetFocusController().FocusDocumentView(GetFrame(),
true /* notifyEmbedder */);
}
|
void DOMWindow::focus(LocalDOMWindow* incumbent_window) {
if (!GetFrame())
return;
Page* page = GetFrame()->GetPage();
if (!page)
return;
DCHECK(incumbent_window);
ExecutionContext* incumbent_execution_context =
incumbent_window->GetExecutionContext();
bool allow_focus = incumbent_execution_context->IsWindowInteractionAllowed();
if (allow_focus) {
incumbent_execution_context->ConsumeWindowInteraction();
} else {
DCHECK(IsMainThread());
allow_focus =
opener() && (opener() != this) &&
(ToDocument(incumbent_execution_context)->domWindow() == opener());
}
if (GetFrame()->IsMainFrame() && allow_focus)
page->GetChromeClient().Focus();
page->GetFocusController().FocusDocumentView(GetFrame(),
true /* notifyEmbedder */);
}
|
C
|
Chrome
| 1 |
CVE-2016-8654
|
https://www.cvedetails.com/cve/CVE-2016-8654/
|
CWE-119
|
https://github.com/mdadams/jasper/commit/4a59cfaf9ab3d48fca4a15c0d2674bf7138e3d1a
|
4a59cfaf9ab3d48fca4a15c0d2674bf7138e3d1a
|
Fixed a buffer overrun problem in the QMFB code in the JPC codec
that was caused by a buffer being allocated with a size that was too small
in some cases.
Added a new regression test case.
|
int jpc_ns_synthesize(jpc_fix_t *a, int xstart, int ystart, int width,
int height, int stride)
{
int numrows = height;
int numcols = width;
int rowparity = ystart & 1;
int colparity = xstart & 1;
int maxcols;
jpc_fix_t *startptr;
int i;
startptr = &a[0];
for (i = 0; i < numrows; ++i) {
jpc_ns_invlift_row(startptr, numcols, colparity);
jpc_qmfb_join_row(startptr, numcols, colparity);
startptr += stride;
}
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
startptr = &a[0];
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
jpc_ns_invlift_colgrp(startptr, numrows, stride, rowparity);
jpc_qmfb_join_colgrp(startptr, numrows, stride, rowparity);
startptr += JPC_QMFB_COLGRPSIZE;
}
if (maxcols < numcols) {
jpc_ns_invlift_colres(startptr, numrows, numcols - maxcols, stride,
rowparity);
jpc_qmfb_join_colres(startptr, numrows, numcols - maxcols, stride,
rowparity);
}
return 0;
}
|
int jpc_ns_synthesize(jpc_fix_t *a, int xstart, int ystart, int width,
int height, int stride)
{
int numrows = height;
int numcols = width;
int rowparity = ystart & 1;
int colparity = xstart & 1;
int maxcols;
jpc_fix_t *startptr;
int i;
startptr = &a[0];
for (i = 0; i < numrows; ++i) {
jpc_ns_invlift_row(startptr, numcols, colparity);
jpc_qmfb_join_row(startptr, numcols, colparity);
startptr += stride;
}
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
startptr = &a[0];
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
jpc_ns_invlift_colgrp(startptr, numrows, stride, rowparity);
jpc_qmfb_join_colgrp(startptr, numrows, stride, rowparity);
startptr += JPC_QMFB_COLGRPSIZE;
}
if (maxcols < numcols) {
jpc_ns_invlift_colres(startptr, numrows, numcols - maxcols, stride,
rowparity);
jpc_qmfb_join_colres(startptr, numrows, numcols - maxcols, stride,
rowparity);
}
return 0;
}
|
C
|
jasper
| 0 |
CVE-2014-3172
|
https://www.cvedetails.com/cve/CVE-2014-3172/
|
CWE-264
|
https://github.com/chromium/chromium/commit/684a212a93141908bcc10f4bc57f3edb53d2d21f
|
684a212a93141908bcc10f4bc57f3edb53d2d21f
|
Have the Debugger extension api check that it has access to the tab
Check PermissionsData::CanAccessTab() prior to attaching the debugger.
BUG=367567
Review URL: https://codereview.chromium.org/352523003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280354 0039d316-1c4b-4281-b951-d872f2087c98
|
DebuggerDetachFunction::DebuggerDetachFunction() {
}
|
DebuggerDetachFunction::DebuggerDetachFunction() {
}
|
C
|
Chrome
| 0 |
CVE-2013-7271
|
https://www.cvedetails.com/cve/CVE-2013-7271/
|
CWE-20
|
https://github.com/torvalds/linux/commit/f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
|
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
|
net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers and makes it harder for new code to accidentally leak
uninitialized memory.
Optimize for the case recvfrom is called with NULL as address. We don't
need to copy the address at all, so set it to NULL before invoking the
recvmsg handler. We can do so, because all the recvmsg handlers must
cope with the case a plain read() is called on them. read() also sets
msg_name to NULL.
Also document these changes in include/linux/net.h as suggested by David
Miller.
Changes since RFC:
Set msg->msg_name = NULL if user specified a NULL in msg_name but had a
non-null msg_namelen in verify_iovec/verify_compat_iovec. This doesn't
affect sendto as it would bail out earlier while trying to copy-in the
address. It also more naturally reflects the logic by the callers of
verify_iovec.
With this change in place I could remove "
if (!uaddr || msg_sys->msg_namelen == 0)
msg->msg_name = NULL
".
This change does not alter the user visible error logic as we ignore
msg_namelen as long as msg_name is NULL.
Also remove two unnecessary curly brackets in ___sys_recvmsg and change
comments to netdev style.
Cc: David Miller <[email protected]>
Suggested-by: Eric Dumazet <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static struct ipx_interface *ipxitf_alloc(struct net_device *dev, __be32 netnum,
__be16 dlink_type,
struct datalink_proto *dlink,
unsigned char internal,
int ipx_offset)
{
struct ipx_interface *intrfc = kmalloc(sizeof(*intrfc), GFP_ATOMIC);
if (intrfc) {
intrfc->if_dev = dev;
intrfc->if_netnum = netnum;
intrfc->if_dlink_type = dlink_type;
intrfc->if_dlink = dlink;
intrfc->if_internal = internal;
intrfc->if_ipx_offset = ipx_offset;
intrfc->if_sknum = IPX_MIN_EPHEMERAL_SOCKET;
INIT_HLIST_HEAD(&intrfc->if_sklist);
atomic_set(&intrfc->refcnt, 1);
spin_lock_init(&intrfc->if_sklist_lock);
}
return intrfc;
}
|
static struct ipx_interface *ipxitf_alloc(struct net_device *dev, __be32 netnum,
__be16 dlink_type,
struct datalink_proto *dlink,
unsigned char internal,
int ipx_offset)
{
struct ipx_interface *intrfc = kmalloc(sizeof(*intrfc), GFP_ATOMIC);
if (intrfc) {
intrfc->if_dev = dev;
intrfc->if_netnum = netnum;
intrfc->if_dlink_type = dlink_type;
intrfc->if_dlink = dlink;
intrfc->if_internal = internal;
intrfc->if_ipx_offset = ipx_offset;
intrfc->if_sknum = IPX_MIN_EPHEMERAL_SOCKET;
INIT_HLIST_HEAD(&intrfc->if_sklist);
atomic_set(&intrfc->refcnt, 1);
spin_lock_init(&intrfc->if_sklist_lock);
}
return intrfc;
}
|
C
|
linux
| 0 |
CVE-2013-6636
|
https://www.cvedetails.com/cve/CVE-2013-6636/
|
CWE-20
|
https://github.com/chromium/chromium/commit/5cfe3023574666663d970ce48cdbc8ed15ce61d9
|
5cfe3023574666663d970ce48cdbc8ed15ce61d9
|
Clear out some minor TODOs.
BUG=none
Review URL: https://codereview.chromium.org/1047063002
Cr-Commit-Position: refs/heads/master@{#322959}
|
bool AutofillDialogViews::SuggestionView::CanUseVerticallyCompactText(
int available_width,
int* resulting_height) const {
if (!calculated_heights_.count(available_width)) {
SuggestionView sizing_view(NULL);
sizing_view.SetLabelText(state_.vertically_compact_text);
sizing_view.SetIcon(state_.icon);
sizing_view.SetTextfield(state_.extra_text, state_.extra_icon);
sizing_view.label_->SetSize(gfx::Size(available_width, 0));
sizing_view.label_line_2_->SetSize(gfx::Size(available_width, 0));
views::LayoutManager* layout = sizing_view.GetLayoutManager();
if (layout->GetPreferredSize(&sizing_view).width() <= available_width) {
calculated_heights_[available_width] = std::make_pair(
true,
layout->GetPreferredHeightForWidth(&sizing_view, available_width));
} else {
sizing_view.SetLabelText(state_.horizontally_compact_text);
calculated_heights_[available_width] = std::make_pair(
false,
layout->GetPreferredHeightForWidth(&sizing_view, available_width));
}
}
const std::pair<bool, int>& values = calculated_heights_[available_width];
*resulting_height = values.second;
return values.first;
}
|
bool AutofillDialogViews::SuggestionView::CanUseVerticallyCompactText(
int available_width,
int* resulting_height) const {
if (!calculated_heights_.count(available_width)) {
SuggestionView sizing_view(NULL);
sizing_view.SetLabelText(state_.vertically_compact_text);
sizing_view.SetIcon(state_.icon);
sizing_view.SetTextfield(state_.extra_text, state_.extra_icon);
sizing_view.label_->SetSize(gfx::Size(available_width, 0));
sizing_view.label_line_2_->SetSize(gfx::Size(available_width, 0));
views::LayoutManager* layout = sizing_view.GetLayoutManager();
if (layout->GetPreferredSize(&sizing_view).width() <= available_width) {
calculated_heights_[available_width] = std::make_pair(
true,
layout->GetPreferredHeightForWidth(&sizing_view, available_width));
} else {
sizing_view.SetLabelText(state_.horizontally_compact_text);
calculated_heights_[available_width] = std::make_pair(
false,
layout->GetPreferredHeightForWidth(&sizing_view, available_width));
}
}
const std::pair<bool, int>& values = calculated_heights_[available_width];
*resulting_height = values.second;
return values.first;
}
|
C
|
Chrome
| 0 |
CVE-2012-2816
|
https://www.cvedetails.com/cve/CVE-2012-2816/
| null |
https://github.com/chromium/chromium/commit/cd0bd79d6ebdb72183e6f0833673464cc10b3600
|
cd0bd79d6ebdb72183e6f0833673464cc10b3600
|
Convert plugin and GPU process to brokered handle duplication.
BUG=119250
Review URL: https://chromiumcodereview.appspot.com/9958034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132303 0039d316-1c4b-4281-b951-d872f2087c98
|
void AddPepperFlash(std::vector<content::PepperPluginInfo>* plugins) {
content::PepperPluginInfo plugin;
plugin.is_out_of_process = !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kPpapiFlashInProcess);
plugin.name = kFlashPluginName;
std::string flash_version; // Should be something like 11.2 or 11.2.123.45.
const CommandLine::StringType flash_path =
CommandLine::ForCurrentProcess()->GetSwitchValueNative(
switches::kPpapiFlashPath);
if (!flash_path.empty()) {
plugin.path = FilePath(flash_path);
flash_version = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kPpapiFlashVersion);
} else {
#if defined(FLAPPER_AVAILABLE) && defined(OS_LINUX) && \
(defined(ARCH_CPU_X86) || defined(ARCH_CPU_X86_64))
bool bundled_flapper_enabled = true;
#else
bool bundled_flapper_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBundledPpapiFlash);
#endif
bundled_flapper_enabled &= !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableBundledPpapiFlash);
if (!bundled_flapper_enabled)
return;
#if defined(FLAPPER_AVAILABLE)
if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin.path))
return;
flash_version = FLAPPER_VERSION_STRING;
#else
LOG(ERROR) << "PPAPI Flash not included at build time.";
return;
#endif // FLAPPER_AVAILABLE
}
std::vector<std::string> flash_version_numbers;
base::SplitString(flash_version, '.', &flash_version_numbers);
if (flash_version_numbers.size() < 1)
flash_version_numbers.push_back("11");
else if (flash_version_numbers[0].empty())
flash_version_numbers[0] = "11";
if (flash_version_numbers.size() < 2)
flash_version_numbers.push_back("2");
if (flash_version_numbers.size() < 3)
flash_version_numbers.push_back("999");
if (flash_version_numbers.size() < 4)
flash_version_numbers.push_back("999");
plugin.description = plugin.name + " " + flash_version_numbers[0] + "." +
flash_version_numbers[1] + " r" + flash_version_numbers[2];
plugin.version = JoinString(flash_version_numbers, '.');
webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType,
kFlashPluginSwfExtension,
kFlashPluginSwfDescription);
plugin.mime_types.push_back(swf_mime_type);
webkit::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType,
kFlashPluginSplExtension,
kFlashPluginSplDescription);
plugin.mime_types.push_back(spl_mime_type);
plugins->push_back(plugin);
}
|
void AddPepperFlash(std::vector<content::PepperPluginInfo>* plugins) {
content::PepperPluginInfo plugin;
plugin.is_out_of_process = !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kPpapiFlashInProcess);
plugin.name = kFlashPluginName;
std::string flash_version; // Should be something like 11.2 or 11.2.123.45.
const CommandLine::StringType flash_path =
CommandLine::ForCurrentProcess()->GetSwitchValueNative(
switches::kPpapiFlashPath);
if (!flash_path.empty()) {
plugin.path = FilePath(flash_path);
flash_version = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kPpapiFlashVersion);
} else {
#if defined(FLAPPER_AVAILABLE) && defined(OS_LINUX) && \
(defined(ARCH_CPU_X86) || defined(ARCH_CPU_X86_64))
bool bundled_flapper_enabled = true;
#else
bool bundled_flapper_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBundledPpapiFlash);
#endif
bundled_flapper_enabled &= !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableBundledPpapiFlash);
if (!bundled_flapper_enabled)
return;
#if defined(FLAPPER_AVAILABLE)
if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin.path))
return;
flash_version = FLAPPER_VERSION_STRING;
#else
LOG(ERROR) << "PPAPI Flash not included at build time.";
return;
#endif // FLAPPER_AVAILABLE
}
std::vector<std::string> flash_version_numbers;
base::SplitString(flash_version, '.', &flash_version_numbers);
if (flash_version_numbers.size() < 1)
flash_version_numbers.push_back("11");
else if (flash_version_numbers[0].empty())
flash_version_numbers[0] = "11";
if (flash_version_numbers.size() < 2)
flash_version_numbers.push_back("2");
if (flash_version_numbers.size() < 3)
flash_version_numbers.push_back("999");
if (flash_version_numbers.size() < 4)
flash_version_numbers.push_back("999");
plugin.description = plugin.name + " " + flash_version_numbers[0] + "." +
flash_version_numbers[1] + " r" + flash_version_numbers[2];
plugin.version = JoinString(flash_version_numbers, '.');
webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType,
kFlashPluginSwfExtension,
kFlashPluginSwfDescription);
plugin.mime_types.push_back(swf_mime_type);
webkit::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType,
kFlashPluginSplExtension,
kFlashPluginSplDescription);
plugin.mime_types.push_back(spl_mime_type);
plugins->push_back(plugin);
}
|
C
|
Chrome
| 0 |
CVE-2018-7191
|
https://www.cvedetails.com/cve/CVE-2018-7191/
|
CWE-476
|
https://github.com/torvalds/linux/commit/0ad646c81b2182f7fa67ec0c8c825e0ee165696d
|
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
|
tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move these initializations into a ->ndo_init() so
that register_netdevice() knows better, however this is still
complicated due to the logic in tun_detach().
Therefore, I choose to just call dev_get_valid_name() before
register_netdevice(), which is quicker and much easier to audit.
And for this specific case, it is already enough.
Fixes: 96442e42429e ("tuntap: choose the txq based on rxq")
Reported-by: Dmitry Alexeev <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
void netif_stacked_transfer_operstate(const struct net_device *rootdev,
struct net_device *dev)
{
if (rootdev->operstate == IF_OPER_DORMANT)
netif_dormant_on(dev);
else
netif_dormant_off(dev);
if (netif_carrier_ok(rootdev))
netif_carrier_on(dev);
else
netif_carrier_off(dev);
}
|
void netif_stacked_transfer_operstate(const struct net_device *rootdev,
struct net_device *dev)
{
if (rootdev->operstate == IF_OPER_DORMANT)
netif_dormant_on(dev);
else
netif_dormant_off(dev);
if (netif_carrier_ok(rootdev))
netif_carrier_on(dev);
else
netif_carrier_off(dev);
}
|
C
|
linux
| 0 |
CVE-2019-11599
|
https://www.cvedetails.com/cve/CVE-2019-11599/
|
CWE-362
|
https://github.com/torvalds/linux/commit/04f5866e41fb70690e28397487d8bd8eea7d712a
|
04f5866e41fb70690e28397487d8bd8eea7d712a
|
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes belonging to the mm is not nearly enough.
This was pointed out earlier. For example in Hugh's post from Jul 2017:
https://lkml.kernel.org/r/[email protected]
"Not strictly relevant here, but a related note: I was very surprised
to discover, only quite recently, how handle_mm_fault() may be called
without down_read(mmap_sem) - when core dumping. That seems a
misguided optimization to me, which would also be nice to correct"
In particular because the growsdown and growsup can move the
vm_start/vm_end the various loops the core dump does around the vma will
not be consistent if page faults can happen concurrently.
Pretty much all users calling mmget_not_zero()/get_task_mm() and then
taking the mmap_sem had the potential to introduce unexpected side
effects in the core dumping code.
Adding mmap_sem for writing around the ->core_dump invocation is a
viable long term fix, but it requires removing all copy user and page
faults and to replace them with get_dump_page() for all binary formats
which is not suitable as a short term fix.
For the time being this solution manually covers the places that can
confuse the core dump either by altering the vma layout or the vma flags
while it runs. Once ->core_dump runs under mmap_sem for writing the
function mmget_still_valid() can be dropped.
Allowing mmap_sem protected sections to run in parallel with the
coredump provides some minor parallelism advantage to the swapoff code
(which seems to be safe enough by never mangling any vma field and can
keep doing swapins in parallel to the core dumping) and to some other
corner case.
In order to facilitate the backporting I added "Fixes: 86039bd3b4e6"
however the side effect of this same race condition in /proc/pid/mem
should be reproducible since before 2.6.12-rc2 so I couldn't add any
other "Fixes:" because there's no hash beyond the git genesis commit.
Because find_extend_vma() is the only location outside of the process
context that could modify the "mm" structures under mmap_sem for
reading, by adding the mmget_still_valid() check to it, all other cases
that take the mmap_sem for reading don't need the new check after
mmget_not_zero()/get_task_mm(). The expand_stack() in page fault
context also doesn't need the new check, because all tasks under core
dumping are frozen.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 86039bd3b4e6 ("userfaultfd: add new syscall to provide memory externalization")
Signed-off-by: Andrea Arcangeli <[email protected]>
Reported-by: Jann Horn <[email protected]>
Suggested-by: Oleg Nesterov <[email protected]>
Acked-by: Peter Xu <[email protected]>
Reviewed-by: Mike Rapoport <[email protected]>
Reviewed-by: Oleg Nesterov <[email protected]>
Reviewed-by: Jann Horn <[email protected]>
Acked-by: Jason Gunthorpe <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
{
struct vm_area_struct *next = vma->vm_next;
might_sleep();
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
fput(vma->vm_file);
mpol_put(vma_policy(vma));
vm_area_free(vma);
return next;
}
|
static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
{
struct vm_area_struct *next = vma->vm_next;
might_sleep();
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
fput(vma->vm_file);
mpol_put(vma_policy(vma));
vm_area_free(vma);
return next;
}
|
C
|
linux
| 0 |
CVE-2017-5120
|
https://www.cvedetails.com/cve/CVE-2017-5120/
| null |
https://github.com/chromium/chromium/commit/b7277af490d28ac7f802c015bb0ff31395768556
|
b7277af490d28ac7f802c015bb0ff31395768556
|
bindings: Support "attribute FrozenArray<T>?"
Adds a quick hack to support a case of "attribute FrozenArray<T>?".
Bug: 1028047
Change-Id: Ib3cecc4beb6bcc0fb0dbc667aca595454cc90c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933866
Reviewed-by: Hitoshi Yoshida <[email protected]>
Commit-Queue: Yuki Shiino <[email protected]>
Cr-Commit-Position: refs/heads/master@{#718676}
|
void V8TestObject::CustomVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_customVoidMethod");
V8TestObject::CustomVoidMethodMethodCustom(info);
}
|
void V8TestObject::CustomVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_customVoidMethod");
V8TestObject::CustomVoidMethodMethodCustom(info);
}
|
C
|
Chrome
| 0 |
CVE-2016-10150
|
https://www.cvedetails.com/cve/CVE-2016-10150/
|
CWE-416
|
https://github.com/torvalds/linux/commit/a0f1d21c1ccb1da66629627a74059dd7f5ac9c61
|
a0f1d21c1ccb1da66629627a74059dd7f5ac9c61
|
KVM: use after free in kvm_ioctl_create_device()
We should move the ops->destroy(dev) after the list_del(&dev->vm_node)
so that we don't use "dev" after freeing it.
Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
|
static int kvm_starting_cpu(unsigned int cpu)
{
raw_spin_lock(&kvm_count_lock);
if (kvm_usage_count)
hardware_enable_nolock(NULL);
raw_spin_unlock(&kvm_count_lock);
return 0;
}
|
static int kvm_starting_cpu(unsigned int cpu)
{
raw_spin_lock(&kvm_count_lock);
if (kvm_usage_count)
hardware_enable_nolock(NULL);
raw_spin_unlock(&kvm_count_lock);
return 0;
}
|
C
|
linux
| 0 |
CVE-2013-0886
|
https://www.cvedetails.com/cve/CVE-2013-0886/
| null |
https://github.com/chromium/chromium/commit/18d67244984a574ba2dd8779faabc0e3e34f4b76
|
18d67244984a574ba2dd8779faabc0e3e34f4b76
|
Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the renderer contexts
- do not require a context to be able to generate textures when
creating the GLSurfaceHandle
- clearer ownership semantics that potentially allows for more
robust and easier lost context handling/thumbnailing/etc., since a texture is at
any given time owned by either: UI parent, mailbox, or
TextureImageTransportSurface
- simplify frontbuffer protection logic;
the frontbuffer textures are now owned by RWHV where they are refcounted
The TextureImageTransportSurface informs RenderWidgetHostView of the
mailbox names for the front- and backbuffer textures by
associating them with a surface_handle (1 or 2) in the AcceleratedSurfaceNew message.
During SwapBuffers() or PostSubBuffer() cycles, it then uses
produceTextureCHROMIUM() and consumeTextureCHROMIUM()
to transfer ownership between renderer and browser compositor.
RWHV sends back the surface_handle of the buffer being returned with the Swap ACK
(or 0 if no buffer is being returned in which case TextureImageTransportSurface will
allocate a new texture - note that this could be used to
simply keep textures for thumbnailing).
BUG=154815,139616
[email protected]
Review URL: https://chromiumcodereview.appspot.com/11194042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171569 0039d316-1c4b-4281-b951-d872f2087c98
|
void RenderWidgetHostImpl::OnMsgSelectRangeAck() {
select_range_pending_ = false;
if (next_selection_range_.get()) {
scoped_ptr<SelectionRange> next(next_selection_range_.Pass());
SelectRange(next->start, next->end);
}
}
|
void RenderWidgetHostImpl::OnMsgSelectRangeAck() {
select_range_pending_ = false;
if (next_selection_range_.get()) {
scoped_ptr<SelectionRange> next(next_selection_range_.Pass());
SelectRange(next->start, next->end);
}
}
|
C
|
Chrome
| 0 |
CVE-2017-8067
|
https://www.cvedetails.com/cve/CVE-2017-8067/
|
CWE-119
|
https://github.com/torvalds/linux/commit/c4baad50297d84bde1a7ad45e50c73adae4a2192
|
c4baad50297d84bde1a7ad45e50c73adae4a2192
|
virtio-console: avoid DMA from stack
put_chars() stuffs the buffer it gets into an sg, but that buffer may be
on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it
manifested as printks getting turned into NUL bytes).
Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Amit Shah <[email protected]>
|
static unsigned int fill_queue(struct virtqueue *vq, spinlock_t *lock)
{
struct port_buffer *buf;
unsigned int nr_added_bufs;
int ret;
nr_added_bufs = 0;
do {
buf = alloc_buf(vq, PAGE_SIZE, 0);
if (!buf)
break;
spin_lock_irq(lock);
ret = add_inbuf(vq, buf);
if (ret < 0) {
spin_unlock_irq(lock);
free_buf(buf, true);
break;
}
nr_added_bufs++;
spin_unlock_irq(lock);
} while (ret > 0);
return nr_added_bufs;
}
|
static unsigned int fill_queue(struct virtqueue *vq, spinlock_t *lock)
{
struct port_buffer *buf;
unsigned int nr_added_bufs;
int ret;
nr_added_bufs = 0;
do {
buf = alloc_buf(vq, PAGE_SIZE, 0);
if (!buf)
break;
spin_lock_irq(lock);
ret = add_inbuf(vq, buf);
if (ret < 0) {
spin_unlock_irq(lock);
free_buf(buf, true);
break;
}
nr_added_bufs++;
spin_unlock_irq(lock);
} while (ret > 0);
return nr_added_bufs;
}
|
C
|
linux
| 0 |
CVE-2019-5829
|
https://www.cvedetails.com/cve/CVE-2019-5829/
|
CWE-416
|
https://github.com/chromium/chromium/commit/17368442aec0f48859a3561ae5e441175c7041ba
|
17368442aec0f48859a3561ae5e441175c7041ba
|
Early return if a download Id is already used when creating a download
This is protect against download Id overflow and use-after-free
issue.
BUG=958533
Change-Id: I2c183493cb09106686df9822b3987bfb95bcf720
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1591485
Reviewed-by: Xing Liu <[email protected]>
Commit-Queue: Min Qin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#656910}
|
int DownloadManagerImpl::RemoveDownloadsByURLAndTime(
const base::Callback<bool(const GURL&)>& url_filter,
base::Time remove_begin,
base::Time remove_end) {
int count = 0;
auto it = downloads_.begin();
while (it != downloads_.end()) {
download::DownloadItemImpl* download = it->second.get();
++it;
if (download->GetState() != download::DownloadItem::IN_PROGRESS &&
url_filter.Run(download->GetURL()) &&
download->GetStartTime() >= remove_begin &&
(remove_end.is_null() || download->GetStartTime() < remove_end)) {
download->Remove();
count++;
}
}
return count;
}
|
int DownloadManagerImpl::RemoveDownloadsByURLAndTime(
const base::Callback<bool(const GURL&)>& url_filter,
base::Time remove_begin,
base::Time remove_end) {
int count = 0;
auto it = downloads_.begin();
while (it != downloads_.end()) {
download::DownloadItemImpl* download = it->second.get();
++it;
if (download->GetState() != download::DownloadItem::IN_PROGRESS &&
url_filter.Run(download->GetURL()) &&
download->GetStartTime() >= remove_begin &&
(remove_end.is_null() || download->GetStartTime() < remove_end)) {
download->Remove();
count++;
}
}
return count;
}
|
C
|
Chrome
| 0 |
CVE-2011-3346
|
https://www.cvedetails.com/cve/CVE-2011-3346/
|
CWE-119
|
https://github.com/bonzini/qemu/commit/7285477ab11831b1cf56e45878a89170dd06d9b9
|
7285477ab11831b1cf56e45878a89170dd06d9b9
|
scsi-disk: lazily allocate bounce buffer
It will not be needed for reads and writes if the HBA provides a sglist.
In addition, this lets scsi-disk refuse commands with an excessive
allocation length, as well as limit memory on usual well-behaved guests.
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
static int32_t scsi_send_command(SCSIRequest *req, uint8_t *buf)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
int32_t len;
uint8_t command;
int rc;
command = buf[0];
DPRINTF("Command: lun=%d tag=0x%x data=0x%02x", req->lun, req->tag, buf[0]);
#ifdef DEBUG_SCSI
{
int i;
for (i = 1; i < r->req.cmd.len; i++) {
printf(" 0x%02x", buf[i]);
}
printf("\n");
}
#endif
switch (command) {
case TEST_UNIT_READY:
case INQUIRY:
case MODE_SENSE:
case MODE_SENSE_10:
case RESERVE:
case RESERVE_10:
case RELEASE:
case RELEASE_10:
case START_STOP:
case ALLOW_MEDIUM_REMOVAL:
case READ_CAPACITY_10:
case READ_TOC:
case GET_CONFIGURATION:
case SERVICE_ACTION_IN_16:
case VERIFY_10:
rc = scsi_disk_emulate_command(r);
if (rc < 0) {
return 0;
}
r->iov.iov_len = rc;
break;
case SYNCHRONIZE_CACHE:
bdrv_acct_start(s->bs, &r->acct, 0, BDRV_ACCT_FLUSH);
r->req.aiocb = bdrv_aio_flush(s->bs, scsi_flush_complete, r);
if (r->req.aiocb == NULL) {
scsi_flush_complete(r, -EIO);
}
return 0;
case READ_6:
case READ_10:
case READ_12:
case READ_16:
len = r->req.cmd.xfer / s->qdev.blocksize;
DPRINTF("Read (sector %" PRId64 ", count %d)\n", r->req.cmd.lba, len);
if (r->req.cmd.lba > s->max_lba)
goto illegal_lba;
r->sector = r->req.cmd.lba * s->cluster_size;
r->sector_count = len * s->cluster_size;
break;
case WRITE_6:
case WRITE_10:
case WRITE_12:
case WRITE_16:
case WRITE_VERIFY_10:
case WRITE_VERIFY_12:
case WRITE_VERIFY_16:
len = r->req.cmd.xfer / s->qdev.blocksize;
DPRINTF("Write %s(sector %" PRId64 ", count %d)\n",
(command & 0xe) == 0xe ? "And Verify " : "",
r->req.cmd.lba, len);
if (r->req.cmd.lba > s->max_lba)
goto illegal_lba;
r->sector = r->req.cmd.lba * s->cluster_size;
r->sector_count = len * s->cluster_size;
break;
case MODE_SELECT:
DPRINTF("Mode Select(6) (len %lu)\n", (long)r->req.cmd.xfer);
/* We don't support mode parameter changes.
Allow the mode parameter header + block descriptors only. */
if (r->req.cmd.xfer > 12) {
goto fail;
}
break;
case MODE_SELECT_10:
DPRINTF("Mode Select(10) (len %lu)\n", (long)r->req.cmd.xfer);
/* We don't support mode parameter changes.
Allow the mode parameter header + block descriptors only. */
if (r->req.cmd.xfer > 16) {
goto fail;
}
break;
case SEEK_6:
case SEEK_10:
DPRINTF("Seek(%d) (sector %" PRId64 ")\n", command == SEEK_6 ? 6 : 10,
r->req.cmd.lba);
if (r->req.cmd.lba > s->max_lba) {
goto illegal_lba;
}
break;
case WRITE_SAME_16:
len = r->req.cmd.xfer / s->qdev.blocksize;
DPRINTF("WRITE SAME(16) (sector %" PRId64 ", count %d)\n",
r->req.cmd.lba, len);
if (r->req.cmd.lba > s->max_lba) {
goto illegal_lba;
}
/*
* We only support WRITE SAME with the unmap bit set for now.
*/
if (!(buf[1] & 0x8)) {
goto fail;
}
rc = bdrv_discard(s->bs, r->req.cmd.lba * s->cluster_size,
len * s->cluster_size);
if (rc < 0) {
/* XXX: better error code ?*/
goto fail;
}
break;
case REQUEST_SENSE:
abort();
default:
DPRINTF("Unknown SCSI command (%2.2x)\n", buf[0]);
scsi_check_condition(r, SENSE_CODE(INVALID_OPCODE));
return 0;
fail:
scsi_check_condition(r, SENSE_CODE(INVALID_FIELD));
return 0;
illegal_lba:
scsi_check_condition(r, SENSE_CODE(LBA_OUT_OF_RANGE));
return 0;
}
if (r->sector_count == 0 && r->iov.iov_len == 0) {
scsi_req_complete(&r->req, GOOD);
}
len = r->sector_count * 512 + r->iov.iov_len;
if (r->req.cmd.mode == SCSI_XFER_TO_DEV) {
return -len;
} else {
if (!r->sector_count)
r->sector_count = -1;
return len;
}
}
|
static int32_t scsi_send_command(SCSIRequest *req, uint8_t *buf)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
int32_t len;
uint8_t command;
uint8_t *outbuf;
int rc;
command = buf[0];
outbuf = (uint8_t *)r->iov.iov_base;
DPRINTF("Command: lun=%d tag=0x%x data=0x%02x", req->lun, req->tag, buf[0]);
#ifdef DEBUG_SCSI
{
int i;
for (i = 1; i < r->req.cmd.len; i++) {
printf(" 0x%02x", buf[i]);
}
printf("\n");
}
#endif
switch (command) {
case TEST_UNIT_READY:
case INQUIRY:
case MODE_SENSE:
case MODE_SENSE_10:
case RESERVE:
case RESERVE_10:
case RELEASE:
case RELEASE_10:
case START_STOP:
case ALLOW_MEDIUM_REMOVAL:
case READ_CAPACITY_10:
case READ_TOC:
case GET_CONFIGURATION:
case SERVICE_ACTION_IN_16:
case VERIFY_10:
rc = scsi_disk_emulate_command(r, outbuf);
if (rc < 0) {
return 0;
}
r->iov.iov_len = rc;
break;
case SYNCHRONIZE_CACHE:
bdrv_acct_start(s->bs, &r->acct, 0, BDRV_ACCT_FLUSH);
r->req.aiocb = bdrv_aio_flush(s->bs, scsi_flush_complete, r);
if (r->req.aiocb == NULL) {
scsi_flush_complete(r, -EIO);
}
return 0;
case READ_6:
case READ_10:
case READ_12:
case READ_16:
len = r->req.cmd.xfer / s->qdev.blocksize;
DPRINTF("Read (sector %" PRId64 ", count %d)\n", r->req.cmd.lba, len);
if (r->req.cmd.lba > s->max_lba)
goto illegal_lba;
r->sector = r->req.cmd.lba * s->cluster_size;
r->sector_count = len * s->cluster_size;
break;
case WRITE_6:
case WRITE_10:
case WRITE_12:
case WRITE_16:
case WRITE_VERIFY_10:
case WRITE_VERIFY_12:
case WRITE_VERIFY_16:
len = r->req.cmd.xfer / s->qdev.blocksize;
DPRINTF("Write %s(sector %" PRId64 ", count %d)\n",
(command & 0xe) == 0xe ? "And Verify " : "",
r->req.cmd.lba, len);
if (r->req.cmd.lba > s->max_lba)
goto illegal_lba;
r->sector = r->req.cmd.lba * s->cluster_size;
r->sector_count = len * s->cluster_size;
break;
case MODE_SELECT:
DPRINTF("Mode Select(6) (len %lu)\n", (long)r->req.cmd.xfer);
/* We don't support mode parameter changes.
Allow the mode parameter header + block descriptors only. */
if (r->req.cmd.xfer > 12) {
goto fail;
}
break;
case MODE_SELECT_10:
DPRINTF("Mode Select(10) (len %lu)\n", (long)r->req.cmd.xfer);
/* We don't support mode parameter changes.
Allow the mode parameter header + block descriptors only. */
if (r->req.cmd.xfer > 16) {
goto fail;
}
break;
case SEEK_6:
case SEEK_10:
DPRINTF("Seek(%d) (sector %" PRId64 ")\n", command == SEEK_6 ? 6 : 10,
r->req.cmd.lba);
if (r->req.cmd.lba > s->max_lba) {
goto illegal_lba;
}
break;
case WRITE_SAME_16:
len = r->req.cmd.xfer / s->qdev.blocksize;
DPRINTF("WRITE SAME(16) (sector %" PRId64 ", count %d)\n",
r->req.cmd.lba, len);
if (r->req.cmd.lba > s->max_lba) {
goto illegal_lba;
}
/*
* We only support WRITE SAME with the unmap bit set for now.
*/
if (!(buf[1] & 0x8)) {
goto fail;
}
rc = bdrv_discard(s->bs, r->req.cmd.lba * s->cluster_size,
len * s->cluster_size);
if (rc < 0) {
/* XXX: better error code ?*/
goto fail;
}
break;
case REQUEST_SENSE:
abort();
default:
DPRINTF("Unknown SCSI command (%2.2x)\n", buf[0]);
scsi_check_condition(r, SENSE_CODE(INVALID_OPCODE));
return 0;
fail:
scsi_check_condition(r, SENSE_CODE(INVALID_FIELD));
return 0;
illegal_lba:
scsi_check_condition(r, SENSE_CODE(LBA_OUT_OF_RANGE));
return 0;
}
if (r->sector_count == 0 && r->iov.iov_len == 0) {
scsi_req_complete(&r->req, GOOD);
}
len = r->sector_count * 512 + r->iov.iov_len;
if (r->req.cmd.mode == SCSI_XFER_TO_DEV) {
return -len;
} else {
if (!r->sector_count)
r->sector_count = -1;
return len;
}
}
|
C
|
qemu
| 1 |
CVE-2011-5321
|
https://www.cvedetails.com/cve/CVE-2011-5321/
| null |
https://github.com/torvalds/linux/commit/c290f8358acaeffd8e0c551ddcc24d1206143376
|
c290f8358acaeffd8e0c551ddcc24d1206143376
|
TTY: drop driver reference in tty_open fail path
When tty_driver_lookup_tty fails in tty_open, we forget to drop a
reference to the tty driver. This was added by commit 4a2b5fddd5 (Move
tty lookup/reopen to caller).
Fix that by adding tty_driver_kref_put to the fail path.
I will refactor the code later. This is for the ease of backporting to
stable.
Introduced-in: v2.6.28-rc2
Signed-off-by: Jiri Slaby <[email protected]>
Cc: stable <[email protected]>
Cc: Alan Cox <[email protected]>
Acked-by: Sukadev Bhattiprolu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static ssize_t show_cons_active(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct console *cs[16];
int i = 0;
struct console *c;
ssize_t count = 0;
console_lock();
for_each_console(c) {
if (!c->device)
continue;
if (!c->write)
continue;
if ((c->flags & CON_ENABLED) == 0)
continue;
cs[i++] = c;
if (i >= ARRAY_SIZE(cs))
break;
}
while (i--)
count += sprintf(buf + count, "%s%d%c",
cs[i]->name, cs[i]->index, i ? ' ':'\n');
console_unlock();
return count;
}
|
static ssize_t show_cons_active(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct console *cs[16];
int i = 0;
struct console *c;
ssize_t count = 0;
console_lock();
for_each_console(c) {
if (!c->device)
continue;
if (!c->write)
continue;
if ((c->flags & CON_ENABLED) == 0)
continue;
cs[i++] = c;
if (i >= ARRAY_SIZE(cs))
break;
}
while (i--)
count += sprintf(buf + count, "%s%d%c",
cs[i]->name, cs[i]->index, i ? ' ':'\n');
console_unlock();
return count;
}
|
C
|
linux
| 0 |
Subsets and Splits
CWE-119 Function Changes
This query retrieves specific examples (before and after code changes) of vulnerabilities with CWE-119, providing basic filtering but limited insight.
Vulnerable Code with CWE IDs
The query filters and combines records from multiple datasets to list specific vulnerability details, providing a basic overview of vulnerable functions but lacking deeper insights.
Vulnerable Functions in BigVul
Retrieves details of vulnerable functions from both validation and test datasets where vulnerabilities are present, providing a basic set of data points for further analysis.
Vulnerable Code Functions
This query filters and shows raw data for vulnerable functions, which provides basic insight into specific vulnerabilities but lacks broader analytical value.
Top 100 Vulnerable Functions
Retrieves 100 samples of vulnerabilities from the training dataset, showing the CVE ID, CWE ID, and code changes before and after the vulnerability, which is a basic filtering of vulnerability data.