CVE ID
stringlengths 13
43
⌀ | CVE Page
stringlengths 45
48
⌀ | CWE ID
stringclasses 90
values | codeLink
stringlengths 46
139
| commit_id
stringlengths 6
81
| commit_message
stringlengths 3
13.3k
⌀ | func_after
stringlengths 14
241k
| func_before
stringlengths 14
241k
| lang
stringclasses 3
values | project
stringclasses 309
values | vul
int8 0
1
|
---|---|---|---|---|---|---|---|---|---|---|
CVE-2016-7166
|
https://www.cvedetails.com/cve/CVE-2016-7166/
|
CWE-399
|
https://github.com/libarchive/libarchive/commit/6e06b1c89dd0d16f74894eac4cfc1327a06ee4a0
|
6e06b1c89dd0d16f74894eac4cfc1327a06ee4a0
|
Fix a potential crash issue discovered by Alexander Cherepanov:
It seems bsdtar automatically handles stacked compression. This is a
nice feature but it could be problematic when it's completely
unlimited. Most clearly it's illustrated with quines:
$ curl -sRO http://www.maximumcompression.com/selfgz.gz
$ (ulimit -v 10000000 && bsdtar -tvf selfgz.gz)
bsdtar: Error opening archive: Can't allocate data for gzip decompression
Without ulimit, bsdtar will eat all available memory. This could also
be a problem for other applications using libarchive.
|
archive_read_set_switch_callback(struct archive *_a,
archive_switch_callback *client_switcher)
{
struct archive_read *a = (struct archive_read *)_a;
archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW,
"archive_read_set_switch_callback");
a->client.switcher = client_switcher;
return ARCHIVE_OK;
}
|
archive_read_set_switch_callback(struct archive *_a,
archive_switch_callback *client_switcher)
{
struct archive_read *a = (struct archive_read *)_a;
archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW,
"archive_read_set_switch_callback");
a->client.switcher = client_switcher;
return ARCHIVE_OK;
}
|
C
|
libarchive
| 0 |
CVE-2016-9557
|
https://www.cvedetails.com/cve/CVE-2016-9557/
|
CWE-190
|
https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a
|
d42b2388f7f8e0332c846675133acea151fc557a
|
The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now.
|
static int getint(jas_stream_t *in, int sgnd, int prec, long *val)
{
long v;
int n;
int c;
assert((!sgnd && prec >= 1) || (sgnd && prec >= 2));
n = (prec + 7) / 8;
v = 0;
while (--n >= 0) {
if ((c = jas_stream_getc(in)) == EOF)
return -1;
v = (v << 8) | c;
}
v &= ((1 << prec) - 1);
if (sgnd) {
*val = decode_twos_comp(v, prec);
} else {
*val = v;
}
return 0;
}
|
static int getint(jas_stream_t *in, int sgnd, int prec, long *val)
{
long v;
int n;
int c;
assert((!sgnd && prec >= 1) || (sgnd && prec >= 2));
n = (prec + 7) / 8;
v = 0;
while (--n >= 0) {
if ((c = jas_stream_getc(in)) == EOF)
return -1;
v = (v << 8) | c;
}
v &= ((1 << prec) - 1);
if (sgnd) {
*val = decode_twos_comp(v, prec);
} else {
*val = v;
}
return 0;
}
|
C
|
jasper
| 0 |
CVE-2018-1000039
|
https://www.cvedetails.com/cve/CVE-2018-1000039/
|
CWE-416
|
http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=4dcc6affe04368461310a21238f7e1871a752a05;hp=8ec561d1bccc46e9db40a9f61310cd8b3763914e
|
4dcc6affe04368461310a21238f7e1871a752a05
| null |
static void pdf_run_K(fz_context *ctx, pdf_processor *proc, float c, float m, float y, float k)
{
pdf_run_processor *pr = (pdf_run_processor *)proc;
float color[4] = {c, m, y, k};
pr->dev->flags &= ~FZ_DEVFLAG_STROKECOLOR_UNDEFINED;
pdf_set_colorspace(ctx, pr, PDF_STROKE, fz_device_cmyk(ctx));
pdf_set_color(ctx, pr, PDF_STROKE, color);
}
|
static void pdf_run_K(fz_context *ctx, pdf_processor *proc, float c, float m, float y, float k)
{
pdf_run_processor *pr = (pdf_run_processor *)proc;
float color[4] = {c, m, y, k};
pr->dev->flags &= ~FZ_DEVFLAG_STROKECOLOR_UNDEFINED;
pdf_set_colorspace(ctx, pr, PDF_STROKE, fz_device_cmyk(ctx));
pdf_set_color(ctx, pr, PDF_STROKE, color);
}
|
C
|
ghostscript
| 0 |
CVE-2019-1549
|
https://www.cvedetails.com/cve/CVE-2019-1549/
|
CWE-330
|
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
|
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
| null |
int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
{
*ret = InterlockedExchangeAdd(val, amount) + amount;
return 1;
}
|
int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
{
*ret = InterlockedExchangeAdd(val, amount) + amount;
return 1;
}
|
C
|
openssl
| 0 |
CVE-2011-2346
|
https://www.cvedetails.com/cve/CVE-2011-2346/
|
CWE-399
|
https://github.com/chromium/chromium/commit/dabd6f450e9594a8962ef6f79447a8bfdc1c9f05
|
dabd6f450e9594a8962ef6f79447a8bfdc1c9f05
|
wstring: remove wstring version of SplitString
Retry of r84336.
BUG=23581
Review URL: http://codereview.chromium.org/6930047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84355 0039d316-1c4b-4281-b951-d872f2087c98
|
void Label::SetColor(const SkColor& color) {
color_ = color;
}
|
void Label::SetColor(const SkColor& color) {
color_ = color;
}
|
C
|
Chrome
| 0 |
CVE-2015-1805
|
https://www.cvedetails.com/cve/CVE-2015-1805/
|
CWE-17
|
https://github.com/torvalds/linux/commit/f0d1bec9d58d4c038d0ac958c9af82be6eb18045
|
f0d1bec9d58d4c038d0ac958c9af82be6eb18045
|
new helper: copy_page_from_iter()
parallel to copy_page_to_iter(). pipe_write() switched to it (and became
->write_iter()).
Signed-off-by: Al Viro <[email protected]>
|
void iov_iter_init(struct iov_iter *i, int direction,
const struct iovec *iov, unsigned long nr_segs,
size_t count)
{
/* It will get better. Eventually... */
if (segment_eq(get_fs(), KERNEL_DS))
direction |= REQ_KERNEL;
i->type = direction;
i->iov = iov;
i->nr_segs = nr_segs;
i->iov_offset = 0;
i->count = count;
}
|
void iov_iter_init(struct iov_iter *i, int direction,
const struct iovec *iov, unsigned long nr_segs,
size_t count)
{
/* It will get better. Eventually... */
if (segment_eq(get_fs(), KERNEL_DS))
direction |= REQ_KERNEL;
i->type = direction;
i->iov = iov;
i->nr_segs = nr_segs;
i->iov_offset = 0;
i->count = count;
}
|
C
|
linux
| 0 |
CVE-2013-1826
|
https://www.cvedetails.com/cve/CVE-2013-1826/
| null |
https://github.com/torvalds/linux/commit/864745d291b5ba80ea0bd0edcbe67273de368836
|
864745d291b5ba80ea0bd0edcbe67273de368836
|
xfrm_user: return error pointer instead of NULL
When dump_one_state() returns an error, e.g. because of a too small
buffer to dump the whole xfrm state, xfrm_state_netlink() returns NULL
instead of an error pointer. But its callers expect an error pointer
and therefore continue to operate on a NULL skbuff.
This could lead to a privilege escalation (execution of user code in
kernel context) if the attacker has CAP_NET_ADMIN and is able to map
address 0.
Signed-off-by: Mathias Krause <[email protected]>
Acked-by: Steffen Klassert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static inline size_t xfrm_polexpire_msgsize(struct xfrm_policy *xp)
{
return NLMSG_ALIGN(sizeof(struct xfrm_user_polexpire))
+ nla_total_size(sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr)
+ nla_total_size(xfrm_user_sec_ctx_size(xp->security))
+ nla_total_size(sizeof(struct xfrm_mark))
+ userpolicy_type_attrsize();
}
|
static inline size_t xfrm_polexpire_msgsize(struct xfrm_policy *xp)
{
return NLMSG_ALIGN(sizeof(struct xfrm_user_polexpire))
+ nla_total_size(sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr)
+ nla_total_size(xfrm_user_sec_ctx_size(xp->security))
+ nla_total_size(sizeof(struct xfrm_mark))
+ userpolicy_type_attrsize();
}
|
C
|
linux
| 0 |
CVE-2013-4534
|
https://www.cvedetails.com/cve/CVE-2013-4534/
|
CWE-119
|
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=73d963c0a75cb99c6aaa3f6f25e427aa0b35a02e
|
17b297d84df619eaf0362531c707bde6e1b45287
| null |
static inline void IRQ_resetbit(IRQQueue *q, int n_IRQ)
{
clear_bit(n_IRQ, q->queue);
}
|
static inline void IRQ_resetbit(IRQQueue *q, int n_IRQ)
{
clear_bit(n_IRQ, q->queue);
}
|
C
|
qemu
| 0 |
CVE-2018-6096
|
https://www.cvedetails.com/cve/CVE-2018-6096/
| null |
https://github.com/chromium/chromium/commit/36f801fdbec07d116a6f4f07bb363f10897d6a51
|
36f801fdbec07d116a6f4f07bb363f10897d6a51
|
If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8fc017
Reviewed-on: https://chromium-review.googlesource.com/852378
Reviewed-by: Nasko Oskov <[email protected]>
Reviewed-by: Philip Jägenstedt <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#533790}
|
RenderFrameImpl::GetRemoteAssociatedInterfaces() {
if (!remote_associated_interfaces_) {
ChildThreadImpl* thread = ChildThreadImpl::current();
if (thread) {
mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces;
thread->GetRemoteRouteProvider()->GetRoute(
routing_id_, mojo::MakeRequest(&remote_interfaces));
remote_associated_interfaces_.reset(
new AssociatedInterfaceProviderImpl(std::move(remote_interfaces)));
} else {
remote_associated_interfaces_.reset(
new AssociatedInterfaceProviderImpl());
}
}
return remote_associated_interfaces_.get();
}
|
RenderFrameImpl::GetRemoteAssociatedInterfaces() {
if (!remote_associated_interfaces_) {
ChildThreadImpl* thread = ChildThreadImpl::current();
if (thread) {
mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces;
thread->GetRemoteRouteProvider()->GetRoute(
routing_id_, mojo::MakeRequest(&remote_interfaces));
remote_associated_interfaces_.reset(
new AssociatedInterfaceProviderImpl(std::move(remote_interfaces)));
} else {
remote_associated_interfaces_.reset(
new AssociatedInterfaceProviderImpl());
}
}
return remote_associated_interfaces_.get();
}
|
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}
|
OscillatorNode* BaseAudioContext::createOscillator(
ExceptionState& exception_state) {
DCHECK(IsMainThread());
return OscillatorNode::Create(*this, "sine", nullptr, exception_state);
}
|
OscillatorNode* BaseAudioContext::createOscillator(
ExceptionState& exception_state) {
DCHECK(IsMainThread());
return OscillatorNode::Create(*this, "sine", nullptr, exception_state);
}
|
C
|
Chrome
| 0 |
CVE-2012-3412
|
https://www.cvedetails.com/cve/CVE-2012-3412/
|
CWE-189
|
https://github.com/torvalds/linux/commit/68cb695ccecf949d48949e72f8ce591fdaaa325c
|
68cb695ccecf949d48949e72f8ce591fdaaa325c
|
sfc: Fix maximum number of TSO segments and minimum TX queue size
[ Upstream commit 7e6d06f0de3f74ca929441add094518ae332257c ]
Currently an skb requiring TSO may not fit within a minimum-size TX
queue. The TX queue selected for the skb may stall and trigger the TX
watchdog repeatedly (since the problem skb will be retried after the
TX reset). This issue is designated as CVE-2012-3412.
Set the maximum number of TSO segments for our devices to 100. This
should make no difference to behaviour unless the actual MSS is less
than about 700. Increase the minimum TX queue size accordingly to
allow for 2 worst-case skbs, so that there will definitely be space
to add an skb after we wake a queue.
To avoid invalidating existing configurations, change
efx_ethtool_set_ringparam() to fix up values that are too small rather
than returning -EINVAL.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
|
void efx_fini_tx_queue(struct efx_tx_queue *tx_queue)
{
if (!tx_queue->initialised)
return;
netif_dbg(tx_queue->efx, drv, tx_queue->efx->net_dev,
"shutting down TX queue %d\n", tx_queue->queue);
tx_queue->initialised = false;
/* Flush TX queue, remove descriptor ring */
efx_nic_fini_tx(tx_queue);
efx_release_tx_buffers(tx_queue);
/* Free up TSO header cache */
efx_fini_tso(tx_queue);
}
|
void efx_fini_tx_queue(struct efx_tx_queue *tx_queue)
{
if (!tx_queue->initialised)
return;
netif_dbg(tx_queue->efx, drv, tx_queue->efx->net_dev,
"shutting down TX queue %d\n", tx_queue->queue);
tx_queue->initialised = false;
/* Flush TX queue, remove descriptor ring */
efx_nic_fini_tx(tx_queue);
efx_release_tx_buffers(tx_queue);
/* Free up TSO header cache */
efx_fini_tso(tx_queue);
}
|
C
|
linux
| 0 |
CVE-2018-6041
|
https://www.cvedetails.com/cve/CVE-2018-6041/
|
CWE-20
|
https://github.com/chromium/chromium/commit/5cd363bc34f508c63b66e653bc41bd1783a4b711
|
5cd363bc34f508c63b66e653bc41bd1783a4b711
|
Fix issue with pending NavigationEntry being discarded incorrectly
This CL fixes an issue where we would attempt to discard a pending
NavigationEntry when a cross-process navigation to this NavigationEntry
is interrupted by another navigation to the same NavigationEntry.
BUG=760342,797656,796135
Change-Id: I204deff1efd4d572dd2e0b20e492592d48d787d9
Reviewed-on: https://chromium-review.googlesource.com/850877
Reviewed-by: Charlie Reis <[email protected]>
Commit-Queue: Camille Lamy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#528611}
|
RenderFrameHostManager::DetermineSiteInstanceForURL(
const GURL& dest_url,
SiteInstance* source_instance,
SiteInstance* current_instance,
SiteInstance* dest_instance,
ui::PageTransition transition,
bool dest_is_restore,
bool dest_is_view_source_mode,
bool force_browsing_instance_swap,
bool was_server_redirect) {
SiteInstanceImpl* current_instance_impl =
static_cast<SiteInstanceImpl*>(current_instance);
NavigationControllerImpl& controller =
delegate_->GetControllerForRenderManager();
BrowserContext* browser_context = controller.GetBrowserContext();
if (dest_instance) {
if (force_browsing_instance_swap) {
CHECK(!dest_instance->IsRelatedSiteInstance(
render_frame_host_->GetSiteInstance()));
}
return SiteInstanceDescriptor(dest_instance);
}
if (force_browsing_instance_swap)
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::UNRELATED);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kProcessPerSite) &&
ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_GENERATED)) {
return SiteInstanceDescriptor(current_instance_impl);
}
if (!frame_tree_node_->IsMainFrame()) {
SiteInstance* parent_site_instance =
frame_tree_node_->parent()->current_frame_host()->GetSiteInstance();
if (GetContentClient()->browser()->ShouldStayInParentProcessForNTP(
dest_url, parent_site_instance)) {
return SiteInstanceDescriptor(parent_site_instance);
}
}
if (!current_instance_impl->HasSite()) {
bool use_process_per_site =
RenderProcessHost::ShouldUseProcessPerSite(browser_context, dest_url) &&
RenderProcessHostImpl::GetProcessHostForSite(browser_context, dest_url);
if (current_instance_impl->HasRelatedSiteInstance(dest_url) ||
use_process_per_site) {
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::RELATED);
}
if (current_instance_impl->HasWrongProcessForURL(dest_url))
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::RELATED);
if (dest_is_view_source_mode)
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::UNRELATED);
if (WebUIControllerFactoryRegistry::GetInstance()->UseWebUIForURL(
browser_context, dest_url)) {
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::UNRELATED);
}
if (dest_is_restore && SiteInstanceImpl::ShouldAssignSiteForURL(dest_url))
current_instance_impl->SetSite(dest_url);
return SiteInstanceDescriptor(current_instance_impl);
}
NavigationEntry* current_entry = controller.GetLastCommittedEntry();
if (delegate_->GetInterstitialForRenderManager()) {
current_entry = controller.GetEntryAtOffset(-1);
}
if (current_entry &&
current_entry->IsViewSourceMode() != dest_is_view_source_mode &&
!IsRendererDebugURL(dest_url)) {
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::UNRELATED);
}
GURL about_blank(url::kAboutBlankURL);
GURL about_srcdoc(content::kAboutSrcDocURL);
bool dest_is_data_or_about = dest_url == about_srcdoc ||
dest_url == about_blank ||
dest_url.scheme() == url::kDataScheme;
if (source_instance && dest_is_data_or_about && !was_server_redirect)
return SiteInstanceDescriptor(source_instance);
if (IsCurrentlySameSite(render_frame_host_.get(), dest_url))
return SiteInstanceDescriptor(render_frame_host_->GetSiteInstance());
if (!frame_tree_node_->IsMainFrame()) {
RenderFrameHostImpl* main_frame =
frame_tree_node_->frame_tree()->root()->current_frame_host();
if (IsCurrentlySameSite(main_frame, dest_url))
return SiteInstanceDescriptor(main_frame->GetSiteInstance());
RenderFrameHostImpl* parent =
frame_tree_node_->parent()->current_frame_host();
if (IsCurrentlySameSite(parent, dest_url))
return SiteInstanceDescriptor(parent->GetSiteInstance());
}
if (frame_tree_node_->opener()) {
RenderFrameHostImpl* opener_frame =
frame_tree_node_->opener()->current_frame_host();
if (IsCurrentlySameSite(opener_frame, dest_url))
return SiteInstanceDescriptor(opener_frame->GetSiteInstance());
}
if (!frame_tree_node_->IsMainFrame() &&
SiteIsolationPolicy::IsTopDocumentIsolationEnabled() &&
!SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context,
dest_url)) {
if (GetContentClient()
->browser()
->ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
dest_url, current_instance)) {
return SiteInstanceDescriptor(render_frame_host_->GetSiteInstance());
}
return SiteInstanceDescriptor(
browser_context, dest_url,
SiteInstanceRelation::RELATED_DEFAULT_SUBFRAME);
}
if (!frame_tree_node_->IsMainFrame()) {
RenderFrameHostImpl* parent =
frame_tree_node_->parent()->current_frame_host();
bool dest_url_requires_dedicated_process =
SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context,
dest_url);
if (!parent->GetSiteInstance()->RequiresDedicatedProcess() &&
!dest_url_requires_dedicated_process) {
return SiteInstanceDescriptor(parent->GetSiteInstance());
}
}
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::RELATED);
}
|
RenderFrameHostManager::DetermineSiteInstanceForURL(
const GURL& dest_url,
SiteInstance* source_instance,
SiteInstance* current_instance,
SiteInstance* dest_instance,
ui::PageTransition transition,
bool dest_is_restore,
bool dest_is_view_source_mode,
bool force_browsing_instance_swap,
bool was_server_redirect) {
SiteInstanceImpl* current_instance_impl =
static_cast<SiteInstanceImpl*>(current_instance);
NavigationControllerImpl& controller =
delegate_->GetControllerForRenderManager();
BrowserContext* browser_context = controller.GetBrowserContext();
if (dest_instance) {
if (force_browsing_instance_swap) {
CHECK(!dest_instance->IsRelatedSiteInstance(
render_frame_host_->GetSiteInstance()));
}
return SiteInstanceDescriptor(dest_instance);
}
if (force_browsing_instance_swap)
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::UNRELATED);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kProcessPerSite) &&
ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_GENERATED)) {
return SiteInstanceDescriptor(current_instance_impl);
}
if (!frame_tree_node_->IsMainFrame()) {
SiteInstance* parent_site_instance =
frame_tree_node_->parent()->current_frame_host()->GetSiteInstance();
if (GetContentClient()->browser()->ShouldStayInParentProcessForNTP(
dest_url, parent_site_instance)) {
return SiteInstanceDescriptor(parent_site_instance);
}
}
if (!current_instance_impl->HasSite()) {
bool use_process_per_site =
RenderProcessHost::ShouldUseProcessPerSite(browser_context, dest_url) &&
RenderProcessHostImpl::GetProcessHostForSite(browser_context, dest_url);
if (current_instance_impl->HasRelatedSiteInstance(dest_url) ||
use_process_per_site) {
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::RELATED);
}
if (current_instance_impl->HasWrongProcessForURL(dest_url))
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::RELATED);
if (dest_is_view_source_mode)
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::UNRELATED);
if (WebUIControllerFactoryRegistry::GetInstance()->UseWebUIForURL(
browser_context, dest_url)) {
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::UNRELATED);
}
if (dest_is_restore && SiteInstanceImpl::ShouldAssignSiteForURL(dest_url))
current_instance_impl->SetSite(dest_url);
return SiteInstanceDescriptor(current_instance_impl);
}
NavigationEntry* current_entry = controller.GetLastCommittedEntry();
if (delegate_->GetInterstitialForRenderManager()) {
current_entry = controller.GetEntryAtOffset(-1);
}
if (current_entry &&
current_entry->IsViewSourceMode() != dest_is_view_source_mode &&
!IsRendererDebugURL(dest_url)) {
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::UNRELATED);
}
GURL about_blank(url::kAboutBlankURL);
GURL about_srcdoc(content::kAboutSrcDocURL);
bool dest_is_data_or_about = dest_url == about_srcdoc ||
dest_url == about_blank ||
dest_url.scheme() == url::kDataScheme;
if (source_instance && dest_is_data_or_about && !was_server_redirect)
return SiteInstanceDescriptor(source_instance);
if (IsCurrentlySameSite(render_frame_host_.get(), dest_url))
return SiteInstanceDescriptor(render_frame_host_->GetSiteInstance());
if (!frame_tree_node_->IsMainFrame()) {
RenderFrameHostImpl* main_frame =
frame_tree_node_->frame_tree()->root()->current_frame_host();
if (IsCurrentlySameSite(main_frame, dest_url))
return SiteInstanceDescriptor(main_frame->GetSiteInstance());
RenderFrameHostImpl* parent =
frame_tree_node_->parent()->current_frame_host();
if (IsCurrentlySameSite(parent, dest_url))
return SiteInstanceDescriptor(parent->GetSiteInstance());
}
if (frame_tree_node_->opener()) {
RenderFrameHostImpl* opener_frame =
frame_tree_node_->opener()->current_frame_host();
if (IsCurrentlySameSite(opener_frame, dest_url))
return SiteInstanceDescriptor(opener_frame->GetSiteInstance());
}
if (!frame_tree_node_->IsMainFrame() &&
SiteIsolationPolicy::IsTopDocumentIsolationEnabled() &&
!SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context,
dest_url)) {
if (GetContentClient()
->browser()
->ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
dest_url, current_instance)) {
return SiteInstanceDescriptor(render_frame_host_->GetSiteInstance());
}
return SiteInstanceDescriptor(
browser_context, dest_url,
SiteInstanceRelation::RELATED_DEFAULT_SUBFRAME);
}
if (!frame_tree_node_->IsMainFrame()) {
RenderFrameHostImpl* parent =
frame_tree_node_->parent()->current_frame_host();
bool dest_url_requires_dedicated_process =
SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context,
dest_url);
if (!parent->GetSiteInstance()->RequiresDedicatedProcess() &&
!dest_url_requires_dedicated_process) {
return SiteInstanceDescriptor(parent->GetSiteInstance());
}
}
return SiteInstanceDescriptor(browser_context, dest_url,
SiteInstanceRelation::RELATED);
}
|
C
|
Chrome
| 0 |
CVE-2015-1278
|
https://www.cvedetails.com/cve/CVE-2015-1278/
|
CWE-254
|
https://github.com/chromium/chromium/commit/784f56a9c97a838448dd23f9bdc7c05fe8e639b3
|
784f56a9c97a838448dd23f9bdc7c05fe8e639b3
|
Correctly reset FP in RFHI whenever origin changes
Bug: 713364
Change-Id: Id8bb923750e20f3db6fc9358b1d44120513ac95f
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Id8bb923750e20f3db6fc9358b1d44120513ac95f
Reviewed-on: https://chromium-review.googlesource.com/482380
Commit-Queue: Ian Clelland <[email protected]>
Reviewed-by: Charles Reis <[email protected]>
Cr-Commit-Position: refs/heads/master@{#466778}
|
void RenderFrameHostImpl::DidCancelPopupMenu() {
Send(new FrameMsg_SelectPopupMenuItem(routing_id_, -1));
}
|
void RenderFrameHostImpl::DidCancelPopupMenu() {
Send(new FrameMsg_SelectPopupMenuItem(routing_id_, -1));
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/b051cdb6465736e7233cd22b807e255554378206
|
b051cdb6465736e7233cd22b807e255554378206
|
OpenSSL: don't allow the server certificate to change during renegotiation.
This mirrors r229611, but for OpenSSL.
BUG=306959
Review URL: https://codereview.chromium.org/177143004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254022 0039d316-1c4b-4281-b951-d872f2087c98
|
void SSLClientSocketOpenSSL::GetSSLCertRequestInfo(
SSLCertRequestInfo* cert_request_info) {
cert_request_info->host_and_port = host_and_port_;
cert_request_info->cert_authorities = cert_authorities_;
}
|
void SSLClientSocketOpenSSL::GetSSLCertRequestInfo(
SSLCertRequestInfo* cert_request_info) {
cert_request_info->host_and_port = host_and_port_;
cert_request_info->cert_authorities = cert_authorities_;
}
|
C
|
Chrome
| 0 |
CVE-2016-2117
|
https://www.cvedetails.com/cve/CVE-2016-2117/
|
CWE-200
|
https://github.com/torvalds/linux/commit/f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
|
f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
|
atl2: Disable unimplemented scatter/gather feature
atl2 includes NETIF_F_SG in hw_features even though it has no support
for non-linear skbs. This bug was originally harmless since the
driver does not claim to implement checksum offload and that used to
be a requirement for SG.
Now that SG and checksum offload are independent features, if you
explicitly enable SG *and* use one of the rare protocols that can use
SG without checkusm offload, this potentially leaks sensitive
information (before you notice that it just isn't working). Therefore
this obscure bug has been designated CVE-2016-2117.
Reported-by: Justin Yackoski <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Fixes: ec5f06156423 ("net: Kill link between CSUM and SG features.")
Signed-off-by: David S. Miller <[email protected]>
|
static int atl2_get_eeprom(struct net_device *netdev,
struct ethtool_eeprom *eeprom, u8 *bytes)
{
struct atl2_adapter *adapter = netdev_priv(netdev);
struct atl2_hw *hw = &adapter->hw;
u32 *eeprom_buff;
int first_dword, last_dword;
int ret_val = 0;
int i;
if (eeprom->len == 0)
return -EINVAL;
if (atl2_check_eeprom_exist(hw))
return -EINVAL;
eeprom->magic = hw->vendor_id | (hw->device_id << 16);
first_dword = eeprom->offset >> 2;
last_dword = (eeprom->offset + eeprom->len - 1) >> 2;
eeprom_buff = kmalloc(sizeof(u32) * (last_dword - first_dword + 1),
GFP_KERNEL);
if (!eeprom_buff)
return -ENOMEM;
for (i = first_dword; i < last_dword; i++) {
if (!atl2_read_eeprom(hw, i*4, &(eeprom_buff[i-first_dword]))) {
ret_val = -EIO;
goto free;
}
}
memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 3),
eeprom->len);
free:
kfree(eeprom_buff);
return ret_val;
}
|
static int atl2_get_eeprom(struct net_device *netdev,
struct ethtool_eeprom *eeprom, u8 *bytes)
{
struct atl2_adapter *adapter = netdev_priv(netdev);
struct atl2_hw *hw = &adapter->hw;
u32 *eeprom_buff;
int first_dword, last_dword;
int ret_val = 0;
int i;
if (eeprom->len == 0)
return -EINVAL;
if (atl2_check_eeprom_exist(hw))
return -EINVAL;
eeprom->magic = hw->vendor_id | (hw->device_id << 16);
first_dword = eeprom->offset >> 2;
last_dword = (eeprom->offset + eeprom->len - 1) >> 2;
eeprom_buff = kmalloc(sizeof(u32) * (last_dword - first_dword + 1),
GFP_KERNEL);
if (!eeprom_buff)
return -ENOMEM;
for (i = first_dword; i < last_dword; i++) {
if (!atl2_read_eeprom(hw, i*4, &(eeprom_buff[i-first_dword]))) {
ret_val = -EIO;
goto free;
}
}
memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 3),
eeprom->len);
free:
kfree(eeprom_buff);
return ret_val;
}
|
C
|
linux
| 0 |
CVE-2018-12322
|
https://www.cvedetails.com/cve/CVE-2018-12322/
|
CWE-125
|
https://github.com/radare/radare2/commit/bbb4af56003c1afdad67af0c4339267ca38b1017
|
bbb4af56003c1afdad67af0c4339267ca38b1017
|
Fix #10294 - crash in r2_hoobr__6502_op
|
static int esil_6502_fini (RAnalEsil *esil) {
return true;
}
|
static int esil_6502_fini (RAnalEsil *esil) {
return true;
}
|
C
|
radare2
| 0 |
CVE-2018-18352
|
https://www.cvedetails.com/cve/CVE-2018-18352/
|
CWE-732
|
https://github.com/chromium/chromium/commit/a9cbaa7a40e2b2723cfc2f266c42f4980038a949
|
a9cbaa7a40e2b2723cfc2f266c42f4980038a949
|
Simplify "WouldTaintOrigin" concept in media/blink
Currently WebMediaPlayer has three predicates:
- DidGetOpaqueResponseFromServiceWorker
- HasSingleSecurityOrigin
- DidPassCORSAccessCheck
. These are used to determine whether the response body is available
for scripts. They are known to be confusing, and actually
MediaElementAudioSourceHandler::WouldTaintOrigin misuses them.
This CL merges the three predicates to one, WouldTaintOrigin, to remove
the confusion. Now the "response type" concept is available and we
don't need a custom CORS check, so this CL removes
BaseAudioContext::WouldTaintOrigin. This CL also renames
URLData::has_opaque_data_ and its (direct and indirect) data accessors
to match the spec.
Bug: 849942, 875153
Change-Id: I6acf50169d7445c4ff614e80ac606f79ee577d2a
Reviewed-on: https://chromium-review.googlesource.com/c/1238098
Reviewed-by: Fredrik Hubinette <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Raymond Toy <[email protected]>
Commit-Queue: Yutaka Hirano <[email protected]>
Cr-Commit-Position: refs/heads/master@{#598258}
|
void WebMediaPlayerImpl::OnProgress() {
DVLOG(4) << __func__;
if (highest_ready_state_ < ReadyState::kReadyStateHaveFutureData) {
preroll_attempt_pending_ = true;
preroll_attempt_start_time_ = base::TimeTicks();
delegate_->ClearStaleFlag(delegate_id_);
UpdatePlayState();
} else if (ready_state_ == ReadyState::kReadyStateHaveFutureData &&
CanPlayThrough()) {
SetReadyState(WebMediaPlayer::kReadyStateHaveEnoughData);
}
}
|
void WebMediaPlayerImpl::OnProgress() {
DVLOG(4) << __func__;
if (highest_ready_state_ < ReadyState::kReadyStateHaveFutureData) {
preroll_attempt_pending_ = true;
preroll_attempt_start_time_ = base::TimeTicks();
delegate_->ClearStaleFlag(delegate_id_);
UpdatePlayState();
} else if (ready_state_ == ReadyState::kReadyStateHaveFutureData &&
CanPlayThrough()) {
SetReadyState(WebMediaPlayer::kReadyStateHaveEnoughData);
}
}
|
C
|
Chrome
| 0 |
CVE-2011-3087
|
https://www.cvedetails.com/cve/CVE-2011-3087/
| null |
https://github.com/chromium/chromium/commit/58436a1770176ece2c02b28a57bba2a89db5d58b
|
58436a1770176ece2c02b28a57bba2a89db5d58b
|
Use a new scheme for swapping out RenderViews.
BUG=118664
TEST=none
Review URL: http://codereview.chromium.org/9720004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127986 0039d316-1c4b-4281-b951-d872f2087c98
|
void RegisterContentSchemes(const char** additional_savable_schemes) {
url_util::AddStandardScheme(chrome::kChromeDevToolsScheme);
url_util::AddStandardScheme(chrome::kChromeUIScheme);
url_util::AddStandardScheme(chrome::kMetadataScheme);
url_util::LockStandardSchemes();
if (additional_savable_schemes) {
int schemes = 0;
while (additional_savable_schemes[++schemes]);
g_savable_schemes = new char*[schemes + arraysize(kDefaultSavableSchemes)];
memcpy(g_savable_schemes,
kDefaultSavableSchemes,
arraysize(kDefaultSavableSchemes) * sizeof(char*));
for (int i = 0; i < schemes; ++i) {
g_savable_schemes[arraysize(kDefaultSavableSchemes) + i - 1] =
base::strdup(additional_savable_schemes[i]);
}
g_savable_schemes[arraysize(kDefaultSavableSchemes) + schemes - 1] = 0;
}
}
|
void RegisterContentSchemes(const char** additional_savable_schemes) {
url_util::AddStandardScheme(chrome::kChromeDevToolsScheme);
url_util::AddStandardScheme(chrome::kChromeUIScheme);
url_util::AddStandardScheme(chrome::kMetadataScheme);
url_util::LockStandardSchemes();
if (additional_savable_schemes) {
int schemes = 0;
while (additional_savable_schemes[++schemes]);
g_savable_schemes = new char*[schemes + arraysize(kDefaultSavableSchemes)];
memcpy(g_savable_schemes,
kDefaultSavableSchemes,
arraysize(kDefaultSavableSchemes) * sizeof(char*));
for (int i = 0; i < schemes; ++i) {
g_savable_schemes[arraysize(kDefaultSavableSchemes) + i - 1] =
base::strdup(additional_savable_schemes[i]);
}
g_savable_schemes[arraysize(kDefaultSavableSchemes) + schemes - 1] = 0;
}
}
|
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_get_uint32 (guint8 ** p_data, guint64 * p_size)
{
guint32 ret;
g_assert (*p_size >= 4);
ret = GST_READ_UINT32_LE (*p_data);
*p_data += sizeof (guint32);
*p_size -= sizeof (guint32);
return ret;
}
|
gst_asf_demux_get_uint32 (guint8 ** p_data, guint64 * p_size)
{
guint32 ret;
g_assert (*p_size >= 4);
ret = GST_READ_UINT32_LE (*p_data);
*p_data += sizeof (guint32);
*p_size -= sizeof (guint32);
return ret;
}
|
C
|
gst-plugins-ugly
| 0 |
CVE-2015-2304
|
https://www.cvedetails.com/cve/CVE-2015-2304/
|
CWE-22
|
https://github.com/libarchive/libarchive/commit/59357157706d47c365b2227739e17daba3607526
|
59357157706d47c365b2227739e17daba3607526
|
Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
This fixes a directory traversal in the cpio tool.
|
hfs_write_decmpfs_block(struct archive_write_disk *a, const char *buff,
size_t size)
{
const char *buffer_to_write;
size_t bytes_to_write;
int ret;
if (a->decmpfs_block_count == (unsigned)-1) {
void *new_block;
size_t new_size;
unsigned int block_count;
if (a->decmpfs_header_p == NULL) {
new_block = malloc(MAX_DECMPFS_XATTR_SIZE
+ sizeof(uint32_t));
if (new_block == NULL) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory for decmpfs");
return (ARCHIVE_FATAL);
}
a->decmpfs_header_p = new_block;
}
a->decmpfs_attr_size = DECMPFS_HEADER_SIZE;
archive_le32enc(&a->decmpfs_header_p[DECMPFS_COMPRESSION_MAGIC],
DECMPFS_MAGIC);
archive_le32enc(&a->decmpfs_header_p[DECMPFS_COMPRESSION_TYPE],
CMP_RESOURCE_FORK);
archive_le64enc(&a->decmpfs_header_p[DECMPFS_UNCOMPRESSED_SIZE],
a->filesize);
/* Calculate a block count of the file. */
block_count =
(a->filesize + MAX_DECMPFS_BLOCK_SIZE -1) /
MAX_DECMPFS_BLOCK_SIZE;
/*
* Allocate buffer for resource fork.
* Set up related pointers;
*/
new_size =
RSRC_H_SIZE + /* header */
4 + /* Block count */
(block_count * sizeof(uint32_t) * 2) +
RSRC_F_SIZE; /* footer */
if (new_size > a->resource_fork_allocated_size) {
new_block = realloc(a->resource_fork, new_size);
if (new_block == NULL) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory for ResourceFork");
return (ARCHIVE_FATAL);
}
a->resource_fork_allocated_size = new_size;
a->resource_fork = new_block;
}
/* Allocate uncompressed buffer */
if (a->uncompressed_buffer == NULL) {
new_block = malloc(MAX_DECMPFS_BLOCK_SIZE);
if (new_block == NULL) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory for decmpfs");
return (ARCHIVE_FATAL);
}
a->uncompressed_buffer = new_block;
}
a->block_remaining_bytes = MAX_DECMPFS_BLOCK_SIZE;
a->file_remaining_bytes = a->filesize;
a->compressed_buffer_remaining = a->compressed_buffer_size;
/*
* Set up a resource fork.
*/
a->rsrc_xattr_options = XATTR_CREATE;
/* Get the position where we are going to set a bunch
* of block info. */
a->decmpfs_block_info =
(uint32_t *)(a->resource_fork + RSRC_H_SIZE);
/* Set the block count to the resource fork. */
archive_le32enc(a->decmpfs_block_info++, block_count);
/* Get the position where we are goint to set compressed
* data. */
a->compressed_rsrc_position =
RSRC_H_SIZE + 4 + (block_count * 8);
a->compressed_rsrc_position_v = a->compressed_rsrc_position;
a->decmpfs_block_count = block_count;
}
/* Ignore redundant bytes. */
if (a->file_remaining_bytes == 0)
return ((ssize_t)size);
/* Do not overrun a block size. */
if (size > a->block_remaining_bytes)
bytes_to_write = a->block_remaining_bytes;
else
bytes_to_write = size;
/* Do not overrun the file size. */
if (bytes_to_write > a->file_remaining_bytes)
bytes_to_write = a->file_remaining_bytes;
/* For efficiency, if a copy length is full of the uncompressed
* buffer size, do not copy writing data to it. */
if (bytes_to_write == MAX_DECMPFS_BLOCK_SIZE)
buffer_to_write = buff;
else {
memcpy(a->uncompressed_buffer +
MAX_DECMPFS_BLOCK_SIZE - a->block_remaining_bytes,
buff, bytes_to_write);
buffer_to_write = a->uncompressed_buffer;
}
a->block_remaining_bytes -= bytes_to_write;
a->file_remaining_bytes -= bytes_to_write;
if (a->block_remaining_bytes == 0 || a->file_remaining_bytes == 0) {
ret = hfs_drive_compressor(a, buffer_to_write,
MAX_DECMPFS_BLOCK_SIZE - a->block_remaining_bytes);
if (ret < 0)
return (ret);
a->block_remaining_bytes = MAX_DECMPFS_BLOCK_SIZE;
}
/* Ignore redundant bytes. */
if (a->file_remaining_bytes == 0)
return ((ssize_t)size);
return (bytes_to_write);
}
|
hfs_write_decmpfs_block(struct archive_write_disk *a, const char *buff,
size_t size)
{
const char *buffer_to_write;
size_t bytes_to_write;
int ret;
if (a->decmpfs_block_count == (unsigned)-1) {
void *new_block;
size_t new_size;
unsigned int block_count;
if (a->decmpfs_header_p == NULL) {
new_block = malloc(MAX_DECMPFS_XATTR_SIZE
+ sizeof(uint32_t));
if (new_block == NULL) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory for decmpfs");
return (ARCHIVE_FATAL);
}
a->decmpfs_header_p = new_block;
}
a->decmpfs_attr_size = DECMPFS_HEADER_SIZE;
archive_le32enc(&a->decmpfs_header_p[DECMPFS_COMPRESSION_MAGIC],
DECMPFS_MAGIC);
archive_le32enc(&a->decmpfs_header_p[DECMPFS_COMPRESSION_TYPE],
CMP_RESOURCE_FORK);
archive_le64enc(&a->decmpfs_header_p[DECMPFS_UNCOMPRESSED_SIZE],
a->filesize);
/* Calculate a block count of the file. */
block_count =
(a->filesize + MAX_DECMPFS_BLOCK_SIZE -1) /
MAX_DECMPFS_BLOCK_SIZE;
/*
* Allocate buffer for resource fork.
* Set up related pointers;
*/
new_size =
RSRC_H_SIZE + /* header */
4 + /* Block count */
(block_count * sizeof(uint32_t) * 2) +
RSRC_F_SIZE; /* footer */
if (new_size > a->resource_fork_allocated_size) {
new_block = realloc(a->resource_fork, new_size);
if (new_block == NULL) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory for ResourceFork");
return (ARCHIVE_FATAL);
}
a->resource_fork_allocated_size = new_size;
a->resource_fork = new_block;
}
/* Allocate uncompressed buffer */
if (a->uncompressed_buffer == NULL) {
new_block = malloc(MAX_DECMPFS_BLOCK_SIZE);
if (new_block == NULL) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory for decmpfs");
return (ARCHIVE_FATAL);
}
a->uncompressed_buffer = new_block;
}
a->block_remaining_bytes = MAX_DECMPFS_BLOCK_SIZE;
a->file_remaining_bytes = a->filesize;
a->compressed_buffer_remaining = a->compressed_buffer_size;
/*
* Set up a resource fork.
*/
a->rsrc_xattr_options = XATTR_CREATE;
/* Get the position where we are going to set a bunch
* of block info. */
a->decmpfs_block_info =
(uint32_t *)(a->resource_fork + RSRC_H_SIZE);
/* Set the block count to the resource fork. */
archive_le32enc(a->decmpfs_block_info++, block_count);
/* Get the position where we are goint to set compressed
* data. */
a->compressed_rsrc_position =
RSRC_H_SIZE + 4 + (block_count * 8);
a->compressed_rsrc_position_v = a->compressed_rsrc_position;
a->decmpfs_block_count = block_count;
}
/* Ignore redundant bytes. */
if (a->file_remaining_bytes == 0)
return ((ssize_t)size);
/* Do not overrun a block size. */
if (size > a->block_remaining_bytes)
bytes_to_write = a->block_remaining_bytes;
else
bytes_to_write = size;
/* Do not overrun the file size. */
if (bytes_to_write > a->file_remaining_bytes)
bytes_to_write = a->file_remaining_bytes;
/* For efficiency, if a copy length is full of the uncompressed
* buffer size, do not copy writing data to it. */
if (bytes_to_write == MAX_DECMPFS_BLOCK_SIZE)
buffer_to_write = buff;
else {
memcpy(a->uncompressed_buffer +
MAX_DECMPFS_BLOCK_SIZE - a->block_remaining_bytes,
buff, bytes_to_write);
buffer_to_write = a->uncompressed_buffer;
}
a->block_remaining_bytes -= bytes_to_write;
a->file_remaining_bytes -= bytes_to_write;
if (a->block_remaining_bytes == 0 || a->file_remaining_bytes == 0) {
ret = hfs_drive_compressor(a, buffer_to_write,
MAX_DECMPFS_BLOCK_SIZE - a->block_remaining_bytes);
if (ret < 0)
return (ret);
a->block_remaining_bytes = MAX_DECMPFS_BLOCK_SIZE;
}
/* Ignore redundant bytes. */
if (a->file_remaining_bytes == 0)
return ((ssize_t)size);
return (bytes_to_write);
}
|
C
|
libarchive
| 0 |
CVE-2018-1000040
|
https://www.cvedetails.com/cve/CVE-2018-1000040/
|
CWE-20
|
http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=83d4dae44c71816c084a635550acc1a51529b881;hp=f597300439e62f5e921f0d7b1e880b5c1a1f1607
|
83d4dae44c71816c084a635550acc1a51529b881
| null |
icc_conv_color(fz_context *ctx, fz_color_converter *cc, float *dstv, const float *srcv)
{
const fz_colorspace *dsts = cc->ds;
int src_n = cc->n;
int dst_n = dsts->n;
fz_icclink *link = (fz_icclink *)cc->link;
int i;
unsigned short dstv_s[FZ_MAX_COLORS];
unsigned short srcv_s[FZ_MAX_COLORS];
/* Special case. Link is NULL if we are doing DeviceGray to CMYK */
if (link == NULL)
{
dstv[0] = 0;
dstv[1] = 0;
dstv[2] = 0;
dstv[3] = 1 - srcv[0];
}
else if (link->is_identity)
{
for (i = 0; i < src_n; i++)
dstv[i] = srcv[i];
}
else
{
for (i = 0; i < src_n; i++)
srcv_s[i] = srcv[i] * 65535;
fz_cmm_transform_color(ctx, link, dstv_s, srcv_s);
for (i = 0; i < dst_n; i++)
dstv[i] = fz_clamp((float) dstv_s[i] / 65535.0f, 0, 1);
}
}
|
icc_conv_color(fz_context *ctx, fz_color_converter *cc, float *dstv, const float *srcv)
{
const fz_colorspace *dsts = cc->ds;
int src_n = cc->n;
int dst_n = dsts->n;
fz_icclink *link = (fz_icclink *)cc->link;
int i;
unsigned short dstv_s[FZ_MAX_COLORS];
unsigned short srcv_s[FZ_MAX_COLORS];
/* Special case. Link is NULL if we are doing DeviceGray to CMYK */
if (link == NULL)
{
dstv[0] = 0;
dstv[1] = 0;
dstv[2] = 0;
dstv[3] = 1 - srcv[0];
}
else if (link->is_identity)
{
for (i = 0; i < src_n; i++)
dstv[i] = srcv[i];
}
else
{
for (i = 0; i < src_n; i++)
srcv_s[i] = srcv[i] * 65535;
fz_cmm_transform_color(ctx, link, dstv_s, srcv_s);
for (i = 0; i < dst_n; i++)
dstv[i] = fz_clamp((float) dstv_s[i] / 65535.0f, 0, 1);
}
}
|
C
|
ghostscript
| 0 |
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 stss_Read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
GF_SyncSampleBox *ptr = (GF_SyncSampleBox *)s;
ptr->nb_entries = gf_bs_read_u32(bs);
ISOM_DECREASE_SIZE(ptr, 4);
if (ptr->nb_entries > ptr->size / 4) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Invalid number of entries %d in stss\n", ptr->nb_entries));
return GF_ISOM_INVALID_FILE;
}
ptr->alloc_size = ptr->nb_entries;
ptr->sampleNumbers = (u32 *) gf_malloc( ptr->alloc_size * sizeof(u32));
if (ptr->sampleNumbers == NULL) return GF_OUT_OF_MEM;
for (i = 0; i < ptr->nb_entries; i++) {
ptr->sampleNumbers[i] = gf_bs_read_u32(bs);
}
return GF_OK;
}
|
GF_Err stss_Read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
GF_SyncSampleBox *ptr = (GF_SyncSampleBox *)s;
ptr->nb_entries = gf_bs_read_u32(bs);
ISOM_DECREASE_SIZE(ptr, 4);
if (ptr->nb_entries > ptr->size / 4) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Invalid number of entries %d in stss\n", ptr->nb_entries));
return GF_ISOM_INVALID_FILE;
}
ptr->alloc_size = ptr->nb_entries;
ptr->sampleNumbers = (u32 *) gf_malloc( ptr->alloc_size * sizeof(u32));
if (ptr->sampleNumbers == NULL) return GF_OUT_OF_MEM;
for (i = 0; i < ptr->nb_entries; i++) {
ptr->sampleNumbers[i] = gf_bs_read_u32(bs);
}
return GF_OK;
}
|
C
|
gpac
| 0 |
CVE-2016-8633
|
https://www.cvedetails.com/cve/CVE-2016-8633/
|
CWE-119
|
https://github.com/torvalds/linux/commit/667121ace9dbafb368618dbabcf07901c962ddac
|
667121ace9dbafb368618dbabcf07901c962ddac
|
firewire: net: guard against rx buffer overflows
The IP-over-1394 driver firewire-net lacked input validation when
handling incoming fragmented datagrams. A maliciously formed fragment
with a respectively large datagram_offset would cause a memcpy past the
datagram buffer.
So, drop any packets carrying a fragment with offset + length larger
than datagram_size.
In addition, ensure that
- GASP header, unfragmented encapsulation header, or fragment
encapsulation header actually exists before we access it,
- the encapsulated datagram or fragment is of nonzero size.
Reported-by: Eyal Itkin <[email protected]>
Reviewed-by: Eyal Itkin <[email protected]>
Fixes: CVE 2016-8633
Cc: [email protected]
Signed-off-by: Stefan Richter <[email protected]>
|
static int fwnet_add_peer(struct fwnet_device *dev,
struct fw_unit *unit, struct fw_device *device)
{
struct fwnet_peer *peer;
peer = kmalloc(sizeof(*peer), GFP_KERNEL);
if (!peer)
return -ENOMEM;
dev_set_drvdata(&unit->device, peer);
peer->dev = dev;
peer->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4];
INIT_LIST_HEAD(&peer->pd_list);
peer->pdg_size = 0;
peer->datagram_label = 0;
peer->speed = device->max_speed;
peer->max_payload = fwnet_max_payload(device->max_rec, peer->speed);
peer->generation = device->generation;
smp_rmb();
peer->node_id = device->node_id;
spin_lock_irq(&dev->lock);
list_add_tail(&peer->peer_link, &dev->peer_list);
dev->peer_count++;
set_carrier_state(dev);
spin_unlock_irq(&dev->lock);
return 0;
}
|
static int fwnet_add_peer(struct fwnet_device *dev,
struct fw_unit *unit, struct fw_device *device)
{
struct fwnet_peer *peer;
peer = kmalloc(sizeof(*peer), GFP_KERNEL);
if (!peer)
return -ENOMEM;
dev_set_drvdata(&unit->device, peer);
peer->dev = dev;
peer->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4];
INIT_LIST_HEAD(&peer->pd_list);
peer->pdg_size = 0;
peer->datagram_label = 0;
peer->speed = device->max_speed;
peer->max_payload = fwnet_max_payload(device->max_rec, peer->speed);
peer->generation = device->generation;
smp_rmb();
peer->node_id = device->node_id;
spin_lock_irq(&dev->lock);
list_add_tail(&peer->peer_link, &dev->peer_list);
dev->peer_count++;
set_carrier_state(dev);
spin_unlock_irq(&dev->lock);
return 0;
}
|
C
|
linux
| 0 |
CVE-2016-0815
|
https://www.cvedetails.com/cve/CVE-2016-0815/
|
CWE-20
|
https://android.googlesource.com/platform%2Fframeworks%2Fav/+/5403587a74aee2fb57076528c3927851531c8afb
|
5403587a74aee2fb57076528c3927851531c8afb
|
Fix out-of-bounds write
Bug: 26365349
Change-Id: Ia363d9f8c231cf255dea852e0bbf5ca466c7990b
|
status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
const void *esds_data, size_t esds_size) {
ESDS esds(esds_data, esds_size);
uint8_t objectTypeIndication;
if (esds.getObjectTypeIndication(&objectTypeIndication) != OK) {
return ERROR_MALFORMED;
}
if (objectTypeIndication == 0xe1) {
mLastTrack->meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_QCELP);
return OK;
}
if (objectTypeIndication == 0x6b) {
ALOGE("MP3 track in MP4/3GPP file is not supported");
return ERROR_UNSUPPORTED;
}
const uint8_t *csd;
size_t csd_size;
if (esds.getCodecSpecificInfo(
(const void **)&csd, &csd_size) != OK) {
return ERROR_MALFORMED;
}
#if 0
printf("ESD of size %d\n", csd_size);
hexdump(csd, csd_size);
#endif
if (csd_size == 0) {
return OK;
}
if (csd_size < 2) {
return ERROR_MALFORMED;
}
static uint32_t kSamplingRate[] = {
96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050,
16000, 12000, 11025, 8000, 7350
};
ABitReader br(csd, csd_size);
uint32_t objectType = br.getBits(5);
if (objectType == 31) { // AAC-ELD => additional 6 bits
objectType = 32 + br.getBits(6);
}
mLastTrack->meta->setInt32(kKeyAACAOT, objectType);
uint32_t freqIndex = br.getBits(4);
int32_t sampleRate = 0;
int32_t numChannels = 0;
if (freqIndex == 15) {
if (csd_size < 5) {
return ERROR_MALFORMED;
}
sampleRate = br.getBits(24);
numChannels = br.getBits(4);
} else {
numChannels = br.getBits(4);
if (freqIndex == 13 || freqIndex == 14) {
return ERROR_MALFORMED;
}
sampleRate = kSamplingRate[freqIndex];
}
if (objectType == 5 || objectType == 29) { // SBR specific config per 14496-3 table 1.13
uint32_t extFreqIndex = br.getBits(4);
int32_t extSampleRate;
if (extFreqIndex == 15) {
if (csd_size < 8) {
return ERROR_MALFORMED;
}
extSampleRate = br.getBits(24);
} else {
if (extFreqIndex == 13 || extFreqIndex == 14) {
return ERROR_MALFORMED;
}
extSampleRate = kSamplingRate[extFreqIndex];
}
}
if (numChannels == 0) {
return ERROR_UNSUPPORTED;
}
int32_t prevSampleRate;
CHECK(mLastTrack->meta->findInt32(kKeySampleRate, &prevSampleRate));
if (prevSampleRate != sampleRate) {
ALOGV("mpeg4 audio sample rate different from previous setting. "
"was: %d, now: %d", prevSampleRate, sampleRate);
}
mLastTrack->meta->setInt32(kKeySampleRate, sampleRate);
int32_t prevChannelCount;
CHECK(mLastTrack->meta->findInt32(kKeyChannelCount, &prevChannelCount));
if (prevChannelCount != numChannels) {
ALOGV("mpeg4 audio channel count different from previous setting. "
"was: %d, now: %d", prevChannelCount, numChannels);
}
mLastTrack->meta->setInt32(kKeyChannelCount, numChannels);
return OK;
}
|
status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
const void *esds_data, size_t esds_size) {
ESDS esds(esds_data, esds_size);
uint8_t objectTypeIndication;
if (esds.getObjectTypeIndication(&objectTypeIndication) != OK) {
return ERROR_MALFORMED;
}
if (objectTypeIndication == 0xe1) {
mLastTrack->meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_QCELP);
return OK;
}
if (objectTypeIndication == 0x6b) {
ALOGE("MP3 track in MP4/3GPP file is not supported");
return ERROR_UNSUPPORTED;
}
const uint8_t *csd;
size_t csd_size;
if (esds.getCodecSpecificInfo(
(const void **)&csd, &csd_size) != OK) {
return ERROR_MALFORMED;
}
#if 0
printf("ESD of size %d\n", csd_size);
hexdump(csd, csd_size);
#endif
if (csd_size == 0) {
return OK;
}
if (csd_size < 2) {
return ERROR_MALFORMED;
}
static uint32_t kSamplingRate[] = {
96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050,
16000, 12000, 11025, 8000, 7350
};
ABitReader br(csd, csd_size);
uint32_t objectType = br.getBits(5);
if (objectType == 31) { // AAC-ELD => additional 6 bits
objectType = 32 + br.getBits(6);
}
mLastTrack->meta->setInt32(kKeyAACAOT, objectType);
uint32_t freqIndex = br.getBits(4);
int32_t sampleRate = 0;
int32_t numChannels = 0;
if (freqIndex == 15) {
if (csd_size < 5) {
return ERROR_MALFORMED;
}
sampleRate = br.getBits(24);
numChannels = br.getBits(4);
} else {
numChannels = br.getBits(4);
if (freqIndex == 13 || freqIndex == 14) {
return ERROR_MALFORMED;
}
sampleRate = kSamplingRate[freqIndex];
}
if (objectType == 5 || objectType == 29) { // SBR specific config per 14496-3 table 1.13
uint32_t extFreqIndex = br.getBits(4);
int32_t extSampleRate;
if (extFreqIndex == 15) {
if (csd_size < 8) {
return ERROR_MALFORMED;
}
extSampleRate = br.getBits(24);
} else {
if (extFreqIndex == 13 || extFreqIndex == 14) {
return ERROR_MALFORMED;
}
extSampleRate = kSamplingRate[extFreqIndex];
}
}
if (numChannels == 0) {
return ERROR_UNSUPPORTED;
}
int32_t prevSampleRate;
CHECK(mLastTrack->meta->findInt32(kKeySampleRate, &prevSampleRate));
if (prevSampleRate != sampleRate) {
ALOGV("mpeg4 audio sample rate different from previous setting. "
"was: %d, now: %d", prevSampleRate, sampleRate);
}
mLastTrack->meta->setInt32(kKeySampleRate, sampleRate);
int32_t prevChannelCount;
CHECK(mLastTrack->meta->findInt32(kKeyChannelCount, &prevChannelCount));
if (prevChannelCount != numChannels) {
ALOGV("mpeg4 audio channel count different from previous setting. "
"was: %d, now: %d", prevChannelCount, numChannels);
}
mLastTrack->meta->setInt32(kKeyChannelCount, numChannels);
return OK;
}
|
C
|
Android
| 0 |
CVE-2017-18224
|
https://www.cvedetails.com/cve/CVE-2017-18224/
|
CWE-362
|
https://github.com/torvalds/linux/commit/3e4c56d41eef5595035872a2ec5a483f42e8917f
|
3e4c56d41eef5595035872a2ec5a483f42e8917f
|
ocfs2: ip_alloc_sem should be taken in ocfs2_get_block()
ip_alloc_sem should be taken in ocfs2_get_block() when reading file in
DIRECT mode to prevent concurrent access to extent tree with
ocfs2_dio_end_io_write(), which may cause BUGON in the following
situation:
read file 'A' end_io of writing file 'A'
vfs_read
__vfs_read
ocfs2_file_read_iter
generic_file_read_iter
ocfs2_direct_IO
__blockdev_direct_IO
do_blockdev_direct_IO
do_direct_IO
get_more_blocks
ocfs2_get_block
ocfs2_extent_map_get_blocks
ocfs2_get_clusters
ocfs2_get_clusters_nocache()
ocfs2_search_extent_list
return the index of record which
contains the v_cluster, that is
v_cluster > rec[i]->e_cpos.
ocfs2_dio_end_io
ocfs2_dio_end_io_write
down_write(&oi->ip_alloc_sem);
ocfs2_mark_extent_written
ocfs2_change_extent_flag
ocfs2_split_extent
...
--> modify the rec[i]->e_cpos, resulting
in v_cluster < rec[i]->e_cpos.
BUG_ON(v_cluster < le32_to_cpu(rec->e_cpos))
[[email protected]: v3]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Fixes: c15471f79506 ("ocfs2: fix sparse file & data ordering issue in direct io")
Signed-off-by: Alex Chen <[email protected]>
Reviewed-by: Jun Piao <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Reviewed-by: Gang He <[email protected]>
Acked-by: Changwei Ge <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
static int ocfs2_writepage(struct page *page, struct writeback_control *wbc)
{
trace_ocfs2_writepage(
(unsigned long long)OCFS2_I(page->mapping->host)->ip_blkno,
page->index);
return block_write_full_page(page, ocfs2_get_block, wbc);
}
|
static int ocfs2_writepage(struct page *page, struct writeback_control *wbc)
{
trace_ocfs2_writepage(
(unsigned long long)OCFS2_I(page->mapping->host)->ip_blkno,
page->index);
return block_write_full_page(page, ocfs2_get_block, wbc);
}
|
C
|
linux
| 0 |
CVE-2016-7970
|
https://www.cvedetails.com/cve/CVE-2016-7970/
|
CWE-119
|
https://github.com/libass/libass/pull/240/commits/08e754612019ed84d1db0d1fc4f5798248decd75
|
08e754612019ed84d1db0d1fc4f5798248decd75
|
Fix blur coefficient calculation buffer overflow
Found by fuzzer test case id:000082,sig:11,src:002579,op:havoc,rep:8.
Correctness should be checked, but this fixes the overflow for good.
|
static void coeff_filter(double *coeff, int n, const double kernel[4])
{
double prev1 = coeff[1], prev2 = coeff[2], prev3 = coeff[3];
for (int i = 0; i <= n; ++i) {
double res = coeff[i + 0] * kernel[0] +
(prev1 + coeff[i + 1]) * kernel[1] +
(prev2 + coeff[i + 2]) * kernel[2] +
(prev3 + coeff[i + 3]) * kernel[3];
prev3 = prev2;
prev2 = prev1;
prev1 = coeff[i];
coeff[i] = res;
}
}
|
static void coeff_filter(double *coeff, int n, const double kernel[4])
{
double prev1 = coeff[1], prev2 = coeff[2], prev3 = coeff[3];
for (int i = 0; i <= n; ++i) {
double res = coeff[i + 0] * kernel[0] +
(prev1 + coeff[i + 1]) * kernel[1] +
(prev2 + coeff[i + 2]) * kernel[2] +
(prev3 + coeff[i + 3]) * kernel[3];
prev3 = prev2;
prev2 = prev1;
prev1 = coeff[i];
coeff[i] = res;
}
}
|
C
|
libass
| 0 |
CVE-2015-1216
|
https://www.cvedetails.com/cve/CVE-2015-1216/
| null |
https://github.com/chromium/chromium/commit/82eeef54780833a29e88c5677a7cfa11205a9878
|
82eeef54780833a29e88c5677a7cfa11205a9878
|
Reload frame in V8Window::namedPropertyGetterCustom after js call
[email protected]
BUG=454954
Review URL: https://codereview.chromium.org/901053006
git-svn-id: svn://svn.chromium.org/blink/trunk@189574 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
v8::Handle<v8::Value> DialogHandler::returnValue() const
{
if (!m_scriptStateForDialogFrame)
return v8Undefined();
ASSERT(m_scriptStateForDialogFrame->contextIsValid());
v8::Isolate* isolate = m_scriptStateForDialogFrame->isolate();
v8::EscapableHandleScope handleScope(isolate);
ScriptState::Scope scope(m_scriptStateForDialogFrame.get());
v8::Local<v8::Value> returnValue = m_scriptStateForDialogFrame->context()->Global()->Get(v8AtomicString(isolate, "returnValue"));
if (returnValue.IsEmpty())
return v8Undefined();
return handleScope.Escape(returnValue);
}
|
v8::Handle<v8::Value> DialogHandler::returnValue() const
{
if (!m_scriptStateForDialogFrame)
return v8Undefined();
ASSERT(m_scriptStateForDialogFrame->contextIsValid());
v8::Isolate* isolate = m_scriptStateForDialogFrame->isolate();
v8::EscapableHandleScope handleScope(isolate);
ScriptState::Scope scope(m_scriptStateForDialogFrame.get());
v8::Local<v8::Value> returnValue = m_scriptStateForDialogFrame->context()->Global()->Get(v8AtomicString(isolate, "returnValue"));
if (returnValue.IsEmpty())
return v8Undefined();
return handleScope.Escape(returnValue);
}
|
C
|
Chrome
| 0 |
CVE-2018-6124
|
https://www.cvedetails.com/cve/CVE-2018-6124/
| null |
https://github.com/chromium/chromium/commit/7712d138374a92c4d2f3b05cdc86d1a7a523702b
|
7712d138374a92c4d2f3b05cdc86d1a7a523702b
|
ReadableStreamBytesConsumer should check read results
ReadableStreamBytesConsumer expected that the results from
ReadableStreamReaderDefaultRead should be Promise<Object> because that
is provided from ReadableStream provided by blink, but it's possible to
inject arbitrary values with the promise assimilation.
This CL adds additional checks for such injection.
Bug: 840320
Change-Id: I7b3c6a8bfcf563dd860b133ff0295dd7a5d5fea5
Reviewed-on: https://chromium-review.googlesource.com/1049413
Commit-Queue: Yutaka Hirano <[email protected]>
Reviewed-by: Adam Rice <[email protected]>
Cr-Commit-Position: refs/heads/master@{#556751}
|
static v8::Local<v8::Function> CreateFunction(
ScriptState* script_state,
ReadableStreamBytesConsumer* consumer) {
return (new OnFulfilled(script_state, consumer))->BindToV8Function();
}
|
static v8::Local<v8::Function> CreateFunction(
ScriptState* script_state,
ReadableStreamBytesConsumer* consumer) {
return (new OnFulfilled(script_state, consumer))->BindToV8Function();
}
|
C
|
Chrome
| 0 |
CVE-2017-6001
|
https://www.cvedetails.com/cve/CVE-2017-6001/
|
CWE-362
|
https://github.com/torvalds/linux/commit/321027c1fe77f892f4ea07846aeae08cefbbb290
|
321027c1fe77f892f4ea07846aeae08cefbbb290
|
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx locking")
... where, while we wait for a ctx->mutex acquisition, the event->ctx
relation can have changed under us.
That very same commit failed to recognise sys_perf_event_context() as an
external access vector to the events and thereby didn't apply the
established locking rules correctly.
So while one sys_perf_event_open() call is stuck waiting on
mutex_lock_double(), the other (which owns said locks) moves the group
about. So by the time the former sys_perf_event_open() acquires the
locks, the context we've acquired is stale (and possibly dead).
Apply the established locking rules as per perf_event_ctx_lock_nested()
to the mutex_lock_double() for the 'move_group' case. This obviously means
we need to validate state after we acquire the locks.
Reported-by: Di Shen (Keen Lab)
Tested-by: John Dias <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Min Chong <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vince Weaver <[email protected]>
Fixes: f63a8daa5812 ("perf: Fix event->ctx locking")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
|
static void _perf_event_disable(struct perf_event *event)
{
struct perf_event_context *ctx = event->ctx;
raw_spin_lock_irq(&ctx->lock);
if (event->state <= PERF_EVENT_STATE_OFF) {
raw_spin_unlock_irq(&ctx->lock);
return;
}
raw_spin_unlock_irq(&ctx->lock);
event_function_call(event, __perf_event_disable, NULL);
}
|
static void _perf_event_disable(struct perf_event *event)
{
struct perf_event_context *ctx = event->ctx;
raw_spin_lock_irq(&ctx->lock);
if (event->state <= PERF_EVENT_STATE_OFF) {
raw_spin_unlock_irq(&ctx->lock);
return;
}
raw_spin_unlock_irq(&ctx->lock);
event_function_call(event, __perf_event_disable, NULL);
}
|
C
|
linux
| 0 |
CVE-2016-4072
|
https://www.cvedetails.com/cve/CVE-2016-4072/
|
CWE-20
|
https://git.php.net/?p=php-src.git;a=commit;h=1e9b175204e3286d64dfd6c9f09151c31b5e099a
|
1e9b175204e3286d64dfd6c9f09151c31b5e099a
| null |
PHP_METHOD(Phar, canCompress)
{
zend_long method = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &method) == FAILURE) {
return;
}
phar_request_initialize();
switch (method) {
case PHAR_ENT_COMPRESSED_GZ:
if (PHAR_G(has_zlib)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
case PHAR_ENT_COMPRESSED_BZ2:
if (PHAR_G(has_bz2)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
default:
if (PHAR_G(has_zlib) || PHAR_G(has_bz2)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
}
}
|
PHP_METHOD(Phar, canCompress)
{
zend_long method = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &method) == FAILURE) {
return;
}
phar_request_initialize();
switch (method) {
case PHAR_ENT_COMPRESSED_GZ:
if (PHAR_G(has_zlib)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
case PHAR_ENT_COMPRESSED_BZ2:
if (PHAR_G(has_bz2)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
default:
if (PHAR_G(has_zlib) || PHAR_G(has_bz2)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
}
}
|
C
|
php
| 0 |
CVE-2018-6198
|
https://www.cvedetails.com/cve/CVE-2018-6198/
|
CWE-59
|
https://github.com/tats/w3m/commit/18dcbadf2771cdb0c18509b14e4e73505b242753
|
18dcbadf2771cdb0c18509b14e4e73505b242753
|
Make temporary directory safely when ~/.w3m is unwritable
|
cmd_loadBuffer(Buffer *buf, int prop, int linkid)
{
if (buf == NULL) {
disp_err_message("Can't load string", FALSE);
}
else if (buf != NO_BUFFER) {
buf->bufferprop |= (BP_INTERNAL | prop);
if (!(buf->bufferprop & BP_NO_URL))
copyParsedURL(&buf->currentURL, &Currentbuf->currentURL);
if (linkid != LB_NOLINK) {
buf->linkBuffer[REV_LB[linkid]] = Currentbuf;
Currentbuf->linkBuffer[linkid] = buf;
}
pushBuffer(buf);
}
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
|
cmd_loadBuffer(Buffer *buf, int prop, int linkid)
{
if (buf == NULL) {
disp_err_message("Can't load string", FALSE);
}
else if (buf != NO_BUFFER) {
buf->bufferprop |= (BP_INTERNAL | prop);
if (!(buf->bufferprop & BP_NO_URL))
copyParsedURL(&buf->currentURL, &Currentbuf->currentURL);
if (linkid != LB_NOLINK) {
buf->linkBuffer[REV_LB[linkid]] = Currentbuf;
Currentbuf->linkBuffer[linkid] = buf;
}
pushBuffer(buf);
}
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
|
C
|
w3m
| 0 |
CVE-2011-4029
|
https://www.cvedetails.com/cve/CVE-2011-4029/
|
CWE-362
|
https://cgit.freedesktop.org/xorg/xserver/commit/?id=b67581cf825940fdf52bf2e0af4330e695d724a4
|
b67581cf825940fdf52bf2e0af4330e695d724a4
| null |
void UseMsg(void)
{
ErrorF("use: X [:<display>] [option]\n");
ErrorF("-a # default pointer acceleration (factor)\n");
ErrorF("-ac disable access control restrictions\n");
ErrorF("-audit int set audit trail level\n");
ErrorF("-auth file select authorization file\n");
ErrorF("-br create root window with black background\n");
ErrorF("+bs enable any backing store support\n");
ErrorF("-bs disable any backing store support\n");
ErrorF("-c turns off key-click\n");
ErrorF("c # key-click volume (0-100)\n");
ErrorF("-cc int default color visual class\n");
ErrorF("-nocursor disable the cursor\n");
ErrorF("-core generate core dump on fatal error\n");
ErrorF("-dpi int screen resolution in dots per inch\n");
#ifdef DPMSExtension
ErrorF("-dpms disables VESA DPMS monitor control\n");
#endif
ErrorF("-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs\n");
ErrorF("-f # bell base (0-100)\n");
ErrorF("-fc string cursor font\n");
ErrorF("-fn string default font name\n");
ErrorF("-fp string default font path\n");
ErrorF("-help prints message with these options\n");
ErrorF("-I ignore all remaining arguments\n");
#ifdef RLIMIT_DATA
ErrorF("-ld int limit data space to N Kb\n");
#endif
#ifdef RLIMIT_NOFILE
ErrorF("-lf int limit number of open files to N\n");
#endif
#ifdef RLIMIT_STACK
ErrorF("-ls int limit stack space to N Kb\n");
#endif
ErrorF("-nolock disable the locking mechanism\n");
ErrorF("-nolisten string don't listen on protocol\n");
ErrorF("-noreset don't reset after last client exists\n");
ErrorF("-background [none] create root window with no background\n");
ErrorF("-reset reset after last client exists\n");
ErrorF("-p # screen-saver pattern duration (minutes)\n");
ErrorF("-pn accept failure to listen on all ports\n");
ErrorF("-nopn reject failure to listen on all ports\n");
ErrorF("-r turns off auto-repeat\n");
ErrorF("r turns on auto-repeat \n");
ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
ErrorF("-retro start with classic stipple and cursor\n");
ErrorF("-s # screen-saver timeout (minutes)\n");
ErrorF("-seat string seat to run on\n");
ErrorF("-t # default pointer threshold (pixels/t)\n");
ErrorF("-terminate terminate at server reset\n");
ErrorF("-to # connection time out\n");
ErrorF("-tst disable testing extensions\n");
ErrorF("ttyxx server started from init on /dev/ttyxx\n");
ErrorF("v video blanking for screen-saver\n");
ErrorF("-v screen-saver without video blanking\n");
ErrorF("-wm WhenMapped default backing-store\n");
ErrorF("-wr create root window with white background\n");
ErrorF("-maxbigreqsize set maximal bigrequest size \n");
#ifdef PANORAMIX
ErrorF("+xinerama Enable XINERAMA extension\n");
ErrorF("-xinerama Disable XINERAMA extension\n");
#endif
ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n");
ErrorF("-schedInterval int Set scheduler interval in msec\n");
ErrorF("-sigstop Enable SIGSTOP based startup\n");
ErrorF("+extension name Enable extension\n");
ErrorF("-extension name Disable extension\n");
#ifdef XDMCP
XdmcpUseMsg();
#endif
XkbUseMsg();
ddxUseMsg();
}
|
void UseMsg(void)
{
ErrorF("use: X [:<display>] [option]\n");
ErrorF("-a # default pointer acceleration (factor)\n");
ErrorF("-ac disable access control restrictions\n");
ErrorF("-audit int set audit trail level\n");
ErrorF("-auth file select authorization file\n");
ErrorF("-br create root window with black background\n");
ErrorF("+bs enable any backing store support\n");
ErrorF("-bs disable any backing store support\n");
ErrorF("-c turns off key-click\n");
ErrorF("c # key-click volume (0-100)\n");
ErrorF("-cc int default color visual class\n");
ErrorF("-nocursor disable the cursor\n");
ErrorF("-core generate core dump on fatal error\n");
ErrorF("-dpi int screen resolution in dots per inch\n");
#ifdef DPMSExtension
ErrorF("-dpms disables VESA DPMS monitor control\n");
#endif
ErrorF("-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs\n");
ErrorF("-f # bell base (0-100)\n");
ErrorF("-fc string cursor font\n");
ErrorF("-fn string default font name\n");
ErrorF("-fp string default font path\n");
ErrorF("-help prints message with these options\n");
ErrorF("-I ignore all remaining arguments\n");
#ifdef RLIMIT_DATA
ErrorF("-ld int limit data space to N Kb\n");
#endif
#ifdef RLIMIT_NOFILE
ErrorF("-lf int limit number of open files to N\n");
#endif
#ifdef RLIMIT_STACK
ErrorF("-ls int limit stack space to N Kb\n");
#endif
ErrorF("-nolock disable the locking mechanism\n");
ErrorF("-nolisten string don't listen on protocol\n");
ErrorF("-noreset don't reset after last client exists\n");
ErrorF("-background [none] create root window with no background\n");
ErrorF("-reset reset after last client exists\n");
ErrorF("-p # screen-saver pattern duration (minutes)\n");
ErrorF("-pn accept failure to listen on all ports\n");
ErrorF("-nopn reject failure to listen on all ports\n");
ErrorF("-r turns off auto-repeat\n");
ErrorF("r turns on auto-repeat \n");
ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
ErrorF("-retro start with classic stipple and cursor\n");
ErrorF("-s # screen-saver timeout (minutes)\n");
ErrorF("-seat string seat to run on\n");
ErrorF("-t # default pointer threshold (pixels/t)\n");
ErrorF("-terminate terminate at server reset\n");
ErrorF("-to # connection time out\n");
ErrorF("-tst disable testing extensions\n");
ErrorF("ttyxx server started from init on /dev/ttyxx\n");
ErrorF("v video blanking for screen-saver\n");
ErrorF("-v screen-saver without video blanking\n");
ErrorF("-wm WhenMapped default backing-store\n");
ErrorF("-wr create root window with white background\n");
ErrorF("-maxbigreqsize set maximal bigrequest size \n");
#ifdef PANORAMIX
ErrorF("+xinerama Enable XINERAMA extension\n");
ErrorF("-xinerama Disable XINERAMA extension\n");
#endif
ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n");
ErrorF("-schedInterval int Set scheduler interval in msec\n");
ErrorF("-sigstop Enable SIGSTOP based startup\n");
ErrorF("+extension name Enable extension\n");
ErrorF("-extension name Disable extension\n");
#ifdef XDMCP
XdmcpUseMsg();
#endif
XkbUseMsg();
ddxUseMsg();
}
|
C
|
xserver
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/8f883f2b12f68fed993671dce7fb5fb91f2229aa
|
8f883f2b12f68fed993671dce7fb5fb91f2229aa
|
Add more non client Windows messages to the list of messages not being sent to the renderer.
Turns out we get WM_NCLBUTTONDOWN/UP messages at times which go to the renderer and are not acked causing the
unresponsive renderer dialog to show up in Desktop Chrome Aura.
BUG=335248
[email protected]
TBR=jam
Review URL: https://codereview.chromium.org/141103004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245949 0039d316-1c4b-4281-b951-d872f2087c98
|
bool CanRendererHandleEvent(const ui::MouseEvent* event) {
if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED)
return false;
#if defined(OS_WIN)
switch (event->native_event().message) {
case WM_XBUTTONDOWN:
case WM_XBUTTONUP:
case WM_XBUTTONDBLCLK:
case WM_NCMOUSELEAVE:
case WM_NCMOUSEMOVE:
case WM_NCLBUTTONDOWN:
case WM_NCLBUTTONUP:
case WM_NCLBUTTONDBLCLK:
case WM_NCRBUTTONDOWN:
case WM_NCRBUTTONUP:
case WM_NCRBUTTONDBLCLK:
case WM_NCMBUTTONDOWN:
case WM_NCMBUTTONUP:
case WM_NCMBUTTONDBLCLK:
case WM_NCXBUTTONDOWN:
case WM_NCXBUTTONUP:
case WM_NCXBUTTONDBLCLK:
return false;
default:
break;
}
#endif
return true;
}
|
bool CanRendererHandleEvent(const ui::MouseEvent* event) {
if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED)
return false;
#if defined(OS_WIN)
switch (event->native_event().message) {
case WM_XBUTTONDOWN:
case WM_XBUTTONUP:
case WM_XBUTTONDBLCLK:
case WM_NCMOUSELEAVE:
case WM_NCMOUSEMOVE:
case WM_NCXBUTTONDOWN:
case WM_NCXBUTTONUP:
case WM_NCXBUTTONDBLCLK:
return false;
default:
break;
}
#endif
return true;
}
|
C
|
Chrome
| 1 |
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 VoidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "voidMethodUnsignedLongArg");
TestObject* impl = V8TestObject::ToImpl(info.Holder());
if (UNLIKELY(info.Length() < 1)) {
exception_state.ThrowTypeError(ExceptionMessages::NotEnoughArguments(1, info.Length()));
return;
}
uint32_t unsigned_long_arg;
unsigned_long_arg = NativeValueTraits<IDLUnsignedLong>::NativeValue(info.GetIsolate(), info[0], exception_state);
if (exception_state.HadException())
return;
impl->voidMethodUnsignedLongArg(unsigned_long_arg);
}
|
static void VoidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "voidMethodUnsignedLongArg");
TestObject* impl = V8TestObject::ToImpl(info.Holder());
if (UNLIKELY(info.Length() < 1)) {
exception_state.ThrowTypeError(ExceptionMessages::NotEnoughArguments(1, info.Length()));
return;
}
uint32_t unsigned_long_arg;
unsigned_long_arg = NativeValueTraits<IDLUnsignedLong>::NativeValue(info.GetIsolate(), info[0], exception_state);
if (exception_state.HadException())
return;
impl->voidMethodUnsignedLongArg(unsigned_long_arg);
}
|
C
|
Chrome
| 0 |
CVE-2012-2880
|
https://www.cvedetails.com/cve/CVE-2012-2880/
|
CWE-362
|
https://github.com/chromium/chromium/commit/fcd3a7a671ecf2d5f46ea34787d27507a914d2f5
|
fcd3a7a671ecf2d5f46ea34787d27507a914d2f5
|
[Sync] Cleanup all tab sync enabling logic now that its on by default.
BUG=none
TEST=
Review URL: https://chromiumcodereview.appspot.com/10443046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139462 0039d316-1c4b-4281-b951-d872f2087c98
|
DictionaryValue* AppSettingsToValue(
const sync_pb::AppNotificationSettings& proto) {
DictionaryValue* value = new DictionaryValue();
SET_BOOL(initial_setup_done);
SET_BOOL(disabled);
SET_STR(oauth_client_id);
return value;
}
|
DictionaryValue* AppSettingsToValue(
const sync_pb::AppNotificationSettings& proto) {
DictionaryValue* value = new DictionaryValue();
SET_BOOL(initial_setup_done);
SET_BOOL(disabled);
SET_STR(oauth_client_id);
return value;
}
|
C
|
Chrome
| 0 |
CVE-2015-1870
|
https://www.cvedetails.com/cve/CVE-2015-1870/
|
CWE-200
|
https://github.com/abrt/abrt/commit/8939398b82006ba1fec4ed491339fc075f43fc7c
|
8939398b82006ba1fec4ed491339fc075f43fc7c
|
make the dump directories owned by root by default
It was discovered that the abrt event scripts create a user-readable
copy of a sosreport file in abrt problem directories, and include
excerpts of /var/log/messages selected by the user-controlled process
name, leading to an information disclosure.
This issue was discovered by Florian Weimer of Red Hat Product Security.
Related: #1212868
Signed-off-by: Jakub Filak <[email protected]>
|
static gboolean key_value_ok(gchar *key, gchar *value)
{
char *i;
/* check key, it has to be valid filename and will end up in the
* bugzilla */
for (i = key; *i != 0; i++)
{
if (!isalpha(*i) && (*i != '-') && (*i != '_') && (*i != ' '))
return FALSE;
}
/* check value of 'basename', it has to be valid non-hidden directory
* name */
if (strcmp(key, "basename") == 0
|| strcmp(key, FILENAME_TYPE) == 0
)
{
if (!is_correct_filename(value))
{
error_msg("Value of '%s' ('%s') is not a valid directory name",
key, value);
return FALSE;
}
}
return TRUE;
}
|
static gboolean key_value_ok(gchar *key, gchar *value)
{
char *i;
/* check key, it has to be valid filename and will end up in the
* bugzilla */
for (i = key; *i != 0; i++)
{
if (!isalpha(*i) && (*i != '-') && (*i != '_') && (*i != ' '))
return FALSE;
}
/* check value of 'basename', it has to be valid non-hidden directory
* name */
if (strcmp(key, "basename") == 0
|| strcmp(key, FILENAME_TYPE) == 0
)
{
if (!is_correct_filename(value))
{
error_msg("Value of '%s' ('%s') is not a valid directory name",
key, value);
return FALSE;
}
}
return TRUE;
}
|
C
|
abrt
| 0 |
CVE-2014-9914
|
https://www.cvedetails.com/cve/CVE-2014-9914/
|
CWE-416
|
https://github.com/torvalds/linux/commit/9709674e68646cee5a24e3000b3558d25412203a
|
9709674e68646cee5a24e3000b3558d25412203a
|
ipv4: fix a race in ip4_datagram_release_cb()
Alexey gave a AddressSanitizer[1] report that finally gave a good hint
at where was the origin of various problems already reported by Dormando
in the past [2]
Problem comes from the fact that UDP can have a lockless TX path, and
concurrent threads can manipulate sk_dst_cache, while another thread,
is holding socket lock and calls __sk_dst_set() in
ip4_datagram_release_cb() (this was added in linux-3.8)
It seems that all we need to do is to use sk_dst_check() and
sk_dst_set() so that all the writers hold same spinlock
(sk->sk_dst_lock) to prevent corruptions.
TCP stack do not need this protection, as all sk_dst_cache writers hold
the socket lock.
[1]
https://code.google.com/p/address-sanitizer/wiki/AddressSanitizerForKernel
AddressSanitizer: heap-use-after-free in ipv4_dst_check
Read of size 2 by thread T15453:
[<ffffffff817daa3a>] ipv4_dst_check+0x1a/0x90 ./net/ipv4/route.c:1116
[<ffffffff8175b789>] __sk_dst_check+0x89/0xe0 ./net/core/sock.c:531
[<ffffffff81830a36>] ip4_datagram_release_cb+0x46/0x390 ??:0
[<ffffffff8175eaea>] release_sock+0x17a/0x230 ./net/core/sock.c:2413
[<ffffffff81830882>] ip4_datagram_connect+0x462/0x5d0 ??:0
[<ffffffff81846d06>] inet_dgram_connect+0x76/0xd0 ./net/ipv4/af_inet.c:534
[<ffffffff817580ac>] SYSC_connect+0x15c/0x1c0 ./net/socket.c:1701
[<ffffffff817596ce>] SyS_connect+0xe/0x10 ./net/socket.c:1682
[<ffffffff818b0a29>] system_call_fastpath+0x16/0x1b
./arch/x86/kernel/entry_64.S:629
Freed by thread T15455:
[<ffffffff8178d9b8>] dst_destroy+0xa8/0x160 ./net/core/dst.c:251
[<ffffffff8178de25>] dst_release+0x45/0x80 ./net/core/dst.c:280
[<ffffffff818304c1>] ip4_datagram_connect+0xa1/0x5d0 ??:0
[<ffffffff81846d06>] inet_dgram_connect+0x76/0xd0 ./net/ipv4/af_inet.c:534
[<ffffffff817580ac>] SYSC_connect+0x15c/0x1c0 ./net/socket.c:1701
[<ffffffff817596ce>] SyS_connect+0xe/0x10 ./net/socket.c:1682
[<ffffffff818b0a29>] system_call_fastpath+0x16/0x1b
./arch/x86/kernel/entry_64.S:629
Allocated by thread T15453:
[<ffffffff8178d291>] dst_alloc+0x81/0x2b0 ./net/core/dst.c:171
[<ffffffff817db3b7>] rt_dst_alloc+0x47/0x50 ./net/ipv4/route.c:1406
[< inlined >] __ip_route_output_key+0x3e8/0xf70
__mkroute_output ./net/ipv4/route.c:1939
[<ffffffff817dde08>] __ip_route_output_key+0x3e8/0xf70 ./net/ipv4/route.c:2161
[<ffffffff817deb34>] ip_route_output_flow+0x14/0x30 ./net/ipv4/route.c:2249
[<ffffffff81830737>] ip4_datagram_connect+0x317/0x5d0 ??:0
[<ffffffff81846d06>] inet_dgram_connect+0x76/0xd0 ./net/ipv4/af_inet.c:534
[<ffffffff817580ac>] SYSC_connect+0x15c/0x1c0 ./net/socket.c:1701
[<ffffffff817596ce>] SyS_connect+0xe/0x10 ./net/socket.c:1682
[<ffffffff818b0a29>] system_call_fastpath+0x16/0x1b
./arch/x86/kernel/entry_64.S:629
[2]
<4>[196727.311203] general protection fault: 0000 [#1] SMP
<4>[196727.311224] Modules linked in: xt_TEE xt_dscp xt_DSCP macvlan bridge coretemp crc32_pclmul ghash_clmulni_intel gpio_ich microcode ipmi_watchdog ipmi_devintf sb_edac edac_core lpc_ich mfd_core tpm_tis tpm tpm_bios ipmi_si ipmi_msghandler isci igb libsas i2c_algo_bit ixgbe ptp pps_core mdio
<4>[196727.311333] CPU: 17 PID: 0 Comm: swapper/17 Not tainted 3.10.26 #1
<4>[196727.311344] Hardware name: Supermicro X9DRi-LN4+/X9DR3-LN4+/X9DRi-LN4+/X9DR3-LN4+, BIOS 3.0 07/05/2013
<4>[196727.311364] task: ffff885e6f069700 ti: ffff885e6f072000 task.ti: ffff885e6f072000
<4>[196727.311377] RIP: 0010:[<ffffffff815f8c7f>] [<ffffffff815f8c7f>] ipv4_dst_destroy+0x4f/0x80
<4>[196727.311399] RSP: 0018:ffff885effd23a70 EFLAGS: 00010282
<4>[196727.311409] RAX: dead000000200200 RBX: ffff8854c398ecc0 RCX: 0000000000000040
<4>[196727.311423] RDX: dead000000100100 RSI: dead000000100100 RDI: dead000000200200
<4>[196727.311437] RBP: ffff885effd23a80 R08: ffffffff815fd9e0 R09: ffff885d5a590800
<4>[196727.311451] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
<4>[196727.311464] R13: ffffffff81c8c280 R14: 0000000000000000 R15: ffff880e85ee16ce
<4>[196727.311510] FS: 0000000000000000(0000) GS:ffff885effd20000(0000) knlGS:0000000000000000
<4>[196727.311554] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4>[196727.311581] CR2: 00007a46751eb000 CR3: 0000005e65688000 CR4: 00000000000407e0
<4>[196727.311625] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
<4>[196727.311669] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
<4>[196727.311713] Stack:
<4>[196727.311733] ffff8854c398ecc0 ffff8854c398ecc0 ffff885effd23ab0 ffffffff815b7f42
<4>[196727.311784] ffff88be6595bc00 ffff8854c398ecc0 0000000000000000 ffff8854c398ecc0
<4>[196727.311834] ffff885effd23ad0 ffffffff815b86c6 ffff885d5a590800 ffff8816827821c0
<4>[196727.311885] Call Trace:
<4>[196727.311907] <IRQ>
<4>[196727.311912] [<ffffffff815b7f42>] dst_destroy+0x32/0xe0
<4>[196727.311959] [<ffffffff815b86c6>] dst_release+0x56/0x80
<4>[196727.311986] [<ffffffff81620bd5>] tcp_v4_do_rcv+0x2a5/0x4a0
<4>[196727.312013] [<ffffffff81622b5a>] tcp_v4_rcv+0x7da/0x820
<4>[196727.312041] [<ffffffff815fd9e0>] ? ip_rcv_finish+0x360/0x360
<4>[196727.312070] [<ffffffff815de02d>] ? nf_hook_slow+0x7d/0x150
<4>[196727.312097] [<ffffffff815fd9e0>] ? ip_rcv_finish+0x360/0x360
<4>[196727.312125] [<ffffffff815fda92>] ip_local_deliver_finish+0xb2/0x230
<4>[196727.312154] [<ffffffff815fdd9a>] ip_local_deliver+0x4a/0x90
<4>[196727.312183] [<ffffffff815fd799>] ip_rcv_finish+0x119/0x360
<4>[196727.312212] [<ffffffff815fe00b>] ip_rcv+0x22b/0x340
<4>[196727.312242] [<ffffffffa0339680>] ? macvlan_broadcast+0x160/0x160 [macvlan]
<4>[196727.312275] [<ffffffff815b0c62>] __netif_receive_skb_core+0x512/0x640
<4>[196727.312308] [<ffffffff811427fb>] ? kmem_cache_alloc+0x13b/0x150
<4>[196727.312338] [<ffffffff815b0db1>] __netif_receive_skb+0x21/0x70
<4>[196727.312368] [<ffffffff815b0fa1>] netif_receive_skb+0x31/0xa0
<4>[196727.312397] [<ffffffff815b1ae8>] napi_gro_receive+0xe8/0x140
<4>[196727.312433] [<ffffffffa00274f1>] ixgbe_poll+0x551/0x11f0 [ixgbe]
<4>[196727.312463] [<ffffffff815fe00b>] ? ip_rcv+0x22b/0x340
<4>[196727.312491] [<ffffffff815b1691>] net_rx_action+0x111/0x210
<4>[196727.312521] [<ffffffff815b0db1>] ? __netif_receive_skb+0x21/0x70
<4>[196727.312552] [<ffffffff810519d0>] __do_softirq+0xd0/0x270
<4>[196727.312583] [<ffffffff816cef3c>] call_softirq+0x1c/0x30
<4>[196727.312613] [<ffffffff81004205>] do_softirq+0x55/0x90
<4>[196727.312640] [<ffffffff81051c85>] irq_exit+0x55/0x60
<4>[196727.312668] [<ffffffff816cf5c3>] do_IRQ+0x63/0xe0
<4>[196727.312696] [<ffffffff816c5aaa>] common_interrupt+0x6a/0x6a
<4>[196727.312722] <EOI>
<1>[196727.313071] RIP [<ffffffff815f8c7f>] ipv4_dst_destroy+0x4f/0x80
<4>[196727.313100] RSP <ffff885effd23a70>
<4>[196727.313377] ---[ end trace 64b3f14fae0f2e29 ]---
<0>[196727.380908] Kernel panic - not syncing: Fatal exception in interrupt
Reported-by: Alexey Preobrazhensky <[email protected]>
Reported-by: dormando <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Fixes: 8141ed9fcedb2 ("ipv4: Add a socket release callback for datagram sockets")
Cc: Steffen Klassert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{
struct inet_sock *inet = inet_sk(sk);
struct sockaddr_in *usin = (struct sockaddr_in *) uaddr;
struct flowi4 *fl4;
struct rtable *rt;
__be32 saddr;
int oif;
int err;
if (addr_len < sizeof(*usin))
return -EINVAL;
if (usin->sin_family != AF_INET)
return -EAFNOSUPPORT;
sk_dst_reset(sk);
lock_sock(sk);
oif = sk->sk_bound_dev_if;
saddr = inet->inet_saddr;
if (ipv4_is_multicast(usin->sin_addr.s_addr)) {
if (!oif)
oif = inet->mc_index;
if (!saddr)
saddr = inet->mc_addr;
}
fl4 = &inet->cork.fl.u.ip4;
rt = ip_route_connect(fl4, usin->sin_addr.s_addr, saddr,
RT_CONN_FLAGS(sk), oif,
sk->sk_protocol,
inet->inet_sport, usin->sin_port, sk);
if (IS_ERR(rt)) {
err = PTR_ERR(rt);
if (err == -ENETUNREACH)
IP_INC_STATS(sock_net(sk), IPSTATS_MIB_OUTNOROUTES);
goto out;
}
if ((rt->rt_flags & RTCF_BROADCAST) && !sock_flag(sk, SOCK_BROADCAST)) {
ip_rt_put(rt);
err = -EACCES;
goto out;
}
if (!inet->inet_saddr)
inet->inet_saddr = fl4->saddr; /* Update source address */
if (!inet->inet_rcv_saddr) {
inet->inet_rcv_saddr = fl4->saddr;
if (sk->sk_prot->rehash)
sk->sk_prot->rehash(sk);
}
inet->inet_daddr = fl4->daddr;
inet->inet_dport = usin->sin_port;
sk->sk_state = TCP_ESTABLISHED;
inet->inet_id = jiffies;
sk_dst_set(sk, &rt->dst);
err = 0;
out:
release_sock(sk);
return err;
}
|
int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{
struct inet_sock *inet = inet_sk(sk);
struct sockaddr_in *usin = (struct sockaddr_in *) uaddr;
struct flowi4 *fl4;
struct rtable *rt;
__be32 saddr;
int oif;
int err;
if (addr_len < sizeof(*usin))
return -EINVAL;
if (usin->sin_family != AF_INET)
return -EAFNOSUPPORT;
sk_dst_reset(sk);
lock_sock(sk);
oif = sk->sk_bound_dev_if;
saddr = inet->inet_saddr;
if (ipv4_is_multicast(usin->sin_addr.s_addr)) {
if (!oif)
oif = inet->mc_index;
if (!saddr)
saddr = inet->mc_addr;
}
fl4 = &inet->cork.fl.u.ip4;
rt = ip_route_connect(fl4, usin->sin_addr.s_addr, saddr,
RT_CONN_FLAGS(sk), oif,
sk->sk_protocol,
inet->inet_sport, usin->sin_port, sk);
if (IS_ERR(rt)) {
err = PTR_ERR(rt);
if (err == -ENETUNREACH)
IP_INC_STATS(sock_net(sk), IPSTATS_MIB_OUTNOROUTES);
goto out;
}
if ((rt->rt_flags & RTCF_BROADCAST) && !sock_flag(sk, SOCK_BROADCAST)) {
ip_rt_put(rt);
err = -EACCES;
goto out;
}
if (!inet->inet_saddr)
inet->inet_saddr = fl4->saddr; /* Update source address */
if (!inet->inet_rcv_saddr) {
inet->inet_rcv_saddr = fl4->saddr;
if (sk->sk_prot->rehash)
sk->sk_prot->rehash(sk);
}
inet->inet_daddr = fl4->daddr;
inet->inet_dport = usin->sin_port;
sk->sk_state = TCP_ESTABLISHED;
inet->inet_id = jiffies;
sk_dst_set(sk, &rt->dst);
err = 0;
out:
release_sock(sk);
return err;
}
|
C
|
linux
| 0 |
CVE-2015-8126
|
https://www.cvedetails.com/cve/CVE-2015-8126/
|
CWE-119
|
https://github.com/chromium/chromium/commit/7f3d85b096f66870a15b37c2f40b219b2e292693
|
7f3d85b096f66870a15b37c2f40b219b2e292693
|
third_party/libpng: update to 1.2.54
[email protected]
BUG=560291
Review URL: https://codereview.chromium.org/1467263003
Cr-Commit-Position: refs/heads/master@{#362298}
|
png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
{
/* This function is deprecated in favor of png_permit_mng_features()
and will be removed from libpng-1.3.0 */
png_debug(1, "in png_permit_empty_plte, DEPRECATED.");
if (png_ptr == NULL)
return;
png_ptr->mng_features_permitted = (png_byte)
((png_ptr->mng_features_permitted & (~PNG_FLAG_MNG_EMPTY_PLTE)) |
((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE)));
}
|
png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
{
/* This function is deprecated in favor of png_permit_mng_features()
and will be removed from libpng-1.3.0 */
png_debug(1, "in png_permit_empty_plte, DEPRECATED.");
if (png_ptr == NULL)
return;
png_ptr->mng_features_permitted = (png_byte)
((png_ptr->mng_features_permitted & (~PNG_FLAG_MNG_EMPTY_PLTE)) |
((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE)));
}
|
C
|
Chrome
| 0 |
CVE-2018-8087
|
https://www.cvedetails.com/cve/CVE-2018-8087/
|
CWE-772
|
https://github.com/torvalds/linux/commit/0ddcff49b672239dda94d70d0fcf50317a9f4b51
|
0ddcff49b672239dda94d70d0fcf50317a9f4b51
|
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
'hwname' is malloced in hwsim_new_radio_nl() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.
Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length")
Signed-off-by: Wei Yongjun <[email protected]>
Reviewed-by: Ben Hutchings <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
|
static void mac80211_hwsim_stop(struct ieee80211_hw *hw)
{
struct mac80211_hwsim_data *data = hw->priv;
data->started = false;
tasklet_hrtimer_cancel(&data->beacon_timer);
wiphy_dbg(hw->wiphy, "%s\n", __func__);
}
|
static void mac80211_hwsim_stop(struct ieee80211_hw *hw)
{
struct mac80211_hwsim_data *data = hw->priv;
data->started = false;
tasklet_hrtimer_cancel(&data->beacon_timer);
wiphy_dbg(hw->wiphy, "%s\n", __func__);
}
|
C
|
linux
| 0 |
CVE-2014-2972
|
https://www.cvedetails.com/cve/CVE-2014-2972/
|
CWE-189
|
https://git.exim.org/exim.git/commitdiff/7685ce68148a083d7759e78d01aa5198fc099c44
|
88a5ee399db9c15c2a94cd95aae6f364afab3249
| null |
cat_file(FILE *f, uschar *yield, int *sizep, int *ptrp, uschar *eol)
{
int eollen;
uschar buffer[1024];
eollen = (eol == NULL)? 0 : Ustrlen(eol);
while (Ufgets(buffer, sizeof(buffer), f) != NULL)
{
int len = Ustrlen(buffer);
if (eol != NULL && buffer[len-1] == '\n') len--;
yield = string_cat(yield, sizep, ptrp, buffer, len);
if (buffer[len] != 0)
yield = string_cat(yield, sizep, ptrp, eol, eollen);
}
if (yield != NULL) yield[*ptrp] = 0;
return yield;
}
|
cat_file(FILE *f, uschar *yield, int *sizep, int *ptrp, uschar *eol)
{
int eollen;
uschar buffer[1024];
eollen = (eol == NULL)? 0 : Ustrlen(eol);
while (Ufgets(buffer, sizeof(buffer), f) != NULL)
{
int len = Ustrlen(buffer);
if (eol != NULL && buffer[len-1] == '\n') len--;
yield = string_cat(yield, sizep, ptrp, buffer, len);
if (buffer[len] != 0)
yield = string_cat(yield, sizep, ptrp, eol, eollen);
}
if (yield != NULL) yield[*ptrp] = 0;
return yield;
}
|
C
|
exim
| 0 |
CVE-2017-6903
|
https://www.cvedetails.com/cve/CVE-2017-6903/
|
CWE-269
|
https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd
|
376267d534476a875d8b9228149c4ee18b74a4fd
|
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
|
void CL_InitServerInfo( serverInfo_t *server, netadr_t *address ) {
server->adr = *address;
server->clients = 0;
server->hostName[0] = '\0';
server->mapName[0] = '\0';
server->maxClients = 0;
server->maxPing = 0;
server->minPing = 0;
server->ping = -1;
server->game[0] = '\0';
server->gameType = 0;
server->netType = 0;
server->punkbuster = 0;
server->g_humanplayers = 0;
server->g_needpass = 0;
}
|
void CL_InitServerInfo( serverInfo_t *server, netadr_t *address ) {
server->adr = *address;
server->clients = 0;
server->hostName[0] = '\0';
server->mapName[0] = '\0';
server->maxClients = 0;
server->maxPing = 0;
server->minPing = 0;
server->ping = -1;
server->game[0] = '\0';
server->gameType = 0;
server->netType = 0;
server->punkbuster = 0;
server->g_humanplayers = 0;
server->g_needpass = 0;
}
|
C
|
OpenJK
| 0 |
CVE-2014-0143
|
https://www.cvedetails.com/cve/CVE-2014-0143/
|
CWE-190
|
https://git.qemu.org/?p=qemu.git;a=commit;h=8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
|
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
| null |
static int bdrv_is_whitelisted(BlockDriver *drv, bool read_only)
{
static const char *whitelist_rw[] = {
CONFIG_BDRV_RW_WHITELIST
};
static const char *whitelist_ro[] = {
CONFIG_BDRV_RO_WHITELIST
};
const char **p;
if (!whitelist_rw[0] && !whitelist_ro[0]) {
return 1; /* no whitelist, anything goes */
}
for (p = whitelist_rw; *p; p++) {
if (!strcmp(drv->format_name, *p)) {
return 1;
}
}
if (read_only) {
for (p = whitelist_ro; *p; p++) {
if (!strcmp(drv->format_name, *p)) {
return 1;
}
}
}
return 0;
}
|
static int bdrv_is_whitelisted(BlockDriver *drv, bool read_only)
{
static const char *whitelist_rw[] = {
CONFIG_BDRV_RW_WHITELIST
};
static const char *whitelist_ro[] = {
CONFIG_BDRV_RO_WHITELIST
};
const char **p;
if (!whitelist_rw[0] && !whitelist_ro[0]) {
return 1; /* no whitelist, anything goes */
}
for (p = whitelist_rw; *p; p++) {
if (!strcmp(drv->format_name, *p)) {
return 1;
}
}
if (read_only) {
for (p = whitelist_ro; *p; p++) {
if (!strcmp(drv->format_name, *p)) {
return 1;
}
}
}
return 0;
}
|
C
|
qemu
| 0 |
CVE-2017-18257
|
https://www.cvedetails.com/cve/CVE-2017-18257/
|
CWE-190
|
https://github.com/torvalds/linux/commit/b86e33075ed1909d8002745b56ecf73b833db143
|
b86e33075ed1909d8002745b56ecf73b833db143
|
f2fs: fix a dead loop in f2fs_fiemap()
A dead loop can be triggered in f2fs_fiemap() using the test case
as below:
...
fd = open();
fallocate(fd, 0, 0, 4294967296);
ioctl(fd, FS_IOC_FIEMAP, fiemap_buf);
...
It's caused by an overflow in __get_data_block():
...
bh->b_size = map.m_len << inode->i_blkbits;
...
map.m_len is an unsigned int, and bh->b_size is a size_t which is 64 bits
on 64 bits archtecture, type conversion from an unsigned int to a size_t
will result in an overflow.
In the above-mentioned case, bh->b_size will be zero, and f2fs_fiemap()
will call get_data_block() at block 0 again an again.
Fix this by adding a force conversion before left shift.
Signed-off-by: Wei Fang <[email protected]>
Acked-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
|
int f2fs_submit_page_mbio(struct f2fs_io_info *fio)
{
struct f2fs_sb_info *sbi = fio->sbi;
enum page_type btype = PAGE_TYPE_OF_BIO(fio->type);
struct f2fs_bio_info *io;
bool is_read = is_read_io(fio->op);
struct page *bio_page;
int err = 0;
io = is_read ? &sbi->read_io : &sbi->write_io[btype];
if (fio->old_blkaddr != NEW_ADDR)
verify_block_addr(sbi, fio->old_blkaddr);
verify_block_addr(sbi, fio->new_blkaddr);
bio_page = fio->encrypted_page ? fio->encrypted_page : fio->page;
if (!is_read)
inc_page_count(sbi, WB_DATA_TYPE(bio_page));
down_write(&io->io_rwsem);
if (io->bio && (io->last_block_in_bio != fio->new_blkaddr - 1 ||
(io->fio.op != fio->op || io->fio.op_flags != fio->op_flags) ||
!__same_bdev(sbi, fio->new_blkaddr, io->bio)))
__submit_merged_bio(io);
alloc_new:
if (io->bio == NULL) {
if ((fio->type == DATA || fio->type == NODE) &&
fio->new_blkaddr & F2FS_IO_SIZE_MASK(sbi)) {
err = -EAGAIN;
dec_page_count(sbi, WB_DATA_TYPE(bio_page));
goto out_fail;
}
io->bio = __bio_alloc(sbi, fio->new_blkaddr,
BIO_MAX_PAGES, is_read);
io->fio = *fio;
}
if (bio_add_page(io->bio, bio_page, PAGE_SIZE, 0) <
PAGE_SIZE) {
__submit_merged_bio(io);
goto alloc_new;
}
io->last_block_in_bio = fio->new_blkaddr;
f2fs_trace_ios(fio, 0);
out_fail:
up_write(&io->io_rwsem);
trace_f2fs_submit_page_mbio(fio->page, fio);
return err;
}
|
int f2fs_submit_page_mbio(struct f2fs_io_info *fio)
{
struct f2fs_sb_info *sbi = fio->sbi;
enum page_type btype = PAGE_TYPE_OF_BIO(fio->type);
struct f2fs_bio_info *io;
bool is_read = is_read_io(fio->op);
struct page *bio_page;
int err = 0;
io = is_read ? &sbi->read_io : &sbi->write_io[btype];
if (fio->old_blkaddr != NEW_ADDR)
verify_block_addr(sbi, fio->old_blkaddr);
verify_block_addr(sbi, fio->new_blkaddr);
bio_page = fio->encrypted_page ? fio->encrypted_page : fio->page;
if (!is_read)
inc_page_count(sbi, WB_DATA_TYPE(bio_page));
down_write(&io->io_rwsem);
if (io->bio && (io->last_block_in_bio != fio->new_blkaddr - 1 ||
(io->fio.op != fio->op || io->fio.op_flags != fio->op_flags) ||
!__same_bdev(sbi, fio->new_blkaddr, io->bio)))
__submit_merged_bio(io);
alloc_new:
if (io->bio == NULL) {
if ((fio->type == DATA || fio->type == NODE) &&
fio->new_blkaddr & F2FS_IO_SIZE_MASK(sbi)) {
err = -EAGAIN;
dec_page_count(sbi, WB_DATA_TYPE(bio_page));
goto out_fail;
}
io->bio = __bio_alloc(sbi, fio->new_blkaddr,
BIO_MAX_PAGES, is_read);
io->fio = *fio;
}
if (bio_add_page(io->bio, bio_page, PAGE_SIZE, 0) <
PAGE_SIZE) {
__submit_merged_bio(io);
goto alloc_new;
}
io->last_block_in_bio = fio->new_blkaddr;
f2fs_trace_ios(fio, 0);
out_fail:
up_write(&io->io_rwsem);
trace_f2fs_submit_page_mbio(fio->page, fio);
return err;
}
|
C
|
linux
| 0 |
CVE-2016-3751
|
https://www.cvedetails.com/cve/CVE-2016-3751/
| null |
https://android.googlesource.com/platform/external/libpng/+/9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
DO NOT MERGE Update libpng to 1.6.20
BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082024b669fa508931042eed18f82)
|
gpc_b16g(Pixel *out, const Pixel *in, const Background *back)
{
if (in->a <= 0)
out->r = out->g = out->b = back->ig;
else
{
double a = in->a/65535.;
double a1 = 1-a;
a /= 65535;
out->r = out->g = out->b = sRGB(in->g * a + back->dg * a1);
}
out->a = 255;
}
|
gpc_b16g(Pixel *out, const Pixel *in, const Background *back)
{
if (in->a <= 0)
out->r = out->g = out->b = back->ig;
else
{
double a = in->a/65535.;
double a1 = 1-a;
a /= 65535;
out->r = out->g = out->b = sRGB(in->g * a + back->dg * a1);
}
out->a = 255;
}
|
C
|
Android
| 0 |
CVE-2014-3167
|
https://www.cvedetails.com/cve/CVE-2014-3167/
| null |
https://github.com/chromium/chromium/commit/44f1431b20c16d8f8da0ce8ff7bbf2adddcdd785
|
44f1431b20c16d8f8da0ce8ff7bbf2adddcdd785
|
Avoid using forced layout to trigger paint invalidation for SVG containers
Currently, SVG containers in the LayoutObject hierarchy force layout of
their children if the transform changes. The main reason for this is to
trigger paint invalidation of the subtree. In some cases - changes to the
scale factor - there are other reasons to trigger layout, like computing
a new scale factor for <text> or re-layout nodes with non-scaling stroke.
Compute a "scale-factor change" in addition to the "transform change"
already computed, then use this new signal to determine if layout should
be forced for the subtree. Trigger paint invalidation using the
LayoutObject flags instead.
The downside to this is that paint invalidation will walk into "hidden"
containers which rarely require repaint (since they are not technically
visible). This will hopefully be rectified in a follow-up CL.
For the testcase from 603850, this essentially eliminates the cost of
layout (from ~350ms to ~0ms on authors machine; layout cost is related
to text metrics recalculation), bumping frame rate significantly.
BUG=603956,603850
Review-Url: https://codereview.chromium.org/1996543002
Cr-Commit-Position: refs/heads/master@{#400950}
|
SubtreeContentTransformScope::~SubtreeContentTransformScope()
{
m_savedContentTransformation.copyTransformTo(s_currentContentTransformation);
}
|
SubtreeContentTransformScope::~SubtreeContentTransformScope()
{
m_savedContentTransformation.copyTransformTo(s_currentContentTransformation);
}
|
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 int ecb_arc4_crypt(struct blkcipher_desc *desc, struct scatterlist *dst,
struct scatterlist *src, unsigned int nbytes)
{
struct arc4_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
struct blkcipher_walk walk;
int err;
blkcipher_walk_init(&walk, dst, src, nbytes);
err = blkcipher_walk_virt(desc, &walk);
while (walk.nbytes > 0) {
u8 *wsrc = walk.src.virt.addr;
u8 *wdst = walk.dst.virt.addr;
arc4_crypt(ctx, wdst, wsrc, walk.nbytes);
err = blkcipher_walk_done(desc, &walk, 0);
}
return err;
}
|
static int ecb_arc4_crypt(struct blkcipher_desc *desc, struct scatterlist *dst,
struct scatterlist *src, unsigned int nbytes)
{
struct arc4_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
struct blkcipher_walk walk;
int err;
blkcipher_walk_init(&walk, dst, src, nbytes);
err = blkcipher_walk_virt(desc, &walk);
while (walk.nbytes > 0) {
u8 *wsrc = walk.src.virt.addr;
u8 *wdst = walk.dst.virt.addr;
arc4_crypt(ctx, wdst, wsrc, walk.nbytes);
err = blkcipher_walk_done(desc, &walk, 0);
}
return err;
}
|
C
|
linux
| 0 |
CVE-2015-6763
|
https://www.cvedetails.com/cve/CVE-2015-6763/
| null |
https://github.com/chromium/chromium/commit/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables secure text input
when activated and it's in the secure text entry mode.
RenderWidgetHostViewMac did the similar thing for ages following the
WebKit example.
views::Textfield needs to do the same thing in a fashion that's
sycnrhonized with RenderWidgetHostViewMac, otherwise the race conditions
are possible when the Textfield gets focus, activates the secure text
input mode and the RWHVM loses focus immediately afterwards and disables
the secure text input instead of leaving it in the enabled state.
BUG=818133,677220
Change-Id: I6db6c4b59e4a1a72cbb7f8c7056f71b04a3df08b
Reviewed-on: https://chromium-review.googlesource.com/943064
Commit-Queue: Michail Pishchagin <[email protected]>
Reviewed-by: Pavel Feldman <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Peter Kasting <[email protected]>
Cr-Commit-Position: refs/heads/master@{#542517}
|
void FrameSelection::MoveRangeSelectionExtent(const IntPoint& contents_point) {
if (ComputeVisibleSelectionInDOMTree().IsNone())
return;
SetSelection(
SelectionInDOMTree::Builder(
GetGranularityStrategy()->UpdateExtent(contents_point, frame_))
.Build(),
SetSelectionOptions::Builder()
.SetShouldCloseTyping(true)
.SetShouldClearTypingStyle(true)
.SetDoNotClearStrategy(true)
.SetSetSelectionBy(SetSelectionBy::kUser)
.SetShouldShowHandle(true)
.Build());
}
|
void FrameSelection::MoveRangeSelectionExtent(const IntPoint& contents_point) {
if (ComputeVisibleSelectionInDOMTree().IsNone())
return;
SetSelection(
SelectionInDOMTree::Builder(
GetGranularityStrategy()->UpdateExtent(contents_point, frame_))
.Build(),
SetSelectionOptions::Builder()
.SetShouldCloseTyping(true)
.SetShouldClearTypingStyle(true)
.SetDoNotClearStrategy(true)
.SetSetSelectionBy(SetSelectionBy::kUser)
.SetShouldShowHandle(true)
.Build());
}
|
C
|
Chrome
| 0 |
CVE-2018-18352
|
https://www.cvedetails.com/cve/CVE-2018-18352/
|
CWE-732
|
https://github.com/chromium/chromium/commit/a9cbaa7a40e2b2723cfc2f266c42f4980038a949
|
a9cbaa7a40e2b2723cfc2f266c42f4980038a949
|
Simplify "WouldTaintOrigin" concept in media/blink
Currently WebMediaPlayer has three predicates:
- DidGetOpaqueResponseFromServiceWorker
- HasSingleSecurityOrigin
- DidPassCORSAccessCheck
. These are used to determine whether the response body is available
for scripts. They are known to be confusing, and actually
MediaElementAudioSourceHandler::WouldTaintOrigin misuses them.
This CL merges the three predicates to one, WouldTaintOrigin, to remove
the confusion. Now the "response type" concept is available and we
don't need a custom CORS check, so this CL removes
BaseAudioContext::WouldTaintOrigin. This CL also renames
URLData::has_opaque_data_ and its (direct and indirect) data accessors
to match the spec.
Bug: 849942, 875153
Change-Id: I6acf50169d7445c4ff614e80ac606f79ee577d2a
Reviewed-on: https://chromium-review.googlesource.com/c/1238098
Reviewed-by: Fredrik Hubinette <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Raymond Toy <[email protected]>
Commit-Queue: Yutaka Hirano <[email protected]>
Cr-Commit-Position: refs/heads/master@{#598258}
|
bool BaseAudioContext::WouldTaintOrigin(const KURL& url) const {
|
bool BaseAudioContext::WouldTaintOrigin(const KURL& url) const {
if (url.ProtocolIsData()) {
return false;
}
Document* document = GetDocument();
if (document && document->GetSecurityOrigin()) {
return !document->GetSecurityOrigin()->CanRequest(url);
}
return true;
}
|
C
|
Chrome
| 1 |
CVE-2013-1797
|
https://www.cvedetails.com/cve/CVE-2013-1797/
|
CWE-399
|
https://github.com/torvalds/linux/commit/0b79459b482e85cb7426aa7da683a9f2c97aeae1
|
0b79459b482e85cb7426aa7da683a9f2c97aeae1
|
KVM: x86: Convert MSR_KVM_SYSTEM_TIME to use gfn_to_hva_cache functions (CVE-2013-1797)
There is a potential use after free issue with the handling of
MSR_KVM_SYSTEM_TIME. If the guest specifies a GPA in a movable or removable
memory such as frame buffers then KVM might continue to write to that
address even after it's removed via KVM_SET_USER_MEMORY_REGION. KVM pins
the page in memory so it's unlikely to cause an issue, but if the user
space component re-purposes the memory previously used for the guest, then
the guest will be able to corrupt that memory.
Tested: Tested against kvmclock unit test
Signed-off-by: Andrew Honig <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
|
static void update_eoi_exitmap(struct kvm_vcpu *vcpu)
{
u64 eoi_exit_bitmap[4];
memset(eoi_exit_bitmap, 0, 32);
kvm_ioapic_calculate_eoi_exitmap(vcpu, eoi_exit_bitmap);
kvm_x86_ops->load_eoi_exitmap(vcpu, eoi_exit_bitmap);
}
|
static void update_eoi_exitmap(struct kvm_vcpu *vcpu)
{
u64 eoi_exit_bitmap[4];
memset(eoi_exit_bitmap, 0, 32);
kvm_ioapic_calculate_eoi_exitmap(vcpu, eoi_exit_bitmap);
kvm_x86_ops->load_eoi_exitmap(vcpu, eoi_exit_bitmap);
}
|
C
|
linux
| 0 |
CVE-2013-6643
|
https://www.cvedetails.com/cve/CVE-2013-6643/
|
CWE-287
|
https://github.com/chromium/chromium/commit/fc343fd48badc0158dc2bb763e9a8b9342f3cb6f
|
fc343fd48badc0158dc2bb763e9a8b9342f3cb6f
|
Fix a crash when a form control is in a past naems map of a demoted form element.
Note that we wanted to add the protector in FormAssociatedElement::setForm(),
but we couldn't do it because it is called from the constructor.
BUG=326854
TEST=automated.
Review URL: https://codereview.chromium.org/105693013
git-svn-id: svn://svn.chromium.org/blink/trunk@163680 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint)
{
HTMLElement* element = toHTMLElement(this);
if (insertionPoint->inDocument() && element->fastHasAttribute(formAttr))
m_formAttributeTargetObserver = nullptr;
if (m_form && element->highestAncestor() != m_form->highestAncestor())
setForm(0);
}
|
void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint)
{
HTMLElement* element = toHTMLElement(this);
if (insertionPoint->inDocument() && element->fastHasAttribute(formAttr))
m_formAttributeTargetObserver = nullptr;
if (m_form && element->highestAncestor() != m_form->highestAncestor())
setForm(0);
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/d1a59e4e845a01d7d7b80ef184b672752a9eae4d
|
d1a59e4e845a01d7d7b80ef184b672752a9eae4d
|
Fixing cross-process postMessage replies on more than two iterations.
When two frames are replying to each other using event.source across processes,
after the first two replies, things break down. The root cause is that in
RenderViewImpl::GetFrameByMappedID, the lookup was incorrect. It is now
properly searching for the remote frame id and returning the local one.
BUG=153445
Review URL: https://chromiumcodereview.appspot.com/11040015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159924 0039d316-1c4b-4281-b951-d872f2087c98
|
bool RenderViewImpl::runFileChooser(
const WebKit::WebFileChooserParams& params,
WebFileChooserCompletion* chooser_completion) {
if (is_hidden())
return false;
content::FileChooserParams ipc_params;
if (params.directory)
ipc_params.mode = content::FileChooserParams::OpenFolder;
else if (params.multiSelect)
ipc_params.mode = content::FileChooserParams::OpenMultiple;
else if (params.saveAs)
ipc_params.mode = content::FileChooserParams::Save;
else
ipc_params.mode = content::FileChooserParams::Open;
ipc_params.title = params.title;
ipc_params.default_file_name =
webkit_glue::WebStringToFilePath(params.initialValue);
ipc_params.accept_types.reserve(params.acceptTypes.size());
for (size_t i = 0; i < params.acceptTypes.size(); ++i)
ipc_params.accept_types.push_back(params.acceptTypes[i]);
return ScheduleFileChooser(ipc_params, chooser_completion);
}
|
bool RenderViewImpl::runFileChooser(
const WebKit::WebFileChooserParams& params,
WebFileChooserCompletion* chooser_completion) {
if (is_hidden())
return false;
content::FileChooserParams ipc_params;
if (params.directory)
ipc_params.mode = content::FileChooserParams::OpenFolder;
else if (params.multiSelect)
ipc_params.mode = content::FileChooserParams::OpenMultiple;
else if (params.saveAs)
ipc_params.mode = content::FileChooserParams::Save;
else
ipc_params.mode = content::FileChooserParams::Open;
ipc_params.title = params.title;
ipc_params.default_file_name =
webkit_glue::WebStringToFilePath(params.initialValue);
ipc_params.accept_types.reserve(params.acceptTypes.size());
for (size_t i = 0; i < params.acceptTypes.size(); ++i)
ipc_params.accept_types.push_back(params.acceptTypes[i]);
return ScheduleFileChooser(ipc_params, chooser_completion);
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/a44b00c88bc5ea35b5b150217c5fd6e4ce168e58
|
a44b00c88bc5ea35b5b150217c5fd6e4ce168e58
|
Apply behaviour change fix from upstream for previous XPath change.
BUG=58731
TEST=NONE
Review URL: http://codereview.chromium.org/4027006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63572 0039d316-1c4b-4281-b951-d872f2087c98
|
xmlXPathNewCString(const char *val) {
xmlXPathObjectPtr ret;
ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
if (ret == NULL) {
xmlXPathErrMemory(NULL, "creating string object\n");
return(NULL);
}
memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
ret->type = XPATH_STRING;
ret->stringval = xmlStrdup(BAD_CAST val);
#ifdef XP_DEBUG_OBJ_USAGE
xmlXPathDebugObjUsageRequested(NULL, XPATH_STRING);
#endif
return(ret);
}
|
xmlXPathNewCString(const char *val) {
xmlXPathObjectPtr ret;
ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
if (ret == NULL) {
xmlXPathErrMemory(NULL, "creating string object\n");
return(NULL);
}
memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
ret->type = XPATH_STRING;
ret->stringval = xmlStrdup(BAD_CAST val);
#ifdef XP_DEBUG_OBJ_USAGE
xmlXPathDebugObjUsageRequested(NULL, XPATH_STRING);
#endif
return(ret);
}
|
C
|
Chrome
| 0 |
CVE-2019-13225
|
https://www.cvedetails.com/cve/CVE-2019-13225/
|
CWE-476
|
https://github.com/kkos/oniguruma/commit/c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
|
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
|
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
|
renumber_node_backref(Node* node, GroupNumRemap* map)
{
int i, pos, n, old_num;
int *backs;
BackRefNode* bn = BACKREF_(node);
if (! NODE_IS_BY_NAME(node))
return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
old_num = bn->back_num;
if (IS_NULL(bn->back_dynamic))
backs = bn->back_static;
else
backs = bn->back_dynamic;
for (i = 0, pos = 0; i < old_num; i++) {
n = map[backs[i]].new_val;
if (n > 0) {
backs[pos] = n;
pos++;
}
}
bn->back_num = pos;
return 0;
}
|
renumber_node_backref(Node* node, GroupNumRemap* map)
{
int i, pos, n, old_num;
int *backs;
BackRefNode* bn = BACKREF_(node);
if (! NODE_IS_BY_NAME(node))
return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
old_num = bn->back_num;
if (IS_NULL(bn->back_dynamic))
backs = bn->back_static;
else
backs = bn->back_dynamic;
for (i = 0, pos = 0; i < old_num; i++) {
n = map[backs[i]].new_val;
if (n > 0) {
backs[pos] = n;
pos++;
}
}
bn->back_num = pos;
return 0;
}
|
C
|
oniguruma
| 0 |
CVE-2016-4578
|
https://www.cvedetails.com/cve/CVE-2016-4578/
|
CWE-200
|
https://github.com/torvalds/linux/commit/e4ec8cc8039a7063e24204299b462bd1383184a5
|
e4ec8cc8039a7063e24204299b462bd1383184a5
|
ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt
The stack object “r1” has a total size of 32 bytes. Its field
“event” and “val” both contain 4 bytes padding. These 8 bytes
padding bytes are sent to user without being initialized.
Signed-off-by: Kangjie Lu <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
|
static void snd_timer_check_master(struct snd_timer_instance *master)
{
struct snd_timer_instance *slave, *tmp;
/* check all pending slaves */
list_for_each_entry_safe(slave, tmp, &snd_timer_slave_list, open_list) {
if (slave->slave_class == master->slave_class &&
slave->slave_id == master->slave_id) {
list_move_tail(&slave->open_list, &master->slave_list_head);
spin_lock_irq(&slave_active_lock);
spin_lock(&master->timer->lock);
slave->master = master;
slave->timer = master->timer;
if (slave->flags & SNDRV_TIMER_IFLG_RUNNING)
list_add_tail(&slave->active_list,
&master->slave_active_head);
spin_unlock(&master->timer->lock);
spin_unlock_irq(&slave_active_lock);
}
}
}
|
static void snd_timer_check_master(struct snd_timer_instance *master)
{
struct snd_timer_instance *slave, *tmp;
/* check all pending slaves */
list_for_each_entry_safe(slave, tmp, &snd_timer_slave_list, open_list) {
if (slave->slave_class == master->slave_class &&
slave->slave_id == master->slave_id) {
list_move_tail(&slave->open_list, &master->slave_list_head);
spin_lock_irq(&slave_active_lock);
spin_lock(&master->timer->lock);
slave->master = master;
slave->timer = master->timer;
if (slave->flags & SNDRV_TIMER_IFLG_RUNNING)
list_add_tail(&slave->active_list,
&master->slave_active_head);
spin_unlock(&master->timer->lock);
spin_unlock_irq(&slave_active_lock);
}
}
}
|
C
|
linux
| 0 |
CVE-2013-0885
|
https://www.cvedetails.com/cve/CVE-2013-0885/
|
CWE-264
|
https://github.com/chromium/chromium/commit/f335421145bb7f82c60fb9d61babcd6ce2e4b21e
|
f335421145bb7f82c60fb9d61babcd6ce2e4b21e
|
Tighten restrictions on hosted apps calling extension APIs
Only allow component apps to make any API calls, and for them only allow the namespaces they explicitly have permission for (plus chrome.test - I need to see if I can rework some WebStore tests to remove even this).
BUG=172369
Review URL: https://chromiumcodereview.appspot.com/12095095
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180426 0039d316-1c4b-4281-b951-d872f2087c98
|
bool Extension::CheckAPIPermissionWithParam(APIPermission::ID permission,
const APIPermission::CheckParam* param) const {
base::AutoLock auto_lock(runtime_data_lock_);
return runtime_data_.GetActivePermissions()->
CheckAPIPermissionWithParam(permission, param);
}
|
bool Extension::CheckAPIPermissionWithParam(APIPermission::ID permission,
const APIPermission::CheckParam* param) const {
base::AutoLock auto_lock(runtime_data_lock_);
return runtime_data_.GetActivePermissions()->
CheckAPIPermissionWithParam(permission, param);
}
|
C
|
Chrome
| 0 |
CVE-2017-12176
|
https://www.cvedetails.com/cve/CVE-2017-12176/
|
CWE-20
|
https://cgit.freedesktop.org/xorg/xserver/commit/?id=b747da5e25be944337a9cd1415506fc06b70aa81
|
b747da5e25be944337a9cd1415506fc06b70aa81
| null |
ProcCreateCursor(ClientPtr client)
{
CursorPtr pCursor;
PixmapPtr src;
PixmapPtr msk;
unsigned char *srcbits;
unsigned char *mskbits;
unsigned short width, height;
long n;
CursorMetricRec cm;
int rc;
REQUEST(xCreateCursorReq);
REQUEST_SIZE_MATCH(xCreateCursorReq);
LEGAL_NEW_RESOURCE(stuff->cid, client);
rc = dixLookupResourceByType((void **) &src, stuff->source, RT_PIXMAP,
client, DixReadAccess);
if (rc != Success) {
client->errorValue = stuff->source;
return rc;
}
if (src->drawable.depth != 1)
return (BadMatch);
/* Find and validate cursor mask pixmap, if one is provided */
if (stuff->mask != None) {
rc = dixLookupResourceByType((void **) &msk, stuff->mask, RT_PIXMAP,
client, DixReadAccess);
if (rc != Success) {
client->errorValue = stuff->mask;
return rc;
}
if (src->drawable.width != msk->drawable.width
|| src->drawable.height != msk->drawable.height
|| src->drawable.depth != 1 || msk->drawable.depth != 1)
return BadMatch;
}
else
msk = NULL;
width = src->drawable.width;
height = src->drawable.height;
if (stuff->x > width || stuff->y > height)
return BadMatch;
srcbits = calloc(BitmapBytePad(width), height);
if (!srcbits)
return BadAlloc;
n = BitmapBytePad(width) * height;
mskbits = malloc(n);
if (!mskbits) {
free(srcbits);
return BadAlloc;
}
(*src->drawable.pScreen->GetImage) ((DrawablePtr) src, 0, 0, width, height,
XYPixmap, 1, (void *) srcbits);
if (msk == (PixmapPtr) NULL) {
unsigned char *bits = mskbits;
while (--n >= 0)
*bits++ = ~0;
}
else {
/* zeroing the (pad) bits helps some ddx cursor handling */
memset((char *) mskbits, 0, n);
(*msk->drawable.pScreen->GetImage) ((DrawablePtr) msk, 0, 0, width,
height, XYPixmap, 1,
(void *) mskbits);
}
cm.width = width;
cm.height = height;
cm.xhot = stuff->x;
cm.yhot = stuff->y;
rc = AllocARGBCursor(srcbits, mskbits, NULL, &cm,
stuff->foreRed, stuff->foreGreen, stuff->foreBlue,
stuff->backRed, stuff->backGreen, stuff->backBlue,
&pCursor, client, stuff->cid);
if (rc != Success)
goto bail;
if (!AddResource(stuff->cid, RT_CURSOR, (void *) pCursor)) {
rc = BadAlloc;
goto bail;
}
return Success;
bail:
free(srcbits);
free(mskbits);
return rc;
}
|
ProcCreateCursor(ClientPtr client)
{
CursorPtr pCursor;
PixmapPtr src;
PixmapPtr msk;
unsigned char *srcbits;
unsigned char *mskbits;
unsigned short width, height;
long n;
CursorMetricRec cm;
int rc;
REQUEST(xCreateCursorReq);
REQUEST_SIZE_MATCH(xCreateCursorReq);
LEGAL_NEW_RESOURCE(stuff->cid, client);
rc = dixLookupResourceByType((void **) &src, stuff->source, RT_PIXMAP,
client, DixReadAccess);
if (rc != Success) {
client->errorValue = stuff->source;
return rc;
}
if (src->drawable.depth != 1)
return (BadMatch);
/* Find and validate cursor mask pixmap, if one is provided */
if (stuff->mask != None) {
rc = dixLookupResourceByType((void **) &msk, stuff->mask, RT_PIXMAP,
client, DixReadAccess);
if (rc != Success) {
client->errorValue = stuff->mask;
return rc;
}
if (src->drawable.width != msk->drawable.width
|| src->drawable.height != msk->drawable.height
|| src->drawable.depth != 1 || msk->drawable.depth != 1)
return BadMatch;
}
else
msk = NULL;
width = src->drawable.width;
height = src->drawable.height;
if (stuff->x > width || stuff->y > height)
return BadMatch;
srcbits = calloc(BitmapBytePad(width), height);
if (!srcbits)
return BadAlloc;
n = BitmapBytePad(width) * height;
mskbits = malloc(n);
if (!mskbits) {
free(srcbits);
return BadAlloc;
}
(*src->drawable.pScreen->GetImage) ((DrawablePtr) src, 0, 0, width, height,
XYPixmap, 1, (void *) srcbits);
if (msk == (PixmapPtr) NULL) {
unsigned char *bits = mskbits;
while (--n >= 0)
*bits++ = ~0;
}
else {
/* zeroing the (pad) bits helps some ddx cursor handling */
memset((char *) mskbits, 0, n);
(*msk->drawable.pScreen->GetImage) ((DrawablePtr) msk, 0, 0, width,
height, XYPixmap, 1,
(void *) mskbits);
}
cm.width = width;
cm.height = height;
cm.xhot = stuff->x;
cm.yhot = stuff->y;
rc = AllocARGBCursor(srcbits, mskbits, NULL, &cm,
stuff->foreRed, stuff->foreGreen, stuff->foreBlue,
stuff->backRed, stuff->backGreen, stuff->backBlue,
&pCursor, client, stuff->cid);
if (rc != Success)
goto bail;
if (!AddResource(stuff->cid, RT_CURSOR, (void *) pCursor)) {
rc = BadAlloc;
goto bail;
}
return Success;
bail:
free(srcbits);
free(mskbits);
return rc;
}
|
C
|
xserver
| 0 |
CVE-2015-3412
|
https://www.cvedetails.com/cve/CVE-2015-3412/
|
CWE-254
|
https://git.php.net/?p=php-src.git;a=commit;h=4435b9142ff9813845d5c97ab29a5d637bedb257
|
4435b9142ff9813845d5c97ab29a5d637bedb257
| null |
PHP_FUNCTION(imagejpeg)
{
_php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_JPG, "JPEG", gdImageJpegCtx);
}
|
PHP_FUNCTION(imagejpeg)
{
_php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_JPG, "JPEG", gdImageJpegCtx);
}
|
C
|
php
| 0 |
CVE-2019-5827
|
https://www.cvedetails.com/cve/CVE-2019-5827/
|
CWE-190
|
https://github.com/chromium/chromium/commit/517ac71c9ee27f856f9becde8abea7d1604af9d4
|
517ac71c9ee27f856f9becde8abea7d1604af9d4
|
sqlite: backport bugfixes for dbfuzz2
Bug: 952406
Change-Id: Icbec429742048d6674828726c96d8e265c41b595
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1568152
Reviewed-by: Chris Mumford <[email protected]>
Commit-Queue: Darwin Huang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#651030}
|
static void computeYMD(DateTime *p){
int Z, A, B, C, D, E, X1;
if( p->validYMD ) return;
if( !p->validJD ){
p->Y = 2000;
p->M = 1;
p->D = 1;
}else if( !validJulianDay(p->iJD) ){
datetimeError(p);
return;
}else{
Z = (int)((p->iJD + 43200000)/86400000);
A = (int)((Z - 1867216.25)/36524.25);
A = Z + 1 + A - (A/4);
B = A + 1524;
C = (int)((B - 122.1)/365.25);
D = (36525*(C&32767))/100;
E = (int)((B-D)/30.6001);
X1 = (int)(30.6001*E);
p->D = B - D - X1;
p->M = E<14 ? E-1 : E-13;
p->Y = p->M>2 ? C - 4716 : C - 4715;
}
p->validYMD = 1;
}
|
static void computeYMD(DateTime *p){
int Z, A, B, C, D, E, X1;
if( p->validYMD ) return;
if( !p->validJD ){
p->Y = 2000;
p->M = 1;
p->D = 1;
}else if( !validJulianDay(p->iJD) ){
datetimeError(p);
return;
}else{
Z = (int)((p->iJD + 43200000)/86400000);
A = (int)((Z - 1867216.25)/36524.25);
A = Z + 1 + A - (A/4);
B = A + 1524;
C = (int)((B - 122.1)/365.25);
D = (36525*(C&32767))/100;
E = (int)((B-D)/30.6001);
X1 = (int)(30.6001*E);
p->D = B - D - X1;
p->M = E<14 ? E-1 : E-13;
p->Y = p->M>2 ? C - 4716 : C - 4715;
}
p->validYMD = 1;
}
|
C
|
Chrome
| 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 floppy_device_release(struct device *dev)
{
}
|
static void floppy_device_release(struct device *dev)
{
}
|
C
|
linux
| 0 |
CVE-2006-3635
|
https://www.cvedetails.com/cve/CVE-2006-3635/
|
CWE-119
|
https://github.com/torvalds/linux/commit/4dcc29e1574d88f4465ba865ed82800032f76418
|
4dcc29e1574d88f4465ba865ed82800032f76418
|
[IA64] Workaround for RSE issue
Problem: An application violating the architectural rules regarding
operation dependencies and having specific Register Stack Engine (RSE)
state at the time of the violation, may result in an illegal operation
fault and invalid RSE state. Such faults may initiate a cascade of
repeated illegal operation faults within OS interruption handlers.
The specific behavior is OS dependent.
Implication: An application causing an illegal operation fault with
specific RSE state may result in a series of illegal operation faults
and an eventual OS stack overflow condition.
Workaround: OS interruption handlers that switch to kernel backing
store implement a check for invalid RSE state to avoid the series
of illegal operation faults.
The core of the workaround is the RSE_WORKAROUND code sequence
inserted into each invocation of the SAVE_MIN_WITH_COVER and
SAVE_MIN_WITH_COVER_R19 macros. This sequence includes hard-coded
constants that depend on the number of stacked physical registers
being 96. The rest of this patch consists of code to disable this
workaround should this not be the case (with the presumption that
if a future Itanium processor increases the number of registers, it
would also remove the need for this patch).
Move the start of the RBS up to a mod32 boundary to avoid some
corner cases.
The dispatch_illegal_op_fault code outgrew the spot it was
squatting in when built with this patch and CONFIG_VIRT_CPU_ACCOUNTING=y
Move it out to the end of the ivt.
Signed-off-by: Tony Luck <[email protected]>
|
filter_memory(unsigned long start, unsigned long end, void *arg)
{
void (*func)(unsigned long, unsigned long, int);
#if IGNORE_PFN0
if (start == PAGE_OFFSET) {
printk(KERN_WARNING "warning: skipping physical page 0\n");
start += PAGE_SIZE;
if (start >= end)
return 0;
}
#endif
func = arg;
if (start < end)
call_pernode_memory(__pa(start), end - start, func);
return 0;
}
|
filter_memory(unsigned long start, unsigned long end, void *arg)
{
void (*func)(unsigned long, unsigned long, int);
#if IGNORE_PFN0
if (start == PAGE_OFFSET) {
printk(KERN_WARNING "warning: skipping physical page 0\n");
start += PAGE_SIZE;
if (start >= end)
return 0;
}
#endif
func = arg;
if (start < end)
call_pernode_memory(__pa(start), end - start, func);
return 0;
}
|
C
|
linux
| 0 |
CVE-2016-1633
|
https://www.cvedetails.com/cve/CVE-2016-1633/
| null |
https://github.com/chromium/chromium/commit/eb750a539e4856ba9042abdf39ae9da58fa3ae63
|
eb750a539e4856ba9042abdf39ae9da58fa3ae63
|
Fix detached Attr nodes interaction with NodeIterator
- Don't register NodeIterator to document when attaching to Attr node.
-- NodeIterator is registered to its document to receive updateForNodeRemoval notifications.
-- However it wouldn't make sense on Attr nodes, as they never have children.
BUG=572537
Review URL: https://codereview.chromium.org/1577213003
Cr-Commit-Position: refs/heads/master@{#369687}
|
bool NodeIterator::NodePointer::moveToNext(Node* root)
{
if (!node)
return false;
if (isPointerBeforeNode) {
isPointerBeforeNode = false;
return true;
}
node = NodeTraversal::next(*node, root);
return node;
}
|
bool NodeIterator::NodePointer::moveToNext(Node* root)
{
if (!node)
return false;
if (isPointerBeforeNode) {
isPointerBeforeNode = false;
return true;
}
node = NodeTraversal::next(*node, root);
return node;
}
|
C
|
Chrome
| 0 |
CVE-2018-15857
|
https://www.cvedetails.com/cve/CVE-2018-15857/
|
CWE-416
|
https://github.com/xkbcommon/libxkbcommon/commit/c1e5ac16e77a21f87bdf3bc4dea61b037a17dddb
|
c1e5ac16e77a21f87bdf3bc4dea61b037a17dddb
|
xkbcomp: fix pointer value for FreeStmt
Signed-off-by: Peter Hutterer <[email protected]>
|
AppendStmt(ParseCommon *to, ParseCommon *append)
{
ParseCommon *iter;
if (!to)
return append;
for (iter = to; iter->next; iter = iter->next);
iter->next = append;
return to;
}
|
AppendStmt(ParseCommon *to, ParseCommon *append)
{
ParseCommon *iter;
if (!to)
return append;
for (iter = to; iter->next; iter = iter->next);
iter->next = append;
return to;
}
|
C
|
libxkbcommon
| 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().
|
void CLASS romm_coeff (float romm_cam[3][3])
{
static const float rgb_romm[3][3] = /* ROMM == Kodak ProPhoto */
{ { 2.034193, -0.727420, -0.306766 },
{ -0.228811, 1.231729, -0.002922 },
{ -0.008565, -0.153273, 1.161839 } };
int i, j, k;
for (i=0; i < 3; i++)
for (j=0; j < 3; j++)
for (cmatrix[i][j] = k=0; k < 3; k++)
cmatrix[i][j] += rgb_romm[i][k] * romm_cam[k][j];
}
|
void CLASS romm_coeff (float romm_cam[3][3])
{
static const float rgb_romm[3][3] = /* ROMM == Kodak ProPhoto */
{ { 2.034193, -0.727420, -0.306766 },
{ -0.228811, 1.231729, -0.002922 },
{ -0.008565, -0.153273, 1.161839 } };
int i, j, k;
for (i=0; i < 3; i++)
for (j=0; j < 3; j++)
for (cmatrix[i][j] = k=0; k < 3; k++)
cmatrix[i][j] += rgb_romm[i][k] * romm_cam[k][j];
}
|
C
|
rawstudio
| 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 |
void js_toprimitive(js_State *J, int idx, int hint)
{
jsV_toprimitive(J, stackidx(J, idx), hint);
}
|
void js_toprimitive(js_State *J, int idx, int hint)
{
jsV_toprimitive(J, stackidx(J, idx), hint);
}
|
C
|
ghostscript
| 0 |
CVE-2011-3209
|
https://www.cvedetails.com/cve/CVE-2011-3209/
|
CWE-189
|
https://github.com/torvalds/linux/commit/f8bd2258e2d520dff28c855658bd24bdafb5102d
|
f8bd2258e2d520dff28c855658bd24bdafb5102d
|
remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle a negative divisor and
produces worse code on 64bit archs.
There is little incentive to keep this API alive, so this converts the few
users to the new API.
Signed-off-by: Roman Zippel <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: john stultz <[email protected]>
Cc: Christoph Lameter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
static __always_inline void *slab_alloc(struct kmem_cache *s,
gfp_t gfpflags, int node, void *addr)
{
void **object;
struct kmem_cache_cpu *c;
unsigned long flags;
local_irq_save(flags);
c = get_cpu_slab(s, smp_processor_id());
if (unlikely(!c->freelist || !node_match(c, node)))
object = __slab_alloc(s, gfpflags, node, addr, c);
else {
object = c->freelist;
c->freelist = object[c->offset];
stat(c, ALLOC_FASTPATH);
}
local_irq_restore(flags);
if (unlikely((gfpflags & __GFP_ZERO) && object))
memset(object, 0, c->objsize);
return object;
}
|
static __always_inline void *slab_alloc(struct kmem_cache *s,
gfp_t gfpflags, int node, void *addr)
{
void **object;
struct kmem_cache_cpu *c;
unsigned long flags;
local_irq_save(flags);
c = get_cpu_slab(s, smp_processor_id());
if (unlikely(!c->freelist || !node_match(c, node)))
object = __slab_alloc(s, gfpflags, node, addr, c);
else {
object = c->freelist;
c->freelist = object[c->offset];
stat(c, ALLOC_FASTPATH);
}
local_irq_restore(flags);
if (unlikely((gfpflags & __GFP_ZERO) && object))
memset(object, 0, c->objsize);
return object;
}
|
C
|
linux
| 0 |
CVE-2015-8839
|
https://www.cvedetails.com/cve/CVE-2015-8839/
|
CWE-362
|
https://github.com/torvalds/linux/commit/ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
|
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
|
ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that will be shortly
freed. Filesystem corruption will shortly follow. Note that the same
race is avoided for truncate by checking page fault offset against
i_size but there isn't similar mechanism available for punching holes.
Fix the problem by creating new rw semaphore i_mmap_sem in inode and
grab it for writing over truncate, hole punching, and other functions
removing blocks from extent tree and for read over page faults. We
cannot easily use i_data_sem for this since that ranks below transaction
start and we need something ranking above it so that it can be held over
the whole truncate / hole punching operation. Also remove various
workarounds we had in the code to reduce race window when page fault
could have created pages with stale mapping information.
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
|
static int ext4_acquire_dquot(struct dquot *dquot)
{
int ret, err;
handle_t *handle;
handle = ext4_journal_start(dquot_to_inode(dquot), EXT4_HT_QUOTA,
EXT4_QUOTA_INIT_BLOCKS(dquot->dq_sb));
if (IS_ERR(handle))
return PTR_ERR(handle);
ret = dquot_acquire(dquot);
err = ext4_journal_stop(handle);
if (!ret)
ret = err;
return ret;
}
|
static int ext4_acquire_dquot(struct dquot *dquot)
{
int ret, err;
handle_t *handle;
handle = ext4_journal_start(dquot_to_inode(dquot), EXT4_HT_QUOTA,
EXT4_QUOTA_INIT_BLOCKS(dquot->dq_sb));
if (IS_ERR(handle))
return PTR_ERR(handle);
ret = dquot_acquire(dquot);
err = ext4_journal_stop(handle);
if (!ret)
ret = err;
return ret;
}
|
C
|
linux
| 0 |
CVE-2018-11363
|
https://www.cvedetails.com/cve/CVE-2018-11363/
|
CWE-125
|
https://github.com/AndreRenaud/PDFGen/commit/ee58aff6918b8bbc3be29b9e3089485ea46ff956
|
ee58aff6918b8bbc3be29b9e3089485ea46ff956
|
jpeg: Fix another possible buffer overrun
Found via the clang libfuzzer
|
static int pdf_add_barcode_39(struct pdf_doc *pdf, struct pdf_object *page,
int x, int y, int width, int height,
const char *string, uint32_t colour)
{
int len = strlen(string);
int char_width = width / (len + 2);
x = pdf_barcode_39_ch(pdf, page, x, y, char_width, height, colour, '*');
if (x < 0)
return x;
while (string && *string) {
x = pdf_barcode_39_ch(pdf, page, x, y, char_width, height, colour, *string);
if (x < 0)
return x;
string++;
};
x = pdf_barcode_39_ch(pdf, page, x, y, char_width, height, colour, '*');
if (x < 0)
return x;
return 0;
}
|
static int pdf_add_barcode_39(struct pdf_doc *pdf, struct pdf_object *page,
int x, int y, int width, int height,
const char *string, uint32_t colour)
{
int len = strlen(string);
int char_width = width / (len + 2);
x = pdf_barcode_39_ch(pdf, page, x, y, char_width, height, colour, '*');
if (x < 0)
return x;
while (string && *string) {
x = pdf_barcode_39_ch(pdf, page, x, y, char_width, height, colour, *string);
if (x < 0)
return x;
string++;
};
x = pdf_barcode_39_ch(pdf, page, x, y, char_width, height, colour, '*');
if (x < 0)
return x;
return 0;
}
|
C
|
PDFGen
| 0 |
CVE-2016-9317
|
https://www.cvedetails.com/cve/CVE-2016-9317/
|
CWE-20
|
https://github.com/libgd/libgd/commit/1846f48e5fcdde996e7c27a4bbac5d0aef183e4b
|
1846f48e5fcdde996e7c27a4bbac5d0aef183e4b
|
Fix #340: System frozen
gdImageCreate() doesn't check for oversized images and as such is prone
to DoS vulnerabilities. We fix that by applying the same overflow check
that is already in place for gdImageCreateTrueColor().
CVE-2016-9317
|
BGD_DECLARE(void) gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
int color)
{
gdImageFilledArc (im, cx, cy, w, h, s, e, color, gdNoFill);
}
|
BGD_DECLARE(void) gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
int color)
{
gdImageFilledArc (im, cx, cy, w, h, s, e, color, gdNoFill);
}
|
C
|
libgd
| 0 |
CVE-2016-1586
|
https://www.cvedetails.com/cve/CVE-2016-1586/
|
CWE-20
|
https://git.launchpad.net/oxide/commit/?id=29014da83e5fc358d6bff0f574e9ed45e61a35ac
|
29014da83e5fc358d6bff0f574e9ed45e61a35ac
| null |
void OxideQQuickWebView::dragEnterEvent(QDragEnterEvent* event) {
Q_D(OxideQQuickWebView);
QQuickItem::dragEnterEvent(event);
d->contents_view_->handleDragEnterEvent(event);
}
|
void OxideQQuickWebView::dragEnterEvent(QDragEnterEvent* event) {
Q_D(OxideQQuickWebView);
QQuickItem::dragEnterEvent(event);
d->contents_view_->handleDragEnterEvent(event);
}
|
CPP
|
launchpad
| 0 |
CVE-2018-17182
|
https://www.cvedetails.com/cve/CVE-2018-17182/
|
CWE-416
|
https://github.com/torvalds/linux/commit/7a9cdebdcc17e426fb5287e4a82db1dfe86339b2
|
7a9cdebdcc17e426fb5287e4a82db1dfe86339b2
|
mm: get rid of vmacache_flush_all() entirely
Jann Horn points out that the vmacache_flush_all() function is not only
potentially expensive, it's buggy too. It also happens to be entirely
unnecessary, because the sequence number overflow case can be avoided by
simply making the sequence number be 64-bit. That doesn't even grow the
data structures in question, because the other adjacent fields are
already 64-bit.
So simplify the whole thing by just making the sequence number overflow
case go away entirely, which gets rid of all the complications and makes
the code faster too. Win-win.
[ Oleg Nesterov points out that the VMACACHE_FULL_FLUSHES statistics
also just goes away entirely with this ]
Reported-by: Jann Horn <[email protected]>
Suggested-by: Will Deacon <[email protected]>
Acked-by: Davidlohr Bueso <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
|
static inline bool vmacache_valid_mm(struct mm_struct *mm)
{
return current->mm == mm && !(current->flags & PF_KTHREAD);
}
|
static inline bool vmacache_valid_mm(struct mm_struct *mm)
{
return current->mm == mm && !(current->flags & PF_KTHREAD);
}
|
C
|
linux
| 0 |
CVE-2013-2916
|
https://www.cvedetails.com/cve/CVE-2013-2916/
| null |
https://github.com/chromium/chromium/commit/47a054e9ad826421b789097d82b44c102ab6ac97
|
47a054e9ad826421b789097d82b44c102ab6ac97
|
Don't wait to notify client of spoof attempt if a modal dialog is created.
BUG=281256
TEST=See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/23620020
git-svn-id: svn://svn.chromium.org/blink/trunk@157196 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void FrameLoader::dispatchDocumentElementAvailable()
{
m_client->documentElementAvailable();
}
|
void FrameLoader::dispatchDocumentElementAvailable()
{
m_client->documentElementAvailable();
}
|
C
|
Chrome
| 0 |
CVE-2011-2829
|
https://www.cvedetails.com/cve/CVE-2011-2829/
|
CWE-189
|
https://github.com/chromium/chromium/commit/a4b20ed4917f1f6fc83b6375a48e2c3895d43a8a
|
a4b20ed4917f1f6fc83b6375a48e2c3895d43a8a
|
Add chromium_code: 1 to surface.gyp and gl.gyp to pick up -Werror.
It looks like this was dropped accidentally in http://codereview.chromium.org/6718027 (surface.gyp) and http://codereview.chromium.org/6722026 (gl.gyp)
Remove now-redudant code that's implied by chromium_code: 1.
Fix the warnings that have crept in since chromium_code: 1 was removed.
BUG=none
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91598
Review URL: http://codereview.chromium.org/7227009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91813 0039d316-1c4b-4281-b951-d872f2087c98
|
GLvoid StubGLGetProgramiv(GLuint program, GLenum pname, GLint* params) {
glGetProgramiv(program, pname, params);
}
|
GLvoid StubGLGetProgramiv(GLuint program, GLenum pname, GLint* params) {
glGetProgramiv(program, pname, params);
}
|
C
|
Chrome
| 0 |
CVE-2018-17467
|
https://www.cvedetails.com/cve/CVE-2018-17467/
|
CWE-20
|
https://github.com/chromium/chromium/commit/7da6c3419fd172405bcece1ae4ec6ec8316cd345
|
7da6c3419fd172405bcece1ae4ec6ec8316cd345
|
Start rendering timer after first navigation
Currently the new content rendering timer in the browser process,
which clears an old page's contents 4 seconds after a navigation if the
new page doesn't draw in that time, is not set on the first navigation
for a top-level frame.
This is problematic because content can exist before the first
navigation, for instance if it was created by a javascript: URL.
This CL removes the code that skips the timer activation on the first
navigation.
Bug: 844881
Change-Id: I19b3ad1ff62c69ded3a5f7b1c0afde191aaf4584
Reviewed-on: https://chromium-review.googlesource.com/1188589
Reviewed-by: Fady Samuel <[email protected]>
Reviewed-by: ccameron <[email protected]>
Commit-Queue: Ken Buchanan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586913}
|
void RenderWidgetHostImpl::SendCursorVisibilityState(bool is_visible) {
GetWidgetInputHandler()->CursorVisibilityChanged(is_visible);
}
|
void RenderWidgetHostImpl::SendCursorVisibilityState(bool is_visible) {
GetWidgetInputHandler()->CursorVisibilityChanged(is_visible);
}
|
C
|
Chrome
| 0 |
CVE-2016-1583
|
https://www.cvedetails.com/cve/CVE-2016-1583/
|
CWE-119
|
https://github.com/torvalds/linux/commit/f5364c150aa645b3d7daa21b5c0b9feaa1c9cd6d
|
f5364c150aa645b3d7daa21b5c0b9feaa1c9cd6d
|
Merge branch 'stacking-fixes' (vfs stacking fixes from Jann)
Merge filesystem stacking fixes from Jann Horn.
* emailed patches from Jann Horn <[email protected]>:
sched: panic on corrupted stack end
ecryptfs: forbid opening files without mmap handler
proc: prevent stacking filesystems on top
|
void hrtick_start(struct rq *rq, u64 delay)
{
/*
* Don't schedule slices shorter than 10000ns, that just
* doesn't make sense. Rely on vruntime for fairness.
*/
delay = max_t(u64, delay, 10000LL);
hrtimer_start(&rq->hrtick_timer, ns_to_ktime(delay),
HRTIMER_MODE_REL_PINNED);
}
|
void hrtick_start(struct rq *rq, u64 delay)
{
/*
* Don't schedule slices shorter than 10000ns, that just
* doesn't make sense. Rely on vruntime for fairness.
*/
delay = max_t(u64, delay, 10000LL);
hrtimer_start(&rq->hrtick_timer, ns_to_ktime(delay),
HRTIMER_MODE_REL_PINNED);
}
|
C
|
linux
| 0 |
CVE-2013-0918
|
https://www.cvedetails.com/cve/CVE-2013-0918/
|
CWE-264
|
https://github.com/chromium/chromium/commit/0a57375ad73780e61e1770a9d88b0529b0dbd33b
|
0a57375ad73780e61e1770a9d88b0529b0dbd33b
|
Let the browser handle external navigations from DevTools.
BUG=180555
Review URL: https://chromiumcodereview.appspot.com/12531004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186793 0039d316-1c4b-4281-b951-d872f2087c98
|
void RenderViewImpl::UpdateURL(WebFrame* frame) {
WebDataSource* ds = frame->dataSource();
DCHECK(ds);
const WebURLRequest& request = ds->request();
const WebURLRequest& original_request = ds->originalRequest();
const WebURLResponse& response = ds->response();
DocumentState* document_state = DocumentState::FromDataSource(ds);
NavigationState* navigation_state = document_state->navigation_state();
ViewHostMsg_FrameNavigate_Params params;
params.http_status_code = response.httpStatusCode();
params.is_post = false;
params.post_id = -1;
params.page_id = page_id_;
params.frame_id = frame->identifier();
params.socket_address.set_host(response.remoteIPAddress().utf8());
params.socket_address.set_port(response.remotePort());
WebURLResponseExtraDataImpl* extra_data = GetExtraDataFromResponse(response);
if (extra_data) {
params.was_fetched_via_proxy = extra_data->was_fetched_via_proxy();
}
params.was_within_same_page = navigation_state->was_within_same_page();
if (!document_state->security_info().empty()) {
DCHECK(response.securityInfo().isEmpty());
params.security_info = document_state->security_info();
} else {
params.security_info = response.securityInfo();
}
params.url = GetLoadingUrl(frame);
if (frame->document().baseURL() != params.url)
params.base_url = frame->document().baseURL();
GetRedirectChain(ds, ¶ms.redirects);
params.should_update_history = !ds->hasUnreachableURL() &&
!response.isMultipartPayload() && (response.httpStatusCode() != 404);
params.searchable_form_url = document_state->searchable_form_url();
params.searchable_form_encoding =
document_state->searchable_form_encoding();
const PasswordForm* password_form_data =
document_state->password_form_data();
if (password_form_data)
params.password_form = *password_form_data;
params.gesture = navigation_gesture_;
navigation_gesture_ = NavigationGestureUnknown;
const WebHistoryItem& item = frame->currentHistoryItem();
if (!item.isNull()) {
params.content_state = webkit_glue::HistoryItemToString(item);
} else {
params.content_state =
webkit_glue::CreateHistoryStateForURL(GURL(request.url()));
}
if (!frame->parent()) {
webview()->zoomLimitsChanged(
WebView::zoomFactorToZoomLevel(kMinimumZoomFactor),
WebView::zoomFactorToZoomLevel(kMaximumZoomFactor));
HostZoomLevels::iterator host_zoom =
host_zoom_levels_.find(GURL(request.url()));
if (webview()->mainFrame()->document().isPluginDocument()) {
webview()->setZoomLevel(false, 0);
} else {
if (host_zoom != host_zoom_levels_.end())
webview()->setZoomLevel(false, host_zoom->second);
}
if (host_zoom != host_zoom_levels_.end()) {
host_zoom_levels_.erase(host_zoom);
}
params.contents_mime_type = ds->response().mimeType().utf8();
params.transition = navigation_state->transition_type();
if (!PageTransitionIsMainFrame(params.transition)) {
params.transition = PAGE_TRANSITION_LINK;
}
if (completed_client_redirect_src_.url.is_valid()) {
DCHECK(completed_client_redirect_src_.url == params.redirects[0]);
params.referrer = completed_client_redirect_src_;
params.transition = static_cast<PageTransition>(
params.transition | PAGE_TRANSITION_CLIENT_REDIRECT);
} else {
params.referrer = Referrer(GURL(
original_request.httpHeaderField(WebString::fromUTF8("Referer"))),
GetReferrerPolicyFromRequest(frame, original_request));
}
string16 method = request.httpMethod();
if (EqualsASCII(method, "POST")) {
params.is_post = true;
params.post_id = ExtractPostId(item);
}
params.is_overriding_user_agent =
document_state->is_overriding_user_agent();
params.original_request_url = original_request.url();
UMA_HISTOGRAM_COUNTS_10000("Memory.GlyphPagesPerLoad",
webkit_glue::GetGlyphPageCount());
Send(new ViewHostMsg_FrameNavigate(routing_id_, params));
} else {
if (page_id_ > last_page_id_sent_to_browser_)
params.transition = PAGE_TRANSITION_MANUAL_SUBFRAME;
else
params.transition = PAGE_TRANSITION_AUTO_SUBFRAME;
Send(new ViewHostMsg_FrameNavigate(routing_id_, params));
}
last_page_id_sent_to_browser_ =
std::max(last_page_id_sent_to_browser_, page_id_);
navigation_state->set_transition_type(PAGE_TRANSITION_LINK);
}
|
void RenderViewImpl::UpdateURL(WebFrame* frame) {
WebDataSource* ds = frame->dataSource();
DCHECK(ds);
const WebURLRequest& request = ds->request();
const WebURLRequest& original_request = ds->originalRequest();
const WebURLResponse& response = ds->response();
DocumentState* document_state = DocumentState::FromDataSource(ds);
NavigationState* navigation_state = document_state->navigation_state();
ViewHostMsg_FrameNavigate_Params params;
params.http_status_code = response.httpStatusCode();
params.is_post = false;
params.post_id = -1;
params.page_id = page_id_;
params.frame_id = frame->identifier();
params.socket_address.set_host(response.remoteIPAddress().utf8());
params.socket_address.set_port(response.remotePort());
WebURLResponseExtraDataImpl* extra_data = GetExtraDataFromResponse(response);
if (extra_data) {
params.was_fetched_via_proxy = extra_data->was_fetched_via_proxy();
}
params.was_within_same_page = navigation_state->was_within_same_page();
if (!document_state->security_info().empty()) {
DCHECK(response.securityInfo().isEmpty());
params.security_info = document_state->security_info();
} else {
params.security_info = response.securityInfo();
}
params.url = GetLoadingUrl(frame);
if (frame->document().baseURL() != params.url)
params.base_url = frame->document().baseURL();
GetRedirectChain(ds, ¶ms.redirects);
params.should_update_history = !ds->hasUnreachableURL() &&
!response.isMultipartPayload() && (response.httpStatusCode() != 404);
params.searchable_form_url = document_state->searchable_form_url();
params.searchable_form_encoding =
document_state->searchable_form_encoding();
const PasswordForm* password_form_data =
document_state->password_form_data();
if (password_form_data)
params.password_form = *password_form_data;
params.gesture = navigation_gesture_;
navigation_gesture_ = NavigationGestureUnknown;
const WebHistoryItem& item = frame->currentHistoryItem();
if (!item.isNull()) {
params.content_state = webkit_glue::HistoryItemToString(item);
} else {
params.content_state =
webkit_glue::CreateHistoryStateForURL(GURL(request.url()));
}
if (!frame->parent()) {
webview()->zoomLimitsChanged(
WebView::zoomFactorToZoomLevel(kMinimumZoomFactor),
WebView::zoomFactorToZoomLevel(kMaximumZoomFactor));
HostZoomLevels::iterator host_zoom =
host_zoom_levels_.find(GURL(request.url()));
if (webview()->mainFrame()->document().isPluginDocument()) {
webview()->setZoomLevel(false, 0);
} else {
if (host_zoom != host_zoom_levels_.end())
webview()->setZoomLevel(false, host_zoom->second);
}
if (host_zoom != host_zoom_levels_.end()) {
host_zoom_levels_.erase(host_zoom);
}
params.contents_mime_type = ds->response().mimeType().utf8();
params.transition = navigation_state->transition_type();
if (!PageTransitionIsMainFrame(params.transition)) {
params.transition = PAGE_TRANSITION_LINK;
}
if (completed_client_redirect_src_.url.is_valid()) {
DCHECK(completed_client_redirect_src_.url == params.redirects[0]);
params.referrer = completed_client_redirect_src_;
params.transition = static_cast<PageTransition>(
params.transition | PAGE_TRANSITION_CLIENT_REDIRECT);
} else {
params.referrer = Referrer(GURL(
original_request.httpHeaderField(WebString::fromUTF8("Referer"))),
GetReferrerPolicyFromRequest(frame, original_request));
}
string16 method = request.httpMethod();
if (EqualsASCII(method, "POST")) {
params.is_post = true;
params.post_id = ExtractPostId(item);
}
params.is_overriding_user_agent =
document_state->is_overriding_user_agent();
params.original_request_url = original_request.url();
UMA_HISTOGRAM_COUNTS_10000("Memory.GlyphPagesPerLoad",
webkit_glue::GetGlyphPageCount());
Send(new ViewHostMsg_FrameNavigate(routing_id_, params));
} else {
if (page_id_ > last_page_id_sent_to_browser_)
params.transition = PAGE_TRANSITION_MANUAL_SUBFRAME;
else
params.transition = PAGE_TRANSITION_AUTO_SUBFRAME;
Send(new ViewHostMsg_FrameNavigate(routing_id_, params));
}
last_page_id_sent_to_browser_ =
std::max(last_page_id_sent_to_browser_, page_id_);
navigation_state->set_transition_type(PAGE_TRANSITION_LINK);
}
|
C
|
Chrome
| 0 |
CVE-2017-5019
|
https://www.cvedetails.com/cve/CVE-2017-5019/
|
CWE-416
|
https://github.com/chromium/chromium/commit/f03ea5a5c2ff26e239dfd23e263b15da2d9cee93
|
f03ea5a5c2ff26e239dfd23e263b15da2d9cee93
|
Convert FrameHostMsg_DidAddMessageToConsole to Mojo.
Note: Since this required changing the test
RenderViewImplTest.DispatchBeforeUnloadCanDetachFrame, I manually
re-introduced https://crbug.com/666714 locally (the bug the test was
added for), and reran the test to confirm that it still covers the bug.
Bug: 786836
Change-Id: I110668fa6f0f261fd2ac36bb91a8d8b31c99f4f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526270
Commit-Queue: Lowell Manners <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#653137}
|
void RenderFrameHostImpl::GetInterface(
const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe) {
if (!registry_ ||
!registry_->TryBindInterface(interface_name, &interface_pipe)) {
delegate_->OnInterfaceRequest(this, interface_name, &interface_pipe);
if (interface_pipe.is_valid() &&
!TryBindFrameInterface(interface_name, &interface_pipe, this)) {
GetContentClient()->browser()->BindInterfaceRequestFromFrame(
this, interface_name, std::move(interface_pipe));
}
}
}
|
void RenderFrameHostImpl::GetInterface(
const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe) {
if (!registry_ ||
!registry_->TryBindInterface(interface_name, &interface_pipe)) {
delegate_->OnInterfaceRequest(this, interface_name, &interface_pipe);
if (interface_pipe.is_valid() &&
!TryBindFrameInterface(interface_name, &interface_pipe, this)) {
GetContentClient()->browser()->BindInterfaceRequestFromFrame(
this, interface_name, std::move(interface_pipe));
}
}
}
|
C
|
Chrome
| 0 |
CVE-2015-4644
|
https://www.cvedetails.com/cve/CVE-2015-4644/
| null |
https://git.php.net/?p=php-src.git;a=commit;h=2cc4e69cc6d8dbc4b3568ad3dd583324a7c11d64
|
2cc4e69cc6d8dbc4b3568ad3dd583324a7c11d64
| null |
PHP_FUNCTION(pg_lo_import)
{
zval *pgsql_link = NULL, *oid = NULL;
char *file_in;
int id = -1, name_len;
int argc = ZEND_NUM_ARGS();
PGconn *pgsql;
Oid returned_oid;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC,
"rp|z", &pgsql_link, &file_in, &name_len, &oid) == SUCCESS) {
;
}
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC,
"p|z", &file_in, &name_len, &oid) == SUCCESS) {
id = PGG(default_link);
CHECK_DEFAULT_LINK(id);
}
/* old calling convention, deprecated since PHP 4.2 */
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC,
"pr", &file_in, &name_len, &pgsql_link ) == SUCCESS) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Old API is used");
}
else {
WRONG_PARAM_COUNT;
}
if (php_check_open_basedir(file_in TSRMLS_CC)) {
RETURN_FALSE;
}
if (pgsql_link == NULL && id == -1) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink);
if (oid) {
#ifndef HAVE_PG_LO_IMPORT_WITH_OID
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "OID value passing not supported");
#else
Oid wanted_oid;
switch (Z_TYPE_P(oid)) {
case IS_STRING:
{
char *end_ptr;
wanted_oid = (Oid)strtoul(Z_STRVAL_P(oid), &end_ptr, 10);
if ((Z_STRVAL_P(oid)+Z_STRLEN_P(oid)) != end_ptr) {
/* wrong integer format */
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "invalid OID value passed");
RETURN_FALSE;
}
}
break;
case IS_LONG:
if (Z_LVAL_P(oid) < (long)InvalidOid) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "invalid OID value passed");
RETURN_FALSE;
}
wanted_oid = (Oid)Z_LVAL_P(oid);
break;
default:
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "invalid OID value passed");
RETURN_FALSE;
}
returned_oid = lo_import_with_oid(pgsql, file_in, wanted_oid);
if (returned_oid == InvalidOid) {
RETURN_FALSE;
}
PGSQL_RETURN_OID(returned_oid);
#endif
}
returned_oid = lo_import(pgsql, file_in);
if (returned_oid == InvalidOid) {
RETURN_FALSE;
}
PGSQL_RETURN_OID(returned_oid);
}
|
PHP_FUNCTION(pg_lo_import)
{
zval *pgsql_link = NULL, *oid = NULL;
char *file_in;
int id = -1, name_len;
int argc = ZEND_NUM_ARGS();
PGconn *pgsql;
Oid returned_oid;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC,
"rp|z", &pgsql_link, &file_in, &name_len, &oid) == SUCCESS) {
;
}
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC,
"p|z", &file_in, &name_len, &oid) == SUCCESS) {
id = PGG(default_link);
CHECK_DEFAULT_LINK(id);
}
/* old calling convention, deprecated since PHP 4.2 */
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC,
"pr", &file_in, &name_len, &pgsql_link ) == SUCCESS) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Old API is used");
}
else {
WRONG_PARAM_COUNT;
}
if (php_check_open_basedir(file_in TSRMLS_CC)) {
RETURN_FALSE;
}
if (pgsql_link == NULL && id == -1) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink);
if (oid) {
#ifndef HAVE_PG_LO_IMPORT_WITH_OID
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "OID value passing not supported");
#else
Oid wanted_oid;
switch (Z_TYPE_P(oid)) {
case IS_STRING:
{
char *end_ptr;
wanted_oid = (Oid)strtoul(Z_STRVAL_P(oid), &end_ptr, 10);
if ((Z_STRVAL_P(oid)+Z_STRLEN_P(oid)) != end_ptr) {
/* wrong integer format */
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "invalid OID value passed");
RETURN_FALSE;
}
}
break;
case IS_LONG:
if (Z_LVAL_P(oid) < (long)InvalidOid) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "invalid OID value passed");
RETURN_FALSE;
}
wanted_oid = (Oid)Z_LVAL_P(oid);
break;
default:
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "invalid OID value passed");
RETURN_FALSE;
}
returned_oid = lo_import_with_oid(pgsql, file_in, wanted_oid);
if (returned_oid == InvalidOid) {
RETURN_FALSE;
}
PGSQL_RETURN_OID(returned_oid);
#endif
}
returned_oid = lo_import(pgsql, file_in);
if (returned_oid == InvalidOid) {
RETURN_FALSE;
}
PGSQL_RETURN_OID(returned_oid);
}
|
C
|
php
| 0 |
CVE-2012-2875
|
https://www.cvedetails.com/cve/CVE-2012-2875/
| null |
https://github.com/chromium/chromium/commit/40ed2b7ae4f6f5adb1b0ce9acf9c4dece339c2a6
|
40ed2b7ae4f6f5adb1b0ce9acf9c4dece339c2a6
|
gdata: Define the resource ID for the root directory
Per the spec, the resource ID for the root directory is defined
as "folder:root". Add the resource ID to the root directory in our
file system representation so we can look up the root directory by
the resource ID.
BUG=127697
TEST=add unit tests
Review URL: https://chromiumcodereview.appspot.com/10332253
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137928 0039d316-1c4b-4281-b951-d872f2087c98
|
void TestGetCacheFilePath(const std::string& resource_id,
const std::string& md5,
const std::string& expected_filename) {
FilePath actual_path = file_system_->GetCacheFilePath(
resource_id,
md5,
GDataRootDirectory::CACHE_TYPE_TMP,
GDataFileSystem::CACHED_FILE_FROM_SERVER);
FilePath expected_path =
file_system_->cache_paths_[GDataRootDirectory::CACHE_TYPE_TMP];
expected_path = expected_path.Append(expected_filename);
EXPECT_EQ(expected_path, actual_path);
FilePath base_name = actual_path.BaseName();
std::string unescaped_md5 = util::UnescapeCacheFileName(
base_name.Extension().substr(1));
EXPECT_EQ(md5, unescaped_md5);
std::string unescaped_resource_id = util::UnescapeCacheFileName(
base_name.RemoveExtension().value());
EXPECT_EQ(resource_id, unescaped_resource_id);
}
|
void TestGetCacheFilePath(const std::string& resource_id,
const std::string& md5,
const std::string& expected_filename) {
FilePath actual_path = file_system_->GetCacheFilePath(
resource_id,
md5,
GDataRootDirectory::CACHE_TYPE_TMP,
GDataFileSystem::CACHED_FILE_FROM_SERVER);
FilePath expected_path =
file_system_->cache_paths_[GDataRootDirectory::CACHE_TYPE_TMP];
expected_path = expected_path.Append(expected_filename);
EXPECT_EQ(expected_path, actual_path);
FilePath base_name = actual_path.BaseName();
std::string unescaped_md5 = util::UnescapeCacheFileName(
base_name.Extension().substr(1));
EXPECT_EQ(md5, unescaped_md5);
std::string unescaped_resource_id = util::UnescapeCacheFileName(
base_name.RemoveExtension().value());
EXPECT_EQ(resource_id, unescaped_resource_id);
}
|
C
|
Chrome
| 0 |
CVE-2017-5039
|
https://www.cvedetails.com/cve/CVE-2017-5039/
|
CWE-416
|
https://github.com/chromium/chromium/commit/69b4b9ef7455753b12c3efe4eec71647e6fb1da1
|
69b4b9ef7455753b12c3efe4eec71647e6fb1da1
|
Disable all DRP URL fetches when holdback is enabled
Disable secure proxy checker, warmup url fetcher
and client config fetch when the client is in DRP
(Data Reduction Proxy) holdback.
This CL does not disable pingbacks when client is in the
holdback, but the pingback code is going away soon.
Change-Id: Icbb59d814d1452123869c609e0770d1439c1db51
Bug: 984964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1709965
Commit-Queue: Tarun Bansal <[email protected]>
Reviewed-by: Robert Ogden <[email protected]>
Cr-Commit-Position: refs/heads/master@{#679649}
|
DataReductionProxyIOData::GetEffectiveConnectionType() const {
DCHECK(io_task_runner_->BelongsToCurrentThread());
return effective_connection_type_;
}
|
DataReductionProxyIOData::GetEffectiveConnectionType() const {
DCHECK(io_task_runner_->BelongsToCurrentThread());
return effective_connection_type_;
}
|
C
|
Chrome
| 0 |
CVE-2015-1229
|
https://www.cvedetails.com/cve/CVE-2015-1229/
|
CWE-19
|
https://github.com/chromium/chromium/commit/7933c117fd16b192e70609c331641e9112af5e42
|
7933c117fd16b192e70609c331641e9112af5e42
|
Sanitize headers in Proxy Authentication Required responses
BUG=431504
Review URL: https://codereview.chromium.org/769043003
Cr-Commit-Position: refs/heads/master@{#310014}
|
HttpProxyClientSocket::GetAuthController() const {
return auth_;
}
|
HttpProxyClientSocket::GetAuthController() const {
return auth_;
}
|
C
|
Chrome
| 0 |
CVE-2016-3751
|
https://www.cvedetails.com/cve/CVE-2016-3751/
| null |
https://android.googlesource.com/platform/external/libpng/+/9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
DO NOT MERGE Update libpng to 1.6.20
BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082024b669fa508931042eed18f82)
|
image_transform_png_set_scale_16_mod(PNG_CONST image_transform *this,
image_transform_png_set_scale_16_mod(const image_transform *this,
image_pixel *that, png_const_structp pp,
const transform_display *display)
{
if (that->bit_depth == 16)
{
that->sample_depth = that->bit_depth = 8;
if (that->red_sBIT > 8) that->red_sBIT = 8;
if (that->green_sBIT > 8) that->green_sBIT = 8;
if (that->blue_sBIT > 8) that->blue_sBIT = 8;
if (that->alpha_sBIT > 8) that->alpha_sBIT = 8;
}
this->next->mod(this->next, that, pp, display);
}
|
image_transform_png_set_scale_16_mod(PNG_CONST image_transform *this,
image_pixel *that, png_const_structp pp,
PNG_CONST transform_display *display)
{
if (that->bit_depth == 16)
{
that->sample_depth = that->bit_depth = 8;
if (that->red_sBIT > 8) that->red_sBIT = 8;
if (that->green_sBIT > 8) that->green_sBIT = 8;
if (that->blue_sBIT > 8) that->blue_sBIT = 8;
if (that->alpha_sBIT > 8) that->alpha_sBIT = 8;
}
this->next->mod(this->next, that, pp, display);
}
|
C
|
Android
| 1 |
CVE-2019-13298
|
https://www.cvedetails.com/cve/CVE-2019-13298/
|
CWE-119
|
https://github.com/ImageMagick/ImageMagick/commit/d4fc44b58a14f76b1ac997517d742ee12c9dc5d3
|
d4fc44b58a14f76b1ac997517d742ee12c9dc5d3
|
https://github.com/ImageMagick/ImageMagick/issues/1611
|
static void InterpolateCLAHE(const RectangleInfo *clahe_info,const size_t *Q12,
const size_t *Q22,const size_t *Q11,const size_t *Q21,
const RectangleInfo *tile,const unsigned short *lut,unsigned short *pixels)
{
ssize_t
y;
unsigned short
intensity;
/*
Bilinear interpolate four tiles to eliminate boundary artifacts.
*/
for (y=(ssize_t) tile->height; y > 0; y--)
{
register ssize_t
x;
for (x=(ssize_t) tile->width; x > 0; x--)
{
intensity=lut[*pixels];
*pixels++=(unsigned short ) (PerceptibleReciprocal((double) tile->width*
tile->height)*(y*(x*Q12[intensity]+(tile->width-x)*Q22[intensity])+
(tile->height-y)*(x*Q11[intensity]+(tile->width-x)*Q21[intensity])));
}
pixels+=(clahe_info->width-tile->width);
}
}
|
static void InterpolateCLAHE(const RectangleInfo *clahe_info,const size_t *Q12,
const size_t *Q22,const size_t *Q11,const size_t *Q21,
const RectangleInfo *tile,const unsigned short *lut,unsigned short *pixels)
{
ssize_t
y;
unsigned short
intensity;
/*
Bilinear interpolate four tiles to eliminate boundary artifacts.
*/
for (y=(ssize_t) tile->height; y > 0; y--)
{
register ssize_t
x;
for (x=(ssize_t) tile->width; x > 0; x--)
{
intensity=lut[*pixels];
*pixels++=(unsigned short ) (PerceptibleReciprocal((double) tile->width*
tile->height)*(y*(x*Q12[intensity]+(tile->width-x)*Q22[intensity])+
(tile->height-y)*(x*Q11[intensity]+(tile->width-x)*Q21[intensity])));
}
pixels+=(clahe_info->width-tile->width);
}
}
|
C
|
ImageMagick
| 0 |
CVE-2015-8325
|
https://www.cvedetails.com/cve/CVE-2015-8325/
|
CWE-264
|
https://anongit.mindrot.org/openssh.git/commit/?id=85bdcd7c92fe7ff133bbc4e10a65c91810f88755
|
85bdcd7c92fe7ff133bbc4e10a65c91810f88755
| null |
session_x11_req(Session *s)
{
int success;
if (s->auth_proto != NULL || s->auth_data != NULL) {
error("session_x11_req: session %d: "
"x11 forwarding already active", s->self);
return 0;
}
s->single_connection = packet_get_char();
s->auth_proto = packet_get_string(NULL);
s->auth_data = packet_get_string(NULL);
s->screen = packet_get_int();
packet_check_eom();
if (xauth_valid_string(s->auth_proto) &&
xauth_valid_string(s->auth_data))
success = session_setup_x11fwd(s);
else {
success = 0;
error("Invalid X11 forwarding data");
}
if (!success) {
free(s->auth_proto);
free(s->auth_data);
s->auth_proto = NULL;
s->auth_data = NULL;
}
return success;
}
|
session_x11_req(Session *s)
{
int success;
if (s->auth_proto != NULL || s->auth_data != NULL) {
error("session_x11_req: session %d: "
"x11 forwarding already active", s->self);
return 0;
}
s->single_connection = packet_get_char();
s->auth_proto = packet_get_string(NULL);
s->auth_data = packet_get_string(NULL);
s->screen = packet_get_int();
packet_check_eom();
if (xauth_valid_string(s->auth_proto) &&
xauth_valid_string(s->auth_data))
success = session_setup_x11fwd(s);
else {
success = 0;
error("Invalid X11 forwarding data");
}
if (!success) {
free(s->auth_proto);
free(s->auth_data);
s->auth_proto = NULL;
s->auth_data = NULL;
}
return success;
}
|
C
|
mindrot
| 0 |
CVE-2015-1210, CVE-2015-1211
| null | null |
https://github.com/chromium/chromium/commit/6d067124e87295721c62a77f0610e4b37f6098ad
|
6d067124e87295721c62a77f0610e4b37f6098ad
|
Use correct context when throwing an exception
BUG=453979
[email protected]
Review URL: https://codereview.chromium.org/895553002
git-svn-id: svn://svn.chromium.org/blink/trunk@189325 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
v8::Handle<v8::Value> V8ThrowException::createRangeError(v8::Isolate* isolate, const String& message)
{
return v8::Exception::RangeError(v8String(isolate, message.isNull() ? "Range error" : message));
}
|
v8::Handle<v8::Value> V8ThrowException::createRangeError(v8::Isolate* isolate, const String& message)
{
return v8::Exception::RangeError(v8String(isolate, message.isNull() ? "Range error" : message));
}
|
C
|
Chrome
| 0 |
CVE-2018-6085
|
https://www.cvedetails.com/cve/CVE-2018-6085/
|
CWE-20
|
https://github.com/chromium/chromium/commit/df5b1e1f88e013bc96107cc52c4a4f33a8238444
|
df5b1e1f88e013bc96107cc52c4a4f33a8238444
|
Blockfile cache: fix long-standing sparse + evict reentrancy problem
Thanks to nedwilliamson@ (on gmail) for an alternative perspective
plus a reduction to make fixing this much easier.
Bug: 826626, 518908, 537063, 802886
Change-Id: Ibfa01416f9a8e7f7b361e4f93b4b6b134728b85f
Reviewed-on: https://chromium-review.googlesource.com/985052
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Maks Orlovich <[email protected]>
Cr-Commit-Position: refs/heads/master@{#547103}
|
BackendImpl::BackendImpl(
const base::FilePath& path,
scoped_refptr<BackendCleanupTracker> cleanup_tracker,
const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread,
net::NetLog* net_log)
: cleanup_tracker_(std::move(cleanup_tracker)),
background_queue_(this, FallbackToInternalIfNull(cache_thread)),
path_(path),
block_files_(path),
mask_(0),
max_size_(0),
up_ticks_(0),
cache_type_(net::DISK_CACHE),
uma_report_(0),
user_flags_(0),
init_(false),
restarted_(false),
unit_test_(false),
read_only_(false),
disabled_(false),
new_eviction_(false),
first_timer_(true),
user_load_(false),
consider_evicting_at_op_end_(false),
net_log_(net_log),
done_(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED),
ptr_factory_(this) {}
|
BackendImpl::BackendImpl(
const base::FilePath& path,
scoped_refptr<BackendCleanupTracker> cleanup_tracker,
const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread,
net::NetLog* net_log)
: cleanup_tracker_(std::move(cleanup_tracker)),
background_queue_(this, FallbackToInternalIfNull(cache_thread)),
path_(path),
block_files_(path),
mask_(0),
max_size_(0),
up_ticks_(0),
cache_type_(net::DISK_CACHE),
uma_report_(0),
user_flags_(0),
init_(false),
restarted_(false),
unit_test_(false),
read_only_(false),
disabled_(false),
new_eviction_(false),
first_timer_(true),
user_load_(false),
net_log_(net_log),
done_(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED),
ptr_factory_(this) {}
|
C
|
Chrome
| 1 |
CVE-2018-6061
|
https://www.cvedetails.com/cve/CVE-2018-6061/
|
CWE-362
|
https://github.com/chromium/chromium/commit/70340ce072cee8a0bdcddb5f312d32567b2269f6
|
70340ce072cee8a0bdcddb5f312d32567b2269f6
|
vaapi vda: Delete owned objects on worker thread in Cleanup()
This CL adds a SEQUENCE_CHECKER to Vaapi*Accelerator classes, and
posts the destruction of those objects to the appropriate thread on
Cleanup().
Also makes {H264,VP8,VP9}Picture RefCountedThreadSafe, see miu@
comment in
https://chromium-review.googlesource.com/c/chromium/src/+/794091#message-a64bed985cfaf8a19499a517bb110a7ce581dc0f
TEST=play back VP9/VP8/H264 w/ simplechrome on soraka, Release build
unstripped, let video play for a few seconds then navigate back; no
crashes. Unittests as before:
video_decode_accelerator_unittest --test_video_data=test-25fps.vp9:320:240:250:250:35:150:12
video_decode_accelerator_unittest --test_video_data=test-25fps.vp8:320:240:250:250:35:150:11
video_decode_accelerator_unittest --test_video_data=test-25fps.h264:320:240:250:258:35:150:1
Bug: 789160
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I7d96aaf89c92bf46f00c8b8b36798e057a842ed2
Reviewed-on: https://chromium-review.googlesource.com/794091
Reviewed-by: Pawel Osciak <[email protected]>
Commit-Queue: Miguel Casas <[email protected]>
Cr-Commit-Position: refs/heads/master@{#523372}
|
void VaapiVideoDecodeAccelerator::ImportBufferForPicture(
int32_t picture_buffer_id,
const gfx::GpuMemoryBufferHandle& gpu_memory_buffer_handle) {
VLOGF(2) << "Importing picture id: " << picture_buffer_id;
DCHECK(task_runner_->BelongsToCurrentThread());
if (output_mode_ != Config::OutputMode::IMPORT) {
CloseGpuMemoryBufferHandle(gpu_memory_buffer_handle);
VLOGF(1) << "Cannot import in non-import mode";
NotifyError(INVALID_ARGUMENT);
return;
}
VaapiPicture* picture = PictureById(picture_buffer_id);
if (!picture) {
CloseGpuMemoryBufferHandle(gpu_memory_buffer_handle);
VLOGF(3) << "got picture id=" << picture_buffer_id
<< " not in use (anymore?).";
return;
}
if (!picture->ImportGpuMemoryBufferHandle(output_format_,
gpu_memory_buffer_handle)) {
VLOGF(1) << "Failed to import GpuMemoryBufferHandle";
NotifyError(PLATFORM_FAILURE);
return;
}
ReusePictureBuffer(picture_buffer_id);
}
|
void VaapiVideoDecodeAccelerator::ImportBufferForPicture(
int32_t picture_buffer_id,
const gfx::GpuMemoryBufferHandle& gpu_memory_buffer_handle) {
VLOGF(2) << "Importing picture id: " << picture_buffer_id;
DCHECK(task_runner_->BelongsToCurrentThread());
if (output_mode_ != Config::OutputMode::IMPORT) {
CloseGpuMemoryBufferHandle(gpu_memory_buffer_handle);
VLOGF(1) << "Cannot import in non-import mode";
NotifyError(INVALID_ARGUMENT);
return;
}
VaapiPicture* picture = PictureById(picture_buffer_id);
if (!picture) {
CloseGpuMemoryBufferHandle(gpu_memory_buffer_handle);
VLOGF(3) << "got picture id=" << picture_buffer_id
<< " not in use (anymore?).";
return;
}
if (!picture->ImportGpuMemoryBufferHandle(output_format_,
gpu_memory_buffer_handle)) {
VLOGF(1) << "Failed to import GpuMemoryBufferHandle";
NotifyError(PLATFORM_FAILURE);
return;
}
ReusePictureBuffer(picture_buffer_id);
}
|
C
|
Chrome
| 0 |
CVE-2018-17467
|
https://www.cvedetails.com/cve/CVE-2018-17467/
|
CWE-20
|
https://github.com/chromium/chromium/commit/7da6c3419fd172405bcece1ae4ec6ec8316cd345
|
7da6c3419fd172405bcece1ae4ec6ec8316cd345
|
Start rendering timer after first navigation
Currently the new content rendering timer in the browser process,
which clears an old page's contents 4 seconds after a navigation if the
new page doesn't draw in that time, is not set on the first navigation
for a top-level frame.
This is problematic because content can exist before the first
navigation, for instance if it was created by a javascript: URL.
This CL removes the code that skips the timer activation on the first
navigation.
Bug: 844881
Change-Id: I19b3ad1ff62c69ded3a5f7b1c0afde191aaf4584
Reviewed-on: https://chromium-review.googlesource.com/1188589
Reviewed-by: Fady Samuel <[email protected]>
Reviewed-by: ccameron <[email protected]>
Commit-Queue: Ken Buchanan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586913}
|
std::vector<DropData::Metadata> DropDataToMetaData(const DropData& drop_data) {
std::vector<DropData::Metadata> metadata;
if (!drop_data.text.is_null()) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::STRING,
base::ASCIIToUTF16(ui::Clipboard::kMimeTypeText)));
}
if (drop_data.url.is_valid()) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::STRING,
base::ASCIIToUTF16(ui::Clipboard::kMimeTypeURIList)));
}
if (!drop_data.html.is_null()) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::STRING,
base::ASCIIToUTF16(ui::Clipboard::kMimeTypeHTML)));
}
for (const auto& file_info : drop_data.filenames) {
if (!file_info.path.empty()) {
metadata.push_back(DropData::Metadata::CreateForFilePath(file_info.path));
}
}
for (const auto& mime_type : drop_data.file_mime_types) {
if (!mime_type.empty()) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::FILENAME, mime_type));
}
}
for (const auto& file_system_file : drop_data.file_system_files) {
if (!file_system_file.url.is_empty()) {
metadata.push_back(
DropData::Metadata::CreateForFileSystemUrl(file_system_file.url));
}
}
for (const auto& custom_data_item : drop_data.custom_data) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::STRING, custom_data_item.first));
}
return metadata;
}
|
std::vector<DropData::Metadata> DropDataToMetaData(const DropData& drop_data) {
std::vector<DropData::Metadata> metadata;
if (!drop_data.text.is_null()) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::STRING,
base::ASCIIToUTF16(ui::Clipboard::kMimeTypeText)));
}
if (drop_data.url.is_valid()) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::STRING,
base::ASCIIToUTF16(ui::Clipboard::kMimeTypeURIList)));
}
if (!drop_data.html.is_null()) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::STRING,
base::ASCIIToUTF16(ui::Clipboard::kMimeTypeHTML)));
}
for (const auto& file_info : drop_data.filenames) {
if (!file_info.path.empty()) {
metadata.push_back(DropData::Metadata::CreateForFilePath(file_info.path));
}
}
for (const auto& mime_type : drop_data.file_mime_types) {
if (!mime_type.empty()) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::FILENAME, mime_type));
}
}
for (const auto& file_system_file : drop_data.file_system_files) {
if (!file_system_file.url.is_empty()) {
metadata.push_back(
DropData::Metadata::CreateForFileSystemUrl(file_system_file.url));
}
}
for (const auto& custom_data_item : drop_data.custom_data) {
metadata.push_back(DropData::Metadata::CreateForMimeType(
DropData::Kind::STRING, custom_data_item.first));
}
return metadata;
}
|
C
|
Chrome
| 0 |
CVE-2015-8816
|
https://www.cvedetails.com/cve/CVE-2015-8816/
| null |
https://github.com/torvalds/linux/commit/e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
|
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
|
USB: fix invalid memory access in hub_activate()
Commit 8520f38099cc ("USB: change hub initialization sleeps to
delayed_work") changed the hub_activate() routine to make part of it
run in a workqueue. However, the commit failed to take a reference to
the usb_hub structure or to lock the hub interface while doing so. As
a result, if a hub is plugged in and quickly unplugged before the work
routine can run, the routine will try to access memory that has been
deallocated. Or, if the hub is unplugged while the routine is
running, the memory may be deallocated while it is in active use.
This patch fixes the problem by taking a reference to the usb_hub at
the start of hub_activate() and releasing it at the end (when the work
is finished), and by locking the hub interface while the work routine
is running. It also adds a check at the start of the routine to see
if the hub has already been disconnected, in which nothing should be
done.
Signed-off-by: Alan Stern <[email protected]>
Reported-by: Alexandru Cornea <[email protected]>
Tested-by: Alexandru Cornea <[email protected]>
Fixes: 8520f38099cc ("USB: change hub initialization sleeps to delayed_work")
CC: <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static void choose_devnum(struct usb_device *udev)
{
int devnum;
struct usb_bus *bus = udev->bus;
/* be safe when more hub events are proceed in parallel */
mutex_lock(&bus->usb_address0_mutex);
if (udev->wusb) {
devnum = udev->portnum + 1;
BUG_ON(test_bit(devnum, bus->devmap.devicemap));
} else {
/* Try to allocate the next devnum beginning at
* bus->devnum_next. */
devnum = find_next_zero_bit(bus->devmap.devicemap, 128,
bus->devnum_next);
if (devnum >= 128)
devnum = find_next_zero_bit(bus->devmap.devicemap,
128, 1);
bus->devnum_next = (devnum >= 127 ? 1 : devnum + 1);
}
if (devnum < 128) {
set_bit(devnum, bus->devmap.devicemap);
udev->devnum = devnum;
}
mutex_unlock(&bus->usb_address0_mutex);
}
|
static void choose_devnum(struct usb_device *udev)
{
int devnum;
struct usb_bus *bus = udev->bus;
/* be safe when more hub events are proceed in parallel */
mutex_lock(&bus->usb_address0_mutex);
if (udev->wusb) {
devnum = udev->portnum + 1;
BUG_ON(test_bit(devnum, bus->devmap.devicemap));
} else {
/* Try to allocate the next devnum beginning at
* bus->devnum_next. */
devnum = find_next_zero_bit(bus->devmap.devicemap, 128,
bus->devnum_next);
if (devnum >= 128)
devnum = find_next_zero_bit(bus->devmap.devicemap,
128, 1);
bus->devnum_next = (devnum >= 127 ? 1 : devnum + 1);
}
if (devnum < 128) {
set_bit(devnum, bus->devmap.devicemap);
udev->devnum = devnum;
}
mutex_unlock(&bus->usb_address0_mutex);
}
|
C
|
linux
| 0 |
CVE-2018-9490
|
https://www.cvedetails.com/cve/CVE-2018-9490/
|
CWE-704
|
https://android.googlesource.com/platform/external/v8/+/a24543157ae2cdd25da43e20f4e48a07481e6ceb
|
a24543157ae2cdd25da43e20f4e48a07481e6ceb
|
Backport: Fix Object.entries/values with changing elements
Bug: 111274046
Test: m -j proxy_resolver_v8_unittest && adb sync && adb shell \
/data/nativetest64/proxy_resolver_v8_unittest/proxy_resolver_v8_unittest
Change-Id: I705fc512cc5837e9364ed187559cc75d079aa5cb
(cherry picked from commit d8be9a10287afed07705ac8af027d6a46d4def99)
|
static Handle<SeededNumberDictionary> NormalizeImpl(
Handle<JSObject> object, Handle<FixedArrayBase> elements) {
UNREACHABLE();
return Handle<SeededNumberDictionary>();
}
|
static Handle<SeededNumberDictionary> NormalizeImpl(
Handle<JSObject> object, Handle<FixedArrayBase> elements) {
UNREACHABLE();
return Handle<SeededNumberDictionary>();
}
|
C
|
Android
| 0 |
CVE-2016-7141
|
https://www.cvedetails.com/cve/CVE-2016-7141/
|
CWE-287
|
https://github.com/curl/curl/commit/curl-7_50_2~32
|
curl-7_50_2~32
|
nss: refuse previously loaded certificate from file
... when we are not asked to use a certificate from file
|
static char * nss_get_password(PK11SlotInfo * slot, PRBool retry, void *arg)
{
(void)slot; /* unused */
if(retry || NULL == arg)
return NULL;
else
return (char *)PORT_Strdup((char *)arg);
}
|
static char * nss_get_password(PK11SlotInfo * slot, PRBool retry, void *arg)
{
(void)slot; /* unused */
if(retry || NULL == arg)
return NULL;
else
return (char *)PORT_Strdup((char *)arg);
}
|
C
|
curl
| 0 |
CVE-2013-7421
|
https://www.cvedetails.com/cve/CVE-2013-7421/
|
CWE-264
|
https://github.com/torvalds/linux/commit/5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypto API,
as demonstrated by Mathias Krause:
https://lkml.org/lkml/2013/3/4/70
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
void *control_word, u32 count)
{
u32 initial = count & (ecb_fetch_blocks - 1);
if (count < ecb_fetch_blocks) {
ecb_crypt(input, output, key, control_word, count);
return;
}
if (initial)
asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
: "+S"(input), "+D"(output)
: "d"(control_word), "b"(key), "c"(initial));
asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
: "+S"(input), "+D"(output)
: "d"(control_word), "b"(key), "c"(count - initial));
}
|
static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
void *control_word, u32 count)
{
u32 initial = count & (ecb_fetch_blocks - 1);
if (count < ecb_fetch_blocks) {
ecb_crypt(input, output, key, control_word, count);
return;
}
if (initial)
asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
: "+S"(input), "+D"(output)
: "d"(control_word), "b"(key), "c"(initial));
asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
: "+S"(input), "+D"(output)
: "d"(control_word), "b"(key), "c"(count - initial));
}
|
C
|
linux
| 0 |
CVE-2016-8740
|
https://www.cvedetails.com/cve/CVE-2016-8740/
|
CWE-20
|
https://github.com/apache/httpd/commit/29c63b786ae028d82405421585e91283c8fa0da3
|
29c63b786ae028d82405421585e91283c8fa0da3
|
SECURITY: CVE-2016-8740
mod_http2: properly crafted, endless HTTP/2 CONTINUATION frames could be used to exhaust all server's memory.
Reported by: Naveen Tiwari <[email protected]> and CDF/SEFCOM at Arizona State University
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1772576 13f79535-47bb-0310-9956-ffa450edef68
|
static h2_stream *get_stream(h2_session *session, int stream_id)
{
return nghttp2_session_get_stream_user_data(session->ngh2, stream_id);
}
|
static h2_stream *get_stream(h2_session *session, int stream_id)
{
return nghttp2_session_get_stream_user_data(session->ngh2, stream_id);
}
|
C
|
httpd
| 0 |
CVE-2016-1908
|
https://www.cvedetails.com/cve/CVE-2016-1908/
|
CWE-254
|
https://anongit.mindrot.org/openssh.git/commit/?id=ed4ce82dbfa8a3a3c8ea6fa0db113c71e234416c
|
ed4ce82dbfa8a3a3c8ea6fa0db113c71e234416c
| null |
control_client_sigrelay(int signo)
{
int save_errno = errno;
if (muxserver_pid > 1)
kill(muxserver_pid, signo);
errno = save_errno;
}
|
control_client_sigrelay(int signo)
{
int save_errno = errno;
if (muxserver_pid > 1)
kill(muxserver_pid, signo);
errno = save_errno;
}
|
C
|
mindrot
| 0 |
CVE-2017-15423
|
https://www.cvedetails.com/cve/CVE-2017-15423/
|
CWE-310
|
https://github.com/chromium/chromium/commit/a263d1cf62a9c75be6aaafdec88aacfcef1e8fd2
|
a263d1cf62a9c75be6aaafdec88aacfcef1e8fd2
|
Roll src/third_party/boringssl/src 664e99a64..696c13bd6
https://boringssl.googlesource.com/boringssl/+log/664e99a6486c293728097c661332f92bf2d847c6..696c13bd6ab78011adfe7b775519c8b7cc82b604
BUG=778101
Change-Id: I8dda4f3db952597148e3c7937319584698d00e1c
Reviewed-on: https://chromium-review.googlesource.com/747941
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: David Benjamin <[email protected]>
Commit-Queue: Steven Valdez <[email protected]>
Cr-Commit-Position: refs/heads/master@{#513774}
|
void RenderThreadImpl::RegisterExtension(v8::Extension* extension) {
WebScriptController::RegisterExtension(extension);
}
|
void RenderThreadImpl::RegisterExtension(v8::Extension* extension) {
WebScriptController::RegisterExtension(extension);
}
|
C
|
Chrome
| 0 |
CVE-2016-5192
|
https://www.cvedetails.com/cve/CVE-2016-5192/
|
CWE-284
|
https://github.com/chromium/chromium/commit/e99cc8e5a48ff4978d401c48a64f06649f647f3f
|
e99cc8e5a48ff4978d401c48a64f06649f647f3f
|
Check CORS policy on redirect in TextTrackLoader
BUG=633885
TEST=new case in http/tests/security/text-track-crossorigin.html
Review-Url: https://codereview.chromium.org/2367583002
Cr-Commit-Position: refs/heads/master@{#421919}
|
void TextTrackLoader::corsPolicyPreventedLoad(SecurityOrigin* securityOrigin, const KURL& url)
{
String consoleMessage("Text track from origin '" + SecurityOrigin::create(url)->toString() + "' has been blocked from loading: Not at same origin as the document, and parent of track element does not have a 'crossorigin' attribute. Origin '" + securityOrigin->toString() + "' is therefore not allowed access.");
document().addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, consoleMessage));
m_state = Failed;
}
|
void TextTrackLoader::corsPolicyPreventedLoad(SecurityOrigin* securityOrigin, const KURL& url)
{
String consoleMessage("Text track from origin '" + SecurityOrigin::create(url)->toString() + "' has been blocked from loading: Not at same origin as the document, and parent of track element does not have a 'crossorigin' attribute. Origin '" + securityOrigin->toString() + "' is therefore not allowed access.");
document().addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, consoleMessage));
m_state = Failed;
}
|
C
|
Chrome
| 0 |
CVE-2015-6787
|
https://www.cvedetails.com/cve/CVE-2015-6787/
| null |
https://github.com/chromium/chromium/commit/f911e11e7f6b5c0d6f5ee694a9871de6619889f7
|
f911e11e7f6b5c0d6f5ee694a9871de6619889f7
|
Reland "[CI] Make paint property nodes non-ref-counted"
This reverts commit 887383b30842d9d9006e11bb6932660a3cb5b1b7.
Reason for revert: Retry in M69.
Original change's description:
> Revert "[CI] Make paint property nodes non-ref-counted"
>
> This reverts commit 70fc0b018c9517558b7aa2be00edf2debb449123.
>
> Reason for revert: Caused bugs found by clusterfuzz
>
> Original change's description:
> > [CI] Make paint property nodes non-ref-counted
> >
> > Now all paint property nodes are owned by ObjectPaintProperties
> > (and LocalFrameView temporarily before removing non-RLS mode).
> > Others just use raw pointers or references.
> >
> > Bug: 833496
> > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> > Change-Id: I2d544fe153bb94698623248748df63c8aa2081ae
> > Reviewed-on: https://chromium-review.googlesource.com/1031101
> > Reviewed-by: Tien-Ren Chen <[email protected]>
> > Commit-Queue: Xianzhu Wang <[email protected]>
> > Cr-Commit-Position: refs/heads/master@{#554626}
>
> [email protected],[email protected],[email protected]
>
> Change-Id: I02bb50d6744cb81a797246a0116b677e80a3c69f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 833496,837932,837943
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Reviewed-on: https://chromium-review.googlesource.com/1034292
> Reviewed-by: Xianzhu Wang <[email protected]>
> Commit-Queue: Xianzhu Wang <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#554653}
[email protected],[email protected],[email protected]
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 833496, 837932, 837943
Change-Id: I0b4ef70db1f1f211ba97c30d617225355c750992
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/1083491
Commit-Queue: Xianzhu Wang <[email protected]>
Reviewed-by: Xianzhu Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#563930}
|
void PropertyTreeManager::CreateCompositorScrollNode(
const ScrollPaintPropertyNode* scroll_node,
const cc::TransformNode& scroll_offset_translation) {
DCHECK(!scroll_node_map_.Contains(scroll_node));
auto parent_it = scroll_node_map_.find(scroll_node->Parent());
DCHECK(parent_it != scroll_node_map_.end());
int parent_id = parent_it->value;
int id = GetScrollTree().Insert(cc::ScrollNode(), parent_id);
cc::ScrollNode& compositor_node = *GetScrollTree().Node(id);
compositor_node.scrollable = true;
compositor_node.container_bounds =
static_cast<gfx::Size>(scroll_node->ContainerRect().Size());
compositor_node.bounds =
static_cast<gfx::Size>(scroll_node->ContentsRect().Size());
compositor_node.user_scrollable_horizontal =
scroll_node->UserScrollableHorizontal();
compositor_node.user_scrollable_vertical =
scroll_node->UserScrollableVertical();
compositor_node.main_thread_scrolling_reasons =
scroll_node->GetMainThreadScrollingReasons();
auto compositor_element_id = scroll_node->GetCompositorElementId();
if (compositor_element_id) {
compositor_node.element_id = compositor_element_id;
property_trees_.element_id_to_scroll_node_index[compositor_element_id] = id;
}
compositor_node.transform_id = scroll_offset_translation.id;
auto result = scroll_node_map_.Set(scroll_node, id);
DCHECK(result.is_new_entry);
GetScrollTree().SetScrollOffset(compositor_element_id,
scroll_offset_translation.scroll_offset);
GetScrollTree().set_needs_update(true);
}
|
void PropertyTreeManager::CreateCompositorScrollNode(
const ScrollPaintPropertyNode* scroll_node,
const cc::TransformNode& scroll_offset_translation) {
DCHECK(!scroll_node_map_.Contains(scroll_node));
auto parent_it = scroll_node_map_.find(scroll_node->Parent());
DCHECK(parent_it != scroll_node_map_.end());
int parent_id = parent_it->value;
int id = GetScrollTree().Insert(cc::ScrollNode(), parent_id);
cc::ScrollNode& compositor_node = *GetScrollTree().Node(id);
compositor_node.scrollable = true;
compositor_node.container_bounds =
static_cast<gfx::Size>(scroll_node->ContainerRect().Size());
compositor_node.bounds =
static_cast<gfx::Size>(scroll_node->ContentsRect().Size());
compositor_node.user_scrollable_horizontal =
scroll_node->UserScrollableHorizontal();
compositor_node.user_scrollable_vertical =
scroll_node->UserScrollableVertical();
compositor_node.main_thread_scrolling_reasons =
scroll_node->GetMainThreadScrollingReasons();
auto compositor_element_id = scroll_node->GetCompositorElementId();
if (compositor_element_id) {
compositor_node.element_id = compositor_element_id;
property_trees_.element_id_to_scroll_node_index[compositor_element_id] = id;
}
compositor_node.transform_id = scroll_offset_translation.id;
auto result = scroll_node_map_.Set(scroll_node, id);
DCHECK(result.is_new_entry);
GetScrollTree().SetScrollOffset(compositor_element_id,
scroll_offset_translation.scroll_offset);
GetScrollTree().set_needs_update(true);
}
|
C
|
Chrome
| 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]>
|
int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
unsigned int flags)
{
int fput_needed, err, datagrams;
struct socket *sock;
struct mmsghdr __user *entry;
struct compat_mmsghdr __user *compat_entry;
struct msghdr msg_sys;
struct used_address used_address;
if (vlen > UIO_MAXIOV)
vlen = UIO_MAXIOV;
datagrams = 0;
sock = sockfd_lookup_light(fd, &err, &fput_needed);
if (!sock)
return err;
used_address.name_len = UINT_MAX;
entry = mmsg;
compat_entry = (struct compat_mmsghdr __user *)mmsg;
err = 0;
while (datagrams < vlen) {
if (MSG_CMSG_COMPAT & flags) {
err = __sys_sendmsg(sock, (struct msghdr __user *)compat_entry,
&msg_sys, flags, &used_address);
if (err < 0)
break;
err = __put_user(err, &compat_entry->msg_len);
++compat_entry;
} else {
err = __sys_sendmsg(sock, (struct msghdr __user *)entry,
&msg_sys, flags, &used_address);
if (err < 0)
break;
err = put_user(err, &entry->msg_len);
++entry;
}
if (err)
break;
++datagrams;
}
fput_light(sock->file, fput_needed);
/* We only return an error if no datagrams were able to be sent */
if (datagrams != 0)
return datagrams;
return err;
}
|
int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
unsigned int flags)
{
int fput_needed, err, datagrams;
struct socket *sock;
struct mmsghdr __user *entry;
struct compat_mmsghdr __user *compat_entry;
struct msghdr msg_sys;
struct used_address used_address;
if (vlen > UIO_MAXIOV)
vlen = UIO_MAXIOV;
datagrams = 0;
sock = sockfd_lookup_light(fd, &err, &fput_needed);
if (!sock)
return err;
used_address.name_len = UINT_MAX;
entry = mmsg;
compat_entry = (struct compat_mmsghdr __user *)mmsg;
err = 0;
while (datagrams < vlen) {
if (MSG_CMSG_COMPAT & flags) {
err = __sys_sendmsg(sock, (struct msghdr __user *)compat_entry,
&msg_sys, flags, &used_address);
if (err < 0)
break;
err = __put_user(err, &compat_entry->msg_len);
++compat_entry;
} else {
err = __sys_sendmsg(sock, (struct msghdr __user *)entry,
&msg_sys, flags, &used_address);
if (err < 0)
break;
err = put_user(err, &entry->msg_len);
++entry;
}
if (err)
break;
++datagrams;
}
fput_light(sock->file, fput_needed);
/* We only return an error if no datagrams were able to be sent */
if (datagrams != 0)
return datagrams;
return err;
}
|
C
|
linux
| 0 |
CVE-2012-2895
|
https://www.cvedetails.com/cve/CVE-2012-2895/
|
CWE-119
|
https://github.com/chromium/chromium/commit/16dcd30c215801941d9890859fd79a234128fc3e
|
16dcd30c215801941d9890859fd79a234128fc3e
|
Refactors to simplify rename pathway in DownloadFileManager.
This is https://chromiumcodereview.appspot.com/10668004 / r144817 (reverted
due to CrOS failure) with the completion logic moved to after the
auto-opening. The tests that test the auto-opening (for web store install)
were waiting for download completion to check install, and hence were
failing when completion was moved earlier.
Doing this right would probably require another state (OPENED).
BUG=123998
BUG-134930
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10701040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145157 0039d316-1c4b-4281-b951-d872f2087c98
|
void DownloadItemImpl::OnAllDataSaved(
int64 size, const std::string& final_hash) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!all_data_saved_);
all_data_saved_ = true;
ProgressComplete(size, final_hash);
UpdateObservers();
}
|
void DownloadItemImpl::OnAllDataSaved(
int64 size, const std::string& final_hash) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!all_data_saved_);
all_data_saved_ = true;
ProgressComplete(size, final_hash);
UpdateObservers();
}
|
C
|
Chrome
| 0 |
CVE-2016-10218
|
https://www.cvedetails.com/cve/CVE-2016-10218/
|
CWE-476
|
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=d621292fb2c8157d9899dcd83fd04dd250e30fe4
|
d621292fb2c8157d9899dcd83fd04dd250e30fe4
| null |
pdf14_grayspot_get_color_comp_index(gx_device * dev, const char * pname,
int name_size, int component_type)
{
return pdf14_spot_get_color_comp_index(dev, pname, name_size, component_type, 1);
}
|
pdf14_grayspot_get_color_comp_index(gx_device * dev, const char * pname,
int name_size, int component_type)
{
return pdf14_spot_get_color_comp_index(dev, pname, name_size, component_type, 1);
}
|
C
|
ghostscript
| 0 |
CVE-2017-16803
|
https://www.cvedetails.com/cve/CVE-2017-16803/
|
CWE-119
|
https://github.com/libav/libav/commit/cd4663dc80323ba64989d0c103d51ad3ee0e9c2f
|
cd4663dc80323ba64989d0c103d51ad3ee0e9c2f
|
smacker: add sanity check for length in smacker_decode_tree()
Signed-off-by: Michael Niedermayer <[email protected]>
Bug-Id: 1098
Cc: [email protected]
Signed-off-by: Sean McGovern <[email protected]>
|
static av_cold int decode_end(AVCodecContext *avctx)
{
SmackVContext * const smk = avctx->priv_data;
av_freep(&smk->mmap_tbl);
av_freep(&smk->mclr_tbl);
av_freep(&smk->full_tbl);
av_freep(&smk->type_tbl);
av_frame_free(&smk->pic);
return 0;
}
|
static av_cold int decode_end(AVCodecContext *avctx)
{
SmackVContext * const smk = avctx->priv_data;
av_freep(&smk->mmap_tbl);
av_freep(&smk->mclr_tbl);
av_freep(&smk->full_tbl);
av_freep(&smk->type_tbl);
av_frame_free(&smk->pic);
return 0;
}
|
C
|
libav
| 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.