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-2011-3053
|
https://www.cvedetails.com/cve/CVE-2011-3053/
|
CWE-399
|
https://github.com/chromium/chromium/commit/c442b3eda2f1fdd4d1d4864c34c43cbaf223acae
|
c442b3eda2f1fdd4d1d4864c34c43cbaf223acae
|
chromeos: Move audio, power, and UI files into subdirs.
This moves more files from chrome/browser/chromeos/ into
subdirectories.
BUG=chromium-os:22896
TEST=did chrome os builds both with and without aura
TBR=sky
Review URL: http://codereview.chromium.org/9125006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116746 0039d316-1c4b-4281-b951-d872f2087c98
|
void SystemKeyEventListener::DidProcessEvent(const base::NativeEvent& event) {
}
|
void SystemKeyEventListener::DidProcessEvent(const base::NativeEvent& event) {
}
|
C
|
Chrome
| 0 |
CVE-2016-6720
|
https://www.cvedetails.com/cve/CVE-2016-6720/
|
CWE-200
|
https://android.googlesource.com/platform/frameworks/av/+/0f177948ae2640bfe4d70f8e4248e106406b3b0a
|
0f177948ae2640bfe4d70f8e4248e106406b3b0a
|
DO NOT MERGE: IOMX: work against metadata buffer spoofing
- Prohibit direct set/getParam/Settings for extensions meant for
OMXNodeInstance alone. This disallows enabling metadata mode
without the knowledge of OMXNodeInstance.
- Use a backup buffer for metadata mode buffers and do not directly
share with clients.
- Disallow setting up metadata mode/tunneling/input surface
after first sendCommand.
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.
Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
(cherry picked from commit 7c3c2fa3e233c656fc8c2fc2a6634b3ecf8a23e8)
|
void CopyFromOMX(const OMX_BUFFERHEADERTYPE *header) {
if (!mCopyFromOmx) {
return;
}
sp<ABuffer> codec = getBuffer(header, false /* backup */, true /* limit */);
memcpy((OMX_U8 *)mMem->pointer() + header->nOffset, codec->data(), codec->size());
}
|
void CopyFromOMX(const OMX_BUFFERHEADERTYPE *header) {
if (!mIsBackup) {
return;
}
sp<ABuffer> codec = getBuffer(header, false /* backup */, true /* limit */);
memcpy((OMX_U8 *)mMem->pointer() + header->nOffset, codec->data(), codec->size());
}
|
C
|
Android
| 1 |
CVE-2016-2496
|
https://www.cvedetails.com/cve/CVE-2016-2496/
|
CWE-264
|
https://android.googlesource.com/platform/frameworks/native/+/03a53d1c7765eeb3af0bc34c3dff02ada1953fbf
|
03a53d1c7765eeb3af0bc34c3dff02ada1953fbf
|
Add new MotionEvent flag for partially obscured windows.
Due to more complex window layouts resulting in lots of overlapping
windows, the policy around FLAG_WINDOW_IS_OBSCURED has changed to
only be set when the point at which the window was touched is
obscured. Unfortunately, this doesn't prevent tapjacking attacks that
overlay the dialog's text, making a potentially dangerous operation
seem innocuous. To avoid this on particularly sensitive dialogs,
introduce a new flag that really does tell you when your window is
being even partially overlapped.
We aren't exposing this as API since we plan on making the original
flag more robust. This is really a workaround for system dialogs
since we generally know their layout and screen position, and that
they're unlikely to be overlapped by other applications.
Bug: 26677796
Change-Id: I9e336afe90f262ba22015876769a9c510048fd47
|
void InputDispatcher::logDispatchStateLocked() {
String8 dump;
dumpDispatchStateLocked(dump);
char* text = dump.lockBuffer(dump.size());
char* start = text;
while (*start != '\0') {
char* end = strchr(start, '\n');
if (*end == '\n') {
*(end++) = '\0';
}
ALOGD("%s", start);
start = end;
}
}
|
void InputDispatcher::logDispatchStateLocked() {
String8 dump;
dumpDispatchStateLocked(dump);
char* text = dump.lockBuffer(dump.size());
char* start = text;
while (*start != '\0') {
char* end = strchr(start, '\n');
if (*end == '\n') {
*(end++) = '\0';
}
ALOGD("%s", start);
start = end;
}
}
|
C
|
Android
| 0 |
CVE-2018-17476
|
https://www.cvedetails.com/cve/CVE-2018-17476/
|
CWE-20
|
https://github.com/chromium/chromium/commit/3d41e77125f3de8d722b6d8303599abaf2a91667
|
3d41e77125f3de8d722b6d8303599abaf2a91667
|
If a dialog is shown, drop fullscreen.
BUG=875066, 817809, 792876, 812769, 813815
TEST=included
Change-Id: Ic3d697fa3c4b01f5d7fea77391857177ada660db
Reviewed-on: https://chromium-review.googlesource.com/1185208
Reviewed-by: Sidney San Martín <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586418}
|
void Browser::OnWindowClosing() {
if (!ShouldCloseWindow())
return;
bool should_quit_if_last_browser =
browser_shutdown::IsTryingToQuit() ||
KeepAliveRegistry::GetInstance()->IsKeepingAliveOnlyByBrowserOrigin();
if (should_quit_if_last_browser && ShouldStartShutdown())
browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE);
SessionService* session_service =
SessionServiceFactory::GetForProfile(profile());
if (session_service)
session_service->WindowClosing(session_id());
sessions::TabRestoreService* tab_restore_service =
TabRestoreServiceFactory::GetForProfile(profile());
#if defined(USE_AURA)
if (tab_restore_service && is_app() && !is_devtools())
tab_restore_service->BrowserClosing(live_tab_context());
#endif
if (tab_restore_service && is_type_tabbed() && tab_strip_model_->count())
tab_restore_service->BrowserClosing(live_tab_context());
BrowserList::NotifyBrowserCloseStarted(this);
if (!IsFastTabUnloadEnabled())
tab_strip_model_->CloseAllTabs();
}
|
void Browser::OnWindowClosing() {
if (!ShouldCloseWindow())
return;
bool should_quit_if_last_browser =
browser_shutdown::IsTryingToQuit() ||
KeepAliveRegistry::GetInstance()->IsKeepingAliveOnlyByBrowserOrigin();
if (should_quit_if_last_browser && ShouldStartShutdown())
browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE);
SessionService* session_service =
SessionServiceFactory::GetForProfile(profile());
if (session_service)
session_service->WindowClosing(session_id());
sessions::TabRestoreService* tab_restore_service =
TabRestoreServiceFactory::GetForProfile(profile());
#if defined(USE_AURA)
if (tab_restore_service && is_app() && !is_devtools())
tab_restore_service->BrowserClosing(live_tab_context());
#endif
if (tab_restore_service && is_type_tabbed() && tab_strip_model_->count())
tab_restore_service->BrowserClosing(live_tab_context());
BrowserList::NotifyBrowserCloseStarted(this);
if (!IsFastTabUnloadEnabled())
tab_strip_model_->CloseAllTabs();
}
|
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}
|
void DataReductionProxyConfigServiceClient::RetrieveConfig() {
DCHECK(thread_checker_.CalledOnValidThread());
if (!enabled_)
return;
if (!client_config_override_.empty()) {
if (client_config_override_used_) {
return;
}
client_config_override_used_ = true;
std::string override_config;
bool b64_decode_ok =
base::Base64Decode(client_config_override_, &override_config);
LOG_IF(DFATAL, !b64_decode_ok)
<< "The given ClientConfig is not valid base64";
ClientConfig config;
bool was_valid_config = config.ParseFromString(override_config);
LOG_IF(DFATAL, !was_valid_config) << "The given ClientConfig was invalid.";
if (was_valid_config)
ParseAndApplyProxyConfig(config);
return;
}
config_fetch_start_time_ = base::TimeTicks::Now();
RetrieveRemoteConfig();
}
|
void DataReductionProxyConfigServiceClient::RetrieveConfig() {
DCHECK(thread_checker_.CalledOnValidThread());
if (!enabled_)
return;
if (!client_config_override_.empty()) {
if (client_config_override_used_) {
return;
}
client_config_override_used_ = true;
std::string override_config;
bool b64_decode_ok =
base::Base64Decode(client_config_override_, &override_config);
LOG_IF(DFATAL, !b64_decode_ok)
<< "The given ClientConfig is not valid base64";
ClientConfig config;
bool was_valid_config = config.ParseFromString(override_config);
LOG_IF(DFATAL, !was_valid_config) << "The given ClientConfig was invalid.";
if (was_valid_config)
ParseAndApplyProxyConfig(config);
return;
}
config_fetch_start_time_ = base::TimeTicks::Now();
RetrieveRemoteConfig();
}
|
C
|
Chrome
| 0 |
CVE-2013-2548
|
https://www.cvedetails.com/cve/CVE-2013-2548/
|
CWE-310
|
https://github.com/torvalds/linux/commit/9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
|
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
|
crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of the API. Switch to strncpy() to fix this.
2/ crypto_report_one() does not initialize all field of struct
crypto_user_alg. Fix this to fix the heap info leak.
3/ For the module name we should copy only as many bytes as
module_name() returns -- not as much as the destination buffer could
hold. But the current code does not and therefore copies random data
from behind the end of the module name, as the module name is always
shorter than CRYPTO_MAX_ALG_NAME.
Also switch to use strncpy() to copy the algorithm's name and
driver_name. They are strings, after all.
Signed-off-by: Mathias Krause <[email protected]>
Cc: Steffen Klassert <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
static unsigned int crypto_aead_ctxsize(struct crypto_alg *alg, u32 type,
u32 mask)
{
return alg->cra_ctxsize;
}
|
static unsigned int crypto_aead_ctxsize(struct crypto_alg *alg, u32 type,
u32 mask)
{
return alg->cra_ctxsize;
}
|
C
|
linux
| 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::DidCommitSameDocumentNavigation(
std::unique_ptr<FrameHostMsg_DidCommitProvisionalLoad_Params>
validated_params) {
ScopedActiveURL scoped_active_url(
validated_params->url,
frame_tree_node()->frame_tree()->root()->current_origin());
ScopedCommitStateResetter commit_state_resetter(this);
if (!is_active())
return;
TRACE_EVENT2("navigation",
"RenderFrameHostImpl::DidCommitSameDocumentNavigation",
"frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
validated_params->url.possibly_invalid_spec());
bool is_browser_initiated =
same_document_navigation_request_ &&
(same_document_navigation_request_->commit_params().navigation_token ==
validated_params->navigation_token);
if (!DidCommitNavigationInternal(
is_browser_initiated ? std::move(same_document_navigation_request_)
: nullptr,
validated_params.get(), true /* is_same_document_navigation*/)) {
return;
}
commit_state_resetter.disable();
}
|
void RenderFrameHostImpl::DidCommitSameDocumentNavigation(
std::unique_ptr<FrameHostMsg_DidCommitProvisionalLoad_Params>
validated_params) {
ScopedActiveURL scoped_active_url(
validated_params->url,
frame_tree_node()->frame_tree()->root()->current_origin());
ScopedCommitStateResetter commit_state_resetter(this);
if (!is_active())
return;
TRACE_EVENT2("navigation",
"RenderFrameHostImpl::DidCommitSameDocumentNavigation",
"frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
validated_params->url.possibly_invalid_spec());
bool is_browser_initiated =
same_document_navigation_request_ &&
(same_document_navigation_request_->commit_params().navigation_token ==
validated_params->navigation_token);
if (!DidCommitNavigationInternal(
is_browser_initiated ? std::move(same_document_navigation_request_)
: nullptr,
validated_params.get(), true /* is_same_document_navigation*/)) {
return;
}
commit_state_resetter.disable();
}
|
C
|
Chrome
| 0 |
CVE-2013-4592
|
https://www.cvedetails.com/cve/CVE-2013-4592/
|
CWE-399
|
https://github.com/torvalds/linux/commit/12d6e7538e2d418c08f082b1b44ffa5fb7270ed8
|
12d6e7538e2d418c08f082b1b44ffa5fb7270ed8
|
KVM: perform an invalid memslot step for gpa base change
PPC must flush all translations before the new memory slot
is visible.
Signed-off-by: Marcelo Tosatti <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
|
int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc,
gpa_t gpa)
{
struct kvm_memslots *slots = kvm_memslots(kvm);
int offset = offset_in_page(gpa);
gfn_t gfn = gpa >> PAGE_SHIFT;
ghc->gpa = gpa;
ghc->generation = slots->generation;
ghc->memslot = gfn_to_memslot(kvm, gfn);
ghc->hva = gfn_to_hva_many(ghc->memslot, gfn, NULL);
if (!kvm_is_error_hva(ghc->hva))
ghc->hva += offset;
else
return -EFAULT;
return 0;
}
|
int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc,
gpa_t gpa)
{
struct kvm_memslots *slots = kvm_memslots(kvm);
int offset = offset_in_page(gpa);
gfn_t gfn = gpa >> PAGE_SHIFT;
ghc->gpa = gpa;
ghc->generation = slots->generation;
ghc->memslot = gfn_to_memslot(kvm, gfn);
ghc->hva = gfn_to_hva_many(ghc->memslot, gfn, NULL);
if (!kvm_is_error_hva(ghc->hva))
ghc->hva += offset;
else
return -EFAULT;
return 0;
}
|
C
|
linux
| 0 |
CVE-2018-16079
|
https://www.cvedetails.com/cve/CVE-2018-16079/
|
CWE-362
|
https://github.com/chromium/chromium/commit/2c6ce192cb3fb7bfbc3f3f862926dcb65c3891b4
|
2c6ce192cb3fb7bfbc3f3f862926dcb65c3891b4
|
Ensure device choosers are closed on navigation
The requestDevice() IPCs can race with navigation. This change ensures
that choosers are closed on navigation and adds browser tests to
exercise this for Web Bluetooth and WebUSB.
Bug: 723503
Change-Id: I66760161220e17bd2be9309cca228d161fe76e9c
Reviewed-on: https://chromium-review.googlesource.com/1099961
Commit-Queue: Reilly Grant <[email protected]>
Reviewed-by: Michael Wasserman <[email protected]>
Reviewed-by: Jeffrey Yasskin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#569900}
|
CacheQueryResult WebBluetoothServiceImpl::QueryCacheForDevice(
const WebBluetoothDeviceId& device_id) {
const std::string& device_address =
allowed_devices().GetDeviceAddress(device_id);
if (device_address.empty()) {
CrashRendererAndClosePipe(bad_message::BDH_DEVICE_NOT_ALLOWED_FOR_ORIGIN);
return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER);
}
CacheQueryResult result;
result.device = GetAdapter()->GetDevice(device_address);
if (result.device == nullptr) {
result.outcome = CacheQueryOutcome::NO_DEVICE;
}
return result;
}
|
CacheQueryResult WebBluetoothServiceImpl::QueryCacheForDevice(
const WebBluetoothDeviceId& device_id) {
const std::string& device_address =
allowed_devices().GetDeviceAddress(device_id);
if (device_address.empty()) {
CrashRendererAndClosePipe(bad_message::BDH_DEVICE_NOT_ALLOWED_FOR_ORIGIN);
return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER);
}
CacheQueryResult result;
result.device = GetAdapter()->GetDevice(device_address);
if (result.device == nullptr) {
result.outcome = CacheQueryOutcome::NO_DEVICE;
}
return result;
}
|
C
|
Chrome
| 0 |
CVE-2012-2875
|
https://www.cvedetails.com/cve/CVE-2012-2875/
| null |
https://github.com/chromium/chromium/commit/d345af9ed62ee5f431be327967f41c3cc3fe936a
|
d345af9ed62ee5f431be327967f41c3cc3fe936a
|
[BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
https://bugs.webkit.org/show_bug.cgi?id=105143
RIM PR 171941
Reviewed by Rob Buis.
Internally reviewed by George Staikos.
Source/WebCore:
TouchPoint instances now provide document coordinates for the viewport
and content position of the touch event. The pixel coordinates stored
in the TouchPoint should no longer be needed in WebKit.
Also adapt to new method names and encapsulation of TouchPoint data
members.
No change in behavior, no new tests.
* platform/blackberry/PlatformTouchPointBlackBerry.cpp:
(WebCore::PlatformTouchPoint::PlatformTouchPoint):
Source/WebKit/blackberry:
TouchPoint instances now provide document coordinates for the viewport
and content position of the touch event. The pixel coordinates stored
in the TouchPoint should no longer be needed in WebKit. One exception
is when passing events to a full screen plugin.
Also adapt to new method names and encapsulation of TouchPoint data
members.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::touchEvent):
(BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
(BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin):
(BlackBerry::WebKit::WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
* WebKitSupport/InputHandler.h:
(InputHandler):
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::doFatFingers):
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
* WebKitSupport/TouchEventHandler.h:
(TouchEventHandler):
Tools:
Adapt to new method names and encapsulation of TouchPoint data members.
* DumpRenderTree/blackberry/EventSender.cpp:
(addTouchPointCallback):
(updateTouchPointCallback):
(touchEndCallback):
(releaseTouchPointCallback):
(sendTouchEvent):
git-svn-id: svn://svn.chromium.org/blink/trunk@137880 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void WebPage::clearBrowsingData()
{
clearMemoryCaches();
clearAppCache(d->m_page->groupName());
clearLocalStorage();
clearCookieCache();
clearHistory();
clearPluginSiteData();
}
|
void WebPage::clearBrowsingData()
{
clearMemoryCaches();
clearAppCache(d->m_page->groupName());
clearLocalStorage();
clearCookieCache();
clearHistory();
clearPluginSiteData();
}
|
C
|
Chrome
| 0 |
CVE-2018-16077
|
https://www.cvedetails.com/cve/CVE-2018-16077/
|
CWE-285
|
https://github.com/chromium/chromium/commit/90f878780cce9c4b0475fcea14d91b8f510cce11
|
90f878780cce9c4b0475fcea14d91b8f510cce11
|
Prevent sandboxed documents from reusing the default window
Bug: 377995
Change-Id: Iff66c6d214dfd0cb7ea9c80f83afeedfff703541
Reviewed-on: https://chromium-review.googlesource.com/983558
Commit-Queue: Andy Paicu <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#567663}
|
void LocalFrame::CheckCompleted() {
GetDocument()->CheckCompleted();
}
|
void LocalFrame::CheckCompleted() {
GetDocument()->CheckCompleted();
}
|
C
|
Chrome
| 0 |
CVE-2014-3601
|
https://www.cvedetails.com/cve/CVE-2014-3601/
|
CWE-189
|
https://github.com/torvalds/linux/commit/350b8bdd689cd2ab2c67c8a86a0be86cfa0751a7
|
350b8bdd689cd2ab2c67c8a86a0be86cfa0751a7
|
kvm: iommu: fix the third parameter of kvm_iommu_put_pages (CVE-2014-3601)
The third parameter of kvm_iommu_put_pages is wrong,
It should be 'gfn - slot->base_gfn'.
By making gfn very large, malicious guest or userspace can cause kvm to
go to this error path, and subsequently to pass a huge value as size.
Alternatively if gfn is small, then pages would be pinned but never
unpinned, causing host memory leak and local DOS.
Passing a reasonable but large value could be the most dangerous case,
because it would unpin a page that should have stayed pinned, and thus
allow the device to DMA into arbitrary memory. However, this cannot
happen because of the condition that can trigger the error:
- out of memory (where you can't allocate even a single page)
should not be possible for the attacker to trigger
- when exceeding the iommu's address space, guest pages after gfn
will also exceed the iommu's address space, and inside
kvm_iommu_put_pages() the iommu_iova_to_phys() will fail. The
page thus would not be unpinned at all.
Reported-by: Jack Morgenstein <[email protected]>
Cc: [email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
int kvm_iommu_map_guest(struct kvm *kvm)
{
int r;
if (!iommu_present(&pci_bus_type)) {
printk(KERN_ERR "%s: iommu not found\n", __func__);
return -ENODEV;
}
mutex_lock(&kvm->slots_lock);
kvm->arch.iommu_domain = iommu_domain_alloc(&pci_bus_type);
if (!kvm->arch.iommu_domain) {
r = -ENOMEM;
goto out_unlock;
}
if (!allow_unsafe_assigned_interrupts &&
!iommu_domain_has_cap(kvm->arch.iommu_domain,
IOMMU_CAP_INTR_REMAP)) {
printk(KERN_WARNING "%s: No interrupt remapping support,"
" disallowing device assignment."
" Re-enble with \"allow_unsafe_assigned_interrupts=1\""
" module option.\n", __func__);
iommu_domain_free(kvm->arch.iommu_domain);
kvm->arch.iommu_domain = NULL;
r = -EPERM;
goto out_unlock;
}
r = kvm_iommu_map_memslots(kvm);
if (r)
kvm_iommu_unmap_memslots(kvm);
out_unlock:
mutex_unlock(&kvm->slots_lock);
return r;
}
|
int kvm_iommu_map_guest(struct kvm *kvm)
{
int r;
if (!iommu_present(&pci_bus_type)) {
printk(KERN_ERR "%s: iommu not found\n", __func__);
return -ENODEV;
}
mutex_lock(&kvm->slots_lock);
kvm->arch.iommu_domain = iommu_domain_alloc(&pci_bus_type);
if (!kvm->arch.iommu_domain) {
r = -ENOMEM;
goto out_unlock;
}
if (!allow_unsafe_assigned_interrupts &&
!iommu_domain_has_cap(kvm->arch.iommu_domain,
IOMMU_CAP_INTR_REMAP)) {
printk(KERN_WARNING "%s: No interrupt remapping support,"
" disallowing device assignment."
" Re-enble with \"allow_unsafe_assigned_interrupts=1\""
" module option.\n", __func__);
iommu_domain_free(kvm->arch.iommu_domain);
kvm->arch.iommu_domain = NULL;
r = -EPERM;
goto out_unlock;
}
r = kvm_iommu_map_memslots(kvm);
if (r)
kvm_iommu_unmap_memslots(kvm);
out_unlock:
mutex_unlock(&kvm->slots_lock);
return r;
}
|
C
|
linux
| 0 |
CVE-2012-6703
|
https://www.cvedetails.com/cve/CVE-2012-6703/
| null |
https://github.com/torvalds/linux/commit/b35cc8225845112a616e3a2266d2fde5ab13d3ab
|
b35cc8225845112a616e3a2266d2fde5ab13d3ab
|
ALSA: compress_core: integer overflow in snd_compr_allocate_buffer()
These are 32 bit values that come from the user, we need to check for
integer overflows or we could end up allocating a smaller buffer than
expected.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
|
static size_t snd_compr_calc_avail(struct snd_compr_stream *stream,
struct snd_compr_avail *avail)
{
long avail_calc; /*this needs to be signed variable */
snd_compr_update_tstamp(stream, &avail->tstamp);
/* FIXME: This needs to be different for capture stream,
available is # of compressed data, for playback it's
remainder of buffer */
if (stream->runtime->total_bytes_available == 0 &&
stream->runtime->state == SNDRV_PCM_STATE_SETUP) {
pr_debug("detected init and someone forgot to do a write\n");
return stream->runtime->buffer_size;
}
pr_debug("app wrote %lld, DSP consumed %lld\n",
stream->runtime->total_bytes_available,
stream->runtime->total_bytes_transferred);
if (stream->runtime->total_bytes_available ==
stream->runtime->total_bytes_transferred) {
pr_debug("both pointers are same, returning full avail\n");
return stream->runtime->buffer_size;
}
/* FIXME: this routine isn't consistent, in one test we use
* cumulative values and in the other byte offsets. Do we
* really need the byte offsets if the cumulative values have
* been updated? In the PCM interface app_ptr and hw_ptr are
* already cumulative */
avail_calc = stream->runtime->buffer_size -
(stream->runtime->app_pointer - stream->runtime->hw_pointer);
pr_debug("calc avail as %ld, app_ptr %lld, hw+ptr %lld\n", avail_calc,
stream->runtime->app_pointer,
stream->runtime->hw_pointer);
if (avail_calc >= stream->runtime->buffer_size)
avail_calc -= stream->runtime->buffer_size;
pr_debug("ret avail as %ld\n", avail_calc);
avail->avail = avail_calc;
return avail_calc;
}
|
static size_t snd_compr_calc_avail(struct snd_compr_stream *stream,
struct snd_compr_avail *avail)
{
long avail_calc; /*this needs to be signed variable */
snd_compr_update_tstamp(stream, &avail->tstamp);
/* FIXME: This needs to be different for capture stream,
available is # of compressed data, for playback it's
remainder of buffer */
if (stream->runtime->total_bytes_available == 0 &&
stream->runtime->state == SNDRV_PCM_STATE_SETUP) {
pr_debug("detected init and someone forgot to do a write\n");
return stream->runtime->buffer_size;
}
pr_debug("app wrote %lld, DSP consumed %lld\n",
stream->runtime->total_bytes_available,
stream->runtime->total_bytes_transferred);
if (stream->runtime->total_bytes_available ==
stream->runtime->total_bytes_transferred) {
pr_debug("both pointers are same, returning full avail\n");
return stream->runtime->buffer_size;
}
/* FIXME: this routine isn't consistent, in one test we use
* cumulative values and in the other byte offsets. Do we
* really need the byte offsets if the cumulative values have
* been updated? In the PCM interface app_ptr and hw_ptr are
* already cumulative */
avail_calc = stream->runtime->buffer_size -
(stream->runtime->app_pointer - stream->runtime->hw_pointer);
pr_debug("calc avail as %ld, app_ptr %lld, hw+ptr %lld\n", avail_calc,
stream->runtime->app_pointer,
stream->runtime->hw_pointer);
if (avail_calc >= stream->runtime->buffer_size)
avail_calc -= stream->runtime->buffer_size;
pr_debug("ret avail as %ld\n", avail_calc);
avail->avail = avail_calc;
return avail_calc;
}
|
C
|
linux
| 0 |
CVE-2016-1621
|
https://www.cvedetails.com/cve/CVE-2016-1621/
|
CWE-119
|
https://android.googlesource.com/platform/external/libvpx/+/5a9753fca56f0eeb9f61e342b2fccffc364f9426
|
5a9753fca56f0eeb9f61e342b2fccffc364f9426
|
Merge Conflict Fix CL to lmp-mr1-release for ag/849478
DO NOT MERGE - libvpx: Pull from upstream
Current HEAD: 7105df53d7dc13d5e575bc8df714ec8d1da36b06
BUG=23452792
Change-Id: Ic78176fc369e0bacc71d423e0e2e6075d004aaec
|
static void write_ivf_frame_header(const vpx_codec_cx_pkt_t *const pkt,
FILE *const outfile) {
char header[12];
vpx_codec_pts_t pts;
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
return;
pts = pkt->data.frame.pts;
mem_put_le32(header, static_cast<unsigned int>(pkt->data.frame.sz));
mem_put_le32(header + 4, pts & 0xFFFFFFFF);
mem_put_le32(header + 8, pts >> 32);
(void)fwrite(header, 1, 12, outfile);
}
|
static void write_ivf_frame_header(const vpx_codec_cx_pkt_t *const pkt,
FILE *const outfile) {
char header[12];
vpx_codec_pts_t pts;
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
return;
pts = pkt->data.frame.pts;
mem_put_le32(header, static_cast<unsigned int>(pkt->data.frame.sz));
mem_put_le32(header + 4, pts & 0xFFFFFFFF);
mem_put_le32(header + 8, pts >> 32);
(void)fwrite(header, 1, 12, outfile);
}
|
C
|
Android
| 0 |
CVE-2017-14502
|
https://www.cvedetails.com/cve/CVE-2017-14502/
|
CWE-125
|
https://github.com/libarchive/libarchive/commit/5562545b5562f6d12a4ef991fae158bf4ccf92b6
|
5562545b5562f6d12a4ef991fae158bf4ccf92b6
|
Avoid a read off-by-one error for UTF16 names in RAR archives.
Reported-By: OSS-Fuzz issue 573
|
read_exttime(const char *p, struct rar *rar, const char *endp)
{
unsigned rmode, flags, rem, j, count;
int ttime, i;
struct tm *tm;
time_t t;
long nsec;
if (p + 2 > endp)
return (-1);
flags = archive_le16dec(p);
p += 2;
for (i = 3; i >= 0; i--)
{
t = 0;
if (i == 3)
t = rar->mtime;
rmode = flags >> i * 4;
if (rmode & 8)
{
if (!t)
{
if (p + 4 > endp)
return (-1);
ttime = archive_le32dec(p);
t = get_time(ttime);
p += 4;
}
rem = 0;
count = rmode & 3;
if (p + count > endp)
return (-1);
for (j = 0; j < count; j++)
{
rem = (((unsigned)(unsigned char)*p) << 16) | (rem >> 8);
p++;
}
tm = localtime(&t);
nsec = tm->tm_sec + rem / NS_UNIT;
if (rmode & 4)
{
tm->tm_sec++;
t = mktime(tm);
}
if (i == 3)
{
rar->mtime = t;
rar->mnsec = nsec;
}
else if (i == 2)
{
rar->ctime = t;
rar->cnsec = nsec;
}
else if (i == 1)
{
rar->atime = t;
rar->ansec = nsec;
}
else
{
rar->arctime = t;
rar->arcnsec = nsec;
}
}
}
return (0);
}
|
read_exttime(const char *p, struct rar *rar, const char *endp)
{
unsigned rmode, flags, rem, j, count;
int ttime, i;
struct tm *tm;
time_t t;
long nsec;
if (p + 2 > endp)
return (-1);
flags = archive_le16dec(p);
p += 2;
for (i = 3; i >= 0; i--)
{
t = 0;
if (i == 3)
t = rar->mtime;
rmode = flags >> i * 4;
if (rmode & 8)
{
if (!t)
{
if (p + 4 > endp)
return (-1);
ttime = archive_le32dec(p);
t = get_time(ttime);
p += 4;
}
rem = 0;
count = rmode & 3;
if (p + count > endp)
return (-1);
for (j = 0; j < count; j++)
{
rem = (((unsigned)(unsigned char)*p) << 16) | (rem >> 8);
p++;
}
tm = localtime(&t);
nsec = tm->tm_sec + rem / NS_UNIT;
if (rmode & 4)
{
tm->tm_sec++;
t = mktime(tm);
}
if (i == 3)
{
rar->mtime = t;
rar->mnsec = nsec;
}
else if (i == 2)
{
rar->ctime = t;
rar->cnsec = nsec;
}
else if (i == 1)
{
rar->atime = t;
rar->ansec = nsec;
}
else
{
rar->arctime = t;
rar->arcnsec = nsec;
}
}
}
return (0);
}
|
C
|
libarchive
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/befb46ae3385fa13975521e9a2281e35805b339e
|
befb46ae3385fa13975521e9a2281e35805b339e
|
2009-10-23 Chris Evans <[email protected]>
Reviewed by Adam Barth.
Added test for bug 27239 (ignore Refresh for view source mode).
https://bugs.webkit.org/show_bug.cgi?id=27239
* http/tests/security/view-source-no-refresh.html: Added
* http/tests/security/view-source-no-refresh-expected.txt: Added
* http/tests/security/resources/view-source-no-refresh.php: Added
2009-10-23 Chris Evans <[email protected]>
Reviewed by Adam Barth.
Ignore the Refresh header if we're in view source mode.
https://bugs.webkit.org/show_bug.cgi?id=27239
Test: http/tests/security/view-source-no-refresh.html
* loader/FrameLoader.cpp: ignore Refresh in view-source mode.
git-svn-id: svn://svn.chromium.org/blink/trunk@50018 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
bool FrameLoader::shouldAllowNavigation(Frame* targetFrame) const
{
if (!targetFrame)
return true;
if (m_frame == targetFrame)
return true;
if (targetFrame == m_frame->tree()->top())
return true;
if (!targetFrame->tree()->parent() && m_frame->loader()->opener() == targetFrame)
return true;
Document* activeDocument = m_frame->document();
ASSERT(activeDocument);
const SecurityOrigin* activeSecurityOrigin = activeDocument->securityOrigin();
if (!targetFrame->tree()->parent() && canAccessAncestor(activeSecurityOrigin, targetFrame->loader()->opener()))
return true;
if (canAccessAncestor(activeSecurityOrigin, targetFrame))
return true;
Settings* settings = targetFrame->settings();
if (settings && !settings->privateBrowsingEnabled()) {
Document* targetDocument = targetFrame->document();
String message = String::format("Unsafe JavaScript attempt to initiate a navigation change for frame with URL %s from frame with URL %s.\n",
targetDocument->url().string().utf8().data(), activeDocument->url().string().utf8().data());
targetFrame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, 1, String());
}
return false;
}
|
bool FrameLoader::shouldAllowNavigation(Frame* targetFrame) const
{
if (!targetFrame)
return true;
if (m_frame == targetFrame)
return true;
if (targetFrame == m_frame->tree()->top())
return true;
if (!targetFrame->tree()->parent() && m_frame->loader()->opener() == targetFrame)
return true;
Document* activeDocument = m_frame->document();
ASSERT(activeDocument);
const SecurityOrigin* activeSecurityOrigin = activeDocument->securityOrigin();
if (!targetFrame->tree()->parent() && canAccessAncestor(activeSecurityOrigin, targetFrame->loader()->opener()))
return true;
if (canAccessAncestor(activeSecurityOrigin, targetFrame))
return true;
Settings* settings = targetFrame->settings();
if (settings && !settings->privateBrowsingEnabled()) {
Document* targetDocument = targetFrame->document();
String message = String::format("Unsafe JavaScript attempt to initiate a navigation change for frame with URL %s from frame with URL %s.\n",
targetDocument->url().string().utf8().data(), activeDocument->url().string().utf8().data());
targetFrame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, 1, String());
}
return false;
}
|
C
|
Chrome
| 0 |
CVE-2015-0274
|
https://www.cvedetails.com/cve/CVE-2015-0274/
|
CWE-19
|
https://github.com/torvalds/linux/commit/8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
|
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
|
xfs: remote attribute overwrite causes transaction overrun
Commit e461fcb ("xfs: remote attribute lookups require the value
length") passes the remote attribute length in the xfs_da_args
structure on lookup so that CRC calculations and validity checking
can be performed correctly by related code. This, unfortunately has
the side effect of changing the args->valuelen parameter in cases
where it shouldn't.
That is, when we replace a remote attribute, the incoming
replacement stores the value and length in args->value and
args->valuelen, but then the lookup which finds the existing remote
attribute overwrites args->valuelen with the length of the remote
attribute being replaced. Hence when we go to create the new
attribute, we create it of the size of the existing remote
attribute, not the size it is supposed to be. When the new attribute
is much smaller than the old attribute, this results in a
transaction overrun and an ASSERT() failure on a debug kernel:
XFS: Assertion failed: tp->t_blk_res_used <= tp->t_blk_res, file: fs/xfs/xfs_trans.c, line: 331
Fix this by keeping the remote attribute value length separate to
the attribute value length in the xfs_da_args structure. The enables
us to pass the length of the remote attribute to be removed without
overwriting the new attribute's length.
Also, ensure that when we save remote block contexts for a later
rename we zero the original state variables so that we don't confuse
the state of the attribute to be removes with the state of the new
attribute that we just added. [Spotted by Brain Foster.]
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
|
xfs_attr_leaf_newentsize(int namelen, int valuelen, int blocksize, int *local)
{
int size;
size = xfs_attr_leaf_entsize_local(namelen, valuelen);
if (size < xfs_attr_leaf_entsize_local_max(blocksize)) {
if (local) {
*local = 1;
}
} else {
size = xfs_attr_leaf_entsize_remote(namelen);
if (local) {
*local = 0;
}
}
return size;
}
|
xfs_attr_leaf_newentsize(int namelen, int valuelen, int blocksize, int *local)
{
int size;
size = xfs_attr_leaf_entsize_local(namelen, valuelen);
if (size < xfs_attr_leaf_entsize_local_max(blocksize)) {
if (local) {
*local = 1;
}
} else {
size = xfs_attr_leaf_entsize_remote(namelen);
if (local) {
*local = 0;
}
}
return size;
}
|
C
|
linux
| 0 |
CVE-2019-5804
|
https://www.cvedetails.com/cve/CVE-2019-5804/
|
CWE-77
|
https://github.com/chromium/chromium/commit/08965161257ab9aeef9a3548c1cd1a44525dc562
|
08965161257ab9aeef9a3548c1cd1a44525dc562
|
Ignore switches following "--" when parsing a command line.
BUG=933004
[email protected]
Change-Id: I911be4cbfc38a4d41dec85d85f7fe0f50ddca392
Reviewed-on: https://chromium-review.googlesource.com/c/1481210
Auto-Submit: Greg Thompson <[email protected]>
Commit-Queue: Julian Pastarmov <[email protected]>
Reviewed-by: Julian Pastarmov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#634604}
|
bool SetEnvironmentString16(const std::wstring& variable_name,
const std::wstring& new_value) {
return !!SetEnvironmentVariable(variable_name.c_str(), new_value.c_str());
}
|
bool SetEnvironmentString16(const std::wstring& variable_name,
const std::wstring& new_value) {
return !!SetEnvironmentVariable(variable_name.c_str(), new_value.c_str());
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/befb46ae3385fa13975521e9a2281e35805b339e
|
befb46ae3385fa13975521e9a2281e35805b339e
|
2009-10-23 Chris Evans <[email protected]>
Reviewed by Adam Barth.
Added test for bug 27239 (ignore Refresh for view source mode).
https://bugs.webkit.org/show_bug.cgi?id=27239
* http/tests/security/view-source-no-refresh.html: Added
* http/tests/security/view-source-no-refresh-expected.txt: Added
* http/tests/security/resources/view-source-no-refresh.php: Added
2009-10-23 Chris Evans <[email protected]>
Reviewed by Adam Barth.
Ignore the Refresh header if we're in view source mode.
https://bugs.webkit.org/show_bug.cgi?id=27239
Test: http/tests/security/view-source-no-refresh.html
* loader/FrameLoader.cpp: ignore Refresh in view-source mode.
git-svn-id: svn://svn.chromium.org/blink/trunk@50018 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void FrameLoader::closeOldDataSources()
{
for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
child->loader()->closeOldDataSources();
if (m_documentLoader)
m_client->dispatchWillClose();
m_client->setMainFrameDocumentReady(false); // stop giving out the actual DOMDocument to observers
}
|
void FrameLoader::closeOldDataSources()
{
for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
child->loader()->closeOldDataSources();
if (m_documentLoader)
m_client->dispatchWillClose();
m_client->setMainFrameDocumentReady(false); // stop giving out the actual DOMDocument to observers
}
|
C
|
Chrome
| 0 |
CVE-2016-9566
|
https://www.cvedetails.com/cve/CVE-2016-9566/
|
CWE-264
|
https://github.com/NagiosEnterprises/nagioscore/commit/c29557dec91eba2306f5fb11b8da4474ba63f8c4
|
c29557dec91eba2306f5fb11b8da4474ba63f8c4
|
Merge branch 'maint'
|
static FILE *open_log_file(void)
{
int fh;
struct stat st;
if(log_fp) /* keep it open unless we rotate */
return log_fp;
if ((fh = open(log_file, O_RDWR|O_APPEND|O_CREAT|O_NOFOLLOW, S_IRUSR|S_IWUSR)) == -1) {
if (daemon_mode == FALSE)
printf("Warning: Cannot open log file '%s' for writing\n", log_file);
return NULL;
}
log_fp = fdopen(fh, "a+");
if(log_fp == NULL) {
if (daemon_mode == FALSE)
printf("Warning: Cannot open log file '%s' for writing\n", log_file);
return NULL;
}
if ((fstat(fh, &st)) == -1) {
log_fp = NULL;
close(fh);
if (daemon_mode == FALSE)
printf("Warning: Cannot fstat log file '%s'\n", log_file);
return NULL;
}
if (st.st_nlink != 1 || (st.st_mode & S_IFMT) != S_IFREG) {
log_fp = NULL;
close(fh);
if (daemon_mode == FALSE)
printf("Warning: log file '%s' has an invalid mode\n", log_file);
return NULL;
}
(void)fcntl(fileno(log_fp), F_SETFD, FD_CLOEXEC);
return log_fp;
}
|
static FILE *open_log_file(void)
{
if(log_fp) /* keep it open unless we rotate */
return log_fp;
log_fp = fopen(log_file, "a+");
if(log_fp == NULL) {
if (daemon_mode == FALSE) {
printf("Warning: Cannot open log file '%s' for writing\n", log_file);
}
return NULL;
}
(void)fcntl(fileno(log_fp), F_SETFD, FD_CLOEXEC);
return log_fp;
}
|
C
|
nagioscore
| 1 |
CVE-2016-2324
|
https://www.cvedetails.com/cve/CVE-2016-2324/
|
CWE-119
|
https://github.com/git/git/commit/de1e67d0703894cb6ea782e36abb63976ab07e60
|
de1e67d0703894cb6ea782e36abb63976ab07e60
|
list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and we could
simply append "c" to it temporarily, then roll back the
length, without creating a new copy.
So we could improve this by teaching the callsites of
path_name() this trick (and there are only 3). But we can
also notice that no callback actually cares about the
broken-down representation, and simply pass each callback
the full path "a/b/c" as a string. The callback code becomes
even simpler, then, as we do not have to worry about freeing
an allocated buffer, nor rolling back our modification to
the strbuf.
This is theoretically less efficient, as some callbacks
would not bother to format the final path component. But in
practice this is not measurable. Since we use the same
strbuf over and over, our work to grow it is amortized, and
we really only pay to memcpy a few bytes.
Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
|
void add_ref_exclusion(struct string_list **ref_excludes_p, const char *exclude)
{
if (!*ref_excludes_p) {
*ref_excludes_p = xcalloc(1, sizeof(**ref_excludes_p));
(*ref_excludes_p)->strdup_strings = 1;
}
string_list_append(*ref_excludes_p, exclude);
}
|
void add_ref_exclusion(struct string_list **ref_excludes_p, const char *exclude)
{
if (!*ref_excludes_p) {
*ref_excludes_p = xcalloc(1, sizeof(**ref_excludes_p));
(*ref_excludes_p)->strdup_strings = 1;
}
string_list_append(*ref_excludes_p, exclude);
}
|
C
|
git
| 0 |
CVE-2017-15368
|
https://www.cvedetails.com/cve/CVE-2017-15368/
|
CWE-125
|
https://github.com/radare/radare2/commit/52b1526443c1f433087928291d1c3d37a5600515
|
52b1526443c1f433087928291d1c3d37a5600515
|
Fix crash in wasm disassembler
|
R_API bool r_flag_exist_at(RFlag *f, const char *flag_prefix, ut16 fp_size, ut64 off) {
RListIter *iter = NULL;
RFlagItem *item = NULL;
if (!f) {
return false;
}
const RList *list = r_flag_get_list (f, off);
if (!list) {
return false;
}
r_list_foreach (list, iter, item) {
if (item->name && !strncmp (item->name, flag_prefix, fp_size)) {
return true;
}
}
return false;
}
|
R_API bool r_flag_exist_at(RFlag *f, const char *flag_prefix, ut16 fp_size, ut64 off) {
RListIter *iter = NULL;
RFlagItem *item = NULL;
if (!f) {
return false;
}
const RList *list = r_flag_get_list (f, off);
if (!list) {
return false;
}
r_list_foreach (list, iter, item) {
if (item->name && !strncmp (item->name, flag_prefix, fp_size)) {
return true;
}
}
return false;
}
|
C
|
radare2
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/b9e2ecab97a8a7f3cce06951ab92a3eaef559206
|
b9e2ecab97a8a7f3cce06951ab92a3eaef559206
|
Do not discount a MANUAL_SUBFRAME load just because it involved
some redirects.
R=brettw
BUG=21353
TEST=none
Review URL: http://codereview.chromium.org/246073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27887 0039d316-1c4b-4281-b951-d872f2087c98
|
void WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(
unsigned long identifier,
const ScriptString& source) {
}
|
void WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(
unsigned long identifier,
const ScriptString& source) {
}
|
C
|
Chrome
| 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::Repaint(const gfx::Size& size) {
OnRepaint(size);
}
|
void RenderViewImpl::Repaint(const gfx::Size& size) {
OnRepaint(size);
}
|
C
|
Chrome
| 0 |
CVE-2012-5156
|
https://www.cvedetails.com/cve/CVE-2012-5156/
|
CWE-399
|
https://github.com/chromium/chromium/commit/b15c87071f906301bccc824ce013966ca93998c7
|
b15c87071f906301bccc824ce013966ca93998c7
|
Validate and report peer's PID to WorkerProcessIpcDelegate so it will be able to duplicate handles to and from the worker process.
As a side effect WorkerProcessLauncher::Delegate is now responsible for retrieving the client's PID and deciding whether a launch failed due to a permanent error condition.
BUG=134694
Review URL: https://chromiumcodereview.appspot.com/11143025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162778 0039d316-1c4b-4281-b951-d872f2087c98
|
void WtsSessionProcessDelegate::Core::KillProcess(DWORD exit_code) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
channel_.reset();
pipe_.Close();
if (launch_elevated_) {
if (job_.IsValid()) {
TerminateJobObject(job_, exit_code);
}
} else {
if (worker_process_.IsValid()) {
TerminateProcess(worker_process_, exit_code);
}
}
}
|
void WtsSessionProcessDelegate::Core::KillProcess(DWORD exit_code) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
channel_.reset();
if (launch_elevated_) {
if (job_.IsValid()) {
TerminateJobObject(job_, exit_code);
}
} else {
if (worker_process_.IsValid()) {
TerminateProcess(worker_process_, exit_code);
}
}
}
|
C
|
Chrome
| 1 |
CVE-2013-2905
|
https://www.cvedetails.com/cve/CVE-2013-2905/
|
CWE-264
|
https://github.com/chromium/chromium/commit/afb848acb43ba316097ab4fddfa38dbd80bc6a71
|
afb848acb43ba316097ab4fddfa38dbd80bc6a71
|
Posix: fix named SHM mappings permissions.
Make sure that named mappings in /dev/shm/ aren't created with
broad permissions.
BUG=254159
[email protected], [email protected]
Review URL: https://codereview.chromium.org/17779002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209814 0039d316-1c4b-4281-b951-d872f2087c98
|
size_t SharedMemory::GetHandleLimit() {
return base::GetMaxFds();
}
|
size_t SharedMemory::GetHandleLimit() {
return base::GetMaxFds();
}
|
C
|
Chrome
| 0 |
CVE-2017-12427
|
https://www.cvedetails.com/cve/CVE-2017-12427/
|
CWE-772
|
https://github.com/ImageMagick/ImageMagick/commit/e793eb203e5e0f91f5037aed6585e81b1e27395b
|
e793eb203e5e0f91f5037aed6585e81b1e27395b
|
https://github.com/ImageMagick/ImageMagick/issues/636
|
static int MSLHasInternalSubset(void *context)
{
MSLInfo
*msl_info;
/*
Does this document has an internal subset?
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" SAX.MSLHasInternalSubset()");
msl_info=(MSLInfo *) context;
return(msl_info->document->intSubset != NULL);
}
|
static int MSLHasInternalSubset(void *context)
{
MSLInfo
*msl_info;
/*
Does this document has an internal subset?
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" SAX.MSLHasInternalSubset()");
msl_info=(MSLInfo *) context;
return(msl_info->document->intSubset != NULL);
}
|
C
|
ImageMagick
| 0 |
CVE-2017-5009
|
https://www.cvedetails.com/cve/CVE-2017-5009/
|
CWE-119
|
https://github.com/chromium/chromium/commit/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60
|
1c40f9042ae2d6ee7483d72998aabb5e73b2ff60
|
DevTools: send proper resource type in Network.RequestWillBeSent
This patch plumbs resoure type into the DispatchWillSendRequest
instrumenation. This allows us to report accurate type in
Network.RequestWillBeSent event, instead of "Other", that we report
today.
BUG=765501
R=dgozman
Change-Id: I0134c08b841e8dd247fdc8ff208bfd51e462709c
Reviewed-on: https://chromium-review.googlesource.com/667504
Reviewed-by: Pavel Feldman <[email protected]>
Reviewed-by: Dmitry Gozman <[email protected]>
Commit-Queue: Andrey Lushnikov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#507936}
|
void FetchContext::AddAdditionalRequestHeaders(ResourceRequest&,
FetchResourceType) {}
|
void FetchContext::AddAdditionalRequestHeaders(ResourceRequest&,
FetchResourceType) {}
|
C
|
Chrome
| 0 |
CVE-2017-1000249
|
https://www.cvedetails.com/cve/CVE-2017-1000249/
|
CWE-119
|
https://github.com/file/file/commit/35c94dc6acc418f1ad7f6241a6680e5327495793
|
35c94dc6acc418f1ad7f6241a6680e5327495793
|
Fix always true condition (Thomas Jarosch)
|
dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
int num, size_t size, off_t fsize, int sh_num, int *flags,
uint16_t *notecount)
{
Elf32_Phdr ph32;
Elf64_Phdr ph64;
const char *linking_style = "statically";
const char *interp = "";
unsigned char nbuf[BUFSIZ];
char ibuf[BUFSIZ];
ssize_t bufsize;
size_t offset, align, len;
if (size != xph_sizeof) {
if (file_printf(ms, ", corrupted program header size") == -1)
return -1;
return 0;
}
for ( ; num; num--) {
if (pread(fd, xph_addr, xph_sizeof, off) < (ssize_t)xph_sizeof) {
file_badread(ms);
return -1;
}
off += size;
bufsize = 0;
align = 4;
/* Things we can determine before we seek */
switch (xph_type) {
case PT_DYNAMIC:
linking_style = "dynamically";
break;
case PT_NOTE:
if (sh_num) /* Did this through section headers */
continue;
if (((align = xph_align) & 0x80000000UL) != 0 ||
align < 4) {
if (file_printf(ms,
", invalid note alignment %#lx",
(unsigned long)align) == -1)
return -1;
align = 4;
}
/*FALLTHROUGH*/
case PT_INTERP:
len = xph_filesz < sizeof(nbuf) ? xph_filesz
: sizeof(nbuf);
bufsize = pread(fd, nbuf, len, xph_offset);
if (bufsize == -1) {
file_badread(ms);
return -1;
}
break;
default:
if (fsize != SIZE_UNKNOWN && xph_offset > fsize) {
/* Maybe warn here? */
continue;
}
break;
}
/* Things we can determine when we seek */
switch (xph_type) {
case PT_INTERP:
if (bufsize && nbuf[0]) {
nbuf[bufsize - 1] = '\0';
interp = (const char *)nbuf;
} else
interp = "*empty*";
break;
case PT_NOTE:
/*
* This is a PT_NOTE section; loop through all the notes
* in the section.
*/
offset = 0;
for (;;) {
if (offset >= (size_t)bufsize)
break;
offset = donote(ms, nbuf, offset,
(size_t)bufsize, clazz, swap, align,
flags, notecount, fd, 0, 0, 0);
if (offset == 0)
break;
}
break;
default:
break;
}
}
if (file_printf(ms, ", %s linked", linking_style)
== -1)
return -1;
if (interp[0])
if (file_printf(ms, ", interpreter %s",
file_printable(ibuf, sizeof(ibuf), interp)) == -1)
return -1;
return 0;
}
|
dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
int num, size_t size, off_t fsize, int sh_num, int *flags,
uint16_t *notecount)
{
Elf32_Phdr ph32;
Elf64_Phdr ph64;
const char *linking_style = "statically";
const char *interp = "";
unsigned char nbuf[BUFSIZ];
char ibuf[BUFSIZ];
ssize_t bufsize;
size_t offset, align, len;
if (size != xph_sizeof) {
if (file_printf(ms, ", corrupted program header size") == -1)
return -1;
return 0;
}
for ( ; num; num--) {
if (pread(fd, xph_addr, xph_sizeof, off) < (ssize_t)xph_sizeof) {
file_badread(ms);
return -1;
}
off += size;
bufsize = 0;
align = 4;
/* Things we can determine before we seek */
switch (xph_type) {
case PT_DYNAMIC:
linking_style = "dynamically";
break;
case PT_NOTE:
if (sh_num) /* Did this through section headers */
continue;
if (((align = xph_align) & 0x80000000UL) != 0 ||
align < 4) {
if (file_printf(ms,
", invalid note alignment %#lx",
(unsigned long)align) == -1)
return -1;
align = 4;
}
/*FALLTHROUGH*/
case PT_INTERP:
len = xph_filesz < sizeof(nbuf) ? xph_filesz
: sizeof(nbuf);
bufsize = pread(fd, nbuf, len, xph_offset);
if (bufsize == -1) {
file_badread(ms);
return -1;
}
break;
default:
if (fsize != SIZE_UNKNOWN && xph_offset > fsize) {
/* Maybe warn here? */
continue;
}
break;
}
/* Things we can determine when we seek */
switch (xph_type) {
case PT_INTERP:
if (bufsize && nbuf[0]) {
nbuf[bufsize - 1] = '\0';
interp = (const char *)nbuf;
} else
interp = "*empty*";
break;
case PT_NOTE:
/*
* This is a PT_NOTE section; loop through all the notes
* in the section.
*/
offset = 0;
for (;;) {
if (offset >= (size_t)bufsize)
break;
offset = donote(ms, nbuf, offset,
(size_t)bufsize, clazz, swap, align,
flags, notecount, fd, 0, 0, 0);
if (offset == 0)
break;
}
break;
default:
break;
}
}
if (file_printf(ms, ", %s linked", linking_style)
== -1)
return -1;
if (interp[0])
if (file_printf(ms, ", interpreter %s",
file_printable(ibuf, sizeof(ibuf), interp)) == -1)
return -1;
return 0;
}
|
C
|
file
| 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 michael_setkey(struct crypto_shash *tfm, const u8 *key,
unsigned int keylen)
{
struct michael_mic_ctx *mctx = crypto_shash_ctx(tfm);
const __le32 *data = (const __le32 *)key;
if (keylen != 8) {
crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
return -EINVAL;
}
mctx->l = le32_to_cpu(data[0]);
mctx->r = le32_to_cpu(data[1]);
return 0;
}
|
static int michael_setkey(struct crypto_shash *tfm, const u8 *key,
unsigned int keylen)
{
struct michael_mic_ctx *mctx = crypto_shash_ctx(tfm);
const __le32 *data = (const __le32 *)key;
if (keylen != 8) {
crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
return -EINVAL;
}
mctx->l = le32_to_cpu(data[0]);
mctx->r = le32_to_cpu(data[1]);
return 0;
}
|
C
|
linux
| 0 |
CVE-2011-3084
|
https://www.cvedetails.com/cve/CVE-2011-3084/
|
CWE-264
|
https://github.com/chromium/chromium/commit/744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
Allow browser to handle all WebUI navigations.
BUG=113496
TEST="Google Dashboard" link in Sync settings loads in new process.
Review URL: http://codereview.chromium.org/9663045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126949 0039d316-1c4b-4281-b951-d872f2087c98
|
void RenderViewImpl::OnJavaBridgeInit() {
DCHECK(!java_bridge_dispatcher_.get());
#if defined(ENABLE_JAVA_BRIDGE)
java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
#endif
}
|
void RenderViewImpl::OnJavaBridgeInit() {
DCHECK(!java_bridge_dispatcher_.get());
#if defined(ENABLE_JAVA_BRIDGE)
java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
#endif
}
|
C
|
Chrome
| 0 |
CVE-2015-6763
|
https://www.cvedetails.com/cve/CVE-2015-6763/
| null |
https://github.com/chromium/chromium/commit/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables secure text input
when activated and it's in the secure text entry mode.
RenderWidgetHostViewMac did the similar thing for ages following the
WebKit example.
views::Textfield needs to do the same thing in a fashion that's
sycnrhonized with RenderWidgetHostViewMac, otherwise the race conditions
are possible when the Textfield gets focus, activates the secure text
input mode and the RWHVM loses focus immediately afterwards and disables
the secure text input instead of leaving it in the enabled state.
BUG=818133,677220
Change-Id: I6db6c4b59e4a1a72cbb7f8c7056f71b04a3df08b
Reviewed-on: https://chromium-review.googlesource.com/943064
Commit-Queue: Michail Pishchagin <[email protected]>
Reviewed-by: Pavel Feldman <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Peter Kasting <[email protected]>
Cr-Commit-Position: refs/heads/master@{#542517}
|
bool InputType::ReceiveDroppedFiles(const DragData*) {
NOTREACHED();
return false;
}
|
bool InputType::ReceiveDroppedFiles(const DragData*) {
NOTREACHED();
return false;
}
|
C
|
Chrome
| 0 |
CVE-2017-9798
|
https://www.cvedetails.com/cve/CVE-2017-9798/
|
CWE-416
|
https://github.com/apache/httpd/commit/29afdd2550b3d30a8defece2b95ae81edcf66ac9
|
29afdd2550b3d30a8defece2b95ae81edcf66ac9
|
core: Disallow Methods' registration at run time (.htaccess), they may be
used only if registered at init time (httpd.conf).
Calling ap_method_register() in children processes is not the right scope
since it won't be shared for all requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f79535-47bb-0310-9956-ffa450edef68
|
static int test_ifsection_section(cmd_parms *cmd, const char *arg)
{
const char *name = apr_pstrcat(cmd->temp_pool, "<", arg, NULL);
return ap_exists_directive(cmd->temp_pool, name);
}
|
static int test_ifsection_section(cmd_parms *cmd, const char *arg)
{
const char *name = apr_pstrcat(cmd->temp_pool, "<", arg, NULL);
return ap_exists_directive(cmd->temp_pool, name);
}
|
C
|
httpd
| 0 |
CVE-2013-6661
|
https://www.cvedetails.com/cve/CVE-2013-6661/
| null |
https://github.com/chromium/chromium/commit/23cbfc1d685fa7389e88588584e02786820d4d26
|
23cbfc1d685fa7389e88588584e02786820d4d26
|
Add the SandboxedDMGParser and wire it up to the DownloadProtectionService.
BUG=496898,464083
[email protected], [email protected], [email protected], [email protected]
Review URL: https://codereview.chromium.org/1299223006 .
Cr-Commit-Position: refs/heads/master@{#344876}
|
void RecordFileExtensionType(const base::FilePath& file) {
UMA_HISTOGRAM_ENUMERATION(
"SBClientDownload.DownloadExtensions",
download_protection_util::GetSBClientDownloadExtensionValueForUMA(file),
download_protection_util::kSBClientDownloadExtensionsMax);
}
|
void RecordFileExtensionType(const base::FilePath& file) {
UMA_HISTOGRAM_ENUMERATION(
"SBClientDownload.DownloadExtensions",
download_protection_util::GetSBClientDownloadExtensionValueForUMA(file),
download_protection_util::kSBClientDownloadExtensionsMax);
}
|
C
|
Chrome
| 0 |
CVE-2012-2888
|
https://www.cvedetails.com/cve/CVE-2012-2888/
|
CWE-399
|
https://github.com/chromium/chromium/commit/3b0d77670a0613f409110817455d2137576b485a
|
3b0d77670a0613f409110817455d2137576b485a
|
Revert 143656 - Add an IPC channel between the NaCl loader process and the renderer.
BUG=116317
TEST=ppapi, nacl tests, manual testing for experimental IPC proxy.
Review URL: https://chromiumcodereview.appspot.com/10641016
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10625007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143665 0039d316-1c4b-4281-b951-d872f2087c98
|
void HistogramTimeLarge(const std::string& name, int64_t ms) {
if (ms < 0) return;
const PPB_UMA_Private* ptr = GetUMAInterface();
if (ptr == NULL) return;
ptr->HistogramCustomTimes(pp::Var(name).pp_var(),
ms,
kTimeLargeMin, kTimeLargeMax,
kTimeLargeBuckets);
}
|
void HistogramTimeLarge(const std::string& name, int64_t ms) {
if (ms < 0) return;
const PPB_UMA_Private* ptr = GetUMAInterface();
if (ptr == NULL) return;
ptr->HistogramCustomTimes(pp::Var(name).pp_var(),
ms,
kTimeLargeMin, kTimeLargeMax,
kTimeLargeBuckets);
}
|
C
|
Chrome
| 0 |
CVE-2014-3610
|
https://www.cvedetails.com/cve/CVE-2014-3610/
|
CWE-264
|
https://github.com/torvalds/linux/commit/854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
|
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
|
KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTER_ESP and IA32_SYSENTER_EIP cause #GP if
non-canonical address is written on Intel but not on AMD (which ignores the top
32-bits).
Accordingly, this patch injects a #GP on the MSRs which behave identically on
Intel and AMD. To eliminate the differences between the architecutres, the
value which is written to IA32_SYSENTER_ESP and IA32_SYSENTER_EIP is turned to
canonical value before writing instead of injecting a #GP.
Some references from Intel and AMD manuals:
According to Intel SDM description of WRMSR instruction #GP is expected on
WRMSR "If the source register contains a non-canonical address and ECX
specifies one of the following MSRs: IA32_DS_AREA, IA32_FS_BASE, IA32_GS_BASE,
IA32_KERNEL_GS_BASE, IA32_LSTAR, IA32_SYSENTER_EIP, IA32_SYSENTER_ESP."
According to AMD manual instruction manual:
LSTAR/CSTAR (SYSCALL): "The WRMSR instruction loads the target RIP into the
LSTAR and CSTAR registers. If an RIP written by WRMSR is not in canonical
form, a general-protection exception (#GP) occurs."
IA32_GS_BASE and IA32_FS_BASE (WRFSBASE/WRGSBASE): "The address written to the
base field must be in canonical form or a #GP fault will occur."
IA32_KERNEL_GS_BASE (SWAPGS): "The address stored in the KernelGSbase MSR must
be in canonical form."
This patch fixes CVE-2014-3610.
Cc: [email protected]
Signed-off-by: Nadav Amit <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static void svm_set_idt(struct kvm_vcpu *vcpu, struct desc_ptr *dt)
{
struct vcpu_svm *svm = to_svm(vcpu);
svm->vmcb->save.idtr.limit = dt->size;
svm->vmcb->save.idtr.base = dt->address ;
mark_dirty(svm->vmcb, VMCB_DT);
}
|
static void svm_set_idt(struct kvm_vcpu *vcpu, struct desc_ptr *dt)
{
struct vcpu_svm *svm = to_svm(vcpu);
svm->vmcb->save.idtr.limit = dt->size;
svm->vmcb->save.idtr.base = dt->address ;
mark_dirty(svm->vmcb, VMCB_DT);
}
|
C
|
linux
| 0 |
CVE-2011-3104
|
https://www.cvedetails.com/cve/CVE-2011-3104/
|
CWE-119
|
https://github.com/chromium/chromium/commit/6b5f83842b5edb5d4bd6684b196b3630c6769731
|
6b5f83842b5edb5d4bd6684b196b3630c6769731
|
[i18n-fixlet] Make strings branding specific in extension code.
IDS_EXTENSIONS_UNINSTALL
IDS_EXTENSIONS_INCOGNITO_WARNING
IDS_EXTENSION_INSTALLED_HEADING
IDS_EXTENSION_ALERT_ITEM_EXTERNAL And fix a $1 $1 bug.
IDS_EXTENSION_INLINE_INSTALL_PROMPT_TITLE
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/9107061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118018 0039d316-1c4b-4281-b951-d872f2087c98
|
const Extension* ExtensionSettingsHandler::GetExtension(const ListValue* args) {
std::string extension_id = UTF16ToUTF8(ExtractStringValue(args));
CHECK(!extension_id.empty());
return extension_service_->GetExtensionById(extension_id, true);
}
|
const Extension* ExtensionSettingsHandler::GetExtension(const ListValue* args) {
std::string extension_id = UTF16ToUTF8(ExtractStringValue(args));
CHECK(!extension_id.empty());
return extension_service_->GetExtensionById(extension_id, true);
}
|
C
|
Chrome
| 0 |
CVE-2014-7909
|
https://www.cvedetails.com/cve/CVE-2014-7909/
|
CWE-189
|
https://github.com/chromium/chromium/commit/2571533bbb5b554ff47205c8ef1513ccc0817c3e
|
2571533bbb5b554ff47205c8ef1513ccc0817c3e
|
DocumentThreadableLoader: Add guards for sync notifyFinished() in setResource()
In loadRequest(), setResource() can call clear() synchronously:
DocumentThreadableLoader::clear()
DocumentThreadableLoader::handleError()
Resource::didAddClient()
RawResource::didAddClient()
and thus |m_client| can be null while resource() isn't null after setResource(),
causing crashes (Issue 595964).
This CL checks whether |*this| is destructed and
whether |m_client| is null after setResource().
BUG=595964
Review-Url: https://codereview.chromium.org/1902683002
Cr-Commit-Position: refs/heads/master@{#391001}
|
void DocumentThreadableLoader::reportResponseReceived(unsigned long identifier, const ResourceResponse& response)
{
LocalFrame* frame = document().frame();
ASSERT(frame);
if (!frame)
return;
DocumentLoader* loader = frame->loader().documentLoader();
TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_EVENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame, response));
InspectorInstrumentation::didReceiveResourceResponse(frame, identifier, loader, response, resource() ? resource()->loader() : 0);
frame->console().reportResourceResponseReceived(loader, identifier, response);
}
|
void DocumentThreadableLoader::reportResponseReceived(unsigned long identifier, const ResourceResponse& response)
{
LocalFrame* frame = document().frame();
ASSERT(frame);
if (!frame)
return;
DocumentLoader* loader = frame->loader().documentLoader();
TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_EVENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame, response));
InspectorInstrumentation::didReceiveResourceResponse(frame, identifier, loader, response, resource() ? resource()->loader() : 0);
frame->console().reportResourceResponseReceived(loader, identifier, response);
}
|
C
|
Chrome
| 0 |
CVE-2018-6053
|
https://www.cvedetails.com/cve/CVE-2018-6053/
|
CWE-200
|
https://github.com/chromium/chromium/commit/6c6888565ff1fde9ef21ef17c27ad4c8304643d2
|
6c6888565ff1fde9ef21ef17c27ad4c8304643d2
|
TopSites: Clear thumbnails from the cache when their URLs get removed
We already cleared the thumbnails from persistent storage, but they
remained in the in-memory cache, so they remained accessible (until the
next Chrome restart) even after all browsing data was cleared.
Bug: 758169
Change-Id: Id916d22358430a82e6d5043ac04fa463a32f824f
Reviewed-on: https://chromium-review.googlesource.com/758640
Commit-Queue: Marc Treib <[email protected]>
Reviewed-by: Sylvain Defresne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#514861}
|
int TopSitesImpl::GetRedirectDistanceForURL(const MostVisitedURL& most_visited,
const GURL& url) {
for (size_t i = 0; i < most_visited.redirects.size(); i++) {
if (most_visited.redirects[i] == url)
return static_cast<int>(most_visited.redirects.size() - i - 1);
}
NOTREACHED() << "URL should always be found.";
return 0;
}
|
int TopSitesImpl::GetRedirectDistanceForURL(const MostVisitedURL& most_visited,
const GURL& url) {
for (size_t i = 0; i < most_visited.redirects.size(); i++) {
if (most_visited.redirects[i] == url)
return static_cast<int>(most_visited.redirects.size() - i - 1);
}
NOTREACHED() << "URL should always be found.";
return 0;
}
|
C
|
Chrome
| 0 |
CVE-2017-9798
|
https://www.cvedetails.com/cve/CVE-2017-9798/
|
CWE-416
|
https://github.com/apache/httpd/commit/29afdd2550b3d30a8defece2b95ae81edcf66ac9
|
29afdd2550b3d30a8defece2b95ae81edcf66ac9
|
core: Disallow Methods' registration at run time (.htaccess), they may be
used only if registered at init time (httpd.conf).
Calling ap_method_register() in children processes is not the right scope
since it won't be shared for all requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f79535-47bb-0310-9956-ffa450edef68
|
static int test_iffile_section(cmd_parms *cmd, const char *arg)
{
const char *relative;
apr_finfo_t sb;
relative = ap_server_root_relative(cmd->temp_pool, arg);
return (apr_stat(&sb, relative, 0, cmd->pool) == APR_SUCCESS);
}
|
static int test_iffile_section(cmd_parms *cmd, const char *arg)
{
const char *relative;
apr_finfo_t sb;
relative = ap_server_root_relative(cmd->temp_pool, arg);
return (apr_stat(&sb, relative, 0, cmd->pool) == APR_SUCCESS);
}
|
C
|
httpd
| 0 |
CVE-2017-0823
|
https://www.cvedetails.com/cve/CVE-2017-0823/
|
CWE-200
|
https://android.googlesource.com/platform/hardware/ril/+/cd5f15f588a5d27e99ba12f057245bfe507f8c42
|
cd5f15f588a5d27e99ba12f057245bfe507f8c42
|
DO NOT MERGE
Fix security vulnerability in pre-O rild code.
Remove wrong code for setup_data_call.
Add check for max address for RIL_DIAL.
Bug: 37896655
Test: Manual.
Change-Id: I05c027140ae828a2653794fcdd94e1b1a130941b
(cherry picked from commit dda24c6557911aa1f4708abbd6b2f20f0e205b9e)
|
dispatchVoid (Parcel& p, RequestInfo *pRI) {
clearPrintBuf;
printRequest(pRI->token, pRI->pCI->requestNumber);
CALL_ONREQUEST(pRI->pCI->requestNumber, NULL, 0, pRI, pRI->socket_id);
}
|
dispatchVoid (Parcel& p, RequestInfo *pRI) {
clearPrintBuf;
printRequest(pRI->token, pRI->pCI->requestNumber);
CALL_ONREQUEST(pRI->pCI->requestNumber, NULL, 0, pRI, pRI->socket_id);
}
|
C
|
Android
| 0 |
CVE-2017-5120
|
https://www.cvedetails.com/cve/CVE-2017-5120/
| null |
https://github.com/chromium/chromium/commit/b7277af490d28ac7f802c015bb0ff31395768556
|
b7277af490d28ac7f802c015bb0ff31395768556
|
bindings: Support "attribute FrozenArray<T>?"
Adds a quick hack to support a case of "attribute FrozenArray<T>?".
Bug: 1028047
Change-Id: Ib3cecc4beb6bcc0fb0dbc667aca595454cc90c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933866
Reviewed-by: Hitoshi Yoshida <[email protected]>
Commit-Queue: Yuki Shiino <[email protected]>
Cr-Commit-Position: refs/heads/master@{#718676}
|
static void AnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::ToImpl(holder);
V8SetReturnValue(info, impl->anyAttribute().V8Value());
}
|
static void AnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::ToImpl(holder);
V8SetReturnValue(info, impl->anyAttribute().V8Value());
}
|
C
|
Chrome
| 0 |
CVE-2017-11176
|
https://www.cvedetails.com/cve/CVE-2017-11176/
|
CWE-416
|
https://github.com/torvalds/linux/commit/f991af3daabaecff34684fd51fac80319d1baad1
|
f991af3daabaecff34684fd51fac80319d1baad1
|
mqueue: fix a use-after-free in sys_mq_notify()
The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:
1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
release the file refcnt
so we when retry but the fd has been just closed by user-space
during this small window, we end up calling netlink_detachskb()
on the error path which releases the sock again, later when
the user-space closes this socket a use-after-free could be
triggered.
Setting 'sock' to NULL here should be sufficient to fix it.
Reported-by: GeneBlue <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Manfred Spraul <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
|
SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes,
const struct sigevent __user *, u_notification)
{
struct sigevent n, *p = NULL;
if (u_notification) {
if (copy_from_user(&n, u_notification, sizeof(struct sigevent)))
return -EFAULT;
p = &n;
}
return do_mq_notify(mqdes, p);
}
|
SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes,
const struct sigevent __user *, u_notification)
{
struct sigevent n, *p = NULL;
if (u_notification) {
if (copy_from_user(&n, u_notification, sizeof(struct sigevent)))
return -EFAULT;
p = &n;
}
return do_mq_notify(mqdes, p);
}
|
C
|
linux
| 0 |
CVE-2013-2017
|
https://www.cvedetails.com/cve/CVE-2013-2017/
|
CWE-399
|
https://github.com/torvalds/linux/commit/6ec82562ffc6f297d0de36d65776cff8e5704867
|
6ec82562ffc6f297d0de36d65776cff8e5704867
|
veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double free it.
Bug report : http://marc.info/?l=linux-netdev&m=127310770900442&w=3
Reported-by: Martín Ferrari <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
void netif_stacked_transfer_operstate(const struct net_device *rootdev,
struct net_device *dev)
{
if (rootdev->operstate == IF_OPER_DORMANT)
netif_dormant_on(dev);
else
netif_dormant_off(dev);
if (netif_carrier_ok(rootdev)) {
if (!netif_carrier_ok(dev))
netif_carrier_on(dev);
} else {
if (netif_carrier_ok(dev))
netif_carrier_off(dev);
}
}
|
void netif_stacked_transfer_operstate(const struct net_device *rootdev,
struct net_device *dev)
{
if (rootdev->operstate == IF_OPER_DORMANT)
netif_dormant_on(dev);
else
netif_dormant_off(dev);
if (netif_carrier_ok(rootdev)) {
if (!netif_carrier_ok(dev))
netif_carrier_on(dev);
} else {
if (netif_carrier_ok(dev))
netif_carrier_off(dev);
}
}
|
C
|
linux
| 0 |
CVE-2016-3913
|
https://www.cvedetails.com/cve/CVE-2016-3913/
|
CWE-264
|
https://android.googlesource.com/platform/frameworks/av/+/0c3b93c8c2027e74af642967eee5c142c8fd185d
|
0c3b93c8c2027e74af642967eee5c142c8fd185d
|
MediaPlayerService: avoid invalid static cast
Bug: 30204103
Change-Id: Ie0dd3568a375f1e9fed8615ad3d85184bcc99028
(cherry picked from commit ee0a0e39acdcf8f97e0d6945c31ff36a06a36e9d)
|
status_t MediaPlayerService::Client::setNextPlayer(const sp<IMediaPlayer>& player) {
ALOGV("setNextPlayer");
Mutex::Autolock l(mLock);
sp<Client> c = static_cast<Client*>(player.get());
if (!mService->hasClient(c)) {
return BAD_VALUE;
}
mNextClient = c;
if (c != NULL) {
if (mAudioOutput != NULL) {
mAudioOutput->setNextOutput(c->mAudioOutput);
} else if ((mPlayer != NULL) && !mPlayer->hardwareOutput()) {
ALOGE("no current audio output");
}
if ((mPlayer != NULL) && (mNextClient->getPlayer() != NULL)) {
mPlayer->setNextPlayer(mNextClient->getPlayer());
}
}
return OK;
}
|
status_t MediaPlayerService::Client::setNextPlayer(const sp<IMediaPlayer>& player) {
ALOGV("setNextPlayer");
Mutex::Autolock l(mLock);
sp<Client> c = static_cast<Client*>(player.get());
mNextClient = c;
if (c != NULL) {
if (mAudioOutput != NULL) {
mAudioOutput->setNextOutput(c->mAudioOutput);
} else if ((mPlayer != NULL) && !mPlayer->hardwareOutput()) {
ALOGE("no current audio output");
}
if ((mPlayer != NULL) && (mNextClient->getPlayer() != NULL)) {
mPlayer->setNextPlayer(mNextClient->getPlayer());
}
}
return OK;
}
|
C
|
Android
| 1 |
CVE-2018-6031
|
https://www.cvedetails.com/cve/CVE-2018-6031/
|
CWE-416
|
https://github.com/chromium/chromium/commit/01c9a7e71ca435651723e8cbcab0b3ad4c5351e2
|
01c9a7e71ca435651723e8cbcab0b3ad4c5351e2
|
[pdf] Use a temporary list when unloading pages
When traversing the |deferred_page_unloads_| list and handling the
unloads it's possible for new pages to get added to the list which will
invalidate the iterator.
This CL swaps the list with an empty list and does the iteration on the
list copy. New items that are unloaded while handling the defers will be
unloaded at a later point.
Bug: 780450
Change-Id: Ic7ced1c82227109784fb536ce19a4dd51b9119ac
Reviewed-on: https://chromium-review.googlesource.com/758916
Commit-Queue: dsinclair <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#515056}
|
PDFiumEngine::MouseDownState::~MouseDownState() {}
|
PDFiumEngine::MouseDownState::~MouseDownState() {}
|
C
|
Chrome
| 0 |
CVE-2017-10911
|
https://www.cvedetails.com/cve/CVE-2017-10911/
|
CWE-200
|
https://github.com/torvalds/linux/commit/089bc0143f489bd3a4578bdff5f4ca68fb26f341
|
089bc0143f489bd3a4578bdff5f4ca68fb26f341
|
xen-blkback: don't leak stack data via response ring
Rather than constructing a local structure instance on the stack, fill
the fields directly on the shared ring, just like other backends do.
Build on the fact that all response structure flavors are actually
identical (the old code did make this assumption too).
This is XSA-216.
Cc: [email protected]
Signed-off-by: Jan Beulich <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
|
static void xen_blkbk_unmap_and_respond(struct pending_req *req)
{
struct gntab_unmap_queue_data* work = &req->gnttab_unmap_data;
struct xen_blkif_ring *ring = req->ring;
struct grant_page **pages = req->segments;
unsigned int invcount;
invcount = xen_blkbk_unmap_prepare(ring, pages, req->nr_segs,
req->unmap, req->unmap_pages);
work->data = req;
work->done = xen_blkbk_unmap_and_respond_callback;
work->unmap_ops = req->unmap;
work->kunmap_ops = NULL;
work->pages = req->unmap_pages;
work->count = invcount;
gnttab_unmap_refs_async(&req->gnttab_unmap_data);
}
|
static void xen_blkbk_unmap_and_respond(struct pending_req *req)
{
struct gntab_unmap_queue_data* work = &req->gnttab_unmap_data;
struct xen_blkif_ring *ring = req->ring;
struct grant_page **pages = req->segments;
unsigned int invcount;
invcount = xen_blkbk_unmap_prepare(ring, pages, req->nr_segs,
req->unmap, req->unmap_pages);
work->data = req;
work->done = xen_blkbk_unmap_and_respond_callback;
work->unmap_ops = req->unmap;
work->kunmap_ops = NULL;
work->pages = req->unmap_pages;
work->count = invcount;
gnttab_unmap_refs_async(&req->gnttab_unmap_data);
}
|
C
|
linux
| 0 |
CVE-2011-4621
|
https://www.cvedetails.com/cve/CVE-2011-4621/
| null |
https://github.com/torvalds/linux/commit/f26f9aff6aaf67e9a430d16c266f91b13a5bff64
|
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
|
Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confused the skip_clock_update logic, which assumes
that the next call to update_rq_clock() will come nearly immediately
after being set. Make the optimization robust against the waking
a sleeper before it sucessfully deschedules case by checking that
the current task has not been dequeued before setting the flag,
since it is that useless clock update we're trying to save, and
clear unconditionally in schedule() proper instead of conditionally
in put_prev_task().
Signed-off-by: Mike Galbraith <[email protected]>
Reported-by: Bjoern B. Brandenburg <[email protected]>
Tested-by: Yong Zhang <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: [email protected]
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
|
static int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
{
struct mm_struct * mm, *oldmm;
int retval;
tsk->min_flt = tsk->maj_flt = 0;
tsk->nvcsw = tsk->nivcsw = 0;
#ifdef CONFIG_DETECT_HUNG_TASK
tsk->last_switch_count = tsk->nvcsw + tsk->nivcsw;
#endif
tsk->mm = NULL;
tsk->active_mm = NULL;
/*
* Are we cloning a kernel thread?
*
* We need to steal a active VM for that..
*/
oldmm = current->mm;
if (!oldmm)
return 0;
if (clone_flags & CLONE_VM) {
atomic_inc(&oldmm->mm_users);
mm = oldmm;
goto good_mm;
}
retval = -ENOMEM;
mm = dup_mm(tsk);
if (!mm)
goto fail_nomem;
good_mm:
/* Initializing for Swap token stuff */
mm->token_priority = 0;
mm->last_interval = 0;
if (tsk->signal->oom_score_adj == OOM_SCORE_ADJ_MIN)
atomic_inc(&mm->oom_disable_count);
tsk->mm = mm;
tsk->active_mm = mm;
return 0;
fail_nomem:
return retval;
}
|
static int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
{
struct mm_struct * mm, *oldmm;
int retval;
tsk->min_flt = tsk->maj_flt = 0;
tsk->nvcsw = tsk->nivcsw = 0;
#ifdef CONFIG_DETECT_HUNG_TASK
tsk->last_switch_count = tsk->nvcsw + tsk->nivcsw;
#endif
tsk->mm = NULL;
tsk->active_mm = NULL;
/*
* Are we cloning a kernel thread?
*
* We need to steal a active VM for that..
*/
oldmm = current->mm;
if (!oldmm)
return 0;
if (clone_flags & CLONE_VM) {
atomic_inc(&oldmm->mm_users);
mm = oldmm;
goto good_mm;
}
retval = -ENOMEM;
mm = dup_mm(tsk);
if (!mm)
goto fail_nomem;
good_mm:
/* Initializing for Swap token stuff */
mm->token_priority = 0;
mm->last_interval = 0;
if (tsk->signal->oom_score_adj == OOM_SCORE_ADJ_MIN)
atomic_inc(&mm->oom_disable_count);
tsk->mm = mm;
tsk->active_mm = mm;
return 0;
fail_nomem:
return retval;
}
|
C
|
linux
| 0 |
CVE-2011-2850
|
https://www.cvedetails.com/cve/CVE-2011-2850/
|
CWE-119
|
https://github.com/chromium/chromium/commit/87c724d81f0210494211cd36814c4cb2cf4c4bd1
|
87c724d81f0210494211cd36814c4cb2cf4c4bd1
|
Fixing Coverity bugs (DEAD_CODE and PASS_BY_VALUE)
CIDs 16230, 16439, 16610, 16635
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/7215029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90134 0039d316-1c4b-4281-b951-d872f2087c98
|
void ClipboardMessageFilter::OnReadAvailableTypes(
ui::Clipboard::Buffer buffer, std::vector<string16>* types,
bool* contains_filenames) {
GetClipboard()->ReadAvailableTypes(buffer, types, contains_filenames);
}
|
void ClipboardMessageFilter::OnReadAvailableTypes(
ui::Clipboard::Buffer buffer, std::vector<string16>* types,
bool* contains_filenames) {
GetClipboard()->ReadAvailableTypes(buffer, types, contains_filenames);
}
|
C
|
Chrome
| 0 |
CVE-2016-5696
|
https://www.cvedetails.com/cve/CVE-2016-5696/
|
CWE-200
|
https://github.com/torvalds/linux/commit/75ff39ccc1bd5d3c455b6822ab09e533c551f758
|
75ff39ccc1bd5d3c455b6822ab09e533c551f758
|
tcp: make challenge acks less predictable
Yue Cao claims that current host rate limiting of challenge ACKS
(RFC 5961) could leak enough information to allow a patient attacker
to hijack TCP sessions. He will soon provide details in an academic
paper.
This patch increases the default limit from 100 to 1000, and adds
some randomization so that the attacker can no longer hijack
sessions without spending a considerable amount of probes.
Based on initial analysis and patch from Linus.
Note that we also have per socket rate limiting, so it is tempting
to remove the host limit in the future.
v2: randomize the count of challenge acks per second, not the period.
Fixes: 282f23c6ee34 ("tcp: implement RFC 5961 3.2")
Reported-by: Yue Cao <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Suggested-by: Linus Torvalds <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Cc: Neal Cardwell <[email protected]>
Acked-by: Neal Cardwell <[email protected]>
Acked-by: Yuchung Cheng <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static void tcp_ecn_withdraw_cwr(struct tcp_sock *tp)
{
tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR;
}
|
static void tcp_ecn_withdraw_cwr(struct tcp_sock *tp)
{
tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR;
}
|
C
|
linux
| 0 |
CVE-2018-9491
|
https://www.cvedetails.com/cve/CVE-2018-9491/
|
CWE-190
|
https://android.googlesource.com/platform/frameworks/av/+/2b4667baa5a2badbdfec1794156ee17d4afef37c
|
2b4667baa5a2badbdfec1794156ee17d4afef37c
|
Check for overflow of crypto size
Bug: 111603051
Test: CTS
Change-Id: Ib5b1802b9b35769a25c16e2b977308cf7a810606
(cherry picked from commit d1fd02761236b35a336434367131f71bef7405c9)
|
media_status_t AMediaCodec_flush(AMediaCodec *mData) {
return translate_error(mData->mCodec->flush());
}
|
media_status_t AMediaCodec_flush(AMediaCodec *mData) {
return translate_error(mData->mCodec->flush());
}
|
C
|
Android
| 0 |
CVE-2011-3053
|
https://www.cvedetails.com/cve/CVE-2011-3053/
|
CWE-399
|
https://github.com/chromium/chromium/commit/c442b3eda2f1fdd4d1d4864c34c43cbaf223acae
|
c442b3eda2f1fdd4d1d4864c34c43cbaf223acae
|
chromeos: Move audio, power, and UI files into subdirs.
This moves more files from chrome/browser/chromeos/ into
subdirectories.
BUG=chromium-os:22896
TEST=did chrome os builds both with and without aura
TBR=sky
Review URL: http://codereview.chromium.org/9125006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116746 0039d316-1c4b-4281-b951-d872f2087c98
|
int SessionCrashedInfoBarDelegate::GetButtons() const {
return BUTTON_OK;
}
|
int SessionCrashedInfoBarDelegate::GetButtons() const {
return BUTTON_OK;
}
|
C
|
Chrome
| 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(PharFileInfo, getCompressedSize)
{
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_LONG(entry_obj->entry->compressed_filesize);
}
|
PHP_METHOD(PharFileInfo, getCompressedSize)
{
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_LONG(entry_obj->entry->compressed_filesize);
}
|
C
|
php
| 0 |
CVE-2013-1929
|
https://www.cvedetails.com/cve/CVE-2013-1929/
|
CWE-119
|
https://github.com/torvalds/linux/commit/715230a44310a8cf66fbfb5a46f9a62a9b2de424
|
715230a44310a8cf66fbfb5a46f9a62a9b2de424
|
tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string length (32 bytes). On overflow,
truncate the formatted firmware string instead of potentially overwriting
portions of the tg3 struct.
http://cansecwest.com/slides/2013/PrivateCore%20CSW%202013.pdf
Signed-off-by: Kees Cook <[email protected]>
Reported-by: Oded Horovitz <[email protected]>
Reported-by: Brad Spengler <[email protected]>
Cc: [email protected]
Cc: Matt Carlson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
{
return __tg3_writephy(tp, tp->phy_addr, reg, val);
}
|
static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
{
return __tg3_writephy(tp, tp->phy_addr, reg, val);
}
|
C
|
linux
| 0 |
CVE-2017-6307
|
https://www.cvedetails.com/cve/CVE-2017-6307/
|
CWE-125
|
https://github.com/verdammelt/tnef/commit/1a17af1ed0c791aec44dbdc9eab91218cc1e335a
|
1a17af1ed0c791aec44dbdc9eab91218cc1e335a
|
Use asserts on lengths to prevent invalid reads/writes.
|
mapi_attr_free_list (MAPI_Attr** attrs)
{
int i;
for (i = 0; attrs && attrs[i]; i++)
{
mapi_attr_free (attrs[i]);
XFREE (attrs[i]);
}
}
|
mapi_attr_free_list (MAPI_Attr** attrs)
{
int i;
for (i = 0; attrs && attrs[i]; i++)
{
mapi_attr_free (attrs[i]);
XFREE (attrs[i]);
}
}
|
C
|
tnef
| 0 |
CVE-2019-5824
|
https://www.cvedetails.com/cve/CVE-2019-5824/
|
CWE-119
|
https://github.com/chromium/chromium/commit/cfb022640b5eec337b06f88a485487dc92ca1ac1
|
cfb022640b5eec337b06f88a485487dc92ca1ac1
|
[MediaStream] Pass request ID parameters in the right order for OpenDevice()
Prior to this CL, requester_id and page_request_id parameters were
passed in incorrect order from MediaStreamDispatcherHost to
MediaStreamManager for the OpenDevice() operation, which could lead to
errors.
Bug: 948564
Change-Id: Iadcf3fe26adaac50564102138ce212269cf32d62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1569113
Reviewed-by: Marina Ciocea <[email protected]>
Commit-Queue: Guido Urdaneta <[email protected]>
Cr-Commit-Position: refs/heads/master@{#651255}
|
void MediaStreamDispatcherHost::Create(
int render_process_id,
int render_frame_id,
MediaStreamManager* media_stream_manager,
blink::mojom::MediaStreamDispatcherHostRequest request) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
mojo::MakeStrongBinding(
std::make_unique<MediaStreamDispatcherHost>(
render_process_id, render_frame_id, media_stream_manager),
std::move(request));
}
|
void MediaStreamDispatcherHost::Create(
int render_process_id,
int render_frame_id,
MediaStreamManager* media_stream_manager,
blink::mojom::MediaStreamDispatcherHostRequest request) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
mojo::MakeStrongBinding(
std::make_unique<MediaStreamDispatcherHost>(
render_process_id, render_frame_id, media_stream_manager),
std::move(request));
}
|
C
|
Chrome
| 0 |
CVE-2018-16541
|
https://www.cvedetails.com/cve/CVE-2018-16541/
|
CWE-416
|
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=241d91112771a6104de10b3948c3f350d6690c1d
|
241d91112771a6104de10b3948c3f350d6690c1d
| null |
gs_pop_boolean(gs_main_instance * minst, bool * result)
{
i_ctx_t *i_ctx_p = minst->i_ctx_p;
ref vref;
int code = pop_value(i_ctx_p, &vref);
if (code < 0)
return code;
check_type_only(vref, t_boolean);
*result = vref.value.boolval;
ref_stack_pop(&o_stack, 1);
return 0;
}
|
gs_pop_boolean(gs_main_instance * minst, bool * result)
{
i_ctx_t *i_ctx_p = minst->i_ctx_p;
ref vref;
int code = pop_value(i_ctx_p, &vref);
if (code < 0)
return code;
check_type_only(vref, t_boolean);
*result = vref.value.boolval;
ref_stack_pop(&o_stack, 1);
return 0;
}
|
C
|
ghostscript
| 0 |
CVE-2013-2871
|
https://www.cvedetails.com/cve/CVE-2013-2871/
|
CWE-20
|
https://github.com/chromium/chromium/commit/bb9cfb0aba25f4b13e57bdd4a9fac80ba071e7b9
|
bb9cfb0aba25f4b13e57bdd4a9fac80ba071e7b9
|
Setting input.x-webkit-speech should not cause focus change
In r150866, we introduced element()->focus() in destroyShadowSubtree()
to retain focus on <input> when its type attribute gets changed.
But when x-webkit-speech attribute is changed, the element is detached
before calling destroyShadowSubtree() and element()->focus() failed
This patch moves detach() after destroyShadowSubtree() to fix the
problem.
BUG=243818
TEST=fast/forms/input-type-change-focusout.html
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/16084005
git-svn-id: svn://svn.chromium.org/blink/trunk@151444 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(const String& value)
{
if (element()->isValidValue(value)) {
element()->setValue(value, DispatchInputAndChangeEvent);
return;
}
if (!m_dateTimeEditElement)
return;
DateComponents date;
unsigned end;
if (date.parseDate(value.characters(), value.length(), 0, end) && end == value.length())
m_dateTimeEditElement->setOnlyYearMonthDay(date);
}
|
void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(const String& value)
{
if (element()->isValidValue(value)) {
element()->setValue(value, DispatchInputAndChangeEvent);
return;
}
if (!m_dateTimeEditElement)
return;
DateComponents date;
unsigned end;
if (date.parseDate(value.characters(), value.length(), 0, end) && end == value.length())
m_dateTimeEditElement->setOnlyYearMonthDay(date);
}
|
C
|
Chrome
| 0 |
CVE-2017-12154
|
https://www.cvedetails.com/cve/CVE-2017-12154/
| null |
https://github.com/torvalds/linux/commit/51aa68e7d57e3217192d88ce90fd5b8ef29ec94f
|
51aa68e7d57e3217192d88ce90fd5b8ef29ec94f
|
kvm: nVMX: Don't allow L2 to access the hardware CR8
If L1 does not specify the "use TPR shadow" VM-execution control in
vmcs12, then L0 must specify the "CR8-load exiting" and "CR8-store
exiting" VM-execution controls in vmcs02. Failure to do so will give
the L2 VM unrestricted read/write access to the hardware CR8.
This fixes CVE-2017-12154.
Signed-off-by: Jim Mattson <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static void ept_set_mmio_spte_mask(void)
{
/*
* EPT Misconfigurations can be generated if the value of bits 2:0
* of an EPT paging-structure entry is 110b (write/execute).
*/
kvm_mmu_set_mmio_spte_mask(VMX_EPT_RWX_MASK,
VMX_EPT_MISCONFIG_WX_VALUE);
}
|
static void ept_set_mmio_spte_mask(void)
{
/*
* EPT Misconfigurations can be generated if the value of bits 2:0
* of an EPT paging-structure entry is 110b (write/execute).
*/
kvm_mmu_set_mmio_spte_mask(VMX_EPT_RWX_MASK,
VMX_EPT_MISCONFIG_WX_VALUE);
}
|
C
|
linux
| 0 |
CVE-2011-3896
|
https://www.cvedetails.com/cve/CVE-2011-3896/
|
CWE-119
|
https://github.com/chromium/chromium/commit/5925dff83699508b5e2735afb0297dfb310e159d
|
5925dff83699508b5e2735afb0297dfb310e159d
|
Implement a bubble that appears at the top of the screen when a tab enters
fullscreen mode via webkitRequestFullScreen(), telling the user how to exit
fullscreen.
This is implemented as an NSView rather than an NSWindow because the floating
chrome that appears in presentation mode should overlap the bubble.
Content-initiated fullscreen mode makes use of 'presentation mode' on the Mac:
the mode in which the UI is hidden, accessible by moving the cursor to the top
of the screen. On Snow Leopard, this mode is synonymous with fullscreen mode.
On Lion, however, fullscreen mode does not imply presentation mode: in
non-presentation fullscreen mode, the chrome is permanently shown. It is
possible to switch between presentation mode and fullscreen mode using the
presentation mode UI control.
When a tab initiates fullscreen mode on Lion, we enter presentation mode if not
in presentation mode already. When the user exits fullscreen mode using Chrome
UI (i.e. keyboard shortcuts, menu items, buttons, switching tabs, etc.) we
return the user to the mode they were in before the tab entered fullscreen.
BUG=14471
TEST=Enter fullscreen mode using webkitRequestFullScreen. You should see a bubble pop down from the top of the screen.
Need to test the Lion logic somehow, with no Lion trybots.
BUG=96883
Original review http://codereview.chromium.org/7890056/
TBR=thakis
Review URL: http://codereview.chromium.org/7920024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101624 0039d316-1c4b-4281-b951-d872f2087c98
|
void Browser::OpenClearBrowsingDataDialog() {
UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg"));
ShowOptionsTab(chrome::kClearBrowserDataSubPage);
}
|
void Browser::OpenClearBrowsingDataDialog() {
UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg"));
ShowOptionsTab(chrome::kClearBrowserDataSubPage);
}
|
C
|
Chrome
| 0 |
CVE-2011-3101
|
https://www.cvedetails.com/cve/CVE-2011-3101/
| null |
https://github.com/chromium/chromium/commit/8f0b86c2fc77fca1508d81314f864011abe25f04
|
8f0b86c2fc77fca1508d81314f864011abe25f04
|
Always write data to new buffer in SimulateAttrib0
This is to work around linux nvidia driver bug.
TEST=asan
BUG=118970
Review URL: http://codereview.chromium.org/10019003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131538 0039d316-1c4b-4281-b951-d872f2087c98
|
void GLES2DecoderImpl::DoUniform1i(GLint fake_location, GLint v0) {
GLenum type = 0;
GLsizei count = 1;
GLint real_location = -1;
if (!PrepForSetUniformByLocation(
fake_location, "glUniform1iv", &real_location, &type, &count)) {
return;
}
current_program_->SetSamplers(fake_location, 1, &v0);
glUniform1i(real_location, v0);
}
|
void GLES2DecoderImpl::DoUniform1i(GLint fake_location, GLint v0) {
GLenum type = 0;
GLsizei count = 1;
GLint real_location = -1;
if (!PrepForSetUniformByLocation(
fake_location, "glUniform1iv", &real_location, &type, &count)) {
return;
}
current_program_->SetSamplers(fake_location, 1, &v0);
glUniform1i(real_location, v0);
}
|
C
|
Chrome
| 0 |
CVE-2013-0886
|
https://www.cvedetails.com/cve/CVE-2013-0886/
| null |
https://github.com/chromium/chromium/commit/18d67244984a574ba2dd8779faabc0e3e34f4b76
|
18d67244984a574ba2dd8779faabc0e3e34f4b76
|
Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the renderer contexts
- do not require a context to be able to generate textures when
creating the GLSurfaceHandle
- clearer ownership semantics that potentially allows for more
robust and easier lost context handling/thumbnailing/etc., since a texture is at
any given time owned by either: UI parent, mailbox, or
TextureImageTransportSurface
- simplify frontbuffer protection logic;
the frontbuffer textures are now owned by RWHV where they are refcounted
The TextureImageTransportSurface informs RenderWidgetHostView of the
mailbox names for the front- and backbuffer textures by
associating them with a surface_handle (1 or 2) in the AcceleratedSurfaceNew message.
During SwapBuffers() or PostSubBuffer() cycles, it then uses
produceTextureCHROMIUM() and consumeTextureCHROMIUM()
to transfer ownership between renderer and browser compositor.
RWHV sends back the surface_handle of the buffer being returned with the Swap ACK
(or 0 if no buffer is being returned in which case TextureImageTransportSurface will
allocate a new texture - note that this could be used to
simply keep textures for thumbnailing).
BUG=154815,139616
[email protected]
Review URL: https://chromiumcodereview.appspot.com/11194042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171569 0039d316-1c4b-4281-b951-d872f2087c98
|
bool RenderProcessHostImpl::HasConnection() const {
return channel_.get() != NULL;
}
|
bool RenderProcessHostImpl::HasConnection() const {
return channel_.get() != NULL;
}
|
C
|
Chrome
| 0 |
CVE-2016-10130
|
https://www.cvedetails.com/cve/CVE-2016-10130/
|
CWE-284
|
https://github.com/libgit2/libgit2/commit/9a64e62f0f20c9cf9b2e1609f037060eb2d8eb22
|
9a64e62f0f20c9cf9b2e1609f037060eb2d8eb22
|
http: check certificate validity before clobbering the error variable
|
static int auth_context_match(
git_http_auth_context **out,
http_subtransport *t,
bool (*scheme_match)(git_http_auth_scheme *scheme, void *data),
void *data)
{
git_http_auth_scheme *scheme = NULL;
git_http_auth_context *context = NULL, *c;
size_t i;
*out = NULL;
for (i = 0; i < ARRAY_SIZE(auth_schemes); i++) {
if (scheme_match(&auth_schemes[i], data)) {
scheme = &auth_schemes[i];
break;
}
}
if (!scheme)
return 0;
/* See if authentication has already started for this scheme */
git_vector_foreach(&t->auth_contexts, i, c) {
if (c->type == scheme->type) {
context = c;
break;
}
}
if (!context) {
if (scheme->init_context(&context, &t->connection_data) < 0)
return -1;
else if (!context)
return 0;
else if (git_vector_insert(&t->auth_contexts, context) < 0)
return -1;
}
*out = context;
return 0;
}
|
static int auth_context_match(
git_http_auth_context **out,
http_subtransport *t,
bool (*scheme_match)(git_http_auth_scheme *scheme, void *data),
void *data)
{
git_http_auth_scheme *scheme = NULL;
git_http_auth_context *context = NULL, *c;
size_t i;
*out = NULL;
for (i = 0; i < ARRAY_SIZE(auth_schemes); i++) {
if (scheme_match(&auth_schemes[i], data)) {
scheme = &auth_schemes[i];
break;
}
}
if (!scheme)
return 0;
/* See if authentication has already started for this scheme */
git_vector_foreach(&t->auth_contexts, i, c) {
if (c->type == scheme->type) {
context = c;
break;
}
}
if (!context) {
if (scheme->init_context(&context, &t->connection_data) < 0)
return -1;
else if (!context)
return 0;
else if (git_vector_insert(&t->auth_contexts, context) < 0)
return -1;
}
*out = context;
return 0;
}
|
C
|
libgit2
| 0 |
CVE-2016-3922
|
https://www.cvedetails.com/cve/CVE-2016-3922/
|
CWE-264
|
https://android.googlesource.com/platform/hardware/ril/+/95610818918f6f11fe7d23aca1380e6c0fac2af0
|
95610818918f6f11fe7d23aca1380e6c0fac2af0
|
Replace variable-length arrays on stack with malloc.
Bug: 30202619
Change-Id: Ib95e08a1c009d88a4b4fd8d8fdba0641c6129008
(cherry picked from commit 943905bb9f99e3caa856b42c531e2be752da8834)
|
void RilSapSocket::initSapSocket(const char *socketName,
RIL_RadioFunctions *uimFuncs) {
if (strcmp(socketName, "sap_uim_socket1") == 0) {
if(!SocketExists(socketName)) {
addSocketToList(socketName, RIL_SOCKET_1, uimFuncs);
}
}
#if (SIM_COUNT >= 2)
if (strcmp(socketName, "sap_uim_socket2") == 0) {
if(!SocketExists(socketName)) {
addSocketToList(socketName, RIL_SOCKET_2, uimFuncs);
}
}
#endif
#if (SIM_COUNT >= 3)
if (strcmp(socketName, "sap_uim_socket3") == 0) {
if(!SocketExists(socketName)) {
addSocketToList(socketName, RIL_SOCKET_3, uimFuncs);
}
}
#endif
#if (SIM_COUNT >= 4)
if (strcmp(socketName, "sap_uim_socket4") == 0) {
if(!SocketExists(socketName)) {
addSocketToList(socketName, RIL_SOCKET_4, uimFuncs);
}
}
#endif
}
|
void RilSapSocket::initSapSocket(const char *socketName,
RIL_RadioFunctions *uimFuncs) {
if (strcmp(socketName, "sap_uim_socket1") == 0) {
if(!SocketExists(socketName)) {
addSocketToList(socketName, RIL_SOCKET_1, uimFuncs);
}
}
#if (SIM_COUNT >= 2)
if (strcmp(socketName, "sap_uim_socket2") == 0) {
if(!SocketExists(socketName)) {
addSocketToList(socketName, RIL_SOCKET_2, uimFuncs);
}
}
#endif
#if (SIM_COUNT >= 3)
if (strcmp(socketName, "sap_uim_socket3") == 0) {
if(!SocketExists(socketName)) {
addSocketToList(socketName, RIL_SOCKET_3, uimFuncs);
}
}
#endif
#if (SIM_COUNT >= 4)
if (strcmp(socketName, "sap_uim_socket4") == 0) {
if(!SocketExists(socketName)) {
addSocketToList(socketName, RIL_SOCKET_4, uimFuncs);
}
}
#endif
}
|
C
|
Android
| 0 |
CVE-2016-3839
|
https://www.cvedetails.com/cve/CVE-2016-3839/
|
CWE-284
|
https://android.googlesource.com/platform/system/bt/+/472271b153c5dc53c28beac55480a8d8434b2d5c
|
472271b153c5dc53c28beac55480a8d8434b2d5c
|
DO NOT MERGE Fix potential DoS caused by delivering signal to BT process
Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360
Conflicts:
btif/co/bta_hh_co.c
btif/src/btif_core.c
Merge conflict resolution of ag/1161415 (referencing ag/1164670)
- Directly into mnc-mr2-release
|
static int a2dp_command(struct a2dp_stream_common *common, char cmd)
{
char ack;
DEBUG("A2DP COMMAND %s", dump_a2dp_ctrl_event(cmd));
/* send command */
if (TEMP_FAILURE_RETRY(send(common->ctrl_fd, &cmd, 1, MSG_NOSIGNAL)) == -1)
{
ERROR("cmd failed (%s)", strerror(errno));
skt_disconnect(common->ctrl_fd);
common->ctrl_fd = AUDIO_SKT_DISCONNECTED;
return -1;
}
/* wait for ack byte */
if (a2dp_ctrl_receive(common, &ack, 1) < 0)
return -1;
DEBUG("A2DP COMMAND %s DONE STATUS %d", dump_a2dp_ctrl_event(cmd), ack);
if (ack == A2DP_CTRL_ACK_INCALL_FAILURE)
return ack;
if (ack != A2DP_CTRL_ACK_SUCCESS)
return -1;
return 0;
}
|
static int a2dp_command(struct a2dp_stream_common *common, char cmd)
{
char ack;
DEBUG("A2DP COMMAND %s", dump_a2dp_ctrl_event(cmd));
/* send command */
if (send(common->ctrl_fd, &cmd, 1, MSG_NOSIGNAL) == -1)
{
ERROR("cmd failed (%s)", strerror(errno));
skt_disconnect(common->ctrl_fd);
common->ctrl_fd = AUDIO_SKT_DISCONNECTED;
return -1;
}
/* wait for ack byte */
if (a2dp_ctrl_receive(common, &ack, 1) < 0)
return -1;
DEBUG("A2DP COMMAND %s DONE STATUS %d", dump_a2dp_ctrl_event(cmd), ack);
if (ack == A2DP_CTRL_ACK_INCALL_FAILURE)
return ack;
if (ack != A2DP_CTRL_ACK_SUCCESS)
return -1;
return 0;
}
|
C
|
Android
| 1 |
CVE-2013-2867
|
https://www.cvedetails.com/cve/CVE-2013-2867/
| null |
https://github.com/chromium/chromium/commit/d358f57009b85fb7440208afa5ba87636b491889
|
d358f57009b85fb7440208afa5ba87636b491889
|
Refactor to support default Bluetooth pairing delegate
In order to support a default pairing delegate we need to move the agent
service provider delegate implementation from BluetoothDevice to
BluetoothAdapter while retaining the existing API.
BUG=338492
TEST=device_unittests, unit_tests, browser_tests
Review URL: https://codereview.chromium.org/148293003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252216 0039d316-1c4b-4281-b951-d872f2087c98
|
void BluetoothDeviceChromeOS::ClearOutOfBandPairingData(
const base::Closure& callback,
const ErrorCallback& error_callback) {
error_callback.Run();
}
|
void BluetoothDeviceChromeOS::ClearOutOfBandPairingData(
const base::Closure& callback,
const ErrorCallback& error_callback) {
error_callback.Run();
}
|
C
|
Chrome
| 0 |
CVE-2012-2121
|
https://www.cvedetails.com/cve/CVE-2012-2121/
|
CWE-264
|
https://github.com/torvalds/linux/commit/09ca8e1173bcb12e2a449698c9ae3b86a8a10195
|
09ca8e1173bcb12e2a449698c9ae3b86a8a10195
|
KVM: unmap pages from the iommu when slots are removed
commit 32f6daad4651a748a58a3ab6da0611862175722f upstream.
We've been adding new mappings, but not destroying old mappings.
This can lead to a page leak as pages are pinned using
get_user_pages, but only unpinned with put_page if they still
exist in the memslots list on vm shutdown. A memslot that is
destroyed while an iommu domain is enabled for the guest will
therefore result in an elevated page reference count that is
never cleared.
Additionally, without this fix, the iommu is only programmed
with the first translation for a gpa. This can result in
peer-to-peer errors if a mapping is destroyed and replaced by a
new mapping at the same gpa as the iommu will still be pointing
to the original, pinned memory address.
Signed-off-by: Alex Williamson <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static unsigned long gfn_to_hva_many(struct kvm_memory_slot *slot, gfn_t gfn,
gfn_t *nr_pages)
{
if (!slot || slot->flags & KVM_MEMSLOT_INVALID)
return bad_hva();
if (nr_pages)
*nr_pages = slot->npages - (gfn - slot->base_gfn);
return gfn_to_hva_memslot(slot, gfn);
}
|
static unsigned long gfn_to_hva_many(struct kvm_memory_slot *slot, gfn_t gfn,
gfn_t *nr_pages)
{
if (!slot || slot->flags & KVM_MEMSLOT_INVALID)
return bad_hva();
if (nr_pages)
*nr_pages = slot->npages - (gfn - slot->base_gfn);
return gfn_to_hva_memslot(slot, gfn);
}
|
C
|
linux
| 0 |
CVE-2011-3106
|
https://www.cvedetails.com/cve/CVE-2011-3106/
|
CWE-119
|
https://github.com/chromium/chromium/commit/5385c44d9634d00b1cec2abf0fe7290d4205c7b0
|
5385c44d9634d00b1cec2abf0fe7290d4205c7b0
|
Inherits SupportsWeakPtr<T> instead of having WeakPtrFactory<T>
This change refines r137676.
BUG=122654
TEST=browser_test
Review URL: https://chromiumcodereview.appspot.com/10332233
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139771 0039d316-1c4b-4281-b951-d872f2087c98
|
SSLCertErrorHandler* SSLCertErrorHandler::AsSSLCertErrorHandler() {
return this;
}
|
SSLCertErrorHandler* SSLCertErrorHandler::AsSSLCertErrorHandler() {
return this;
}
|
C
|
Chrome
| 0 |
CVE-2013-0881
|
https://www.cvedetails.com/cve/CVE-2013-0881/
|
CWE-20
|
https://github.com/chromium/chromium/commit/634c5943f46abe8c6280079f6d394dfee08c3c8f
|
634c5943f46abe8c6280079f6d394dfee08c3c8f
|
Disable some more query compositingState asserts.
This gets the tests passing again on Mac. See the bug for the stacktrace.
A future patch will need to actually fix the incorrect reading of
compositingState.
BUG=343179
Review URL: https://codereview.chromium.org/162153002
git-svn-id: svn://svn.chromium.org/blink/trunk@167069 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
bool RenderLayerCompositor::requiresCompositingForFrame(RenderObject* renderer) const
{
if (!renderer->isRenderPart())
return false;
RenderPart* frameRenderer = toRenderPart(renderer);
if (!frameRenderer->requiresAcceleratedCompositing())
return false;
if (frameRenderer->node() && frameRenderer->node()->isFrameOwnerElement() && toHTMLFrameOwnerElement(frameRenderer->node())->contentFrame() && toHTMLFrameOwnerElement(frameRenderer->node())->contentFrame()->remotePlatformLayer())
return true;
m_needsToRecomputeCompositingRequirements = true;
RenderLayerCompositor* innerCompositor = frameContentsCompositor(frameRenderer);
if (!innerCompositor)
return false;
if (renderer->needsLayout())
return frameRenderer->hasLayer() && frameRenderer->layer()->hasCompositedLayerMapping();
IntRect contentBox = pixelSnappedIntRect(frameRenderer->contentBoxRect());
return contentBox.height() * contentBox.width() > 0;
}
|
bool RenderLayerCompositor::requiresCompositingForFrame(RenderObject* renderer) const
{
if (!renderer->isRenderPart())
return false;
RenderPart* frameRenderer = toRenderPart(renderer);
if (!frameRenderer->requiresAcceleratedCompositing())
return false;
if (frameRenderer->node() && frameRenderer->node()->isFrameOwnerElement() && toHTMLFrameOwnerElement(frameRenderer->node())->contentFrame() && toHTMLFrameOwnerElement(frameRenderer->node())->contentFrame()->remotePlatformLayer())
return true;
m_needsToRecomputeCompositingRequirements = true;
RenderLayerCompositor* innerCompositor = frameContentsCompositor(frameRenderer);
if (!innerCompositor)
return false;
if (renderer->needsLayout())
return frameRenderer->hasLayer() && frameRenderer->layer()->hasCompositedLayerMapping();
IntRect contentBox = pixelSnappedIntRect(frameRenderer->contentBoxRect());
return contentBox.height() * contentBox.width() > 0;
}
|
C
|
Chrome
| 0 |
CVE-2015-1265
|
https://www.cvedetails.com/cve/CVE-2015-1265/
| null |
https://github.com/chromium/chromium/commit/04ff52bb66284467ccb43d90800013b89ee8db75
|
04ff52bb66284467ccb43d90800013b89ee8db75
|
Switching AudioOutputAuthorizationHandler from using AudioManager interface to AudioSystem one.
BUG=672468
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Review-Url: https://codereview.chromium.org/2692203003
Cr-Commit-Position: refs/heads/master@{#450939}
|
std::unique_ptr<AudioSystem> AudioSystemImpl::Create(
AudioManager* audio_manager) {
return base::WrapUnique(new AudioSystemImpl(audio_manager));
}
|
std::unique_ptr<AudioSystem> AudioSystemImpl::Create(
AudioManager* audio_manager) {
return base::WrapUnique(new AudioSystemImpl(audio_manager));
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/4da7eefcaad044a6f919947a2a0e3d4fed87834c
|
4da7eefcaad044a6f919947a2a0e3d4fed87834c
|
[Qt] Remove QOpenGL specific code from GraphicsSurfaceGLX.
https://bugs.webkit.org/show_bug.cgi?id=100492
This patch removes most of the QOpenGLContext related code
from GraphicsSurfaceGLX. This allows sharing almost all
GraphicsSurfaceGLX code with EFL, by relying on pure GLX.
Patch by Zeno Albisser <[email protected]> on 2012-10-26
Reviewed by Kenneth Rohde Christiansen.
* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::OffScreenRootWindow::get):
(WebCore::OffScreenRootWindow::~OffScreenRootWindow):
(OffScreenRootWindow):
(WebCore):
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createSurface):
(WebCore::GraphicsSurfacePrivate::makeCurrent):
(WebCore::GraphicsSurfacePrivate::doneCurrent):
(WebCore::GraphicsSurfacePrivate::swapBuffers):
(WebCore::GraphicsSurfacePrivate::copyFromTexture):
(GraphicsSurfacePrivate):
(WebCore::resolveGLMethods):
git-svn-id: svn://svn.chromium.org/blink/trunk@132628 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void GraphicsSurface::platformUnlock()
{
}
|
void GraphicsSurface::platformUnlock()
{
}
|
C
|
Chrome
| 0 |
CVE-2017-6903
|
https://www.cvedetails.com/cve/CVE-2017-6903/
|
CWE-269
|
https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372
|
b173ac05993f634a42be3d3535e1b158de0c3372
|
Merge some file writing extension checks from OpenJK.
Thanks Ensiform.
https://github.com/JACoders/OpenJK/commit/05928a57f9e4aae15a3bd0
https://github.com/JACoders/OpenJK/commit/ef124fd0fc48af164581176
|
void Con_MessageMode3_f (void) {
chat_playerNum = VM_Call( cgvm, CG_CROSSHAIR_PLAYER );
if ( chat_playerNum < 0 || chat_playerNum >= MAX_CLIENTS ) {
chat_playerNum = -1;
return;
}
chat_team = qfalse;
Field_Clear( &chatField );
chatField.widthInChars = 30;
Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE );
}
|
void Con_MessageMode3_f (void) {
chat_playerNum = VM_Call( cgvm, CG_CROSSHAIR_PLAYER );
if ( chat_playerNum < 0 || chat_playerNum >= MAX_CLIENTS ) {
chat_playerNum = -1;
return;
}
chat_team = qfalse;
Field_Clear( &chatField );
chatField.widthInChars = 30;
Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE );
}
|
C
|
OpenJK
| 0 |
CVE-2018-12247
|
https://www.cvedetails.com/cve/CVE-2018-12247/
|
CWE-476
|
https://github.com/mruby/mruby/commit/55edae0226409de25e59922807cb09acb45731a2
|
55edae0226409de25e59922807cb09acb45731a2
|
Allow `Object#clone` to copy frozen status only; fix #4036
Copying all flags from the original object may overwrite the clone's
flags e.g. the embedded flag.
|
mrb_obj_init_copy(mrb_state *mrb, mrb_value self)
{
mrb_value orig;
mrb_get_args(mrb, "o", &orig);
if (mrb_obj_equal(mrb, self, orig)) return self;
if ((mrb_type(self) != mrb_type(orig)) || (mrb_obj_class(mrb, self) != mrb_obj_class(mrb, orig))) {
mrb_raise(mrb, E_TYPE_ERROR, "initialize_copy should take same class object");
}
return self;
}
|
mrb_obj_init_copy(mrb_state *mrb, mrb_value self)
{
mrb_value orig;
mrb_get_args(mrb, "o", &orig);
if (mrb_obj_equal(mrb, self, orig)) return self;
if ((mrb_type(self) != mrb_type(orig)) || (mrb_obj_class(mrb, self) != mrb_obj_class(mrb, orig))) {
mrb_raise(mrb, E_TYPE_ERROR, "initialize_copy should take same class object");
}
return self;
}
|
C
|
mruby
| 0 |
CVE-2014-1713
|
https://www.cvedetails.com/cve/CVE-2014-1713/
|
CWE-399
|
https://github.com/chromium/chromium/commit/f85a87ec670ad0fce9d98d90c9a705b72a288154
|
f85a87ec670ad0fce9d98d90c9a705b72a288154
|
document.location bindings fix
BUG=352374
[email protected]
Review URL: https://codereview.chromium.org/196343011
git-svn-id: svn://svn.chromium.org/blink/trunk@169176 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
static void nullableDoubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
double jsValue = imp->nullableDoubleAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValue(info, jsValue);
}
|
static void nullableDoubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
double jsValue = imp->nullableDoubleAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValue(info, jsValue);
}
|
C
|
Chrome
| 0 |
CVE-2016-5153
|
https://www.cvedetails.com/cve/CVE-2016-5153/
|
CWE-19
|
https://github.com/chromium/chromium/commit/20a9e39a925dd0fb183acb61bb7b87f29abea83f
|
20a9e39a925dd0fb183acb61bb7b87f29abea83f
|
Tracing: Connect to service on startup
Temporary workaround for flaky tests introduced by
https://chromium-review.googlesource.com/c/chromium/src/+/1439082
[email protected]
Bug: 928410, 928363
Change-Id: I0dcf20cbdf91a7beea167a220ba9ef7e0604c1ab
Reviewed-on: https://chromium-review.googlesource.com/c/1452767
Reviewed-by: oysteine <[email protected]>
Reviewed-by: Eric Seckler <[email protected]>
Reviewed-by: Aaron Gable <[email protected]>
Commit-Queue: oysteine <[email protected]>
Cr-Commit-Position: refs/heads/master@{#631052}
|
std::string GetClockString() {
switch (base::TimeTicks::GetClock()) {
case base::TimeTicks::Clock::FUCHSIA_ZX_CLOCK_MONOTONIC:
return "FUCHSIA_ZX_CLOCK_MONOTONIC";
case base::TimeTicks::Clock::LINUX_CLOCK_MONOTONIC:
return "LINUX_CLOCK_MONOTONIC";
case base::TimeTicks::Clock::IOS_CF_ABSOLUTE_TIME_MINUS_KERN_BOOTTIME:
return "IOS_CF_ABSOLUTE_TIME_MINUS_KERN_BOOTTIME";
case base::TimeTicks::Clock::MAC_MACH_ABSOLUTE_TIME:
return "MAC_MACH_ABSOLUTE_TIME";
case base::TimeTicks::Clock::WIN_QPC:
return "WIN_QPC";
case base::TimeTicks::Clock::WIN_ROLLOVER_PROTECTED_TIME_GET_TIME:
return "WIN_ROLLOVER_PROTECTED_TIME_GET_TIME";
}
NOTREACHED();
return std::string();
}
|
std::string GetClockString() {
switch (base::TimeTicks::GetClock()) {
case base::TimeTicks::Clock::FUCHSIA_ZX_CLOCK_MONOTONIC:
return "FUCHSIA_ZX_CLOCK_MONOTONIC";
case base::TimeTicks::Clock::LINUX_CLOCK_MONOTONIC:
return "LINUX_CLOCK_MONOTONIC";
case base::TimeTicks::Clock::IOS_CF_ABSOLUTE_TIME_MINUS_KERN_BOOTTIME:
return "IOS_CF_ABSOLUTE_TIME_MINUS_KERN_BOOTTIME";
case base::TimeTicks::Clock::MAC_MACH_ABSOLUTE_TIME:
return "MAC_MACH_ABSOLUTE_TIME";
case base::TimeTicks::Clock::WIN_QPC:
return "WIN_QPC";
case base::TimeTicks::Clock::WIN_ROLLOVER_PROTECTED_TIME_GET_TIME:
return "WIN_ROLLOVER_PROTECTED_TIME_GET_TIME";
}
NOTREACHED();
return std::string();
}
|
C
|
Chrome
| 0 |
CVE-2016-3821
|
https://www.cvedetails.com/cve/CVE-2016-3821/
|
CWE-476
|
https://android.googlesource.com/platform/frameworks/av/+/42a25c46b844518ff0d0b920c20c519e1417be69
|
42a25c46b844518ff0d0b920c20c519e1417be69
|
Don't use sp<>&
because they may end up pointing to NULL after a NULL check was performed.
Bug: 28166152
Change-Id: Iab2ea30395b620628cc6f3d067dd4f6fcda824fe
|
status_t MediaPlayer::getSyncSettings(
AVSyncSettings* sync /* nonnull */, float* videoFps /* nonnull */)
{
Mutex::Autolock _l(mLock);
if (mPlayer == 0) return INVALID_OPERATION;
return mPlayer->getSyncSettings(sync, videoFps);
}
|
status_t MediaPlayer::getSyncSettings(
AVSyncSettings* sync /* nonnull */, float* videoFps /* nonnull */)
{
Mutex::Autolock _l(mLock);
if (mPlayer == 0) return INVALID_OPERATION;
return mPlayer->getSyncSettings(sync, videoFps);
}
|
C
|
Android
| 0 |
CVE-2017-10971
|
https://www.cvedetails.com/cve/CVE-2017-10971/
|
CWE-119
|
https://cgit.freedesktop.org/xorg/xserver/commit/?id=215f894965df5fb0bb45b107d84524e700d2073c
|
215f894965df5fb0bb45b107d84524e700d2073c
| null |
ProcGrabKey(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xGrabKeyReq);
GrabPtr grab;
DeviceIntPtr keybd = PickKeyboard(client);
int rc;
GrabParameters param;
GrabMask mask;
REQUEST_SIZE_MATCH(xGrabKeyReq);
param = (GrabParameters) {
.grabtype = CORE,
.ownerEvents = stuff->ownerEvents,
.this_device_mode = stuff->keyboardMode,
.other_devices_mode = stuff->pointerMode,
.modifiers = stuff->modifiers
};
rc = CheckGrabValues(client, ¶m);
if (rc != Success)
return rc;
if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) ||
(stuff->key < keybd->key->xkbInfo->desc->min_key_code))
&& (stuff->key != AnyKey)) {
client->errorValue = stuff->key;
return BadValue;
}
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess);
if (rc != Success)
return rc;
mask.core = (KeyPressMask | KeyReleaseMask);
grab = CreateGrab(client->index, keybd, keybd, pWin, CORE, &mask,
¶m, KeyPress, stuff->key, NullWindow, NullCursor);
if (!grab)
return BadAlloc;
return AddPassiveGrabToList(client, grab);
}
|
ProcGrabKey(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xGrabKeyReq);
GrabPtr grab;
DeviceIntPtr keybd = PickKeyboard(client);
int rc;
GrabParameters param;
GrabMask mask;
REQUEST_SIZE_MATCH(xGrabKeyReq);
param = (GrabParameters) {
.grabtype = CORE,
.ownerEvents = stuff->ownerEvents,
.this_device_mode = stuff->keyboardMode,
.other_devices_mode = stuff->pointerMode,
.modifiers = stuff->modifiers
};
rc = CheckGrabValues(client, ¶m);
if (rc != Success)
return rc;
if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) ||
(stuff->key < keybd->key->xkbInfo->desc->min_key_code))
&& (stuff->key != AnyKey)) {
client->errorValue = stuff->key;
return BadValue;
}
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess);
if (rc != Success)
return rc;
mask.core = (KeyPressMask | KeyReleaseMask);
grab = CreateGrab(client->index, keybd, keybd, pWin, CORE, &mask,
¶m, KeyPress, stuff->key, NullWindow, NullCursor);
if (!grab)
return BadAlloc;
return AddPassiveGrabToList(client, grab);
}
|
C
|
xserver
| 0 |
CVE-2016-5185
|
https://www.cvedetails.com/cve/CVE-2016-5185/
|
CWE-416
|
https://github.com/chromium/chromium/commit/f2d26633cbd50735ac2af30436888b71ac0abad3
|
f2d26633cbd50735ac2af30436888b71ac0abad3
|
[Autofill] Remove AutofillPopupViewViews and associated feature.
Bug: 906135,831603
Change-Id: I3c982f8b3ffb4928c7c878e74e10113999106499
Reviewed-on: https://chromium-review.googlesource.com/c/1387124
Reviewed-by: Robert Kaplow <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Reviewed-by: Fabio Tirelo <[email protected]>
Reviewed-by: Tommy Martino <[email protected]>
Commit-Queue: Mathieu Perreault <[email protected]>
Cr-Commit-Position: refs/heads/master@{#621360}
|
SkColor AutofillPopupBaseView::GetBackgroundColor() {
return GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_MenuBackgroundColor);
}
|
SkColor AutofillPopupBaseView::GetBackgroundColor() {
return GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_MenuBackgroundColor);
}
|
C
|
Chrome
| 0 |
CVE-2016-5199
|
https://www.cvedetails.com/cve/CVE-2016-5199/
|
CWE-119
|
https://github.com/chromium/chromium/commit/c995d4fe5e96f4d6d4a88b7867279b08e72d2579
|
c995d4fe5e96f4d6d4a88b7867279b08e72d2579
|
Move IsDataSaverEnabledByUser to be a static method and use it
This method now officially becomes the source of truth that
everything in the code base eventually calls into to determine whether
or not DataSaver is enabled.
Bug: 934399
Change-Id: Iae837b710ace8cc3101188f79d02cbc2d4f0fd93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1537242
Reviewed-by: Joshua Pawlicki <[email protected]>
Reviewed-by: Tarun Bansal <[email protected]>
Commit-Queue: Robert Ogden <[email protected]>
Cr-Commit-Position: refs/heads/master@{#643948}
|
void ChromeContentBrowserClient::OverrideNavigationParams(
SiteInstance* site_instance,
ui::PageTransition* transition,
bool* is_renderer_initiated,
content::Referrer* referrer) {
DCHECK(transition);
DCHECK(is_renderer_initiated);
DCHECK(referrer);
if (IsNTPSiteInstance(site_instance) &&
ui::PageTransitionCoreTypeIs(*transition, ui::PAGE_TRANSITION_LINK)) {
*transition = ui::PAGE_TRANSITION_AUTO_BOOKMARK;
*is_renderer_initiated = false;
*referrer = content::Referrer();
}
#if BUILDFLAG(ENABLE_EXTENSIONS)
ChromeContentBrowserClientExtensionsPart::OverrideNavigationParams(
site_instance, transition, is_renderer_initiated, referrer);
#endif
}
|
void ChromeContentBrowserClient::OverrideNavigationParams(
SiteInstance* site_instance,
ui::PageTransition* transition,
bool* is_renderer_initiated,
content::Referrer* referrer) {
DCHECK(transition);
DCHECK(is_renderer_initiated);
DCHECK(referrer);
if (IsNTPSiteInstance(site_instance) &&
ui::PageTransitionCoreTypeIs(*transition, ui::PAGE_TRANSITION_LINK)) {
*transition = ui::PAGE_TRANSITION_AUTO_BOOKMARK;
*is_renderer_initiated = false;
*referrer = content::Referrer();
}
#if BUILDFLAG(ENABLE_EXTENSIONS)
ChromeContentBrowserClientExtensionsPart::OverrideNavigationParams(
site_instance, transition, is_renderer_initiated, referrer);
#endif
}
|
C
|
Chrome
| 0 |
CVE-2015-8844
|
https://www.cvedetails.com/cve/CVE-2015-8844/
|
CWE-20
|
https://github.com/torvalds/linux/commit/d2b9d2a5ad5ef04ff978c9923d19730cb05efd55
|
d2b9d2a5ad5ef04ff978c9923d19730cb05efd55
|
powerpc/tm: Block signal return setting invalid MSR state
Currently we allow both the MSR T and S bits to be set by userspace on
a signal return. Unfortunately this is a reserved configuration and
will cause a TM Bad Thing exception if attempted (via rfid).
This patch checks for this case in both the 32 and 64 bit signals
code. If both T and S are set, we mark the context as invalid.
Found using a syscall fuzzer.
Fixes: 2b0a576d15e0 ("powerpc: Add new transactional memory state to the signal context")
Cc: [email protected] # v3.9+
Signed-off-by: Michael Neuling <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
|
static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
struct sigcontext __user *sc)
{
#ifdef CONFIG_ALTIVEC
elf_vrreg_t __user *v_regs;
#endif
unsigned long err = 0;
unsigned long save_r13 = 0;
unsigned long msr;
#ifdef CONFIG_VSX
int i;
#endif
/* If this is not a signal return, we preserve the TLS in r13 */
if (!sig)
save_r13 = regs->gpr[13];
/* copy the GPRs */
err |= __copy_from_user(regs->gpr, sc->gp_regs, sizeof(regs->gpr));
err |= __get_user(regs->nip, &sc->gp_regs[PT_NIP]);
/* get MSR separately, transfer the LE bit if doing signal return */
err |= __get_user(msr, &sc->gp_regs[PT_MSR]);
if (sig)
regs->msr = (regs->msr & ~MSR_LE) | (msr & MSR_LE);
err |= __get_user(regs->orig_gpr3, &sc->gp_regs[PT_ORIG_R3]);
err |= __get_user(regs->ctr, &sc->gp_regs[PT_CTR]);
err |= __get_user(regs->link, &sc->gp_regs[PT_LNK]);
err |= __get_user(regs->xer, &sc->gp_regs[PT_XER]);
err |= __get_user(regs->ccr, &sc->gp_regs[PT_CCR]);
/* skip SOFTE */
regs->trap = 0;
err |= __get_user(regs->dar, &sc->gp_regs[PT_DAR]);
err |= __get_user(regs->dsisr, &sc->gp_regs[PT_DSISR]);
err |= __get_user(regs->result, &sc->gp_regs[PT_RESULT]);
if (!sig)
regs->gpr[13] = save_r13;
if (set != NULL)
err |= __get_user(set->sig[0], &sc->oldmask);
/*
* Do this before updating the thread state in
* current->thread.fpr/vr. That way, if we get preempted
* and another task grabs the FPU/Altivec, it won't be
* tempted to save the current CPU state into the thread_struct
* and corrupt what we are writing there.
*/
discard_lazy_cpu_state();
/*
* Force reload of FP/VEC.
* This has to be done before copying stuff into current->thread.fpr/vr
* for the reasons explained in the previous comment.
*/
regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC | MSR_VSX);
#ifdef CONFIG_ALTIVEC
err |= __get_user(v_regs, &sc->v_regs);
if (err)
return err;
if (v_regs && !access_ok(VERIFY_READ, v_regs, 34 * sizeof(vector128)))
return -EFAULT;
/* Copy 33 vec registers (vr0..31 and vscr) from the stack */
if (v_regs != NULL && (msr & MSR_VEC) != 0)
err |= __copy_from_user(¤t->thread.vr_state, v_regs,
33 * sizeof(vector128));
else if (current->thread.used_vr)
memset(¤t->thread.vr_state, 0, 33 * sizeof(vector128));
/* Always get VRSAVE back */
if (v_regs != NULL)
err |= __get_user(current->thread.vrsave, (u32 __user *)&v_regs[33]);
else
current->thread.vrsave = 0;
if (cpu_has_feature(CPU_FTR_ALTIVEC))
mtspr(SPRN_VRSAVE, current->thread.vrsave);
#endif /* CONFIG_ALTIVEC */
/* restore floating point */
err |= copy_fpr_from_user(current, &sc->fp_regs);
#ifdef CONFIG_VSX
/*
* Get additional VSX data. Update v_regs to point after the
* VMX data. Copy VSX low doubleword from userspace to local
* buffer for formatting, then into the taskstruct.
*/
v_regs += ELF_NVRREG;
if ((msr & MSR_VSX) != 0)
err |= copy_vsx_from_user(current, v_regs);
else
for (i = 0; i < 32 ; i++)
current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0;
#endif
return err;
}
|
static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
struct sigcontext __user *sc)
{
#ifdef CONFIG_ALTIVEC
elf_vrreg_t __user *v_regs;
#endif
unsigned long err = 0;
unsigned long save_r13 = 0;
unsigned long msr;
#ifdef CONFIG_VSX
int i;
#endif
/* If this is not a signal return, we preserve the TLS in r13 */
if (!sig)
save_r13 = regs->gpr[13];
/* copy the GPRs */
err |= __copy_from_user(regs->gpr, sc->gp_regs, sizeof(regs->gpr));
err |= __get_user(regs->nip, &sc->gp_regs[PT_NIP]);
/* get MSR separately, transfer the LE bit if doing signal return */
err |= __get_user(msr, &sc->gp_regs[PT_MSR]);
if (sig)
regs->msr = (regs->msr & ~MSR_LE) | (msr & MSR_LE);
err |= __get_user(regs->orig_gpr3, &sc->gp_regs[PT_ORIG_R3]);
err |= __get_user(regs->ctr, &sc->gp_regs[PT_CTR]);
err |= __get_user(regs->link, &sc->gp_regs[PT_LNK]);
err |= __get_user(regs->xer, &sc->gp_regs[PT_XER]);
err |= __get_user(regs->ccr, &sc->gp_regs[PT_CCR]);
/* skip SOFTE */
regs->trap = 0;
err |= __get_user(regs->dar, &sc->gp_regs[PT_DAR]);
err |= __get_user(regs->dsisr, &sc->gp_regs[PT_DSISR]);
err |= __get_user(regs->result, &sc->gp_regs[PT_RESULT]);
if (!sig)
regs->gpr[13] = save_r13;
if (set != NULL)
err |= __get_user(set->sig[0], &sc->oldmask);
/*
* Do this before updating the thread state in
* current->thread.fpr/vr. That way, if we get preempted
* and another task grabs the FPU/Altivec, it won't be
* tempted to save the current CPU state into the thread_struct
* and corrupt what we are writing there.
*/
discard_lazy_cpu_state();
/*
* Force reload of FP/VEC.
* This has to be done before copying stuff into current->thread.fpr/vr
* for the reasons explained in the previous comment.
*/
regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC | MSR_VSX);
#ifdef CONFIG_ALTIVEC
err |= __get_user(v_regs, &sc->v_regs);
if (err)
return err;
if (v_regs && !access_ok(VERIFY_READ, v_regs, 34 * sizeof(vector128)))
return -EFAULT;
/* Copy 33 vec registers (vr0..31 and vscr) from the stack */
if (v_regs != NULL && (msr & MSR_VEC) != 0)
err |= __copy_from_user(¤t->thread.vr_state, v_regs,
33 * sizeof(vector128));
else if (current->thread.used_vr)
memset(¤t->thread.vr_state, 0, 33 * sizeof(vector128));
/* Always get VRSAVE back */
if (v_regs != NULL)
err |= __get_user(current->thread.vrsave, (u32 __user *)&v_regs[33]);
else
current->thread.vrsave = 0;
if (cpu_has_feature(CPU_FTR_ALTIVEC))
mtspr(SPRN_VRSAVE, current->thread.vrsave);
#endif /* CONFIG_ALTIVEC */
/* restore floating point */
err |= copy_fpr_from_user(current, &sc->fp_regs);
#ifdef CONFIG_VSX
/*
* Get additional VSX data. Update v_regs to point after the
* VMX data. Copy VSX low doubleword from userspace to local
* buffer for formatting, then into the taskstruct.
*/
v_regs += ELF_NVRREG;
if ((msr & MSR_VSX) != 0)
err |= copy_vsx_from_user(current, v_regs);
else
for (i = 0; i < 32 ; i++)
current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0;
#endif
return err;
}
|
C
|
linux
| 0 |
CVE-2018-17468
|
https://www.cvedetails.com/cve/CVE-2018-17468/
|
CWE-200
|
https://github.com/chromium/chromium/commit/5fe74f831fddb92afa5ddfe46490bb49f083132b
|
5fe74f831fddb92afa5ddfe46490bb49f083132b
|
Do not forward resource timing to parent frame after back-forward navigation
LocalFrame has |should_send_resource_timing_info_to_parent_| flag not to
send timing info to parent except for the first navigation. This flag is
cleared when the first timing is sent to parent, however this does not happen
if iframe's first navigation was by back-forward navigation. For such
iframes, we shouldn't send timings to parent at all.
Bug: 876822
Change-Id: I128b51a82ef278c439548afc8283ae63abdef5c5
Reviewed-on: https://chromium-review.googlesource.com/1186215
Reviewed-by: Kinuko Yasuda <[email protected]>
Commit-Queue: Kunihiko Sakamoto <[email protected]>
Cr-Commit-Position: refs/heads/master@{#585736}
|
WebLocalFrameImpl* WebLocalFrameImpl::Create(
WebTreeScopeType scope,
WebLocalFrameClient* client,
blink::InterfaceRegistry* interface_registry,
WebFrame* opener) {
WebLocalFrameImpl* frame =
new WebLocalFrameImpl(scope, client, interface_registry);
frame->SetOpener(opener);
return frame;
}
|
WebLocalFrameImpl* WebLocalFrameImpl::Create(
WebTreeScopeType scope,
WebLocalFrameClient* client,
blink::InterfaceRegistry* interface_registry,
WebFrame* opener) {
WebLocalFrameImpl* frame =
new WebLocalFrameImpl(scope, client, interface_registry);
frame->SetOpener(opener);
return frame;
}
|
C
|
Chrome
| 0 |
CVE-2019-5892
|
https://www.cvedetails.com/cve/CVE-2019-5892/
| null |
https://github.com/FRRouting/frr/commit/943d595a018e69b550db08cccba1d0778a86705a
|
943d595a018e69b550db08cccba1d0778a86705a
|
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined
Signed-off-by: Lou Berger <[email protected]>
|
void cluster_unintern(struct cluster_list *cluster)
{
if (cluster->refcnt)
cluster->refcnt--;
if (cluster->refcnt == 0) {
hash_release(cluster_hash, cluster);
cluster_free(cluster);
}
}
|
void cluster_unintern(struct cluster_list *cluster)
{
if (cluster->refcnt)
cluster->refcnt--;
if (cluster->refcnt == 0) {
hash_release(cluster_hash, cluster);
cluster_free(cluster);
}
}
|
C
|
frr
| 0 |
CVE-2011-3053
|
https://www.cvedetails.com/cve/CVE-2011-3053/
|
CWE-399
|
https://github.com/chromium/chromium/commit/c442b3eda2f1fdd4d1d4864c34c43cbaf223acae
|
c442b3eda2f1fdd4d1d4864c34c43cbaf223acae
|
chromeos: Move audio, power, and UI files into subdirs.
This moves more files from chrome/browser/chromeos/ into
subdirectories.
BUG=chromium-os:22896
TEST=did chrome os builds both with and without aura
TBR=sky
Review URL: http://codereview.chromium.org/9125006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116746 0039d316-1c4b-4281-b951-d872f2087c98
|
string16 LearnMoreInfoBar::GetMessageTextWithOffset(size_t* link_offset) const {
string16 text = message_;
text.push_back(' '); // Add a space before the following link.
*link_offset = text.size();
return text;
}
|
string16 LearnMoreInfoBar::GetMessageTextWithOffset(size_t* link_offset) const {
string16 text = message_;
text.push_back(' '); // Add a space before the following link.
*link_offset = text.size();
return text;
}
|
C
|
Chrome
| 0 |
CVE-2013-2909
|
https://www.cvedetails.com/cve/CVE-2013-2909/
|
CWE-399
|
https://github.com/chromium/chromium/commit/248a92c21c20c14b5983680c50e1d8b73fc79a2f
|
248a92c21c20c14b5983680c50e1d8b73fc79a2f
|
Update containtingIsolate to go back all the way to top isolate from current root, rather than stopping at the first isolate it finds. This works because the current root is always updated with each isolate run.
BUG=279277
Review URL: https://chromiumcodereview.appspot.com/23972003
git-svn-id: svn://svn.chromium.org/blink/trunk@157268 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
bool endLineMatched() const { return m_endLineMatched; }
|
bool endLineMatched() const { return m_endLineMatched; }
|
C
|
Chrome
| 0 |
CVE-2018-6063
|
https://www.cvedetails.com/cve/CVE-2018-6063/
|
CWE-787
|
https://github.com/chromium/chromium/commit/673ce95d481ea9368c4d4d43ac756ba1d6d9e608
|
673ce95d481ea9368c4d4d43ac756ba1d6d9e608
|
Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which
were assuming that the call actually has any control over the memory
protection applied to a handle when mapped.
Where fixing usage is infeasible for this CL, TODOs are added to
annotate follow-up work.
Also updates the API and documentation to (hopefully) improve clarity
and avoid similar mistakes from being made in the future.
BUG=792900
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I0578aaa9ca3bfcb01aaf2451315d1ede95458477
Reviewed-on: https://chromium-review.googlesource.com/818282
Reviewed-by: Wei Li <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Sadrul Chowdhury <[email protected]>
Reviewed-by: Yuzhu Shen <[email protected]>
Reviewed-by: Robert Sesek <[email protected]>
Commit-Queue: Ken Rockot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#530268}
|
void RenderProcessHostImpl::Cleanup() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (run_renderer_in_process())
return;
if (within_process_died_observer_) {
delayed_cleanup_needed_ = true;
return;
}
delayed_cleanup_needed_ = false;
if (listeners_.IsEmpty() && keep_alive_ref_count_ > 0 &&
keep_alive_start_time_.is_null()) {
keep_alive_start_time_ = base::TimeTicks::Now();
}
if (!listeners_.IsEmpty() || keep_alive_ref_count_ != 0)
return;
#if BUILDFLAG(ENABLE_WEBRTC)
if (is_initialized_) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::BindOnce(&WebRtcLog::ClearLogMessageCallback, GetID()));
}
#endif
if (!keep_alive_start_time_.is_null()) {
UMA_HISTOGRAM_LONG_TIMES("BrowserRenderProcessHost.KeepAliveDuration",
base::TimeTicks::Now() - keep_alive_start_time_);
}
DCHECK(!deleting_soon_);
DCHECK_EQ(0, pending_views_);
if (HasConnection()) {
for (auto& observer : observers_) {
observer.RenderProcessExited(
this, base::TERMINATION_STATUS_NORMAL_TERMINATION, 0);
}
}
for (auto& observer : observers_)
observer.RenderProcessHostDestroyed(this);
NotificationService::current()->Notify(
NOTIFICATION_RENDERER_PROCESS_TERMINATED,
Source<RenderProcessHost>(this), NotificationService::NoDetails());
if (connection_filter_id_ !=
ServiceManagerConnection::kInvalidConnectionFilterId) {
ServiceManagerConnection* service_manager_connection =
BrowserContext::GetServiceManagerConnectionFor(browser_context_);
connection_filter_controller_->DisableFilter();
service_manager_connection->RemoveConnectionFilter(connection_filter_id_);
connection_filter_id_ =
ServiceManagerConnection::kInvalidConnectionFilterId;
}
#ifndef NDEBUG
is_self_deleted_ = true;
#endif
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
deleting_soon_ = true;
ResetChannelProxy();
DCHECK(!channel_);
RemoveUserData(kSessionStorageHolderKey);
UnregisterHost(GetID());
instance_weak_factory_.reset(
new base::WeakPtrFactory<RenderProcessHostImpl>(this));
}
|
void RenderProcessHostImpl::Cleanup() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (run_renderer_in_process())
return;
if (within_process_died_observer_) {
delayed_cleanup_needed_ = true;
return;
}
delayed_cleanup_needed_ = false;
if (listeners_.IsEmpty() && keep_alive_ref_count_ > 0 &&
keep_alive_start_time_.is_null()) {
keep_alive_start_time_ = base::TimeTicks::Now();
}
if (!listeners_.IsEmpty() || keep_alive_ref_count_ != 0)
return;
#if BUILDFLAG(ENABLE_WEBRTC)
if (is_initialized_) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::BindOnce(&WebRtcLog::ClearLogMessageCallback, GetID()));
}
#endif
if (!keep_alive_start_time_.is_null()) {
UMA_HISTOGRAM_LONG_TIMES("BrowserRenderProcessHost.KeepAliveDuration",
base::TimeTicks::Now() - keep_alive_start_time_);
}
DCHECK(!deleting_soon_);
DCHECK_EQ(0, pending_views_);
if (HasConnection()) {
for (auto& observer : observers_) {
observer.RenderProcessExited(
this, base::TERMINATION_STATUS_NORMAL_TERMINATION, 0);
}
}
for (auto& observer : observers_)
observer.RenderProcessHostDestroyed(this);
NotificationService::current()->Notify(
NOTIFICATION_RENDERER_PROCESS_TERMINATED,
Source<RenderProcessHost>(this), NotificationService::NoDetails());
if (connection_filter_id_ !=
ServiceManagerConnection::kInvalidConnectionFilterId) {
ServiceManagerConnection* service_manager_connection =
BrowserContext::GetServiceManagerConnectionFor(browser_context_);
connection_filter_controller_->DisableFilter();
service_manager_connection->RemoveConnectionFilter(connection_filter_id_);
connection_filter_id_ =
ServiceManagerConnection::kInvalidConnectionFilterId;
}
#ifndef NDEBUG
is_self_deleted_ = true;
#endif
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
deleting_soon_ = true;
ResetChannelProxy();
DCHECK(!channel_);
RemoveUserData(kSessionStorageHolderKey);
UnregisterHost(GetID());
instance_weak_factory_.reset(
new base::WeakPtrFactory<RenderProcessHostImpl>(this));
}
|
C
|
Chrome
| 0 |
CVE-2017-9059
|
https://www.cvedetails.com/cve/CVE-2017-9059/
|
CWE-404
|
https://github.com/torvalds/linux/commit/c70422f760c120480fee4de6c38804c72aa26bc1
|
c70422f760c120480fee4de6c38804c72aa26bc1
|
Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"Another RDMA update from Chuck Lever, and a bunch of miscellaneous
bugfixes"
* tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux: (26 commits)
nfsd: Fix up the "supattr_exclcreat" attributes
nfsd: encoders mustn't use unitialized values in error cases
nfsd: fix undefined behavior in nfsd4_layout_verify
lockd: fix lockd shutdown race
NFSv4: Fix callback server shutdown
SUNRPC: Refactor svc_set_num_threads()
NFSv4.x/callback: Create the callback service through svc_create_pooled
lockd: remove redundant check on block
svcrdma: Clean out old XDR encoders
svcrdma: Remove the req_map cache
svcrdma: Remove unused RDMA Write completion handler
svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt
svcrdma: Clean up RPC-over-RDMA backchannel reply processing
svcrdma: Report Write/Reply chunk overruns
svcrdma: Clean up RDMA_ERROR path
svcrdma: Use rdma_rw API in RPC reply path
svcrdma: Introduce local rdma_rw API helpers
svcrdma: Clean up svc_rdma_get_inv_rkey()
svcrdma: Add helper to save pages under I/O
svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT
...
|
svc_init_buffer(struct svc_rqst *rqstp, unsigned int size, int node)
{
unsigned int pages, arghi;
/* bc_xprt uses fore channel allocated buffers */
if (svc_is_backchannel(rqstp))
return 1;
pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply.
* We assume one is at most one page
*/
arghi = 0;
WARN_ON_ONCE(pages > RPCSVC_MAXPAGES);
if (pages > RPCSVC_MAXPAGES)
pages = RPCSVC_MAXPAGES;
while (pages) {
struct page *p = alloc_pages_node(node, GFP_KERNEL, 0);
if (!p)
break;
rqstp->rq_pages[arghi++] = p;
pages--;
}
return pages == 0;
}
|
svc_init_buffer(struct svc_rqst *rqstp, unsigned int size, int node)
{
unsigned int pages, arghi;
/* bc_xprt uses fore channel allocated buffers */
if (svc_is_backchannel(rqstp))
return 1;
pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply.
* We assume one is at most one page
*/
arghi = 0;
WARN_ON_ONCE(pages > RPCSVC_MAXPAGES);
if (pages > RPCSVC_MAXPAGES)
pages = RPCSVC_MAXPAGES;
while (pages) {
struct page *p = alloc_pages_node(node, GFP_KERNEL, 0);
if (!p)
break;
rqstp->rq_pages[arghi++] = p;
pages--;
}
return pages == 0;
}
|
C
|
linux
| 0 |
CVE-2018-6103
|
https://www.cvedetails.com/cve/CVE-2018-6103/
|
CWE-20
|
https://github.com/chromium/chromium/commit/12c876ae82355de6285bf0879023f1d1f1822ecf
|
12c876ae82355de6285bf0879023f1d1f1822ecf
|
Fix MediaObserver notifications in MediaStreamManager.
This CL fixes the stream type used to notify MediaObserver about
cancelled MediaStream requests.
Before this CL, NUM_MEDIA_TYPES was used as stream type to indicate
that all stream types should be cancelled.
However, the MediaObserver end does not interpret NUM_MEDIA_TYPES this
way and the request to update the UI is ignored.
This CL sends a separate notification for each stream type so that the
UI actually gets updated for all stream types in use.
Bug: 816033
Change-Id: Ib7d3b3046d1dd0976627f8ab38abf086eacc9405
Reviewed-on: https://chromium-review.googlesource.com/939630
Commit-Queue: Guido Urdaneta <[email protected]>
Reviewed-by: Raymes Khoury <[email protected]>
Cr-Commit-Position: refs/heads/master@{#540122}
|
void EnableHotwordEffect(const StreamControls& controls, int* effects) {
DCHECK(effects);
if (controls.hotword_enabled) {
#if defined(OS_CHROMEOS)
chromeos::AudioDeviceList devices;
chromeos::CrasAudioHandler::Get()->GetAudioDevices(&devices);
for (const chromeos::AudioDevice& device : devices) {
if (device.type == chromeos::AUDIO_TYPE_HOTWORD) {
DCHECK(device.is_input);
*effects |= media::AudioParameters::HOTWORD;
}
}
#endif
}
}
|
void EnableHotwordEffect(const StreamControls& controls, int* effects) {
DCHECK(effects);
if (controls.hotword_enabled) {
#if defined(OS_CHROMEOS)
chromeos::AudioDeviceList devices;
chromeos::CrasAudioHandler::Get()->GetAudioDevices(&devices);
for (const chromeos::AudioDevice& device : devices) {
if (device.type == chromeos::AUDIO_TYPE_HOTWORD) {
DCHECK(device.is_input);
*effects |= media::AudioParameters::HOTWORD;
}
}
#endif
}
}
|
C
|
Chrome
| 0 |
CVE-2018-17476
|
https://www.cvedetails.com/cve/CVE-2018-17476/
|
CWE-20
|
https://github.com/chromium/chromium/commit/3d41e77125f3de8d722b6d8303599abaf2a91667
|
3d41e77125f3de8d722b6d8303599abaf2a91667
|
If a dialog is shown, drop fullscreen.
BUG=875066, 817809, 792876, 812769, 813815
TEST=included
Change-Id: Ic3d697fa3c4b01f5d7fea77391857177ada660db
Reviewed-on: https://chromium-review.googlesource.com/1185208
Reviewed-by: Sidney San Martín <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586418}
|
Browser::~Browser() {
registrar_.RemoveAll();
extension_registry_observer_.RemoveAll();
DCHECK(tab_strip_model_->empty());
tab_strip_model_->RemoveObserver(this);
bubble_manager_.reset();
command_controller_.reset();
BrowserList::RemoveBrowser(this);
int num_downloads;
if (!browser_defaults::kBrowserAliveWithNoWindows &&
OkToCloseWithInProgressDownloads(&num_downloads) ==
DOWNLOAD_CLOSE_BROWSER_SHUTDOWN) {
DownloadCoreService::CancelAllDownloads();
}
SessionService* session_service =
SessionServiceFactory::GetForProfile(profile_);
if (session_service)
session_service->WindowClosed(session_id_);
sessions::TabRestoreService* tab_restore_service =
TabRestoreServiceFactory::GetForProfile(profile());
if (tab_restore_service)
tab_restore_service->BrowserClosed(live_tab_context());
profile_pref_registrar_.RemoveAll();
extension_window_controller_.reset();
instant_controller_.reset();
if (profile_->IsOffTheRecord() &&
profile_->GetOriginalProfile()->HasOffTheRecordProfile() &&
profile_->GetOriginalProfile()->GetOffTheRecordProfile() == profile_ &&
!BrowserList::IsIncognitoSessionActiveForProfile(profile_) &&
!profile_->GetOriginalProfile()->IsSystemProfile()) {
if (profile_->IsGuestSession()) {
#if !defined(OS_CHROMEOS)
profiles::RemoveBrowsingDataForProfile(profile_->GetPath());
#endif
} else {
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
g_browser_process->background_printing_manager()
->DeletePreviewContentsForBrowserContext(profile_);
#endif
ProfileDestroyer::DestroyProfileWhenAppropriate(profile_);
}
}
if (select_file_dialog_.get())
select_file_dialog_->ListenerDestroyed();
}
|
Browser::~Browser() {
registrar_.RemoveAll();
extension_registry_observer_.RemoveAll();
DCHECK(tab_strip_model_->empty());
tab_strip_model_->RemoveObserver(this);
bubble_manager_.reset();
command_controller_.reset();
BrowserList::RemoveBrowser(this);
int num_downloads;
if (!browser_defaults::kBrowserAliveWithNoWindows &&
OkToCloseWithInProgressDownloads(&num_downloads) ==
DOWNLOAD_CLOSE_BROWSER_SHUTDOWN) {
DownloadCoreService::CancelAllDownloads();
}
SessionService* session_service =
SessionServiceFactory::GetForProfile(profile_);
if (session_service)
session_service->WindowClosed(session_id_);
sessions::TabRestoreService* tab_restore_service =
TabRestoreServiceFactory::GetForProfile(profile());
if (tab_restore_service)
tab_restore_service->BrowserClosed(live_tab_context());
profile_pref_registrar_.RemoveAll();
extension_window_controller_.reset();
instant_controller_.reset();
if (profile_->IsOffTheRecord() &&
profile_->GetOriginalProfile()->HasOffTheRecordProfile() &&
profile_->GetOriginalProfile()->GetOffTheRecordProfile() == profile_ &&
!BrowserList::IsIncognitoSessionActiveForProfile(profile_) &&
!profile_->GetOriginalProfile()->IsSystemProfile()) {
if (profile_->IsGuestSession()) {
#if !defined(OS_CHROMEOS)
profiles::RemoveBrowsingDataForProfile(profile_->GetPath());
#endif
} else {
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
g_browser_process->background_printing_manager()
->DeletePreviewContentsForBrowserContext(profile_);
#endif
ProfileDestroyer::DestroyProfileWhenAppropriate(profile_);
}
}
if (select_file_dialog_.get())
select_file_dialog_->ListenerDestroyed();
}
|
C
|
Chrome
| 0 |
CVE-2015-3212
|
https://www.cvedetails.com/cve/CVE-2015-3212/
|
CWE-362
|
https://github.com/torvalds/linux/commit/2d45a02d0166caf2627fe91897c6ffc3b19514c4
|
2d45a02d0166caf2627fe91897c6ffc3b19514c4
|
sctp: fix ASCONF list handling
->auto_asconf_splist is per namespace and mangled by functions like
sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization.
Also, the call to inet_sk_copy_descendant() was backuping
->auto_asconf_list through the copy but was not honoring
->do_auto_asconf, which could lead to list corruption if it was
different between both sockets.
This commit thus fixes the list handling by using ->addr_wq_lock
spinlock to protect the list. A special handling is done upon socket
creation and destruction for that. Error handlig on sctp_init_sock()
will never return an error after having initialized asconf, so
sctp_destroy_sock() can be called without addrq_wq_lock. The lock now
will be take on sctp_close_sock(), before locking the socket, so we
don't do it in inverse order compared to sctp_addr_wq_timeout_handler().
Instead of taking the lock on sctp_sock_migrate() for copying and
restoring the list values, it's preferred to avoid rewritting it by
implementing sctp_copy_descendant().
Issue was found with a test application that kept flipping sysctl
default_auto_asconf on and off, but one could trigger it by issuing
simultaneous setsockopt() calls on multiple sockets or by
creating/destroying sockets fast enough. This is only triggerable
locally.
Fixes: 9f7d653b67ae ("sctp: Add Auto-ASCONF support (core).")
Reported-by: Ji Jianwen <[email protected]>
Suggested-by: Neil Horman <[email protected]>
Suggested-by: Hannes Frederic Sowa <[email protected]>
Acked-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int sctp_bindx_add(struct sock *sk, struct sockaddr *addrs, int addrcnt)
{
int cnt;
int retval = 0;
void *addr_buf;
struct sockaddr *sa_addr;
struct sctp_af *af;
pr_debug("%s: sk:%p, addrs:%p, addrcnt:%d\n", __func__, sk,
addrs, addrcnt);
addr_buf = addrs;
for (cnt = 0; cnt < addrcnt; cnt++) {
/* The list may contain either IPv4 or IPv6 address;
* determine the address length for walking thru the list.
*/
sa_addr = addr_buf;
af = sctp_get_af_specific(sa_addr->sa_family);
if (!af) {
retval = -EINVAL;
goto err_bindx_add;
}
retval = sctp_do_bind(sk, (union sctp_addr *)sa_addr,
af->sockaddr_len);
addr_buf += af->sockaddr_len;
err_bindx_add:
if (retval < 0) {
/* Failed. Cleanup the ones that have been added */
if (cnt > 0)
sctp_bindx_rem(sk, addrs, cnt);
return retval;
}
}
return retval;
}
|
static int sctp_bindx_add(struct sock *sk, struct sockaddr *addrs, int addrcnt)
{
int cnt;
int retval = 0;
void *addr_buf;
struct sockaddr *sa_addr;
struct sctp_af *af;
pr_debug("%s: sk:%p, addrs:%p, addrcnt:%d\n", __func__, sk,
addrs, addrcnt);
addr_buf = addrs;
for (cnt = 0; cnt < addrcnt; cnt++) {
/* The list may contain either IPv4 or IPv6 address;
* determine the address length for walking thru the list.
*/
sa_addr = addr_buf;
af = sctp_get_af_specific(sa_addr->sa_family);
if (!af) {
retval = -EINVAL;
goto err_bindx_add;
}
retval = sctp_do_bind(sk, (union sctp_addr *)sa_addr,
af->sockaddr_len);
addr_buf += af->sockaddr_len;
err_bindx_add:
if (retval < 0) {
/* Failed. Cleanup the ones that have been added */
if (cnt > 0)
sctp_bindx_rem(sk, addrs, cnt);
return retval;
}
}
return retval;
}
|
C
|
linux
| 0 |
CVE-2013-6401
|
https://www.cvedetails.com/cve/CVE-2013-6401/
|
CWE-310
|
https://github.com/akheron/jansson/commit/8f80c2d83808150724d31793e6ade92749b1faa4
|
8f80c2d83808150724d31793e6ade92749b1faa4
|
CVE-2013-6401: Change hash function, randomize hashes
Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing
and testing.
|
double json_number_value(const json_t *json)
{
if(json_is_integer(json))
return (double)json_integer_value(json);
else if(json_is_real(json))
return json_real_value(json);
else
return 0.0;
}
|
double json_number_value(const json_t *json)
{
if(json_is_integer(json))
return (double)json_integer_value(json);
else if(json_is_real(json))
return json_real_value(json);
else
return 0.0;
}
|
C
|
jansson
| 0 |
CVE-2018-20784
|
https://www.cvedetails.com/cve/CVE-2018-20784/
|
CWE-400
|
https://github.com/torvalds/linux/commit/c40f7d74c741a907cfaeb73a7697081881c497d0
|
c40f7d74c741a907cfaeb73a7697081881c497d0
|
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) revert of:
a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
It turns out that the list_del_leaf_cfs_rq() introduced by this commit
is a surprising property that was not considered in followup commits
such as:
9c2791f936ef ("sched/fair: Fix hierarchical order in rq->leaf_cfs_rq_list")
As Vincent Guittot explains:
"I think that there is a bigger problem with commit a9e7f6544b9c and
cfs_rq throttling:
Let take the example of the following topology TG2 --> TG1 --> root:
1) The 1st time a task is enqueued, we will add TG2 cfs_rq then TG1
cfs_rq to leaf_cfs_rq_list and we are sure to do the whole branch in
one path because it has never been used and can't be throttled so
tmp_alone_branch will point to leaf_cfs_rq_list at the end.
2) Then TG1 is throttled
3) and we add TG3 as a new child of TG1.
4) The 1st enqueue of a task on TG3 will add TG3 cfs_rq just before TG1
cfs_rq and tmp_alone_branch will stay on rq->leaf_cfs_rq_list.
With commit a9e7f6544b9c, we can del a cfs_rq from rq->leaf_cfs_rq_list.
So if the load of TG1 cfs_rq becomes NULL before step 2) above, TG1
cfs_rq is removed from the list.
Then at step 4), TG3 cfs_rq is added at the beginning of rq->leaf_cfs_rq_list
but tmp_alone_branch still points to TG3 cfs_rq because its throttled
parent can't be enqueued when the lock is released.
tmp_alone_branch doesn't point to rq->leaf_cfs_rq_list whereas it should.
So if TG3 cfs_rq is removed or destroyed before tmp_alone_branch
points on another TG cfs_rq, the next TG cfs_rq that will be added,
will be linked outside rq->leaf_cfs_rq_list - which is bad.
In addition, we can break the ordering of the cfs_rq in
rq->leaf_cfs_rq_list but this ordering is used to update and
propagate the update from leaf down to root."
Instead of trying to work through all these cases and trying to reproduce
the very high loads that produced the lockup to begin with, simplify
the code temporarily by reverting a9e7f6544b9c - which change was clearly
not thought through completely.
This (hopefully) gives us a kernel that doesn't lock up so people
can continue to enjoy their holidays without worrying about regressions. ;-)
[ mingo: Wrote changelog, fixed weird spelling in code comment while at it. ]
Analyzed-by: Xie XiuQi <[email protected]>
Analyzed-by: Vincent Guittot <[email protected]>
Reported-by: Zhipeng Xie <[email protected]>
Reported-by: Sargun Dhillon <[email protected]>
Reported-by: Xie XiuQi <[email protected]>
Tested-by: Zhipeng Xie <[email protected]>
Tested-by: Sargun Dhillon <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Acked-by: Vincent Guittot <[email protected]>
Cc: <[email protected]> # v4.13+
Cc: Bin Li <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Fixes: a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
|
static inline void update_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se, int not_used1)
{
cfs_rq_util_change(cfs_rq, 0);
}
|
static inline void update_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se, int not_used1)
{
cfs_rq_util_change(cfs_rq, 0);
}
|
C
|
linux
| 0 |
CVE-2016-1639
|
https://www.cvedetails.com/cve/CVE-2016-1639/
| null |
https://github.com/chromium/chromium/commit/c66b1fc49870c514b1c1e8b53498153176d7ec2b
|
c66b1fc49870c514b1c1e8b53498153176d7ec2b
|
cros: Check initial auth type when showing views login.
Bug: 859611
Change-Id: I0298db9bbf4aed6bd40600aef2e1c5794e8cd058
Reviewed-on: https://chromium-review.googlesource.com/1123056
Reviewed-by: Xiaoyin Hu <[email protected]>
Commit-Queue: Jacob Dufault <[email protected]>
Cr-Commit-Position: refs/heads/master@{#572224}
|
void LoginDisplayHostWebUI::OnWillRemoveView(views::Widget* widget,
views::View* view) {
if (view != static_cast<views::View*>(login_view_))
return;
login_view_ = nullptr;
widget->RemoveRemovalsObserver(this);
}
|
void LoginDisplayHostWebUI::OnWillRemoveView(views::Widget* widget,
views::View* view) {
if (view != static_cast<views::View*>(login_view_))
return;
login_view_ = nullptr;
widget->RemoveRemovalsObserver(this);
}
|
C
|
Chrome
| 0 |
CVE-2010-1152
|
https://www.cvedetails.com/cve/CVE-2010-1152/
|
CWE-20
|
https://github.com/memcached/memcached/commit/75cc83685e103bc8ba380a57468c8f04413033f9
|
75cc83685e103bc8ba380a57468c8f04413033f9
|
Issue 102: Piping null to the server will crash it
|
static bool safe_recv(void *buf, size_t len) {
if (len == 0) {
return true;
}
off_t offset = 0;
do {
ssize_t nr = read(sock, ((char*)buf) + offset, len - offset);
if (nr == -1) {
if (errno != EINTR) {
fprintf(stderr, "Failed to read: %s\n", strerror(errno));
abort();
}
} else {
if (nr == 0 && allow_closed_read) {
return false;
}
assert(nr != 0);
offset += nr;
}
} while (offset < len);
return true;
}
|
static bool safe_recv(void *buf, size_t len) {
if (len == 0) {
return true;
}
off_t offset = 0;
do {
ssize_t nr = read(sock, ((char*)buf) + offset, len - offset);
if (nr == -1) {
if (errno != EINTR) {
fprintf(stderr, "Failed to read: %s\n", strerror(errno));
abort();
}
} else {
if (nr == 0 && allow_closed_read) {
return false;
}
assert(nr != 0);
offset += nr;
}
} while (offset < len);
return true;
}
|
C
|
memcached
| 0 |
CVE-2017-18234
|
https://www.cvedetails.com/cve/CVE-2017-18234/
|
CWE-416
|
https://cgit.freedesktop.org/exempi/commit/?id=c26d5beb60a5a85f76259f50ed3e08c8169b0a0c
|
c26d5beb60a5a85f76259f50ed3e08c8169b0a0c
| null |
bool xmp_set_property(XmpPtr xmp, const char *schema, const char *name,
const char *value, uint32_t optionBits)
{
CHECK_PTR(xmp, false);
RESET_ERROR;
bool ret = false;
auto txmp = reinterpret_cast<SXMPMeta *>(xmp);
if ((optionBits & (XMP_PROP_VALUE_IS_STRUCT | XMP_PROP_VALUE_IS_ARRAY)) &&
(*value == 0)) {
value = NULL;
}
try {
txmp->SetProperty(schema, name, value, optionBits);
ret = true;
}
catch (const XMP_Error &e) {
set_error(e);
}
catch (...) {
}
return ret;
}
|
bool xmp_set_property(XmpPtr xmp, const char *schema, const char *name,
const char *value, uint32_t optionBits)
{
CHECK_PTR(xmp, false);
RESET_ERROR;
bool ret = false;
auto txmp = reinterpret_cast<SXMPMeta *>(xmp);
if ((optionBits & (XMP_PROP_VALUE_IS_STRUCT | XMP_PROP_VALUE_IS_ARRAY)) &&
(*value == 0)) {
value = NULL;
}
try {
txmp->SetProperty(schema, name, value, optionBits);
ret = true;
}
catch (const XMP_Error &e) {
set_error(e);
}
catch (...) {
}
return ret;
}
|
CPP
|
exempi
| 0 |
CVE-2016-5216
|
https://www.cvedetails.com/cve/CVE-2016-5216/
|
CWE-416
|
https://github.com/chromium/chromium/commit/bf6a6765d44b09c64b8c75d749efb84742a250e7
|
bf6a6765d44b09c64b8c75d749efb84742a250e7
|
[pdf] Defer page unloading in JS callback.
One of the callbacks from PDFium JavaScript into the embedder is to get the
current page number. In Chromium, this will trigger a call to
CalculateMostVisiblePage that method will determine the visible pages and unload
any non-visible pages. But, if the originating JS is on a non-visible page
we'll delete the page and annotations associated with that page. This will
cause issues as we are currently working with those objects when the JavaScript
returns.
This Cl defers the page unloading triggered by getting the most visible page
until the next event is handled by the Chromium embedder.
BUG=chromium:653090
Review-Url: https://codereview.chromium.org/2418533002
Cr-Commit-Position: refs/heads/master@{#424781}
|
void PDFiumEngine::ZoomUpdated(double new_zoom_level) {
CancelPaints();
current_zoom_ = new_zoom_level;
CalculateVisiblePages();
UpdateTickMarks();
}
|
void PDFiumEngine::ZoomUpdated(double new_zoom_level) {
CancelPaints();
current_zoom_ = new_zoom_level;
CalculateVisiblePages();
UpdateTickMarks();
}
|
C
|
Chrome
| 0 |
CVE-2017-18234
|
https://www.cvedetails.com/cve/CVE-2017-18234/
|
CWE-416
|
https://cgit.freedesktop.org/exempi/commit/?id=c26d5beb60a5a85f76259f50ed3e08c8169b0a0c
|
c26d5beb60a5a85f76259f50ed3e08c8169b0a0c
| null |
bool xmp_register_namespace(const char *namespaceURI,
const char *suggestedPrefix,
XmpStringPtr registeredPrefix)
{
RESET_ERROR;
try {
return SXMPMeta::RegisterNamespace(namespaceURI, suggestedPrefix,
STRING(registeredPrefix));
}
catch (const XMP_Error &e) {
set_error(e);
}
return false;
}
|
bool xmp_register_namespace(const char *namespaceURI,
const char *suggestedPrefix,
XmpStringPtr registeredPrefix)
{
RESET_ERROR;
try {
return SXMPMeta::RegisterNamespace(namespaceURI, suggestedPrefix,
STRING(registeredPrefix));
}
catch (const XMP_Error &e) {
set_error(e);
}
return false;
}
|
CPP
|
exempi
| 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 CreateSingleSampleMetricsProvider(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
service_manager::Connector* connector,
metrics::mojom::SingleSampleMetricsProviderRequest request) {
if (task_runner->BelongsToCurrentThread()) {
connector->BindInterface(mojom::kBrowserServiceName, std::move(request));
return;
}
task_runner->PostTask(
FROM_HERE,
base::BindOnce(&CreateSingleSampleMetricsProvider, std::move(task_runner),
connector, base::Passed(&request)));
}
|
void CreateSingleSampleMetricsProvider(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
service_manager::Connector* connector,
metrics::mojom::SingleSampleMetricsProviderRequest request) {
if (task_runner->BelongsToCurrentThread()) {
connector->BindInterface(mojom::kBrowserServiceName, std::move(request));
return;
}
task_runner->PostTask(
FROM_HERE,
base::BindOnce(&CreateSingleSampleMetricsProvider, std::move(task_runner),
connector, base::Passed(&request)));
}
|
C
|
Chrome
| 0 |
CVE-2014-9529
|
https://www.cvedetails.com/cve/CVE-2014-9529/
|
CWE-362
|
https://github.com/torvalds/linux/commit/a3a8784454692dd72e5d5d34dcdab17b4420e74c
|
a3a8784454692dd72e5d5d34dcdab17b4420e74c
|
KEYS: close race between key lookup and freeing
When a key is being garbage collected, it's key->user would get put before
the ->destroy() callback is called, where the key is removed from it's
respective tracking structures.
This leaves a key hanging in a semi-invalid state which leaves a window open
for a different task to try an access key->user. An example is
find_keyring_by_name() which would dereference key->user for a key that is
in the process of being garbage collected (where key->user was freed but
->destroy() wasn't called yet - so it's still present in the linked list).
This would cause either a panic, or corrupt memory.
Fixes CVE-2014-9529.
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: David Howells <[email protected]>
|
static noinline void key_gc_unused_keys(struct list_head *keys)
{
while (!list_empty(keys)) {
struct key *key =
list_entry(keys->next, struct key, graveyard_link);
list_del(&key->graveyard_link);
kdebug("- %u", key->serial);
key_check(key);
security_key_free(key);
/* deal with the user's key tracking and quota */
if (test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) {
spin_lock(&key->user->lock);
key->user->qnkeys--;
key->user->qnbytes -= key->quotalen;
spin_unlock(&key->user->lock);
}
atomic_dec(&key->user->nkeys);
if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags))
atomic_dec(&key->user->nikeys);
/* now throw away the key memory */
if (key->type->destroy)
key->type->destroy(key);
key_user_put(key->user);
kfree(key->description);
#ifdef KEY_DEBUGGING
key->magic = KEY_DEBUG_MAGIC_X;
#endif
kmem_cache_free(key_jar, key);
}
}
|
static noinline void key_gc_unused_keys(struct list_head *keys)
{
while (!list_empty(keys)) {
struct key *key =
list_entry(keys->next, struct key, graveyard_link);
list_del(&key->graveyard_link);
kdebug("- %u", key->serial);
key_check(key);
security_key_free(key);
/* deal with the user's key tracking and quota */
if (test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) {
spin_lock(&key->user->lock);
key->user->qnkeys--;
key->user->qnbytes -= key->quotalen;
spin_unlock(&key->user->lock);
}
atomic_dec(&key->user->nkeys);
if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags))
atomic_dec(&key->user->nikeys);
key_user_put(key->user);
/* now throw away the key memory */
if (key->type->destroy)
key->type->destroy(key);
kfree(key->description);
#ifdef KEY_DEBUGGING
key->magic = KEY_DEBUG_MAGIC_X;
#endif
kmem_cache_free(key_jar, key);
}
}
|
C
|
linux
| 1 |
null | null | null |
https://github.com/chromium/chromium/commit/62b8b6e168a12263aab6b88dbef0b900cc37309f
|
62b8b6e168a12263aab6b88dbef0b900cc37309f
|
Add partial magnifier to ash palette.
The partial magnifier will magnify a small portion of the screen, similar to a spyglass.
TEST=./out/Release/ash_unittests --gtest_filter=PartialMagnificationControllerTest.*
[email protected]
BUG=616112
Review-Url: https://codereview.chromium.org/2239553002
Cr-Commit-Position: refs/heads/master@{#414124}
|
void AcceleratorControllerDelegateAura::ShowDeprecatedAcceleratorNotification(
const char* const notification_id,
int message_id,
int old_shortcut_id,
int new_shortcut_id) {
const base::string16 message =
GetNotificationText(message_id, old_shortcut_id, new_shortcut_id);
std::unique_ptr<message_center::Notification> notification(
new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, notification_id,
base::string16(), message,
WmShell::Get()->delegate()->GetDeprecatedAcceleratorImage(),
base::string16(), GURL(),
message_center::NotifierId(
message_center::NotifierId::SYSTEM_COMPONENT,
system_notifier::kNotifierDeprecatedAccelerator),
message_center::RichNotificationData(),
new DeprecatedAcceleratorNotificationDelegate));
message_center::MessageCenter::Get()->AddNotification(
std::move(notification));
}
|
void AcceleratorControllerDelegateAura::ShowDeprecatedAcceleratorNotification(
const char* const notification_id,
int message_id,
int old_shortcut_id,
int new_shortcut_id) {
const base::string16 message =
GetNotificationText(message_id, old_shortcut_id, new_shortcut_id);
std::unique_ptr<message_center::Notification> notification(
new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, notification_id,
base::string16(), message,
WmShell::Get()->delegate()->GetDeprecatedAcceleratorImage(),
base::string16(), GURL(),
message_center::NotifierId(
message_center::NotifierId::SYSTEM_COMPONENT,
system_notifier::kNotifierDeprecatedAccelerator),
message_center::RichNotificationData(),
new DeprecatedAcceleratorNotificationDelegate));
message_center::MessageCenter::Get()->AddNotification(
std::move(notification));
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/ea3d1d84be3d6f97bf50e76511c9e26af6895533
|
ea3d1d84be3d6f97bf50e76511c9e26af6895533
|
Fix passing pointers between processes.
BUG=31880
Review URL: http://codereview.chromium.org/558036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37555 0039d316-1c4b-4281-b951-d872f2087c98
|
void WebPluginDelegateProxy::OnSetCookie(const GURL& url,
const GURL& first_party_for_cookies,
const std::string& cookie) {
if (plugin_)
plugin_->SetCookie(url, first_party_for_cookies, cookie);
}
|
void WebPluginDelegateProxy::OnSetCookie(const GURL& url,
const GURL& first_party_for_cookies,
const std::string& cookie) {
if (plugin_)
plugin_->SetCookie(url, first_party_for_cookies, cookie);
}
|
C
|
Chrome
| 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.