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-2018-1091
|
https://www.cvedetails.com/cve/CVE-2018-1091/
|
CWE-119
|
https://github.com/torvalds/linux/commit/c1fa0768a8713b135848f78fd43ffc208d8ded70
|
c1fa0768a8713b135848f78fd43ffc208d8ded70
|
powerpc/tm: Flush TM only if CPU has TM feature
Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump")
added code to access TM SPRs in flush_tmregs_to_thread(). However
flush_tmregs_to_thread() does not check if TM feature is available on
CPU before trying to access TM SPRs in order to copy live state to
thread structures. flush_tmregs_to_thread() is indeed guarded by
CONFIG_PPC_TRANSACTIONAL_MEM but it might be the case that kernel
was compiled with CONFIG_PPC_TRANSACTIONAL_MEM enabled and ran on
a CPU without TM feature available, thus rendering the execution
of TM instructions that are treated by the CPU as illegal instructions.
The fix is just to add proper checking in flush_tmregs_to_thread()
if CPU has the TM feature before accessing any TM-specific resource,
returning immediately if TM is no available on the CPU. Adding
that checking in flush_tmregs_to_thread() instead of in places
where it is called, like in vsr_get() and vsr_set(), is better because
avoids the same problem cropping up elsewhere.
Cc: [email protected] # v4.13+
Fixes: cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump")
Signed-off-by: Gustavo Romero <[email protected]>
Reviewed-by: Cyril Bur <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
|
static long ppc_del_hwdebug(struct task_struct *child, long data)
{
#ifdef CONFIG_HAVE_HW_BREAKPOINT
int ret = 0;
struct thread_struct *thread = &(child->thread);
struct perf_event *bp;
#endif /* CONFIG_HAVE_HW_BREAKPOINT */
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
int rc;
if (data <= 4)
rc = del_instruction_bp(child, (int)data);
else
rc = del_dac(child, (int)data - 4);
if (!rc) {
if (!DBCR_ACTIVE_EVENTS(child->thread.debug.dbcr0,
child->thread.debug.dbcr1)) {
child->thread.debug.dbcr0 &= ~DBCR0_IDM;
child->thread.regs->msr &= ~MSR_DE;
}
}
return rc;
#else
if (data != 1)
return -EINVAL;
#ifdef CONFIG_HAVE_HW_BREAKPOINT
bp = thread->ptrace_bps[0];
if (bp) {
unregister_hw_breakpoint(bp);
thread->ptrace_bps[0] = NULL;
} else
ret = -ENOENT;
return ret;
#else /* CONFIG_HAVE_HW_BREAKPOINT */
if (child->thread.hw_brk.address == 0)
return -ENOENT;
child->thread.hw_brk.address = 0;
child->thread.hw_brk.type = 0;
#endif /* CONFIG_HAVE_HW_BREAKPOINT */
return 0;
#endif
}
|
static long ppc_del_hwdebug(struct task_struct *child, long data)
{
#ifdef CONFIG_HAVE_HW_BREAKPOINT
int ret = 0;
struct thread_struct *thread = &(child->thread);
struct perf_event *bp;
#endif /* CONFIG_HAVE_HW_BREAKPOINT */
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
int rc;
if (data <= 4)
rc = del_instruction_bp(child, (int)data);
else
rc = del_dac(child, (int)data - 4);
if (!rc) {
if (!DBCR_ACTIVE_EVENTS(child->thread.debug.dbcr0,
child->thread.debug.dbcr1)) {
child->thread.debug.dbcr0 &= ~DBCR0_IDM;
child->thread.regs->msr &= ~MSR_DE;
}
}
return rc;
#else
if (data != 1)
return -EINVAL;
#ifdef CONFIG_HAVE_HW_BREAKPOINT
bp = thread->ptrace_bps[0];
if (bp) {
unregister_hw_breakpoint(bp);
thread->ptrace_bps[0] = NULL;
} else
ret = -ENOENT;
return ret;
#else /* CONFIG_HAVE_HW_BREAKPOINT */
if (child->thread.hw_brk.address == 0)
return -ENOENT;
child->thread.hw_brk.address = 0;
child->thread.hw_brk.type = 0;
#endif /* CONFIG_HAVE_HW_BREAKPOINT */
return 0;
#endif
}
|
C
|
linux
| 0 |
CVE-2015-3885
|
https://www.cvedetails.com/cve/CVE-2015-3885/
|
CWE-189
|
https://github.com/rawstudio/rawstudio/commit/983bda1f0fa5fa86884381208274198a620f006e
|
983bda1f0fa5fa86884381208274198a620f006e
|
Avoid overflow in ljpeg_start().
|
unsigned CLASS ph1_bithuff (int nbits, ushort *huff)
{
static UINT64 bitbuf=0;
static int vbits=0;
unsigned c;
if (nbits == -1)
return bitbuf = vbits = 0;
if (nbits == 0) return 0;
if (vbits < nbits) {
bitbuf = bitbuf << 32 | get4();
vbits += 32;
}
c = bitbuf << (64-vbits) >> (64-nbits);
if (huff) {
vbits -= huff[c] >> 8;
return (uchar) huff[c];
}
vbits -= nbits;
return c;
}
|
unsigned CLASS ph1_bithuff (int nbits, ushort *huff)
{
static UINT64 bitbuf=0;
static int vbits=0;
unsigned c;
if (nbits == -1)
return bitbuf = vbits = 0;
if (nbits == 0) return 0;
if (vbits < nbits) {
bitbuf = bitbuf << 32 | get4();
vbits += 32;
}
c = bitbuf << (64-vbits) >> (64-nbits);
if (huff) {
vbits -= huff[c] >> 8;
return (uchar) huff[c];
}
vbits -= nbits;
return c;
}
|
C
|
rawstudio
| 0 |
CVE-2018-14395
|
https://www.cvedetails.com/cve/CVE-2018-14395/
|
CWE-369
|
https://github.com/FFmpeg/FFmpeg/commit/fa19fbcf712a6a6cc5a5cfdc3254a97b9bce6582
|
fa19fbcf712a6a6cc5a5cfdc3254a97b9bce6582
|
avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
{
int tag;
if (is_cover_image(track->st))
return ff_codec_get_tag(codec_cover_image_tags, track->par->codec_id);
if (track->mode == MODE_MP4 || track->mode == MODE_PSP)
tag = track->par->codec_tag;
else if (track->mode == MODE_ISM)
tag = track->par->codec_tag;
else if (track->mode == MODE_IPOD) {
if (!av_match_ext(s->url, "m4a") &&
!av_match_ext(s->url, "m4v") &&
!av_match_ext(s->url, "m4b"))
av_log(s, AV_LOG_WARNING, "Warning, extension is not .m4a nor .m4v "
"Quicktime/Ipod might not play the file\n");
tag = track->par->codec_tag;
} else if (track->mode & MODE_3GP)
tag = track->par->codec_tag;
else if (track->mode == MODE_F4V)
tag = track->par->codec_tag;
else
tag = mov_get_codec_tag(s, track);
return tag;
}
|
static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
{
int tag;
if (is_cover_image(track->st))
return ff_codec_get_tag(codec_cover_image_tags, track->par->codec_id);
if (track->mode == MODE_MP4 || track->mode == MODE_PSP)
tag = track->par->codec_tag;
else if (track->mode == MODE_ISM)
tag = track->par->codec_tag;
else if (track->mode == MODE_IPOD) {
if (!av_match_ext(s->url, "m4a") &&
!av_match_ext(s->url, "m4v") &&
!av_match_ext(s->url, "m4b"))
av_log(s, AV_LOG_WARNING, "Warning, extension is not .m4a nor .m4v "
"Quicktime/Ipod might not play the file\n");
tag = track->par->codec_tag;
} else if (track->mode & MODE_3GP)
tag = track->par->codec_tag;
else if (track->mode == MODE_F4V)
tag = track->par->codec_tag;
else
tag = mov_get_codec_tag(s, track);
return tag;
}
|
C
|
FFmpeg
| 0 |
CVE-2017-15951
|
https://www.cvedetails.com/cve/CVE-2017-15951/
|
CWE-20
|
https://github.com/torvalds/linux/commit/363b02dab09b3226f3bd1420dad9c72b79a42a76
|
363b02dab09b3226f3bd1420dad9c72b79a42a76
|
KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unioned with the payload pointers.
This deals with the problem that the state is spread over three different
objects (two bits and a separate variable) and reading or updating them
atomically isn't practical, given that not only can uninstantiated keys
change into instantiated or rejected keys, but rejected keys can also turn
into instantiated keys - and someone accessing the key might not be using
any locking.
The main side effect of this problem is that what was held in the payload
may change, depending on the state. For instance, you might observe the
key to be in the rejected state. You then read the cached error, but if
the key semaphore wasn't locked, the key might've become instantiated
between the two reads - and you might now have something in hand that isn't
actually an error code.
The state is now KEY_IS_UNINSTANTIATED, KEY_IS_POSITIVE or a negative error
code if the key is negatively instantiated. The key_is_instantiated()
function is replaced with key_is_positive() to avoid confusion as negative
keys are also 'instantiated'.
Additionally, barriering is included:
(1) Order payload-set before state-set during instantiation.
(2) Order state-read before payload-read when using the key.
Further separate barriering is necessary if RCU is being used to access the
payload content after reading the payload pointers.
Fixes: 146aa8b1453b ("KEYS: Merge the type-specific data with the payload data")
Cc: [email protected] # v4.4+
Reported-by: Eric Biggers <[email protected]>
Signed-off-by: David Howells <[email protected]>
Reviewed-by: Eric Biggers <[email protected]>
|
int key_instantiate_and_link(struct key *key,
const void *data,
size_t datalen,
struct key *keyring,
struct key *authkey)
{
struct key_preparsed_payload prep;
struct assoc_array_edit *edit;
int ret;
memset(&prep, 0, sizeof(prep));
prep.data = data;
prep.datalen = datalen;
prep.quotalen = key->type->def_datalen;
prep.expiry = TIME_T_MAX;
if (key->type->preparse) {
ret = key->type->preparse(&prep);
if (ret < 0)
goto error;
}
if (keyring) {
ret = __key_link_begin(keyring, &key->index_key, &edit);
if (ret < 0)
goto error;
if (keyring->restrict_link && keyring->restrict_link->check) {
struct key_restriction *keyres = keyring->restrict_link;
ret = keyres->check(keyring, key->type, &prep.payload,
keyres->key);
if (ret < 0)
goto error_link_end;
}
}
ret = __key_instantiate_and_link(key, &prep, keyring, authkey, &edit);
error_link_end:
if (keyring)
__key_link_end(keyring, &key->index_key, edit);
error:
if (key->type->preparse)
key->type->free_preparse(&prep);
return ret;
}
|
int key_instantiate_and_link(struct key *key,
const void *data,
size_t datalen,
struct key *keyring,
struct key *authkey)
{
struct key_preparsed_payload prep;
struct assoc_array_edit *edit;
int ret;
memset(&prep, 0, sizeof(prep));
prep.data = data;
prep.datalen = datalen;
prep.quotalen = key->type->def_datalen;
prep.expiry = TIME_T_MAX;
if (key->type->preparse) {
ret = key->type->preparse(&prep);
if (ret < 0)
goto error;
}
if (keyring) {
ret = __key_link_begin(keyring, &key->index_key, &edit);
if (ret < 0)
goto error;
if (keyring->restrict_link && keyring->restrict_link->check) {
struct key_restriction *keyres = keyring->restrict_link;
ret = keyres->check(keyring, key->type, &prep.payload,
keyres->key);
if (ret < 0)
goto error_link_end;
}
}
ret = __key_instantiate_and_link(key, &prep, keyring, authkey, &edit);
error_link_end:
if (keyring)
__key_link_end(keyring, &key->index_key, edit);
error:
if (key->type->preparse)
key->type->free_preparse(&prep);
return ret;
}
|
C
|
linux
| 0 |
CVE-2011-2802
|
https://www.cvedetails.com/cve/CVE-2011-2802/
|
CWE-399
|
https://github.com/chromium/chromium/commit/4ab22cfc619ee8ff17a8c50e289ec3b30731ceba
|
4ab22cfc619ee8ff17a8c50e289ec3b30731ceba
|
In chromedriver, add /log url to get the contents of the chromedriver log
remotely. Also add a 'chrome.verbose' boolean startup option.
Remove usage of VLOG(1) in chromedriver. We do not need as complicated
logging as in Chrome.
BUG=85241
TEST=none
Review URL: http://codereview.chromium.org/7104085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88591 0039d316-1c4b-4281-b951-d872f2087c98
|
void Automation::MouseClick(int tab_id,
const gfx::Point& p,
automation::MouseButton button,
Error** error) {
int windex = 0, tab_index = 0;
*error = GetIndicesForTab(tab_id, &windex, &tab_index);
if (*error)
return;
std::string error_msg;
if (!SendMouseClickJSONRequest(
automation(), windex, tab_index, button, p.x(), p.y(), &error_msg)) {
*error = new Error(kUnknownError, error_msg);
}
}
|
void Automation::MouseClick(int tab_id,
const gfx::Point& p,
automation::MouseButton button,
Error** error) {
int windex = 0, tab_index = 0;
*error = GetIndicesForTab(tab_id, &windex, &tab_index);
if (*error)
return;
std::string error_msg;
if (!SendMouseClickJSONRequest(
automation(), windex, tab_index, button, p.x(), p.y(), &error_msg)) {
*error = new Error(kUnknownError, error_msg);
}
}
|
C
|
Chrome
| 0 |
CVE-2015-3845
|
https://www.cvedetails.com/cve/CVE-2015-3845/
|
CWE-264
|
https://android.googlesource.com/platform/frameworks/native/+/e68cbc3e9e66df4231e70efa3e9c41abc12aea20
|
e68cbc3e9e66df4231e70efa3e9c41abc12aea20
|
Disregard alleged binder entities beyond parcel bounds
When appending one parcel's contents to another, ignore binder
objects within the source Parcel that appear to lie beyond the
formal bounds of that Parcel's data buffer.
Bug 17312693
Change-Id: If592a260f3fcd9a56fc160e7feb2c8b44c73f514
(cherry picked from commit 27182be9f20f4f5b48316666429f09b9ecc1f22e)
|
status_t Parcel::readBlob(size_t len, ReadableBlob* outBlob) const
{
int32_t useAshmem;
status_t status = readInt32(&useAshmem);
if (status) return status;
if (!useAshmem) {
ALOGV("readBlob: read in place");
const void* ptr = readInplace(len);
if (!ptr) return BAD_VALUE;
outBlob->init(false /*mapped*/, const_cast<void*>(ptr), len);
return NO_ERROR;
}
ALOGV("readBlob: read from ashmem");
int fd = readFileDescriptor();
if (fd == int(BAD_TYPE)) return BAD_VALUE;
void* ptr = ::mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 0);
if (ptr == MAP_FAILED) return NO_MEMORY;
outBlob->init(true /*mapped*/, ptr, len);
return NO_ERROR;
}
|
status_t Parcel::readBlob(size_t len, ReadableBlob* outBlob) const
{
int32_t useAshmem;
status_t status = readInt32(&useAshmem);
if (status) return status;
if (!useAshmem) {
ALOGV("readBlob: read in place");
const void* ptr = readInplace(len);
if (!ptr) return BAD_VALUE;
outBlob->init(false /*mapped*/, const_cast<void*>(ptr), len);
return NO_ERROR;
}
ALOGV("readBlob: read from ashmem");
int fd = readFileDescriptor();
if (fd == int(BAD_TYPE)) return BAD_VALUE;
void* ptr = ::mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 0);
if (ptr == MAP_FAILED) return NO_MEMORY;
outBlob->init(true /*mapped*/, ptr, len);
return NO_ERROR;
}
|
C
|
Android
| 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::OnZoomChanged(content::WebContents* source,
bool can_show_bubble) {
if (source == chrome::GetActiveWebContents(this)) {
window_->ZoomChangedForActiveTab(can_show_bubble && window_->IsActive());
}
}
|
void Browser::OnZoomChanged(content::WebContents* source,
bool can_show_bubble) {
if (source == chrome::GetActiveWebContents(this)) {
window_->ZoomChangedForActiveTab(can_show_bubble && window_->IsActive());
}
}
|
C
|
Chrome
| 0 |
CVE-2017-5847
|
https://www.cvedetails.com/cve/CVE-2017-5847/
|
CWE-125
|
https://github.com/GStreamer/gst-plugins-ugly/commit/d21017b52a585f145e8d62781bcc1c5fefc7ee37
|
d21017b52a585f145e8d62781bcc1c5fefc7ee37
|
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors
https://bugzilla.gnome.org/show_bug.cgi?id=777955
|
gst_asf_demux_check_header (GstASFDemux * demux)
{
AsfObject obj;
guint8 *cdata = (guint8 *) gst_adapter_map (demux->adapter,
ASF_OBJECT_HEADER_SIZE);
if (cdata == NULL) /* need more data */
return GST_ASF_DEMUX_CHECK_HEADER_NEED_DATA;
if (asf_demux_peek_object (demux, cdata, ASF_OBJECT_HEADER_SIZE, &obj, FALSE
&& obj.id == ASF_OBJ_HEADER))
return GST_ASF_DEMUX_CHECK_HEADER_YES;
return GST_ASF_DEMUX_CHECK_HEADER_NO;
}
|
gst_asf_demux_check_header (GstASFDemux * demux)
{
AsfObject obj;
guint8 *cdata = (guint8 *) gst_adapter_map (demux->adapter,
ASF_OBJECT_HEADER_SIZE);
if (cdata == NULL) /* need more data */
return GST_ASF_DEMUX_CHECK_HEADER_NEED_DATA;
if (asf_demux_peek_object (demux, cdata, ASF_OBJECT_HEADER_SIZE, &obj, FALSE
&& obj.id == ASF_OBJ_HEADER))
return GST_ASF_DEMUX_CHECK_HEADER_YES;
return GST_ASF_DEMUX_CHECK_HEADER_NO;
}
|
C
|
gst-plugins-ugly
| 0 |
CVE-2018-17468
|
https://www.cvedetails.com/cve/CVE-2018-17468/
|
CWE-200
|
https://github.com/chromium/chromium/commit/5fe74f831fddb92afa5ddfe46490bb49f083132b
|
5fe74f831fddb92afa5ddfe46490bb49f083132b
|
Do not forward resource timing to parent frame after back-forward navigation
LocalFrame has |should_send_resource_timing_info_to_parent_| flag not to
send timing info to parent except for the first navigation. This flag is
cleared when the first timing is sent to parent, however this does not happen
if iframe's first navigation was by back-forward navigation. For such
iframes, we shouldn't send timings to parent at all.
Bug: 876822
Change-Id: I128b51a82ef278c439548afc8283ae63abdef5c5
Reviewed-on: https://chromium-review.googlesource.com/1186215
Reviewed-by: Kinuko Yasuda <[email protected]>
Commit-Queue: Kunihiko Sakamoto <[email protected]>
Cr-Commit-Position: refs/heads/master@{#585736}
|
void WebLocalFrameImpl::SetDevToolsAgentImpl(WebDevToolsAgentImpl* agent) {
DCHECK(!dev_tools_agent_);
dev_tools_agent_ = agent;
}
|
void WebLocalFrameImpl::SetDevToolsAgentImpl(WebDevToolsAgentImpl* agent) {
DCHECK(!dev_tools_agent_);
dev_tools_agent_ = agent;
}
|
C
|
Chrome
| 0 |
CVE-2016-5170
|
https://www.cvedetails.com/cve/CVE-2016-5170/
|
CWE-416
|
https://github.com/chromium/chromium/commit/c3957448cfc6e299165196a33cd954b790875fdb
|
c3957448cfc6e299165196a33cd954b790875fdb
|
Cleanup and remove dead code in SetFocusedElement
This early-out was added in:
https://crrev.com/ce8ea3446283965c7eabab592cbffe223b1cf2bc
Back then, we applied fragment focus in LayoutUpdated() which could
cause this issue. This got cleaned up in:
https://crrev.com/45236fd563e9df53dc45579be1f3d0b4784885a2
so that focus is no longer applied after layout.
+Cleanup: Goto considered harmful
Bug: 795381
Change-Id: Ifeb4d2e03e872fd48cca6720b1d4de36ad1ecbb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1524417
Commit-Queue: David Bokan <[email protected]>
Reviewed-by: Stefan Zager <[email protected]>
Cr-Commit-Position: refs/heads/master@{#641101}
|
HTMLCollection* Document::forms() {
return EnsureCachedCollection<HTMLCollection>(kDocForms);
}
|
HTMLCollection* Document::forms() {
return EnsureCachedCollection<HTMLCollection>(kDocForms);
}
|
C
|
Chrome
| 0 |
CVE-2016-5728
|
https://www.cvedetails.com/cve/CVE-2016-5728/
|
CWE-119
|
https://github.com/torvalds/linux/commit/9bf292bfca94694a721449e3fd752493856710f6
|
9bf292bfca94694a721449e3fd752493856710f6
|
misc: mic: Fix for double fetch security bug in VOP driver
The MIC VOP driver does two successive reads from user space to read a
variable length data structure. Kernel memory corruption can result if
the data structure changes between the two reads. This patch disallows
the chance of this happening.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116651
Reported by: Pengfei Wang <[email protected]>
Reviewed-by: Sudeep Dutt <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static int vop_copy_dp_entry(struct vop_vdev *vdev,
struct mic_device_desc *argp, __u8 *type,
struct mic_device_desc **devpage)
{
struct vop_device *vpdev = vdev->vpdev;
struct mic_device_desc *devp;
struct mic_vqconfig *vqconfig;
int ret = 0, i;
bool slot_found = false;
vqconfig = mic_vq_config(argp);
for (i = 0; i < argp->num_vq; i++) {
if (le16_to_cpu(vqconfig[i].num) > MIC_MAX_VRING_ENTRIES) {
ret = -EINVAL;
dev_err(vop_dev(vdev), "%s %d err %d\n",
__func__, __LINE__, ret);
goto exit;
}
}
/* Find the first free device page entry */
for (i = sizeof(struct mic_bootparam);
i < MIC_DP_SIZE - mic_total_desc_size(argp);
i += mic_total_desc_size(devp)) {
devp = vpdev->hw_ops->get_dp(vpdev) + i;
if (devp->type == 0 || devp->type == -1) {
slot_found = true;
break;
}
}
if (!slot_found) {
ret = -EINVAL;
dev_err(vop_dev(vdev), "%s %d err %d\n",
__func__, __LINE__, ret);
goto exit;
}
/*
* Save off the type before doing the memcpy. Type will be set in the
* end after completing all initialization for the new device.
*/
*type = argp->type;
argp->type = 0;
memcpy(devp, argp, mic_desc_size(argp));
*devpage = devp;
exit:
return ret;
}
|
static int vop_copy_dp_entry(struct vop_vdev *vdev,
struct mic_device_desc *argp, __u8 *type,
struct mic_device_desc **devpage)
{
struct vop_device *vpdev = vdev->vpdev;
struct mic_device_desc *devp;
struct mic_vqconfig *vqconfig;
int ret = 0, i;
bool slot_found = false;
vqconfig = mic_vq_config(argp);
for (i = 0; i < argp->num_vq; i++) {
if (le16_to_cpu(vqconfig[i].num) > MIC_MAX_VRING_ENTRIES) {
ret = -EINVAL;
dev_err(vop_dev(vdev), "%s %d err %d\n",
__func__, __LINE__, ret);
goto exit;
}
}
/* Find the first free device page entry */
for (i = sizeof(struct mic_bootparam);
i < MIC_DP_SIZE - mic_total_desc_size(argp);
i += mic_total_desc_size(devp)) {
devp = vpdev->hw_ops->get_dp(vpdev) + i;
if (devp->type == 0 || devp->type == -1) {
slot_found = true;
break;
}
}
if (!slot_found) {
ret = -EINVAL;
dev_err(vop_dev(vdev), "%s %d err %d\n",
__func__, __LINE__, ret);
goto exit;
}
/*
* Save off the type before doing the memcpy. Type will be set in the
* end after completing all initialization for the new device.
*/
*type = argp->type;
argp->type = 0;
memcpy(devp, argp, mic_desc_size(argp));
*devpage = devp;
exit:
return ret;
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/fc3c351a3d995f73ead5c92354396a7ec2b14e3f
|
fc3c351a3d995f73ead5c92354396a7ec2b14e3f
|
Split infobars.{cc,h} into separate pieces for the different classes defined within, so that each piece is shorter and clearer.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6250057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73235 0039d316-1c4b-4281-b951-d872f2087c98
|
void ConfirmInfoBar::ButtonPressed(
views::Button* sender, const views::Event& event) {
InfoBar::ButtonPressed(sender, event);
if (sender == ok_button_) {
if (GetDelegate()->Accept())
RemoveInfoBar();
} else if (sender == cancel_button_) {
if (GetDelegate()->Cancel())
RemoveInfoBar();
}
}
|
void ConfirmInfoBar::ButtonPressed(
views::Button* sender, const views::Event& event) {
InfoBar::ButtonPressed(sender, event);
if (sender == ok_button_) {
if (GetDelegate()->Accept())
RemoveInfoBar();
} else if (sender == cancel_button_) {
if (GetDelegate()->Cancel())
RemoveInfoBar();
}
}
|
C
|
Chrome
| 0 |
CVE-2018-16427
|
https://www.cvedetails.com/cve/CVE-2018-16427/
|
CWE-125
|
https://github.com/OpenSC/OpenSC/pull/1447/commits/8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
|
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
|
fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes.
|
external_key_auth(struct sc_card *card, unsigned char kid,
unsigned char *data, size_t datalen)
{
int r;
struct sc_apdu apdu;
unsigned char random[16] = { 0 };
unsigned char tmp_data[16] = { 0 };
unsigned char hash[HASH_LEN] = { 0 };
unsigned char iv[16] = { 0 };
r = sc_get_challenge(card, random, 8);
LOG_TEST_RET(card->ctx, r, "get challenge external_key_auth failed");
r = hash_data(data, datalen, hash, SC_ALGORITHM_ECDSA_HASH_SHA1);
LOG_TEST_RET(card->ctx, r, "hash data failed");
des3_encrypt_cbc(hash, HASH_LEN, iv, random, 8, tmp_data);
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0x82, 0x01, 0x80 | kid);
apdu.lc = apdu.datalen = 8;
apdu.data = tmp_data;
r = sc_transmit_apdu_t(card, &apdu);
LOG_TEST_RET(card->ctx, r, "APDU external_key_auth failed");
r = sc_check_sw(card, apdu.sw1, apdu.sw2);
LOG_TEST_RET(card->ctx, r, "external_key_auth failed");
return r;
}
|
external_key_auth(struct sc_card *card, unsigned char kid,
unsigned char *data, size_t datalen)
{
int r;
struct sc_apdu apdu;
unsigned char random[16] = { 0 };
unsigned char tmp_data[16] = { 0 };
unsigned char hash[HASH_LEN] = { 0 };
unsigned char iv[16] = { 0 };
r = sc_get_challenge(card, random, 8);
LOG_TEST_RET(card->ctx, r, "get challenge external_key_auth failed");
r = hash_data(data, datalen, hash, SC_ALGORITHM_ECDSA_HASH_SHA1);
LOG_TEST_RET(card->ctx, r, "hash data failed");
des3_encrypt_cbc(hash, HASH_LEN, iv, random, 8, tmp_data);
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0x82, 0x01, 0x80 | kid);
apdu.lc = apdu.datalen = 8;
apdu.data = tmp_data;
r = sc_transmit_apdu_t(card, &apdu);
LOG_TEST_RET(card->ctx, r, "APDU external_key_auth failed");
r = sc_check_sw(card, apdu.sw1, apdu.sw2);
LOG_TEST_RET(card->ctx, r, "external_key_auth failed");
return r;
}
|
C
|
OpenSC
| 0 |
CVE-2011-2858
|
https://www.cvedetails.com/cve/CVE-2011-2858/
|
CWE-119
|
https://github.com/chromium/chromium/commit/c13e1da62b5f5f0e6fe8c1f769a5a28415415244
|
c13e1da62b5f5f0e6fe8c1f769a5a28415415244
|
Revert "Revert 100494 - Fix bug in SimulateAttrib0."""
TEST=none
BUG=95625
[email protected]
Review URL: http://codereview.chromium.org/7796016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100507 0039d316-1c4b-4281-b951-d872f2087c98
|
void FrameBuffer::Invalidate() {
id_ = 0;
}
|
void FrameBuffer::Invalidate() {
id_ = 0;
}
|
C
|
Chrome
| 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}
|
static void VoidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "voidMethodDoubleOrDOMStringArg");
TestObject* impl = V8TestObject::ToImpl(info.Holder());
if (UNLIKELY(info.Length() < 1)) {
exception_state.ThrowTypeError(ExceptionMessages::NotEnoughArguments(1, info.Length()));
return;
}
DoubleOrString arg;
V8DoubleOrString::ToImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::kNotNullable, exception_state);
if (exception_state.HadException())
return;
impl->voidMethodDoubleOrDOMStringArg(arg);
}
|
static void VoidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "voidMethodDoubleOrDOMStringArg");
TestObject* impl = V8TestObject::ToImpl(info.Holder());
if (UNLIKELY(info.Length() < 1)) {
exception_state.ThrowTypeError(ExceptionMessages::NotEnoughArguments(1, info.Length()));
return;
}
DoubleOrString arg;
V8DoubleOrString::ToImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::kNotNullable, exception_state);
if (exception_state.HadException())
return;
impl->voidMethodDoubleOrDOMStringArg(arg);
}
|
C
|
Chrome
| 0 |
CVE-2017-14222
|
https://www.cvedetails.com/cve/CVE-2017-14222/
|
CWE-834
|
https://github.com/FFmpeg/FFmpeg/commit/9cb4eb772839c5e1de2855d126bf74ff16d13382
|
9cb4eb772839c5e1de2855d126bf74ff16d13382
|
avformat/mov: Fix DoS in read_tfra()
Fixes: Missing EOF check in loop
No testcase
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int mov_read_chpl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int64_t start;
int i, nb_chapters, str_len, version;
char str[256+1];
int ret;
if (c->ignore_chapters)
return 0;
if ((atom.size -= 5) < 0)
return 0;
version = avio_r8(pb);
avio_rb24(pb);
if (version)
avio_rb32(pb); // ???
nb_chapters = avio_r8(pb);
for (i = 0; i < nb_chapters; i++) {
if (atom.size < 9)
return 0;
start = avio_rb64(pb);
str_len = avio_r8(pb);
if ((atom.size -= 9+str_len) < 0)
return 0;
ret = ffio_read_size(pb, str, str_len);
if (ret < 0)
return ret;
str[str_len] = 0;
avpriv_new_chapter(c->fc, i, (AVRational){1,10000000}, start, AV_NOPTS_VALUE, str);
}
return 0;
}
|
static int mov_read_chpl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int64_t start;
int i, nb_chapters, str_len, version;
char str[256+1];
int ret;
if (c->ignore_chapters)
return 0;
if ((atom.size -= 5) < 0)
return 0;
version = avio_r8(pb);
avio_rb24(pb);
if (version)
avio_rb32(pb); // ???
nb_chapters = avio_r8(pb);
for (i = 0; i < nb_chapters; i++) {
if (atom.size < 9)
return 0;
start = avio_rb64(pb);
str_len = avio_r8(pb);
if ((atom.size -= 9+str_len) < 0)
return 0;
ret = ffio_read_size(pb, str, str_len);
if (ret < 0)
return ret;
str[str_len] = 0;
avpriv_new_chapter(c->fc, i, (AVRational){1,10000000}, start, AV_NOPTS_VALUE, str);
}
return 0;
}
|
C
|
FFmpeg
| 0 |
CVE-2017-7418
|
https://www.cvedetails.com/cve/CVE-2017-7418/
|
CWE-59
|
https://github.com/proftpd/proftpd/pull/444/commits/349addc3be4fcdad9bd4ec01ad1ccd916c898ed8
|
349addc3be4fcdad9bd4ec01ad1ccd916c898ed8
|
Walk the entire DefaultRoot path, checking for symlinks of any component,
when AllowChrootSymlinks is disabled.
|
MODRET auth_post_retr(cmd_rec *cmd) {
if (auth_anon_allow_robots == TRUE) {
return PR_DECLINED(cmd);
}
if (auth_anon_allow_robots_enabled == TRUE) {
int res;
res = pr_unregister_fs("/robots.txt");
if (res < 0) {
pr_log_debug(DEBUG9, "error removing 'robots' FS for '/robots.txt': %s",
strerror(errno));
}
auth_anon_allow_robots_enabled = FALSE;
}
return PR_DECLINED(cmd);
}
|
MODRET auth_post_retr(cmd_rec *cmd) {
if (auth_anon_allow_robots == TRUE) {
return PR_DECLINED(cmd);
}
if (auth_anon_allow_robots_enabled == TRUE) {
int res;
res = pr_unregister_fs("/robots.txt");
if (res < 0) {
pr_log_debug(DEBUG9, "error removing 'robots' FS for '/robots.txt': %s",
strerror(errno));
}
auth_anon_allow_robots_enabled = FALSE;
}
return PR_DECLINED(cmd);
}
|
C
|
proftpd
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/327585cb0eab0859518643a2d00917081f7e7645
|
327585cb0eab0859518643a2d00917081f7e7645
|
2010-10-26 Kenneth Russell <[email protected]>
Reviewed by Andreas Kling.
Valgrind failure in GraphicsContext3DInternal::reshape
https://bugs.webkit.org/show_bug.cgi?id=48284
* src/WebGraphicsContext3DDefaultImpl.cpp:
(WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl):
git-svn-id: svn://svn.chromium.org/blink/trunk@70534 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
unsigned WebGraphicsContext3DDefaultImpl::createShader(unsigned long shaderType)
{
makeContextCurrent();
ASSERT(shaderType == GL_VERTEX_SHADER || shaderType == GL_FRAGMENT_SHADER);
unsigned shader = glCreateShader(shaderType);
if (shader) {
ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
if (result != m_shaderSourceMap.end())
delete result->second;
m_shaderSourceMap.set(shader, new ShaderSourceEntry(shaderType));
}
return shader;
}
|
unsigned WebGraphicsContext3DDefaultImpl::createShader(unsigned long shaderType)
{
makeContextCurrent();
ASSERT(shaderType == GL_VERTEX_SHADER || shaderType == GL_FRAGMENT_SHADER);
unsigned shader = glCreateShader(shaderType);
if (shader) {
ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
if (result != m_shaderSourceMap.end())
delete result->second;
m_shaderSourceMap.set(shader, new ShaderSourceEntry(shaderType));
}
return shader;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/bfa69d49b17f33635c79f79819b90a8d2089c4b3
|
bfa69d49b17f33635c79f79819b90a8d2089c4b3
|
Change notification cmd line enabling to use the new RuntimeEnabledFeatures code.
BUG=25318
TEST=none
Review URL: http://codereview.chromium.org/339093
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30660 0039d316-1c4b-4281-b951-d872f2087c98
|
bool BrowserRenderProcessHost::Send(IPC::Message* msg) {
if (!channel_.get()) {
delete msg;
return false;
}
return channel_->Send(msg);
}
|
bool BrowserRenderProcessHost::Send(IPC::Message* msg) {
if (!channel_.get()) {
delete msg;
return false;
}
return channel_->Send(msg);
}
|
C
|
Chrome
| 0 |
CVE-2013-4282
|
https://www.cvedetails.com/cve/CVE-2013-4282/
|
CWE-119
|
https://cgit.freedesktop.org/spice/spice/commit/?id=8af619009660b24e0b41ad26b30289eea288fcc2
|
8af619009660b24e0b41ad26b30289eea288fcc2
| null |
static void spice_server_char_device_remove_interface(SpiceBaseInstance *sin)
{
SpiceCharDeviceInstance* char_device =
SPICE_CONTAINEROF(sin, SpiceCharDeviceInstance, base);
spice_info("remove CHAR_DEVICE %s", char_device->subtype);
if (strcmp(char_device->subtype, SUBTYPE_VDAGENT) == 0) {
if (vdagent) {
reds_agent_remove();
}
}
#ifdef USE_SMARTCARD
else if (strcmp(char_device->subtype, SUBTYPE_SMARTCARD) == 0) {
smartcard_device_disconnect(char_device);
}
#endif
else if (strcmp(char_device->subtype, SUBTYPE_USBREDIR) == 0 ||
strcmp(char_device->subtype, SUBTYPE_PORT) == 0) {
spicevmc_device_disconnect(char_device);
} else {
spice_warning("failed to remove char device %s", char_device->subtype);
}
char_device->st = NULL;
}
|
static void spice_server_char_device_remove_interface(SpiceBaseInstance *sin)
{
SpiceCharDeviceInstance* char_device =
SPICE_CONTAINEROF(sin, SpiceCharDeviceInstance, base);
spice_info("remove CHAR_DEVICE %s", char_device->subtype);
if (strcmp(char_device->subtype, SUBTYPE_VDAGENT) == 0) {
if (vdagent) {
reds_agent_remove();
}
}
#ifdef USE_SMARTCARD
else if (strcmp(char_device->subtype, SUBTYPE_SMARTCARD) == 0) {
smartcard_device_disconnect(char_device);
}
#endif
else if (strcmp(char_device->subtype, SUBTYPE_USBREDIR) == 0 ||
strcmp(char_device->subtype, SUBTYPE_PORT) == 0) {
spicevmc_device_disconnect(char_device);
} else {
spice_warning("failed to remove char device %s", char_device->subtype);
}
char_device->st = NULL;
}
|
C
|
spice
| 0 |
CVE-2015-8964
|
https://www.cvedetails.com/cve/CVE-2015-8964/
|
CWE-200
|
https://github.com/torvalds/linux/commit/dd42bf1197144ede075a9d4793123f7689e164bc
|
dd42bf1197144ede075a9d4793123f7689e164bc
|
tty: Prevent ldisc drivers from re-using stale tty fields
Line discipline drivers may mistakenly misuse ldisc-related fields
when initializing. For example, a failure to initialize tty->receive_room
in the N_GIGASET_M101 line discipline was recently found and fixed [1].
Now, the N_X25 line discipline has been discovered accessing the previous
line discipline's already-freed private data [2].
Harden the ldisc interface against misuse by initializing revelant
tty fields before instancing the new line discipline.
[1]
commit fd98e9419d8d622a4de91f76b306af6aa627aa9c
Author: Tilman Schmidt <[email protected]>
Date: Tue Jul 14 00:37:13 2015 +0200
isdn/gigaset: reset tty->receive_room when attaching ser_gigaset
[2] Report from Sasha Levin <[email protected]>
[ 634.336761] ==================================================================
[ 634.338226] BUG: KASAN: use-after-free in x25_asy_open_tty+0x13d/0x490 at addr ffff8800a743efd0
[ 634.339558] Read of size 4 by task syzkaller_execu/8981
[ 634.340359] =============================================================================
[ 634.341598] BUG kmalloc-512 (Not tainted): kasan: bad access detected
...
[ 634.405018] Call Trace:
[ 634.405277] dump_stack (lib/dump_stack.c:52)
[ 634.405775] print_trailer (mm/slub.c:655)
[ 634.406361] object_err (mm/slub.c:662)
[ 634.406824] kasan_report_error (mm/kasan/report.c:138 mm/kasan/report.c:236)
[ 634.409581] __asan_report_load4_noabort (mm/kasan/report.c:279)
[ 634.411355] x25_asy_open_tty (drivers/net/wan/x25_asy.c:559 (discriminator 1))
[ 634.413997] tty_ldisc_open.isra.2 (drivers/tty/tty_ldisc.c:447)
[ 634.414549] tty_set_ldisc (drivers/tty/tty_ldisc.c:567)
[ 634.415057] tty_ioctl (drivers/tty/tty_io.c:2646 drivers/tty/tty_io.c:2879)
[ 634.423524] do_vfs_ioctl (fs/ioctl.c:43 fs/ioctl.c:607)
[ 634.427491] SyS_ioctl (fs/ioctl.c:622 fs/ioctl.c:613)
[ 634.427945] entry_SYSCALL_64_fastpath (arch/x86/entry/entry_64.S:188)
Cc: Tilman Schmidt <[email protected]>
Cc: Sasha Levin <[email protected]>
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
{
unsigned long flags;
int ret = 0;
if (disc < N_TTY || disc >= NR_LDISCS)
return -EINVAL;
raw_spin_lock_irqsave(&tty_ldiscs_lock, flags);
tty_ldiscs[disc] = new_ldisc;
new_ldisc->num = disc;
new_ldisc->refcount = 0;
raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags);
return ret;
}
|
int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
{
unsigned long flags;
int ret = 0;
if (disc < N_TTY || disc >= NR_LDISCS)
return -EINVAL;
raw_spin_lock_irqsave(&tty_ldiscs_lock, flags);
tty_ldiscs[disc] = new_ldisc;
new_ldisc->num = disc;
new_ldisc->refcount = 0;
raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags);
return ret;
}
|
C
|
linux
| 0 |
CVE-2013-2905
|
https://www.cvedetails.com/cve/CVE-2013-2905/
|
CWE-264
|
https://github.com/chromium/chromium/commit/afb848acb43ba316097ab4fddfa38dbd80bc6a71
|
afb848acb43ba316097ab4fddfa38dbd80bc6a71
|
Posix: fix named SHM mappings permissions.
Make sure that named mappings in /dev/shm/ aren't created with
broad permissions.
BUG=254159
[email protected], [email protected]
Review URL: https://codereview.chromium.org/17779002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209814 0039d316-1c4b-4281-b951-d872f2087c98
|
bool SharedMemory::Unmap() {
if (memory_ == NULL)
return false;
munmap(memory_, mapped_size_);
memory_ = NULL;
mapped_size_ = 0;
return true;
}
|
bool SharedMemory::Unmap() {
if (memory_ == NULL)
return false;
munmap(memory_, mapped_size_);
memory_ = NULL;
mapped_size_ = 0;
return true;
}
|
C
|
Chrome
| 0 |
CVE-2016-3156
|
https://www.cvedetails.com/cve/CVE-2016-3156/
|
CWE-399
|
https://github.com/torvalds/linux/commit/fbd40ea0180a2d328c5adc61414dc8bab9335ce2
|
fbd40ea0180a2d328c5adc61414dc8bab9335ce2
|
ipv4: Don't do expensive useless work during inetdev destroy.
When an inetdev is destroyed, every address assigned to the interface
is removed. And in this scenerio we do two pointless things which can
be very expensive if the number of assigned interfaces is large:
1) Address promotion. We are deleting all addresses, so there is no
point in doing this.
2) A full nf conntrack table purge for every address. We only need to
do this once, as is already caught by the existing
masq_dev_notifier so masq_inet_event() can skip this.
Reported-by: Solar Designer <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Tested-by: Cyrill Gorcunov <[email protected]>
|
static bool inetdev_valid_mtu(unsigned int mtu)
{
return mtu >= 68;
}
|
static bool inetdev_valid_mtu(unsigned int mtu)
{
return mtu >= 68;
}
|
C
|
linux
| 0 |
CVE-2016-3916
|
https://www.cvedetails.com/cve/CVE-2016-3916/
|
CWE-119
|
https://android.googlesource.com/platform/system/media/+/8e7a2b4d13bff03973dbad2bfb88a04296140433
|
8e7a2b4d13bff03973dbad2bfb88a04296140433
|
Camera: Prevent data size overflow
Add a function to check overflow when calculating metadata
data size.
Bug: 30741779
Change-Id: I6405fe608567a4f4113674050f826f305ecae030
|
size_t get_camera_metadata_entry_capacity(const camera_metadata_t *metadata) {
return metadata->entry_capacity;
}
|
size_t get_camera_metadata_entry_capacity(const camera_metadata_t *metadata) {
return metadata->entry_capacity;
}
|
C
|
Android
| 0 |
CVE-2017-14604
|
https://www.cvedetails.com/cve/CVE-2017-14604/
|
CWE-20
|
https://github.com/GNOME/nautilus/commit/1630f53481f445ada0a455e9979236d31a8d3bb0
|
1630f53481f445ada0a455e9979236d31a8d3bb0
|
mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission is preserved if the desktop file
comes from a compressed file.
To prevent this, add a metadata::trusted metadata to the file once the
user acknowledges the file as trusted. This adds metadata to the file,
which cannot be added unless it has access to the computer.
Also remove the SHEBANG "trusted" content we were putting inside the
desktop file, since that doesn't add more security since it can come
with the file itself.
https://bugzilla.gnome.org/show_bug.cgi?id=777991
|
get_default_executable_text_file_action (void)
{
int preferences_value;
preferences_value = g_settings_get_enum (nautilus_preferences,
NAUTILUS_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION);
switch (preferences_value)
{
case NAUTILUS_EXECUTABLE_TEXT_LAUNCH:
{
return ACTIVATION_ACTION_LAUNCH;
}
case NAUTILUS_EXECUTABLE_TEXT_DISPLAY:
{
return ACTIVATION_ACTION_OPEN_IN_APPLICATION;
}
case NAUTILUS_EXECUTABLE_TEXT_ASK:
default:
return ACTIVATION_ACTION_ASK;
}
}
|
get_default_executable_text_file_action (void)
{
int preferences_value;
preferences_value = g_settings_get_enum (nautilus_preferences,
NAUTILUS_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION);
switch (preferences_value)
{
case NAUTILUS_EXECUTABLE_TEXT_LAUNCH:
{
return ACTIVATION_ACTION_LAUNCH;
}
case NAUTILUS_EXECUTABLE_TEXT_DISPLAY:
{
return ACTIVATION_ACTION_OPEN_IN_APPLICATION;
}
case NAUTILUS_EXECUTABLE_TEXT_ASK:
default:
return ACTIVATION_ACTION_ASK;
}
}
|
C
|
nautilus
| 0 |
CVE-2019-17178
|
https://www.cvedetails.com/cve/CVE-2019-17178/
|
CWE-772
|
https://github.com/akallabeth/FreeRDP/commit/fc80ab45621bd966f70594c0b7393ec005a94007
|
fc80ab45621bd966f70594c0b7393ec005a94007
|
Fixed #5645: realloc return handling
|
static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h,
const LodePNGColorMode* info, const LodePNGEncoderSettings* settings)
{
/*
For PNG filter method 0
out must be a buffer with as size: h + (w * h * bpp + 7) / 8, because there are
the scanlines with 1 extra byte per scanline
*/
unsigned bpp = lodepng_get_bpp(info);
/*the width of a scanline in bytes, not including the filter type*/
size_t linebytes = (w * bpp + 7) / 8;
/*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/
size_t bytewidth = (bpp + 7) / 8;
const unsigned char* prevline = 0;
unsigned x, y;
unsigned error = 0;
LodePNGFilterStrategy strategy = settings->filter_strategy;
/*
There is a heuristic called the minimum sum of absolute differences heuristic, suggested by the PNG standard:
* If the image type is Palette, or the bit depth is smaller than 8, then do not filter the image (i.e.
use fixed filtering, with the filter None).
* (The other case) If the image type is Grayscale or RGB (with or without Alpha), and the bit depth is
not smaller than 8, then use adaptive filtering heuristic as follows: independently for each row, apply
all five filters and select the filter that produces the smallest sum of absolute values per row.
This heuristic is used if filter strategy is LFS_MINSUM and filter_palette_zero is true.
If filter_palette_zero is true and filter_strategy is not LFS_MINSUM, the above heuristic is followed,
but for "the other case", whatever strategy filter_strategy is set to instead of the minimum sum
heuristic is used.
*/
if(settings->filter_palette_zero &&
(info->colortype == LCT_PALETTE || info->bitdepth < 8)) strategy = LFS_ZERO;
if(bpp == 0) return 31; /*error: invalid color type*/
if(strategy == LFS_ZERO)
{
for(y = 0; y < h; y++)
{
size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/
size_t inindex = linebytes * y;
out[outindex] = 0; /*filter type byte*/
filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, 0);
prevline = &in[inindex];
}
}
else if(strategy == LFS_MINSUM)
{
/*adaptive filtering*/
size_t sum[5];
ucvector attempt[5]; /*five filtering attempts, one for each filter type*/
size_t smallest = 0;
unsigned char type, i, bestType = 0;
for(type = 0; type < 5; type++)
{
ucvector_init(&attempt[type]);
if(!ucvector_resize(&attempt[type], linebytes))
{
for(i=0; i<type; i++) ucvector_cleanup(&attempt[i]);
return 83; /*alloc fail*/
}
}
if(!error)
{
for(y = 0; y < h; y++)
{
/*try the 5 filter types*/
for(type = 0; type < 5; type++)
{
filterScanline(attempt[type].data, &in[y * linebytes], prevline, linebytes, bytewidth, type);
/*calculate the sum of the result*/
sum[type] = 0;
if(type == 0)
{
for(x = 0; x < linebytes; x++) sum[type] += (unsigned char)(attempt[type].data[x]);
}
else
{
for(x = 0; x < linebytes; x++)
{
/*For differences, each byte should be treated as signed, values above 127 are negative
(converted to signed char). Filtertype 0 isn't a difference though, so use unsigned there.
This means filtertype 0 is almost never chosen, but that is justified.*/
unsigned char s = attempt[type].data[x];
sum[type] += s < 128 ? s : (255U - s);
}
}
/*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/
if(type == 0 || sum[type] < smallest)
{
bestType = type;
smallest = sum[type];
}
}
prevline = &in[y * linebytes];
/*now fill the out values*/
out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/
for(x = 0; x < linebytes; x++) out[y * (linebytes + 1) + 1 + x] = attempt[bestType].data[x];
}
}
for(type = 0; type < 5; type++) ucvector_cleanup(&attempt[type]);
}
else if(strategy == LFS_ENTROPY)
{
float sum[5];
ucvector attempt[5]; /*five filtering attempts, one for each filter type*/
float smallest = 0;
unsigned type, i, bestType = 0;
unsigned count[256];
for(type = 0; type < 5; type++)
{
ucvector_init(&attempt[type]);
if(!ucvector_resize(&attempt[type], linebytes))
{
for(i=0; i<type; i++) ucvector_cleanup(&attempt[i]);
return 83; /*alloc fail*/
}
}
for(y = 0; y < h; y++)
{
/*try the 5 filter types*/
for(type = 0; type < 5; type++)
{
filterScanline(attempt[type].data, &in[y * linebytes], prevline, linebytes, bytewidth, type);
for(x = 0; x < 256; x++) count[x] = 0;
for(x = 0; x < linebytes; x++) count[attempt[type].data[x]]++;
count[type]++; /*the filter type itself is part of the scanline*/
sum[type] = 0;
for(x = 0; x < 256; x++)
{
float p = count[x] / (float)(linebytes + 1);
sum[type] += count[x] == 0 ? 0 : flog2(1 / p) * p;
}
/*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/
if(type == 0 || sum[type] < smallest)
{
bestType = type;
smallest = sum[type];
}
}
prevline = &in[y * linebytes];
/*now fill the out values*/
out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/
for(x = 0; x < linebytes; x++) out[y * (linebytes + 1) + 1 + x] = attempt[bestType].data[x];
}
for(type = 0; type < 5; type++) ucvector_cleanup(&attempt[type]);
}
else if(strategy == LFS_PREDEFINED)
{
for(y = 0; y < h; y++)
{
size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/
size_t inindex = linebytes * y;
unsigned char type = settings->predefined_filters[y];
out[outindex] = type; /*filter type byte*/
filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type);
prevline = &in[inindex];
}
}
else if(strategy == LFS_BRUTE_FORCE)
{
/*brute force filter chooser.
deflate the scanline after every filter attempt to see which one deflates best.
This is very slow and gives only slightly smaller, sometimes even larger, result*/
size_t size[5];
ucvector attempt[5]; /*five filtering attempts, one for each filter type*/
size_t smallest = 0;
unsigned type = 0, bestType = 0;
unsigned char* dummy;
LodePNGCompressSettings zlibsettings = settings->zlibsettings;
/*use fixed tree on the attempts so that the tree is not adapted to the filtertype on purpose,
to simulate the true case where the tree is the same for the whole image. Sometimes it gives
better result with dynamic tree anyway. Using the fixed tree sometimes gives worse, but in rare
cases better compression. It does make this a bit less slow, so it's worth doing this.*/
zlibsettings.btype = 1;
/*a custom encoder likely doesn't read the btype setting and is optimized for complete PNG
images only, so disable it*/
zlibsettings.custom_zlib = 0;
zlibsettings.custom_deflate = 0;
for(type = 0; type < 5; type++)
{
ucvector_init(&attempt[type]);
ucvector_resize(&attempt[type], linebytes); /*todo: give error if resize failed*/
}
for(y = 0; y < h; y++) /*try the 5 filter types*/
{
for(type = 0; type < 5; type++)
{
unsigned testsize = attempt[type].size;
/*if(testsize > 8) testsize /= 8;*/ /*it already works good enough by testing a part of the row*/
filterScanline(attempt[type].data, &in[y * linebytes], prevline, linebytes, bytewidth, type);
size[type] = 0;
dummy = 0;
zlib_compress(&dummy, &size[type], attempt[type].data, testsize, &zlibsettings);
free(dummy);
/*check if this is smallest size (or if type == 0 it's the first case so always store the values)*/
if(type == 0 || size[type] < smallest)
{
bestType = type;
smallest = size[type];
}
}
prevline = &in[y * linebytes];
out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/
for(x = 0; x < linebytes; x++) out[y * (linebytes + 1) + 1 + x] = attempt[bestType].data[x];
}
for(type = 0; type < 5; type++) ucvector_cleanup(&attempt[type]);
}
else return 88; /* unknown filter strategy */
return error;
}
|
static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h,
const LodePNGColorMode* info, const LodePNGEncoderSettings* settings)
{
/*
For PNG filter method 0
out must be a buffer with as size: h + (w * h * bpp + 7) / 8, because there are
the scanlines with 1 extra byte per scanline
*/
unsigned bpp = lodepng_get_bpp(info);
/*the width of a scanline in bytes, not including the filter type*/
size_t linebytes = (w * bpp + 7) / 8;
/*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/
size_t bytewidth = (bpp + 7) / 8;
const unsigned char* prevline = 0;
unsigned x, y;
unsigned error = 0;
LodePNGFilterStrategy strategy = settings->filter_strategy;
/*
There is a heuristic called the minimum sum of absolute differences heuristic, suggested by the PNG standard:
* If the image type is Palette, or the bit depth is smaller than 8, then do not filter the image (i.e.
use fixed filtering, with the filter None).
* (The other case) If the image type is Grayscale or RGB (with or without Alpha), and the bit depth is
not smaller than 8, then use adaptive filtering heuristic as follows: independently for each row, apply
all five filters and select the filter that produces the smallest sum of absolute values per row.
This heuristic is used if filter strategy is LFS_MINSUM and filter_palette_zero is true.
If filter_palette_zero is true and filter_strategy is not LFS_MINSUM, the above heuristic is followed,
but for "the other case", whatever strategy filter_strategy is set to instead of the minimum sum
heuristic is used.
*/
if(settings->filter_palette_zero &&
(info->colortype == LCT_PALETTE || info->bitdepth < 8)) strategy = LFS_ZERO;
if(bpp == 0) return 31; /*error: invalid color type*/
if(strategy == LFS_ZERO)
{
for(y = 0; y < h; y++)
{
size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/
size_t inindex = linebytes * y;
out[outindex] = 0; /*filter type byte*/
filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, 0);
prevline = &in[inindex];
}
}
else if(strategy == LFS_MINSUM)
{
/*adaptive filtering*/
size_t sum[5];
ucvector attempt[5]; /*five filtering attempts, one for each filter type*/
size_t smallest = 0;
unsigned char type, i, bestType = 0;
for(type = 0; type < 5; type++)
{
ucvector_init(&attempt[type]);
if(!ucvector_resize(&attempt[type], linebytes))
{
for(i=0; i<type; i++) ucvector_cleanup(&attempt[i]);
return 83; /*alloc fail*/
}
}
if(!error)
{
for(y = 0; y < h; y++)
{
/*try the 5 filter types*/
for(type = 0; type < 5; type++)
{
filterScanline(attempt[type].data, &in[y * linebytes], prevline, linebytes, bytewidth, type);
/*calculate the sum of the result*/
sum[type] = 0;
if(type == 0)
{
for(x = 0; x < linebytes; x++) sum[type] += (unsigned char)(attempt[type].data[x]);
}
else
{
for(x = 0; x < linebytes; x++)
{
/*For differences, each byte should be treated as signed, values above 127 are negative
(converted to signed char). Filtertype 0 isn't a difference though, so use unsigned there.
This means filtertype 0 is almost never chosen, but that is justified.*/
unsigned char s = attempt[type].data[x];
sum[type] += s < 128 ? s : (255U - s);
}
}
/*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/
if(type == 0 || sum[type] < smallest)
{
bestType = type;
smallest = sum[type];
}
}
prevline = &in[y * linebytes];
/*now fill the out values*/
out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/
for(x = 0; x < linebytes; x++) out[y * (linebytes + 1) + 1 + x] = attempt[bestType].data[x];
}
}
for(type = 0; type < 5; type++) ucvector_cleanup(&attempt[type]);
}
else if(strategy == LFS_ENTROPY)
{
float sum[5];
ucvector attempt[5]; /*five filtering attempts, one for each filter type*/
float smallest = 0;
unsigned type, i, bestType = 0;
unsigned count[256];
for(type = 0; type < 5; type++)
{
ucvector_init(&attempt[type]);
if(!ucvector_resize(&attempt[type], linebytes))
{
for(i=0; i<type; i++) ucvector_cleanup(&attempt[i]);
return 83; /*alloc fail*/
}
}
for(y = 0; y < h; y++)
{
/*try the 5 filter types*/
for(type = 0; type < 5; type++)
{
filterScanline(attempt[type].data, &in[y * linebytes], prevline, linebytes, bytewidth, type);
for(x = 0; x < 256; x++) count[x] = 0;
for(x = 0; x < linebytes; x++) count[attempt[type].data[x]]++;
count[type]++; /*the filter type itself is part of the scanline*/
sum[type] = 0;
for(x = 0; x < 256; x++)
{
float p = count[x] / (float)(linebytes + 1);
sum[type] += count[x] == 0 ? 0 : flog2(1 / p) * p;
}
/*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/
if(type == 0 || sum[type] < smallest)
{
bestType = type;
smallest = sum[type];
}
}
prevline = &in[y * linebytes];
/*now fill the out values*/
out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/
for(x = 0; x < linebytes; x++) out[y * (linebytes + 1) + 1 + x] = attempt[bestType].data[x];
}
for(type = 0; type < 5; type++) ucvector_cleanup(&attempt[type]);
}
else if(strategy == LFS_PREDEFINED)
{
for(y = 0; y < h; y++)
{
size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/
size_t inindex = linebytes * y;
unsigned char type = settings->predefined_filters[y];
out[outindex] = type; /*filter type byte*/
filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type);
prevline = &in[inindex];
}
}
else if(strategy == LFS_BRUTE_FORCE)
{
/*brute force filter chooser.
deflate the scanline after every filter attempt to see which one deflates best.
This is very slow and gives only slightly smaller, sometimes even larger, result*/
size_t size[5];
ucvector attempt[5]; /*five filtering attempts, one for each filter type*/
size_t smallest = 0;
unsigned type = 0, bestType = 0;
unsigned char* dummy;
LodePNGCompressSettings zlibsettings = settings->zlibsettings;
/*use fixed tree on the attempts so that the tree is not adapted to the filtertype on purpose,
to simulate the true case where the tree is the same for the whole image. Sometimes it gives
better result with dynamic tree anyway. Using the fixed tree sometimes gives worse, but in rare
cases better compression. It does make this a bit less slow, so it's worth doing this.*/
zlibsettings.btype = 1;
/*a custom encoder likely doesn't read the btype setting and is optimized for complete PNG
images only, so disable it*/
zlibsettings.custom_zlib = 0;
zlibsettings.custom_deflate = 0;
for(type = 0; type < 5; type++)
{
ucvector_init(&attempt[type]);
ucvector_resize(&attempt[type], linebytes); /*todo: give error if resize failed*/
}
for(y = 0; y < h; y++) /*try the 5 filter types*/
{
for(type = 0; type < 5; type++)
{
unsigned testsize = attempt[type].size;
/*if(testsize > 8) testsize /= 8;*/ /*it already works good enough by testing a part of the row*/
filterScanline(attempt[type].data, &in[y * linebytes], prevline, linebytes, bytewidth, type);
size[type] = 0;
dummy = 0;
zlib_compress(&dummy, &size[type], attempt[type].data, testsize, &zlibsettings);
free(dummy);
/*check if this is smallest size (or if type == 0 it's the first case so always store the values)*/
if(type == 0 || size[type] < smallest)
{
bestType = type;
smallest = size[type];
}
}
prevline = &in[y * linebytes];
out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/
for(x = 0; x < linebytes; x++) out[y * (linebytes + 1) + 1 + x] = attempt[bestType].data[x];
}
for(type = 0; type < 5; type++) ucvector_cleanup(&attempt[type]);
}
else return 88; /* unknown filter strategy */
return error;
}
|
C
|
FreeRDP
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/93dd81929416a0170935e6eeac03d10aed60df18
|
93dd81929416a0170935e6eeac03d10aed60df18
|
Implement NPN_RemoveProperty
https://bugs.webkit.org/show_bug.cgi?id=43315
Reviewed by Sam Weinig.
WebKit2:
* WebProcess/Plugins/NPJSObject.cpp:
(WebKit::NPJSObject::removeProperty):
Try to remove the property.
(WebKit::NPJSObject::npClass):
Add NP_RemoveProperty.
(WebKit::NPJSObject::NP_RemoveProperty):
Call NPJSObject::removeProperty.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_RemoveProperty):
Call the NPClass::removeProperty function.
WebKitTools:
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Add NPRuntimeRemoveProperty.cpp
* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
(PluginTest::NPN_GetStringIdentifier):
(PluginTest::NPN_GetIntIdentifier):
(PluginTest::NPN_RemoveProperty):
Add NPN_ helpers.
* DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
Support more NPClass functions.
* DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp: Added.
(NPRuntimeRemoveProperty::NPRuntimeRemoveProperty):
Test for NPN_RemoveProperty.
(NPRuntimeRemoveProperty::TestObject::hasMethod):
(NPRuntimeRemoveProperty::TestObject::invoke):
Add a testRemoveProperty method.
(NPRuntimeRemoveProperty::NPP_GetValue):
Return the test object.
* DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
* DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
* GNUmakefile.am:
Add NPRuntimeRemoveProperty.cpp
LayoutTests:
Add a test for NPN_RemoveProperty.
* plugins/npruntime/remove-property-expected.txt: Added.
* plugins/npruntime/remove-property.html: Added.
git-svn-id: svn://svn.chromium.org/blink/trunk@64444 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
std::map<std::string, PluginTest::CreateTestFunction>& PluginTest::createTestFunctions()
{
static std::map<std::string, CreateTestFunction> testFunctions;
return testFunctions;
}
|
std::map<std::string, PluginTest::CreateTestFunction>& PluginTest::createTestFunctions()
{
static std::map<std::string, CreateTestFunction> testFunctions;
return testFunctions;
}
|
C
|
Chrome
| 0 |
CVE-2011-4131
|
https://www.cvedetails.com/cve/CVE-2011-4131/
|
CWE-189
|
https://github.com/torvalds/linux/commit/bf118a342f10dafe44b14451a1392c3254629a1f
|
bf118a342f10dafe44b14451a1392c3254629a1f
|
NFSv4: include bitmap in nfsv4 get acl data
The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and the acl data
xdr length to the (cached) acl page data.
This is a general solution to commit e5012d1f "NFSv4.1: update
nfs4_fattr_bitmap_maxsz" and fixes hitting a BUG_ON in xdr_shrink_bufhead
when getting ACLs.
Fix a bug in decode_getacl that returned -EINVAL on ACLs > page when getxattr
was called with a NULL buffer, preventing ACL > PAGE_SIZE from being retrieved.
Cc: [email protected]
Signed-off-by: Andy Adamson <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
|
static int decode_attr_space_free(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{
__be32 *p;
int status = 0;
*res = 0;
if (unlikely(bitmap[1] & (FATTR4_WORD1_SPACE_FREE - 1U)))
return -EIO;
if (likely(bitmap[1] & FATTR4_WORD1_SPACE_FREE)) {
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
xdr_decode_hyper(p, res);
bitmap[1] &= ~FATTR4_WORD1_SPACE_FREE;
}
dprintk("%s: space free=%Lu\n", __func__, (unsigned long long)*res);
return status;
out_overflow:
print_overflow_msg(__func__, xdr);
return -EIO;
}
|
static int decode_attr_space_free(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{
__be32 *p;
int status = 0;
*res = 0;
if (unlikely(bitmap[1] & (FATTR4_WORD1_SPACE_FREE - 1U)))
return -EIO;
if (likely(bitmap[1] & FATTR4_WORD1_SPACE_FREE)) {
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
xdr_decode_hyper(p, res);
bitmap[1] &= ~FATTR4_WORD1_SPACE_FREE;
}
dprintk("%s: space free=%Lu\n", __func__, (unsigned long long)*res);
return status;
out_overflow:
print_overflow_msg(__func__, xdr);
return -EIO;
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/f135caea12111ac8fc18c3e3ee8d0c18afab74b3
|
f135caea12111ac8fc18c3e3ee8d0c18afab74b3
|
Remove core/platform/win
This CL moves the files to platform/win.
[email protected]
BUG=297477
Review URL: https://codereview.chromium.org/26113005
git-svn-id: svn://svn.chromium.org/blink/trunk@159156 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
IntSize ScrollbarThemeWin::buttonSize(ScrollbarThemeClient* scrollbar)
{
int thickness = scrollbarThickness(scrollbar->controlSize());
const int kLayoutTestModeGirth = 17;
int girth = isRunningLayoutTest() ? kLayoutTestModeGirth : thickness;
if (scrollbar->orientation() == HorizontalScrollbar) {
int width = scrollbar->width() < 2 * girth ? scrollbar->width() / 2 : girth;
return IntSize(width, thickness);
}
int height = scrollbar->height() < 2 * girth ? scrollbar->height() / 2 : girth;
return IntSize(thickness, height);
}
|
IntSize ScrollbarThemeWin::buttonSize(ScrollbarThemeClient* scrollbar)
{
int thickness = scrollbarThickness(scrollbar->controlSize());
const int kLayoutTestModeGirth = 17;
int girth = isRunningLayoutTest() ? kLayoutTestModeGirth : thickness;
if (scrollbar->orientation() == HorizontalScrollbar) {
int width = scrollbar->width() < 2 * girth ? scrollbar->width() / 2 : girth;
return IntSize(width, thickness);
}
int height = scrollbar->height() < 2 * girth ? scrollbar->height() / 2 : girth;
return IntSize(thickness, height);
}
|
C
|
Chrome
| 0 |
CVE-2015-3215
|
https://www.cvedetails.com/cve/CVE-2015-3215/
|
CWE-20
|
https://github.com/YanVugenfirer/kvm-guest-drivers-windows/commit/fbfa4d1083ea84c5429992ca3e996d7d4fbc8238
|
fbfa4d1083ea84c5429992ca3e996d7d4fbc8238
|
NetKVM: BZ#1169718: More rigoruous testing of incoming packet
Signed-off-by: Joseph Hindin <[email protected]>
|
QualifyIpPacket(IPHeader *pIpHeader, ULONG len)
{
tTcpIpPacketParsingResult res;
res.value = 0;
if (len < 4)
{
res.ipStatus = ppresNotIP;
return res;
}
UCHAR ver_len = pIpHeader->v4.ip_verlen;
UCHAR ip_version = (ver_len & 0xF0) >> 4;
USHORT ipHeaderSize = 0;
USHORT fullLength = 0;
res.value = 0;
if (ip_version == 4)
{
if (len < sizeof(IPv4Header))
{
res.ipStatus = ppresNotIP;
return res;
}
ipHeaderSize = (ver_len & 0xF) << 2;
fullLength = swap_short(pIpHeader->v4.ip_length);
DPrintf(3, ("ip_version %d, ipHeaderSize %d, protocol %d, iplen %d, L2 payload length %d\n",
ip_version, ipHeaderSize, pIpHeader->v4.ip_protocol, fullLength, len));
res.ipStatus = (ipHeaderSize >= sizeof(IPv4Header)) ? ppresIPV4 : ppresNotIP;
if (res.ipStatus == ppresNotIP)
{
return res;
}
if (ipHeaderSize >= fullLength || len < fullLength)
{
DPrintf(2, ("[%s] - truncated packet - ip_version %d, ipHeaderSize %d, protocol %d, iplen %d, L2 payload length %d\n",
ip_version, ipHeaderSize, pIpHeader->v4.ip_protocol, fullLength, len));
res.ipCheckSum = ppresIPTooShort;
return res;
}
}
else if (ip_version == 6)
{
UCHAR nextHeader = pIpHeader->v6.ip6_next_header;
BOOLEAN bParsingDone = FALSE;
ipHeaderSize = sizeof(pIpHeader->v6);
res.ipStatus = ppresIPV6;
res.ipCheckSum = ppresCSOK;
fullLength = swap_short(pIpHeader->v6.ip6_payload_len);
fullLength += ipHeaderSize;
while (nextHeader != 59)
{
IPv6ExtHeader *pExt;
switch (nextHeader)
{
case PROTOCOL_TCP:
bParsingDone = TRUE;
res.xxpStatus = ppresXxpKnown;
res.TcpUdp = ppresIsTCP;
res.xxpFull = len >= fullLength ? 1 : 0;
res = ProcessTCPHeader(res, pIpHeader, len, ipHeaderSize);
break;
case PROTOCOL_UDP:
bParsingDone = TRUE;
res.xxpStatus = ppresXxpKnown;
res.TcpUdp = ppresIsUDP;
res.xxpFull = len >= fullLength ? 1 : 0;
res = ProcessUDPHeader(res, pIpHeader, len, ipHeaderSize);
break;
case 0:
case 60:
case 43:
case 44:
case 51:
case 50:
case 135:
if (len >= ((ULONG)ipHeaderSize + 8))
{
pExt = (IPv6ExtHeader *)((PUCHAR)pIpHeader + ipHeaderSize);
nextHeader = pExt->ip6ext_next_header;
ipHeaderSize += 8;
ipHeaderSize += pExt->ip6ext_hdr_len * 8;
}
else
{
DPrintf(0, ("[%s] ERROR: Break in the middle of ext. headers(len %d, hdr > %d)\n", __FUNCTION__, len, ipHeaderSize));
res.ipStatus = ppresNotIP;
bParsingDone = TRUE;
}
break;
default:
res.xxpStatus = ppresXxpOther;
bParsingDone = TRUE;
break;
}
if (bParsingDone)
break;
}
if (ipHeaderSize <= MAX_SUPPORTED_IPV6_HEADERS)
{
DPrintf(3, ("ip_version %d, ipHeaderSize %d, protocol %d, iplen %d\n",
ip_version, ipHeaderSize, nextHeader, fullLength));
res.ipHeaderSize = ipHeaderSize;
}
else
{
DPrintf(0, ("[%s] ERROR: IP chain is too large (%d)\n", __FUNCTION__, ipHeaderSize));
res.ipStatus = ppresNotIP;
}
}
if (res.ipStatus == ppresIPV4)
{
res.ipHeaderSize = ipHeaderSize;
res.IsFragment = (pIpHeader->v4.ip_offset & ~0xC0) != 0;
switch (pIpHeader->v4.ip_protocol)
{
case PROTOCOL_TCP:
{
res = ProcessTCPHeader(res, pIpHeader, len, ipHeaderSize);
}
break;
case PROTOCOL_UDP:
{
res = ProcessUDPHeader(res, pIpHeader, len, ipHeaderSize);
}
break;
default:
res.xxpStatus = ppresXxpOther;
break;
}
}
return res;
}
|
QualifyIpPacket(IPHeader *pIpHeader, ULONG len)
{
tTcpIpPacketParsingResult res;
UCHAR ver_len = pIpHeader->v4.ip_verlen;
UCHAR ip_version = (ver_len & 0xF0) >> 4;
USHORT ipHeaderSize = 0;
USHORT fullLength = 0;
res.value = 0;
if (ip_version == 4)
{
ipHeaderSize = (ver_len & 0xF) << 2;
fullLength = swap_short(pIpHeader->v4.ip_length);
DPrintf(3, ("ip_version %d, ipHeaderSize %d, protocol %d, iplen %d\n",
ip_version, ipHeaderSize, pIpHeader->v4.ip_protocol, fullLength));
res.ipStatus = (ipHeaderSize >= sizeof(IPv4Header)) ? ppresIPV4 : ppresNotIP;
if (len < ipHeaderSize) res.ipCheckSum = ppresIPTooShort;
if (fullLength) {}
else
{
DPrintf(2, ("ip v.%d, iplen %d\n", ip_version, fullLength));
}
}
else if (ip_version == 6)
{
UCHAR nextHeader = pIpHeader->v6.ip6_next_header;
BOOLEAN bParsingDone = FALSE;
ipHeaderSize = sizeof(pIpHeader->v6);
res.ipStatus = ppresIPV6;
res.ipCheckSum = ppresCSOK;
fullLength = swap_short(pIpHeader->v6.ip6_payload_len);
fullLength += ipHeaderSize;
while (nextHeader != 59)
{
IPv6ExtHeader *pExt;
switch (nextHeader)
{
case PROTOCOL_TCP:
bParsingDone = TRUE;
res.xxpStatus = ppresXxpKnown;
res.TcpUdp = ppresIsTCP;
res.xxpFull = len >= fullLength ? 1 : 0;
res = ProcessTCPHeader(res, pIpHeader, len, ipHeaderSize);
break;
case PROTOCOL_UDP:
bParsingDone = TRUE;
res.xxpStatus = ppresXxpKnown;
res.TcpUdp = ppresIsUDP;
res.xxpFull = len >= fullLength ? 1 : 0;
res = ProcessUDPHeader(res, pIpHeader, len, ipHeaderSize);
break;
case 0:
case 60:
case 43:
case 44:
case 51:
case 50:
case 135:
if (len >= ((ULONG)ipHeaderSize + 8))
{
pExt = (IPv6ExtHeader *)((PUCHAR)pIpHeader + ipHeaderSize);
nextHeader = pExt->ip6ext_next_header;
ipHeaderSize += 8;
ipHeaderSize += pExt->ip6ext_hdr_len * 8;
}
else
{
DPrintf(0, ("[%s] ERROR: Break in the middle of ext. headers(len %d, hdr > %d)\n", __FUNCTION__, len, ipHeaderSize));
res.ipStatus = ppresNotIP;
bParsingDone = TRUE;
}
break;
default:
res.xxpStatus = ppresXxpOther;
bParsingDone = TRUE;
break;
}
if (bParsingDone)
break;
}
if (ipHeaderSize <= MAX_SUPPORTED_IPV6_HEADERS)
{
DPrintf(3, ("ip_version %d, ipHeaderSize %d, protocol %d, iplen %d\n",
ip_version, ipHeaderSize, nextHeader, fullLength));
res.ipHeaderSize = ipHeaderSize;
}
else
{
DPrintf(0, ("[%s] ERROR: IP chain is too large (%d)\n", __FUNCTION__, ipHeaderSize));
res.ipStatus = ppresNotIP;
}
}
if (res.ipStatus == ppresIPV4)
{
res.ipHeaderSize = ipHeaderSize;
res.xxpFull = len >= fullLength ? 1 : 0;
res.IsFragment = (pIpHeader->v4.ip_offset & ~0xC0) != 0;
switch (pIpHeader->v4.ip_protocol)
{
case PROTOCOL_TCP:
{
res = ProcessTCPHeader(res, pIpHeader, len, ipHeaderSize);
}
break;
case PROTOCOL_UDP:
{
res = ProcessUDPHeader(res, pIpHeader, len, ipHeaderSize);
}
break;
default:
res.xxpStatus = ppresXxpOther;
break;
}
}
return res;
}
|
C
|
kvm-guest-drivers-windows
| 1 |
CVE-2012-5112
|
https://www.cvedetails.com/cve/CVE-2012-5112/
|
CWE-399
|
https://github.com/chromium/chromium/commit/d65b01ca819881a507b5e60c25a2f9caff58cd57
|
d65b01ca819881a507b5e60c25a2f9caff58cd57
|
Wipe out QuotaThreadTask.
This is a one of a series of refactoring patches for QuotaManager.
http://codereview.chromium.org/10872054/
http://codereview.chromium.org/10917060/
BUG=139270
Review URL: https://chromiumcodereview.appspot.com/10919070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154987 0039d316-1c4b-4281-b951-d872f2087c98
|
void QuotaManager::DidDatabaseWork(bool success) {
db_disabled_ = !success;
}
|
void QuotaManager::DidDatabaseWork(bool success) {
db_disabled_ = !success;
}
|
C
|
Chrome
| 0 |
CVE-2019-5755
|
https://www.cvedetails.com/cve/CVE-2019-5755/
|
CWE-189
|
https://github.com/chromium/chromium/commit/971548cdca2d4c0a6fedd3db0c94372c2a27eac3
|
971548cdca2d4c0a6fedd3db0c94372c2a27eac3
|
Make MediaStreamDispatcherHost per-request instead of per-frame.
Instead of having RenderFrameHost own a single MSDH to handle all
requests from a frame, MSDH objects will be owned by a strong binding.
A consequence of this is that an additional requester ID is added to
requests to MediaStreamManager, so that an MSDH is able to cancel only
requests generated by it.
In practice, MSDH will continue to be per frame in most cases since
each frame normally makes a single request for an MSDH object.
This fixes a lifetime issue caused by the IO thread executing tasks
after the RenderFrameHost dies.
Drive-by: Fix some minor lint issues.
Bug: 912520
Change-Id: I52742ffc98b9fc57ce8e6f5093a61aed86d3e516
Reviewed-on: https://chromium-review.googlesource.com/c/1369799
Reviewed-by: Emircan Uysaler <[email protected]>
Reviewed-by: Ken Buchanan <[email protected]>
Reviewed-by: Olga Sharonova <[email protected]>
Commit-Queue: Guido Urdaneta <[email protected]>
Cr-Commit-Position: refs/heads/master@{#616347}
|
MediaStreamDispatcherHost::MediaStreamDispatcherHost(
int render_process_id,
int render_frame_id,
MediaStreamManager* media_stream_manager)
: render_process_id_(render_process_id),
render_frame_id_(render_frame_id),
requester_id_(next_requester_id_++),
media_stream_manager_(media_stream_manager),
salt_and_origin_callback_(
base::BindRepeating(&GetMediaDeviceSaltAndOrigin)),
weak_factory_(this) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
}
|
MediaStreamDispatcherHost::MediaStreamDispatcherHost(
int render_process_id,
int render_frame_id,
MediaStreamManager* media_stream_manager)
: render_process_id_(render_process_id),
render_frame_id_(render_frame_id),
media_stream_manager_(media_stream_manager),
salt_and_origin_callback_(
base::BindRepeating(&GetMediaDeviceSaltAndOrigin)),
weak_factory_(this) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
bindings_.set_connection_error_handler(
base::Bind(&MediaStreamDispatcherHost::CancelAllRequests,
weak_factory_.GetWeakPtr()));
}
|
C
|
Chrome
| 1 |
CVE-2018-13006
|
https://www.cvedetails.com/cve/CVE-2018-13006/
|
CWE-125
|
https://github.com/gpac/gpac/commit/bceb03fd2be95097a7b409ea59914f332fb6bc86
|
bceb03fd2be95097a7b409ea59914f332fb6bc86
|
fixed 2 possible heap overflows (inc. #1088)
|
GF_Err unkn_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 type = s->type;
GF_UnknownBox *ptr = (GF_UnknownBox *)s;
if (!s) return GF_BAD_PARAM;
s->type = ptr->original_4cc;
e = gf_isom_box_write_header(s, bs);
s->type = type;
if (e) return e;
if (ptr->dataSize && ptr->data) {
gf_bs_write_data(bs, ptr->data, ptr->dataSize);
}
return GF_OK;
}
|
GF_Err unkn_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 type = s->type;
GF_UnknownBox *ptr = (GF_UnknownBox *)s;
if (!s) return GF_BAD_PARAM;
s->type = ptr->original_4cc;
e = gf_isom_box_write_header(s, bs);
s->type = type;
if (e) return e;
if (ptr->dataSize && ptr->data) {
gf_bs_write_data(bs, ptr->data, ptr->dataSize);
}
return GF_OK;
}
|
C
|
gpac
| 0 |
CVE-2019-5790
|
https://www.cvedetails.com/cve/CVE-2019-5790/
|
CWE-190
|
https://github.com/chromium/chromium/commit/88fcb3a6899d77b64195423333ad81a00803f997
|
88fcb3a6899d77b64195423333ad81a00803f997
|
Move user activation check to RemoteFrame::Navigate's callers.
Currently RemoteFrame::Navigate is the user of
Frame::HasTransientUserActivation that passes a RemoteFrame*, and
it seems wrong because the user activation (user gesture) needed by
the navigation should belong to the LocalFrame that initiated the
navigation.
Follow-up CLs after this one will update UserActivation code in
Frame to take a LocalFrame* instead of a Frame*, and get rid of
redundant IPCs.
Bug: 811414
Change-Id: I771c1694043edb54374a44213d16715d9c7da704
Reviewed-on: https://chromium-review.googlesource.com/914736
Commit-Queue: Mustaq Ahmed <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#536728}
|
bool DragController::TryDHTMLDrag(DragData* drag_data,
DragOperation& operation,
LocalFrame& local_root) {
DCHECK(drag_data);
DCHECK(document_under_mouse_);
if (!local_root.View())
return false;
DataTransferAccessPolicy policy = kDataTransferTypesReadable;
DataTransfer* data_transfer = CreateDraggingDataTransfer(policy, drag_data);
DragOperation src_op_mask = drag_data->DraggingSourceOperationMask();
data_transfer->SetSourceOperation(src_op_mask);
WebMouseEvent event = CreateMouseEvent(drag_data);
if (local_root.GetEventHandler().UpdateDragAndDrop(event, data_transfer) ==
WebInputEventResult::kNotHandled) {
data_transfer->SetAccessPolicy(
kDataTransferNumb); // invalidate clipboard here for security
return false;
}
operation = data_transfer->DestinationOperation();
if (data_transfer->DropEffectIsUninitialized()) {
operation = DefaultOperationForDrag(src_op_mask);
} else if (!(src_op_mask & operation)) {
operation = kDragOperationNone;
}
data_transfer->SetAccessPolicy(
kDataTransferNumb); // invalidate clipboard here for security
return true;
}
|
bool DragController::TryDHTMLDrag(DragData* drag_data,
DragOperation& operation,
LocalFrame& local_root) {
DCHECK(drag_data);
DCHECK(document_under_mouse_);
if (!local_root.View())
return false;
DataTransferAccessPolicy policy = kDataTransferTypesReadable;
DataTransfer* data_transfer = CreateDraggingDataTransfer(policy, drag_data);
DragOperation src_op_mask = drag_data->DraggingSourceOperationMask();
data_transfer->SetSourceOperation(src_op_mask);
WebMouseEvent event = CreateMouseEvent(drag_data);
if (local_root.GetEventHandler().UpdateDragAndDrop(event, data_transfer) ==
WebInputEventResult::kNotHandled) {
data_transfer->SetAccessPolicy(
kDataTransferNumb); // invalidate clipboard here for security
return false;
}
operation = data_transfer->DestinationOperation();
if (data_transfer->DropEffectIsUninitialized()) {
operation = DefaultOperationForDrag(src_op_mask);
} else if (!(src_op_mask & operation)) {
operation = kDragOperationNone;
}
data_transfer->SetAccessPolicy(
kDataTransferNumb); // invalidate clipboard here for security
return true;
}
|
C
|
Chrome
| 0 |
CVE-2016-5216
|
https://www.cvedetails.com/cve/CVE-2016-5216/
|
CWE-416
|
https://github.com/chromium/chromium/commit/bf6a6765d44b09c64b8c75d749efb84742a250e7
|
bf6a6765d44b09c64b8c75d749efb84742a250e7
|
[pdf] Defer page unloading in JS callback.
One of the callbacks from PDFium JavaScript into the embedder is to get the
current page number. In Chromium, this will trigger a call to
CalculateMostVisiblePage that method will determine the visible pages and unload
any non-visible pages. But, if the originating JS is on a non-visible page
we'll delete the page and annotations associated with that page. This will
cause issues as we are currently working with those objects when the JavaScript
returns.
This Cl defers the page unloading triggered by getting the most visible page
until the next event is handled by the Chromium embedder.
BUG=chromium:653090
Review-Url: https://codereview.chromium.org/2418533002
Cr-Commit-Position: refs/heads/master@{#424781}
|
void PDFiumEngine::UpdateTickMarks() {
std::vector<pp::Rect> tickmarks;
GetAllScreenRectsUnion(&find_results_, pp::Point(0, 0), &tickmarks);
client_->UpdateTickMarks(tickmarks);
}
|
void PDFiumEngine::UpdateTickMarks() {
std::vector<pp::Rect> tickmarks;
GetAllScreenRectsUnion(&find_results_, pp::Point(0, 0), &tickmarks);
client_->UpdateTickMarks(tickmarks);
}
|
C
|
Chrome
| 0 |
CVE-2015-7990
|
https://www.cvedetails.com/cve/CVE-2015-7990/
|
CWE-362
|
https://github.com/torvalds/linux/commit/8c7188b23474cca017b3ef354c4a58456f68303a
|
8c7188b23474cca017b3ef354c4a58456f68303a
|
RDS: fix race condition when sending a message on unbound socket
Sasha's found a NULL pointer dereference in the RDS connection code when
sending a message to an apparently unbound socket. The problem is caused
by the code checking if the socket is bound in rds_sendmsg(), which checks
the rs_bound_addr field without taking a lock on the socket. This opens a
race where rs_bound_addr is temporarily set but where the transport is not
in rds_bind(), leading to a NULL pointer dereference when trying to
dereference 'trans' in __rds_conn_create().
Vegard wrote a reproducer for this issue, so kindly ask him to share if
you're interested.
I cannot reproduce the NULL pointer dereference using Vegard's reproducer
with this patch, whereas I could without.
Complete earlier incomplete fix to CVE-2015-6937:
74e98eb08588 ("RDS: verify the underlying transport exists before creating a connection")
Cc: David S. Miller <[email protected]>
Cc: [email protected]
Reviewed-by: Vegard Nossum <[email protected]>
Reviewed-by: Sasha Levin <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Quentin Casasnovas <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
void rds_send_drop_acked(struct rds_connection *conn, u64 ack,
is_acked_func is_acked)
{
struct rds_message *rm, *tmp;
unsigned long flags;
LIST_HEAD(list);
spin_lock_irqsave(&conn->c_lock, flags);
list_for_each_entry_safe(rm, tmp, &conn->c_retrans, m_conn_item) {
if (!rds_send_is_acked(rm, ack, is_acked))
break;
list_move(&rm->m_conn_item, &list);
clear_bit(RDS_MSG_ON_CONN, &rm->m_flags);
}
/* order flag updates with spin locks */
if (!list_empty(&list))
smp_mb__after_atomic();
spin_unlock_irqrestore(&conn->c_lock, flags);
/* now remove the messages from the sock list as needed */
rds_send_remove_from_sock(&list, RDS_RDMA_SUCCESS);
}
|
void rds_send_drop_acked(struct rds_connection *conn, u64 ack,
is_acked_func is_acked)
{
struct rds_message *rm, *tmp;
unsigned long flags;
LIST_HEAD(list);
spin_lock_irqsave(&conn->c_lock, flags);
list_for_each_entry_safe(rm, tmp, &conn->c_retrans, m_conn_item) {
if (!rds_send_is_acked(rm, ack, is_acked))
break;
list_move(&rm->m_conn_item, &list);
clear_bit(RDS_MSG_ON_CONN, &rm->m_flags);
}
/* order flag updates with spin locks */
if (!list_empty(&list))
smp_mb__after_atomic();
spin_unlock_irqrestore(&conn->c_lock, flags);
/* now remove the messages from the sock list as needed */
rds_send_remove_from_sock(&list, RDS_RDMA_SUCCESS);
}
|
C
|
linux
| 0 |
CVE-2017-15411
|
https://www.cvedetails.com/cve/CVE-2017-15411/
|
CWE-416
|
https://github.com/chromium/chromium/commit/9d81094d7b0bfc8be6bba2f5084e790677e527c8
|
9d81094d7b0bfc8be6bba2f5084e790677e527c8
|
[Reland #1] Add Android OOP HP end-to-end tests.
The original CL added a javatest and its dependencies to the apk_under_test.
This causes the dependencies to be stripped from the instrumentation_apk, which
causes issue. This CL updates the build configuration so that the javatest and
its dependencies are only added to the instrumentation_apk.
This is a reland of e0b4355f0651adb1ebc2c513dc4410471af712f5
Original change's description:
> Add Android OOP HP end-to-end tests.
>
> This CL has three components:
> 1) The bulk of the logic in OOP HP was refactored into ProfilingTestDriver.
> 2) Adds a java instrumentation test, along with a JNI shim that forwards into
> ProfilingTestDriver.
> 3) Creates a new apk: chrome_public_apk_for_test that contains the same
> content as chrome_public_apk, as well as native files needed for (2).
> chrome_public_apk_test now targets chrome_public_apk_for_test instead of
> chrome_public_apk.
>
> Other ideas, discarded:
> * Originally, I attempted to make the browser_tests target runnable on
> Android. The primary problem is that native test harness cannot fork
> or spawn processes. This is difficult to solve.
>
> More details on each of the components:
> (1) ProfilingTestDriver
> * The TracingController test was migrated to use ProfilingTestDriver, but the
> write-to-file test was left as-is. The latter behavior will likely be phased
> out, but I'll clean that up in a future CL.
> * gtest isn't supported for Android instrumentation tests. ProfilingTestDriver
> has a single function RunTest that returns a 'bool' indicating success. On
> failure, the class uses LOG(ERROR) to print the nature of the error. This will
> cause the error to be printed out on browser_test error. On instrumentation
> test failure, the error will be forwarded to logcat, which is available on all
> infra bot test runs.
> (2) Instrumentation test
> * For now, I only added a single test for the "browser" mode. Furthermore, I'm
> only testing the start with command-line path.
> (3) New apk
> * libchromefortest is a new shared library that contains all content from
> libchrome, but also contains native sources for the JNI shim.
> * chrome_public_apk_for_test is a new apk that contains all content from
> chrome_public_apk, but uses a single shared library libchromefortest rather
> than libchrome. This also contains java sources for the JNI shim.
> * There is no way to just add a second shared library to chrome_public_apk
> that just contains the native sources from the JNI shim without causing ODR
> issues.
> * chrome_public_test_apk now has apk_under_test = chrome_public_apk_for_test.
> * There is no way to add native JNI sources as a shared library to
> chrome_public_test_apk without causing ODR issues.
>
> Finally, this CL drastically increases the timeout to wait for native
> initialization. The previous timeout was 2 *
> CriteriaHelper.DEFAULT_MAX_TIME_TO_POLL, which flakily failed for this test.
> This suggests that this step/timeout is generally flaky. I increased the timeout
> to 20 * CriteriaHelper.DEFAULT_MAX_TIME_TO_POLL.
>
> Bug: 753218
> Change-Id: Ic224b7314fff57f1770a4048aa5753f54e040b55
> Reviewed-on: https://chromium-review.googlesource.com/770148
> Commit-Queue: Erik Chen <[email protected]>
> Reviewed-by: John Budorick <[email protected]>
> Reviewed-by: Brett Wilson <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#517541}
Bug: 753218
TBR: [email protected]
Change-Id: Ic6aafb34c2467253f75cc85da48200d19f3bc9af
Reviewed-on: https://chromium-review.googlesource.com/777697
Commit-Queue: Erik Chen <[email protected]>
Reviewed-by: John Budorick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#517850}
|
void OnTraceUploadComplete(TraceCrashServiceUploader* uploader,
bool success,
const std::string& feedback) {
if (!success) {
LOG(ERROR) << "Cannot upload trace file: " << feedback;
return;
}
LOG(WARNING) << "slow-reports sent: '" << feedback << '"';
}
|
void OnTraceUploadComplete(TraceCrashServiceUploader* uploader,
bool success,
const std::string& feedback) {
if (!success) {
LOG(ERROR) << "Cannot upload trace file: " << feedback;
return;
}
LOG(WARNING) << "slow-reports sent: '" << feedback << '"';
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/ee8d6fd30b022ac2c87b7a190c954e7bb3c9b21e
|
ee8d6fd30b022ac2c87b7a190c954e7bb3c9b21e
|
Clean up calls like "gfx::Rect(0, 0, size().width(), size().height()".
The caller can use the much shorter "gfx::Rect(size())", since gfx::Rect
has a constructor that just takes a Size.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2204001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48283 0039d316-1c4b-4281-b951-d872f2087c98
|
void RenderWidget::didInvalidateRect(const WebRect& rect) {
bool update_pending = paint_aggregator_.HasPendingUpdate();
gfx::Rect view_rect(size_);
gfx::Rect damaged_rect = view_rect.Intersect(rect);
if (damaged_rect.IsEmpty())
return;
paint_aggregator_.InvalidateRect(damaged_rect);
if (update_pending)
return;
if (!paint_aggregator_.HasPendingUpdate())
return;
if (update_reply_pending())
return;
MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
this, &RenderWidget::CallDoDeferredUpdate));
}
|
void RenderWidget::didInvalidateRect(const WebRect& rect) {
bool update_pending = paint_aggregator_.HasPendingUpdate();
gfx::Rect view_rect(0, 0, size_.width(), size_.height());
gfx::Rect damaged_rect = view_rect.Intersect(rect);
if (damaged_rect.IsEmpty())
return;
paint_aggregator_.InvalidateRect(damaged_rect);
if (update_pending)
return;
if (!paint_aggregator_.HasPendingUpdate())
return;
if (update_reply_pending())
return;
MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
this, &RenderWidget::CallDoDeferredUpdate));
}
|
C
|
Chrome
| 1 |
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 TabStripModel::InsertWebContentsAt(int index,
WebContents* contents,
int add_types) {
TabContents* tab_contents = TabContents::FromWebContents(contents);
DCHECK(tab_contents);
InsertTabContentsAt(index, tab_contents, add_types);
}
|
void TabStripModel::InsertWebContentsAt(int index,
WebContents* contents,
int add_types) {
TabContents* tab_contents = TabContents::FromWebContents(contents);
DCHECK(tab_contents);
InsertTabContentsAt(index, tab_contents, add_types);
}
|
C
|
Chrome
| 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
|
void gf_fm_request_call(u32 type, u32 param, int *value) {
if (fm_cbk)
fm_cbk(fm_cbk_obj, type, param, value);
}
|
void gf_fm_request_call(u32 type, u32 param, int *value) {
if (fm_cbk)
fm_cbk(fm_cbk_obj, type, param, value);
}
|
C
|
gpac
| 0 |
CVE-2016-1639
|
https://www.cvedetails.com/cve/CVE-2016-1639/
| null |
https://github.com/chromium/chromium/commit/c66b1fc49870c514b1c1e8b53498153176d7ec2b
|
c66b1fc49870c514b1c1e8b53498153176d7ec2b
|
cros: Check initial auth type when showing views login.
Bug: 859611
Change-Id: I0298db9bbf4aed6bd40600aef2e1c5794e8cd058
Reviewed-on: https://chromium-review.googlesource.com/1123056
Reviewed-by: Xiaoyin Hu <[email protected]>
Commit-Queue: Jacob Dufault <[email protected]>
Cr-Commit-Position: refs/heads/master@{#572224}
|
LockContentsView::UserState::UserState(AccountId account_id)
|
LockContentsView::UserState::UserState(AccountId account_id)
: account_id(account_id) {}
|
C
|
Chrome
| 1 |
CVE-2017-0377
|
https://www.cvedetails.com/cve/CVE-2017-0377/
|
CWE-200
|
https://github.com/torproject/tor/commit/665baf5ed5c6186d973c46cdea165c0548027350
|
665baf5ed5c6186d973c46cdea165c0548027350
|
Consider the exit family when applying guard restrictions.
When the new path selection logic went into place, I accidentally
dropped the code that considered the _family_ of the exit node when
deciding if the guard was usable, and we didn't catch that during
code review.
This patch makes the guard_restriction_t code consider the exit
family as well, and adds some (hopefully redundant) checks for the
case where we lack a node_t for a guard but we have a bridge_info_t
for it.
Fixes bug 22753; bugfix on 0.3.0.1-alpha. Tracked as TROVE-2016-006
and CVE-2017-0377.
|
node_is_usable(const node_t *node)
{
return (node->rs) || (node->ri);
}
|
node_is_usable(const node_t *node)
{
return (node->rs) || (node->ri);
}
|
C
|
tor
| 0 |
CVE-2017-12843
|
https://www.cvedetails.com/cve/CVE-2017-12843/
|
CWE-20
|
https://github.com/cyrusimap/cyrus-imapd/commit/53c4137bd924b954432c6c59da7572c4c5ffa901
|
53c4137bd924b954432c6c59da7572c4c5ffa901
|
imapd: check for isadmin BEFORE parsing sync lines
|
static void cmd_setacl(char *tag, const char *name,
const char *identifier, const char *rights)
{
int r;
mbentry_t *mbentry = NULL;
char *intname = mboxname_from_external(name, &imapd_namespace, imapd_userid);
/* is it remote? */
r = mlookup(tag, name, intname, &mbentry);
if (r == IMAP_MAILBOX_MOVED) return;
if (!r && (mbentry->mbtype & MBTYPE_REMOTE)) {
/* remote mailbox */
struct backend *s = NULL;
int res;
s = proxy_findserver(mbentry->server, &imap_protocol,
proxy_userid, &backend_cached,
&backend_current, &backend_inbox, imapd_in);
if (!s) r = IMAP_SERVER_UNAVAILABLE;
if (!r && imapd_userisadmin && supports_referrals) {
/* They aren't an admin remotely, so let's refer them */
imapd_refer(tag, mbentry->server, name);
referral_kick = 1;
mboxlist_entry_free(&mbentry);
return;
}
mboxlist_entry_free(&mbentry);
if (!r) {
if (rights) {
prot_printf(s->out,
"%s Setacl {" SIZE_T_FMT "+}\r\n%s"
" {" SIZE_T_FMT "+}\r\n%s {" SIZE_T_FMT "+}\r\n%s\r\n",
tag, strlen(name), name,
strlen(identifier), identifier,
strlen(rights), rights);
} else {
prot_printf(s->out,
"%s Deleteacl {" SIZE_T_FMT "+}\r\n%s"
" {" SIZE_T_FMT "+}\r\n%s\r\n",
tag, strlen(name), name,
strlen(identifier), identifier);
}
res = pipe_until_tag(s, tag, 0);
if (!CAPA(s, CAPA_MUPDATE) && res == PROXY_OK) {
/* setup new ACL in MUPDATE */
}
/* make sure we've seen the update */
if (ultraparanoid && res == PROXY_OK) kick_mupdate();
}
imapd_check(s, 0);
if (r) {
prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
} else {
/* we're allowed to reference last_result since the noop, if
sent, went to a different server */
prot_printf(imapd_out, "%s %s", tag, s->last_result.s);
}
free(intname);
return;
}
mboxlist_entry_free(&mbentry);
/* local mailbox */
if (!r) {
char *err;
/* send BAD response if rights string contains unrecognised chars */
if (rights && *rights) {
r = cyrus_acl_checkstr(rights, &err);
if (r) {
prot_printf(imapd_out, "%s BAD %s\r\n", tag, err);
free(err);
free(intname);
return;
}
}
r = mboxlist_setacl(&imapd_namespace, intname, identifier, rights,
imapd_userisadmin || imapd_userisproxyadmin,
proxy_userid, imapd_authstate);
}
imapd_check(NULL, 0);
if (r) {
prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
} else {
if (config_mupdate_server)
kick_mupdate();
prot_printf(imapd_out, "%s OK %s\r\n", tag,
error_message(IMAP_OK_COMPLETED));
}
free(intname);
}
|
static void cmd_setacl(char *tag, const char *name,
const char *identifier, const char *rights)
{
int r;
mbentry_t *mbentry = NULL;
char *intname = mboxname_from_external(name, &imapd_namespace, imapd_userid);
/* is it remote? */
r = mlookup(tag, name, intname, &mbentry);
if (r == IMAP_MAILBOX_MOVED) return;
if (!r && (mbentry->mbtype & MBTYPE_REMOTE)) {
/* remote mailbox */
struct backend *s = NULL;
int res;
s = proxy_findserver(mbentry->server, &imap_protocol,
proxy_userid, &backend_cached,
&backend_current, &backend_inbox, imapd_in);
if (!s) r = IMAP_SERVER_UNAVAILABLE;
if (!r && imapd_userisadmin && supports_referrals) {
/* They aren't an admin remotely, so let's refer them */
imapd_refer(tag, mbentry->server, name);
referral_kick = 1;
mboxlist_entry_free(&mbentry);
return;
}
mboxlist_entry_free(&mbentry);
if (!r) {
if (rights) {
prot_printf(s->out,
"%s Setacl {" SIZE_T_FMT "+}\r\n%s"
" {" SIZE_T_FMT "+}\r\n%s {" SIZE_T_FMT "+}\r\n%s\r\n",
tag, strlen(name), name,
strlen(identifier), identifier,
strlen(rights), rights);
} else {
prot_printf(s->out,
"%s Deleteacl {" SIZE_T_FMT "+}\r\n%s"
" {" SIZE_T_FMT "+}\r\n%s\r\n",
tag, strlen(name), name,
strlen(identifier), identifier);
}
res = pipe_until_tag(s, tag, 0);
if (!CAPA(s, CAPA_MUPDATE) && res == PROXY_OK) {
/* setup new ACL in MUPDATE */
}
/* make sure we've seen the update */
if (ultraparanoid && res == PROXY_OK) kick_mupdate();
}
imapd_check(s, 0);
if (r) {
prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
} else {
/* we're allowed to reference last_result since the noop, if
sent, went to a different server */
prot_printf(imapd_out, "%s %s", tag, s->last_result.s);
}
free(intname);
return;
}
mboxlist_entry_free(&mbentry);
/* local mailbox */
if (!r) {
char *err;
/* send BAD response if rights string contains unrecognised chars */
if (rights && *rights) {
r = cyrus_acl_checkstr(rights, &err);
if (r) {
prot_printf(imapd_out, "%s BAD %s\r\n", tag, err);
free(err);
free(intname);
return;
}
}
r = mboxlist_setacl(&imapd_namespace, intname, identifier, rights,
imapd_userisadmin || imapd_userisproxyadmin,
proxy_userid, imapd_authstate);
}
imapd_check(NULL, 0);
if (r) {
prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
} else {
if (config_mupdate_server)
kick_mupdate();
prot_printf(imapd_out, "%s OK %s\r\n", tag,
error_message(IMAP_OK_COMPLETED));
}
free(intname);
}
|
C
|
cyrus-imapd
| 0 |
CVE-2015-8863
|
https://www.cvedetails.com/cve/CVE-2015-8863/
|
CWE-119
|
https://github.com/stedolan/jq/commit/8eb1367ca44e772963e704a700ef72ae2e12babd
|
8eb1367ca44e772963e704a700ef72ae2e12babd
|
Heap buffer overflow in tokenadd() (fix #105)
This was an off-by one: the NUL terminator byte was not allocated on
resize. This was triggered by JSON-encoded numbers longer than 256
bytes.
|
jv jv_parse(const char* string) {
return jv_parse_sized(string, strlen(string));
}
|
jv jv_parse(const char* string) {
return jv_parse_sized(string, strlen(string));
}
|
C
|
jq
| 0 |
CVE-2019-5787
|
https://www.cvedetails.com/cve/CVE-2019-5787/
|
CWE-416
|
https://github.com/chromium/chromium/commit/6a7063ae61cf031630b48bdcdb09863ffc199962
|
6a7063ae61cf031630b48bdcdb09863ffc199962
|
Clean up CanvasResourceDispatcher on finalizer
We may have pending mojo messages after GC, so we want to drop the
dispatcher as soon as possible.
Bug: 929757,913964
Change-Id: I5789bcbb55aada4a74c67a28758f07686f8911c0
Reviewed-on: https://chromium-review.googlesource.com/c/1489175
Reviewed-by: Ken Rockot <[email protected]>
Commit-Queue: Ken Rockot <[email protected]>
Commit-Queue: Fernando Serboncini <[email protected]>
Auto-Submit: Fernando Serboncini <[email protected]>
Cr-Commit-Position: refs/heads/master@{#635833}
|
HTMLCanvasElement::~HTMLCanvasElement() {
if (surface_layer_bridge_ && surface_layer_bridge_->GetCcLayer())
GraphicsLayer::UnregisterContentsLayer(surface_layer_bridge_->GetCcLayer());
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(
-externally_allocated_memory_);
}
|
HTMLCanvasElement::~HTMLCanvasElement() {
if (surface_layer_bridge_ && surface_layer_bridge_->GetCcLayer())
GraphicsLayer::UnregisterContentsLayer(surface_layer_bridge_->GetCcLayer());
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(
-externally_allocated_memory_);
}
|
C
|
Chrome
| 0 |
CVE-2010-3435
|
https://www.cvedetails.com/cve/CVE-2010-3435/
| null |
http://git.altlinux.org/people/ldv/packages/?p=pam.git;a=commit;h=06f882f30092a39a1db867c9744b2ca8d60e4ad6
|
06f882f30092a39a1db867c9744b2ca8d60e4ad6
| null |
static void _clean_var(VAR *var)
{
if (var->name) {
free(var->name);
}
if (var->defval && ("e != var->defval)) {
free(var->defval);
}
if (var->override && ("e != var->override)) {
free(var->override);
}
var->name = NULL;
var->value = NULL; /* never has memory specific to it */
var->defval = NULL;
var->override = NULL;
return;
}
|
static void _clean_var(VAR *var)
{
if (var->name) {
free(var->name);
}
if (var->defval && ("e != var->defval)) {
free(var->defval);
}
if (var->override && ("e != var->override)) {
free(var->override);
}
var->name = NULL;
var->value = NULL; /* never has memory specific to it */
var->defval = NULL;
var->override = NULL;
return;
}
|
C
|
altlinux
| 0 |
CVE-2016-1624
|
https://www.cvedetails.com/cve/CVE-2016-1624/
|
CWE-119
|
https://github.com/chromium/chromium/commit/7716418a27d561ee295a99f11fd3865580748de2
|
7716418a27d561ee295a99f11fd3865580748de2
|
Cherry pick underflow fix.
BUG=583607
Review URL: https://codereview.chromium.org/1662313002
Cr-Commit-Position: refs/heads/master@{#373736}
|
BrotliResult BrotliDecompress(BrotliInput input, BrotliOutput output) {
BrotliState s;
BrotliResult result;
BrotliStateInit(&s);
result = BrotliDecompressStreaming(input, output, 1, &s);
if (result == BROTLI_RESULT_NEEDS_MORE_INPUT) {
/* Not ok: it didn't finish even though this is a non-streaming function. */
result = BROTLI_FAILURE();
}
BrotliStateCleanup(&s);
return result;
}
|
BrotliResult BrotliDecompress(BrotliInput input, BrotliOutput output) {
BrotliState s;
BrotliResult result;
BrotliStateInit(&s);
result = BrotliDecompressStreaming(input, output, 1, &s);
if (result == BROTLI_RESULT_NEEDS_MORE_INPUT) {
/* Not ok: it didn't finish even though this is a non-streaming function. */
result = BROTLI_FAILURE();
}
BrotliStateCleanup(&s);
return result;
}
|
C
|
Chrome
| 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}
|
void AudioHandler::SetNodeType(NodeType type) {
DCHECK_EQ(node_type_, kNodeTypeUnknown);
DCHECK_NE(type, kNodeTypeUnknown);
DCHECK_NE(type, kNodeTypeEnd);
node_type_ = type;
#if DEBUG_AUDIONODE_REFERENCES
++node_count_[type];
fprintf(stderr, "[%16p]: %16p: %2d: AudioHandler::AudioHandler [%3d]\n",
Context(), this, GetNodeType(), node_count_[GetNodeType()]);
#endif
}
|
void AudioHandler::SetNodeType(NodeType type) {
DCHECK_EQ(node_type_, kNodeTypeUnknown);
DCHECK_NE(type, kNodeTypeUnknown);
DCHECK_NE(type, kNodeTypeEnd);
node_type_ = type;
#if DEBUG_AUDIONODE_REFERENCES
++node_count_[type];
fprintf(stderr, "[%16p]: %16p: %2d: AudioHandler::AudioHandler [%3d]\n",
Context(), this, GetNodeType(), node_count_[GetNodeType()]);
#endif
}
|
C
|
Chrome
| 0 |
CVE-2012-2872
|
https://www.cvedetails.com/cve/CVE-2012-2872/
|
CWE-79
|
https://github.com/chromium/chromium/commit/68b6502084af7e2021f7321633f5fbb5f997a58b
|
68b6502084af7e2021f7321633f5fbb5f997a58b
|
Properly EscapeForHTML potentially malicious input from X.509 certificates.
BUG=142956
TEST=Create an X.509 certificate with a CN field that contains JavaScript.
When you get the SSL error screen, check that the HTML + JavaScript is
escape instead of being treated as HTML and/or script.
Review URL: https://chromiumcodereview.appspot.com/10827364
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152210 0039d316-1c4b-4281-b951-d872f2087c98
|
int SSLErrorInfo::GetErrorsForCertStatus(int cert_id,
net::CertStatus cert_status,
const GURL& url,
std::vector<SSLErrorInfo>* errors) {
const net::CertStatus kErrorFlags[] = {
net::CERT_STATUS_COMMON_NAME_INVALID,
net::CERT_STATUS_DATE_INVALID,
net::CERT_STATUS_AUTHORITY_INVALID,
net::CERT_STATUS_NO_REVOCATION_MECHANISM,
net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION,
net::CERT_STATUS_REVOKED,
net::CERT_STATUS_INVALID,
net::CERT_STATUS_WEAK_SIGNATURE_ALGORITHM,
net::CERT_STATUS_WEAK_KEY
};
const ErrorType kErrorTypes[] = {
CERT_COMMON_NAME_INVALID,
CERT_DATE_INVALID,
CERT_AUTHORITY_INVALID,
CERT_NO_REVOCATION_MECHANISM,
CERT_UNABLE_TO_CHECK_REVOCATION,
CERT_REVOKED,
CERT_INVALID,
CERT_WEAK_SIGNATURE_ALGORITHM,
CERT_WEAK_KEY
};
DCHECK(arraysize(kErrorFlags) == arraysize(kErrorTypes));
scoped_refptr<net::X509Certificate> cert = NULL;
int count = 0;
for (size_t i = 0; i < arraysize(kErrorFlags); ++i) {
if (cert_status & kErrorFlags[i]) {
count++;
if (!cert.get()) {
bool r = content::CertStore::GetInstance()->RetrieveCert(
cert_id, &cert);
DCHECK(r);
}
if (errors)
errors->push_back(SSLErrorInfo::CreateError(kErrorTypes[i], cert, url));
}
}
return count;
}
|
int SSLErrorInfo::GetErrorsForCertStatus(int cert_id,
net::CertStatus cert_status,
const GURL& url,
std::vector<SSLErrorInfo>* errors) {
const net::CertStatus kErrorFlags[] = {
net::CERT_STATUS_COMMON_NAME_INVALID,
net::CERT_STATUS_DATE_INVALID,
net::CERT_STATUS_AUTHORITY_INVALID,
net::CERT_STATUS_NO_REVOCATION_MECHANISM,
net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION,
net::CERT_STATUS_REVOKED,
net::CERT_STATUS_INVALID,
net::CERT_STATUS_WEAK_SIGNATURE_ALGORITHM,
net::CERT_STATUS_WEAK_KEY
};
const ErrorType kErrorTypes[] = {
CERT_COMMON_NAME_INVALID,
CERT_DATE_INVALID,
CERT_AUTHORITY_INVALID,
CERT_NO_REVOCATION_MECHANISM,
CERT_UNABLE_TO_CHECK_REVOCATION,
CERT_REVOKED,
CERT_INVALID,
CERT_WEAK_SIGNATURE_ALGORITHM,
CERT_WEAK_KEY
};
DCHECK(arraysize(kErrorFlags) == arraysize(kErrorTypes));
scoped_refptr<net::X509Certificate> cert = NULL;
int count = 0;
for (size_t i = 0; i < arraysize(kErrorFlags); ++i) {
if (cert_status & kErrorFlags[i]) {
count++;
if (!cert.get()) {
bool r = content::CertStore::GetInstance()->RetrieveCert(
cert_id, &cert);
DCHECK(r);
}
if (errors)
errors->push_back(SSLErrorInfo::CreateError(kErrorTypes[i], cert, url));
}
}
return count;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/3a353ebdb7753a3fbeb401c4c0e0f3358ccbb90b
|
3a353ebdb7753a3fbeb401c4c0e0f3358ccbb90b
|
Support pausing media when a context is frozen.
Media is resumed when the context is unpaused. This feature will be used
for bfcache and pausing iframes feature policy.
BUG=907125
Change-Id: Ic3925ea1a4544242b7bf0b9ad8c9cb9f63976bbd
Reviewed-on: https://chromium-review.googlesource.com/c/1410126
Commit-Queue: Dave Tapuska <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Mounir Lamouri <[email protected]>
Cr-Commit-Position: refs/heads/master@{#623319}
|
TimeRanges* HTMLMediaElement::played() {
if (playing_) {
double time = currentTime();
if (time > last_seek_time_)
AddPlayedRange(last_seek_time_, time);
}
if (!played_time_ranges_)
played_time_ranges_ = TimeRanges::Create();
return played_time_ranges_->Copy();
}
|
TimeRanges* HTMLMediaElement::played() {
if (playing_) {
double time = currentTime();
if (time > last_seek_time_)
AddPlayedRange(last_seek_time_, time);
}
if (!played_time_ranges_)
played_time_ranges_ = TimeRanges::Create();
return played_time_ranges_->Copy();
}
|
C
|
Chrome
| 0 |
CVE-2017-12187
|
https://www.cvedetails.com/cve/CVE-2017-12187/
|
CWE-20
|
https://cgit.freedesktop.org/xorg/xserver/commit/?id=cad5a1050b7184d828aef9c1dd151c3ab649d37e
|
cad5a1050b7184d828aef9c1dd151c3ab649d37e
| null |
PanoramiXExtensionInit(void)
{
int i;
Bool success = FALSE;
ExtensionEntry *extEntry;
ScreenPtr pScreen = screenInfo.screens[0];
PanoramiXScreenPtr pScreenPriv;
if (noPanoramiXExtension)
return;
if (!dixRegisterPrivateKey(&PanoramiXScreenKeyRec, PRIVATE_SCREEN, 0)) {
noPanoramiXExtension = TRUE;
return;
}
if (!dixRegisterPrivateKey
(&PanoramiXGCKeyRec, PRIVATE_GC, sizeof(PanoramiXGCRec))) {
noPanoramiXExtension = TRUE;
return;
}
PanoramiXNumScreens = screenInfo.numScreens;
if (PanoramiXNumScreens == 1) { /* Only 1 screen */
noPanoramiXExtension = TRUE;
return;
}
while (panoramiXGeneration != serverGeneration) {
extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0,
ProcPanoramiXDispatch,
SProcPanoramiXDispatch, PanoramiXResetProc,
StandardMinorOpcode);
if (!extEntry)
break;
/*
* First make sure all the basic allocations succeed. If not,
* run in non-PanoramiXeen mode.
*/
FOR_NSCREENS(i) {
pScreen = screenInfo.screens[i];
pScreenPriv = malloc(sizeof(PanoramiXScreenRec));
dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey,
pScreenPriv);
if (!pScreenPriv) {
noPanoramiXExtension = TRUE;
return;
}
pScreenPriv->CreateGC = pScreen->CreateGC;
pScreenPriv->CloseScreen = pScreen->CloseScreen;
pScreen->CreateGC = XineramaCreateGC;
pScreen->CloseScreen = XineramaCloseScreen;
}
XRC_DRAWABLE = CreateNewResourceClass();
XRT_WINDOW = CreateNewResourceType(XineramaDeleteResource,
"XineramaWindow");
if (XRT_WINDOW)
XRT_WINDOW |= XRC_DRAWABLE;
XRT_PIXMAP = CreateNewResourceType(XineramaDeleteResource,
"XineramaPixmap");
if (XRT_PIXMAP)
XRT_PIXMAP |= XRC_DRAWABLE;
XRT_GC = CreateNewResourceType(XineramaDeleteResource, "XineramaGC");
XRT_COLORMAP = CreateNewResourceType(XineramaDeleteResource,
"XineramaColormap");
if (XRT_WINDOW && XRT_PIXMAP && XRT_GC && XRT_COLORMAP) {
panoramiXGeneration = serverGeneration;
success = TRUE;
}
SetResourceTypeErrorValue(XRT_WINDOW, BadWindow);
SetResourceTypeErrorValue(XRT_PIXMAP, BadPixmap);
SetResourceTypeErrorValue(XRT_GC, BadGC);
SetResourceTypeErrorValue(XRT_COLORMAP, BadColor);
}
if (!success) {
noPanoramiXExtension = TRUE;
ErrorF(PANORAMIX_PROTOCOL_NAME " extension failed to initialize\n");
return;
}
XineramaInitData();
/*
* Put our processes into the ProcVector
*/
for (i = 256; i--;)
SavedProcVector[i] = ProcVector[i];
ProcVector[X_CreateWindow] = PanoramiXCreateWindow;
ProcVector[X_ChangeWindowAttributes] = PanoramiXChangeWindowAttributes;
ProcVector[X_DestroyWindow] = PanoramiXDestroyWindow;
ProcVector[X_DestroySubwindows] = PanoramiXDestroySubwindows;
ProcVector[X_ChangeSaveSet] = PanoramiXChangeSaveSet;
ProcVector[X_ReparentWindow] = PanoramiXReparentWindow;
ProcVector[X_MapWindow] = PanoramiXMapWindow;
ProcVector[X_MapSubwindows] = PanoramiXMapSubwindows;
ProcVector[X_UnmapWindow] = PanoramiXUnmapWindow;
ProcVector[X_UnmapSubwindows] = PanoramiXUnmapSubwindows;
ProcVector[X_ConfigureWindow] = PanoramiXConfigureWindow;
ProcVector[X_CirculateWindow] = PanoramiXCirculateWindow;
ProcVector[X_GetGeometry] = PanoramiXGetGeometry;
ProcVector[X_TranslateCoords] = PanoramiXTranslateCoords;
ProcVector[X_CreatePixmap] = PanoramiXCreatePixmap;
ProcVector[X_FreePixmap] = PanoramiXFreePixmap;
ProcVector[X_CreateGC] = PanoramiXCreateGC;
ProcVector[X_ChangeGC] = PanoramiXChangeGC;
ProcVector[X_CopyGC] = PanoramiXCopyGC;
ProcVector[X_SetDashes] = PanoramiXSetDashes;
ProcVector[X_SetClipRectangles] = PanoramiXSetClipRectangles;
ProcVector[X_FreeGC] = PanoramiXFreeGC;
ProcVector[X_ClearArea] = PanoramiXClearToBackground;
ProcVector[X_CopyArea] = PanoramiXCopyArea;
ProcVector[X_CopyPlane] = PanoramiXCopyPlane;
ProcVector[X_PolyPoint] = PanoramiXPolyPoint;
ProcVector[X_PolyLine] = PanoramiXPolyLine;
ProcVector[X_PolySegment] = PanoramiXPolySegment;
ProcVector[X_PolyRectangle] = PanoramiXPolyRectangle;
ProcVector[X_PolyArc] = PanoramiXPolyArc;
ProcVector[X_FillPoly] = PanoramiXFillPoly;
ProcVector[X_PolyFillRectangle] = PanoramiXPolyFillRectangle;
ProcVector[X_PolyFillArc] = PanoramiXPolyFillArc;
ProcVector[X_PutImage] = PanoramiXPutImage;
ProcVector[X_GetImage] = PanoramiXGetImage;
ProcVector[X_PolyText8] = PanoramiXPolyText8;
ProcVector[X_PolyText16] = PanoramiXPolyText16;
ProcVector[X_ImageText8] = PanoramiXImageText8;
ProcVector[X_ImageText16] = PanoramiXImageText16;
ProcVector[X_CreateColormap] = PanoramiXCreateColormap;
ProcVector[X_FreeColormap] = PanoramiXFreeColormap;
ProcVector[X_CopyColormapAndFree] = PanoramiXCopyColormapAndFree;
ProcVector[X_InstallColormap] = PanoramiXInstallColormap;
ProcVector[X_UninstallColormap] = PanoramiXUninstallColormap;
ProcVector[X_AllocColor] = PanoramiXAllocColor;
ProcVector[X_AllocNamedColor] = PanoramiXAllocNamedColor;
ProcVector[X_AllocColorCells] = PanoramiXAllocColorCells;
ProcVector[X_AllocColorPlanes] = PanoramiXAllocColorPlanes;
ProcVector[X_FreeColors] = PanoramiXFreeColors;
ProcVector[X_StoreColors] = PanoramiXStoreColors;
ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor;
PanoramiXRenderInit();
PanoramiXFixesInit();
PanoramiXDamageInit();
#ifdef COMPOSITE
PanoramiXCompositeInit();
#endif
}
|
PanoramiXExtensionInit(void)
{
int i;
Bool success = FALSE;
ExtensionEntry *extEntry;
ScreenPtr pScreen = screenInfo.screens[0];
PanoramiXScreenPtr pScreenPriv;
if (noPanoramiXExtension)
return;
if (!dixRegisterPrivateKey(&PanoramiXScreenKeyRec, PRIVATE_SCREEN, 0)) {
noPanoramiXExtension = TRUE;
return;
}
if (!dixRegisterPrivateKey
(&PanoramiXGCKeyRec, PRIVATE_GC, sizeof(PanoramiXGCRec))) {
noPanoramiXExtension = TRUE;
return;
}
PanoramiXNumScreens = screenInfo.numScreens;
if (PanoramiXNumScreens == 1) { /* Only 1 screen */
noPanoramiXExtension = TRUE;
return;
}
while (panoramiXGeneration != serverGeneration) {
extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0,
ProcPanoramiXDispatch,
SProcPanoramiXDispatch, PanoramiXResetProc,
StandardMinorOpcode);
if (!extEntry)
break;
/*
* First make sure all the basic allocations succeed. If not,
* run in non-PanoramiXeen mode.
*/
FOR_NSCREENS(i) {
pScreen = screenInfo.screens[i];
pScreenPriv = malloc(sizeof(PanoramiXScreenRec));
dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey,
pScreenPriv);
if (!pScreenPriv) {
noPanoramiXExtension = TRUE;
return;
}
pScreenPriv->CreateGC = pScreen->CreateGC;
pScreenPriv->CloseScreen = pScreen->CloseScreen;
pScreen->CreateGC = XineramaCreateGC;
pScreen->CloseScreen = XineramaCloseScreen;
}
XRC_DRAWABLE = CreateNewResourceClass();
XRT_WINDOW = CreateNewResourceType(XineramaDeleteResource,
"XineramaWindow");
if (XRT_WINDOW)
XRT_WINDOW |= XRC_DRAWABLE;
XRT_PIXMAP = CreateNewResourceType(XineramaDeleteResource,
"XineramaPixmap");
if (XRT_PIXMAP)
XRT_PIXMAP |= XRC_DRAWABLE;
XRT_GC = CreateNewResourceType(XineramaDeleteResource, "XineramaGC");
XRT_COLORMAP = CreateNewResourceType(XineramaDeleteResource,
"XineramaColormap");
if (XRT_WINDOW && XRT_PIXMAP && XRT_GC && XRT_COLORMAP) {
panoramiXGeneration = serverGeneration;
success = TRUE;
}
SetResourceTypeErrorValue(XRT_WINDOW, BadWindow);
SetResourceTypeErrorValue(XRT_PIXMAP, BadPixmap);
SetResourceTypeErrorValue(XRT_GC, BadGC);
SetResourceTypeErrorValue(XRT_COLORMAP, BadColor);
}
if (!success) {
noPanoramiXExtension = TRUE;
ErrorF(PANORAMIX_PROTOCOL_NAME " extension failed to initialize\n");
return;
}
XineramaInitData();
/*
* Put our processes into the ProcVector
*/
for (i = 256; i--;)
SavedProcVector[i] = ProcVector[i];
ProcVector[X_CreateWindow] = PanoramiXCreateWindow;
ProcVector[X_ChangeWindowAttributes] = PanoramiXChangeWindowAttributes;
ProcVector[X_DestroyWindow] = PanoramiXDestroyWindow;
ProcVector[X_DestroySubwindows] = PanoramiXDestroySubwindows;
ProcVector[X_ChangeSaveSet] = PanoramiXChangeSaveSet;
ProcVector[X_ReparentWindow] = PanoramiXReparentWindow;
ProcVector[X_MapWindow] = PanoramiXMapWindow;
ProcVector[X_MapSubwindows] = PanoramiXMapSubwindows;
ProcVector[X_UnmapWindow] = PanoramiXUnmapWindow;
ProcVector[X_UnmapSubwindows] = PanoramiXUnmapSubwindows;
ProcVector[X_ConfigureWindow] = PanoramiXConfigureWindow;
ProcVector[X_CirculateWindow] = PanoramiXCirculateWindow;
ProcVector[X_GetGeometry] = PanoramiXGetGeometry;
ProcVector[X_TranslateCoords] = PanoramiXTranslateCoords;
ProcVector[X_CreatePixmap] = PanoramiXCreatePixmap;
ProcVector[X_FreePixmap] = PanoramiXFreePixmap;
ProcVector[X_CreateGC] = PanoramiXCreateGC;
ProcVector[X_ChangeGC] = PanoramiXChangeGC;
ProcVector[X_CopyGC] = PanoramiXCopyGC;
ProcVector[X_SetDashes] = PanoramiXSetDashes;
ProcVector[X_SetClipRectangles] = PanoramiXSetClipRectangles;
ProcVector[X_FreeGC] = PanoramiXFreeGC;
ProcVector[X_ClearArea] = PanoramiXClearToBackground;
ProcVector[X_CopyArea] = PanoramiXCopyArea;
ProcVector[X_CopyPlane] = PanoramiXCopyPlane;
ProcVector[X_PolyPoint] = PanoramiXPolyPoint;
ProcVector[X_PolyLine] = PanoramiXPolyLine;
ProcVector[X_PolySegment] = PanoramiXPolySegment;
ProcVector[X_PolyRectangle] = PanoramiXPolyRectangle;
ProcVector[X_PolyArc] = PanoramiXPolyArc;
ProcVector[X_FillPoly] = PanoramiXFillPoly;
ProcVector[X_PolyFillRectangle] = PanoramiXPolyFillRectangle;
ProcVector[X_PolyFillArc] = PanoramiXPolyFillArc;
ProcVector[X_PutImage] = PanoramiXPutImage;
ProcVector[X_GetImage] = PanoramiXGetImage;
ProcVector[X_PolyText8] = PanoramiXPolyText8;
ProcVector[X_PolyText16] = PanoramiXPolyText16;
ProcVector[X_ImageText8] = PanoramiXImageText8;
ProcVector[X_ImageText16] = PanoramiXImageText16;
ProcVector[X_CreateColormap] = PanoramiXCreateColormap;
ProcVector[X_FreeColormap] = PanoramiXFreeColormap;
ProcVector[X_CopyColormapAndFree] = PanoramiXCopyColormapAndFree;
ProcVector[X_InstallColormap] = PanoramiXInstallColormap;
ProcVector[X_UninstallColormap] = PanoramiXUninstallColormap;
ProcVector[X_AllocColor] = PanoramiXAllocColor;
ProcVector[X_AllocNamedColor] = PanoramiXAllocNamedColor;
ProcVector[X_AllocColorCells] = PanoramiXAllocColorCells;
ProcVector[X_AllocColorPlanes] = PanoramiXAllocColorPlanes;
ProcVector[X_FreeColors] = PanoramiXFreeColors;
ProcVector[X_StoreColors] = PanoramiXStoreColors;
ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor;
PanoramiXRenderInit();
PanoramiXFixesInit();
PanoramiXDamageInit();
#ifdef COMPOSITE
PanoramiXCompositeInit();
#endif
}
|
C
|
xserver
| 0 |
CVE-2017-5108
|
https://www.cvedetails.com/cve/CVE-2017-5108/
|
CWE-704
|
https://github.com/chromium/chromium/commit/5cb799a393ba9e732f89f687ff3a322b4514ebfb
|
5cb799a393ba9e732f89f687ff3a322b4514ebfb
|
autofocus: Fix a crash with an autofocus element in a document without browsing context.
ShouldAutofocus() should check existence of the browsing context.
Otherwise, doc.TopFrameOrigin() returns null.
Before crrev.com/695830, ShouldAutofocus() was called only for
rendered elements. That is to say, the document always had
browsing context.
Bug: 1003228
Change-Id: I2a941c34e9707d44869a6d7585dc7fb9f06e3bf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1800902
Commit-Queue: Kent Tamura <[email protected]>
Reviewed-by: Keishi Hattori <[email protected]>
Cr-Commit-Position: refs/heads/master@{#696291}
|
void HTMLFormControlElement::AttributeChanged(
const AttributeModificationParams& params) {
HTMLElement::AttributeChanged(params);
if (params.name == kDisabledAttr &&
params.old_value.IsNull() != params.new_value.IsNull()) {
DisabledAttributeChanged();
if (params.reason == AttributeModificationReason::kDirectly &&
IsDisabledFormControl() && AdjustedFocusedElementInTreeScope() == this)
blur();
}
}
|
void HTMLFormControlElement::AttributeChanged(
const AttributeModificationParams& params) {
HTMLElement::AttributeChanged(params);
if (params.name == kDisabledAttr &&
params.old_value.IsNull() != params.new_value.IsNull()) {
DisabledAttributeChanged();
if (params.reason == AttributeModificationReason::kDirectly &&
IsDisabledFormControl() && AdjustedFocusedElementInTreeScope() == this)
blur();
}
}
|
C
|
Chrome
| 0 |
CVE-2015-1302
|
https://www.cvedetails.com/cve/CVE-2015-1302/
|
CWE-20
|
https://github.com/chromium/chromium/commit/fff450abc4e2fb330ba700547a8e6a7b0fb90a6e
|
fff450abc4e2fb330ba700547a8e6a7b0fb90a6e
|
Prevent leaking PDF data cross-origin
BUG=520422
Review URL: https://codereview.chromium.org/1311973002
Cr-Commit-Position: refs/heads/master@{#345267}
|
void LoadAllPdfsTest(const std::string& dir_name, int k) {
base::FilePath test_data_dir;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir));
base::FileEnumerator file_enumerator(test_data_dir.AppendASCII(dir_name),
false, base::FileEnumerator::FILES,
FILE_PATH_LITERAL("*.pdf"));
size_t count = 0;
for (base::FilePath file_path = file_enumerator.Next(); !file_path.empty();
file_path = file_enumerator.Next()) {
std::string filename = file_path.BaseName().MaybeAsASCII();
ASSERT_FALSE(filename.empty());
std::string pdf_file = dir_name + "/" + filename;
if (static_cast<int>(base::Hash(filename) % kNumberLoadTestParts) == k) {
LOG(INFO) << "Loading: " << pdf_file;
bool success = LoadPdf(embedded_test_server()->GetURL("/" + pdf_file));
EXPECT_EQ(!PdfIsExpectedToFailLoad(pdf_file), success);
}
++count;
}
ASSERT_GE(count, 1u);
}
|
void LoadAllPdfsTest(const std::string& dir_name, int k) {
base::FilePath test_data_dir;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir));
base::FileEnumerator file_enumerator(test_data_dir.AppendASCII(dir_name),
false, base::FileEnumerator::FILES,
FILE_PATH_LITERAL("*.pdf"));
size_t count = 0;
for (base::FilePath file_path = file_enumerator.Next(); !file_path.empty();
file_path = file_enumerator.Next()) {
std::string filename = file_path.BaseName().MaybeAsASCII();
ASSERT_FALSE(filename.empty());
std::string pdf_file = dir_name + "/" + filename;
if (static_cast<int>(base::Hash(filename) % kNumberLoadTestParts) == k) {
LOG(INFO) << "Loading: " << pdf_file;
bool success = LoadPdf(embedded_test_server()->GetURL("/" + pdf_file));
EXPECT_EQ(!PdfIsExpectedToFailLoad(pdf_file), success);
}
++count;
}
ASSERT_GE(count, 1u);
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/45bae236b03f577ed6682ef4c7ef3ee006de5e5a
|
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
|
Copy setup.exe rather than moving it since it is created outside of the target directory heirarchy (regression introduced in r75899).
BUG=82424
TEST=Install system-level Chrome as some admin user X. Switch to admin user Y and try to uninstall.
[email protected]
Review URL: http://codereview.chromium.org/7011018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85159 0039d316-1c4b-4281-b951-d872f2087c98
|
void RefreshElevationPolicy() {
const wchar_t kIEFrameDll[] = L"ieframe.dll";
const char kIERefreshPolicy[] = "IERefreshElevationPolicy";
HMODULE ieframe = LoadLibrary(kIEFrameDll);
if (ieframe) {
typedef HRESULT (__stdcall *IERefreshPolicy)();
IERefreshPolicy ie_refresh_policy = reinterpret_cast<IERefreshPolicy>(
GetProcAddress(ieframe, kIERefreshPolicy));
if (ie_refresh_policy) {
ie_refresh_policy();
} else {
VLOG(1) << kIERefreshPolicy << " not supported.";
}
FreeLibrary(ieframe);
} else {
VLOG(1) << "Cannot load " << kIEFrameDll;
}
}
|
void RefreshElevationPolicy() {
const wchar_t kIEFrameDll[] = L"ieframe.dll";
const char kIERefreshPolicy[] = "IERefreshElevationPolicy";
HMODULE ieframe = LoadLibrary(kIEFrameDll);
if (ieframe) {
typedef HRESULT (__stdcall *IERefreshPolicy)();
IERefreshPolicy ie_refresh_policy = reinterpret_cast<IERefreshPolicy>(
GetProcAddress(ieframe, kIERefreshPolicy));
if (ie_refresh_policy) {
ie_refresh_policy();
} else {
VLOG(1) << kIERefreshPolicy << " not supported.";
}
FreeLibrary(ieframe);
} else {
VLOG(1) << "Cannot load " << kIEFrameDll;
}
}
|
C
|
Chrome
| 0 |
CVE-2015-1265
|
https://www.cvedetails.com/cve/CVE-2015-1265/
| null |
https://github.com/chromium/chromium/commit/04ff52bb66284467ccb43d90800013b89ee8db75
|
04ff52bb66284467ccb43d90800013b89ee8db75
|
Switching AudioOutputAuthorizationHandler from using AudioManager interface to AudioSystem one.
BUG=672468
CQ_INCLUDE_TRYBOTS=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
Review-Url: https://codereview.chromium.org/2692203003
Cr-Commit-Position: refs/heads/master@{#450939}
|
AudioParameters GetInputParametersOnDeviceThread(AudioManager* audio_manager,
const std::string& device_id) {
DCHECK(audio_manager->GetTaskRunner()->BelongsToCurrentThread());
// returns invalid parameters if the device is not found.
if (!audio_manager->HasAudioInputDevices())
return AudioParameters();
return audio_manager->GetInputStreamParameters(device_id);
}
|
AudioParameters GetInputParametersOnDeviceThread(AudioManager* audio_manager,
const std::string& device_id) {
DCHECK(audio_manager->GetTaskRunner()->BelongsToCurrentThread());
if (!audio_manager->HasAudioInputDevices())
return AudioParameters();
return audio_manager->GetInputStreamParameters(device_id);
}
|
C
|
Chrome
| 1 |
CVE-2011-2906
|
https://www.cvedetails.com/cve/CVE-2011-2906/
|
CWE-189
|
https://github.com/torvalds/linux/commit/b5b515445f4f5a905c5dd27e6e682868ccd6c09d
|
b5b515445f4f5a905c5dd27e6e682868ccd6c09d
|
[SCSI] pmcraid: reject negative request size
There's a code path in pmcraid that can be reached via device ioctl that
causes all sorts of ugliness, including heap corruption or triggering the
OOM killer due to consecutive allocation of large numbers of pages.
First, the user can call pmcraid_chr_ioctl(), with a type
PMCRAID_PASSTHROUGH_IOCTL. This calls through to
pmcraid_ioctl_passthrough(). Next, a pmcraid_passthrough_ioctl_buffer
is copied in, and the request_size variable is set to
buffer->ioarcb.data_transfer_length, which is an arbitrary 32-bit
signed value provided by the user. If a negative value is provided
here, bad things can happen. For example,
pmcraid_build_passthrough_ioadls() is called with this request_size,
which immediately calls pmcraid_alloc_sglist() with a negative size.
The resulting math on allocating a scatter list can result in an
overflow in the kzalloc() call (if num_elem is 0, the sglist will be
smaller than expected), or if num_elem is unexpectedly large the
subsequent loop will call alloc_pages() repeatedly, a high number of
pages will be allocated and the OOM killer might be invoked.
It looks like preventing this value from being negative in
pmcraid_ioctl_passthrough() would be sufficient.
Signed-off-by: Dan Rosenberg <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
static int pmcraid_eh_target_reset_handler(struct scsi_cmnd *scmd)
{
scmd_printk(KERN_INFO, scmd,
"Doing target reset due to an I/O command timeout.\n");
return pmcraid_reset_device(scmd,
PMCRAID_INTERNAL_TIMEOUT,
RESET_DEVICE_TARGET);
}
|
static int pmcraid_eh_target_reset_handler(struct scsi_cmnd *scmd)
{
scmd_printk(KERN_INFO, scmd,
"Doing target reset due to an I/O command timeout.\n");
return pmcraid_reset_device(scmd,
PMCRAID_INTERNAL_TIMEOUT,
RESET_DEVICE_TARGET);
}
|
C
|
linux
| 0 |
CVE-2018-17204
|
https://www.cvedetails.com/cve/CVE-2018-17204/
|
CWE-617
|
https://github.com/openvswitch/ovs/commit/4af6da3b275b764b1afe194df6499b33d2bf4cde
|
4af6da3b275b764b1afe194df6499b33d2bf4cde
|
ofp-group: Don't assert-fail decoding bad OF1.5 group mod type or command.
When decoding a group mod, the current code validates the group type and
command after the whole group mod has been decoded. The OF1.5 decoder,
however, tries to use the type and command earlier, when it might still be
invalid. This caused an assertion failure (via OVS_NOT_REACHED). This
commit fixes the problem.
ovs-vswitchd does not enable support for OpenFlow 1.5 by default.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9249
Signed-off-by: Ben Pfaff <[email protected]>
Reviewed-by: Yifeng Sun <[email protected]>
|
ofputil_put_ofp14_port(const struct ofputil_phy_port *pp,
struct ofpbuf *b)
{
struct ofp14_port *op;
struct ofp14_port_desc_prop_ethernet *eth;
ofpbuf_prealloc_tailroom(b, sizeof *op + sizeof *eth);
op = ofpbuf_put_zeros(b, sizeof *op);
op->port_no = ofputil_port_to_ofp11(pp->port_no);
op->length = htons(sizeof *op + sizeof *eth);
op->hw_addr = pp->hw_addr;
ovs_strlcpy(op->name, pp->name, sizeof op->name);
op->config = htonl(pp->config & OFPPC11_ALL);
op->state = htonl(pp->state & OFPPS11_ALL);
eth = ofpprop_put_zeros(b, OFPPDPT14_ETHERNET, sizeof *eth);
eth->curr = netdev_port_features_to_ofp11(pp->curr);
eth->advertised = netdev_port_features_to_ofp11(pp->advertised);
eth->supported = netdev_port_features_to_ofp11(pp->supported);
eth->peer = netdev_port_features_to_ofp11(pp->peer);
eth->curr_speed = htonl(pp->curr_speed);
eth->max_speed = htonl(pp->max_speed);
}
|
ofputil_put_ofp14_port(const struct ofputil_phy_port *pp,
struct ofpbuf *b)
{
struct ofp14_port *op;
struct ofp14_port_desc_prop_ethernet *eth;
ofpbuf_prealloc_tailroom(b, sizeof *op + sizeof *eth);
op = ofpbuf_put_zeros(b, sizeof *op);
op->port_no = ofputil_port_to_ofp11(pp->port_no);
op->length = htons(sizeof *op + sizeof *eth);
op->hw_addr = pp->hw_addr;
ovs_strlcpy(op->name, pp->name, sizeof op->name);
op->config = htonl(pp->config & OFPPC11_ALL);
op->state = htonl(pp->state & OFPPS11_ALL);
eth = ofpprop_put_zeros(b, OFPPDPT14_ETHERNET, sizeof *eth);
eth->curr = netdev_port_features_to_ofp11(pp->curr);
eth->advertised = netdev_port_features_to_ofp11(pp->advertised);
eth->supported = netdev_port_features_to_ofp11(pp->supported);
eth->peer = netdev_port_features_to_ofp11(pp->peer);
eth->curr_speed = htonl(pp->curr_speed);
eth->max_speed = htonl(pp->max_speed);
}
|
C
|
ovs
| 0 |
CVE-2019-5828
|
https://www.cvedetails.com/cve/CVE-2019-5828/
|
CWE-416
|
https://github.com/chromium/chromium/commit/761d65ebcac0cdb730fd27b87e207201ac38e3b4
|
761d65ebcac0cdb730fd27b87e207201ac38e3b4
|
[Payment Handler] Don't wait for response from closed payment app.
Before this patch, tapping the back button on top of the payment handler
window on desktop would not affect the |response_helper_|, which would
continue waiting for a response from the payment app. The service worker
of the closed payment app could timeout after 5 minutes and invoke the
|response_helper_|. Depending on what else the user did afterwards, in
the best case scenario, the payment sheet would display a "Transaction
failed" error message. In the worst case scenario, the
|response_helper_| would be used after free.
This patch clears the |response_helper_| in the PaymentRequestState and
in the ServiceWorkerPaymentInstrument after the payment app is closed.
After this patch, the cancelled payment app does not show "Transaction
failed" and does not use memory after it was freed.
Bug: 956597
Change-Id: I64134b911a4f8c154cb56d537a8243a68a806394
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1588682
Reviewed-by: anthonyvd <[email protected]>
Commit-Queue: Rouslan Solomakhin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#654995}
|
void PaymentRequestState::SetSelectedShippingProfile(
autofill::AutofillProfile* profile) {
spec_->StartWaitingForUpdateWith(
PaymentRequestSpec::UpdateReason::SHIPPING_ADDRESS);
selected_shipping_profile_ = profile;
invalid_shipping_profile_ = nullptr;
is_waiting_for_merchant_validation_ = true;
payment_request_delegate_->GetAddressNormalizer()->NormalizeAddressAsync(
*selected_shipping_profile_, /*timeout_seconds=*/2,
base::BindOnce(&PaymentRequestState::OnAddressNormalized,
weak_ptr_factory_.GetWeakPtr()));
}
|
void PaymentRequestState::SetSelectedShippingProfile(
autofill::AutofillProfile* profile) {
spec_->StartWaitingForUpdateWith(
PaymentRequestSpec::UpdateReason::SHIPPING_ADDRESS);
selected_shipping_profile_ = profile;
invalid_shipping_profile_ = nullptr;
is_waiting_for_merchant_validation_ = true;
payment_request_delegate_->GetAddressNormalizer()->NormalizeAddressAsync(
*selected_shipping_profile_, /*timeout_seconds=*/2,
base::BindOnce(&PaymentRequestState::OnAddressNormalized,
weak_ptr_factory_.GetWeakPtr()));
}
|
C
|
Chrome
| 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::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) {
std::pair<int, gfx::Size> details = std::make_pair(tag, size);
NotificationService::current()->Notify(
NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK,
Source<RenderWidgetHost>(this),
Details<std::pair<int, gfx::Size> >(&details));
}
|
void RenderWidgetHostImpl::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) {
std::pair<int, gfx::Size> details = std::make_pair(tag, size);
NotificationService::current()->Notify(
NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK,
Source<RenderWidgetHost>(this),
Details<std::pair<int, gfx::Size> >(&details));
}
|
C
|
Chrome
| 0 |
CVE-2018-6560
|
https://www.cvedetails.com/cve/CVE-2018-6560/
|
CWE-436
|
https://github.com/flatpak/flatpak/commit/52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
|
52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
|
Fix vulnerability in dbus proxy
During the authentication all client data is directly forwarded
to the dbus daemon as is, until we detect the BEGIN command after
which we start filtering the binary dbus protocol.
Unfortunately the detection of the BEGIN command in the proxy
did not exactly match the detection in the dbus daemon. A BEGIN
followed by a space or tab was considered ok in the daemon but
not by the proxy. This could be exploited to send arbitrary
dbus messages to the host, which can be used to break out of
the sandbox.
This was noticed by Gabriel Campana of The Google Security Team.
This fix makes the detection of the authentication phase end
match the dbus code. In addition we duplicate the authentication
line validation from dbus, which includes ensuring all data is
ASCII, and limiting the size of a line to 16k. In fact, we add
some extra stringent checks, disallowing ASCII control chars and
requiring that auth lines start with a capital letter.
|
flatpak_proxy_start (FlatpakProxy *proxy, GError **error)
{
GSocketAddress *address;
gboolean res;
unlink (proxy->socket_path);
address = g_unix_socket_address_new (proxy->socket_path);
error = NULL;
res = g_socket_listener_add_address (G_SOCKET_LISTENER (proxy),
address,
G_SOCKET_TYPE_STREAM,
G_SOCKET_PROTOCOL_DEFAULT,
NULL, /* source_object */
NULL, /* effective_address */
error);
g_object_unref (address);
if (!res)
return FALSE;
g_socket_service_start (G_SOCKET_SERVICE (proxy));
return TRUE;
}
|
flatpak_proxy_start (FlatpakProxy *proxy, GError **error)
{
GSocketAddress *address;
gboolean res;
unlink (proxy->socket_path);
address = g_unix_socket_address_new (proxy->socket_path);
error = NULL;
res = g_socket_listener_add_address (G_SOCKET_LISTENER (proxy),
address,
G_SOCKET_TYPE_STREAM,
G_SOCKET_PROTOCOL_DEFAULT,
NULL, /* source_object */
NULL, /* effective_address */
error);
g_object_unref (address);
if (!res)
return FALSE;
g_socket_service_start (G_SOCKET_SERVICE (proxy));
return TRUE;
}
|
C
|
flatpak
| 0 |
CVE-2018-14879
|
https://www.cvedetails.com/cve/CVE-2018-14879/
|
CWE-120
|
https://github.com/the-tcpdump-group/tcpdump/commit/9ba91381954ad325ea4fd26b9c65a8bd9a2a85b6
|
9ba91381954ad325ea4fd26b9c65a8bd9a2a85b6
|
(for 4.9.3) CVE-2018-14879/fix -V to fail invalid input safely
get_next_file() did not check the return value of strlen() and
underflowed an array index if the line read by fgets() from the file
started with \0. This caused an out-of-bounds read and could cause a
write. Add the missing check.
This vulnerability was discovered by Brian Carpenter & Geeknik Labs.
|
tstamp_precision_to_string(int precision)
{
switch (precision) {
case PCAP_TSTAMP_PRECISION_MICRO:
return "micro";
case PCAP_TSTAMP_PRECISION_NANO:
return "nano";
default:
return "unknown";
}
}
|
tstamp_precision_to_string(int precision)
{
switch (precision) {
case PCAP_TSTAMP_PRECISION_MICRO:
return "micro";
case PCAP_TSTAMP_PRECISION_NANO:
return "nano";
default:
return "unknown";
}
}
|
C
|
tcpdump
| 0 |
CVE-2012-2872
|
https://www.cvedetails.com/cve/CVE-2012-2872/
|
CWE-79
|
https://github.com/chromium/chromium/commit/68b6502084af7e2021f7321633f5fbb5f997a58b
|
68b6502084af7e2021f7321633f5fbb5f997a58b
|
Properly EscapeForHTML potentially malicious input from X.509 certificates.
BUG=142956
TEST=Create an X.509 certificate with a CN field that contains JavaScript.
When you get the SSL error screen, check that the HTML + JavaScript is
escape instead of being treated as HTML and/or script.
Review URL: https://chromiumcodereview.appspot.com/10827364
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152210 0039d316-1c4b-4281-b951-d872f2087c98
|
SSLErrorInfo SSLErrorInfo::CreateError(ErrorType error_type,
net::X509Certificate* cert,
const GURL& request_url) {
string16 title, details, short_description;
std::vector<string16> extra_info;
switch (error_type) {
case CERT_COMMON_NAME_INVALID: {
title =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_COMMON_NAME_INVALID_TITLE);
std::vector<std::string> dns_names;
cert->GetDNSNames(&dns_names);
DCHECK(!dns_names.empty());
size_t i = 0;
for (; i < dns_names.size(); ++i) {
if (dns_names[i] == cert->subject().common_name)
break;
}
if (i == dns_names.size())
i = 0;
details =
l10n_util::GetStringFUTF16(IDS_CERT_ERROR_COMMON_NAME_INVALID_DETAILS,
UTF8ToUTF16(request_url.host()),
net::EscapeForHTML(
UTF8ToUTF16(dns_names[i])),
UTF8ToUTF16(request_url.host()));
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_COMMON_NAME_INVALID_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(
l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_COMMON_NAME_INVALID_EXTRA_INFO_2,
net::EscapeForHTML(UTF8ToUTF16(cert->subject().common_name)),
UTF8ToUTF16(request_url.host())));
break;
}
case CERT_DATE_INVALID:
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
if (cert->HasExpired()) {
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXPIRED_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_EXPIRED_DETAILS,
UTF8ToUTF16(request_url.host()),
UTF8ToUTF16(request_url.host()),
base::TimeFormatFriendlyDateAndTime(base::Time::Now()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXPIRED_DESCRIPTION);
extra_info.push_back(l10n_util::GetStringUTF16(
IDS_CERT_ERROR_EXPIRED_DETAILS_EXTRA_INFO_2));
} else {
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_NOT_YET_VALID_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_NOT_YET_VALID_DETAILS,
UTF8ToUTF16(request_url.host()),
UTF8ToUTF16(request_url.host()),
base::TimeFormatFriendlyDateAndTime(base::Time::Now()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_NOT_YET_VALID_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(
IDS_CERT_ERROR_NOT_YET_VALID_DETAILS_EXTRA_INFO_2));
}
break;
case CERT_AUTHORITY_INVALID:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_AUTHORITY_INVALID_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_AUTHORITY_INVALID_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_AUTHORITY_INVALID_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_AUTHORITY_INVALID_EXTRA_INFO_2,
UTF8ToUTF16(request_url.host()),
UTF8ToUTF16(request_url.host())));
extra_info.push_back(l10n_util::GetStringUTF16(
IDS_CERT_ERROR_AUTHORITY_INVALID_EXTRA_INFO_3));
break;
case CERT_CONTAINS_ERRORS:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_CONTAINS_ERRORS_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_CONTAINS_ERRORS_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_CONTAINS_ERRORS_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringFUTF16(IDS_CERT_ERROR_EXTRA_INFO_1,
UTF8ToUTF16(request_url.host())));
extra_info.push_back(l10n_util::GetStringUTF16(
IDS_CERT_ERROR_CONTAINS_ERRORS_EXTRA_INFO_2));
break;
case CERT_NO_REVOCATION_MECHANISM:
title = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_TITLE);
details = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DETAILS);
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DESCRIPTION);
break;
case CERT_UNABLE_TO_CHECK_REVOCATION:
title = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_TITLE);
details = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DETAILS);
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DESCRIPTION);
break;
case CERT_REVOKED:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_REVOKED_CERT_TITLE);
details = l10n_util::GetStringFUTF16(IDS_CERT_ERROR_REVOKED_CERT_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_REVOKED_CERT_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_REVOKED_CERT_EXTRA_INFO_2));
break;
case CERT_INVALID:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_INVALID_CERT_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_INVALID_CERT_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_INVALID_CERT_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(l10n_util::GetStringUTF16(
IDS_CERT_ERROR_INVALID_CERT_EXTRA_INFO_2));
break;
case CERT_WEAK_SIGNATURE_ALGORITHM:
title = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(
l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_EXTRA_INFO_2));
break;
case CERT_WEAK_KEY:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_WEAK_KEY_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_WEAK_KEY_DETAILS, UTF8ToUTF16(request_url.host()));
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_KEY_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(
l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_KEY_EXTRA_INFO_2));
break;
case UNKNOWN:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_UNKNOWN_ERROR_TITLE);
details = l10n_util::GetStringUTF16(IDS_CERT_ERROR_UNKNOWN_ERROR_DETAILS);
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_UNKNOWN_ERROR_DESCRIPTION);
break;
default:
NOTREACHED();
}
return SSLErrorInfo(title, details, short_description, extra_info);
}
|
SSLErrorInfo SSLErrorInfo::CreateError(ErrorType error_type,
net::X509Certificate* cert,
const GURL& request_url) {
string16 title, details, short_description;
std::vector<string16> extra_info;
switch (error_type) {
case CERT_COMMON_NAME_INVALID: {
title =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_COMMON_NAME_INVALID_TITLE);
std::vector<std::string> dns_names;
cert->GetDNSNames(&dns_names);
DCHECK(!dns_names.empty());
size_t i = 0;
for (; i < dns_names.size(); ++i) {
if (dns_names[i] == cert->subject().common_name)
break;
}
if (i == dns_names.size())
i = 0;
details =
l10n_util::GetStringFUTF16(IDS_CERT_ERROR_COMMON_NAME_INVALID_DETAILS,
UTF8ToUTF16(request_url.host()),
UTF8ToUTF16(dns_names[i]),
UTF8ToUTF16(request_url.host()));
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_COMMON_NAME_INVALID_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(
l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_COMMON_NAME_INVALID_EXTRA_INFO_2,
UTF8ToUTF16(cert->subject().common_name),
UTF8ToUTF16(request_url.host())));
break;
}
case CERT_DATE_INVALID:
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
if (cert->HasExpired()) {
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXPIRED_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_EXPIRED_DETAILS,
UTF8ToUTF16(request_url.host()),
UTF8ToUTF16(request_url.host()),
base::TimeFormatFriendlyDateAndTime(base::Time::Now()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXPIRED_DESCRIPTION);
extra_info.push_back(l10n_util::GetStringUTF16(
IDS_CERT_ERROR_EXPIRED_DETAILS_EXTRA_INFO_2));
} else {
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_NOT_YET_VALID_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_NOT_YET_VALID_DETAILS,
UTF8ToUTF16(request_url.host()),
UTF8ToUTF16(request_url.host()),
base::TimeFormatFriendlyDateAndTime(base::Time::Now()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_NOT_YET_VALID_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(
IDS_CERT_ERROR_NOT_YET_VALID_DETAILS_EXTRA_INFO_2));
}
break;
case CERT_AUTHORITY_INVALID:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_AUTHORITY_INVALID_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_AUTHORITY_INVALID_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_AUTHORITY_INVALID_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_AUTHORITY_INVALID_EXTRA_INFO_2,
UTF8ToUTF16(request_url.host()),
UTF8ToUTF16(request_url.host())));
extra_info.push_back(l10n_util::GetStringUTF16(
IDS_CERT_ERROR_AUTHORITY_INVALID_EXTRA_INFO_3));
break;
case CERT_CONTAINS_ERRORS:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_CONTAINS_ERRORS_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_CONTAINS_ERRORS_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_CONTAINS_ERRORS_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringFUTF16(IDS_CERT_ERROR_EXTRA_INFO_1,
UTF8ToUTF16(request_url.host())));
extra_info.push_back(l10n_util::GetStringUTF16(
IDS_CERT_ERROR_CONTAINS_ERRORS_EXTRA_INFO_2));
break;
case CERT_NO_REVOCATION_MECHANISM:
title = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_TITLE);
details = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DETAILS);
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DESCRIPTION);
break;
case CERT_UNABLE_TO_CHECK_REVOCATION:
title = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_TITLE);
details = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DETAILS);
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DESCRIPTION);
break;
case CERT_REVOKED:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_REVOKED_CERT_TITLE);
details = l10n_util::GetStringFUTF16(IDS_CERT_ERROR_REVOKED_CERT_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_REVOKED_CERT_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_REVOKED_CERT_EXTRA_INFO_2));
break;
case CERT_INVALID:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_INVALID_CERT_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_INVALID_CERT_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_INVALID_CERT_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(l10n_util::GetStringUTF16(
IDS_CERT_ERROR_INVALID_CERT_EXTRA_INFO_2));
break;
case CERT_WEAK_SIGNATURE_ALGORITHM:
title = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DETAILS,
UTF8ToUTF16(request_url.host()));
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(
l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_EXTRA_INFO_2));
break;
case CERT_WEAK_KEY:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_WEAK_KEY_TITLE);
details = l10n_util::GetStringFUTF16(
IDS_CERT_ERROR_WEAK_KEY_DETAILS, UTF8ToUTF16(request_url.host()));
short_description = l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_KEY_DESCRIPTION);
extra_info.push_back(
l10n_util::GetStringUTF16(IDS_CERT_ERROR_EXTRA_INFO_1));
extra_info.push_back(
l10n_util::GetStringUTF16(
IDS_CERT_ERROR_WEAK_KEY_EXTRA_INFO_2));
break;
case UNKNOWN:
title = l10n_util::GetStringUTF16(IDS_CERT_ERROR_UNKNOWN_ERROR_TITLE);
details = l10n_util::GetStringUTF16(IDS_CERT_ERROR_UNKNOWN_ERROR_DETAILS);
short_description =
l10n_util::GetStringUTF16(IDS_CERT_ERROR_UNKNOWN_ERROR_DESCRIPTION);
break;
default:
NOTREACHED();
}
return SSLErrorInfo(title, details, short_description, extra_info);
}
|
C
|
Chrome
| 1 |
CVE-2015-4116
|
https://www.cvedetails.com/cve/CVE-2015-4116/
| null |
https://git.php.net/?p=php-src.git;a=commit;h=1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1
|
1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1
| null |
static void spl_heap_object_free_storage(void *object TSRMLS_DC) /* {{{ */
{
int i;
spl_heap_object *intern = (spl_heap_object *)object;
zend_object_std_dtor(&intern->std TSRMLS_CC);
for (i = 0; i < intern->heap->count; ++i) {
if (intern->heap->elements[i]) {
zval_ptr_dtor((zval **)&intern->heap->elements[i]);
}
}
spl_ptr_heap_destroy(intern->heap TSRMLS_CC);
zval_ptr_dtor(&intern->retval);
if (intern->debug_info != NULL) {
zend_hash_destroy(intern->debug_info);
efree(intern->debug_info);
}
efree(object);
}
/* }}} */
|
static void spl_heap_object_free_storage(void *object TSRMLS_DC) /* {{{ */
{
int i;
spl_heap_object *intern = (spl_heap_object *)object;
zend_object_std_dtor(&intern->std TSRMLS_CC);
for (i = 0; i < intern->heap->count; ++i) {
if (intern->heap->elements[i]) {
zval_ptr_dtor((zval **)&intern->heap->elements[i]);
}
}
spl_ptr_heap_destroy(intern->heap TSRMLS_CC);
zval_ptr_dtor(&intern->retval);
if (intern->debug_info != NULL) {
zend_hash_destroy(intern->debug_info);
efree(intern->debug_info);
}
efree(object);
}
/* }}} */
|
C
|
php
| 0 |
CVE-2014-3200
|
https://www.cvedetails.com/cve/CVE-2014-3200/
| null |
https://github.com/chromium/chromium/commit/c0947dabeaa10da67798c1bbc668dca4b280cad5
|
c0947dabeaa10da67798c1bbc668dca4b280cad5
|
[Contextual Search] Change "Now on Tap" to "Contextual Cards"
BUG=644934
Review-Url: https://codereview.chromium.org/2361163003
Cr-Commit-Position: refs/heads/master@{#420899}
|
base::string16 TemplateURLRef::DisplayURL(
const SearchTermsData& search_terms_data) const {
ParseIfNecessary(search_terms_data);
std::string result(GetURL());
if (valid_ && !replacements_.empty()) {
base::ReplaceSubstringsAfterOffset(&result, 0,
kSearchTermsParameterFull,
kDisplaySearchTerms);
base::ReplaceSubstringsAfterOffset(&result, 0,
kGoogleUnescapedSearchTermsParameterFull,
kDisplayUnescapedSearchTerms);
}
return base::UTF8ToUTF16(result);
}
|
base::string16 TemplateURLRef::DisplayURL(
const SearchTermsData& search_terms_data) const {
ParseIfNecessary(search_terms_data);
std::string result(GetURL());
if (valid_ && !replacements_.empty()) {
base::ReplaceSubstringsAfterOffset(&result, 0,
kSearchTermsParameterFull,
kDisplaySearchTerms);
base::ReplaceSubstringsAfterOffset(&result, 0,
kGoogleUnescapedSearchTermsParameterFull,
kDisplayUnescapedSearchTerms);
}
return base::UTF8ToUTF16(result);
}
|
C
|
Chrome
| 0 |
CVE-2012-2875
|
https://www.cvedetails.com/cve/CVE-2012-2875/
| null |
https://github.com/chromium/chromium/commit/f81fcab3b31dfaff3473e8eb94c6531677116242
|
f81fcab3b31dfaff3473e8eb94c6531677116242
|
[BlackBerry] Prevent text selection inside Colour and Date/Time input fields
https://bugs.webkit.org/show_bug.cgi?id=111733
Reviewed by Rob Buis.
PR 305194.
Prevent selection for popup input fields as they are buttons.
Informally Reviewed Gen Mak.
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
git-svn-id: svn://svn.chromium.org/blink/trunk@145121 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void EditorClientBlackBerry::updateSpellingUIWithGrammarString(const WTF::String&, const GrammarDetail&)
{
notImplemented();
}
|
void EditorClientBlackBerry::updateSpellingUIWithGrammarString(const WTF::String&, const GrammarDetail&)
{
notImplemented();
}
|
C
|
Chrome
| 0 |
CVE-2015-6773
|
https://www.cvedetails.com/cve/CVE-2015-6773/
|
CWE-119
|
https://github.com/chromium/chromium/commit/33827275411b33371e7bb750cce20f11de85002d
|
33827275411b33371e7bb750cce20f11de85002d
|
Move SelectionTemplate::is_handle_visible_ to FrameSelection
This patch moves |is_handle_visible_| to |FrameSelection| from |SelectionTemplate|
since handle visibility is used only for setting |FrameSelection|, hence it is
a redundant member variable of |SelectionTemplate|.
Bug: 742093
Change-Id: I3add4da3844fb40be34dcb4d4b46b5fa6fed1d7e
Reviewed-on: https://chromium-review.googlesource.com/595389
Commit-Queue: Yoshifumi Inoue <[email protected]>
Reviewed-by: Xiaocheng Hu <[email protected]>
Reviewed-by: Kent Tamura <[email protected]>
Cr-Commit-Position: refs/heads/master@{#491660}
|
bool NeedsIncrementalInsertion(const LocalFrame& frame,
const String& new_text) {
if (!frame.GetEditor().CanEditRichly())
return false;
if (frame.SelectedText().IsEmpty() || new_text.IsEmpty())
return false;
return true;
}
|
bool NeedsIncrementalInsertion(const LocalFrame& frame,
const String& new_text) {
if (!frame.GetEditor().CanEditRichly())
return false;
if (frame.SelectedText().IsEmpty() || new_text.IsEmpty())
return false;
return true;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/7cb8e1ae121cf6b14aa0a59cc708de630c0ef965
|
7cb8e1ae121cf6b14aa0a59cc708de630c0ef965
|
Move variations prefs into the variations component
These prefs are used by variations code that is targeted for componentization.
BUG=382865
TBR=thakis
Review URL: https://codereview.chromium.org/1265423003
Cr-Commit-Position: refs/heads/master@{#343661}
|
void VariationsService::DoActualFetch() {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!pending_seed_request_);
pending_seed_request_ = net::URLFetcher::Create(0, variations_server_url_,
net::URLFetcher::GET, this);
pending_seed_request_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES);
pending_seed_request_->SetRequestContext(
g_browser_process->system_request_context());
pending_seed_request_->SetMaxRetriesOn5xx(kMaxRetrySeedFetch);
if (!seed_store_.variations_serial_number().empty() &&
!disable_deltas_for_next_request_) {
if (!seed_store_.seed_has_country_code()) {
pending_seed_request_->AddExtraRequestHeader("A-IM:x-bm");
}
pending_seed_request_->AddExtraRequestHeader(
"If-None-Match:" + seed_store_.variations_serial_number());
}
pending_seed_request_->Start();
const base::TimeTicks now = base::TimeTicks::Now();
base::TimeDelta time_since_last_fetch;
if (!last_request_started_time_.is_null())
time_since_last_fetch = now - last_request_started_time_;
UMA_HISTOGRAM_CUSTOM_COUNTS("Variations.TimeSinceLastFetchAttempt",
time_since_last_fetch.InMinutes(), 0,
base::TimeDelta::FromDays(7).InMinutes(), 50);
UMA_HISTOGRAM_COUNTS_100("Variations.RequestCount", request_count_);
++request_count_;
last_request_started_time_ = now;
disable_deltas_for_next_request_ = false;
}
|
void VariationsService::DoActualFetch() {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!pending_seed_request_);
pending_seed_request_ = net::URLFetcher::Create(0, variations_server_url_,
net::URLFetcher::GET, this);
pending_seed_request_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES);
pending_seed_request_->SetRequestContext(
g_browser_process->system_request_context());
pending_seed_request_->SetMaxRetriesOn5xx(kMaxRetrySeedFetch);
if (!seed_store_.variations_serial_number().empty() &&
!disable_deltas_for_next_request_) {
if (!seed_store_.seed_has_country_code()) {
pending_seed_request_->AddExtraRequestHeader("A-IM:x-bm");
}
pending_seed_request_->AddExtraRequestHeader(
"If-None-Match:" + seed_store_.variations_serial_number());
}
pending_seed_request_->Start();
const base::TimeTicks now = base::TimeTicks::Now();
base::TimeDelta time_since_last_fetch;
if (!last_request_started_time_.is_null())
time_since_last_fetch = now - last_request_started_time_;
UMA_HISTOGRAM_CUSTOM_COUNTS("Variations.TimeSinceLastFetchAttempt",
time_since_last_fetch.InMinutes(), 0,
base::TimeDelta::FromDays(7).InMinutes(), 50);
UMA_HISTOGRAM_COUNTS_100("Variations.RequestCount", request_count_);
++request_count_;
last_request_started_time_ = now;
disable_deltas_for_next_request_ = false;
}
|
C
|
Chrome
| 0 |
CVE-2018-20839
|
https://www.cvedetails.com/cve/CVE-2018-20839/
|
CWE-255
|
https://github.com/systemd/systemd/commit/9725f1a10f80f5e0ae7d9b60547458622aeb322f
|
9725f1a10f80f5e0ae7d9b60547458622aeb322f
|
Merge pull request #12378 from rbalint/vt-kbd-reset-check
VT kbd reset check
|
bool colors_enabled(void) {
/* Returns true if colors are considered supported on our stdout. For that we check $SYSTEMD_COLORS first
* (which is the explicit way to turn colors on/off). If that didn't work we turn colors off unless we are on a
* TTY. And if we are on a TTY we turn it off if $TERM is set to "dumb". There's one special tweak though: if
* we are PID 1 then we do not check whether we are connected to a TTY, because we don't keep /dev/console open
* continuously due to fear of SAK, and hence things are a bit weird. */
if (cached_colors_enabled < 0) {
int val;
val = getenv_bool("SYSTEMD_COLORS");
if (val >= 0)
cached_colors_enabled = val;
else if (getpid_cached() == 1)
/* PID1 outputs to the console without holding it open all the time */
cached_colors_enabled = !getenv_terminal_is_dumb();
else
cached_colors_enabled = !terminal_is_dumb();
}
return cached_colors_enabled;
}
|
bool colors_enabled(void) {
/* Returns true if colors are considered supported on our stdout. For that we check $SYSTEMD_COLORS first
* (which is the explicit way to turn colors on/off). If that didn't work we turn colors off unless we are on a
* TTY. And if we are on a TTY we turn it off if $TERM is set to "dumb". There's one special tweak though: if
* we are PID 1 then we do not check whether we are connected to a TTY, because we don't keep /dev/console open
* continuously due to fear of SAK, and hence things are a bit weird. */
if (cached_colors_enabled < 0) {
int val;
val = getenv_bool("SYSTEMD_COLORS");
if (val >= 0)
cached_colors_enabled = val;
else if (getpid_cached() == 1)
/* PID1 outputs to the console without holding it open all the time */
cached_colors_enabled = !getenv_terminal_is_dumb();
else
cached_colors_enabled = !terminal_is_dumb();
}
return cached_colors_enabled;
}
|
C
|
systemd
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/ee8d6fd30b022ac2c87b7a190c954e7bb3c9b21e
|
ee8d6fd30b022ac2c87b7a190c954e7bb3c9b21e
|
Clean up calls like "gfx::Rect(0, 0, size().width(), size().height()".
The caller can use the much shorter "gfx::Rect(size())", since gfx::Rect
has a constructor that just takes a Size.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2204001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48283 0039d316-1c4b-4281-b951-d872f2087c98
|
void DraggedTabGtk::ResizeContainer() {
gfx::Size size = GetPreferredSize();
gtk_window_resize(GTK_WINDOW(container_),
ScaleValue(size.width()), ScaleValue(size.height()));
Layout();
}
|
void DraggedTabGtk::ResizeContainer() {
gfx::Size size = GetPreferredSize();
gtk_window_resize(GTK_WINDOW(container_),
ScaleValue(size.width()), ScaleValue(size.height()));
Layout();
}
|
C
|
Chrome
| 0 |
CVE-2015-1573
|
https://www.cvedetails.com/cve/CVE-2015-1573/
|
CWE-19
|
https://github.com/torvalds/linux/commit/a2f18db0c68fec96631c10cad9384c196e9008ac
|
a2f18db0c68fec96631c10cad9384c196e9008ac
|
netfilter: nf_tables: fix flush ruleset chain dependencies
Jumping between chains doesn't mix well with flush ruleset. Rules
from a different chain and set elements may still refer to us.
[ 353.373791] ------------[ cut here ]------------
[ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[ 353.373896] invalid opcode: 0000 [#1] SMP
[ 353.373942] Modules linked in: intel_powerclamp uas iwldvm iwlwifi
[ 353.374017] CPU: 0 PID: 6445 Comm: 31c3.nft Not tainted 3.18.0 #98
[ 353.374069] Hardware name: LENOVO 5129CTO/5129CTO, BIOS 6QET47WW (1.17 ) 07/14/2010
[...]
[ 353.375018] Call Trace:
[ 353.375046] [<ffffffff81964c31>] ? nf_tables_commit+0x381/0x540
[ 353.375101] [<ffffffff81949118>] nfnetlink_rcv+0x3d8/0x4b0
[ 353.375150] [<ffffffff81943fc5>] netlink_unicast+0x105/0x1a0
[ 353.375200] [<ffffffff8194438e>] netlink_sendmsg+0x32e/0x790
[ 353.375253] [<ffffffff818f398e>] sock_sendmsg+0x8e/0xc0
[ 353.375300] [<ffffffff818f36b9>] ? move_addr_to_kernel.part.20+0x19/0x70
[ 353.375357] [<ffffffff818f44f9>] ? move_addr_to_kernel+0x19/0x30
[ 353.375410] [<ffffffff819016d2>] ? verify_iovec+0x42/0xd0
[ 353.375459] [<ffffffff818f3e10>] ___sys_sendmsg+0x3f0/0x400
[ 353.375510] [<ffffffff810615fa>] ? native_sched_clock+0x2a/0x90
[ 353.375563] [<ffffffff81176697>] ? acct_account_cputime+0x17/0x20
[ 353.375616] [<ffffffff8110dc78>] ? account_user_time+0x88/0xa0
[ 353.375667] [<ffffffff818f4bbd>] __sys_sendmsg+0x3d/0x80
[ 353.375719] [<ffffffff81b184f4>] ? int_check_syscall_exit_work+0x34/0x3d
[ 353.375776] [<ffffffff818f4c0d>] SyS_sendmsg+0xd/0x20
[ 353.375823] [<ffffffff81b1826d>] system_call_fastpath+0x16/0x1b
Release objects in this order: rules -> sets -> chains -> tables, to
make sure no references to chains are held anymore.
Reported-by: Asbjoern Sloth Toennesen <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
static int nf_tables_fill_rule_info(struct sk_buff *skb, struct net *net,
u32 portid, u32 seq, int event,
u32 flags, int family,
const struct nft_table *table,
const struct nft_chain *chain,
const struct nft_rule *rule)
{
struct nlmsghdr *nlh;
struct nfgenmsg *nfmsg;
const struct nft_expr *expr, *next;
struct nlattr *list;
const struct nft_rule *prule;
int type = event | NFNL_SUBSYS_NFTABLES << 8;
nlh = nlmsg_put(skb, portid, seq, type, sizeof(struct nfgenmsg),
flags);
if (nlh == NULL)
goto nla_put_failure;
nfmsg = nlmsg_data(nlh);
nfmsg->nfgen_family = family;
nfmsg->version = NFNETLINK_V0;
nfmsg->res_id = htons(net->nft.base_seq & 0xffff);
if (nla_put_string(skb, NFTA_RULE_TABLE, table->name))
goto nla_put_failure;
if (nla_put_string(skb, NFTA_RULE_CHAIN, chain->name))
goto nla_put_failure;
if (nla_put_be64(skb, NFTA_RULE_HANDLE, cpu_to_be64(rule->handle)))
goto nla_put_failure;
if ((event != NFT_MSG_DELRULE) && (rule->list.prev != &chain->rules)) {
prule = list_entry(rule->list.prev, struct nft_rule, list);
if (nla_put_be64(skb, NFTA_RULE_POSITION,
cpu_to_be64(prule->handle)))
goto nla_put_failure;
}
list = nla_nest_start(skb, NFTA_RULE_EXPRESSIONS);
if (list == NULL)
goto nla_put_failure;
nft_rule_for_each_expr(expr, next, rule) {
struct nlattr *elem = nla_nest_start(skb, NFTA_LIST_ELEM);
if (elem == NULL)
goto nla_put_failure;
if (nf_tables_fill_expr_info(skb, expr) < 0)
goto nla_put_failure;
nla_nest_end(skb, elem);
}
nla_nest_end(skb, list);
if (rule->ulen &&
nla_put(skb, NFTA_RULE_USERDATA, rule->ulen, nft_userdata(rule)))
goto nla_put_failure;
return nlmsg_end(skb, nlh);
nla_put_failure:
nlmsg_trim(skb, nlh);
return -1;
}
|
static int nf_tables_fill_rule_info(struct sk_buff *skb, struct net *net,
u32 portid, u32 seq, int event,
u32 flags, int family,
const struct nft_table *table,
const struct nft_chain *chain,
const struct nft_rule *rule)
{
struct nlmsghdr *nlh;
struct nfgenmsg *nfmsg;
const struct nft_expr *expr, *next;
struct nlattr *list;
const struct nft_rule *prule;
int type = event | NFNL_SUBSYS_NFTABLES << 8;
nlh = nlmsg_put(skb, portid, seq, type, sizeof(struct nfgenmsg),
flags);
if (nlh == NULL)
goto nla_put_failure;
nfmsg = nlmsg_data(nlh);
nfmsg->nfgen_family = family;
nfmsg->version = NFNETLINK_V0;
nfmsg->res_id = htons(net->nft.base_seq & 0xffff);
if (nla_put_string(skb, NFTA_RULE_TABLE, table->name))
goto nla_put_failure;
if (nla_put_string(skb, NFTA_RULE_CHAIN, chain->name))
goto nla_put_failure;
if (nla_put_be64(skb, NFTA_RULE_HANDLE, cpu_to_be64(rule->handle)))
goto nla_put_failure;
if ((event != NFT_MSG_DELRULE) && (rule->list.prev != &chain->rules)) {
prule = list_entry(rule->list.prev, struct nft_rule, list);
if (nla_put_be64(skb, NFTA_RULE_POSITION,
cpu_to_be64(prule->handle)))
goto nla_put_failure;
}
list = nla_nest_start(skb, NFTA_RULE_EXPRESSIONS);
if (list == NULL)
goto nla_put_failure;
nft_rule_for_each_expr(expr, next, rule) {
struct nlattr *elem = nla_nest_start(skb, NFTA_LIST_ELEM);
if (elem == NULL)
goto nla_put_failure;
if (nf_tables_fill_expr_info(skb, expr) < 0)
goto nla_put_failure;
nla_nest_end(skb, elem);
}
nla_nest_end(skb, list);
if (rule->ulen &&
nla_put(skb, NFTA_RULE_USERDATA, rule->ulen, nft_userdata(rule)))
goto nla_put_failure;
return nlmsg_end(skb, nlh);
nla_put_failure:
nlmsg_trim(skb, nlh);
return -1;
}
|
C
|
linux
| 0 |
CVE-2012-4467
|
https://www.cvedetails.com/cve/CVE-2012-4467/
|
CWE-399
|
https://github.com/torvalds/linux/commit/ed6fe9d614fc1bca95eb8c0ccd0e92db00ef9d5d
|
ed6fe9d614fc1bca95eb8c0ccd0e92db00ef9d5d
|
Fix order of arguments to compat_put_time[spec|val]
Commit 644595f89620 ("compat: Handle COMPAT_USE_64BIT_TIME in
net/socket.c") introduced a bug where the helper functions to take
either a 64-bit or compat time[spec|val] got the arguments in the wrong
order, passing the kernel stack pointer off as a user pointer (and vice
versa).
Because of the user address range check, that in turn then causes an
EFAULT due to the user pointer range checking failing for the kernel
address. Incorrectly resuling in a failed system call for 32-bit
processes with a 64-bit kernel.
On odder architectures like HP-PA (with separate user/kernel address
spaces), it can be used read kernel memory.
Signed-off-by: Mikulas Patocka <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
|
void socket_seq_show(struct seq_file *seq)
{
int cpu;
int counter = 0;
for_each_possible_cpu(cpu)
counter += per_cpu(sockets_in_use, cpu);
/* It can be negative, by the way. 8) */
if (counter < 0)
counter = 0;
seq_printf(seq, "sockets: used %d\n", counter);
}
|
void socket_seq_show(struct seq_file *seq)
{
int cpu;
int counter = 0;
for_each_possible_cpu(cpu)
counter += per_cpu(sockets_in_use, cpu);
/* It can be negative, by the way. 8) */
if (counter < 0)
counter = 0;
seq_printf(seq, "sockets: used %d\n", counter);
}
|
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 RenderProcessHost::SetRunRendererInProcess(bool value) {
g_run_renderer_in_process_ = value;
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (value && !command_line->HasSwitch(switches::kLang)) {
const std::string locale =
GetContentClient()->browser()->GetApplicationLocale();
command_line->AppendSwitchASCII(switches::kLang, locale);
}
}
|
void RenderProcessHost::SetRunRendererInProcess(bool value) {
g_run_renderer_in_process_ = value;
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (value && !command_line->HasSwitch(switches::kLang)) {
const std::string locale =
GetContentClient()->browser()->GetApplicationLocale();
command_line->AppendSwitchASCII(switches::kLang, locale);
}
}
|
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}
|
htmlCreateMemoryParserCtxt(const char *buffer, int size) {
xmlParserCtxtPtr ctxt;
xmlParserInputPtr input;
xmlParserInputBufferPtr buf;
if (buffer == NULL)
return(NULL);
if (size <= 0)
return(NULL);
ctxt = htmlNewParserCtxt();
if (ctxt == NULL)
return(NULL);
buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
if (buf == NULL) return(NULL);
input = xmlNewInputStream(ctxt);
if (input == NULL) {
xmlFreeParserCtxt(ctxt);
return(NULL);
}
input->filename = NULL;
input->buf = buf;
xmlBufResetInput(buf->buffer, input);
inputPush(ctxt, input);
return(ctxt);
}
|
htmlCreateMemoryParserCtxt(const char *buffer, int size) {
xmlParserCtxtPtr ctxt;
xmlParserInputPtr input;
xmlParserInputBufferPtr buf;
if (buffer == NULL)
return(NULL);
if (size <= 0)
return(NULL);
ctxt = htmlNewParserCtxt();
if (ctxt == NULL)
return(NULL);
buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
if (buf == NULL) return(NULL);
input = xmlNewInputStream(ctxt);
if (input == NULL) {
xmlFreeParserCtxt(ctxt);
return(NULL);
}
input->filename = NULL;
input->buf = buf;
xmlBufResetInput(buf->buffer, input);
inputPush(ctxt, input);
return(ctxt);
}
|
C
|
Chrome
| 0 |
CVE-2011-5327
|
https://www.cvedetails.com/cve/CVE-2011-5327/
|
CWE-119
|
https://github.com/torvalds/linux/commit/12f09ccb4612734a53e47ed5302e0479c10a50f8
|
12f09ccb4612734a53e47ed5302e0479c10a50f8
|
loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Nicholas A. Bellinger <[email protected]>
|
static int tcm_loop_proc_info(struct Scsi_Host *host, char *buffer,
char **start, off_t offset,
int length, int inout)
{
return sprintf(buffer, "tcm_loop_proc_info()\n");
}
|
static int tcm_loop_proc_info(struct Scsi_Host *host, char *buffer,
char **start, off_t offset,
int length, int inout)
{
return sprintf(buffer, "tcm_loop_proc_info()\n");
}
|
C
|
linux
| 0 |
CVE-2013-4263
|
https://www.cvedetails.com/cve/CVE-2013-4263/
|
CWE-119
|
https://github.com/FFmpeg/FFmpeg/commit/e43a0a232dbf6d3c161823c2e07c52e76227a1bc
|
e43a0a232dbf6d3c161823c2e07c52e76227a1bc
|
avfilter: fix plane validity checks
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <[email protected]>
|
static void apply_delogo(uint8_t *dst, int dst_linesize,
uint8_t *src, int src_linesize,
int w, int h, AVRational sar,
int logo_x, int logo_y, int logo_w, int logo_h,
unsigned int band, int show, int direct)
{
int x, y;
uint64_t interp, weightl, weightr, weightt, weightb;
uint8_t *xdst, *xsrc;
uint8_t *topleft, *botleft, *topright;
unsigned int left_sample, right_sample;
int xclipl, xclipr, yclipt, yclipb;
int logo_x1, logo_x2, logo_y1, logo_y2;
xclipl = FFMAX(-logo_x, 0);
xclipr = FFMAX(logo_x+logo_w-w, 0);
yclipt = FFMAX(-logo_y, 0);
yclipb = FFMAX(logo_y+logo_h-h, 0);
logo_x1 = logo_x + xclipl;
logo_x2 = logo_x + logo_w - xclipr;
logo_y1 = logo_y + yclipt;
logo_y2 = logo_y + logo_h - yclipb;
topleft = src+logo_y1 * src_linesize+logo_x1;
topright = src+logo_y1 * src_linesize+logo_x2-1;
botleft = src+(logo_y2-1) * src_linesize+logo_x1;
if (!direct)
av_image_copy_plane(dst, dst_linesize, src, src_linesize, w, h);
dst += (logo_y1 + 1) * dst_linesize;
src += (logo_y1 + 1) * src_linesize;
for (y = logo_y1+1; y < logo_y2-1; y++) {
left_sample = topleft[src_linesize*(y-logo_y1)] +
topleft[src_linesize*(y-logo_y1-1)] +
topleft[src_linesize*(y-logo_y1+1)];
right_sample = topright[src_linesize*(y-logo_y1)] +
topright[src_linesize*(y-logo_y1-1)] +
topright[src_linesize*(y-logo_y1+1)];
for (x = logo_x1+1,
xdst = dst+logo_x1+1,
xsrc = src+logo_x1+1; x < logo_x2-1; x++, xdst++, xsrc++) {
/* Weighted interpolation based on relative distances, taking SAR into account */
weightl = (uint64_t) (logo_x2-1-x) * (y-logo_y1) * (logo_y2-1-y) * sar.den;
weightr = (uint64_t)(x-logo_x1) * (y-logo_y1) * (logo_y2-1-y) * sar.den;
weightt = (uint64_t)(x-logo_x1) * (logo_x2-1-x) * (logo_y2-1-y) * sar.num;
weightb = (uint64_t)(x-logo_x1) * (logo_x2-1-x) * (y-logo_y1) * sar.num;
interp =
left_sample * weightl
+
right_sample * weightr
+
(topleft[x-logo_x1] +
topleft[x-logo_x1-1] +
topleft[x-logo_x1+1]) * weightt
+
(botleft[x-logo_x1] +
botleft[x-logo_x1-1] +
botleft[x-logo_x1+1]) * weightb;
interp /= (weightl + weightr + weightt + weightb) * 3U;
if (y >= logo_y+band && y < logo_y+logo_h-band &&
x >= logo_x+band && x < logo_x+logo_w-band) {
*xdst = interp;
} else {
unsigned dist = 0;
if (x < logo_x+band)
dist = FFMAX(dist, logo_x-x+band);
else if (x >= logo_x+logo_w-band)
dist = FFMAX(dist, x-(logo_x+logo_w-1-band));
if (y < logo_y+band)
dist = FFMAX(dist, logo_y-y+band);
else if (y >= logo_y+logo_h-band)
dist = FFMAX(dist, y-(logo_y+logo_h-1-band));
*xdst = (*xsrc*dist + interp*(band-dist))/band;
if (show && (dist == band-1))
*xdst = 0;
}
}
dst += dst_linesize;
src += src_linesize;
}
}
|
static void apply_delogo(uint8_t *dst, int dst_linesize,
uint8_t *src, int src_linesize,
int w, int h, AVRational sar,
int logo_x, int logo_y, int logo_w, int logo_h,
unsigned int band, int show, int direct)
{
int x, y;
uint64_t interp, weightl, weightr, weightt, weightb;
uint8_t *xdst, *xsrc;
uint8_t *topleft, *botleft, *topright;
unsigned int left_sample, right_sample;
int xclipl, xclipr, yclipt, yclipb;
int logo_x1, logo_x2, logo_y1, logo_y2;
xclipl = FFMAX(-logo_x, 0);
xclipr = FFMAX(logo_x+logo_w-w, 0);
yclipt = FFMAX(-logo_y, 0);
yclipb = FFMAX(logo_y+logo_h-h, 0);
logo_x1 = logo_x + xclipl;
logo_x2 = logo_x + logo_w - xclipr;
logo_y1 = logo_y + yclipt;
logo_y2 = logo_y + logo_h - yclipb;
topleft = src+logo_y1 * src_linesize+logo_x1;
topright = src+logo_y1 * src_linesize+logo_x2-1;
botleft = src+(logo_y2-1) * src_linesize+logo_x1;
if (!direct)
av_image_copy_plane(dst, dst_linesize, src, src_linesize, w, h);
dst += (logo_y1 + 1) * dst_linesize;
src += (logo_y1 + 1) * src_linesize;
for (y = logo_y1+1; y < logo_y2-1; y++) {
left_sample = topleft[src_linesize*(y-logo_y1)] +
topleft[src_linesize*(y-logo_y1-1)] +
topleft[src_linesize*(y-logo_y1+1)];
right_sample = topright[src_linesize*(y-logo_y1)] +
topright[src_linesize*(y-logo_y1-1)] +
topright[src_linesize*(y-logo_y1+1)];
for (x = logo_x1+1,
xdst = dst+logo_x1+1,
xsrc = src+logo_x1+1; x < logo_x2-1; x++, xdst++, xsrc++) {
/* Weighted interpolation based on relative distances, taking SAR into account */
weightl = (uint64_t) (logo_x2-1-x) * (y-logo_y1) * (logo_y2-1-y) * sar.den;
weightr = (uint64_t)(x-logo_x1) * (y-logo_y1) * (logo_y2-1-y) * sar.den;
weightt = (uint64_t)(x-logo_x1) * (logo_x2-1-x) * (logo_y2-1-y) * sar.num;
weightb = (uint64_t)(x-logo_x1) * (logo_x2-1-x) * (y-logo_y1) * sar.num;
interp =
left_sample * weightl
+
right_sample * weightr
+
(topleft[x-logo_x1] +
topleft[x-logo_x1-1] +
topleft[x-logo_x1+1]) * weightt
+
(botleft[x-logo_x1] +
botleft[x-logo_x1-1] +
botleft[x-logo_x1+1]) * weightb;
interp /= (weightl + weightr + weightt + weightb) * 3U;
if (y >= logo_y+band && y < logo_y+logo_h-band &&
x >= logo_x+band && x < logo_x+logo_w-band) {
*xdst = interp;
} else {
unsigned dist = 0;
if (x < logo_x+band)
dist = FFMAX(dist, logo_x-x+band);
else if (x >= logo_x+logo_w-band)
dist = FFMAX(dist, x-(logo_x+logo_w-1-band));
if (y < logo_y+band)
dist = FFMAX(dist, logo_y-y+band);
else if (y >= logo_y+logo_h-band)
dist = FFMAX(dist, y-(logo_y+logo_h-1-band));
*xdst = (*xsrc*dist + interp*(band-dist))/band;
if (show && (dist == band-1))
*xdst = 0;
}
}
dst += dst_linesize;
src += src_linesize;
}
}
|
C
|
FFmpeg
| 0 |
CVE-2010-1152
|
https://www.cvedetails.com/cve/CVE-2010-1152/
|
CWE-20
|
https://github.com/memcached/memcached/commit/d9cd01ede97f4145af9781d448c62a3318952719
|
d9cd01ede97f4145af9781d448c62a3318952719
|
Use strncmp when checking for large ascii multigets.
|
static void append_bin_stats(const char *key, const uint16_t klen,
const char *val, const uint32_t vlen,
conn *c) {
char *buf = c->stats.buffer + c->stats.offset;
uint32_t bodylen = klen + vlen;
protocol_binary_response_header header = {
.response.magic = (uint8_t)PROTOCOL_BINARY_RES,
.response.opcode = PROTOCOL_BINARY_CMD_STAT,
.response.keylen = (uint16_t)htons(klen),
.response.datatype = (uint8_t)PROTOCOL_BINARY_RAW_BYTES,
.response.bodylen = htonl(bodylen),
.response.opaque = c->opaque
};
memcpy(buf, header.bytes, sizeof(header.response));
buf += sizeof(header.response);
if (klen > 0) {
memcpy(buf, key, klen);
buf += klen;
if (vlen > 0) {
memcpy(buf, val, vlen);
}
}
c->stats.offset += sizeof(header.response) + bodylen;
}
|
static void append_bin_stats(const char *key, const uint16_t klen,
const char *val, const uint32_t vlen,
conn *c) {
char *buf = c->stats.buffer + c->stats.offset;
uint32_t bodylen = klen + vlen;
protocol_binary_response_header header = {
.response.magic = (uint8_t)PROTOCOL_BINARY_RES,
.response.opcode = PROTOCOL_BINARY_CMD_STAT,
.response.keylen = (uint16_t)htons(klen),
.response.datatype = (uint8_t)PROTOCOL_BINARY_RAW_BYTES,
.response.bodylen = htonl(bodylen),
.response.opaque = c->opaque
};
memcpy(buf, header.bytes, sizeof(header.response));
buf += sizeof(header.response);
if (klen > 0) {
memcpy(buf, key, klen);
buf += klen;
if (vlen > 0) {
memcpy(buf, val, vlen);
}
}
c->stats.offset += sizeof(header.response) + bodylen;
}
|
C
|
memcached
| 0 |
CVE-2015-1213
|
https://www.cvedetails.com/cve/CVE-2015-1213/
|
CWE-119
|
https://github.com/chromium/chromium/commit/faaa2fd0a05f1622d9a8806da118d4f3b602e707
|
faaa2fd0a05f1622d9a8806da118d4f3b602e707
|
[Blink>Media] Allow autoplay muted on Android by default
There was a mistake causing autoplay muted is shipped on Android
but it will be disabled if the chromium embedder doesn't specify
content setting for "AllowAutoplay" preference. This CL makes the
AllowAutoplay preference true by default so that it is allowed by
embedders (including AndroidWebView) unless they explicitly
disable it.
Intent to ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/Q1cnzNI2GpI/AL_eyUNABgAJ
BUG=689018
Review-Url: https://codereview.chromium.org/2677173002
Cr-Commit-Position: refs/heads/master@{#448423}
|
void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
m_mostlyFillingViewport = true;
if (m_webMediaPlayer)
m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
}
|
void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
m_mostlyFillingViewport = true;
if (m_webMediaPlayer)
m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
}
|
C
|
Chrome
| 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 aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
{
struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm);
ctx->ops->decrypt(&ctx->key[0], (const u32 *) src, (u32 *) dst);
}
|
static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
{
struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm);
ctx->ops->decrypt(&ctx->key[0], (const u32 *) src, (u32 *) dst);
}
|
C
|
linux
| 0 |
CVE-2012-4444
|
https://www.cvedetails.com/cve/CVE-2012-4444/
| null |
https://github.com/torvalds/linux/commit/70789d7052239992824628db8133de08dc78e593
|
70789d7052239992824628db8133de08dc78e593
|
ipv6: discard overlapping fragment
RFC5722 prohibits reassembling fragments when some data overlaps.
Bug spotted by Zhang Zuotao <[email protected]>.
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static inline int ip6_frags_ns_sysctl_register(struct net *net)
{
return 0;
}
|
static inline int ip6_frags_ns_sysctl_register(struct net *net)
{
return 0;
}
|
C
|
linux
| 0 |
CVE-2018-20855
|
https://www.cvedetails.com/cve/CVE-2018-20855/
|
CWE-119
|
https://github.com/torvalds/linux/commit/0625b4ba1a5d4703c7fb01c497bd6c156908af00
|
0625b4ba1a5d4703c7fb01c497bd6c156908af00
|
IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <[email protected]>
Acked-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
|
static __be64 get_umr_update_translation_mask(void)
{
u64 result;
result = MLX5_MKEY_MASK_LEN |
MLX5_MKEY_MASK_PAGE_SIZE |
MLX5_MKEY_MASK_START_ADDR;
return cpu_to_be64(result);
}
|
static __be64 get_umr_update_translation_mask(void)
{
u64 result;
result = MLX5_MKEY_MASK_LEN |
MLX5_MKEY_MASK_PAGE_SIZE |
MLX5_MKEY_MASK_START_ADDR;
return cpu_to_be64(result);
}
|
C
|
linux
| 0 |
CVE-2015-1265
|
https://www.cvedetails.com/cve/CVE-2015-1265/
| null |
https://github.com/chromium/chromium/commit/04ff52bb66284467ccb43d90800013b89ee8db75
|
04ff52bb66284467ccb43d90800013b89ee8db75
|
Switching AudioOutputAuthorizationHandler from using AudioManager interface to AudioSystem one.
BUG=672468
CQ_INCLUDE_TRYBOTS=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
Review-Url: https://codereview.chromium.org/2692203003
Cr-Commit-Position: refs/heads/master@{#450939}
|
void RenderProcessHostImpl::ForceReleaseWorkerRefCounts() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!is_worker_ref_count_disabled_);
is_worker_ref_count_disabled_ = true;
if (!GetWorkerRefCount())
return;
service_worker_ref_count_ = 0;
shared_worker_ref_count_ = 0;
Cleanup();
}
|
void RenderProcessHostImpl::ForceReleaseWorkerRefCounts() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!is_worker_ref_count_disabled_);
is_worker_ref_count_disabled_ = true;
if (!GetWorkerRefCount())
return;
service_worker_ref_count_ = 0;
shared_worker_ref_count_ = 0;
Cleanup();
}
|
C
|
Chrome
| 0 |
CVE-2015-6774
|
https://www.cvedetails.com/cve/CVE-2015-6774/
| null |
https://github.com/chromium/chromium/commit/4026d85fcded8c4ee5113cb1bd1a7e8149e03827
|
4026d85fcded8c4ee5113cb1bd1a7e8149e03827
|
Cache all chrome.loadTimes info before passing them to setters.
The setters can invalidate the pointers frame, data_source and document_state.
BUG=549251
Review URL: https://codereview.chromium.org/1422753007
Cr-Commit-Position: refs/heads/master@{#357201}
|
static int GetCSITransitionType(WebNavigationType nav_type) {
switch (nav_type) {
case blink::WebNavigationTypeLinkClicked:
case blink::WebNavigationTypeFormSubmitted:
case blink::WebNavigationTypeFormResubmitted:
return kTransitionLink;
case blink::WebNavigationTypeBackForward:
return kTransitionForwardBack;
case blink::WebNavigationTypeReload:
return kTransitionReload;
case blink::WebNavigationTypeOther:
return kTransitionOther;
}
return kTransitionOther;
}
|
static int GetCSITransitionType(WebNavigationType nav_type) {
switch (nav_type) {
case blink::WebNavigationTypeLinkClicked:
case blink::WebNavigationTypeFormSubmitted:
case blink::WebNavigationTypeFormResubmitted:
return kTransitionLink;
case blink::WebNavigationTypeBackForward:
return kTransitionForwardBack;
case blink::WebNavigationTypeReload:
return kTransitionReload;
case blink::WebNavigationTypeOther:
return kTransitionOther;
}
return kTransitionOther;
}
|
C
|
Chrome
| 0 |
CVE-2016-9084
|
https://www.cvedetails.com/cve/CVE-2016-9084/
|
CWE-190
|
https://github.com/torvalds/linux/commit/05692d7005a364add85c6e25a6c4447ce08f913a
|
05692d7005a364add85c6e25a6c4447ce08f913a
|
vfio/pci: Fix integer overflows, bitmask check
The VFIO_DEVICE_SET_IRQS ioctl did not sufficiently sanitize
user-supplied integers, potentially allowing memory corruption. This
patch adds appropriate integer overflow checks, checks the range bounds
for VFIO_IRQ_SET_DATA_NONE, and also verifies that only single element
in the VFIO_IRQ_SET_DATA_TYPE_MASK bitmask is set.
VFIO_IRQ_SET_ACTION_TYPE_MASK is already correctly checked later in
vfio_pci_set_irqs_ioctl().
Furthermore, a kzalloc is changed to a kcalloc because the use of a
kzalloc with an integer multiplication allowed an integer overflow
condition to be reached without this patch. kcalloc checks for overflow
and should prevent a similar occurrence.
Signed-off-by: Vlad Tsyrklevich <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
static ssize_t vfio_pci_read(void *device_data, char __user *buf,
size_t count, loff_t *ppos)
{
if (!count)
return 0;
return vfio_pci_rw(device_data, buf, count, ppos, false);
}
|
static ssize_t vfio_pci_read(void *device_data, char __user *buf,
size_t count, loff_t *ppos)
{
if (!count)
return 0;
return vfio_pci_rw(device_data, buf, count, ppos, false);
}
|
C
|
linux
| 0 |
CVE-2011-4112
|
https://www.cvedetails.com/cve/CVE-2011-4112/
|
CWE-264
|
https://github.com/torvalds/linux/commit/550fd08c2cebad61c548def135f67aba284c6162
|
550fd08c2cebad61c548def135f67aba284c6162
|
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There are a handful of drivers that violate this assumption of
course, and need to be fixed up. This patch identifies those drivers, and marks
them as not being able to support the safe transmission of skbs by clearning the
IFF_TX_SKB_SHARING flag in priv_flags
Signed-off-by: Neil Horman <[email protected]>
CC: Karsten Keil <[email protected]>
CC: "David S. Miller" <[email protected]>
CC: Jay Vosburgh <[email protected]>
CC: Andy Gospodarek <[email protected]>
CC: Patrick McHardy <[email protected]>
CC: Krzysztof Halasa <[email protected]>
CC: "John W. Linville" <[email protected]>
CC: Greg Kroah-Hartman <[email protected]>
CC: Marcel Holtmann <[email protected]>
CC: Johannes Berg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *info)
{
struct bonding *bond = netdev_priv(bond_dev);
struct slave *slave;
int i, res = -ENODEV;
read_lock(&bond->lock);
bond_for_each_slave(bond, slave, i) {
if (i == (int)info->slave_id) {
res = 0;
strcpy(info->slave_name, slave->dev->name);
info->link = slave->link;
info->state = bond_slave_state(slave);
info->link_failure_count = slave->link_failure_count;
break;
}
}
read_unlock(&bond->lock);
return res;
}
|
static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *info)
{
struct bonding *bond = netdev_priv(bond_dev);
struct slave *slave;
int i, res = -ENODEV;
read_lock(&bond->lock);
bond_for_each_slave(bond, slave, i) {
if (i == (int)info->slave_id) {
res = 0;
strcpy(info->slave_name, slave->dev->name);
info->link = slave->link;
info->state = bond_slave_state(slave);
info->link_failure_count = slave->link_failure_count;
break;
}
}
read_unlock(&bond->lock);
return res;
}
|
C
|
linux
| 0 |
CVE-2017-18200
|
https://www.cvedetails.com/cve/CVE-2017-18200/
|
CWE-20
|
https://github.com/torvalds/linux/commit/638164a2718f337ea224b747cf5977ef143166a4
|
638164a2718f337ea224b747cf5977ef143166a4
|
f2fs: fix potential panic during fstrim
As Ju Hyung Park reported:
"When 'fstrim' is called for manual trim, a BUG() can be triggered
randomly with this patch.
I'm seeing this issue on both x86 Desktop and arm64 Android phone.
On x86 Desktop, this was caused during Ubuntu boot-up. I have a
cronjob installed which calls 'fstrim -v /' during boot. On arm64
Android, this was caused during GC looping with 1ms gc_min_sleep_time
& gc_max_sleep_time."
Root cause of this issue is that f2fs_wait_discard_bios can only be
used by f2fs_put_super, because during put_super there must be no
other referrers, so it can ignore discard entry's reference count
when removing the entry, otherwise in other caller we will hit bug_on
in __remove_discard_cmd as there may be other issuer added reference
count in discard entry.
Thread A Thread B
- issue_discard_thread
- f2fs_ioc_fitrim
- f2fs_trim_fs
- f2fs_wait_discard_bios
- __issue_discard_cmd
- __submit_discard_cmd
- __wait_discard_cmd
- dc->ref++
- __wait_one_discard_bio
- __wait_discard_cmd
- __remove_discard_cmd
- f2fs_bug_on(sbi, dc->ref)
Fixes: 969d1b180d987c2be02de890d0fff0f66a0e80de
Reported-by: Ju Hyung Park <[email protected]>
Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
|
static inline void f2fs_show_quota_options(struct seq_file *seq,
struct super_block *sb)
{
#ifdef CONFIG_QUOTA
struct f2fs_sb_info *sbi = F2FS_SB(sb);
if (sbi->s_jquota_fmt) {
char *fmtname = "";
switch (sbi->s_jquota_fmt) {
case QFMT_VFS_OLD:
fmtname = "vfsold";
break;
case QFMT_VFS_V0:
fmtname = "vfsv0";
break;
case QFMT_VFS_V1:
fmtname = "vfsv1";
break;
}
seq_printf(seq, ",jqfmt=%s", fmtname);
}
if (sbi->s_qf_names[USRQUOTA])
seq_show_option(seq, "usrjquota", sbi->s_qf_names[USRQUOTA]);
if (sbi->s_qf_names[GRPQUOTA])
seq_show_option(seq, "grpjquota", sbi->s_qf_names[GRPQUOTA]);
if (sbi->s_qf_names[PRJQUOTA])
seq_show_option(seq, "prjjquota", sbi->s_qf_names[PRJQUOTA]);
#endif
}
|
static inline void f2fs_show_quota_options(struct seq_file *seq,
struct super_block *sb)
{
#ifdef CONFIG_QUOTA
struct f2fs_sb_info *sbi = F2FS_SB(sb);
if (sbi->s_jquota_fmt) {
char *fmtname = "";
switch (sbi->s_jquota_fmt) {
case QFMT_VFS_OLD:
fmtname = "vfsold";
break;
case QFMT_VFS_V0:
fmtname = "vfsv0";
break;
case QFMT_VFS_V1:
fmtname = "vfsv1";
break;
}
seq_printf(seq, ",jqfmt=%s", fmtname);
}
if (sbi->s_qf_names[USRQUOTA])
seq_show_option(seq, "usrjquota", sbi->s_qf_names[USRQUOTA]);
if (sbi->s_qf_names[GRPQUOTA])
seq_show_option(seq, "grpjquota", sbi->s_qf_names[GRPQUOTA]);
if (sbi->s_qf_names[PRJQUOTA])
seq_show_option(seq, "prjjquota", sbi->s_qf_names[PRJQUOTA]);
#endif
}
|
C
|
linux
| 0 |
CVE-2014-1738
|
https://www.cvedetails.com/cve/CVE-2014-1738/
|
CWE-264
|
https://github.com/torvalds/linux/commit/2145e15e0557a01b9195d1c7199a1b92cb9be81f
|
2145e15e0557a01b9195d1c7199a1b92cb9be81f
|
floppy: don't write kernel-only members to FDRAWCMD ioctl output
Do not leak kernel-only floppy_raw_cmd structure members to userspace.
This includes the linked-list pointer and the pointer to the allocated
DMA space.
Signed-off-by: Matthew Daley <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
static void request_done(int uptodate)
{
struct request *req = current_req;
struct request_queue *q;
unsigned long flags;
int block;
char msg[sizeof("request done ") + sizeof(int) * 3];
probing = 0;
snprintf(msg, sizeof(msg), "request done %d", uptodate);
reschedule_timeout(MAXTIMEOUT, msg);
if (!req) {
pr_info("floppy.c: no request in request_done\n");
return;
}
q = req->q;
if (uptodate) {
/* maintain values for invalidation on geometry
* change */
block = current_count_sectors + blk_rq_pos(req);
INFBOUND(DRS->maxblock, block);
if (block > _floppy->sect)
DRS->maxtrack = 1;
/* unlock chained buffers */
spin_lock_irqsave(q->queue_lock, flags);
floppy_end_request(req, 0);
spin_unlock_irqrestore(q->queue_lock, flags);
} else {
if (rq_data_dir(req) == WRITE) {
/* record write error information */
DRWE->write_errors++;
if (DRWE->write_errors == 1) {
DRWE->first_error_sector = blk_rq_pos(req);
DRWE->first_error_generation = DRS->generation;
}
DRWE->last_error_sector = blk_rq_pos(req);
DRWE->last_error_generation = DRS->generation;
}
spin_lock_irqsave(q->queue_lock, flags);
floppy_end_request(req, -EIO);
spin_unlock_irqrestore(q->queue_lock, flags);
}
}
|
static void request_done(int uptodate)
{
struct request *req = current_req;
struct request_queue *q;
unsigned long flags;
int block;
char msg[sizeof("request done ") + sizeof(int) * 3];
probing = 0;
snprintf(msg, sizeof(msg), "request done %d", uptodate);
reschedule_timeout(MAXTIMEOUT, msg);
if (!req) {
pr_info("floppy.c: no request in request_done\n");
return;
}
q = req->q;
if (uptodate) {
/* maintain values for invalidation on geometry
* change */
block = current_count_sectors + blk_rq_pos(req);
INFBOUND(DRS->maxblock, block);
if (block > _floppy->sect)
DRS->maxtrack = 1;
/* unlock chained buffers */
spin_lock_irqsave(q->queue_lock, flags);
floppy_end_request(req, 0);
spin_unlock_irqrestore(q->queue_lock, flags);
} else {
if (rq_data_dir(req) == WRITE) {
/* record write error information */
DRWE->write_errors++;
if (DRWE->write_errors == 1) {
DRWE->first_error_sector = blk_rq_pos(req);
DRWE->first_error_generation = DRS->generation;
}
DRWE->last_error_sector = blk_rq_pos(req);
DRWE->last_error_generation = DRS->generation;
}
spin_lock_irqsave(q->queue_lock, flags);
floppy_end_request(req, -EIO);
spin_unlock_irqrestore(q->queue_lock, flags);
}
}
|
C
|
linux
| 0 |
CVE-2019-6974
|
https://www.cvedetails.com/cve/CVE-2019-6974/
|
CWE-362
|
https://github.com/torvalds/linux/commit/cfa39381173d5f969daf43582c95ad679189cbc9
|
cfa39381173d5f969daf43582c95ad679189cbc9
|
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
kvm_ioctl_create_device() does the following:
1. creates a device that holds a reference to the VM object (with a borrowed
reference, the VM's refcount has not been bumped yet)
2. initializes the device
3. transfers the reference to the device to the caller's file descriptor table
4. calls kvm_get_kvm() to turn the borrowed reference to the VM into a real
reference
The ownership transfer in step 3 must not happen before the reference to the VM
becomes a proper, non-borrowed reference, which only happens in step 4.
After step 3, an attacker can close the file descriptor and drop the borrowed
reference, which can cause the refcount of the kvm object to drop to zero.
This means that we need to grab a reference for the device before
anon_inode_getfd(), otherwise the VM can disappear from under us.
Fixes: 852b6d57dc7f ("kvm: add device control API")
Cc: [email protected]
Signed-off-by: Jann Horn <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
bool kvm_vcpu_wake_up(struct kvm_vcpu *vcpu)
{
struct swait_queue_head *wqp;
wqp = kvm_arch_vcpu_wq(vcpu);
if (swq_has_sleeper(wqp)) {
swake_up_one(wqp);
++vcpu->stat.halt_wakeup;
return true;
}
return false;
}
|
bool kvm_vcpu_wake_up(struct kvm_vcpu *vcpu)
{
struct swait_queue_head *wqp;
wqp = kvm_arch_vcpu_wq(vcpu);
if (swq_has_sleeper(wqp)) {
swake_up_one(wqp);
++vcpu->stat.halt_wakeup;
return true;
}
return false;
}
|
C
|
linux
| 0 |
CVE-2016-1639
|
https://www.cvedetails.com/cve/CVE-2016-1639/
| null |
https://github.com/chromium/chromium/commit/c66b1fc49870c514b1c1e8b53498153176d7ec2b
|
c66b1fc49870c514b1c1e8b53498153176d7ec2b
|
cros: Check initial auth type when showing views login.
Bug: 859611
Change-Id: I0298db9bbf4aed6bd40600aef2e1c5794e8cd058
Reviewed-on: https://chromium-review.googlesource.com/1123056
Reviewed-by: Xiaoyin Hu <[email protected]>
Commit-Queue: Jacob Dufault <[email protected]>
Cr-Commit-Position: refs/heads/master@{#572224}
|
void LockContentsView::CreateHighDensityLayout(
const std::vector<mojom::LoginUserInfoPtr>& users) {
auto* fill = new NonAccessibleView();
main_view_->AddChildViewAt(fill, 0);
main_layout_->SetFlexForView(fill, 1);
fill = new NonAccessibleView();
main_view_->AddChildView(fill);
main_layout_->SetFlexForView(fill, 1);
users_list_ =
BuildScrollableUsersListView(users, LoginDisplayStyle::kExtraSmall);
main_view_->AddChildView(users_list_);
}
|
void LockContentsView::CreateHighDensityLayout(
const std::vector<mojom::LoginUserInfoPtr>& users) {
auto* fill = new NonAccessibleView();
main_view_->AddChildViewAt(fill, 0);
main_layout_->SetFlexForView(fill, 1);
fill = new NonAccessibleView();
main_view_->AddChildView(fill);
main_layout_->SetFlexForView(fill, 1);
users_list_ =
BuildScrollableUsersListView(users, LoginDisplayStyle::kExtraSmall);
main_view_->AddChildView(users_list_);
}
|
C
|
Chrome
| 0 |
CVE-2016-10133
|
https://www.cvedetails.com/cve/CVE-2016-10133/
|
CWE-119
|
http://git.ghostscript.com/?p=mujs.git;a=commit;h=77ab465f1c394bb77f00966cd950650f3f53cb24
|
77ab465f1c394bb77f00966cd950650f3f53cb24
| null |
static void jsR_callfunction(js_State *J, int n, js_Function *F, js_Environment *scope)
{
js_Value v;
int i;
scope = jsR_newenvironment(J, jsV_newobject(J, JS_COBJECT, NULL), scope);
jsR_savescope(J, scope);
if (F->arguments) {
js_newobject(J);
if (!J->strict) {
js_currentfunction(J);
js_defproperty(J, -2, "callee", JS_DONTENUM);
}
js_pushnumber(J, n);
js_defproperty(J, -2, "length", JS_DONTENUM);
for (i = 0; i < n; ++i) {
js_copy(J, i + 1);
js_setindex(J, -2, i);
}
js_initvar(J, "arguments", -1);
js_pop(J, 1);
}
for (i = 0; i < F->numparams; ++i) {
if (i < n)
js_initvar(J, F->vartab[i], i + 1);
else {
js_pushundefined(J);
js_initvar(J, F->vartab[i], -1);
js_pop(J, 1);
}
}
js_pop(J, n);
jsR_run(J, F);
v = *stackidx(J, -1);
TOP = --BOT; /* clear stack */
js_pushvalue(J, v);
jsR_restorescope(J);
}
|
static void jsR_callfunction(js_State *J, int n, js_Function *F, js_Environment *scope)
{
js_Value v;
int i;
scope = jsR_newenvironment(J, jsV_newobject(J, JS_COBJECT, NULL), scope);
jsR_savescope(J, scope);
if (F->arguments) {
js_newobject(J);
if (!J->strict) {
js_currentfunction(J);
js_defproperty(J, -2, "callee", JS_DONTENUM);
}
js_pushnumber(J, n);
js_defproperty(J, -2, "length", JS_DONTENUM);
for (i = 0; i < n; ++i) {
js_copy(J, i + 1);
js_setindex(J, -2, i);
}
js_initvar(J, "arguments", -1);
js_pop(J, 1);
}
for (i = 0; i < F->numparams; ++i) {
if (i < n)
js_initvar(J, F->vartab[i], i + 1);
else {
js_pushundefined(J);
js_initvar(J, F->vartab[i], -1);
js_pop(J, 1);
}
}
js_pop(J, n);
jsR_run(J, F);
v = *stackidx(J, -1);
TOP = --BOT; /* clear stack */
js_pushvalue(J, v);
jsR_restorescope(J);
}
|
C
|
ghostscript
| 0 |
CVE-2016-0723
|
https://www.cvedetails.com/cve/CVE-2016-0723/
|
CWE-362
|
https://github.com/torvalds/linux/commit/5c17c861a357e9458001f021a7afa7aab9937439
|
5c17c861a357e9458001f021a7afa7aab9937439
|
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
ioctl(TIOCGETD) retrieves the line discipline id directly from the
ldisc because the line discipline id (c_line) in termios is untrustworthy;
userspace may have set termios via ioctl(TCSETS*) without actually
changing the line discipline via ioctl(TIOCSETD).
However, directly accessing the current ldisc via tty->ldisc is
unsafe; the ldisc ptr dereferenced may be stale if the line discipline
is changing via ioctl(TIOCSETD) or hangup.
Wait for the line discipline reference (just like read() or write())
to retrieve the "current" line discipline id.
Cc: <[email protected]>
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
void console_sysfs_notify(void)
{
if (consdev)
sysfs_notify(&consdev->kobj, NULL, "active");
}
|
void console_sysfs_notify(void)
{
if (consdev)
sysfs_notify(&consdev->kobj, NULL, "active");
}
|
C
|
linux
| 0 |
CVE-2016-6255
|
https://www.cvedetails.com/cve/CVE-2016-6255/
|
CWE-284
|
https://github.com/mjg59/pupnp-code/commit/be0a01bdb83395d9f3a5ea09c1308a4f1a972cbd
|
be0a01bdb83395d9f3a5ea09c1308a4f1a972cbd
|
Don't allow unhandled POSTs to write to the filesystem by default
If there's no registered handler for a POST request, the default behaviour
is to write it to the filesystem. Several million deployed devices appear
to have this behaviour, making it possible to (at least) store arbitrary
data on them. Add a configure option that enables this behaviour, and change
the default to just drop POSTs that aren't directly handled.
|
static void alias_release(
/*! [in] XML alias object. */
struct xml_alias_t *alias)
{
ithread_mutex_lock(&gWebMutex);
/* ignore invalid alias */
if (!is_valid_alias(alias)) {
ithread_mutex_unlock(&gWebMutex);
return;
}
assert(*alias->ct > 0);
*alias->ct -= 1;
if (*alias->ct <= 0) {
membuffer_destroy(&alias->doc);
membuffer_destroy(&alias->name);
free(alias->ct);
}
ithread_mutex_unlock(&gWebMutex);
}
|
static void alias_release(
/*! [in] XML alias object. */
struct xml_alias_t *alias)
{
ithread_mutex_lock(&gWebMutex);
/* ignore invalid alias */
if (!is_valid_alias(alias)) {
ithread_mutex_unlock(&gWebMutex);
return;
}
assert(*alias->ct > 0);
*alias->ct -= 1;
if (*alias->ct <= 0) {
membuffer_destroy(&alias->doc);
membuffer_destroy(&alias->name);
free(alias->ct);
}
ithread_mutex_unlock(&gWebMutex);
}
|
C
|
pupnp-code
| 0 |
CVE-2017-12179
|
https://www.cvedetails.com/cve/CVE-2017-12179/
|
CWE-190
|
https://cgit.freedesktop.org/xorg/xserver/commit/?id=d088e3c1286b548a58e62afdc70bb40981cdb9e8
|
d088e3c1286b548a58e62afdc70bb40981cdb9e8
| null |
barrier_find_nearest(BarrierScreenPtr cs, DeviceIntPtr dev,
int dir,
int x1, int y1, int x2, int y2)
{
struct PointerBarrierClient *c, *nearest = NULL;
double min_distance = INT_MAX; /* can't get higher than that in X anyway */
xorg_list_for_each_entry(c, &cs->barriers, entry) {
struct PointerBarrier *b = &c->barrier;
struct PointerBarrierDevice *pbd;
double distance;
pbd = GetBarrierDevice(c, dev->id);
if (pbd->seen)
continue;
if (!barrier_is_blocking_direction(b, dir))
continue;
if (!barrier_blocks_device(c, dev))
continue;
if (barrier_is_blocking(b, x1, y1, x2, y2, &distance)) {
if (min_distance > distance) {
min_distance = distance;
nearest = c;
}
}
}
return nearest;
}
|
barrier_find_nearest(BarrierScreenPtr cs, DeviceIntPtr dev,
int dir,
int x1, int y1, int x2, int y2)
{
struct PointerBarrierClient *c, *nearest = NULL;
double min_distance = INT_MAX; /* can't get higher than that in X anyway */
xorg_list_for_each_entry(c, &cs->barriers, entry) {
struct PointerBarrier *b = &c->barrier;
struct PointerBarrierDevice *pbd;
double distance;
pbd = GetBarrierDevice(c, dev->id);
if (pbd->seen)
continue;
if (!barrier_is_blocking_direction(b, dir))
continue;
if (!barrier_blocks_device(c, dev))
continue;
if (barrier_is_blocking(b, x1, y1, x2, y2, &distance)) {
if (min_distance > distance) {
min_distance = distance;
nearest = c;
}
}
}
return nearest;
}
|
C
|
xserver
| 0 |
CVE-2019-11487
|
https://www.cvedetails.com/cve/CVE-2019-11487/
|
CWE-416
|
https://github.com/torvalds/linux/commit/6b3a707736301c2128ca85ce85fb13f60b5e350a
|
6b3a707736301c2128ca85ce85fb13f60b5e350a
|
Merge branch 'page-refs' (page ref overflow)
Merge page ref overflow branch.
Jann Horn reported that he can overflow the page ref count with
sufficient memory (and a filesystem that is intentionally extremely
slow).
Admittedly it's not exactly easy. To have more than four billion
references to a page requires a minimum of 32GB of kernel memory just
for the pointers to the pages, much less any metadata to keep track of
those pointers. Jann needed a total of 140GB of memory and a specially
crafted filesystem that leaves all reads pending (in order to not ever
free the page references and just keep adding more).
Still, we have a fairly straightforward way to limit the two obvious
user-controllable sources of page references: direct-IO like page
references gotten through get_user_pages(), and the splice pipe page
duplication. So let's just do that.
* branch page-refs:
fs: prevent page refcount overflow in pipe_buf_get
mm: prevent get_user_pages() from overflowing page refcount
mm: add 'try_get_page()' helper function
mm: make page ref count overflow check tighter and more explicit
|
static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count,
nodemask_t *nodes_allowed)
{
unsigned long min_count, ret;
if (hstate_is_gigantic(h) && !gigantic_page_supported())
return h->max_huge_pages;
/*
* Increase the pool size
* First take pages out of surplus state. Then make up the
* remaining difference by allocating fresh huge pages.
*
* We might race with alloc_surplus_huge_page() here and be unable
* to convert a surplus huge page to a normal huge page. That is
* not critical, though, it just means the overall size of the
* pool might be one hugepage larger than it needs to be, but
* within all the constraints specified by the sysctls.
*/
spin_lock(&hugetlb_lock);
while (h->surplus_huge_pages && count > persistent_huge_pages(h)) {
if (!adjust_pool_surplus(h, nodes_allowed, -1))
break;
}
while (count > persistent_huge_pages(h)) {
/*
* If this allocation races such that we no longer need the
* page, free_huge_page will handle it by freeing the page
* and reducing the surplus.
*/
spin_unlock(&hugetlb_lock);
/* yield cpu to avoid soft lockup */
cond_resched();
ret = alloc_pool_huge_page(h, nodes_allowed);
spin_lock(&hugetlb_lock);
if (!ret)
goto out;
/* Bail for signals. Probably ctrl-c from user */
if (signal_pending(current))
goto out;
}
/*
* Decrease the pool size
* First return free pages to the buddy allocator (being careful
* to keep enough around to satisfy reservations). Then place
* pages into surplus state as needed so the pool will shrink
* to the desired size as pages become free.
*
* By placing pages into the surplus state independent of the
* overcommit value, we are allowing the surplus pool size to
* exceed overcommit. There are few sane options here. Since
* alloc_surplus_huge_page() is checking the global counter,
* though, we'll note that we're not allowed to exceed surplus
* and won't grow the pool anywhere else. Not until one of the
* sysctls are changed, or the surplus pages go out of use.
*/
min_count = h->resv_huge_pages + h->nr_huge_pages - h->free_huge_pages;
min_count = max(count, min_count);
try_to_free_low(h, min_count, nodes_allowed);
while (min_count < persistent_huge_pages(h)) {
if (!free_pool_huge_page(h, nodes_allowed, 0))
break;
cond_resched_lock(&hugetlb_lock);
}
while (count < persistent_huge_pages(h)) {
if (!adjust_pool_surplus(h, nodes_allowed, 1))
break;
}
out:
ret = persistent_huge_pages(h);
spin_unlock(&hugetlb_lock);
return ret;
}
|
static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count,
nodemask_t *nodes_allowed)
{
unsigned long min_count, ret;
if (hstate_is_gigantic(h) && !gigantic_page_supported())
return h->max_huge_pages;
/*
* Increase the pool size
* First take pages out of surplus state. Then make up the
* remaining difference by allocating fresh huge pages.
*
* We might race with alloc_surplus_huge_page() here and be unable
* to convert a surplus huge page to a normal huge page. That is
* not critical, though, it just means the overall size of the
* pool might be one hugepage larger than it needs to be, but
* within all the constraints specified by the sysctls.
*/
spin_lock(&hugetlb_lock);
while (h->surplus_huge_pages && count > persistent_huge_pages(h)) {
if (!adjust_pool_surplus(h, nodes_allowed, -1))
break;
}
while (count > persistent_huge_pages(h)) {
/*
* If this allocation races such that we no longer need the
* page, free_huge_page will handle it by freeing the page
* and reducing the surplus.
*/
spin_unlock(&hugetlb_lock);
/* yield cpu to avoid soft lockup */
cond_resched();
ret = alloc_pool_huge_page(h, nodes_allowed);
spin_lock(&hugetlb_lock);
if (!ret)
goto out;
/* Bail for signals. Probably ctrl-c from user */
if (signal_pending(current))
goto out;
}
/*
* Decrease the pool size
* First return free pages to the buddy allocator (being careful
* to keep enough around to satisfy reservations). Then place
* pages into surplus state as needed so the pool will shrink
* to the desired size as pages become free.
*
* By placing pages into the surplus state independent of the
* overcommit value, we are allowing the surplus pool size to
* exceed overcommit. There are few sane options here. Since
* alloc_surplus_huge_page() is checking the global counter,
* though, we'll note that we're not allowed to exceed surplus
* and won't grow the pool anywhere else. Not until one of the
* sysctls are changed, or the surplus pages go out of use.
*/
min_count = h->resv_huge_pages + h->nr_huge_pages - h->free_huge_pages;
min_count = max(count, min_count);
try_to_free_low(h, min_count, nodes_allowed);
while (min_count < persistent_huge_pages(h)) {
if (!free_pool_huge_page(h, nodes_allowed, 0))
break;
cond_resched_lock(&hugetlb_lock);
}
while (count < persistent_huge_pages(h)) {
if (!adjust_pool_surplus(h, nodes_allowed, 1))
break;
}
out:
ret = persistent_huge_pages(h);
spin_unlock(&hugetlb_lock);
return ret;
}
|
C
|
linux
| 0 |
CVE-2016-10749
|
https://www.cvedetails.com/cve/CVE-2016-10749/
|
CWE-125
|
https://github.com/DaveGamble/cJSON/commit/94df772485c92866ca417d92137747b2e3b0a917
|
94df772485c92866ca417d92137747b2e3b0a917
|
fix buffer overflow (#30)
|
static char *print_string_ptr(const char *str,printbuffer *p)
{
const char *ptr;char *ptr2,*out;int len=0,flag=0;unsigned char token;
if (!str)
{
if (p) out=ensure(p,3);
else out=(char*)cJSON_malloc(3);
if (!out) return 0;
strcpy(out,"\"\"");
return out;
}
for (ptr=str;*ptr;ptr++) flag|=((*ptr>0 && *ptr<32)||(*ptr=='\"')||(*ptr=='\\'))?1:0;
if (!flag)
{
len=ptr-str;
if (p) out=ensure(p,len+3);
else out=(char*)cJSON_malloc(len+3);
if (!out) return 0;
ptr2=out;*ptr2++='\"';
strcpy(ptr2,str);
ptr2[len]='\"';
ptr2[len+1]=0;
return out;
}
ptr=str;while ((token=*ptr) && ++len) {if (strchr("\"\\\b\f\n\r\t",token)) len++; else if (token<32) len+=5;ptr++;}
if (p) out=ensure(p,len+3);
else out=(char*)cJSON_malloc(len+3);
if (!out) return 0;
ptr2=out;ptr=str;
*ptr2++='\"';
while (*ptr)
{
if ((unsigned char)*ptr>31 && *ptr!='\"' && *ptr!='\\') *ptr2++=*ptr++;
else
{
*ptr2++='\\';
switch (token=*ptr++)
{
case '\\': *ptr2++='\\'; break;
case '\"': *ptr2++='\"'; break;
case '\b': *ptr2++='b'; break;
case '\f': *ptr2++='f'; break;
case '\n': *ptr2++='n'; break;
case '\r': *ptr2++='r'; break;
case '\t': *ptr2++='t'; break;
default: sprintf(ptr2,"u%04x",token);ptr2+=5; break; /* escape and print */
}
}
}
*ptr2++='\"';*ptr2++=0;
return out;
}
|
static char *print_string_ptr(const char *str,printbuffer *p)
{
const char *ptr;char *ptr2,*out;int len=0,flag=0;unsigned char token;
if (!str)
{
if (p) out=ensure(p,3);
else out=(char*)cJSON_malloc(3);
if (!out) return 0;
strcpy(out,"\"\"");
return out;
}
for (ptr=str;*ptr;ptr++) flag|=((*ptr>0 && *ptr<32)||(*ptr=='\"')||(*ptr=='\\'))?1:0;
if (!flag)
{
len=ptr-str;
if (p) out=ensure(p,len+3);
else out=(char*)cJSON_malloc(len+3);
if (!out) return 0;
ptr2=out;*ptr2++='\"';
strcpy(ptr2,str);
ptr2[len]='\"';
ptr2[len+1]=0;
return out;
}
ptr=str;while ((token=*ptr) && ++len) {if (strchr("\"\\\b\f\n\r\t",token)) len++; else if (token<32) len+=5;ptr++;}
if (p) out=ensure(p,len+3);
else out=(char*)cJSON_malloc(len+3);
if (!out) return 0;
ptr2=out;ptr=str;
*ptr2++='\"';
while (*ptr)
{
if ((unsigned char)*ptr>31 && *ptr!='\"' && *ptr!='\\') *ptr2++=*ptr++;
else
{
*ptr2++='\\';
switch (token=*ptr++)
{
case '\\': *ptr2++='\\'; break;
case '\"': *ptr2++='\"'; break;
case '\b': *ptr2++='b'; break;
case '\f': *ptr2++='f'; break;
case '\n': *ptr2++='n'; break;
case '\r': *ptr2++='r'; break;
case '\t': *ptr2++='t'; break;
default: sprintf(ptr2,"u%04x",token);ptr2+=5; break; /* escape and print */
}
}
}
*ptr2++='\"';*ptr2++=0;
return out;
}
|
C
|
cJSON
| 0 |
CVE-2018-18344
|
https://www.cvedetails.com/cve/CVE-2018-18344/
|
CWE-20
|
https://github.com/chromium/chromium/commit/c71d8045ce0592cf3f4290744ab57b23c1d1b4c6
|
c71d8045ce0592cf3f4290744ab57b23c1d1b4c6
|
[DevTools] Do not allow Page.setDownloadBehavior for extensions
Bug: 866426
Change-Id: I71b672978e1a8ec779ede49da16b21198567d3a4
Reviewed-on: https://chromium-review.googlesource.com/c/1270007
Commit-Queue: Dmitry Gozman <[email protected]>
Reviewed-by: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#598004}
|
bool ExtensionDevToolsClientHost::MayAttachToRenderer(
content::RenderFrameHost* render_frame_host,
bool is_webui) {
if (is_webui)
return false;
if (!render_frame_host)
return true;
std::string error;
const GURL& site_instance_url =
render_frame_host->GetSiteInstance()->GetSiteURL();
if (site_instance_url.is_empty() || site_instance_url == "about:") {
return true;
}
return ExtensionCanAttachToURL(*extension_, site_instance_url, profile_,
&error);
}
|
bool ExtensionDevToolsClientHost::MayAttachToRenderer(
content::RenderFrameHost* render_frame_host,
bool is_webui) {
if (is_webui)
return false;
if (!render_frame_host)
return true;
std::string error;
const GURL& site_instance_url =
render_frame_host->GetSiteInstance()->GetSiteURL();
if (site_instance_url.is_empty() || site_instance_url == "about:") {
return true;
}
return ExtensionCanAttachToURL(*extension_, site_instance_url, profile_,
&error);
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/04cca6c05e4923f1b91e0dddf053e088456d8645
|
04cca6c05e4923f1b91e0dddf053e088456d8645
|
https://bugs.webkit.org/show_bug.cgi?id=45164
Reviewed by Dan Bernstein.
REGRESSION: <a><img align=top></a> Clickable area too large
Make sure to clamp hit testing of quirky inline flow boxes the same way we already clamped
painting.
Source/WebCore:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::nodeAtPoint):
LayoutTests:
* fast/inline/inline-position-top-align-expected.txt: Added.
* fast/inline/inline-position-top-align.html: Added.
git-svn-id: svn://svn.chromium.org/blink/trunk@81055 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
float InlineFlowBox::placeEllipsisBox(bool ltr, float blockLeftEdge, float blockRightEdge, float ellipsisWidth, bool& foundBox)
{
float result = -1;
InlineBox* box = ltr ? firstChild() : lastChild();
int visibleLeftEdge = blockLeftEdge;
int visibleRightEdge = blockRightEdge;
while (box) {
int currResult = box->placeEllipsisBox(ltr, visibleLeftEdge, visibleRightEdge, ellipsisWidth, foundBox);
if (currResult != -1 && result == -1)
result = currResult;
if (ltr) {
visibleLeftEdge += box->logicalWidth();
box = box->nextOnLine();
}
else {
visibleRightEdge -= box->logicalWidth();
box = box->prevOnLine();
}
}
return result;
}
|
float InlineFlowBox::placeEllipsisBox(bool ltr, float blockLeftEdge, float blockRightEdge, float ellipsisWidth, bool& foundBox)
{
float result = -1;
InlineBox* box = ltr ? firstChild() : lastChild();
int visibleLeftEdge = blockLeftEdge;
int visibleRightEdge = blockRightEdge;
while (box) {
int currResult = box->placeEllipsisBox(ltr, visibleLeftEdge, visibleRightEdge, ellipsisWidth, foundBox);
if (currResult != -1 && result == -1)
result = currResult;
if (ltr) {
visibleLeftEdge += box->logicalWidth();
box = box->nextOnLine();
}
else {
visibleRightEdge -= box->logicalWidth();
box = box->prevOnLine();
}
}
return result;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/befb46ae3385fa13975521e9a2281e35805b339e
|
befb46ae3385fa13975521e9a2281e35805b339e
|
2009-10-23 Chris Evans <[email protected]>
Reviewed by Adam Barth.
Added test for bug 27239 (ignore Refresh for view source mode).
https://bugs.webkit.org/show_bug.cgi?id=27239
* http/tests/security/view-source-no-refresh.html: Added
* http/tests/security/view-source-no-refresh-expected.txt: Added
* http/tests/security/resources/view-source-no-refresh.php: Added
2009-10-23 Chris Evans <[email protected]>
Reviewed by Adam Barth.
Ignore the Refresh header if we're in view source mode.
https://bugs.webkit.org/show_bug.cgi?id=27239
Test: http/tests/security/view-source-no-refresh.html
* loader/FrameLoader.cpp: ignore Refresh in view-source mode.
git-svn-id: svn://svn.chromium.org/blink/trunk@50018 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, PassRefPtr<FormState> formState, bool shouldContinue)
{
ASSERT(m_policyDocumentLoader || !m_provisionalDocumentLoader->unreachableURL().isEmpty());
bool isTargetItem = history()->provisionalItem() ? history()->provisionalItem()->isTargetItem() : false;
bool canContinue = shouldContinue && (!isLoadingMainFrame() || m_frame->shouldClose());
if (!canContinue) {
if (m_quickRedirectComing)
clientRedirectCancelledOrFinished(false);
setPolicyDocumentLoader(0);
if ((isTargetItem || isLoadingMainFrame()) && isBackForwardLoadType(policyChecker()->loadType()))
if (Page* page = m_frame->page()) {
Frame* mainFrame = page->mainFrame();
if (HistoryItem* resetItem = mainFrame->loader()->history()->currentItem()) {
page->backForwardList()->goToItem(resetItem);
Settings* settings = m_frame->settings();
page->setGlobalHistoryItem((!settings || settings->privateBrowsingEnabled()) ? 0 : resetItem);
}
}
return;
}
FrameLoadType type = policyChecker()->loadType();
stopAllLoaders();
if (!m_frame->page())
return;
#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
if (Page* page = m_frame->page()) {
if (page->mainFrame() == m_frame)
page->inspectorController()->resumeDebugger();
}
#endif
setProvisionalDocumentLoader(m_policyDocumentLoader.get());
m_loadType = type;
setState(FrameStateProvisional);
setPolicyDocumentLoader(0);
if (isBackForwardLoadType(type) && loadProvisionalItemFromCachedPage())
return;
if (formState)
m_client->dispatchWillSubmitForm(&PolicyChecker::continueLoadAfterWillSubmitForm, formState);
else
continueLoadAfterWillSubmitForm();
}
|
void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, PassRefPtr<FormState> formState, bool shouldContinue)
{
ASSERT(m_policyDocumentLoader || !m_provisionalDocumentLoader->unreachableURL().isEmpty());
bool isTargetItem = history()->provisionalItem() ? history()->provisionalItem()->isTargetItem() : false;
bool canContinue = shouldContinue && (!isLoadingMainFrame() || m_frame->shouldClose());
if (!canContinue) {
if (m_quickRedirectComing)
clientRedirectCancelledOrFinished(false);
setPolicyDocumentLoader(0);
if ((isTargetItem || isLoadingMainFrame()) && isBackForwardLoadType(policyChecker()->loadType()))
if (Page* page = m_frame->page()) {
Frame* mainFrame = page->mainFrame();
if (HistoryItem* resetItem = mainFrame->loader()->history()->currentItem()) {
page->backForwardList()->goToItem(resetItem);
Settings* settings = m_frame->settings();
page->setGlobalHistoryItem((!settings || settings->privateBrowsingEnabled()) ? 0 : resetItem);
}
}
return;
}
FrameLoadType type = policyChecker()->loadType();
stopAllLoaders();
if (!m_frame->page())
return;
#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
if (Page* page = m_frame->page()) {
if (page->mainFrame() == m_frame)
page->inspectorController()->resumeDebugger();
}
#endif
setProvisionalDocumentLoader(m_policyDocumentLoader.get());
m_loadType = type;
setState(FrameStateProvisional);
setPolicyDocumentLoader(0);
if (isBackForwardLoadType(type) && loadProvisionalItemFromCachedPage())
return;
if (formState)
m_client->dispatchWillSubmitForm(&PolicyChecker::continueLoadAfterWillSubmitForm, formState);
else
continueLoadAfterWillSubmitForm();
}
|
C
|
Chrome
| 0 |
CVE-2018-12714
|
https://www.cvedetails.com/cve/CVE-2018-12714/
|
CWE-787
|
https://github.com/torvalds/linux/commit/81f9c4e4177d31ced6f52a89bb70e93bfb77ca03
|
81f9c4e4177d31ced6f52a89bb70e93bfb77ca03
|
Merge tag 'trace-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt:
"This contains a few fixes and a clean up.
- a bad merge caused an "endif" to go in the wrong place in
scripts/Makefile.build
- softirq tracing fix for tracing that corrupts lockdep and causes a
false splat
- histogram documentation typo fixes
- fix a bad memory reference when passing in no filter to the filter
code
- simplify code by using the swap macro instead of open coding the
swap"
* tag 'trace-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount
tracing: Fix some errors in histogram documentation
tracing: Use swap macro in update_max_tr
softirq: Reorder trace_softirqs_on to prevent lockdep splat
tracing: Check for no filter when processing event filters
|
void raise_softirq(unsigned int nr)
{
unsigned long flags;
local_irq_save(flags);
raise_softirq_irqoff(nr);
local_irq_restore(flags);
}
|
void raise_softirq(unsigned int nr)
{
unsigned long flags;
local_irq_save(flags);
raise_softirq_irqoff(nr);
local_irq_restore(flags);
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/8353baf8d1504dbdd4ad7584ff2466de657521cd
|
8353baf8d1504dbdd4ad7584ff2466de657521cd
|
Remove WebFrame::canHaveSecureChild
To simplify the public API, ServiceWorkerNetworkProvider can do the
parent walk itself.
Follow-up to https://crrev.com/ad1850962644e19.
BUG=607543
Review-Url: https://codereview.chromium.org/2082493002
Cr-Commit-Position: refs/heads/master@{#400896}
|
WebFrame* WebFrame::opener() const
{
return m_opener;
}
|
WebFrame* WebFrame::opener() const
{
return m_opener;
}
|
C
|
Chrome
| 0 |
CVE-2013-1763
|
https://www.cvedetails.com/cve/CVE-2013-1763/
|
CWE-20
|
https://github.com/torvalds/linux/commit/6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0
|
6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0
|
sock_diag: Fix out-of-bounds access to sock_diag_handlers[]
Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
with a family greater or equal then AF_MAX -- the array size of
sock_diag_handlers[]. The current code does not test for this
condition therefore is vulnerable to an out-of-bound access opening
doors for a privilege escalation.
Signed-off-by: Mathias Krause <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static const inline struct sock_diag_handler *sock_diag_lock_handler(int family)
{
if (sock_diag_handlers[family] == NULL)
request_module("net-pf-%d-proto-%d-type-%d", PF_NETLINK,
NETLINK_SOCK_DIAG, family);
mutex_lock(&sock_diag_table_mutex);
return sock_diag_handlers[family];
}
|
static const inline struct sock_diag_handler *sock_diag_lock_handler(int family)
{
if (sock_diag_handlers[family] == NULL)
request_module("net-pf-%d-proto-%d-type-%d", PF_NETLINK,
NETLINK_SOCK_DIAG, family);
mutex_lock(&sock_diag_table_mutex);
return sock_diag_handlers[family];
}
|
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.