CVE ID
stringlengths 13
43
⌀ | CVE Page
stringlengths 45
48
⌀ | CWE ID
stringclasses 90
values | codeLink
stringlengths 46
139
| commit_id
stringlengths 6
81
| commit_message
stringlengths 3
13.3k
⌀ | func_after
stringlengths 14
241k
| func_before
stringlengths 14
241k
| lang
stringclasses 3
values | project
stringclasses 309
values | vul
int8 0
1
|
---|---|---|---|---|---|---|---|---|---|---|
CVE-2016-9793
|
https://www.cvedetails.com/cve/CVE-2016-9793/
|
CWE-119
|
https://github.com/torvalds/linux/commit/b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
|
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
|
net: avoid signed overflows for SO_{SND|RCV}BUFFORCE
CAP_NET_ADMIN users should not be allowed to set negative
sk_sndbuf or sk_rcvbuf values, as it can lead to various memory
corruptions, crashes, OOM...
Note that before commit 82981930125a ("net: cleanups in
sock_setsockopt()"), the bug was even more serious, since SO_SNDBUF
and SO_RCVBUF were vulnerable.
This needs to be backported to all known linux kernels.
Again, many thanks to syzkaller team for discovering this gem.
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Andrey Konovalov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static void cred_to_ucred(struct pid *pid, const struct cred *cred,
struct ucred *ucred)
{
ucred->pid = pid_vnr(pid);
ucred->uid = ucred->gid = -1;
if (cred) {
struct user_namespace *current_ns = current_user_ns();
ucred->uid = from_kuid_munged(current_ns, cred->euid);
ucred->gid = from_kgid_munged(current_ns, cred->egid);
}
}
|
static void cred_to_ucred(struct pid *pid, const struct cred *cred,
struct ucred *ucred)
{
ucred->pid = pid_vnr(pid);
ucred->uid = ucred->gid = -1;
if (cred) {
struct user_namespace *current_ns = current_user_ns();
ucred->uid = from_kuid_munged(current_ns, cred->euid);
ucred->gid = from_kgid_munged(current_ns, cred->egid);
}
}
|
C
|
linux
| 0 |
CVE-2019-13298
|
https://www.cvedetails.com/cve/CVE-2019-13298/
|
CWE-119
|
https://github.com/ImageMagick/ImageMagick/commit/d4fc44b58a14f76b1ac997517d742ee12c9dc5d3
|
d4fc44b58a14f76b1ac997517d742ee12c9dc5d3
|
https://github.com/ImageMagick/ImageMagick/issues/1611
|
MagickExport MagickBooleanType ModulateImage(Image *image,const char *modulate,
ExceptionInfo *exception)
{
#define ModulateImageTag "Modulate/Image"
CacheView
*image_view;
ColorspaceType
colorspace;
const char
*artifact;
double
percent_brightness,
percent_hue,
percent_saturation;
GeometryInfo
geometry_info;
MagickBooleanType
status;
MagickOffsetType
progress;
MagickStatusType
flags;
register ssize_t
i;
ssize_t
y;
/*
Initialize modulate table.
*/
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if (modulate == (char *) NULL)
return(MagickFalse);
if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
(void) SetImageColorspace(image,sRGBColorspace,exception);
flags=ParseGeometry(modulate,&geometry_info);
percent_brightness=geometry_info.rho;
percent_saturation=geometry_info.sigma;
if ((flags & SigmaValue) == 0)
percent_saturation=100.0;
percent_hue=geometry_info.xi;
if ((flags & XiValue) == 0)
percent_hue=100.0;
colorspace=UndefinedColorspace;
artifact=GetImageArtifact(image,"modulate:colorspace");
if (artifact != (const char *) NULL)
colorspace=(ColorspaceType) ParseCommandOption(MagickColorspaceOptions,
MagickFalse,artifact);
if (image->storage_class == PseudoClass)
for (i=0; i < (ssize_t) image->colors; i++)
{
double
blue,
green,
red;
/*
Modulate image colormap.
*/
red=(double) image->colormap[i].red;
green=(double) image->colormap[i].green;
blue=(double) image->colormap[i].blue;
switch (colorspace)
{
case HCLColorspace:
{
ModulateHCL(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HCLpColorspace:
{
ModulateHCLp(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSBColorspace:
{
ModulateHSB(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSIColorspace:
{
ModulateHSI(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSLColorspace:
default:
{
ModulateHSL(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSVColorspace:
{
ModulateHSV(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HWBColorspace:
{
ModulateHWB(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case LCHColorspace:
case LCHabColorspace:
{
ModulateLCHab(percent_brightness,percent_saturation,percent_hue,
&red,&green,&blue);
break;
}
case LCHuvColorspace:
{
ModulateLCHuv(percent_brightness,percent_saturation,percent_hue,
&red,&green,&blue);
break;
}
}
image->colormap[i].red=red;
image->colormap[i].green=green;
image->colormap[i].blue=blue;
}
/*
Modulate image.
*/
#if defined(MAGICKCORE_OPENCL_SUPPORT)
if (AccelerateModulateImage(image,percent_brightness,percent_hue,
percent_saturation,colorspace,exception) != MagickFalse)
return(MagickTrue);
#endif
status=MagickTrue;
progress=0;
image_view=AcquireAuthenticCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) shared(progress,status) \
magick_number_threads(image,image,image->rows,1)
#endif
for (y=0; y < (ssize_t) image->rows; y++)
{
register Quantum
*magick_restrict q;
register ssize_t
x;
if (status == MagickFalse)
continue;
q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception);
if (q == (Quantum *) NULL)
{
status=MagickFalse;
continue;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
double
blue,
green,
red;
red=(double) GetPixelRed(image,q);
green=(double) GetPixelGreen(image,q);
blue=(double) GetPixelBlue(image,q);
switch (colorspace)
{
case HCLColorspace:
{
ModulateHCL(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HCLpColorspace:
{
ModulateHCLp(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSBColorspace:
{
ModulateHSB(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSLColorspace:
default:
{
ModulateHSL(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSVColorspace:
{
ModulateHSV(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HWBColorspace:
{
ModulateHWB(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case LCHabColorspace:
{
ModulateLCHab(percent_brightness,percent_saturation,percent_hue,
&red,&green,&blue);
break;
}
case LCHColorspace:
case LCHuvColorspace:
{
ModulateLCHuv(percent_brightness,percent_saturation,percent_hue,
&red,&green,&blue);
break;
}
}
SetPixelRed(image,ClampToQuantum(red),q);
SetPixelGreen(image,ClampToQuantum(green),q);
SetPixelBlue(image,ClampToQuantum(blue),q);
q+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
status=MagickFalse;
if (image->progress_monitor != (MagickProgressMonitor) NULL)
{
MagickBooleanType
proceed;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp atomic
#endif
progress++;
proceed=SetImageProgress(image,ModulateImageTag,progress,image->rows);
if (proceed == MagickFalse)
status=MagickFalse;
}
}
image_view=DestroyCacheView(image_view);
return(status);
}
|
MagickExport MagickBooleanType ModulateImage(Image *image,const char *modulate,
ExceptionInfo *exception)
{
#define ModulateImageTag "Modulate/Image"
CacheView
*image_view;
ColorspaceType
colorspace;
const char
*artifact;
double
percent_brightness,
percent_hue,
percent_saturation;
GeometryInfo
geometry_info;
MagickBooleanType
status;
MagickOffsetType
progress;
MagickStatusType
flags;
register ssize_t
i;
ssize_t
y;
/*
Initialize modulate table.
*/
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if (modulate == (char *) NULL)
return(MagickFalse);
if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
(void) SetImageColorspace(image,sRGBColorspace,exception);
flags=ParseGeometry(modulate,&geometry_info);
percent_brightness=geometry_info.rho;
percent_saturation=geometry_info.sigma;
if ((flags & SigmaValue) == 0)
percent_saturation=100.0;
percent_hue=geometry_info.xi;
if ((flags & XiValue) == 0)
percent_hue=100.0;
colorspace=UndefinedColorspace;
artifact=GetImageArtifact(image,"modulate:colorspace");
if (artifact != (const char *) NULL)
colorspace=(ColorspaceType) ParseCommandOption(MagickColorspaceOptions,
MagickFalse,artifact);
if (image->storage_class == PseudoClass)
for (i=0; i < (ssize_t) image->colors; i++)
{
double
blue,
green,
red;
/*
Modulate image colormap.
*/
red=(double) image->colormap[i].red;
green=(double) image->colormap[i].green;
blue=(double) image->colormap[i].blue;
switch (colorspace)
{
case HCLColorspace:
{
ModulateHCL(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HCLpColorspace:
{
ModulateHCLp(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSBColorspace:
{
ModulateHSB(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSIColorspace:
{
ModulateHSI(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSLColorspace:
default:
{
ModulateHSL(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSVColorspace:
{
ModulateHSV(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HWBColorspace:
{
ModulateHWB(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case LCHColorspace:
case LCHabColorspace:
{
ModulateLCHab(percent_brightness,percent_saturation,percent_hue,
&red,&green,&blue);
break;
}
case LCHuvColorspace:
{
ModulateLCHuv(percent_brightness,percent_saturation,percent_hue,
&red,&green,&blue);
break;
}
}
image->colormap[i].red=red;
image->colormap[i].green=green;
image->colormap[i].blue=blue;
}
/*
Modulate image.
*/
#if defined(MAGICKCORE_OPENCL_SUPPORT)
if (AccelerateModulateImage(image,percent_brightness,percent_hue,
percent_saturation,colorspace,exception) != MagickFalse)
return(MagickTrue);
#endif
status=MagickTrue;
progress=0;
image_view=AcquireAuthenticCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) shared(progress,status) \
magick_number_threads(image,image,image->rows,1)
#endif
for (y=0; y < (ssize_t) image->rows; y++)
{
register Quantum
*magick_restrict q;
register ssize_t
x;
if (status == MagickFalse)
continue;
q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception);
if (q == (Quantum *) NULL)
{
status=MagickFalse;
continue;
}
for (x=0; x < (ssize_t) image->columns; x++)
{
double
blue,
green,
red;
red=(double) GetPixelRed(image,q);
green=(double) GetPixelGreen(image,q);
blue=(double) GetPixelBlue(image,q);
switch (colorspace)
{
case HCLColorspace:
{
ModulateHCL(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HCLpColorspace:
{
ModulateHCLp(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSBColorspace:
{
ModulateHSB(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSLColorspace:
default:
{
ModulateHSL(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HSVColorspace:
{
ModulateHSV(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case HWBColorspace:
{
ModulateHWB(percent_hue,percent_saturation,percent_brightness,
&red,&green,&blue);
break;
}
case LCHabColorspace:
{
ModulateLCHab(percent_brightness,percent_saturation,percent_hue,
&red,&green,&blue);
break;
}
case LCHColorspace:
case LCHuvColorspace:
{
ModulateLCHuv(percent_brightness,percent_saturation,percent_hue,
&red,&green,&blue);
break;
}
}
SetPixelRed(image,ClampToQuantum(red),q);
SetPixelGreen(image,ClampToQuantum(green),q);
SetPixelBlue(image,ClampToQuantum(blue),q);
q+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
status=MagickFalse;
if (image->progress_monitor != (MagickProgressMonitor) NULL)
{
MagickBooleanType
proceed;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp atomic
#endif
progress++;
proceed=SetImageProgress(image,ModulateImageTag,progress,image->rows);
if (proceed == MagickFalse)
status=MagickFalse;
}
}
image_view=DestroyCacheView(image_view);
return(status);
}
|
C
|
ImageMagick
| 0 |
CVE-2016-1665
|
https://www.cvedetails.com/cve/CVE-2016-1665/
|
CWE-20
|
https://github.com/chromium/chromium/commit/282f53ffdc3b1902da86f6a0791af736837efbf8
|
282f53ffdc3b1902da86f6a0791af736837efbf8
|
[signin] Add metrics to track the source for refresh token updated events
This CL add a source for update and revoke credentials operations. It then
surfaces the source in the chrome://signin-internals page.
This CL also records the following histograms that track refresh token events:
* Signin.RefreshTokenUpdated.ToValidToken.Source
* Signin.RefreshTokenUpdated.ToInvalidToken.Source
* Signin.RefreshTokenRevoked.Source
These histograms are needed to validate the assumptions of how often tokens
are revoked by the browser and the sources for the token revocations.
Bug: 896182
Change-Id: I2fcab80ee8e5699708e695bc3289fa6d34859a90
Reviewed-on: https://chromium-review.googlesource.com/c/1286464
Reviewed-by: Jochen Eisinger <[email protected]>
Reviewed-by: David Roger <[email protected]>
Reviewed-by: Ilya Sherman <[email protected]>
Commit-Queue: Mihai Sardarescu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#606181}
|
void ProfileChooserView::ShowBubble(
profiles::BubbleViewMode view_mode,
const signin::ManageAccountsParams& manage_accounts_params,
signin_metrics::AccessPoint access_point,
views::Button* anchor_button,
gfx::NativeView parent_window,
const gfx::Rect& anchor_rect,
Browser* browser,
bool is_source_keyboard) {
if (IsShowing())
return;
profile_bubble_ =
new ProfileChooserView(anchor_button, browser, view_mode,
manage_accounts_params.service_type, access_point);
if (anchor_button) {
anchor_button->AnimateInkDrop(views::InkDropState::ACTIVATED, nullptr);
} else {
DCHECK(parent_window);
profile_bubble_->SetAnchorRect(anchor_rect);
profile_bubble_->set_parent_window(parent_window);
}
views::Widget* widget =
views::BubbleDialogDelegateView::CreateBubble(profile_bubble_);
widget->Show();
base::RecordAction(base::UserMetricsAction("ProfileChooser_Show"));
if (is_source_keyboard)
profile_bubble_->FocusFirstProfileButton();
}
|
void ProfileChooserView::ShowBubble(
profiles::BubbleViewMode view_mode,
const signin::ManageAccountsParams& manage_accounts_params,
signin_metrics::AccessPoint access_point,
views::Button* anchor_button,
gfx::NativeView parent_window,
const gfx::Rect& anchor_rect,
Browser* browser,
bool is_source_keyboard) {
if (IsShowing())
return;
profile_bubble_ =
new ProfileChooserView(anchor_button, browser, view_mode,
manage_accounts_params.service_type, access_point);
if (anchor_button) {
anchor_button->AnimateInkDrop(views::InkDropState::ACTIVATED, nullptr);
} else {
DCHECK(parent_window);
profile_bubble_->SetAnchorRect(anchor_rect);
profile_bubble_->set_parent_window(parent_window);
}
views::Widget* widget =
views::BubbleDialogDelegateView::CreateBubble(profile_bubble_);
widget->Show();
base::RecordAction(base::UserMetricsAction("ProfileChooser_Show"));
if (is_source_keyboard)
profile_bubble_->FocusFirstProfileButton();
}
|
C
|
Chrome
| 0 |
CVE-2018-20067
|
https://www.cvedetails.com/cve/CVE-2018-20067/
|
CWE-254
|
https://github.com/chromium/chromium/commit/a7d715ae5b654d1f98669fd979a00282a7229044
|
a7d715ae5b654d1f98669fd979a00282a7229044
|
Prevent renderer initiated back navigation to cancel a browser one.
Renderer initiated back/forward navigations must not be able to cancel ongoing
browser initiated navigation if they are not user initiated.
Note: 'normal' renderer initiated navigation uses the
FrameHost::BeginNavigation() path. A code similar to this patch is done
in NavigatorImpl::OnBeginNavigation().
Test:
-----
Added: NavigationBrowserTest.
* HistoryBackInBeforeUnload
* HistoryBackInBeforeUnloadAfterSetTimeout
* HistoryBackCancelPendingNavigationNoUserGesture
* HistoryBackCancelPendingNavigationUserGesture
Fixed:
* (WPT) .../the-history-interface/traverse_the_history_2.html
* (WPT) .../the-history-interface/traverse_the_history_3.html
* (WPT) .../the-history-interface/traverse_the_history_4.html
* (WPT) .../the-history-interface/traverse_the_history_5.html
Bug: 879965
Change-Id: I1a9bfaaea1ffc219e6c32f6e676b660e746c578c
Reviewed-on: https://chromium-review.googlesource.com/1209744
Commit-Queue: Arthur Sonzogni <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Mustaq Ahmed <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Cr-Commit-Position: refs/heads/master@{#592823}
|
void WebContentsImpl::RecursiveRequestAXTreeSnapshotOnFrame(
FrameTreeNode* root_node,
AXTreeSnapshotCombiner* combiner,
ui::AXMode ax_mode) {
for (FrameTreeNode* frame_tree_node : frame_tree_.Nodes()) {
WebContentsImpl* inner_contents =
node_.GetInnerWebContentsInFrame(frame_tree_node);
if (inner_contents) {
inner_contents->RecursiveRequestAXTreeSnapshotOnFrame(root_node, combiner,
ax_mode);
} else {
bool is_root = frame_tree_node == root_node;
frame_tree_node->current_frame_host()->RequestAXTreeSnapshot(
combiner->AddFrame(is_root), ax_mode);
}
}
}
|
void WebContentsImpl::RecursiveRequestAXTreeSnapshotOnFrame(
FrameTreeNode* root_node,
AXTreeSnapshotCombiner* combiner,
ui::AXMode ax_mode) {
for (FrameTreeNode* frame_tree_node : frame_tree_.Nodes()) {
WebContentsImpl* inner_contents =
node_.GetInnerWebContentsInFrame(frame_tree_node);
if (inner_contents) {
inner_contents->RecursiveRequestAXTreeSnapshotOnFrame(root_node, combiner,
ax_mode);
} else {
bool is_root = frame_tree_node == root_node;
frame_tree_node->current_frame_host()->RequestAXTreeSnapshot(
combiner->AddFrame(is_root), ax_mode);
}
}
}
|
C
|
Chrome
| 0 |
CVE-2018-6089
|
https://www.cvedetails.com/cve/CVE-2018-6089/
|
CWE-20
|
https://github.com/chromium/chromium/commit/e89b9003df8c7bd7822e5b6c0a76e726a6ed1505
|
e89b9003df8c7bd7822e5b6c0a76e726a6ed1505
|
Skip Service workers in requests for mime handler plugins
BUG=808838
TEST=./browser_tests --gtest_filter=*/ServiceWorkerTest.MimeHandlerView*
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I82e75c200091babbab648a04232db47e2938d914
Reviewed-on: https://chromium-review.googlesource.com/914150
Commit-Queue: Rob Wu <[email protected]>
Reviewed-by: Istiaque Ahmed <[email protected]>
Reviewed-by: Matt Falkenhagen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#537386}
|
v8::Local<v8::Object> MimeHandlerViewContainer::V8ScriptableObject(
v8::Isolate* isolate) {
if (scriptable_object_.IsEmpty()) {
v8::Local<v8::Object> object =
ScriptableObject::Create(isolate, weak_factory_.GetWeakPtr());
scriptable_object_.Reset(isolate, object);
}
return v8::Local<v8::Object>::New(isolate, scriptable_object_);
}
|
v8::Local<v8::Object> MimeHandlerViewContainer::V8ScriptableObject(
v8::Isolate* isolate) {
if (scriptable_object_.IsEmpty()) {
v8::Local<v8::Object> object =
ScriptableObject::Create(isolate, weak_factory_.GetWeakPtr());
scriptable_object_.Reset(isolate, object);
}
return v8::Local<v8::Object>::New(isolate, scriptable_object_);
}
|
C
|
Chrome
| 0 |
CVE-2016-4565
|
https://www.cvedetails.com/cve/CVE-2016-4565/
|
CWE-264
|
https://github.com/torvalds/linux/commit/e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
|
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
|
IB/security: Restrict use of the write() interface
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl(). This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory instead.
For the immediate repair, detect and deny suspicious accesses to
the write API.
For long term, update the user space libraries and the kernel API
to something that doesn't present the same security vulnerabilities
(likely a structured ioctl() interface).
The impacted uAPI interfaces are generally only available if
hardware from drivers/infiniband is installed in the system.
Reported-by: Jann Horn <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
[ Expanded check to all known write() entry points ]
Cc: [email protected]
Signed-off-by: Doug Ledford <[email protected]>
|
static void ucma_copy_ud_event(struct rdma_ucm_ud_param *dst,
struct rdma_ud_param *src)
{
if (src->private_data_len)
memcpy(dst->private_data, src->private_data,
src->private_data_len);
dst->private_data_len = src->private_data_len;
ib_copy_ah_attr_to_user(&dst->ah_attr, &src->ah_attr);
dst->qp_num = src->qp_num;
dst->qkey = src->qkey;
}
|
static void ucma_copy_ud_event(struct rdma_ucm_ud_param *dst,
struct rdma_ud_param *src)
{
if (src->private_data_len)
memcpy(dst->private_data, src->private_data,
src->private_data_len);
dst->private_data_len = src->private_data_len;
ib_copy_ah_attr_to_user(&dst->ah_attr, &src->ah_attr);
dst->qp_num = src->qp_num;
dst->qkey = src->qkey;
}
|
C
|
linux
| 0 |
CVE-2018-6033
|
https://www.cvedetails.com/cve/CVE-2018-6033/
|
CWE-20
|
https://github.com/chromium/chromium/commit/a8d6ae61d266d8bc44c3dd2d08bda32db701e359
|
a8d6ae61d266d8bc44c3dd2d08bda32db701e359
|
Downloads : Fixed an issue of opening incorrect download file
When one download overwrites another completed download, calling download.open in the old download causes the new download to open, which could be dangerous and undesirable. In this CL, we are trying to avoid this by blocking the opening of the old download.
Bug: 793620
Change-Id: Ic948175756700ad7c08489c3cc347330daedb6f8
Reviewed-on: https://chromium-review.googlesource.com/826477
Reviewed-by: David Trainor <[email protected]>
Reviewed-by: Xing Liu <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Commit-Queue: Shakti Sahu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#525810}
|
void DownloadItemImpl::MaybeCompleteDownload() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!IsSavePackageDownload());
if (!IsDownloadReadyForCompletion(
base::Bind(&DownloadItemImpl::MaybeCompleteDownload,
weak_ptr_factory_.GetWeakPtr())))
return;
DCHECK_EQ(IN_PROGRESS_INTERNAL, state_);
DCHECK(!IsDangerous());
DCHECK(AllDataSaved());
OnDownloadCompleting();
}
|
void DownloadItemImpl::MaybeCompleteDownload() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!IsSavePackageDownload());
if (!IsDownloadReadyForCompletion(
base::Bind(&DownloadItemImpl::MaybeCompleteDownload,
weak_ptr_factory_.GetWeakPtr())))
return;
DCHECK_EQ(IN_PROGRESS_INTERNAL, state_);
DCHECK(!IsDangerous());
DCHECK(AllDataSaved());
OnDownloadCompleting();
}
|
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}
|
bool DataReductionProxyConfig::IsProxyBypassed(
const net::ProxyRetryInfoMap& retry_map,
const net::ProxyServer& proxy_server,
base::TimeDelta* retry_delay) const {
DCHECK(thread_checker_.CalledOnValidThread());
return IsProxyBypassedAtTime(retry_map, proxy_server, GetTicksNow(),
retry_delay);
}
|
bool DataReductionProxyConfig::IsProxyBypassed(
const net::ProxyRetryInfoMap& retry_map,
const net::ProxyServer& proxy_server,
base::TimeDelta* retry_delay) const {
DCHECK(thread_checker_.CalledOnValidThread());
return IsProxyBypassedAtTime(retry_map, proxy_server, GetTicksNow(),
retry_delay);
}
|
C
|
Chrome
| 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 void tg3_int_reenable(struct tg3_napi *tnapi)
{
struct tg3 *tp = tnapi->tp;
tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24);
mmiowb();
/* When doing tagged status, this work check is unnecessary.
* The last_tag we write above tells the chip which piece of
* work we've completed.
*/
if (!tg3_flag(tp, TAGGED_STATUS) && tg3_has_work(tnapi))
tw32(HOSTCC_MODE, tp->coalesce_mode |
HOSTCC_MODE_ENABLE | tnapi->coal_now);
}
|
static void tg3_int_reenable(struct tg3_napi *tnapi)
{
struct tg3 *tp = tnapi->tp;
tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24);
mmiowb();
/* When doing tagged status, this work check is unnecessary.
* The last_tag we write above tells the chip which piece of
* work we've completed.
*/
if (!tg3_flag(tp, TAGGED_STATUS) && tg3_has_work(tnapi))
tw32(HOSTCC_MODE, tp->coalesce_mode |
HOSTCC_MODE_ENABLE | tnapi->coal_now);
}
|
C
|
linux
| 0 |
CVE-2013-2128
|
https://www.cvedetails.com/cve/CVE-2013-2128/
|
CWE-119
|
https://github.com/torvalds/linux/commit/baff42ab1494528907bf4d5870359e31711746ae
|
baff42ab1494528907bf4d5870359e31711746ae
|
net: Fix oops from tcp_collapse() when using splice()
tcp_read_sock() can have a eat skbs without immediately advancing copied_seq.
This can cause a panic in tcp_collapse() if it is called as a result
of the recv_actor dropping the socket lock.
A userspace program that splices data from a socket to either another
socket or to a file can trigger this bug.
Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static void __tcp_free_md5sig_pool(struct tcp_md5sig_pool * __percpu *pool)
{
int cpu;
for_each_possible_cpu(cpu) {
struct tcp_md5sig_pool *p = *per_cpu_ptr(pool, cpu);
if (p) {
if (p->md5_desc.tfm)
crypto_free_hash(p->md5_desc.tfm);
kfree(p);
p = NULL;
}
}
free_percpu(pool);
}
|
static void __tcp_free_md5sig_pool(struct tcp_md5sig_pool * __percpu *pool)
{
int cpu;
for_each_possible_cpu(cpu) {
struct tcp_md5sig_pool *p = *per_cpu_ptr(pool, cpu);
if (p) {
if (p->md5_desc.tfm)
crypto_free_hash(p->md5_desc.tfm);
kfree(p);
p = NULL;
}
}
free_percpu(pool);
}
|
C
|
linux
| 0 |
CVE-2019-11810
|
https://www.cvedetails.com/cve/CVE-2019-11810/
|
CWE-476
|
https://github.com/torvalds/linux/commit/bcf3b67d16a4c8ffae0aa79de5853435e683945c
|
bcf3b67d16a4c8ffae0aa79de5853435e683945c
|
scsi: megaraid_sas: return error when create DMA pool failed
when create DMA pool for cmd frames failed, we should return -ENOMEM,
instead of 0.
In some case in:
megasas_init_adapter_fusion()
-->megasas_alloc_cmds()
-->megasas_create_frame_pool
create DMA pool failed,
--> megasas_free_cmds() [1]
-->megasas_alloc_cmds_fusion()
failed, then goto fail_alloc_cmds.
-->megasas_free_cmds() [2]
we will call megasas_free_cmds twice, [1] will kfree cmd_list,
[2] will use cmd_list.it will cause a problem:
Unable to handle kernel NULL pointer dereference at virtual address
00000000
pgd = ffffffc000f70000
[00000000] *pgd=0000001fbf893003, *pud=0000001fbf893003,
*pmd=0000001fbf894003, *pte=006000006d000707
Internal error: Oops: 96000005 [#1] SMP
Modules linked in:
CPU: 18 PID: 1 Comm: swapper/0 Not tainted
task: ffffffdfb9290000 ti: ffffffdfb923c000 task.ti: ffffffdfb923c000
PC is at megasas_free_cmds+0x30/0x70
LR is at megasas_free_cmds+0x24/0x70
...
Call trace:
[<ffffffc0005b779c>] megasas_free_cmds+0x30/0x70
[<ffffffc0005bca74>] megasas_init_adapter_fusion+0x2f4/0x4d8
[<ffffffc0005b926c>] megasas_init_fw+0x2dc/0x760
[<ffffffc0005b9ab0>] megasas_probe_one+0x3c0/0xcd8
[<ffffffc0004a5abc>] local_pci_probe+0x4c/0xb4
[<ffffffc0004a5c40>] pci_device_probe+0x11c/0x14c
[<ffffffc00053a5e4>] driver_probe_device+0x1ec/0x430
[<ffffffc00053a92c>] __driver_attach+0xa8/0xb0
[<ffffffc000538178>] bus_for_each_dev+0x74/0xc8
[<ffffffc000539e88>] driver_attach+0x28/0x34
[<ffffffc000539a18>] bus_add_driver+0x16c/0x248
[<ffffffc00053b234>] driver_register+0x6c/0x138
[<ffffffc0004a5350>] __pci_register_driver+0x5c/0x6c
[<ffffffc000ce3868>] megasas_init+0xc0/0x1a8
[<ffffffc000082a58>] do_one_initcall+0xe8/0x1ec
[<ffffffc000ca7be8>] kernel_init_freeable+0x1c8/0x284
[<ffffffc0008d90b8>] kernel_init+0x1c/0xe4
Signed-off-by: Jason Yan <[email protected]>
Acked-by: Sumit Saxena <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
static int megasas_mgmt_ioctl_aen(struct file *file, unsigned long arg)
{
struct megasas_instance *instance;
struct megasas_aen aen;
int error;
if (file->private_data != file) {
printk(KERN_DEBUG "megasas: fasync_helper was not "
"called first\n");
return -EINVAL;
}
if (copy_from_user(&aen, (void __user *)arg, sizeof(aen)))
return -EFAULT;
instance = megasas_lookup_instance(aen.host_no);
if (!instance)
return -ENODEV;
if (atomic_read(&instance->adprecovery) == MEGASAS_HW_CRITICAL_ERROR) {
return -ENODEV;
}
if (instance->unload == 1) {
return -ENODEV;
}
if (megasas_wait_for_adapter_operational(instance))
return -ENODEV;
mutex_lock(&instance->reset_mutex);
error = megasas_register_aen(instance, aen.seq_num,
aen.class_locale_word);
mutex_unlock(&instance->reset_mutex);
return error;
}
|
static int megasas_mgmt_ioctl_aen(struct file *file, unsigned long arg)
{
struct megasas_instance *instance;
struct megasas_aen aen;
int error;
if (file->private_data != file) {
printk(KERN_DEBUG "megasas: fasync_helper was not "
"called first\n");
return -EINVAL;
}
if (copy_from_user(&aen, (void __user *)arg, sizeof(aen)))
return -EFAULT;
instance = megasas_lookup_instance(aen.host_no);
if (!instance)
return -ENODEV;
if (atomic_read(&instance->adprecovery) == MEGASAS_HW_CRITICAL_ERROR) {
return -ENODEV;
}
if (instance->unload == 1) {
return -ENODEV;
}
if (megasas_wait_for_adapter_operational(instance))
return -ENODEV;
mutex_lock(&instance->reset_mutex);
error = megasas_register_aen(instance, aen.seq_num,
aen.class_locale_word);
mutex_unlock(&instance->reset_mutex);
return error;
}
|
C
|
linux
| 0 |
CVE-2017-15397
|
https://www.cvedetails.com/cve/CVE-2017-15397/
|
CWE-311
|
https://github.com/chromium/chromium/commit/0579ed631fb37de5704b54ed2ee466bf29630ad0
|
0579ed631fb37de5704b54ed2ee466bf29630ad0
|
Replace base::MakeUnique with std::make_unique in net/.
base/memory/ptr_util.h includes will be cleaned up later.
Bug: 755727
Change-Id: Ibaf46f05c9b02b76f9a91e819984b087a8c0d434
Reviewed-on: https://chromium-review.googlesource.com/627300
Commit-Queue: Jeremy Roman <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Bence Béky <[email protected]>
Cr-Commit-Position: refs/heads/master@{#498123}
|
base::TimeTicks start_time() const { return start_time_; }
|
base::TimeTicks start_time() const { return start_time_; }
|
C
|
Chrome
| 0 |
CVE-2011-2859
|
https://www.cvedetails.com/cve/CVE-2011-2859/
|
CWE-264
|
https://github.com/chromium/chromium/commit/454434f6100cb6a529652a25b5fc181caa7c7f32
|
454434f6100cb6a529652a25b5fc181caa7c7f32
|
Limit extent of webstore app to just chrome.google.com/webstore.
BUG=93497
TEST=Try installing extensions and apps from the webstore, starting both being
initially logged in, and not.
Review URL: http://codereview.chromium.org/7719003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97986 0039d316-1c4b-4281-b951-d872f2087c98
|
void ExtensionService::RegisterNaClModule(const GURL& url,
const std::string& mime_type) {
NaClModuleInfo info;
info.url = url;
info.mime_type = mime_type;
DCHECK(FindNaClModule(url) == nacl_module_list_.end());
nacl_module_list_.push_front(info);
}
|
void ExtensionService::RegisterNaClModule(const GURL& url,
const std::string& mime_type) {
NaClModuleInfo info;
info.url = url;
info.mime_type = mime_type;
DCHECK(FindNaClModule(url) == nacl_module_list_.end());
nacl_module_list_.push_front(info);
}
|
C
|
Chrome
| 0 |
CVE-2016-10012
|
https://www.cvedetails.com/cve/CVE-2016-10012/
|
CWE-119
|
https://github.com/openbsd/src/commit/3095060f479b86288e31c79ecbc5131a66bcd2f9
|
3095060f479b86288e31c79ecbc5131a66bcd2f9
|
Remove support for pre-authentication compression. Doing compression
early in the protocol probably seemed reasonable in the 1990s, but
today it's clearly a bad idea in terms of both cryptography (cf.
multiple compression oracle attacks in TLS) and attack surface.
Moreover, to support it across privilege-separation zlib needed
the assistance of a complex shared-memory manager that made the
required attack surface considerably larger.
Prompted by Guido Vranken pointing out a compiler-elided security
check in the shared memory manager found by Stack
(http://css.csail.mit.edu/stack/); ok deraadt@ markus@
NB. pre-auth authentication has been disabled by default in sshd
for >10 years.
|
identity_sign(struct identity *id, u_char **sigp, size_t *lenp,
const u_char *data, size_t datalen, u_int compat)
{
Key *prv;
int ret;
const char *alg;
alg = identity_sign_encode(id);
/* the agent supports this key */
if (id->agent_fd != -1)
return ssh_agent_sign(id->agent_fd, id->key, sigp, lenp,
data, datalen, alg, compat);
/*
* we have already loaded the private key or
* the private key is stored in external hardware
*/
if (id->isprivate || (id->key->flags & SSHKEY_FLAG_EXT))
return (sshkey_sign(id->key, sigp, lenp, data, datalen, alg,
compat));
/* load the private key from the file */
if ((prv = load_identity_file(id)) == NULL)
return SSH_ERR_KEY_NOT_FOUND;
ret = sshkey_sign(prv, sigp, lenp, data, datalen, alg, compat);
sshkey_free(prv);
return (ret);
}
|
identity_sign(struct identity *id, u_char **sigp, size_t *lenp,
const u_char *data, size_t datalen, u_int compat)
{
Key *prv;
int ret;
const char *alg;
alg = identity_sign_encode(id);
/* the agent supports this key */
if (id->agent_fd != -1)
return ssh_agent_sign(id->agent_fd, id->key, sigp, lenp,
data, datalen, alg, compat);
/*
* we have already loaded the private key or
* the private key is stored in external hardware
*/
if (id->isprivate || (id->key->flags & SSHKEY_FLAG_EXT))
return (sshkey_sign(id->key, sigp, lenp, data, datalen, alg,
compat));
/* load the private key from the file */
if ((prv = load_identity_file(id)) == NULL)
return SSH_ERR_KEY_NOT_FOUND;
ret = sshkey_sign(prv, sigp, lenp, data, datalen, alg, compat);
sshkey_free(prv);
return (ret);
}
|
C
|
src
| 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 stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectV8Internal::stringArrayFunctionMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
|
static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectV8Internal::stringArrayFunctionMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
|
C
|
Chrome
| 0 |
CVE-2017-5019
|
https://www.cvedetails.com/cve/CVE-2017-5019/
|
CWE-416
|
https://github.com/chromium/chromium/commit/f03ea5a5c2ff26e239dfd23e263b15da2d9cee93
|
f03ea5a5c2ff26e239dfd23e263b15da2d9cee93
|
Convert FrameHostMsg_DidAddMessageToConsole to Mojo.
Note: Since this required changing the test
RenderViewImplTest.DispatchBeforeUnloadCanDetachFrame, I manually
re-introduced https://crbug.com/666714 locally (the bug the test was
added for), and reran the test to confirm that it still covers the bug.
Bug: 786836
Change-Id: I110668fa6f0f261fd2ac36bb91a8d8b31c99f4f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526270
Commit-Queue: Lowell Manners <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#653137}
|
void RenderFrameHostImpl::BeginNavigation(
const CommonNavigationParams& common_params,
mojom::BeginNavigationParamsPtr begin_params,
blink::mojom::BlobURLTokenPtr blob_url_token,
mojom::NavigationClientAssociatedPtrInfo navigation_client,
blink::mojom::NavigationInitiatorPtr navigation_initiator) {
if (frame_tree_node_->render_manager()->is_attaching_inner_delegate()) {
return;
}
if (!is_active())
return;
TRACE_EVENT2("navigation", "RenderFrameHostImpl::BeginNavigation",
"frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
common_params.url.possibly_invalid_spec());
DCHECK(IsPerNavigationMojoInterfaceEnabled() == navigation_client.is_valid());
CommonNavigationParams validated_params = common_params;
if (!VerifyBeginNavigationCommonParams(GetSiteInstance(), &validated_params))
return;
GetProcess()->FilterURL(true, &begin_params->searchable_form_url);
if (common_params.url.SchemeIsBlob() && !validated_params.url.SchemeIsBlob())
blob_url_token = nullptr;
if (blob_url_token && !validated_params.url.SchemeIsBlob()) {
mojo::ReportBadMessage("Blob URL Token, but not a blob: URL");
return;
}
scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory;
if (blob_url_token) {
blob_url_loader_factory =
ChromeBlobStorageContext::URLLoaderFactoryForToken(
GetSiteInstance()->GetBrowserContext(), std::move(blob_url_token));
}
if (blink::BlobUtils::MojoBlobURLsEnabled() &&
validated_params.url.SchemeIsBlob() && !blob_url_loader_factory) {
blob_url_loader_factory = ChromeBlobStorageContext::URLLoaderFactoryForUrl(
GetSiteInstance()->GetBrowserContext(), validated_params.url);
}
if (waiting_for_init_) {
pending_navigate_ = std::make_unique<PendingNavigation>(
validated_params, std::move(begin_params),
std::move(blob_url_loader_factory), std::move(navigation_client),
std::move(navigation_initiator));
return;
}
frame_tree_node()->navigator()->OnBeginNavigation(
frame_tree_node(), validated_params, std::move(begin_params),
std::move(blob_url_loader_factory), std::move(navigation_client),
std::move(navigation_initiator));
}
|
void RenderFrameHostImpl::BeginNavigation(
const CommonNavigationParams& common_params,
mojom::BeginNavigationParamsPtr begin_params,
blink::mojom::BlobURLTokenPtr blob_url_token,
mojom::NavigationClientAssociatedPtrInfo navigation_client,
blink::mojom::NavigationInitiatorPtr navigation_initiator) {
if (frame_tree_node_->render_manager()->is_attaching_inner_delegate()) {
return;
}
if (!is_active())
return;
TRACE_EVENT2("navigation", "RenderFrameHostImpl::BeginNavigation",
"frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
common_params.url.possibly_invalid_spec());
DCHECK(IsPerNavigationMojoInterfaceEnabled() == navigation_client.is_valid());
CommonNavigationParams validated_params = common_params;
if (!VerifyBeginNavigationCommonParams(GetSiteInstance(), &validated_params))
return;
GetProcess()->FilterURL(true, &begin_params->searchable_form_url);
if (common_params.url.SchemeIsBlob() && !validated_params.url.SchemeIsBlob())
blob_url_token = nullptr;
if (blob_url_token && !validated_params.url.SchemeIsBlob()) {
mojo::ReportBadMessage("Blob URL Token, but not a blob: URL");
return;
}
scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory;
if (blob_url_token) {
blob_url_loader_factory =
ChromeBlobStorageContext::URLLoaderFactoryForToken(
GetSiteInstance()->GetBrowserContext(), std::move(blob_url_token));
}
if (blink::BlobUtils::MojoBlobURLsEnabled() &&
validated_params.url.SchemeIsBlob() && !blob_url_loader_factory) {
blob_url_loader_factory = ChromeBlobStorageContext::URLLoaderFactoryForUrl(
GetSiteInstance()->GetBrowserContext(), validated_params.url);
}
if (waiting_for_init_) {
pending_navigate_ = std::make_unique<PendingNavigation>(
validated_params, std::move(begin_params),
std::move(blob_url_loader_factory), std::move(navigation_client),
std::move(navigation_initiator));
return;
}
frame_tree_node()->navigator()->OnBeginNavigation(
frame_tree_node(), validated_params, std::move(begin_params),
std::move(blob_url_loader_factory), std::move(navigation_client),
std::move(navigation_initiator));
}
|
C
|
Chrome
| 0 |
CVE-2019-5755
|
https://www.cvedetails.com/cve/CVE-2019-5755/
|
CWE-189
|
https://github.com/chromium/chromium/commit/971548cdca2d4c0a6fedd3db0c94372c2a27eac3
|
971548cdca2d4c0a6fedd3db0c94372c2a27eac3
|
Make MediaStreamDispatcherHost per-request instead of per-frame.
Instead of having RenderFrameHost own a single MSDH to handle all
requests from a frame, MSDH objects will be owned by a strong binding.
A consequence of this is that an additional requester ID is added to
requests to MediaStreamManager, so that an MSDH is able to cancel only
requests generated by it.
In practice, MSDH will continue to be per frame in most cases since
each frame normally makes a single request for an MSDH object.
This fixes a lifetime issue caused by the IO thread executing tasks
after the RenderFrameHost dies.
Drive-by: Fix some minor lint issues.
Bug: 912520
Change-Id: I52742ffc98b9fc57ce8e6f5093a61aed86d3e516
Reviewed-on: https://chromium-review.googlesource.com/c/1369799
Reviewed-by: Emircan Uysaler <[email protected]>
Reviewed-by: Ken Buchanan <[email protected]>
Reviewed-by: Olga Sharonova <[email protected]>
Commit-Queue: Guido Urdaneta <[email protected]>
Cr-Commit-Position: refs/heads/master@{#616347}
|
bool MediaStreamManager::PickDeviceId(
const MediaDeviceSaltAndOrigin& salt_and_origin,
const TrackControls& controls,
const MediaDeviceInfoArray& devices,
std::string* device_id) const {
if (controls.device_id.empty())
return true;
if (!GetDeviceIDFromHMAC(salt_and_origin.device_id_salt,
salt_and_origin.origin, controls.device_id, devices,
device_id)) {
LOG(WARNING) << "Invalid device ID = " << controls.device_id;
return false;
}
return true;
}
|
bool MediaStreamManager::PickDeviceId(
const MediaDeviceSaltAndOrigin& salt_and_origin,
const TrackControls& controls,
const MediaDeviceInfoArray& devices,
std::string* device_id) const {
if (controls.device_id.empty())
return true;
if (!GetDeviceIDFromHMAC(salt_and_origin.device_id_salt,
salt_and_origin.origin, controls.device_id, devices,
device_id)) {
LOG(WARNING) << "Invalid device ID = " << controls.device_id;
return false;
}
return true;
}
|
C
|
Chrome
| 0 |
CVE-2018-6198
|
https://www.cvedetails.com/cve/CVE-2018-6198/
|
CWE-59
|
https://github.com/tats/w3m/commit/18dcbadf2771cdb0c18509b14e4e73505b242753
|
18dcbadf2771cdb0c18509b14e4e73505b242753
|
Make temporary directory safely when ~/.w3m is unwritable
|
bufferA(void)
{
on_target = FALSE;
followA();
on_target = TRUE;
}
|
bufferA(void)
{
on_target = FALSE;
followA();
on_target = TRUE;
}
|
C
|
w3m
| 0 |
CVE-2017-14604
|
https://www.cvedetails.com/cve/CVE-2017-14604/
|
CWE-20
|
https://github.com/GNOME/nautilus/commit/1630f53481f445ada0a455e9979236d31a8d3bb0
|
1630f53481f445ada0a455e9979236d31a8d3bb0
|
mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission is preserved if the desktop file
comes from a compressed file.
To prevent this, add a metadata::trusted metadata to the file once the
user acknowledges the file as trusted. This adds metadata to the file,
which cannot be added unless it has access to the computer.
Also remove the SHEBANG "trusted" content we were putting inside the
desktop file, since that doesn't add more security since it can come
with the file itself.
https://bugzilla.gnome.org/show_bug.cgi?id=777991
|
get_info_state_free (GetInfoState *state)
{
g_object_unref (state->cancellable);
g_free (state);
}
|
get_info_state_free (GetInfoState *state)
{
g_object_unref (state->cancellable);
g_free (state);
}
|
C
|
nautilus
| 0 |
CVE-2012-3412
|
https://www.cvedetails.com/cve/CVE-2012-3412/
|
CWE-189
|
https://github.com/torvalds/linux/commit/68cb695ccecf949d48949e72f8ce591fdaaa325c
|
68cb695ccecf949d48949e72f8ce591fdaaa325c
|
sfc: Fix maximum number of TSO segments and minimum TX queue size
[ Upstream commit 7e6d06f0de3f74ca929441add094518ae332257c ]
Currently an skb requiring TSO may not fit within a minimum-size TX
queue. The TX queue selected for the skb may stall and trigger the TX
watchdog repeatedly (since the problem skb will be retried after the
TX reset). This issue is designated as CVE-2012-3412.
Set the maximum number of TSO segments for our devices to 100. This
should make no difference to behaviour unless the actual MSS is less
than about 700. Increase the minimum TX queue size accordingly to
allow for 2 worst-case skbs, so that there will definitely be space
to add an skb after we wake a queue.
To avoid invalidating existing configurations, change
efx_ethtool_set_ringparam() to fix up values that are too small rather
than returning -EINVAL.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
|
static void efx_remove_eventq(struct efx_channel *channel)
{
netif_dbg(channel->efx, drv, channel->efx->net_dev,
"chan %d remove event queue\n", channel->channel);
efx_nic_remove_eventq(channel);
}
|
static void efx_remove_eventq(struct efx_channel *channel)
{
netif_dbg(channel->efx, drv, channel->efx->net_dev,
"chan %d remove event queue\n", channel->channel);
efx_nic_remove_eventq(channel);
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/df831400bcb63db4259b5858281b1727ba972a2a
|
df831400bcb63db4259b5858281b1727ba972a2a
|
WebKit2: Support window bounce when panning.
https://bugs.webkit.org/show_bug.cgi?id=58065
<rdar://problem/9244367>
Reviewed by Adam Roben.
Make gestureDidScroll synchronous, as once we scroll, we need to know
whether or not we are at the beginning or end of the scrollable document.
If we are at either end of the scrollable document, we call the Windows 7
API to bounce the window to give an indication that you are past an end
of the document.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::gestureDidScroll): Pass a boolean for the reply, and return it.
* UIProcess/WebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView): Inititalize a new variable.
(WebKit::WebView::onGesture): Once we send the message to scroll, check if have gone to
an end of the document, and if we have, bounce the window.
* UIProcess/win/WebView.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: GestureDidScroll is now sync.
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::gestureDidScroll): When we are done scrolling, check if we have a vertical
scrollbar and if we are at the beginning or the end of the scrollable document.
git-svn-id: svn://svn.chromium.org/blink/trunk@83197 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void WebPageProxy::advanceToNextMisspelling(bool startBeforeSelection)
{
process()->send(Messages::WebPage::AdvanceToNextMisspelling(startBeforeSelection), m_pageID);
}
|
void WebPageProxy::advanceToNextMisspelling(bool startBeforeSelection)
{
process()->send(Messages::WebPage::AdvanceToNextMisspelling(startBeforeSelection), m_pageID);
}
|
C
|
Chrome
| 0 |
CVE-2018-12249
|
https://www.cvedetails.com/cve/CVE-2018-12249/
|
CWE-476
|
https://github.com/mruby/mruby/commit/faa4eaf6803bd11669bc324b4c34e7162286bfa3
|
faa4eaf6803bd11669bc324b4c34e7162286bfa3
|
`mrb_class_real()` did not work for `BasicObject`; fix #4037
|
mrb_mod_ancestors(mrb_state *mrb, mrb_value self)
{
mrb_value result;
struct RClass *c = mrb_class_ptr(self);
result = mrb_ary_new(mrb);
while (c) {
if (c->tt == MRB_TT_ICLASS) {
mrb_ary_push(mrb, result, mrb_obj_value(c->c));
}
else if (!(c->flags & MRB_FLAG_IS_PREPENDED)) {
mrb_ary_push(mrb, result, mrb_obj_value(c));
}
c = c->super;
}
return result;
}
|
mrb_mod_ancestors(mrb_state *mrb, mrb_value self)
{
mrb_value result;
struct RClass *c = mrb_class_ptr(self);
result = mrb_ary_new(mrb);
while (c) {
if (c->tt == MRB_TT_ICLASS) {
mrb_ary_push(mrb, result, mrb_obj_value(c->c));
}
else if (!(c->flags & MRB_FLAG_IS_PREPENDED)) {
mrb_ary_push(mrb, result, mrb_obj_value(c));
}
c = c->super;
}
return result;
}
|
C
|
mruby
| 0 |
CVE-2018-12459
|
https://www.cvedetails.com/cve/CVE-2018-12459/
|
CWE-20
|
https://github.com/FFmpeg/FFmpeg/commit/2fc108f60f98cd00813418a8754a46476b404a3c
|
2fc108f60f98cd00813418a8754a46476b404a3c
|
avcodec/mpeg4videodec: Clear bits_per_raw_sample if it has originated from a previous instance
Fixes: assertion failure
Fixes: ffmpeg_crash_5.avi
Found-by: Thuan Pham <[email protected]>, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <[email protected]>
|
int ff_mpeg4_decode_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
unsigned startcode, v;
int ret;
int vol = 0;
/* search next start code */
align_get_bits(gb);
// If we have not switched to studio profile than we also did not switch bps
// that means something else (like a previous instance) outside set bps which
// would be inconsistant with the currect state, thus reset it
if (!s->studio_profile && s->avctx->bits_per_raw_sample != 8)
s->avctx->bits_per_raw_sample = 0;
if (s->codec_tag == AV_RL32("WV1F") && show_bits(gb, 24) == 0x575630) {
skip_bits(gb, 24);
if (get_bits(gb, 8) == 0xF0)
goto end;
}
startcode = 0xff;
for (;;) {
if (get_bits_count(gb) >= gb->size_in_bits) {
if (gb->size_in_bits == 8 &&
(ctx->divx_version >= 0 || ctx->xvid_build >= 0) || s->codec_tag == AV_RL32("QMP4")) {
av_log(s->avctx, AV_LOG_VERBOSE, "frame skip %d\n", gb->size_in_bits);
return FRAME_SKIPPED; // divx bug
} else
return AVERROR_INVALIDDATA; // end of stream
}
/* use the bits after the test */
v = get_bits(gb, 8);
startcode = ((startcode << 8) | v) & 0xffffffff;
if ((startcode & 0xFFFFFF00) != 0x100)
continue; // no startcode
if (s->avctx->debug & FF_DEBUG_STARTCODE) {
av_log(s->avctx, AV_LOG_DEBUG, "startcode: %3X ", startcode);
if (startcode <= 0x11F)
av_log(s->avctx, AV_LOG_DEBUG, "Video Object Start");
else if (startcode <= 0x12F)
av_log(s->avctx, AV_LOG_DEBUG, "Video Object Layer Start");
else if (startcode <= 0x13F)
av_log(s->avctx, AV_LOG_DEBUG, "Reserved");
else if (startcode <= 0x15F)
av_log(s->avctx, AV_LOG_DEBUG, "FGS bp start");
else if (startcode <= 0x1AF)
av_log(s->avctx, AV_LOG_DEBUG, "Reserved");
else if (startcode == 0x1B0)
av_log(s->avctx, AV_LOG_DEBUG, "Visual Object Seq Start");
else if (startcode == 0x1B1)
av_log(s->avctx, AV_LOG_DEBUG, "Visual Object Seq End");
else if (startcode == 0x1B2)
av_log(s->avctx, AV_LOG_DEBUG, "User Data");
else if (startcode == 0x1B3)
av_log(s->avctx, AV_LOG_DEBUG, "Group of VOP start");
else if (startcode == 0x1B4)
av_log(s->avctx, AV_LOG_DEBUG, "Video Session Error");
else if (startcode == 0x1B5)
av_log(s->avctx, AV_LOG_DEBUG, "Visual Object Start");
else if (startcode == 0x1B6)
av_log(s->avctx, AV_LOG_DEBUG, "Video Object Plane start");
else if (startcode == 0x1B7)
av_log(s->avctx, AV_LOG_DEBUG, "slice start");
else if (startcode == 0x1B8)
av_log(s->avctx, AV_LOG_DEBUG, "extension start");
else if (startcode == 0x1B9)
av_log(s->avctx, AV_LOG_DEBUG, "fgs start");
else if (startcode == 0x1BA)
av_log(s->avctx, AV_LOG_DEBUG, "FBA Object start");
else if (startcode == 0x1BB)
av_log(s->avctx, AV_LOG_DEBUG, "FBA Object Plane start");
else if (startcode == 0x1BC)
av_log(s->avctx, AV_LOG_DEBUG, "Mesh Object start");
else if (startcode == 0x1BD)
av_log(s->avctx, AV_LOG_DEBUG, "Mesh Object Plane start");
else if (startcode == 0x1BE)
av_log(s->avctx, AV_LOG_DEBUG, "Still Texture Object start");
else if (startcode == 0x1BF)
av_log(s->avctx, AV_LOG_DEBUG, "Texture Spatial Layer start");
else if (startcode == 0x1C0)
av_log(s->avctx, AV_LOG_DEBUG, "Texture SNR Layer start");
else if (startcode == 0x1C1)
av_log(s->avctx, AV_LOG_DEBUG, "Texture Tile start");
else if (startcode == 0x1C2)
av_log(s->avctx, AV_LOG_DEBUG, "Texture Shape Layer start");
else if (startcode == 0x1C3)
av_log(s->avctx, AV_LOG_DEBUG, "stuffing start");
else if (startcode <= 0x1C5)
av_log(s->avctx, AV_LOG_DEBUG, "reserved");
else if (startcode <= 0x1FF)
av_log(s->avctx, AV_LOG_DEBUG, "System start");
av_log(s->avctx, AV_LOG_DEBUG, " at %d\n", get_bits_count(gb));
}
if (startcode >= 0x120 && startcode <= 0x12F) {
if (vol) {
av_log(s->avctx, AV_LOG_WARNING, "Ignoring multiple VOL headers\n");
continue;
}
vol++;
if ((ret = decode_vol_header(ctx, gb)) < 0)
return ret;
} else if (startcode == USER_DATA_STARTCODE) {
decode_user_data(ctx, gb);
} else if (startcode == GOP_STARTCODE) {
mpeg4_decode_gop_header(s, gb);
} else if (startcode == VOS_STARTCODE) {
mpeg4_decode_profile_level(s, gb);
if (s->avctx->profile == FF_PROFILE_MPEG4_SIMPLE_STUDIO &&
(s->avctx->level > 0 && s->avctx->level < 9)) {
s->studio_profile = 1;
next_start_code_studio(gb);
extension_and_user_data(s, gb, 0);
}
} else if (startcode == VISUAL_OBJ_STARTCODE) {
if (s->studio_profile) {
if ((ret = decode_studiovisualobject(ctx, gb)) < 0)
return ret;
} else
mpeg4_decode_visual_object(s, gb);
} else if (startcode == VOP_STARTCODE) {
break;
}
align_get_bits(gb);
startcode = 0xff;
}
end:
if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
s->avctx->has_b_frames = !s->low_delay;
if (s->studio_profile) {
if (!s->avctx->bits_per_raw_sample) {
av_log(s->avctx, AV_LOG_ERROR, "Missing VOL header\n");
return AVERROR_INVALIDDATA;
}
return decode_studio_vop_header(ctx, gb);
} else
return decode_vop_header(ctx, gb);
}
|
int ff_mpeg4_decode_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
unsigned startcode, v;
int ret;
int vol = 0;
/* search next start code */
align_get_bits(gb);
if (s->codec_tag == AV_RL32("WV1F") && show_bits(gb, 24) == 0x575630) {
skip_bits(gb, 24);
if (get_bits(gb, 8) == 0xF0)
goto end;
}
startcode = 0xff;
for (;;) {
if (get_bits_count(gb) >= gb->size_in_bits) {
if (gb->size_in_bits == 8 &&
(ctx->divx_version >= 0 || ctx->xvid_build >= 0) || s->codec_tag == AV_RL32("QMP4")) {
av_log(s->avctx, AV_LOG_VERBOSE, "frame skip %d\n", gb->size_in_bits);
return FRAME_SKIPPED; // divx bug
} else
return AVERROR_INVALIDDATA; // end of stream
}
/* use the bits after the test */
v = get_bits(gb, 8);
startcode = ((startcode << 8) | v) & 0xffffffff;
if ((startcode & 0xFFFFFF00) != 0x100)
continue; // no startcode
if (s->avctx->debug & FF_DEBUG_STARTCODE) {
av_log(s->avctx, AV_LOG_DEBUG, "startcode: %3X ", startcode);
if (startcode <= 0x11F)
av_log(s->avctx, AV_LOG_DEBUG, "Video Object Start");
else if (startcode <= 0x12F)
av_log(s->avctx, AV_LOG_DEBUG, "Video Object Layer Start");
else if (startcode <= 0x13F)
av_log(s->avctx, AV_LOG_DEBUG, "Reserved");
else if (startcode <= 0x15F)
av_log(s->avctx, AV_LOG_DEBUG, "FGS bp start");
else if (startcode <= 0x1AF)
av_log(s->avctx, AV_LOG_DEBUG, "Reserved");
else if (startcode == 0x1B0)
av_log(s->avctx, AV_LOG_DEBUG, "Visual Object Seq Start");
else if (startcode == 0x1B1)
av_log(s->avctx, AV_LOG_DEBUG, "Visual Object Seq End");
else if (startcode == 0x1B2)
av_log(s->avctx, AV_LOG_DEBUG, "User Data");
else if (startcode == 0x1B3)
av_log(s->avctx, AV_LOG_DEBUG, "Group of VOP start");
else if (startcode == 0x1B4)
av_log(s->avctx, AV_LOG_DEBUG, "Video Session Error");
else if (startcode == 0x1B5)
av_log(s->avctx, AV_LOG_DEBUG, "Visual Object Start");
else if (startcode == 0x1B6)
av_log(s->avctx, AV_LOG_DEBUG, "Video Object Plane start");
else if (startcode == 0x1B7)
av_log(s->avctx, AV_LOG_DEBUG, "slice start");
else if (startcode == 0x1B8)
av_log(s->avctx, AV_LOG_DEBUG, "extension start");
else if (startcode == 0x1B9)
av_log(s->avctx, AV_LOG_DEBUG, "fgs start");
else if (startcode == 0x1BA)
av_log(s->avctx, AV_LOG_DEBUG, "FBA Object start");
else if (startcode == 0x1BB)
av_log(s->avctx, AV_LOG_DEBUG, "FBA Object Plane start");
else if (startcode == 0x1BC)
av_log(s->avctx, AV_LOG_DEBUG, "Mesh Object start");
else if (startcode == 0x1BD)
av_log(s->avctx, AV_LOG_DEBUG, "Mesh Object Plane start");
else if (startcode == 0x1BE)
av_log(s->avctx, AV_LOG_DEBUG, "Still Texture Object start");
else if (startcode == 0x1BF)
av_log(s->avctx, AV_LOG_DEBUG, "Texture Spatial Layer start");
else if (startcode == 0x1C0)
av_log(s->avctx, AV_LOG_DEBUG, "Texture SNR Layer start");
else if (startcode == 0x1C1)
av_log(s->avctx, AV_LOG_DEBUG, "Texture Tile start");
else if (startcode == 0x1C2)
av_log(s->avctx, AV_LOG_DEBUG, "Texture Shape Layer start");
else if (startcode == 0x1C3)
av_log(s->avctx, AV_LOG_DEBUG, "stuffing start");
else if (startcode <= 0x1C5)
av_log(s->avctx, AV_LOG_DEBUG, "reserved");
else if (startcode <= 0x1FF)
av_log(s->avctx, AV_LOG_DEBUG, "System start");
av_log(s->avctx, AV_LOG_DEBUG, " at %d\n", get_bits_count(gb));
}
if (startcode >= 0x120 && startcode <= 0x12F) {
if (vol) {
av_log(s->avctx, AV_LOG_WARNING, "Ignoring multiple VOL headers\n");
continue;
}
vol++;
if ((ret = decode_vol_header(ctx, gb)) < 0)
return ret;
} else if (startcode == USER_DATA_STARTCODE) {
decode_user_data(ctx, gb);
} else if (startcode == GOP_STARTCODE) {
mpeg4_decode_gop_header(s, gb);
} else if (startcode == VOS_STARTCODE) {
mpeg4_decode_profile_level(s, gb);
if (s->avctx->profile == FF_PROFILE_MPEG4_SIMPLE_STUDIO &&
(s->avctx->level > 0 && s->avctx->level < 9)) {
s->studio_profile = 1;
next_start_code_studio(gb);
extension_and_user_data(s, gb, 0);
}
} else if (startcode == VISUAL_OBJ_STARTCODE) {
if (s->studio_profile) {
if ((ret = decode_studiovisualobject(ctx, gb)) < 0)
return ret;
} else
mpeg4_decode_visual_object(s, gb);
} else if (startcode == VOP_STARTCODE) {
break;
}
align_get_bits(gb);
startcode = 0xff;
}
end:
if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
s->avctx->has_b_frames = !s->low_delay;
if (s->studio_profile) {
if (!s->avctx->bits_per_raw_sample) {
av_log(s->avctx, AV_LOG_ERROR, "Missing VOL header\n");
return AVERROR_INVALIDDATA;
}
return decode_studio_vop_header(ctx, gb);
} else
return decode_vop_header(ctx, gb);
}
|
C
|
FFmpeg
| 1 |
CVE-2015-8543
|
https://www.cvedetails.com/cve/CVE-2015-8543/
| null |
https://github.com/torvalds/linux/commit/79462ad02e861803b3840cc782248c7359451cd9
|
79462ad02e861803b3840cc782248c7359451cd9
|
net: add validation for the socket syscall protocol argument
郭永刚 reported that one could simply crash the kernel as root by
using a simple program:
int socket_fd;
struct sockaddr_in addr;
addr.sin_port = 0;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_family = 10;
socket_fd = socket(10,3,0x40000000);
connect(socket_fd , &addr,16);
AF_INET, AF_INET6 sockets actually only support 8-bit protocol
identifiers. inet_sock's skc_protocol field thus is sized accordingly,
thus larger protocol identifiers simply cut off the higher bits and
store a zero in the protocol fields.
This could lead to e.g. NULL function pointer because as a result of
the cut off inet_num is zero and we call down to inet_autobind, which
is NULL for raw sockets.
kernel: Call Trace:
kernel: [<ffffffff816db90e>] ? inet_autobind+0x2e/0x70
kernel: [<ffffffff816db9a4>] inet_dgram_connect+0x54/0x80
kernel: [<ffffffff81645069>] SYSC_connect+0xd9/0x110
kernel: [<ffffffff810ac51b>] ? ptrace_notify+0x5b/0x80
kernel: [<ffffffff810236d8>] ? syscall_trace_enter_phase2+0x108/0x200
kernel: [<ffffffff81645e0e>] SyS_connect+0xe/0x10
kernel: [<ffffffff81779515>] tracesys_phase2+0x84/0x89
I found no particular commit which introduced this problem.
CVE: CVE-2015-8543
Cc: Cong Wang <[email protected]>
Reported-by: 郭永刚 <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int dn_data_ready(struct sock *sk, struct sk_buff_head *q, int flags, int target)
{
struct sk_buff *skb;
int len = 0;
if (flags & MSG_OOB)
return !skb_queue_empty(q) ? 1 : 0;
skb_queue_walk(q, skb) {
struct dn_skb_cb *cb = DN_SKB_CB(skb);
len += skb->len;
if (cb->nsp_flags & 0x40) {
/* SOCK_SEQPACKET reads to EOM */
if (sk->sk_type == SOCK_SEQPACKET)
return 1;
/* so does SOCK_STREAM unless WAITALL is specified */
if (!(flags & MSG_WAITALL))
return 1;
}
/* minimum data length for read exceeded */
if (len >= target)
return 1;
}
return 0;
}
|
static int dn_data_ready(struct sock *sk, struct sk_buff_head *q, int flags, int target)
{
struct sk_buff *skb;
int len = 0;
if (flags & MSG_OOB)
return !skb_queue_empty(q) ? 1 : 0;
skb_queue_walk(q, skb) {
struct dn_skb_cb *cb = DN_SKB_CB(skb);
len += skb->len;
if (cb->nsp_flags & 0x40) {
/* SOCK_SEQPACKET reads to EOM */
if (sk->sk_type == SOCK_SEQPACKET)
return 1;
/* so does SOCK_STREAM unless WAITALL is specified */
if (!(flags & MSG_WAITALL))
return 1;
}
/* minimum data length for read exceeded */
if (len >= target)
return 1;
}
return 0;
}
|
C
|
linux
| 0 |
CVE-2013-0895
|
https://www.cvedetails.com/cve/CVE-2013-0895/
|
CWE-22
|
https://github.com/chromium/chromium/commit/23803a58e481e464a787e4b2c461af9e62f03905
|
23803a58e481e464a787e4b2c461af9e62f03905
|
Fix creating target paths in file_util_posix CopyDirectory.
BUG=167840
Review URL: https://chromiumcodereview.appspot.com/11773018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176659 0039d316-1c4b-4281-b951-d872f2087c98
|
bool CreateTemporaryFile(FilePath* path) {
base::ThreadRestrictions::AssertIOAllowed(); // For call to close().
FilePath directory;
if (!GetTempDir(&directory))
return false;
int fd = CreateAndOpenFdForTemporaryFile(directory, path);
if (fd < 0)
return false;
ignore_result(HANDLE_EINTR(close(fd)));
return true;
}
|
bool CreateTemporaryFile(FilePath* path) {
base::ThreadRestrictions::AssertIOAllowed(); // For call to close().
FilePath directory;
if (!GetTempDir(&directory))
return false;
int fd = CreateAndOpenFdForTemporaryFile(directory, path);
if (fd < 0)
return false;
ignore_result(HANDLE_EINTR(close(fd)));
return true;
}
|
C
|
Chrome
| 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
|
void RunInvTxfm(const int16_t *out, uint8_t *dst, int stride) {
void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) {
inv_txfm_(out, dst, stride, tx_type_);
}
|
void RunInvTxfm(const int16_t *out, uint8_t *dst, int stride) {
inv_txfm_(out, dst, stride, tx_type_);
}
|
C
|
Android
| 1 |
CVE-2012-2895
|
https://www.cvedetails.com/cve/CVE-2012-2895/
|
CWE-119
|
https://github.com/chromium/chromium/commit/16dcd30c215801941d9890859fd79a234128fc3e
|
16dcd30c215801941d9890859fd79a234128fc3e
|
Refactors to simplify rename pathway in DownloadFileManager.
This is https://chromiumcodereview.appspot.com/10668004 / r144817 (reverted
due to CrOS failure) with the completion logic moved to after the
auto-opening. The tests that test the auto-opening (for web store install)
were waiting for download completion to check install, and hence were
failing when completion was moved earlier.
Doing this right would probably require another state (OPENED).
BUG=123998
BUG-134930
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10701040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145157 0039d316-1c4b-4281-b951-d872f2087c98
|
virtual ~MockDownloadFileFactory() {}
|
virtual ~MockDownloadFileFactory() {}
|
C
|
Chrome
| 0 |
CVE-2015-8785
|
https://www.cvedetails.com/cve/CVE-2015-8785/
|
CWE-399
|
https://github.com/torvalds/linux/commit/3ca8138f014a913f98e6ef40e939868e1e9ea876
|
3ca8138f014a913f98e6ef40e939868e1e9ea876
|
fuse: break infinite loop in fuse_fill_write_pages()
I got a report about unkillable task eating CPU. Further
investigation shows, that the problem is in the fuse_fill_write_pages()
function. If iov's first segment has zero length, we get an infinite
loop, because we never reach iov_iter_advance() call.
Fix this by calling iov_iter_advance() before repeating an attempt to
copy data from userspace.
A similar problem is described in 124d3b7041f ("fix writev regression:
pan hanging unkillable and un-straceable"). If zero-length segmend
is followed by segment with invalid address,
iov_iter_fault_in_readable() checks only first segment (zero-length),
iov_iter_copy_from_user_atomic() skips it, fails at second and
returns zero -> goto again without skipping zero-length segment.
Patch calls iov_iter_advance() before goto again: we'll skip zero-length
segment at second iteraction and iov_iter_fault_in_readable() will detect
invalid address.
Special thanks to Konstantin Khlebnikov, who helped a lot with the commit
description.
Cc: Andrew Morton <[email protected]>
Cc: Maxim Patlasov <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Signed-off-by: Roman Gushchin <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
Fixes: ea9b9907b82a ("fuse: implement perform_write")
Cc: <[email protected]>
|
void fuse_sync_release(struct fuse_file *ff, int flags)
{
WARN_ON(atomic_read(&ff->count) > 1);
fuse_prepare_release(ff, flags, FUSE_RELEASE);
__set_bit(FR_FORCE, &ff->reserved_req->flags);
__clear_bit(FR_BACKGROUND, &ff->reserved_req->flags);
fuse_request_send(ff->fc, ff->reserved_req);
fuse_put_request(ff->fc, ff->reserved_req);
kfree(ff);
}
|
void fuse_sync_release(struct fuse_file *ff, int flags)
{
WARN_ON(atomic_read(&ff->count) > 1);
fuse_prepare_release(ff, flags, FUSE_RELEASE);
__set_bit(FR_FORCE, &ff->reserved_req->flags);
__clear_bit(FR_BACKGROUND, &ff->reserved_req->flags);
fuse_request_send(ff->fc, ff->reserved_req);
fuse_put_request(ff->fc, ff->reserved_req);
kfree(ff);
}
|
C
|
linux
| 0 |
CVE-2016-5194
| null | null |
https://github.com/chromium/chromium/commit/d4e0a7273cd8d7a9ee667ad5b5c8aad0f5f59251
|
d4e0a7273cd8d7a9ee667ad5b5c8aad0f5f59251
|
Clear Shill stub config in offline file manager tests
The Shill stub client fakes ethernet and wifi connections during
testing. Clear its config during offline tests to simulate a lack of
network connectivity.
As a side effect, fileManagerPrivate.getDriveConnectionState will no
longer need to be stubbed out, as it will now think the device is
offline and return the appropriate result.
Bug: 925272
Change-Id: Idd6cb44325cfde4991d3b1e64185a28e8655c733
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578149
Commit-Queue: Austin Tankiang <[email protected]>
Reviewed-by: Sam McNally <[email protected]>
Cr-Commit-Position: refs/heads/master@{#654782}
|
void CreateFile(const std::string& source_file_name,
const std::string& parent_id,
const std::string& target_name,
const std::string& mime_type,
bool shared_with_me,
const base::Time& modification_time,
const google_apis::FileResourceCapabilities& capabilities) {
google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR;
std::string content_data;
if (!source_file_name.empty()) {
base::FilePath source_path =
TestVolume::GetTestDataFilePath(source_file_name);
ASSERT_TRUE(base::ReadFileToString(source_path, &content_data));
}
std::unique_ptr<google_apis::FileResource> entry;
fake_drive_service_->AddNewFile(
mime_type, content_data, parent_id, target_name, shared_with_me,
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
base::RunLoop().RunUntilIdle();
ASSERT_EQ(google_apis::HTTP_CREATED, error);
ASSERT_TRUE(entry);
fake_drive_service_->SetLastModifiedTime(
entry->file_id(), modification_time,
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
base::RunLoop().RunUntilIdle();
ASSERT_EQ(google_apis::HTTP_SUCCESS, error);
ASSERT_TRUE(entry);
fake_drive_service_->SetFileCapabilities(
entry->file_id(), capabilities,
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
base::RunLoop().RunUntilIdle();
ASSERT_TRUE(error == google_apis::HTTP_SUCCESS);
ASSERT_TRUE(entry);
}
|
void CreateFile(const std::string& source_file_name,
const std::string& parent_id,
const std::string& target_name,
const std::string& mime_type,
bool shared_with_me,
const base::Time& modification_time,
const google_apis::FileResourceCapabilities& capabilities) {
google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR;
std::string content_data;
if (!source_file_name.empty()) {
base::FilePath source_path =
TestVolume::GetTestDataFilePath(source_file_name);
ASSERT_TRUE(base::ReadFileToString(source_path, &content_data));
}
std::unique_ptr<google_apis::FileResource> entry;
fake_drive_service_->AddNewFile(
mime_type, content_data, parent_id, target_name, shared_with_me,
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
base::RunLoop().RunUntilIdle();
ASSERT_EQ(google_apis::HTTP_CREATED, error);
ASSERT_TRUE(entry);
fake_drive_service_->SetLastModifiedTime(
entry->file_id(), modification_time,
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
base::RunLoop().RunUntilIdle();
ASSERT_EQ(google_apis::HTTP_SUCCESS, error);
ASSERT_TRUE(entry);
fake_drive_service_->SetFileCapabilities(
entry->file_id(), capabilities,
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
base::RunLoop().RunUntilIdle();
ASSERT_TRUE(error == google_apis::HTTP_SUCCESS);
ASSERT_TRUE(entry);
}
|
C
|
Chrome
| 0 |
CVE-2015-2698
|
https://www.cvedetails.com/cve/CVE-2015-2698/
|
CWE-119
|
https://github.com/krb5/krb5/commit/3db8dfec1ef50ddd78d6ba9503185995876a39fd
|
3db8dfec1ef50ddd78d6ba9503185995876a39fd
|
Fix IAKERB context export/import [CVE-2015-2698]
The patches for CVE-2015-2696 contained a regression in the newly
added IAKERB iakerb_gss_export_sec_context() function, which could
cause it to corrupt memory. Fix the regression by properly
dereferencing the context_handle pointer before casting it.
Also, the patches did not implement an IAKERB gss_import_sec_context()
function, under the erroneous belief that an exported IAKERB context
would be tagged as a krb5 context. Implement it now to allow IAKERB
contexts to be successfully exported and imported after establishment.
CVE-2015-2698:
In any MIT krb5 release with the patches for CVE-2015-2696 applied, an
application which calls gss_export_sec_context() may experience memory
corruption if the context was established using the IAKERB mechanism.
Historically, some vulnerabilities of this nature can be translated
into remote code execution, though the necessary exploits must be
tailored to the individual application and are usually quite
complicated.
CVSSv2 Vector: AV:N/AC:H/Au:S/C:C/I:C/A:C/E:POC/RL:OF/RC:C
ticket: 8273 (new)
target_version: 1.14
tags: pullup
|
iakerb_gss_unwrap(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer, int *conf_state,
gss_qop_t *qop_state)
{
iakerb_ctx_id_t ctx = (iakerb_ctx_id_t)context_handle;
if (ctx->gssc == GSS_C_NO_CONTEXT)
return GSS_S_NO_CONTEXT;
return krb5_gss_unwrap(minor_status, ctx->gssc, input_message_buffer,
output_message_buffer, conf_state, qop_state);
}
|
iakerb_gss_unwrap(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
gss_buffer_t input_message_buffer,
gss_buffer_t output_message_buffer, int *conf_state,
gss_qop_t *qop_state)
{
iakerb_ctx_id_t ctx = (iakerb_ctx_id_t)context_handle;
if (ctx->gssc == GSS_C_NO_CONTEXT)
return GSS_S_NO_CONTEXT;
return krb5_gss_unwrap(minor_status, ctx->gssc, input_message_buffer,
output_message_buffer, conf_state, qop_state);
}
|
C
|
krb5
| 0 |
CVE-2017-9202
|
https://www.cvedetails.com/cve/CVE-2017-9202/
|
CWE-369
|
https://github.com/jsummers/imageworsener/commit/dc49c807926b96e503bd7c0dec35119eecd6c6fe
|
dc49c807926b96e503bd7c0dec35119eecd6c6fe
|
Double-check that the input image's density is valid
Fixes a bug that could result in division by zero, at least for a JPEG
source image.
Fixes issues #19, #20
|
IW_IMPL(void) iw_warning(struct iw_context *ctx, const char *s)
{
char buf[IW_MSG_MAX];
if(!ctx->warning_fn) return;
iw_translate(ctx,IW_TRANSLATEFLAG_WARNINGMSG,buf,sizeof(buf),s);
iw_warning_internal(ctx,buf);
}
|
IW_IMPL(void) iw_warning(struct iw_context *ctx, const char *s)
{
char buf[IW_MSG_MAX];
if(!ctx->warning_fn) return;
iw_translate(ctx,IW_TRANSLATEFLAG_WARNINGMSG,buf,sizeof(buf),s);
iw_warning_internal(ctx,buf);
}
|
C
|
imageworsener
| 0 |
CVE-2014-4502
|
https://www.cvedetails.com/cve/CVE-2014-4502/
|
CWE-119
|
https://github.com/ckolivas/cgminer/commit/e1c5050734123973b99d181c45e74b2cbb00272e
|
e1c5050734123973b99d181c45e74b2cbb00272e
|
Do some random sanity checking for stratum message parsing
|
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
{
int nibble1, nibble2;
unsigned char idx;
bool ret = false;
while (*hexstr && len) {
if (unlikely(!hexstr[1])) {
applog(LOG_ERR, "hex2bin str truncated");
return ret;
}
idx = *hexstr++;
nibble1 = hex2bin_tbl[idx];
idx = *hexstr++;
nibble2 = hex2bin_tbl[idx];
if (unlikely((nibble1 < 0) || (nibble2 < 0))) {
applog(LOG_ERR, "hex2bin scan failed");
return ret;
}
*p++ = (((unsigned char)nibble1) << 4) | ((unsigned char)nibble2);
--len;
}
if (likely(len == 0 && *hexstr == 0))
ret = true;
return ret;
}
|
bool hex2bin(unsigned char *p, const char *hexstr, size_t len)
{
int nibble1, nibble2;
unsigned char idx;
bool ret = false;
while (*hexstr && len) {
if (unlikely(!hexstr[1])) {
applog(LOG_ERR, "hex2bin str truncated");
return ret;
}
idx = *hexstr++;
nibble1 = hex2bin_tbl[idx];
idx = *hexstr++;
nibble2 = hex2bin_tbl[idx];
if (unlikely((nibble1 < 0) || (nibble2 < 0))) {
applog(LOG_ERR, "hex2bin scan failed");
return ret;
}
*p++ = (((unsigned char)nibble1) << 4) | ((unsigned char)nibble2);
--len;
}
if (likely(len == 0 && *hexstr == 0))
ret = true;
return ret;
}
|
C
|
cgminer
| 0 |
CVE-2015-8575
|
https://www.cvedetails.com/cve/CVE-2015-8575/
|
CWE-200
|
https://github.com/torvalds/linux/commit/5233252fce714053f0151680933571a2da9cbfb4
|
5233252fce714053f0151680933571a2da9cbfb4
|
bluetooth: Validate socket address length in sco_sock_bind().
Signed-off-by: David S. Miller <[email protected]>
|
static int sco_sock_getsockopt_old(struct socket *sock, int optname,
char __user *optval, int __user *optlen)
{
struct sock *sk = sock->sk;
struct sco_options opts;
struct sco_conninfo cinfo;
int len, err = 0;
BT_DBG("sk %p", sk);
if (get_user(len, optlen))
return -EFAULT;
lock_sock(sk);
switch (optname) {
case SCO_OPTIONS:
if (sk->sk_state != BT_CONNECTED &&
!(sk->sk_state == BT_CONNECT2 &&
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))) {
err = -ENOTCONN;
break;
}
opts.mtu = sco_pi(sk)->conn->mtu;
BT_DBG("mtu %d", opts.mtu);
len = min_t(unsigned int, len, sizeof(opts));
if (copy_to_user(optval, (char *)&opts, len))
err = -EFAULT;
break;
case SCO_CONNINFO:
if (sk->sk_state != BT_CONNECTED &&
!(sk->sk_state == BT_CONNECT2 &&
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))) {
err = -ENOTCONN;
break;
}
memset(&cinfo, 0, sizeof(cinfo));
cinfo.hci_handle = sco_pi(sk)->conn->hcon->handle;
memcpy(cinfo.dev_class, sco_pi(sk)->conn->hcon->dev_class, 3);
len = min_t(unsigned int, len, sizeof(cinfo));
if (copy_to_user(optval, (char *)&cinfo, len))
err = -EFAULT;
break;
default:
err = -ENOPROTOOPT;
break;
}
release_sock(sk);
return err;
}
|
static int sco_sock_getsockopt_old(struct socket *sock, int optname,
char __user *optval, int __user *optlen)
{
struct sock *sk = sock->sk;
struct sco_options opts;
struct sco_conninfo cinfo;
int len, err = 0;
BT_DBG("sk %p", sk);
if (get_user(len, optlen))
return -EFAULT;
lock_sock(sk);
switch (optname) {
case SCO_OPTIONS:
if (sk->sk_state != BT_CONNECTED &&
!(sk->sk_state == BT_CONNECT2 &&
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))) {
err = -ENOTCONN;
break;
}
opts.mtu = sco_pi(sk)->conn->mtu;
BT_DBG("mtu %d", opts.mtu);
len = min_t(unsigned int, len, sizeof(opts));
if (copy_to_user(optval, (char *)&opts, len))
err = -EFAULT;
break;
case SCO_CONNINFO:
if (sk->sk_state != BT_CONNECTED &&
!(sk->sk_state == BT_CONNECT2 &&
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))) {
err = -ENOTCONN;
break;
}
memset(&cinfo, 0, sizeof(cinfo));
cinfo.hci_handle = sco_pi(sk)->conn->hcon->handle;
memcpy(cinfo.dev_class, sco_pi(sk)->conn->hcon->dev_class, 3);
len = min_t(unsigned int, len, sizeof(cinfo));
if (copy_to_user(optval, (char *)&cinfo, len))
err = -EFAULT;
break;
default:
err = -ENOPROTOOPT;
break;
}
release_sock(sk);
return err;
}
|
C
|
linux
| 0 |
CVE-2016-2417
|
https://www.cvedetails.com/cve/CVE-2016-2417/
|
CWE-264
|
https://android.googlesource.com/platform/frameworks/av/+/1171e7c047bf79e7c93342bb6a812c9edd86aa84
|
1171e7c047bf79e7c93342bb6a812c9edd86aa84
|
Clear allocation to avoid info leak
Bug: 26914474
Change-Id: Ie1a86e86d78058d041149fe599a4996e7f8185cf
|
status_t BnOMX::onTransact(
uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags) {
switch (code) {
case LIVES_LOCALLY:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
pid_t pid = (pid_t)data.readInt32();
reply->writeInt32(livesLocally(node, pid));
return OK;
}
case LIST_NODES:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
List<ComponentInfo> list;
listNodes(&list);
reply->writeInt32(list.size());
for (List<ComponentInfo>::iterator it = list.begin();
it != list.end(); ++it) {
ComponentInfo &cur = *it;
reply->writeString8(cur.mName);
reply->writeInt32(cur.mRoles.size());
for (List<String8>::iterator role_it = cur.mRoles.begin();
role_it != cur.mRoles.end(); ++role_it) {
reply->writeString8(*role_it);
}
}
return NO_ERROR;
}
case ALLOCATE_NODE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
const char *name = data.readCString();
sp<IOMXObserver> observer =
interface_cast<IOMXObserver>(data.readStrongBinder());
node_id node;
status_t err = allocateNode(name, observer, &node);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)node);
}
return NO_ERROR;
}
case FREE_NODE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
reply->writeInt32(freeNode(node));
return NO_ERROR;
}
case SEND_COMMAND:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_COMMANDTYPE cmd =
static_cast<OMX_COMMANDTYPE>(data.readInt32());
OMX_S32 param = data.readInt32();
reply->writeInt32(sendCommand(node, cmd, param));
return NO_ERROR;
}
case GET_PARAMETER:
case SET_PARAMETER:
case GET_CONFIG:
case SET_CONFIG:
case SET_INTERNAL_OPTION:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_INDEXTYPE index = static_cast<OMX_INDEXTYPE>(data.readInt32());
size_t size = data.readInt64();
status_t err = NO_MEMORY;
void *params = calloc(size, 1);
if (params) {
err = data.read(params, size);
if (err != OK) {
android_errorWriteLog(0x534e4554, "26914474");
} else {
switch (code) {
case GET_PARAMETER:
err = getParameter(node, index, params, size);
break;
case SET_PARAMETER:
err = setParameter(node, index, params, size);
break;
case GET_CONFIG:
err = getConfig(node, index, params, size);
break;
case SET_CONFIG:
err = setConfig(node, index, params, size);
break;
case SET_INTERNAL_OPTION:
{
InternalOptionType type =
(InternalOptionType)data.readInt32();
err = setInternalOption(node, index, type, params, size);
break;
}
default:
TRESPASS();
}
}
}
reply->writeInt32(err);
if ((code == GET_PARAMETER || code == GET_CONFIG) && err == OK) {
reply->write(params, size);
}
free(params);
params = NULL;
return NO_ERROR;
}
case GET_STATE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_STATETYPE state = OMX_StateInvalid;
status_t err = getState(node, &state);
reply->writeInt32(state);
reply->writeInt32(err);
return NO_ERROR;
}
case ENABLE_GRAPHIC_BUFFERS:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_BOOL enable = (OMX_BOOL)data.readInt32();
status_t err = enableGraphicBuffers(node, port_index, enable);
reply->writeInt32(err);
return NO_ERROR;
}
case GET_GRAPHIC_BUFFER_USAGE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_U32 usage = 0;
status_t err = getGraphicBufferUsage(node, port_index, &usage);
reply->writeInt32(err);
reply->writeInt32(usage);
return NO_ERROR;
}
case USE_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<IMemory> params =
interface_cast<IMemory>(data.readStrongBinder());
buffer_id buffer;
status_t err = useBuffer(node, port_index, params, &buffer);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)buffer);
}
return NO_ERROR;
}
case USE_GRAPHIC_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<GraphicBuffer> graphicBuffer = new GraphicBuffer();
data.read(*graphicBuffer);
buffer_id buffer;
status_t err = useGraphicBuffer(
node, port_index, graphicBuffer, &buffer);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)buffer);
}
return NO_ERROR;
}
case UPDATE_GRAPHIC_BUFFER_IN_META:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<GraphicBuffer> graphicBuffer = new GraphicBuffer();
data.read(*graphicBuffer);
buffer_id buffer = (buffer_id)data.readInt32();
status_t err = updateGraphicBufferInMeta(
node, port_index, graphicBuffer, buffer);
reply->writeInt32(err);
return NO_ERROR;
}
case CREATE_INPUT_SURFACE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<IGraphicBufferProducer> bufferProducer;
status_t err = createInputSurface(node, port_index,
&bufferProducer);
reply->writeInt32(err);
if (err == OK) {
reply->writeStrongBinder(bufferProducer->asBinder());
}
return NO_ERROR;
}
case SIGNAL_END_OF_INPUT_STREAM:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
status_t err = signalEndOfInputStream(node);
reply->writeInt32(err);
return NO_ERROR;
}
case STORE_META_DATA_IN_BUFFERS:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_BOOL enable = (OMX_BOOL)data.readInt32();
status_t err = storeMetaDataInBuffers(node, port_index, enable);
reply->writeInt32(err);
return NO_ERROR;
}
case PREPARE_FOR_ADAPTIVE_PLAYBACK:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_BOOL enable = (OMX_BOOL)data.readInt32();
OMX_U32 max_width = data.readInt32();
OMX_U32 max_height = data.readInt32();
status_t err = prepareForAdaptivePlayback(
node, port_index, enable, max_width, max_height);
reply->writeInt32(err);
return NO_ERROR;
}
case CONFIGURE_VIDEO_TUNNEL_MODE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_BOOL tunneled = (OMX_BOOL)data.readInt32();
OMX_U32 audio_hw_sync = data.readInt32();
native_handle_t *sideband_handle = NULL;
status_t err = configureVideoTunnelMode(
node, port_index, tunneled, audio_hw_sync, &sideband_handle);
reply->writeInt32(err);
if(err == OK){
reply->writeNativeHandle(sideband_handle);
}
return NO_ERROR;
}
case ALLOC_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
if (!isSecure(node) || port_index != 0 /* kPortIndexInput */) {
ALOGE("b/24310423");
reply->writeInt32(INVALID_OPERATION);
return NO_ERROR;
}
size_t size = data.readInt64();
buffer_id buffer;
void *buffer_data;
status_t err = allocateBuffer(
node, port_index, size, &buffer, &buffer_data);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)buffer);
reply->writeInt64((uintptr_t)buffer_data);
}
return NO_ERROR;
}
case ALLOC_BUFFER_WITH_BACKUP:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<IMemory> params =
interface_cast<IMemory>(data.readStrongBinder());
buffer_id buffer;
status_t err = allocateBufferWithBackup(
node, port_index, params, &buffer);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)buffer);
}
return NO_ERROR;
}
case FREE_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
buffer_id buffer = (buffer_id)data.readInt32();
reply->writeInt32(freeBuffer(node, port_index, buffer));
return NO_ERROR;
}
case FILL_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
buffer_id buffer = (buffer_id)data.readInt32();
reply->writeInt32(fillBuffer(node, buffer));
return NO_ERROR;
}
case EMPTY_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
buffer_id buffer = (buffer_id)data.readInt32();
OMX_U32 range_offset = data.readInt32();
OMX_U32 range_length = data.readInt32();
OMX_U32 flags = data.readInt32();
OMX_TICKS timestamp = data.readInt64();
reply->writeInt32(
emptyBuffer(
node, buffer, range_offset, range_length,
flags, timestamp));
return NO_ERROR;
}
case GET_EXTENSION_INDEX:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
const char *parameter_name = data.readCString();
OMX_INDEXTYPE index;
status_t err = getExtensionIndex(node, parameter_name, &index);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32(index);
}
return OK;
}
default:
return BBinder::onTransact(code, data, reply, flags);
}
}
|
status_t BnOMX::onTransact(
uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags) {
switch (code) {
case LIVES_LOCALLY:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
pid_t pid = (pid_t)data.readInt32();
reply->writeInt32(livesLocally(node, pid));
return OK;
}
case LIST_NODES:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
List<ComponentInfo> list;
listNodes(&list);
reply->writeInt32(list.size());
for (List<ComponentInfo>::iterator it = list.begin();
it != list.end(); ++it) {
ComponentInfo &cur = *it;
reply->writeString8(cur.mName);
reply->writeInt32(cur.mRoles.size());
for (List<String8>::iterator role_it = cur.mRoles.begin();
role_it != cur.mRoles.end(); ++role_it) {
reply->writeString8(*role_it);
}
}
return NO_ERROR;
}
case ALLOCATE_NODE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
const char *name = data.readCString();
sp<IOMXObserver> observer =
interface_cast<IOMXObserver>(data.readStrongBinder());
node_id node;
status_t err = allocateNode(name, observer, &node);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)node);
}
return NO_ERROR;
}
case FREE_NODE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
reply->writeInt32(freeNode(node));
return NO_ERROR;
}
case SEND_COMMAND:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_COMMANDTYPE cmd =
static_cast<OMX_COMMANDTYPE>(data.readInt32());
OMX_S32 param = data.readInt32();
reply->writeInt32(sendCommand(node, cmd, param));
return NO_ERROR;
}
case GET_PARAMETER:
case SET_PARAMETER:
case GET_CONFIG:
case SET_CONFIG:
case SET_INTERNAL_OPTION:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_INDEXTYPE index = static_cast<OMX_INDEXTYPE>(data.readInt32());
size_t size = data.readInt64();
void *params = malloc(size);
data.read(params, size);
status_t err;
switch (code) {
case GET_PARAMETER:
err = getParameter(node, index, params, size);
break;
case SET_PARAMETER:
err = setParameter(node, index, params, size);
break;
case GET_CONFIG:
err = getConfig(node, index, params, size);
break;
case SET_CONFIG:
err = setConfig(node, index, params, size);
break;
case SET_INTERNAL_OPTION:
{
InternalOptionType type =
(InternalOptionType)data.readInt32();
err = setInternalOption(node, index, type, params, size);
break;
}
default:
TRESPASS();
}
reply->writeInt32(err);
if ((code == GET_PARAMETER || code == GET_CONFIG) && err == OK) {
reply->write(params, size);
}
free(params);
params = NULL;
return NO_ERROR;
}
case GET_STATE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_STATETYPE state = OMX_StateInvalid;
status_t err = getState(node, &state);
reply->writeInt32(state);
reply->writeInt32(err);
return NO_ERROR;
}
case ENABLE_GRAPHIC_BUFFERS:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_BOOL enable = (OMX_BOOL)data.readInt32();
status_t err = enableGraphicBuffers(node, port_index, enable);
reply->writeInt32(err);
return NO_ERROR;
}
case GET_GRAPHIC_BUFFER_USAGE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_U32 usage = 0;
status_t err = getGraphicBufferUsage(node, port_index, &usage);
reply->writeInt32(err);
reply->writeInt32(usage);
return NO_ERROR;
}
case USE_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<IMemory> params =
interface_cast<IMemory>(data.readStrongBinder());
buffer_id buffer;
status_t err = useBuffer(node, port_index, params, &buffer);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)buffer);
}
return NO_ERROR;
}
case USE_GRAPHIC_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<GraphicBuffer> graphicBuffer = new GraphicBuffer();
data.read(*graphicBuffer);
buffer_id buffer;
status_t err = useGraphicBuffer(
node, port_index, graphicBuffer, &buffer);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)buffer);
}
return NO_ERROR;
}
case UPDATE_GRAPHIC_BUFFER_IN_META:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<GraphicBuffer> graphicBuffer = new GraphicBuffer();
data.read(*graphicBuffer);
buffer_id buffer = (buffer_id)data.readInt32();
status_t err = updateGraphicBufferInMeta(
node, port_index, graphicBuffer, buffer);
reply->writeInt32(err);
return NO_ERROR;
}
case CREATE_INPUT_SURFACE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<IGraphicBufferProducer> bufferProducer;
status_t err = createInputSurface(node, port_index,
&bufferProducer);
reply->writeInt32(err);
if (err == OK) {
reply->writeStrongBinder(bufferProducer->asBinder());
}
return NO_ERROR;
}
case SIGNAL_END_OF_INPUT_STREAM:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
status_t err = signalEndOfInputStream(node);
reply->writeInt32(err);
return NO_ERROR;
}
case STORE_META_DATA_IN_BUFFERS:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_BOOL enable = (OMX_BOOL)data.readInt32();
status_t err = storeMetaDataInBuffers(node, port_index, enable);
reply->writeInt32(err);
return NO_ERROR;
}
case PREPARE_FOR_ADAPTIVE_PLAYBACK:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_BOOL enable = (OMX_BOOL)data.readInt32();
OMX_U32 max_width = data.readInt32();
OMX_U32 max_height = data.readInt32();
status_t err = prepareForAdaptivePlayback(
node, port_index, enable, max_width, max_height);
reply->writeInt32(err);
return NO_ERROR;
}
case CONFIGURE_VIDEO_TUNNEL_MODE:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
OMX_BOOL tunneled = (OMX_BOOL)data.readInt32();
OMX_U32 audio_hw_sync = data.readInt32();
native_handle_t *sideband_handle = NULL;
status_t err = configureVideoTunnelMode(
node, port_index, tunneled, audio_hw_sync, &sideband_handle);
reply->writeInt32(err);
if(err == OK){
reply->writeNativeHandle(sideband_handle);
}
return NO_ERROR;
}
case ALLOC_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
if (!isSecure(node) || port_index != 0 /* kPortIndexInput */) {
ALOGE("b/24310423");
reply->writeInt32(INVALID_OPERATION);
return NO_ERROR;
}
size_t size = data.readInt64();
buffer_id buffer;
void *buffer_data;
status_t err = allocateBuffer(
node, port_index, size, &buffer, &buffer_data);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)buffer);
reply->writeInt64((uintptr_t)buffer_data);
}
return NO_ERROR;
}
case ALLOC_BUFFER_WITH_BACKUP:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
sp<IMemory> params =
interface_cast<IMemory>(data.readStrongBinder());
buffer_id buffer;
status_t err = allocateBufferWithBackup(
node, port_index, params, &buffer);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32((int32_t)buffer);
}
return NO_ERROR;
}
case FREE_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
OMX_U32 port_index = data.readInt32();
buffer_id buffer = (buffer_id)data.readInt32();
reply->writeInt32(freeBuffer(node, port_index, buffer));
return NO_ERROR;
}
case FILL_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
buffer_id buffer = (buffer_id)data.readInt32();
reply->writeInt32(fillBuffer(node, buffer));
return NO_ERROR;
}
case EMPTY_BUFFER:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
buffer_id buffer = (buffer_id)data.readInt32();
OMX_U32 range_offset = data.readInt32();
OMX_U32 range_length = data.readInt32();
OMX_U32 flags = data.readInt32();
OMX_TICKS timestamp = data.readInt64();
reply->writeInt32(
emptyBuffer(
node, buffer, range_offset, range_length,
flags, timestamp));
return NO_ERROR;
}
case GET_EXTENSION_INDEX:
{
CHECK_OMX_INTERFACE(IOMX, data, reply);
node_id node = (node_id)data.readInt32();
const char *parameter_name = data.readCString();
OMX_INDEXTYPE index;
status_t err = getExtensionIndex(node, parameter_name, &index);
reply->writeInt32(err);
if (err == OK) {
reply->writeInt32(index);
}
return OK;
}
default:
return BBinder::onTransact(code, data, reply, flags);
}
}
|
C
|
Android
| 1 |
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}
|
int64_t DataReductionProxySettings::GetTotalHttpContentLengthSaved() {
DCHECK(thread_checker_.CalledOnValidThread());
return data_reduction_proxy_service_->compression_stats()
->GetHttpOriginalContentLength() -
data_reduction_proxy_service_->compression_stats()
->GetHttpReceivedContentLength();
}
|
int64_t DataReductionProxySettings::GetTotalHttpContentLengthSaved() {
DCHECK(thread_checker_.CalledOnValidThread());
return data_reduction_proxy_service_->compression_stats()
->GetHttpOriginalContentLength() -
data_reduction_proxy_service_->compression_stats()
->GetHttpReceivedContentLength();
}
|
C
|
Chrome
| 0 |
CVE-2019-1010239
|
https://www.cvedetails.com/cve/CVE-2019-1010239/
|
CWE-754
|
https://github.com/DaveGamble/cJSON/commit/be749d7efa7c9021da746e685bd6dec79f9dd99b
|
be749d7efa7c9021da746e685bd6dec79f9dd99b
|
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
|
CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean)
{
cJSON *bool_item = cJSON_CreateBool(boolean);
if (add_item_to_object(object, name, bool_item, &global_hooks, false))
{
return bool_item;
}
cJSON_Delete(bool_item);
return NULL;
}
|
CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean)
{
cJSON *bool_item = cJSON_CreateBool(boolean);
if (add_item_to_object(object, name, bool_item, &global_hooks, false))
{
return bool_item;
}
cJSON_Delete(bool_item);
return NULL;
}
|
C
|
cJSON
| 0 |
CVE-2018-20066
|
https://www.cvedetails.com/cve/CVE-2018-20066/
|
CWE-416
|
https://github.com/chromium/chromium/commit/2f0b419df243400f954e11b649f4862a1e0ff367
|
2f0b419df243400f954e11b649f4862a1e0ff367
|
Fix the regression caused by http://crrev.com/c/1288350.
Bug: 900124,856135
Change-Id: Ie11ad406bd1ea383dc2a83cc8661076309154865
Reviewed-on: https://chromium-review.googlesource.com/c/1317010
Reviewed-by: Lan Wei <[email protected]>
Commit-Queue: Shu Chen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#605282}
|
void ImeObserver::OnSurroundingTextChanged(const std::string& component_id,
const std::string& text,
int cursor_pos,
int anchor_pos,
int offset_pos) {
if (extension_id_.empty() ||
!HasListener(input_ime::OnSurroundingTextChanged::kEventName))
return;
input_ime::OnSurroundingTextChanged::SurroundingInfo info;
info.text = text;
info.focus = cursor_pos;
info.anchor = anchor_pos;
info.offset = offset_pos;
std::unique_ptr<base::ListValue> args(
input_ime::OnSurroundingTextChanged::Create(component_id, info));
DispatchEventToExtension(
extensions::events::INPUT_IME_ON_SURROUNDING_TEXT_CHANGED,
input_ime::OnSurroundingTextChanged::kEventName, std::move(args));
}
|
void ImeObserver::OnSurroundingTextChanged(const std::string& component_id,
const std::string& text,
int cursor_pos,
int anchor_pos,
int offset_pos) {
if (extension_id_.empty() ||
!HasListener(input_ime::OnSurroundingTextChanged::kEventName))
return;
input_ime::OnSurroundingTextChanged::SurroundingInfo info;
info.text = text;
info.focus = cursor_pos;
info.anchor = anchor_pos;
info.offset = offset_pos;
std::unique_ptr<base::ListValue> args(
input_ime::OnSurroundingTextChanged::Create(component_id, info));
DispatchEventToExtension(
extensions::events::INPUT_IME_ON_SURROUNDING_TEXT_CHANGED,
input_ime::OnSurroundingTextChanged::kEventName, std::move(args));
}
|
C
|
Chrome
| 0 |
CVE-2016-6787
|
https://www.cvedetails.com/cve/CVE-2016-6787/
|
CWE-264
|
https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b
|
f63a8daa5812afef4f06c962351687e1ff9ccb2b
|
perf: Fix event->ctx locking
There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.
It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.
What I did fail at is sensible runtime checks on the use of
event->ctx, the RCU use makes it very hard.
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
|
static void unaccount_event(struct perf_event *event)
{
if (event->parent)
return;
if (event->attach_state & PERF_ATTACH_TASK)
static_key_slow_dec_deferred(&perf_sched_events);
if (event->attr.mmap || event->attr.mmap_data)
atomic_dec(&nr_mmap_events);
if (event->attr.comm)
atomic_dec(&nr_comm_events);
if (event->attr.task)
atomic_dec(&nr_task_events);
if (event->attr.freq)
atomic_dec(&nr_freq_events);
if (is_cgroup_event(event))
static_key_slow_dec_deferred(&perf_sched_events);
if (has_branch_stack(event))
static_key_slow_dec_deferred(&perf_sched_events);
unaccount_event_cpu(event, event->cpu);
}
|
static void unaccount_event(struct perf_event *event)
{
if (event->parent)
return;
if (event->attach_state & PERF_ATTACH_TASK)
static_key_slow_dec_deferred(&perf_sched_events);
if (event->attr.mmap || event->attr.mmap_data)
atomic_dec(&nr_mmap_events);
if (event->attr.comm)
atomic_dec(&nr_comm_events);
if (event->attr.task)
atomic_dec(&nr_task_events);
if (event->attr.freq)
atomic_dec(&nr_freq_events);
if (is_cgroup_event(event))
static_key_slow_dec_deferred(&perf_sched_events);
if (has_branch_stack(event))
static_key_slow_dec_deferred(&perf_sched_events);
unaccount_event_cpu(event, event->cpu);
}
|
C
|
linux
| 0 |
CVE-2013-3236
|
https://www.cvedetails.com/cve/CVE-2013-3236/
|
CWE-200
|
https://github.com/torvalds/linux/commit/680d04e0ba7e926233e3b9cee59125ce181f66ba
|
680d04e0ba7e926233e3b9cee59125ce181f66ba
|
VSOCK: vmci - fix possible info leak in vmci_transport_dgram_dequeue()
In case we received no data on the call to skb_recv_datagram(), i.e.
skb->data is NULL, vmci_transport_dgram_dequeue() will return with 0
without updating msg_namelen leading to net/socket.c leaking the local,
uninitialized sockaddr_storage variable to userland -- 128 bytes of
kernel stack memory.
Fix this by moving the already existing msg_namelen assignment a few
lines above.
Cc: Andy King <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: George Zhang <[email protected]>
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
vmci_transport_recv_connecting_server(struct sock *listener,
struct sock *pending,
struct vmci_transport_packet *pkt)
{
struct vsock_sock *vpending;
struct vmci_handle handle;
struct vmci_qp *qpair;
bool is_local;
u32 flags;
u32 detach_sub_id;
int err;
int skerr;
vpending = vsock_sk(pending);
detach_sub_id = VMCI_INVALID_ID;
switch (pkt->type) {
case VMCI_TRANSPORT_PACKET_TYPE_OFFER:
if (vmci_handle_is_invalid(pkt->u.handle)) {
vmci_transport_send_reset(pending, pkt);
skerr = EPROTO;
err = -EINVAL;
goto destroy;
}
break;
default:
/* Close and cleanup the connection. */
vmci_transport_send_reset(pending, pkt);
skerr = EPROTO;
err = pkt->type == VMCI_TRANSPORT_PACKET_TYPE_RST ? 0 : -EINVAL;
goto destroy;
}
/* In order to complete the connection we need to attach to the offered
* queue pair and send an attach notification. We also subscribe to the
* detach event so we know when our peer goes away, and we do that
* before attaching so we don't miss an event. If all this succeeds,
* we update our state and wakeup anything waiting in accept() for a
* connection.
*/
/* We don't care about attach since we ensure the other side has
* attached by specifying the ATTACH_ONLY flag below.
*/
err = vmci_event_subscribe(VMCI_EVENT_QP_PEER_DETACH,
vmci_transport_peer_detach_cb,
pending, &detach_sub_id);
if (err < VMCI_SUCCESS) {
vmci_transport_send_reset(pending, pkt);
err = vmci_transport_error_to_vsock_error(err);
skerr = -err;
goto destroy;
}
vmci_trans(vpending)->detach_sub_id = detach_sub_id;
/* Now attach to the queue pair the client created. */
handle = pkt->u.handle;
/* vpending->local_addr always has a context id so we do not need to
* worry about VMADDR_CID_ANY in this case.
*/
is_local =
vpending->remote_addr.svm_cid == vpending->local_addr.svm_cid;
flags = VMCI_QPFLAG_ATTACH_ONLY;
flags |= is_local ? VMCI_QPFLAG_LOCAL : 0;
err = vmci_transport_queue_pair_alloc(
&qpair,
&handle,
vmci_trans(vpending)->produce_size,
vmci_trans(vpending)->consume_size,
pkt->dg.src.context,
flags,
vmci_transport_is_trusted(
vpending,
vpending->remote_addr.svm_cid));
if (err < 0) {
vmci_transport_send_reset(pending, pkt);
skerr = -err;
goto destroy;
}
vmci_trans(vpending)->qp_handle = handle;
vmci_trans(vpending)->qpair = qpair;
/* When we send the attach message, we must be ready to handle incoming
* control messages on the newly connected socket. So we move the
* pending socket to the connected state before sending the attach
* message. Otherwise, an incoming packet triggered by the attach being
* received by the peer may be processed concurrently with what happens
* below after sending the attach message, and that incoming packet
* will find the listening socket instead of the (currently) pending
* socket. Note that enqueueing the socket increments the reference
* count, so even if a reset comes before the connection is accepted,
* the socket will be valid until it is removed from the queue.
*
* If we fail sending the attach below, we remove the socket from the
* connected list and move the socket to SS_UNCONNECTED before
* releasing the lock, so a pending slow path processing of an incoming
* packet will not see the socket in the connected state in that case.
*/
pending->sk_state = SS_CONNECTED;
vsock_insert_connected(vpending);
/* Notify our peer of our attach. */
err = vmci_transport_send_attach(pending, handle);
if (err < 0) {
vsock_remove_connected(vpending);
pr_err("Could not send attach\n");
vmci_transport_send_reset(pending, pkt);
err = vmci_transport_error_to_vsock_error(err);
skerr = -err;
goto destroy;
}
/* We have a connection. Move the now connected socket from the
* listener's pending list to the accept queue so callers of accept()
* can find it.
*/
vsock_remove_pending(listener, pending);
vsock_enqueue_accept(listener, pending);
/* Callers of accept() will be be waiting on the listening socket, not
* the pending socket.
*/
listener->sk_state_change(listener);
return 0;
destroy:
pending->sk_err = skerr;
pending->sk_state = SS_UNCONNECTED;
/* As long as we drop our reference, all necessary cleanup will handle
* when the cleanup function drops its reference and our destruct
* implementation is called. Note that since the listen handler will
* remove pending from the pending list upon our failure, the cleanup
* function won't drop the additional reference, which is why we do it
* here.
*/
sock_put(pending);
return err;
}
|
vmci_transport_recv_connecting_server(struct sock *listener,
struct sock *pending,
struct vmci_transport_packet *pkt)
{
struct vsock_sock *vpending;
struct vmci_handle handle;
struct vmci_qp *qpair;
bool is_local;
u32 flags;
u32 detach_sub_id;
int err;
int skerr;
vpending = vsock_sk(pending);
detach_sub_id = VMCI_INVALID_ID;
switch (pkt->type) {
case VMCI_TRANSPORT_PACKET_TYPE_OFFER:
if (vmci_handle_is_invalid(pkt->u.handle)) {
vmci_transport_send_reset(pending, pkt);
skerr = EPROTO;
err = -EINVAL;
goto destroy;
}
break;
default:
/* Close and cleanup the connection. */
vmci_transport_send_reset(pending, pkt);
skerr = EPROTO;
err = pkt->type == VMCI_TRANSPORT_PACKET_TYPE_RST ? 0 : -EINVAL;
goto destroy;
}
/* In order to complete the connection we need to attach to the offered
* queue pair and send an attach notification. We also subscribe to the
* detach event so we know when our peer goes away, and we do that
* before attaching so we don't miss an event. If all this succeeds,
* we update our state and wakeup anything waiting in accept() for a
* connection.
*/
/* We don't care about attach since we ensure the other side has
* attached by specifying the ATTACH_ONLY flag below.
*/
err = vmci_event_subscribe(VMCI_EVENT_QP_PEER_DETACH,
vmci_transport_peer_detach_cb,
pending, &detach_sub_id);
if (err < VMCI_SUCCESS) {
vmci_transport_send_reset(pending, pkt);
err = vmci_transport_error_to_vsock_error(err);
skerr = -err;
goto destroy;
}
vmci_trans(vpending)->detach_sub_id = detach_sub_id;
/* Now attach to the queue pair the client created. */
handle = pkt->u.handle;
/* vpending->local_addr always has a context id so we do not need to
* worry about VMADDR_CID_ANY in this case.
*/
is_local =
vpending->remote_addr.svm_cid == vpending->local_addr.svm_cid;
flags = VMCI_QPFLAG_ATTACH_ONLY;
flags |= is_local ? VMCI_QPFLAG_LOCAL : 0;
err = vmci_transport_queue_pair_alloc(
&qpair,
&handle,
vmci_trans(vpending)->produce_size,
vmci_trans(vpending)->consume_size,
pkt->dg.src.context,
flags,
vmci_transport_is_trusted(
vpending,
vpending->remote_addr.svm_cid));
if (err < 0) {
vmci_transport_send_reset(pending, pkt);
skerr = -err;
goto destroy;
}
vmci_trans(vpending)->qp_handle = handle;
vmci_trans(vpending)->qpair = qpair;
/* When we send the attach message, we must be ready to handle incoming
* control messages on the newly connected socket. So we move the
* pending socket to the connected state before sending the attach
* message. Otherwise, an incoming packet triggered by the attach being
* received by the peer may be processed concurrently with what happens
* below after sending the attach message, and that incoming packet
* will find the listening socket instead of the (currently) pending
* socket. Note that enqueueing the socket increments the reference
* count, so even if a reset comes before the connection is accepted,
* the socket will be valid until it is removed from the queue.
*
* If we fail sending the attach below, we remove the socket from the
* connected list and move the socket to SS_UNCONNECTED before
* releasing the lock, so a pending slow path processing of an incoming
* packet will not see the socket in the connected state in that case.
*/
pending->sk_state = SS_CONNECTED;
vsock_insert_connected(vpending);
/* Notify our peer of our attach. */
err = vmci_transport_send_attach(pending, handle);
if (err < 0) {
vsock_remove_connected(vpending);
pr_err("Could not send attach\n");
vmci_transport_send_reset(pending, pkt);
err = vmci_transport_error_to_vsock_error(err);
skerr = -err;
goto destroy;
}
/* We have a connection. Move the now connected socket from the
* listener's pending list to the accept queue so callers of accept()
* can find it.
*/
vsock_remove_pending(listener, pending);
vsock_enqueue_accept(listener, pending);
/* Callers of accept() will be be waiting on the listening socket, not
* the pending socket.
*/
listener->sk_state_change(listener);
return 0;
destroy:
pending->sk_err = skerr;
pending->sk_state = SS_UNCONNECTED;
/* As long as we drop our reference, all necessary cleanup will handle
* when the cleanup function drops its reference and our destruct
* implementation is called. Note that since the listen handler will
* remove pending from the pending list upon our failure, the cleanup
* function won't drop the additional reference, which is why we do it
* here.
*/
sock_put(pending);
return err;
}
|
C
|
linux
| 0 |
CVE-2015-1265
|
https://www.cvedetails.com/cve/CVE-2015-1265/
| null |
https://github.com/chromium/chromium/commit/04ff52bb66284467ccb43d90800013b89ee8db75
|
04ff52bb66284467ccb43d90800013b89ee8db75
|
Switching AudioOutputAuthorizationHandler from using AudioManager interface to AudioSystem one.
BUG=672468
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Review-Url: https://codereview.chromium.org/2692203003
Cr-Commit-Position: refs/heads/master@{#450939}
|
static void AppendCompositorCommandLineFlags(base::CommandLine* command_line) {
command_line->AppendSwitchASCII(
switches::kNumRasterThreads,
base::IntToString(NumberOfRendererRasterThreads()));
if (IsAsyncWorkerContextEnabled())
command_line->AppendSwitch(switches::kEnableGpuAsyncWorkerContext);
int msaa_sample_count = GpuRasterizationMSAASampleCount();
if (msaa_sample_count >= 0) {
command_line->AppendSwitchASCII(switches::kGpuRasterizationMSAASampleCount,
base::IntToString(msaa_sample_count));
}
if (IsZeroCopyUploadEnabled())
command_line->AppendSwitch(switches::kEnableZeroCopy);
if (!IsPartialRasterEnabled())
command_line->AppendSwitch(switches::kDisablePartialRaster);
if (IsGpuMemoryBufferCompositorResourcesEnabled()) {
command_line->AppendSwitch(
switches::kEnableGpuMemoryBufferCompositorResources);
}
if (IsMainFrameBeforeActivationEnabled())
command_line->AppendSwitch(cc::switches::kEnableMainFrameBeforeActivation);
cc::BufferToTextureTargetMap image_targets;
for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST);
++usage_idx) {
gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx);
for (int format_idx = 0;
format_idx <= static_cast<int>(gfx::BufferFormat::LAST);
++format_idx) {
gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx);
uint32_t target = gpu::GetImageTextureTarget(format, usage);
image_targets[std::make_pair(usage, format)] = target;
}
}
command_line->AppendSwitchASCII(
switches::kContentImageTextureTarget,
cc::BufferToTextureTargetMapToString(image_targets));
GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
DCHECK(gpu_data_manager);
gpu_data_manager->AppendRendererCommandLine(command_line);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableSlimmingPaintV2)) {
command_line->AppendSwitch(cc::switches::kEnableLayerLists);
}
}
|
static void AppendCompositorCommandLineFlags(base::CommandLine* command_line) {
command_line->AppendSwitchASCII(
switches::kNumRasterThreads,
base::IntToString(NumberOfRendererRasterThreads()));
if (IsAsyncWorkerContextEnabled())
command_line->AppendSwitch(switches::kEnableGpuAsyncWorkerContext);
int msaa_sample_count = GpuRasterizationMSAASampleCount();
if (msaa_sample_count >= 0) {
command_line->AppendSwitchASCII(switches::kGpuRasterizationMSAASampleCount,
base::IntToString(msaa_sample_count));
}
if (IsZeroCopyUploadEnabled())
command_line->AppendSwitch(switches::kEnableZeroCopy);
if (!IsPartialRasterEnabled())
command_line->AppendSwitch(switches::kDisablePartialRaster);
if (IsGpuMemoryBufferCompositorResourcesEnabled()) {
command_line->AppendSwitch(
switches::kEnableGpuMemoryBufferCompositorResources);
}
if (IsMainFrameBeforeActivationEnabled())
command_line->AppendSwitch(cc::switches::kEnableMainFrameBeforeActivation);
cc::BufferToTextureTargetMap image_targets;
for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST);
++usage_idx) {
gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx);
for (int format_idx = 0;
format_idx <= static_cast<int>(gfx::BufferFormat::LAST);
++format_idx) {
gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx);
uint32_t target = gpu::GetImageTextureTarget(format, usage);
image_targets[std::make_pair(usage, format)] = target;
}
}
command_line->AppendSwitchASCII(
switches::kContentImageTextureTarget,
cc::BufferToTextureTargetMapToString(image_targets));
GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
DCHECK(gpu_data_manager);
gpu_data_manager->AppendRendererCommandLine(command_line);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableSlimmingPaintV2)) {
command_line->AppendSwitch(cc::switches::kEnableLayerLists);
}
}
|
C
|
Chrome
| 0 |
CVE-2017-18594
|
https://www.cvedetails.com/cve/CVE-2017-18594/
|
CWE-415
|
https://github.com/nmap/nmap/commit/350bbe0597d37ad67abe5fef8fba984707b4e9ad
|
350bbe0597d37ad67abe5fef8fba984707b4e9ad
|
Avoid a crash (double-free) when SSH connection fails
|
static int l_session_open (lua_State *L) {
int rc;
ssh_userdata *state = NULL;
luaL_checkinteger(L, 2);
lua_settop(L, 2);
state = (ssh_userdata *)lua_newuserdata(L, sizeof(ssh_userdata)); /* index 3 */
assert(lua_gettop(L) == 3);
state->session = NULL;
state->sp[0] = -1;
state->sp[1] = -1;
lua_pushvalue(L, lua_upvalueindex(1)); /* metatable */
lua_setmetatable(L, 3);
lua_newtable(L);
lua_setuservalue(L, 3);
lua_getuservalue(L, 3); /* index 4 - a table associated with userdata*/
assert(lua_gettop(L) == 4);
state->session = libssh2_session_init();
if (state->session == NULL) {
return nseU_safeerror(L, "trying to initiate session");
}
libssh2_session_set_blocking(state->session, 0);
if (make_socketpair(state->sp, 1) == -1)
return nseU_safeerror(L, "trying to create socketpair");
#ifdef WIN32
unsigned long s_mode = 1; // non-blocking
rc = ioctlsocket(state->sp[1], FIONBIO, (unsigned long *)&s_mode);
if (rc != NO_ERROR)
return nseU_safeerror(L, "%s", strerror(errno));
#else
rc = fcntl(state->sp[1], F_GETFD);
if (rc == -1)
return nseU_safeerror(L, "%s", strerror(errno));
rc |= O_NONBLOCK;
rc = fcntl(state->sp[1], F_SETFL, rc);
if (rc == -1)
return nseU_safeerror(L, "%s", strerror(errno));
#endif
lua_getglobal(L, "nmap");
lua_getfield(L, -1, "new_socket");
lua_replace(L, -2);
lua_call(L, 0, 1);
lua_setfield(L, 4, "sock");
lua_pushliteral(L, "");
lua_setfield(L, 4, "sp_buff");
assert(lua_gettop(L) == 4);
lua_getfield(L, 4, "sock");
lua_getfield(L, -1, "connect");
lua_insert(L, -2); /* swap */
lua_pushvalue(L, 1);
lua_pushvalue(L, 2);
lua_callk(L, 3, 2, 3, finish_session_open);
return finish_session_open(L,0,0);
}
|
static int l_session_open (lua_State *L) {
int rc;
ssh_userdata *state = NULL;
luaL_checkinteger(L, 2);
lua_settop(L, 2);
state = (ssh_userdata *)lua_newuserdata(L, sizeof(ssh_userdata)); /* index 3 */
assert(lua_gettop(L) == 3);
state->session = NULL;
state->sp[0] = -1;
state->sp[1] = -1;
lua_pushvalue(L, lua_upvalueindex(1)); /* metatable */
lua_setmetatable(L, 3);
lua_newtable(L);
lua_setuservalue(L, 3);
lua_getuservalue(L, 3); /* index 4 - a table associated with userdata*/
assert(lua_gettop(L) == 4);
state->session = libssh2_session_init();
if (state->session == NULL) {
return nseU_safeerror(L, "trying to initiate session");
}
libssh2_session_set_blocking(state->session, 0);
if (make_socketpair(state->sp, 1) == -1)
return nseU_safeerror(L, "trying to create socketpair");
#ifdef WIN32
unsigned long s_mode = 1; // non-blocking
rc = ioctlsocket(state->sp[1], FIONBIO, (unsigned long *)&s_mode);
if (rc != NO_ERROR)
return nseU_safeerror(L, "%s", strerror(errno));
#else
rc = fcntl(state->sp[1], F_GETFD);
if (rc == -1)
return nseU_safeerror(L, "%s", strerror(errno));
rc |= O_NONBLOCK;
rc = fcntl(state->sp[1], F_SETFL, rc);
if (rc == -1)
return nseU_safeerror(L, "%s", strerror(errno));
#endif
lua_getglobal(L, "nmap");
lua_getfield(L, -1, "new_socket");
lua_replace(L, -2);
lua_call(L, 0, 1);
lua_setfield(L, 4, "sock");
lua_pushliteral(L, "");
lua_setfield(L, 4, "sp_buff");
assert(lua_gettop(L) == 4);
lua_getfield(L, 4, "sock");
lua_getfield(L, -1, "connect");
lua_insert(L, -2); /* swap */
lua_pushvalue(L, 1);
lua_pushvalue(L, 2);
lua_callk(L, 3, 2, 3, finish_session_open);
return finish_session_open(L,0,0);
}
|
C
|
nmap
| 0 |
CVE-2016-7097
|
https://www.cvedetails.com/cve/CVE-2016-7097/
|
CWE-285
|
https://github.com/torvalds/linux/commit/073931017b49d9458aa351605b43a7e34598caef
|
073931017b49d9458aa351605b43a7e34598caef
|
posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't clear the setgid bit in
a similar way; this allows to bypass the check in chmod(2). Fix that.
References: CVE-2016-7097
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Andreas Gruenbacher <[email protected]>
|
__posix_acl_create(struct posix_acl **acl, gfp_t gfp, umode_t *mode_p)
{
struct posix_acl *clone = posix_acl_clone(*acl, gfp);
int err = -ENOMEM;
if (clone) {
err = posix_acl_create_masq(clone, mode_p);
if (err < 0) {
posix_acl_release(clone);
clone = NULL;
}
}
posix_acl_release(*acl);
*acl = clone;
return err;
}
|
__posix_acl_create(struct posix_acl **acl, gfp_t gfp, umode_t *mode_p)
{
struct posix_acl *clone = posix_acl_clone(*acl, gfp);
int err = -ENOMEM;
if (clone) {
err = posix_acl_create_masq(clone, mode_p);
if (err < 0) {
posix_acl_release(clone);
clone = NULL;
}
}
posix_acl_release(*acl);
*acl = clone;
return err;
}
|
C
|
linux
| 0 |
CVE-2018-20553
|
https://www.cvedetails.com/cve/CVE-2018-20553/
|
CWE-125
|
https://github.com/appneta/tcpreplay/pull/532/commits/6b830a1640ca20528032c89a4fdd8291a4d2d8b2
|
6b830a1640ca20528032c89a4fdd8291a4d2d8b2
|
Bug #520 Fix heap overflow on zero or 0xFFFF packet length
Add check for packets that report zero packet length. Example
of fix:
src/tcpprep --auto=bridge --pcap=poc16-get_l2len-heapoverflow --cachefile=/dev/null
Warning: poc16-get_l2len-heapoverflow was captured using a snaplen of 17 bytes. This may mean you have truncated packets.
safe_pcap_next ERROR: Invalid packet length in tcpprep.c:process_raw_packets() line 334: packet length=0 capture length=0
|
inet_aton(const char *name, struct in_addr *addr)
{
in_addr_t a = inet_addr(name);
addr->s_addr = a;
return a != (in_addr_t)-1;
}
|
inet_aton(const char *name, struct in_addr *addr)
{
in_addr_t a = inet_addr(name);
addr->s_addr = a;
return a != (in_addr_t)-1;
}
|
C
|
tcpreplay
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/30b0f37300f8d671d29d91102ec7f475ed4cf7fe
|
30b0f37300f8d671d29d91102ec7f475ed4cf7fe
|
Use invalidation sets for :read-only and :read-write.
Gets rid of SubtreeStyleChange which relies on sibling tree recalcs.
[email protected],[email protected]
BUG=557440
Review URL: https://codereview.chromium.org/1454003002
Cr-Commit-Position: refs/heads/master@{#360298}
|
bool HTMLFormControlElement::shouldHaveFocusAppearance() const
{
return !m_wasFocusedByMouse || shouldShowFocusRingOnMouseFocus();
}
|
bool HTMLFormControlElement::shouldHaveFocusAppearance() const
{
return !m_wasFocusedByMouse || shouldShowFocusRingOnMouseFocus();
}
|
C
|
Chrome
| 0 |
CVE-2018-6038
|
https://www.cvedetails.com/cve/CVE-2018-6038/
|
CWE-125
|
https://github.com/chromium/chromium/commit/9b99a43fc119a2533a87e2357cad8f603779a7b9
|
9b99a43fc119a2533a87e2357cad8f603779a7b9
|
Implement 2D texture uploading from client array with FLIP_Y or PREMULTIPLY_ALPHA.
BUG=774174
TEST=https://github.com/KhronosGroup/WebGL/pull/2555
[email protected]
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I4f4e7636314502451104730501a5048a5d7b9f3f
Reviewed-on: https://chromium-review.googlesource.com/808665
Commit-Queue: Zhenyao Mo <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#522003}
|
void Unpack<WebGLImageConversion::kDataFormatARGB8, uint8_t, uint8_t>(
const uint8_t* source,
uint8_t* destination,
unsigned pixels_per_row) {
for (unsigned i = 0; i < pixels_per_row; ++i) {
destination[0] = source[1];
destination[1] = source[2];
destination[2] = source[3];
destination[3] = source[0];
source += 4;
destination += 4;
}
}
|
void Unpack<WebGLImageConversion::kDataFormatARGB8, uint8_t, uint8_t>(
const uint8_t* source,
uint8_t* destination,
unsigned pixels_per_row) {
for (unsigned i = 0; i < pixels_per_row; ++i) {
destination[0] = source[1];
destination[1] = source[2];
destination[2] = source[3];
destination[3] = source[0];
source += 4;
destination += 4;
}
}
|
C
|
Chrome
| 0 |
CVE-2013-2858
|
https://www.cvedetails.com/cve/CVE-2013-2858/
|
CWE-416
|
https://github.com/chromium/chromium/commit/828eab2216a765dea92575c290421c115b8ad028
|
828eab2216a765dea92575c290421c115b8ad028
|
Added daily UMA for non-data-reduction-proxy data usage when the proxy is enabled.
BUG=325325
Review URL: https://codereview.chromium.org/106113002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239897 0039d316-1c4b-4281-b951-d872f2087c98
|
int ChromeNetworkDelegate::OnBeforeSocketStreamConnect(
net::SocketStream* socket,
const net::CompletionCallback& callback) {
#if defined(ENABLE_CONFIGURATION_POLICY)
if (url_blacklist_manager_ &&
url_blacklist_manager_->IsURLBlocked(socket->url())) {
socket->net_log()->AddEvent(
net::NetLog::TYPE_CHROME_POLICY_ABORTED_REQUEST,
net::NetLog::StringCallback("url",
&socket->url().possibly_invalid_spec()));
return net::ERR_BLOCKED_BY_ADMINISTRATOR;
}
#endif
return net::OK;
}
|
int ChromeNetworkDelegate::OnBeforeSocketStreamConnect(
net::SocketStream* socket,
const net::CompletionCallback& callback) {
#if defined(ENABLE_CONFIGURATION_POLICY)
if (url_blacklist_manager_ &&
url_blacklist_manager_->IsURLBlocked(socket->url())) {
socket->net_log()->AddEvent(
net::NetLog::TYPE_CHROME_POLICY_ABORTED_REQUEST,
net::NetLog::StringCallback("url",
&socket->url().possibly_invalid_spec()));
return net::ERR_BLOCKED_BY_ADMINISTRATOR;
}
#endif
return net::OK;
}
|
C
|
Chrome
| 0 |
CVE-2017-11399
|
https://www.cvedetails.com/cve/CVE-2017-11399/
|
CWE-125
|
https://github.com/FFmpeg/FFmpeg/commit/ba4beaf6149f7241c8bd85fe853318c2f6837ad0
|
ba4beaf6149f7241c8bd85fe853318c2f6837ad0
|
avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <[email protected]>
|
static inline void update_rice(APERice *rice, unsigned int x)
{
int lim = rice->k ? (1 << (rice->k + 4)) : 0;
rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
if (rice->ksum < lim)
rice->k--;
else if (rice->ksum >= (1 << (rice->k + 5)))
rice->k++;
}
|
static inline void update_rice(APERice *rice, unsigned int x)
{
int lim = rice->k ? (1 << (rice->k + 4)) : 0;
rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
if (rice->ksum < lim)
rice->k--;
else if (rice->ksum >= (1 << (rice->k + 5)))
rice->k++;
}
|
C
|
FFmpeg
| 0 |
CVE-2014-4014
|
https://www.cvedetails.com/cve/CVE-2014-4014/
|
CWE-264
|
https://github.com/torvalds/linux/commit/23adbe12ef7d3d4195e80800ab36b37bee28cd03
|
23adbe12ef7d3d4195e80800ab36b37bee28cd03
|
fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces. For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.
This patch changes inode_capable to check for uid and gid mappings and
renames it to capable_wrt_inode_uidgid, which should make it more
obvious what it does.
Fixes CVE-2014-4014.
Cc: Theodore Ts'o <[email protected]>
Cc: Serge Hallyn <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: [email protected]
Signed-off-by: Andy Lutomirski <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
unsigned int get_next_ino(void)
{
unsigned int *p = &get_cpu_var(last_ino);
unsigned int res = *p;
#ifdef CONFIG_SMP
if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
static atomic_t shared_last_ino;
int next = atomic_add_return(LAST_INO_BATCH, &shared_last_ino);
res = next - LAST_INO_BATCH;
}
#endif
*p = ++res;
put_cpu_var(last_ino);
return res;
}
|
unsigned int get_next_ino(void)
{
unsigned int *p = &get_cpu_var(last_ino);
unsigned int res = *p;
#ifdef CONFIG_SMP
if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
static atomic_t shared_last_ino;
int next = atomic_add_return(LAST_INO_BATCH, &shared_last_ino);
res = next - LAST_INO_BATCH;
}
#endif
*p = ++res;
put_cpu_var(last_ino);
return res;
}
|
C
|
linux
| 0 |
CVE-2018-14395
|
https://www.cvedetails.com/cve/CVE-2018-14395/
|
CWE-369
|
https://github.com/FFmpeg/FFmpeg/commit/fa19fbcf712a6a6cc5a5cfdc3254a97b9bce6582
|
fa19fbcf712a6a6cc5a5cfdc3254a97b9bce6582
|
avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int mov_write_tmpo_tag(AVIOContext *pb, AVFormatContext *s)
{
AVDictionaryEntry *t = av_dict_get(s->metadata, "tmpo", NULL, 0);
int size = 0, tmpo = t ? atoi(t->value) : 0;
if (tmpo) {
size = 26;
avio_wb32(pb, size);
ffio_wfourcc(pb, "tmpo");
avio_wb32(pb, size-8); /* size */
ffio_wfourcc(pb, "data");
avio_wb32(pb, 0x15); //type specifier
avio_wb32(pb, 0);
avio_wb16(pb, tmpo); // data
}
return size;
}
|
static int mov_write_tmpo_tag(AVIOContext *pb, AVFormatContext *s)
{
AVDictionaryEntry *t = av_dict_get(s->metadata, "tmpo", NULL, 0);
int size = 0, tmpo = t ? atoi(t->value) : 0;
if (tmpo) {
size = 26;
avio_wb32(pb, size);
ffio_wfourcc(pb, "tmpo");
avio_wb32(pb, size-8); /* size */
ffio_wfourcc(pb, "data");
avio_wb32(pb, 0x15); //type specifier
avio_wb32(pb, 0);
avio_wb16(pb, tmpo); // data
}
return size;
}
|
C
|
FFmpeg
| 0 |
CVE-2016-4579
|
https://www.cvedetails.com/cve/CVE-2016-4579/
|
CWE-20
|
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libksba.git;a=commit;h=a7eed17a0b2a1c09ef986f3b4b323cd31cea2b64
|
a7eed17a0b2a1c09ef986f3b4b323cd31cea2b64
| null |
ksba_name_new (ksba_name_t *r_name)
{
*r_name = xtrycalloc (1, sizeof **r_name);
if (!*r_name)
return gpg_error_from_errno (errno);
(*r_name)->ref_count++;
return 0;
}
|
ksba_name_new (ksba_name_t *r_name)
{
*r_name = xtrycalloc (1, sizeof **r_name);
if (!*r_name)
return gpg_error_from_errno (errno);
(*r_name)->ref_count++;
return 0;
}
|
C
|
gnupg
| 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 md5_sparc64_init(struct shash_desc *desc)
{
struct md5_state *mctx = shash_desc_ctx(desc);
mctx->hash[0] = cpu_to_le32(0x67452301);
mctx->hash[1] = cpu_to_le32(0xefcdab89);
mctx->hash[2] = cpu_to_le32(0x98badcfe);
mctx->hash[3] = cpu_to_le32(0x10325476);
mctx->byte_count = 0;
return 0;
}
|
static int md5_sparc64_init(struct shash_desc *desc)
{
struct md5_state *mctx = shash_desc_ctx(desc);
mctx->hash[0] = cpu_to_le32(0x67452301);
mctx->hash[1] = cpu_to_le32(0xefcdab89);
mctx->hash[2] = cpu_to_le32(0x98badcfe);
mctx->hash[3] = cpu_to_le32(0x10325476);
mctx->byte_count = 0;
return 0;
}
|
C
|
linux
| 0 |
CVE-2011-2858
|
https://www.cvedetails.com/cve/CVE-2011-2858/
|
CWE-119
|
https://github.com/chromium/chromium/commit/c13e1da62b5f5f0e6fe8c1f769a5a28415415244
|
c13e1da62b5f5f0e6fe8c1f769a5a28415415244
|
Revert "Revert 100494 - Fix bug in SimulateAttrib0."""
TEST=none
BUG=95625
[email protected]
Review URL: http://codereview.chromium.org/7796016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100507 0039d316-1c4b-4281-b951-d872f2087c98
|
static void RebindCurrentFramebuffer(
GLenum target,
FramebufferManager::FramebufferInfo* info,
FrameBuffer* offscreen_frame_buffer) {
GLuint framebuffer_id = info ? info->service_id() : 0;
if (framebuffer_id == 0 && offscreen_frame_buffer) {
framebuffer_id = offscreen_frame_buffer->id();
}
glBindFramebufferEXT(target, framebuffer_id);
}
|
static void RebindCurrentFramebuffer(
GLenum target,
FramebufferManager::FramebufferInfo* info,
FrameBuffer* offscreen_frame_buffer) {
GLuint framebuffer_id = info ? info->service_id() : 0;
if (framebuffer_id == 0 && offscreen_frame_buffer) {
framebuffer_id = offscreen_frame_buffer->id();
}
glBindFramebufferEXT(target, framebuffer_id);
}
|
C
|
Chrome
| 0 |
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
|
sp<InputWindowHandle> InputDispatcher::getWindowHandleLocked(
const sp<InputChannel>& inputChannel) const {
size_t numWindows = mWindowHandles.size();
for (size_t i = 0; i < numWindows; i++) {
const sp<InputWindowHandle>& windowHandle = mWindowHandles.itemAt(i);
if (windowHandle->getInputChannel() == inputChannel) {
return windowHandle;
}
}
return NULL;
}
|
sp<InputWindowHandle> InputDispatcher::getWindowHandleLocked(
const sp<InputChannel>& inputChannel) const {
size_t numWindows = mWindowHandles.size();
for (size_t i = 0; i < numWindows; i++) {
const sp<InputWindowHandle>& windowHandle = mWindowHandles.itemAt(i);
if (windowHandle->getInputChannel() == inputChannel) {
return windowHandle;
}
}
return NULL;
}
|
C
|
Android
| 0 |
CVE-2016-6888
|
https://www.cvedetails.com/cve/CVE-2016-6888/
|
CWE-190
|
https://git.qemu.org/?p=qemu.git;a=commit;h=47882fa4975bf0b58dd74474329fdd7154e8f04c
|
47882fa4975bf0b58dd74474329fdd7154e8f04c
| null |
static size_t net_tx_pkt_fetch_fragment(struct NetTxPkt *pkt,
int *src_idx, size_t *src_offset, struct iovec *dst, int *dst_idx)
{
size_t fetched = 0;
struct iovec *src = pkt->vec;
*dst_idx = NET_TX_PKT_FRAGMENT_HEADER_NUM;
while (fetched < IP_FRAG_ALIGN_SIZE(pkt->virt_hdr.gso_size)) {
/* no more place in fragment iov */
if (*dst_idx == NET_MAX_FRAG_SG_LIST) {
break;
}
/* no more data in iovec */
if (*src_idx == (pkt->payload_frags + NET_TX_PKT_PL_START_FRAG)) {
break;
}
dst[*dst_idx].iov_base = src[*src_idx].iov_base + *src_offset;
dst[*dst_idx].iov_len = MIN(src[*src_idx].iov_len - *src_offset,
IP_FRAG_ALIGN_SIZE(pkt->virt_hdr.gso_size) - fetched);
*src_offset += dst[*dst_idx].iov_len;
fetched += dst[*dst_idx].iov_len;
if (*src_offset == src[*src_idx].iov_len) {
*src_offset = 0;
(*src_idx)++;
}
(*dst_idx)++;
}
return fetched;
}
|
static size_t net_tx_pkt_fetch_fragment(struct NetTxPkt *pkt,
int *src_idx, size_t *src_offset, struct iovec *dst, int *dst_idx)
{
size_t fetched = 0;
struct iovec *src = pkt->vec;
*dst_idx = NET_TX_PKT_FRAGMENT_HEADER_NUM;
while (fetched < IP_FRAG_ALIGN_SIZE(pkt->virt_hdr.gso_size)) {
/* no more place in fragment iov */
if (*dst_idx == NET_MAX_FRAG_SG_LIST) {
break;
}
/* no more data in iovec */
if (*src_idx == (pkt->payload_frags + NET_TX_PKT_PL_START_FRAG)) {
break;
}
dst[*dst_idx].iov_base = src[*src_idx].iov_base + *src_offset;
dst[*dst_idx].iov_len = MIN(src[*src_idx].iov_len - *src_offset,
IP_FRAG_ALIGN_SIZE(pkt->virt_hdr.gso_size) - fetched);
*src_offset += dst[*dst_idx].iov_len;
fetched += dst[*dst_idx].iov_len;
if (*src_offset == src[*src_idx].iov_len) {
*src_offset = 0;
(*src_idx)++;
}
(*dst_idx)++;
}
return fetched;
}
|
C
|
qemu
| 0 |
CVE-2019-11833
|
https://www.cvedetails.com/cve/CVE-2019-11833/
|
CWE-200
|
https://github.com/torvalds/linux/commit/592acbf16821288ecdc4192c47e3774a4c48bb64
|
592acbf16821288ecdc4192c47e3774a4c48bb64
|
ext4: zero out the unused memory region in the extent tree block
This commit zeroes out the unused memory region in the buffer_head
corresponding to the extent metablock after writing the extent header
and the corresponding extent node entries.
This is done to prevent random uninitialized data from getting into
the filesystem when the extent block is synced.
This fixes CVE-2019-11833.
Signed-off-by: Sriram Rajagopalan <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Cc: [email protected]
|
static int ext4_valid_extent(struct inode *inode, struct ext4_extent *ext)
{
ext4_fsblk_t block = ext4_ext_pblock(ext);
int len = ext4_ext_get_actual_len(ext);
ext4_lblk_t lblock = le32_to_cpu(ext->ee_block);
/*
* We allow neither:
* - zero length
* - overflow/wrap-around
*/
if (lblock + len <= lblock)
return 0;
return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, len);
}
|
static int ext4_valid_extent(struct inode *inode, struct ext4_extent *ext)
{
ext4_fsblk_t block = ext4_ext_pblock(ext);
int len = ext4_ext_get_actual_len(ext);
ext4_lblk_t lblock = le32_to_cpu(ext->ee_block);
/*
* We allow neither:
* - zero length
* - overflow/wrap-around
*/
if (lblock + len <= lblock)
return 0;
return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, len);
}
|
C
|
linux
| 0 |
CVE-2018-6085
|
https://www.cvedetails.com/cve/CVE-2018-6085/
|
CWE-20
|
https://github.com/chromium/chromium/commit/df5b1e1f88e013bc96107cc52c4a4f33a8238444
|
df5b1e1f88e013bc96107cc52c4a4f33a8238444
|
Blockfile cache: fix long-standing sparse + evict reentrancy problem
Thanks to nedwilliamson@ (on gmail) for an alternative perspective
plus a reduction to make fixing this much easier.
Bug: 826626, 518908, 537063, 802886
Change-Id: Ibfa01416f9a8e7f7b361e4f93b4b6b134728b85f
Reviewed-on: https://chromium-review.googlesource.com/985052
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Maks Orlovich <[email protected]>
Cr-Commit-Position: refs/heads/master@{#547103}
|
bool BackendImpl::SetMaxSize(int max_bytes) {
static_assert(sizeof(max_bytes) == sizeof(max_size_),
"unsupported int model");
if (max_bytes < 0)
return false;
if (!max_bytes)
return true;
if (max_bytes >= std::numeric_limits<int32_t>::max() -
std::numeric_limits<int32_t>::max() / 10) {
max_bytes = std::numeric_limits<int32_t>::max() -
std::numeric_limits<int32_t>::max() / 10 - 1;
}
user_flags_ |= kMaxSize;
max_size_ = max_bytes;
return true;
}
|
bool BackendImpl::SetMaxSize(int max_bytes) {
static_assert(sizeof(max_bytes) == sizeof(max_size_),
"unsupported int model");
if (max_bytes < 0)
return false;
if (!max_bytes)
return true;
if (max_bytes >= std::numeric_limits<int32_t>::max() -
std::numeric_limits<int32_t>::max() / 10) {
max_bytes = std::numeric_limits<int32_t>::max() -
std::numeric_limits<int32_t>::max() / 10 - 1;
}
user_flags_ |= kMaxSize;
max_size_ = max_bytes;
return true;
}
|
C
|
Chrome
| 0 |
CVE-2019-11463
|
https://www.cvedetails.com/cve/CVE-2019-11463/
|
CWE-399
|
https://github.com/libarchive/libarchive/commit/ba641f73f3d758d9032b3f0e5597a9c6e593a505
|
ba641f73f3d758d9032b3f0e5597a9c6e593a505
|
Fix typo in preprocessor macro in archive_read_format_zip_cleanup()
Frees lzma_stream on cleanup()
Fixes #1165
|
read_zip64_eocd(struct archive_read *a, struct zip *zip, const char *p)
{
int64_t eocd64_offset;
int64_t eocd64_size;
/* Sanity-check the locator record. */
/* Central dir must be on first volume. */
if (archive_le32dec(p + 4) != 0)
return 0;
/* Must be only a single volume. */
if (archive_le32dec(p + 16) != 1)
return 0;
/* Find the Zip64 EOCD record. */
eocd64_offset = archive_le64dec(p + 8);
if (__archive_read_seek(a, eocd64_offset, SEEK_SET) < 0)
return 0;
if ((p = __archive_read_ahead(a, 56, NULL)) == NULL)
return 0;
/* Make sure we can read all of it. */
eocd64_size = archive_le64dec(p + 4) + 12;
if (eocd64_size < 56 || eocd64_size > 16384)
return 0;
if ((p = __archive_read_ahead(a, (size_t)eocd64_size, NULL)) == NULL)
return 0;
/* Sanity-check the EOCD64 */
if (archive_le32dec(p + 16) != 0) /* Must be disk #0 */
return 0;
if (archive_le32dec(p + 20) != 0) /* CD must be on disk #0 */
return 0;
/* CD can't be split. */
if (archive_le64dec(p + 24) != archive_le64dec(p + 32))
return 0;
/* Save the central directory offset for later use. */
zip->central_directory_offset = archive_le64dec(p + 48);
return 32;
}
|
read_zip64_eocd(struct archive_read *a, struct zip *zip, const char *p)
{
int64_t eocd64_offset;
int64_t eocd64_size;
/* Sanity-check the locator record. */
/* Central dir must be on first volume. */
if (archive_le32dec(p + 4) != 0)
return 0;
/* Must be only a single volume. */
if (archive_le32dec(p + 16) != 1)
return 0;
/* Find the Zip64 EOCD record. */
eocd64_offset = archive_le64dec(p + 8);
if (__archive_read_seek(a, eocd64_offset, SEEK_SET) < 0)
return 0;
if ((p = __archive_read_ahead(a, 56, NULL)) == NULL)
return 0;
/* Make sure we can read all of it. */
eocd64_size = archive_le64dec(p + 4) + 12;
if (eocd64_size < 56 || eocd64_size > 16384)
return 0;
if ((p = __archive_read_ahead(a, (size_t)eocd64_size, NULL)) == NULL)
return 0;
/* Sanity-check the EOCD64 */
if (archive_le32dec(p + 16) != 0) /* Must be disk #0 */
return 0;
if (archive_le32dec(p + 20) != 0) /* CD must be on disk #0 */
return 0;
/* CD can't be split. */
if (archive_le64dec(p + 24) != archive_le64dec(p + 32))
return 0;
/* Save the central directory offset for later use. */
zip->central_directory_offset = archive_le64dec(p + 48);
return 32;
}
|
C
|
libarchive
| 0 |
CVE-2016-10190
|
https://www.cvedetails.com/cve/CVE-2016-10190/
|
CWE-119
|
https://github.com/FFmpeg/FFmpeg/commit/2a05c8f813de6f2278827734bf8102291e7484aa
|
2a05c8f813de6f2278827734bf8102291e7484aa
|
http: make length/offset-related variables unsigned.
Fixes #5992, reported and found by Paul Cher <[email protected]>.
|
static int parse_content_encoding(URLContext *h, const char *p)
{
if (!av_strncasecmp(p, "gzip", 4) ||
!av_strncasecmp(p, "deflate", 7)) {
#if CONFIG_ZLIB
HTTPContext *s = h->priv_data;
s->compressed = 1;
inflateEnd(&s->inflate_stream);
if (inflateInit2(&s->inflate_stream, 32 + 15) != Z_OK) {
av_log(h, AV_LOG_WARNING, "Error during zlib initialisation: %s\n",
s->inflate_stream.msg);
return AVERROR(ENOSYS);
}
if (zlibCompileFlags() & (1 << 17)) {
av_log(h, AV_LOG_WARNING,
"Your zlib was compiled without gzip support.\n");
return AVERROR(ENOSYS);
}
#else
av_log(h, AV_LOG_WARNING,
"Compressed (%s) content, need zlib with gzip support\n", p);
return AVERROR(ENOSYS);
#endif /* CONFIG_ZLIB */
} else if (!av_strncasecmp(p, "identity", 8)) {
} else {
av_log(h, AV_LOG_WARNING, "Unknown content coding: %s\n", p);
}
return 0;
}
|
static int parse_content_encoding(URLContext *h, const char *p)
{
if (!av_strncasecmp(p, "gzip", 4) ||
!av_strncasecmp(p, "deflate", 7)) {
#if CONFIG_ZLIB
HTTPContext *s = h->priv_data;
s->compressed = 1;
inflateEnd(&s->inflate_stream);
if (inflateInit2(&s->inflate_stream, 32 + 15) != Z_OK) {
av_log(h, AV_LOG_WARNING, "Error during zlib initialisation: %s\n",
s->inflate_stream.msg);
return AVERROR(ENOSYS);
}
if (zlibCompileFlags() & (1 << 17)) {
av_log(h, AV_LOG_WARNING,
"Your zlib was compiled without gzip support.\n");
return AVERROR(ENOSYS);
}
#else
av_log(h, AV_LOG_WARNING,
"Compressed (%s) content, need zlib with gzip support\n", p);
return AVERROR(ENOSYS);
#endif /* CONFIG_ZLIB */
} else if (!av_strncasecmp(p, "identity", 8)) {
} else {
av_log(h, AV_LOG_WARNING, "Unknown content coding: %s\n", p);
}
return 0;
}
|
C
|
FFmpeg
| 0 |
CVE-2008-7316
|
https://www.cvedetails.com/cve/CVE-2008-7316/
|
CWE-20
|
https://github.com/torvalds/linux/commit/124d3b7041f9a0ca7c43a6293e1cae4576c32fd5
|
124d3b7041f9a0ca7c43a6293e1cae4576c32fd5
|
fix writev regression: pan hanging unkillable and un-straceable
Frederik Himpe reported an unkillable and un-straceable pan process.
Zero length iovecs can go into an infinite loop in writev, because the
iovec iterator does not always advance over them.
The sequence required to trigger this is not trivial. I think it
requires that a zero-length iovec be followed by a non-zero-length iovec
which causes a pagefault in the atomic usercopy. This causes the writev
code to drop back into single-segment copy mode, which then tries to
copy the 0 bytes of the zero-length iovec; a zero length copy looks like
a failure though, so it loops.
Put a test into iov_iter_advance to catch zero-length iovecs. We could
just put the test in the fallback path, but I feel it is more robust to
skip over zero-length iovecs throughout the code (iovec iterator may be
used in filesystems too, so it should be robust).
Signed-off-by: Nick Piggin <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count)
{
ssize_t ret;
struct file *file;
ret = -EBADF;
file = fget(fd);
if (file) {
if (file->f_mode & FMODE_READ) {
struct address_space *mapping = file->f_mapping;
pgoff_t start = offset >> PAGE_CACHE_SHIFT;
pgoff_t end = (offset + count - 1) >> PAGE_CACHE_SHIFT;
unsigned long len = end - start + 1;
ret = do_readahead(mapping, file, start, len);
}
fput(file);
}
return ret;
}
|
asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count)
{
ssize_t ret;
struct file *file;
ret = -EBADF;
file = fget(fd);
if (file) {
if (file->f_mode & FMODE_READ) {
struct address_space *mapping = file->f_mapping;
pgoff_t start = offset >> PAGE_CACHE_SHIFT;
pgoff_t end = (offset + count - 1) >> PAGE_CACHE_SHIFT;
unsigned long len = end - start + 1;
ret = do_readahead(mapping, file, start, len);
}
fput(file);
}
return ret;
}
|
C
|
linux
| 0 |
CVE-2011-3964
|
https://www.cvedetails.com/cve/CVE-2011-3964/
| null |
https://github.com/chromium/chromium/commit/0c14577c9905bd8161159ec7eaac810c594508d0
|
0c14577c9905bd8161159ec7eaac810c594508d0
|
Change omnibox behavior when stripping javascript schema to navigate after stripping the schema on drag drop.
BUG=109245
TEST=N/A
Review URL: http://codereview.chromium.org/9116016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116692 0039d316-1c4b-4281-b951-d872f2087c98
|
int OmniboxViewWin::WidthOfTextAfterCursor() {
CHARRANGE selection;
GetSelection(selection);
const int start = std::max(0, static_cast<int>(selection.cpMax - 1));
return WidthNeededToDisplay(GetText().substr(start));
}
|
int OmniboxViewWin::WidthOfTextAfterCursor() {
CHARRANGE selection;
GetSelection(selection);
const int start = std::max(0, static_cast<int>(selection.cpMax - 1));
return WidthNeededToDisplay(GetText().substr(start));
}
|
C
|
Chrome
| 0 |
CVE-2016-5219
|
https://www.cvedetails.com/cve/CVE-2016-5219/
|
CWE-416
|
https://github.com/chromium/chromium/commit/a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
cheaper by minimizing the round-trip to the GPU thread.
Bug: 881152, 957001
Change-Id: Iadfa798af29225e752c710ca5c25f50b3dd3101a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586630
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657568}
|
void* GLES2Implementation::MapBufferRange(GLenum target,
GLintptr offset,
GLsizeiptr size,
GLbitfield access) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glMapBufferRange("
<< GLES2Util::GetStringEnum(target) << ", " << offset
<< ", " << size << ", " << access << ")");
if (!ValidateSize("glMapBufferRange", size) ||
!ValidateOffset("glMapBufferRange", offset)) {
return nullptr;
}
GLuint buffer = GetBoundBufferHelper(target);
void* mem = nullptr;
if (access == GL_MAP_READ_BIT) {
if (auto* buffer_object =
readback_buffer_shadow_tracker_->GetBuffer(buffer)) {
mem = buffer_object->MapReadbackShm(offset, size);
if (!mem) {
SendErrorMessage(
"performance warning: READ-usage buffer was read back without "
"waiting on a fence. This caused a graphics pipeline stall.",
0);
}
}
}
int32_t shm_id = 0;
unsigned int shm_offset = 0;
if (!mem) {
mem = mapped_memory_->Alloc(size, &shm_id, &shm_offset);
if (!mem) {
SetGLError(GL_OUT_OF_MEMORY, "glMapBufferRange", "out of memory");
return nullptr;
}
typedef cmds::MapBufferRange::Result Result;
auto result = GetResultAs<Result>();
*result = 0;
helper_->MapBufferRange(target, offset, size, access, shm_id, shm_offset,
GetResultShmId(), result.offset());
WaitForCmd();
if (*result) {
const GLbitfield kInvalidateBits =
GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_INVALIDATE_RANGE_BIT;
if ((access & kInvalidateBits) != 0) {
memset(mem, 0, size);
}
} else {
mapped_memory_->Free(mem);
mem = nullptr;
}
}
if (mem) {
DCHECK_NE(0u, buffer);
DCHECK(mapped_buffer_range_map_.find(buffer) ==
mapped_buffer_range_map_.end());
auto iter = mapped_buffer_range_map_.insert(std::make_pair(
buffer,
MappedBuffer(access, shm_id, mem, shm_offset, target, offset, size)));
DCHECK(iter.second);
}
GPU_CLIENT_LOG(" returned " << mem);
CheckGLError();
return mem;
}
|
void* GLES2Implementation::MapBufferRange(GLenum target,
GLintptr offset,
GLsizeiptr size,
GLbitfield access) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glMapBufferRange("
<< GLES2Util::GetStringEnum(target) << ", " << offset
<< ", " << size << ", " << access << ")");
if (!ValidateSize("glMapBufferRange", size) ||
!ValidateOffset("glMapBufferRange", offset)) {
return nullptr;
}
GLuint buffer = GetBoundBufferHelper(target);
void* mem = nullptr;
if (access == GL_MAP_READ_BIT) {
if (auto* buffer_object =
readback_buffer_shadow_tracker_->GetBuffer(buffer)) {
mem = buffer_object->MapReadbackShm(offset, size);
if (!mem) {
SendErrorMessage(
"performance warning: READ-usage buffer was read back without "
"waiting on a fence. This caused a graphics pipeline stall.",
0);
}
}
}
int32_t shm_id = 0;
unsigned int shm_offset = 0;
if (!mem) {
mem = mapped_memory_->Alloc(size, &shm_id, &shm_offset);
if (!mem) {
SetGLError(GL_OUT_OF_MEMORY, "glMapBufferRange", "out of memory");
return nullptr;
}
typedef cmds::MapBufferRange::Result Result;
auto result = GetResultAs<Result>();
*result = 0;
helper_->MapBufferRange(target, offset, size, access, shm_id, shm_offset,
GetResultShmId(), result.offset());
WaitForCmd();
if (*result) {
const GLbitfield kInvalidateBits =
GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_INVALIDATE_RANGE_BIT;
if ((access & kInvalidateBits) != 0) {
memset(mem, 0, size);
}
} else {
mapped_memory_->Free(mem);
mem = nullptr;
}
}
if (mem) {
DCHECK_NE(0u, buffer);
DCHECK(mapped_buffer_range_map_.find(buffer) ==
mapped_buffer_range_map_.end());
auto iter = mapped_buffer_range_map_.insert(std::make_pair(
buffer,
MappedBuffer(access, shm_id, mem, shm_offset, target, offset, size)));
DCHECK(iter.second);
}
GPU_CLIENT_LOG(" returned " << mem);
CheckGLError();
return mem;
}
|
C
|
Chrome
| 0 |
CVE-2018-7191
|
https://www.cvedetails.com/cve/CVE-2018-7191/
|
CWE-476
|
https://github.com/torvalds/linux/commit/0ad646c81b2182f7fa67ec0c8c825e0ee165696d
|
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
|
tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move these initializations into a ->ndo_init() so
that register_netdevice() knows better, however this is still
complicated due to the logic in tun_detach().
Therefore, I choose to just call dev_get_valid_name() before
register_netdevice(), which is quicker and much easier to audit.
And for this specific case, it is already enough.
Fixes: 96442e42429e ("tuntap: choose the txq based on rxq")
Reported-by: Dmitry Alexeev <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static void napi_skb_free_stolen_head(struct sk_buff *skb)
{
skb_dst_drop(skb);
secpath_reset(skb);
kmem_cache_free(skbuff_head_cache, skb);
}
|
static void napi_skb_free_stolen_head(struct sk_buff *skb)
{
skb_dst_drop(skb);
secpath_reset(skb);
kmem_cache_free(skbuff_head_cache, skb);
}
|
C
|
linux
| 0 |
CVE-2014-9710
|
https://www.cvedetails.com/cve/CVE-2014-9710/
|
CWE-362
|
https://github.com/torvalds/linux/commit/5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
|
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
|
Btrfs: make xattr replace operations atomic
Replacing a xattr consists of doing a lookup for its existing value, delete
the current value from the respective leaf, release the search path and then
finally insert the new value. This leaves a time window where readers (getxattr,
listxattrs) won't see any value for the xattr. Xattrs are used to store ACLs,
so this has security implications.
This change also fixes 2 other existing issues which were:
*) Deleting the old xattr value without verifying first if the new xattr will
fit in the existing leaf item (in case multiple xattrs are packed in the
same item due to name hash collision);
*) Returning -EEXIST when the flag XATTR_CREATE is given and the xattr doesn't
exist but we have have an existing item that packs muliple xattrs with
the same name hash as the input xattr. In this case we should return ENOSPC.
A test case for xfstests follows soon.
Thanks to Alexandre Oliva for reporting the non-atomicity of the xattr replace
implementation.
Reported-by: Alexandre Oliva <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
|
static void root_add_used(struct btrfs_root *root, u32 size)
{
spin_lock(&root->accounting_lock);
btrfs_set_root_used(&root->root_item,
btrfs_root_used(&root->root_item) + size);
spin_unlock(&root->accounting_lock);
}
|
static void root_add_used(struct btrfs_root *root, u32 size)
{
spin_lock(&root->accounting_lock);
btrfs_set_root_used(&root->root_item,
btrfs_root_used(&root->root_item) + size);
spin_unlock(&root->accounting_lock);
}
|
C
|
linux
| 0 |
CVE-2017-0814
|
https://www.cvedetails.com/cve/CVE-2017-0814/
|
CWE-200
|
https://android.googlesource.com/platform/external/tremolo/+/eeb4e45d5683f88488c083ecf142dc89bc3f0b47
|
eeb4e45d5683f88488c083ecf142dc89bc3f0b47
|
Fix out of bounds access in codebook processing
Bug: 62800140
Test: ran poc, CTS
Change-Id: I9960d507be62ee0a3b0aa991240951d5a0784f37
(cherry picked from commit 2c4c4bd895f01fdecb90ebdd0412b60608a9ccf0)
|
static ogg_uint32_t decpack(long entry,long used_entry,long quantvals,
codebook *b,oggpack_buffer *opb,int maptype){
ogg_uint32_t ret=0;
int j;
switch(b->dec_type){
case 0:
return (ogg_uint32_t)entry;
case 1:
if(maptype==1){
/* vals are already read into temporary column vector here */
for(j=0;j<b->dim;j++){
ogg_uint32_t off=entry%quantvals;
entry/=quantvals;
ret|=((ogg_uint16_t *)(b->q_val))[off]<<(b->q_bits*j);
}
}else{
for(j=0;j<b->dim;j++)
ret|=oggpack_read(opb,b->q_bits)<<(b->q_bits*j);
}
return ret;
case 2:
for(j=0;j<b->dim;j++){
ogg_uint32_t off=entry%quantvals;
entry/=quantvals;
ret|=off<<(b->q_pack*j);
}
return ret;
case 3:
return (ogg_uint32_t)used_entry;
}
return 0; /* silence compiler */
}
|
static ogg_uint32_t decpack(long entry,long used_entry,long quantvals,
codebook *b,oggpack_buffer *opb,int maptype){
ogg_uint32_t ret=0;
int j;
switch(b->dec_type){
case 0:
return (ogg_uint32_t)entry;
case 1:
if(maptype==1){
/* vals are already read into temporary column vector here */
for(j=0;j<b->dim;j++){
ogg_uint32_t off=entry%quantvals;
entry/=quantvals;
ret|=((ogg_uint16_t *)(b->q_val))[off]<<(b->q_bits*j);
}
}else{
for(j=0;j<b->dim;j++)
ret|=oggpack_read(opb,b->q_bits)<<(b->q_bits*j);
}
return ret;
case 2:
for(j=0;j<b->dim;j++){
ogg_uint32_t off=entry%quantvals;
entry/=quantvals;
ret|=off<<(b->q_pack*j);
}
return ret;
case 3:
return (ogg_uint32_t)used_entry;
}
return 0; /* silence compiler */
}
|
C
|
Android
| 1 |
null | null | null |
https://github.com/chromium/chromium/commit/d4cd2b2c0953ad7e9fa988c234eb9361be80fe81
|
d4cd2b2c0953ad7e9fa988c234eb9361be80fe81
|
DevTools: 'Overrides' UI overlay obstructs page and element inspector
BUG=302862
[email protected]
Review URL: https://codereview.chromium.org/40233006
git-svn-id: svn://svn.chromium.org/blink/trunk@160559 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void didFailLoaderCreation()
{
m_callback->sendFailure("Couldn't create a loader");
dispose();
}
|
void didFailLoaderCreation()
{
m_callback->sendFailure("Couldn't create a loader");
dispose();
}
|
C
|
Chrome
| 0 |
CVE-2013-4350
|
https://www.cvedetails.com/cve/CVE-2013-4350/
|
CWE-310
|
https://github.com/torvalds/linux/commit/95ee62083cb6453e056562d91f597552021e6ae7
|
95ee62083cb6453e056562d91f597552021e6ae7
|
net: sctp: fix ipv6 ipsec encryption bug in sctp_v6_xmit
Alan Chester reported an issue with IPv6 on SCTP that IPsec traffic is not
being encrypted, whereas on IPv4 it is. Setting up an AH + ESP transport
does not seem to have the desired effect:
SCTP + IPv4:
22:14:20.809645 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto AH (51), length 116)
192.168.0.2 > 192.168.0.5: AH(spi=0x00000042,sumlen=16,seq=0x1): ESP(spi=0x00000044,seq=0x1), length 72
22:14:20.813270 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto AH (51), length 340)
192.168.0.5 > 192.168.0.2: AH(spi=0x00000043,sumlen=16,seq=0x1):
SCTP + IPv6:
22:31:19.215029 IP6 (class 0x02, hlim 64, next-header SCTP (132) payload length: 364)
fe80::222:15ff:fe87:7fc.3333 > fe80::92e6:baff:fe0d:5a54.36767: sctp
1) [INIT ACK] [init tag: 747759530] [rwnd: 62464] [OS: 10] [MIS: 10]
Moreover, Alan says:
This problem was seen with both Racoon and Racoon2. Other people have seen
this with OpenSwan. When IPsec is configured to encrypt all upper layer
protocols the SCTP connection does not initialize. After using Wireshark to
follow packets, this is because the SCTP packet leaves Box A unencrypted and
Box B believes all upper layer protocols are to be encrypted so it drops
this packet, causing the SCTP connection to fail to initialize. When IPsec
is configured to encrypt just SCTP, the SCTP packets are observed unencrypted.
In fact, using `socat sctp6-listen:3333 -` on one end and transferring "plaintext"
string on the other end, results in cleartext on the wire where SCTP eventually
does not report any errors, thus in the latter case that Alan reports, the
non-paranoid user might think he's communicating over an encrypted transport on
SCTP although he's not (tcpdump ... -X):
...
0x0030: 5d70 8e1a 0003 001a 177d eb6c 0000 0000 ]p.......}.l....
0x0040: 0000 0000 706c 6169 6e74 6578 740a 0000 ....plaintext...
Only in /proc/net/xfrm_stat we can see XfrmInTmplMismatch increasing on the
receiver side. Initial follow-up analysis from Alan's bug report was done by
Alexey Dobriyan. Also thanks to Vlad Yasevich for feedback on this.
SCTP has its own implementation of sctp_v6_xmit() not calling inet6_csk_xmit().
This has the implication that it probably never really got updated along with
changes in inet6_csk_xmit() and therefore does not seem to invoke xfrm handlers.
SCTP's IPv4 xmit however, properly calls ip_queue_xmit() to do the work. Since
a call to inet6_csk_xmit() would solve this problem, but result in unecessary
route lookups, let us just use the cached flowi6 instead that we got through
sctp_v6_get_dst(). Since all SCTP packets are being sent through sctp_packet_transmit(),
we do the route lookup / flow caching in sctp_transport_route(), hold it in
tp->dst and skb_dst_set() right after that. If we would alter fl6->daddr in
sctp_v6_xmit() to np->opt->srcrt, we possibly could run into the same effect
of not having xfrm layer pick it up, hence, use fl6_update_dst() in sctp_v6_get_dst()
instead to get the correct source routed dst entry, which we assign to the skb.
Also source address routing example from 625034113 ("sctp: fix sctp to work with
ipv6 source address routing") still works with this patch! Nevertheless, in RFC5095
it is actually 'recommended' to not use that anyway due to traffic amplification [1].
So it seems we're not supposed to do that anyway in sctp_v6_xmit(). Moreover, if
we overwrite the flow destination here, the lower IPv6 layer will be unable to
put the correct destination address into IP header, as routing header is added in
ipv6_push_nfrag_opts() but then probably with wrong final destination. Things aside,
result of this patch is that we do not have any XfrmInTmplMismatch increase plus on
the wire with this patch it now looks like:
SCTP + IPv6:
08:17:47.074080 IP6 2620:52:0:102f:7a2b:cbff:fe27:1b0a > 2620:52:0:102f:213:72ff:fe32:7eba:
AH(spi=0x00005fb4,seq=0x1): ESP(spi=0x00005fb5,seq=0x1), length 72
08:17:47.074264 IP6 2620:52:0:102f:213:72ff:fe32:7eba > 2620:52:0:102f:7a2b:cbff:fe27:1b0a:
AH(spi=0x00003d54,seq=0x1): ESP(spi=0x00003d55,seq=0x1), length 296
This fixes Kernel Bugzilla 24412. This security issue seems to be present since
2.6.18 kernels. Lets just hope some big passive adversary in the wild didn't have
its fun with that. lksctp-tools IPv6 regression test suite passes as well with
this patch.
[1] http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
Reported-by: Alan Chester <[email protected]>
Reported-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Cc: Steffen Klassert <[email protected]>
Cc: Hannes Frederic Sowa <[email protected]>
Acked-by: Vlad Yasevich <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int sctp_inet6_bind_verify(struct sctp_sock *opt, union sctp_addr *addr)
{
struct sctp_af *af;
/* ASSERT: address family has already been verified. */
if (addr->sa.sa_family != AF_INET6)
af = sctp_get_af_specific(addr->sa.sa_family);
else {
int type = ipv6_addr_type(&addr->v6.sin6_addr);
struct net_device *dev;
if (type & IPV6_ADDR_LINKLOCAL) {
struct net *net;
if (!addr->v6.sin6_scope_id)
return 0;
net = sock_net(&opt->inet.sk);
rcu_read_lock();
dev = dev_get_by_index_rcu(net, addr->v6.sin6_scope_id);
if (!dev ||
!ipv6_chk_addr(net, &addr->v6.sin6_addr, dev, 0)) {
rcu_read_unlock();
return 0;
}
rcu_read_unlock();
} else if (type == IPV6_ADDR_MAPPED) {
if (!opt->v4mapped)
return 0;
}
af = opt->pf->af;
}
return af->available(addr, opt);
}
|
static int sctp_inet6_bind_verify(struct sctp_sock *opt, union sctp_addr *addr)
{
struct sctp_af *af;
/* ASSERT: address family has already been verified. */
if (addr->sa.sa_family != AF_INET6)
af = sctp_get_af_specific(addr->sa.sa_family);
else {
int type = ipv6_addr_type(&addr->v6.sin6_addr);
struct net_device *dev;
if (type & IPV6_ADDR_LINKLOCAL) {
struct net *net;
if (!addr->v6.sin6_scope_id)
return 0;
net = sock_net(&opt->inet.sk);
rcu_read_lock();
dev = dev_get_by_index_rcu(net, addr->v6.sin6_scope_id);
if (!dev ||
!ipv6_chk_addr(net, &addr->v6.sin6_addr, dev, 0)) {
rcu_read_unlock();
return 0;
}
rcu_read_unlock();
} else if (type == IPV6_ADDR_MAPPED) {
if (!opt->v4mapped)
return 0;
}
af = opt->pf->af;
}
return af->available(addr, opt);
}
|
C
|
linux
| 0 |
CVE-2015-2666
|
https://www.cvedetails.com/cve/CVE-2015-2666/
|
CWE-119
|
https://github.com/torvalds/linux/commit/f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4
|
f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4
|
x86/microcode/intel: Guard against stack overflow in the loader
mc_saved_tmp is a static array allocated on the stack, we need to make
sure mc_saved_count stays within its bounds, otherwise we're overflowing
the stack in _save_mc(). A specially crafted microcode header could lead
to a kernel crash or potentially kernel execution.
Signed-off-by: Quentin Casasnovas <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Fenghua Yu <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Borislav Petkov <[email protected]>
|
save_microcode(struct mc_saved_data *mc_saved_data,
struct microcode_intel **mc_saved_src,
unsigned int mc_saved_count)
{
int i, j;
struct microcode_intel **mc_saved_p;
int ret;
if (!mc_saved_count)
return -EINVAL;
/*
* Copy new microcode data.
*/
mc_saved_p = kmalloc(mc_saved_count*sizeof(struct microcode_intel *),
GFP_KERNEL);
if (!mc_saved_p)
return -ENOMEM;
for (i = 0; i < mc_saved_count; i++) {
struct microcode_intel *mc = mc_saved_src[i];
struct microcode_header_intel *mc_header = &mc->hdr;
unsigned long mc_size = get_totalsize(mc_header);
mc_saved_p[i] = kmalloc(mc_size, GFP_KERNEL);
if (!mc_saved_p[i]) {
ret = -ENOMEM;
goto err;
}
if (!mc_saved_src[i]) {
ret = -EINVAL;
goto err;
}
memcpy(mc_saved_p[i], mc, mc_size);
}
/*
* Point to newly saved microcode.
*/
mc_saved_data->mc_saved = mc_saved_p;
mc_saved_data->mc_saved_count = mc_saved_count;
return 0;
err:
for (j = 0; j <= i; j++)
kfree(mc_saved_p[j]);
kfree(mc_saved_p);
return ret;
}
|
save_microcode(struct mc_saved_data *mc_saved_data,
struct microcode_intel **mc_saved_src,
unsigned int mc_saved_count)
{
int i, j;
struct microcode_intel **mc_saved_p;
int ret;
if (!mc_saved_count)
return -EINVAL;
/*
* Copy new microcode data.
*/
mc_saved_p = kmalloc(mc_saved_count*sizeof(struct microcode_intel *),
GFP_KERNEL);
if (!mc_saved_p)
return -ENOMEM;
for (i = 0; i < mc_saved_count; i++) {
struct microcode_intel *mc = mc_saved_src[i];
struct microcode_header_intel *mc_header = &mc->hdr;
unsigned long mc_size = get_totalsize(mc_header);
mc_saved_p[i] = kmalloc(mc_size, GFP_KERNEL);
if (!mc_saved_p[i]) {
ret = -ENOMEM;
goto err;
}
if (!mc_saved_src[i]) {
ret = -EINVAL;
goto err;
}
memcpy(mc_saved_p[i], mc, mc_size);
}
/*
* Point to newly saved microcode.
*/
mc_saved_data->mc_saved = mc_saved_p;
mc_saved_data->mc_saved_count = mc_saved_count;
return 0;
err:
for (j = 0; j <= i; j++)
kfree(mc_saved_p[j]);
kfree(mc_saved_p);
return ret;
}
|
C
|
linux
| 0 |
CVE-2012-2891
|
https://www.cvedetails.com/cve/CVE-2012-2891/
|
CWE-200
|
https://github.com/chromium/chromium/commit/116d0963cadfbf55ef2ec3d13781987c4d80517a
|
116d0963cadfbf55ef2ec3d13781987c4d80517a
|
Print preview: Use an ID instead of memory pointer string in WebUI.
BUG=144051
Review URL: https://chromiumcodereview.appspot.com/10870003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153342 0039d316-1c4b-4281-b951-d872f2087c98
|
void PrintPreviewUI::OnDidGetDefaultPageLayout(
const PageSizeMargins& page_layout, const gfx::Rect& printable_area,
bool has_custom_page_size_style) {
if (page_layout.margin_top < 0 || page_layout.margin_left < 0 ||
page_layout.margin_bottom < 0 || page_layout.margin_right < 0 ||
page_layout.content_width < 0 || page_layout.content_height < 0 ||
printable_area.width() <= 0 || printable_area.height() <= 0) {
NOTREACHED();
return;
}
base::DictionaryValue layout;
layout.SetDouble(printing::kSettingMarginTop, page_layout.margin_top);
layout.SetDouble(printing::kSettingMarginLeft, page_layout.margin_left);
layout.SetDouble(printing::kSettingMarginBottom, page_layout.margin_bottom);
layout.SetDouble(printing::kSettingMarginRight, page_layout.margin_right);
layout.SetDouble(printing::kSettingContentWidth, page_layout.content_width);
layout.SetDouble(printing::kSettingContentHeight, page_layout.content_height);
layout.SetInteger(printing::kSettingPrintableAreaX, printable_area.x());
layout.SetInteger(printing::kSettingPrintableAreaY, printable_area.y());
layout.SetInteger(printing::kSettingPrintableAreaWidth,
printable_area.width());
layout.SetInteger(printing::kSettingPrintableAreaHeight,
printable_area.height());
base::FundamentalValue has_page_size_style(has_custom_page_size_style);
web_ui()->CallJavascriptFunction("onDidGetDefaultPageLayout", layout,
has_page_size_style);
}
|
void PrintPreviewUI::OnDidGetDefaultPageLayout(
const PageSizeMargins& page_layout, const gfx::Rect& printable_area,
bool has_custom_page_size_style) {
if (page_layout.margin_top < 0 || page_layout.margin_left < 0 ||
page_layout.margin_bottom < 0 || page_layout.margin_right < 0 ||
page_layout.content_width < 0 || page_layout.content_height < 0 ||
printable_area.width() <= 0 || printable_area.height() <= 0) {
NOTREACHED();
return;
}
base::DictionaryValue layout;
layout.SetDouble(printing::kSettingMarginTop, page_layout.margin_top);
layout.SetDouble(printing::kSettingMarginLeft, page_layout.margin_left);
layout.SetDouble(printing::kSettingMarginBottom, page_layout.margin_bottom);
layout.SetDouble(printing::kSettingMarginRight, page_layout.margin_right);
layout.SetDouble(printing::kSettingContentWidth, page_layout.content_width);
layout.SetDouble(printing::kSettingContentHeight, page_layout.content_height);
layout.SetInteger(printing::kSettingPrintableAreaX, printable_area.x());
layout.SetInteger(printing::kSettingPrintableAreaY, printable_area.y());
layout.SetInteger(printing::kSettingPrintableAreaWidth,
printable_area.width());
layout.SetInteger(printing::kSettingPrintableAreaHeight,
printable_area.height());
base::FundamentalValue has_page_size_style(has_custom_page_size_style);
web_ui()->CallJavascriptFunction("onDidGetDefaultPageLayout", layout,
has_page_size_style);
}
|
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(Phar, getSupportedCompression)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}
array_init(return_value);
phar_request_initialize();
if (PHAR_G(has_zlib)) {
add_next_index_stringl(return_value, "GZ", 2);
}
if (PHAR_G(has_bz2)) {
add_next_index_stringl(return_value, "BZIP2", 5);
}
}
|
PHP_METHOD(Phar, getSupportedCompression)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}
array_init(return_value);
phar_request_initialize();
if (PHAR_G(has_zlib)) {
add_next_index_stringl(return_value, "GZ", 2);
}
if (PHAR_G(has_bz2)) {
add_next_index_stringl(return_value, "BZIP2", 5);
}
}
|
C
|
php
| 0 |
CVE-2016-2464
|
https://www.cvedetails.com/cve/CVE-2016-2464/
|
CWE-20
|
https://android.googlesource.com/platform/external/libvpx/+/cc274e2abe8b2a6698a5c47d8aa4bb45f1f9538d
|
cc274e2abe8b2a6698a5c47d8aa4bb45f1f9538d
|
external/libvpx/libwebm: Update snapshot
Update libwebm snapshot. This update contains security fixes from upstream.
Upstream git hash: 229f49347d19b0ca0941e072b199a242ef6c5f2b
BUG=23167726
Change-Id: Id3e140e7b31ae11294724b1ecfe2e9c83b4d4207
(cherry picked from commit d0281a15b3c6bd91756e453cc9398c5ef412d99a)
|
BlockEntry::Kind BlockGroup::GetKind() const { return kBlockGroup; }
|
BlockEntry::Kind BlockGroup::GetKind() const { return kBlockGroup; }
|
C
|
Android
| 0 |
CVE-2016-2450
|
https://www.cvedetails.com/cve/CVE-2016-2450/
|
CWE-264
|
https://android.googlesource.com/platform/frameworks/av/+/7fd96ebfc4c9da496c59d7c45e1f62be178e626d
|
7fd96ebfc4c9da496c59d7c45e1f62be178e626d
|
codecs: check OMX buffer size before use in VP8 encoder.
Bug: 27569635
Change-Id: I469573f40e21dc9f4c200749d4f220e3a2d31761
|
static void InitOMXParams(T *params) {
params->nSize = sizeof(T);
params->nVersion.s.nVersionMajor = 1;
params->nVersion.s.nVersionMinor = 1;
params->nVersion.s.nRevision = 2;
params->nVersion.s.nStep = 0;
}
|
static void InitOMXParams(T *params) {
params->nSize = sizeof(T);
params->nVersion.s.nVersionMajor = 1;
params->nVersion.s.nVersionMinor = 1;
params->nVersion.s.nRevision = 2;
params->nVersion.s.nStep = 0;
}
|
C
|
Android
| 0 |
CVE-2016-5219
|
https://www.cvedetails.com/cve/CVE-2016-5219/
|
CWE-416
|
https://github.com/chromium/chromium/commit/a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
cheaper by minimizing the round-trip to the GPU thread.
Bug: 881152, 957001
Change-Id: Iadfa798af29225e752c710ca5c25f50b3dd3101a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586630
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657568}
|
bool GLES2DecoderPassthroughImpl::IsEmulatedFramebufferBound(
GLenum target) const {
if (!emulated_back_buffer_) {
return false;
}
if ((target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER) &&
bound_draw_framebuffer_ == 0) {
return true;
}
if (target == GL_READ_FRAMEBUFFER && bound_read_framebuffer_ == 0) {
return true;
}
return false;
}
|
bool GLES2DecoderPassthroughImpl::IsEmulatedFramebufferBound(
GLenum target) const {
if (!emulated_back_buffer_) {
return false;
}
if ((target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER) &&
bound_draw_framebuffer_ == 0) {
return true;
}
if (target == GL_READ_FRAMEBUFFER && bound_read_framebuffer_ == 0) {
return true;
}
return false;
}
|
C
|
Chrome
| 0 |
CVE-2017-5118
|
https://www.cvedetails.com/cve/CVE-2017-5118/
|
CWE-732
|
https://github.com/chromium/chromium/commit/0ab2412a104d2f235d7b9fe19d30ef605a410832
|
0ab2412a104d2f235d7b9fe19d30ef605a410832
|
Inherit CSP when we inherit the security origin
This prevents attacks that use main window navigation to get out of the
existing csp constraints such as the related bug
Bug: 747847
Change-Id: I1e57b50da17f65d38088205b0a3c7c49ef2ae4d8
Reviewed-on: https://chromium-review.googlesource.com/592027
Reviewed-by: Mike West <[email protected]>
Commit-Queue: Andy Paicu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#492333}
|
static void LiveNodeListBaseWriteBarrier(void* parent,
const LiveNodeListBase* list) {
if (IsHTMLCollectionType(list->GetType())) {
ScriptWrappableVisitor::WriteBarrier(
static_cast<const HTMLCollection*>(list));
} else {
ScriptWrappableVisitor::WriteBarrier(
static_cast<const LiveNodeList*>(list));
}
}
|
static void LiveNodeListBaseWriteBarrier(void* parent,
const LiveNodeListBase* list) {
if (IsHTMLCollectionType(list->GetType())) {
ScriptWrappableVisitor::WriteBarrier(
static_cast<const HTMLCollection*>(list));
} else {
ScriptWrappableVisitor::WriteBarrier(
static_cast<const LiveNodeList*>(list));
}
}
|
C
|
Chrome
| 0 |
CVE-2017-5120
|
https://www.cvedetails.com/cve/CVE-2017-5120/
| null |
https://github.com/chromium/chromium/commit/b7277af490d28ac7f802c015bb0ff31395768556
|
b7277af490d28ac7f802c015bb0ff31395768556
|
bindings: Support "attribute FrozenArray<T>?"
Adds a quick hack to support a case of "attribute FrozenArray<T>?".
Bug: 1028047
Change-Id: Ib3cecc4beb6bcc0fb0dbc667aca595454cc90c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933866
Reviewed-by: Hitoshi Yoshida <[email protected]>
Commit-Queue: Yuki Shiino <[email protected]>
Cr-Commit-Position: refs/heads/master@{#718676}
|
static void UrlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::ToImpl(holder);
V8SetReturnValueString(info, impl->GetURLAttribute(html_names::kUrlstringattributeAttr), info.GetIsolate());
}
|
static void UrlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::ToImpl(holder);
V8SetReturnValueString(info, impl->GetURLAttribute(html_names::kUrlstringattributeAttr), info.GetIsolate());
}
|
C
|
Chrome
| 0 |
CVE-2013-2128
|
https://www.cvedetails.com/cve/CVE-2013-2128/
|
CWE-119
|
https://github.com/torvalds/linux/commit/baff42ab1494528907bf4d5870359e31711746ae
|
baff42ab1494528907bf4d5870359e31711746ae
|
net: Fix oops from tcp_collapse() when using splice()
tcp_read_sock() can have a eat skbs without immediately advancing copied_seq.
This can cause a panic in tcp_collapse() if it is called as a result
of the recv_actor dropping the socket lock.
A userspace program that splices data from a socket to either another
socket or to a file can trigger this bug.
Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
int tcp_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
unsigned int optlen)
{
struct inet_connection_sock *icsk = inet_csk(sk);
if (level != SOL_TCP)
return icsk->icsk_af_ops->setsockopt(sk, level, optname,
optval, optlen);
return do_tcp_setsockopt(sk, level, optname, optval, optlen);
}
|
int tcp_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
unsigned int optlen)
{
struct inet_connection_sock *icsk = inet_csk(sk);
if (level != SOL_TCP)
return icsk->icsk_af_ops->setsockopt(sk, level, optname,
optval, optlen);
return do_tcp_setsockopt(sk, level, optname, optval, optlen);
}
|
C
|
linux
| 0 |
CVE-2017-11462
|
https://www.cvedetails.com/cve/CVE-2017-11462/
|
CWE-415
|
https://github.com/krb5/krb5/commit/56f7b1bc95a2a3eeb420e069e7655fb181ade5cf
|
56f7b1bc95a2a3eeb420e069e7655fb181ade5cf
|
Preserve GSS context on init/accept failure
After gss_init_sec_context() or gss_accept_sec_context() has created a
context, don't delete the mechglue context on failures from subsequent
calls, even if the mechanism deletes the mech-specific context (which
is allowed by RFC 2744 but not preferred). Check for union contexts
with no mechanism context in each GSS function which accepts a
gss_ctx_id_t.
CVE-2017-11462:
RFC 2744 permits a GSS-API implementation to delete an existing
security context on a second or subsequent call to
gss_init_sec_context() or gss_accept_sec_context() if the call results
in an error. This API behavior has been found to be dangerous,
leading to the possibility of memory errors in some callers. For
safety, GSS-API implementations should instead preserve existing
security contexts on error until the caller deletes them.
All versions of MIT krb5 prior to this change may delete acceptor
contexts on error. Versions 1.13.4 through 1.13.7, 1.14.1 through
1.14.5, and 1.15 through 1.15.1 may also delete initiator contexts on
error.
ticket: 8598 (new)
target_version: 1.15-next
target_version: 1.14-next
tags: pullup
|
val_wrap_args(OM_uint32 *minor_status,
gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
gss_buffer_t input_message_buffer,
int *conf_state,
gss_buffer_t output_message_buffer)
{
/* Initialize outputs. */
if (minor_status != NULL)
*minor_status = 0;
if (output_message_buffer != GSS_C_NO_BUFFER) {
output_message_buffer->length = 0;
output_message_buffer->value = NULL;
}
/* Validate arguments. */
if (minor_status == NULL)
return (GSS_S_CALL_INACCESSIBLE_WRITE);
if (context_handle == GSS_C_NO_CONTEXT)
return (GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT);
if (input_message_buffer == GSS_C_NO_BUFFER)
return (GSS_S_CALL_INACCESSIBLE_READ);
if (output_message_buffer == GSS_C_NO_BUFFER)
return (GSS_S_CALL_INACCESSIBLE_WRITE);
return (GSS_S_COMPLETE);
}
|
val_wrap_args(OM_uint32 *minor_status,
gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
gss_buffer_t input_message_buffer,
int *conf_state,
gss_buffer_t output_message_buffer)
{
/* Initialize outputs. */
if (minor_status != NULL)
*minor_status = 0;
if (output_message_buffer != GSS_C_NO_BUFFER) {
output_message_buffer->length = 0;
output_message_buffer->value = NULL;
}
/* Validate arguments. */
if (minor_status == NULL)
return (GSS_S_CALL_INACCESSIBLE_WRITE);
if (context_handle == GSS_C_NO_CONTEXT)
return (GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT);
if (input_message_buffer == GSS_C_NO_BUFFER)
return (GSS_S_CALL_INACCESSIBLE_READ);
if (output_message_buffer == GSS_C_NO_BUFFER)
return (GSS_S_CALL_INACCESSIBLE_WRITE);
return (GSS_S_COMPLETE);
}
|
C
|
krb5
| 0 |
CVE-2013-6376
|
https://www.cvedetails.com/cve/CVE-2013-6376/
|
CWE-189
|
https://github.com/torvalds/linux/commit/17d68b763f09a9ce824ae23eb62c9efc57b69271
|
17d68b763f09a9ce824ae23eb62c9efc57b69271
|
KVM: x86: fix guest-initiated crash with x2apic (CVE-2013-6376)
A guest can cause a BUG_ON() leading to a host kernel crash.
When the guest writes to the ICR to request an IPI, while in x2apic
mode the following things happen, the destination is read from
ICR2, which is a register that the guest can control.
kvm_irq_delivery_to_apic_fast uses the high 16 bits of ICR2 as the
cluster id. A BUG_ON is triggered, which is a protection against
accessing map->logical_map with an out-of-bounds access and manages
to avoid that anything really unsafe occurs.
The logic in the code is correct from real HW point of view. The problem
is that KVM supports only one cluster with ID 0 in clustered mode, but
the code that has the bug does not take this into account.
Reported-by: Lars Bull <[email protected]>
Cc: [email protected]
Signed-off-by: Gleb Natapov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
int kvm_hv_vapic_msr_write(struct kvm_vcpu *vcpu, u32 reg, u64 data)
{
struct kvm_lapic *apic = vcpu->arch.apic;
if (!kvm_vcpu_has_lapic(vcpu))
return 1;
/* if this is ICR write vector before command */
if (reg == APIC_ICR)
apic_reg_write(apic, APIC_ICR2, (u32)(data >> 32));
return apic_reg_write(apic, reg, (u32)data);
}
|
int kvm_hv_vapic_msr_write(struct kvm_vcpu *vcpu, u32 reg, u64 data)
{
struct kvm_lapic *apic = vcpu->arch.apic;
if (!kvm_vcpu_has_lapic(vcpu))
return 1;
/* if this is ICR write vector before command */
if (reg == APIC_ICR)
apic_reg_write(apic, APIC_ICR2, (u32)(data >> 32));
return apic_reg_write(apic, reg, (u32)data);
}
|
C
|
linux
| 0 |
CVE-2018-13406
|
https://www.cvedetails.com/cve/CVE-2018-13406/
|
CWE-190
|
https://github.com/torvalds/linux/commit/9f645bcc566a1e9f921bdae7528a01ced5bc3713
|
9f645bcc566a1e9f921bdae7528a01ced5bc3713
|
video: uvesafb: Fix integer overflow in allocation
cmap->len can get close to INT_MAX/2, allowing for an integer overflow in
allocation. This uses kmalloc_array() instead to catch the condition.
Reported-by: Dr Silvio Cesare of InfoSect <[email protected]>
Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core")
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
|
static void uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task,
struct fb_info *info)
{
struct uvesafb_par *par = info->par;
int i;
memset(&info->monspecs, 0, sizeof(info->monspecs));
/*
* If we don't get all necessary data from the EDID block,
* mark it as incompatible with the GTF and set nocrtc so
* that we always use the default BIOS refresh rate.
*/
if (uvesafb_vbe_getedid(task, info)) {
info->monspecs.gtf = 0;
par->nocrtc = 1;
}
/* Kernel command line overrides. */
if (maxclk)
info->monspecs.dclkmax = maxclk * 1000000;
if (maxvf)
info->monspecs.vfmax = maxvf;
if (maxhf)
info->monspecs.hfmax = maxhf * 1000;
/*
* In case DDC transfers are not supported, the user can provide
* monitor limits manually. Lower limits are set to "safe" values.
*/
if (info->monspecs.gtf == 0 && maxclk && maxvf && maxhf) {
info->monspecs.dclkmin = 0;
info->monspecs.vfmin = 60;
info->monspecs.hfmin = 29000;
info->monspecs.gtf = 1;
par->nocrtc = 0;
}
if (info->monspecs.gtf)
pr_info("monitor limits: vf = %d Hz, hf = %d kHz, clk = %d MHz\n",
info->monspecs.vfmax,
(int)(info->monspecs.hfmax / 1000),
(int)(info->monspecs.dclkmax / 1000000));
else
pr_info("no monitor limits have been set, default refresh rate will be used\n");
/* Add VBE modes to the modelist. */
for (i = 0; i < par->vbe_modes_cnt; i++) {
struct fb_var_screeninfo var;
struct vbe_mode_ib *mode;
struct fb_videomode vmode;
mode = &par->vbe_modes[i];
memset(&var, 0, sizeof(var));
var.xres = mode->x_res;
var.yres = mode->y_res;
fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, &var, info);
fb_var_to_videomode(&vmode, &var);
fb_add_videomode(&vmode, &info->modelist);
}
/* Add valid VESA modes to our modelist. */
for (i = 0; i < VESA_MODEDB_SIZE; i++) {
if (uvesafb_is_valid_mode((struct fb_videomode *)
&vesa_modes[i], info))
fb_add_videomode(&vesa_modes[i], &info->modelist);
}
for (i = 0; i < info->monspecs.modedb_len; i++) {
if (uvesafb_is_valid_mode(&info->monspecs.modedb[i], info))
fb_add_videomode(&info->monspecs.modedb[i],
&info->modelist);
}
return;
}
|
static void uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task,
struct fb_info *info)
{
struct uvesafb_par *par = info->par;
int i;
memset(&info->monspecs, 0, sizeof(info->monspecs));
/*
* If we don't get all necessary data from the EDID block,
* mark it as incompatible with the GTF and set nocrtc so
* that we always use the default BIOS refresh rate.
*/
if (uvesafb_vbe_getedid(task, info)) {
info->monspecs.gtf = 0;
par->nocrtc = 1;
}
/* Kernel command line overrides. */
if (maxclk)
info->monspecs.dclkmax = maxclk * 1000000;
if (maxvf)
info->monspecs.vfmax = maxvf;
if (maxhf)
info->monspecs.hfmax = maxhf * 1000;
/*
* In case DDC transfers are not supported, the user can provide
* monitor limits manually. Lower limits are set to "safe" values.
*/
if (info->monspecs.gtf == 0 && maxclk && maxvf && maxhf) {
info->monspecs.dclkmin = 0;
info->monspecs.vfmin = 60;
info->monspecs.hfmin = 29000;
info->monspecs.gtf = 1;
par->nocrtc = 0;
}
if (info->monspecs.gtf)
pr_info("monitor limits: vf = %d Hz, hf = %d kHz, clk = %d MHz\n",
info->monspecs.vfmax,
(int)(info->monspecs.hfmax / 1000),
(int)(info->monspecs.dclkmax / 1000000));
else
pr_info("no monitor limits have been set, default refresh rate will be used\n");
/* Add VBE modes to the modelist. */
for (i = 0; i < par->vbe_modes_cnt; i++) {
struct fb_var_screeninfo var;
struct vbe_mode_ib *mode;
struct fb_videomode vmode;
mode = &par->vbe_modes[i];
memset(&var, 0, sizeof(var));
var.xres = mode->x_res;
var.yres = mode->y_res;
fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, &var, info);
fb_var_to_videomode(&vmode, &var);
fb_add_videomode(&vmode, &info->modelist);
}
/* Add valid VESA modes to our modelist. */
for (i = 0; i < VESA_MODEDB_SIZE; i++) {
if (uvesafb_is_valid_mode((struct fb_videomode *)
&vesa_modes[i], info))
fb_add_videomode(&vesa_modes[i], &info->modelist);
}
for (i = 0; i < info->monspecs.modedb_len; i++) {
if (uvesafb_is_valid_mode(&info->monspecs.modedb[i], info))
fb_add_videomode(&info->monspecs.modedb[i],
&info->modelist);
}
return;
}
|
C
|
linux
| 0 |
CVE-2017-7376
|
https://www.cvedetails.com/cve/CVE-2017-7376/
|
CWE-119
|
https://android.googlesource.com/platform/external/libxml2/+/51e0cb2e5ec18eaf6fb331bc573ff27b743898f4
|
51e0cb2e5ec18eaf6fb331bc573ff27b743898f4
|
DO NOT MERGE: Use correct limit for port values
no upstream report yet, add it here when we have it
issue found & patch by nmehta@
Bug: 36555370
Change-Id: Ibf1efea554b95f514e23e939363d608021de4614
(cherry picked from commit b62884fb49fe92081e414966d9b5fe58250ae53c)
|
static int is_hex(char c) {
if (((c >= '0') && (c <= '9')) ||
((c >= 'a') && (c <= 'f')) ||
((c >= 'A') && (c <= 'F')))
return(1);
return(0);
}
|
static int is_hex(char c) {
if (((c >= '0') && (c <= '9')) ||
((c >= 'a') && (c <= 'f')) ||
((c >= 'A') && (c <= 'F')))
return(1);
return(0);
}
|
C
|
Android
| 0 |
CVE-2016-0723
|
https://www.cvedetails.com/cve/CVE-2016-0723/
|
CWE-362
|
https://github.com/torvalds/linux/commit/5c17c861a357e9458001f021a7afa7aab9937439
|
5c17c861a357e9458001f021a7afa7aab9937439
|
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
ioctl(TIOCGETD) retrieves the line discipline id directly from the
ldisc because the line discipline id (c_line) in termios is untrustworthy;
userspace may have set termios via ioctl(TCSETS*) without actually
changing the line discipline via ioctl(TIOCSETD).
However, directly accessing the current ldisc via tty->ldisc is
unsafe; the ldisc ptr dereferenced may be stale if the line discipline
is changing via ioctl(TIOCSETD) or hangup.
Wait for the line discipline reference (just like read() or write())
to retrieve the "current" line discipline id.
Cc: <[email protected]>
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static void proc_set_tty(struct tty_struct *tty)
{
spin_lock_irq(¤t->sighand->siglock);
__proc_set_tty(tty);
spin_unlock_irq(¤t->sighand->siglock);
}
|
static void proc_set_tty(struct tty_struct *tty)
{
spin_lock_irq(¤t->sighand->siglock);
__proc_set_tty(tty);
spin_unlock_irq(¤t->sighand->siglock);
}
|
C
|
linux
| 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}
|
gfx::Size Browser::EnterPictureInPicture(const viz::SurfaceId& surface_id,
const gfx::Size& natural_size) {
return PictureInPictureWindowManager::GetInstance()->EnterPictureInPicture(
tab_strip_model_->GetActiveWebContents(), surface_id, natural_size);
}
|
gfx::Size Browser::EnterPictureInPicture(const viz::SurfaceId& surface_id,
const gfx::Size& natural_size) {
return PictureInPictureWindowManager::GetInstance()->EnterPictureInPicture(
tab_strip_model_->GetActiveWebContents(), surface_id, natural_size);
}
|
C
|
Chrome
| 0 |
CVE-2018-16540
|
https://www.cvedetails.com/cve/CVE-2018-16540/
|
CWE-416
|
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=c432131c3fdb2143e148e8ba88555f7f7a63b25e
|
c432131c3fdb2143e148e8ba88555f7f7a63b25e
| null |
pdf14_disable_device(gx_device * dev)
{
gx_device_forward * pdev = (gx_device_forward *)dev;
if_debug0m('v', dev->memory, "[v]pdf14_disable_device\n");
dev->color_info = pdev->target->color_info;
pdf14_forward_device_procs(dev);
set_dev_proc(dev, create_compositor, pdf14_forward_create_compositor);
return 0;
}
|
pdf14_disable_device(gx_device * dev)
{
gx_device_forward * pdev = (gx_device_forward *)dev;
if_debug0m('v', dev->memory, "[v]pdf14_disable_device\n");
dev->color_info = pdev->target->color_info;
pdf14_forward_device_procs(dev);
set_dev_proc(dev, create_compositor, pdf14_forward_create_compositor);
return 0;
}
|
C
|
ghostscript
| 0 |
CVE-2016-7097
|
https://www.cvedetails.com/cve/CVE-2016-7097/
|
CWE-285
|
https://github.com/torvalds/linux/commit/073931017b49d9458aa351605b43a7e34598caef
|
073931017b49d9458aa351605b43a7e34598caef
|
posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't clear the setgid bit in
a similar way; this allows to bypass the check in chmod(2). Fix that.
References: CVE-2016-7097
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Andreas Gruenbacher <[email protected]>
|
int f2fs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
{
return __f2fs_set_acl(inode, type, acl, NULL);
}
|
int f2fs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
{
return __f2fs_set_acl(inode, type, acl, NULL);
}
|
C
|
linux
| 0 |
CVE-2015-1274
|
https://www.cvedetails.com/cve/CVE-2015-1274/
|
CWE-254
|
https://github.com/chromium/chromium/commit/d27468a832d5316884bd02f459cbf493697fd7e1
|
d27468a832d5316884bd02f459cbf493697fd7e1
|
Switch to equalIgnoringASCIICase throughout modules/accessibility
BUG=627682
Review-Url: https://codereview.chromium.org/2793913007
Cr-Commit-Position: refs/heads/master@{#461858}
|
AXID AXObjectCacheImpl::generateAXID() const {
static AXID lastUsedID = 0;
AXID objID = lastUsedID;
do {
++objID;
} while (!objID || HashTraits<AXID>::isDeletedValue(objID) ||
m_idsInUse.contains(objID));
lastUsedID = objID;
return objID;
}
|
AXID AXObjectCacheImpl::generateAXID() const {
static AXID lastUsedID = 0;
AXID objID = lastUsedID;
do {
++objID;
} while (!objID || HashTraits<AXID>::isDeletedValue(objID) ||
m_idsInUse.contains(objID));
lastUsedID = objID;
return objID;
}
|
C
|
Chrome
| 0 |
CVE-2016-1586
|
https://www.cvedetails.com/cve/CVE-2016-1586/
|
CWE-20
|
https://git.launchpad.net/oxide/commit/?id=29014da83e5fc358d6bff0f574e9ed45e61a35ac
|
29014da83e5fc358d6bff0f574e9ed45e61a35ac
| null |
OxideQQuickWebViewPrivate::CreateBeforeUnloadDialog(
oxide::qt::JavaScriptDialogProxyClient* client) {
Q_Q(OxideQQuickWebView);
return new oxide::qquick::BeforeUnloadDialog(q, client);
}
|
OxideQQuickWebViewPrivate::CreateBeforeUnloadDialog(
oxide::qt::JavaScriptDialogProxyClient* client) {
Q_Q(OxideQQuickWebView);
return new oxide::qquick::BeforeUnloadDialog(q, client);
}
|
CPP
|
launchpad
| 0 |
CVE-2018-13006
|
https://www.cvedetails.com/cve/CVE-2018-13006/
|
CWE-125
|
https://github.com/gpac/gpac/commit/bceb03fd2be95097a7b409ea59914f332fb6bc86
|
bceb03fd2be95097a7b409ea59914f332fb6bc86
|
fixed 2 possible heap overflows (inc. #1088)
|
void metx_del(GF_Box *s)
{
GF_MetaDataSampleEntryBox *ptr = (GF_MetaDataSampleEntryBox*)s;
if (ptr == NULL) return;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)s);
if (ptr->content_encoding) gf_free(ptr->content_encoding);
if (ptr->xml_namespace) gf_free(ptr->xml_namespace);
if (ptr->xml_schema_loc) gf_free(ptr->xml_schema_loc);
if (ptr->mime_type) gf_free(ptr->mime_type);
if (ptr->config) gf_isom_box_del((GF_Box *)ptr->config);
gf_free(ptr);
}
|
void metx_del(GF_Box *s)
{
GF_MetaDataSampleEntryBox *ptr = (GF_MetaDataSampleEntryBox*)s;
if (ptr == NULL) return;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)s);
if (ptr->content_encoding) gf_free(ptr->content_encoding);
if (ptr->xml_namespace) gf_free(ptr->xml_namespace);
if (ptr->xml_schema_loc) gf_free(ptr->xml_schema_loc);
if (ptr->mime_type) gf_free(ptr->mime_type);
if (ptr->config) gf_isom_box_del((GF_Box *)ptr->config);
gf_free(ptr);
}
|
C
|
gpac
| 0 |
CVE-2016-1675
|
https://www.cvedetails.com/cve/CVE-2016-1675/
|
CWE-284
|
https://github.com/chromium/chromium/commit/b276d0570cc816bfe25b431f2ee9bc265a6ad478
|
b276d0570cc816bfe25b431f2ee9bc265a6ad478
|
Fix one implicit 64-bit -> 32-bit implicit conversion in a PPAPI test.
../../ppapi/tests/test_url_loader.cc:877:11: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
total_bytes_to_be_received);
^~~~~~~~~~~~~~~~~~~~~~~~~~
BUG=879657
Change-Id: I152f456368131fe7a2891ff0c97bf83f26ef0906
Reviewed-on: https://chromium-review.googlesource.com/c/1220173
Commit-Queue: Raymes Khoury <[email protected]>
Reviewed-by: Raymes Khoury <[email protected]>
Cr-Commit-Position: refs/heads/master@{#600182}
|
std::string TestURLLoader::TestUntrustedSameOriginRestriction() {
pp::URLRequestInfo request(instance_);
std::string cross_origin_url = GetReachableCrossOriginURL("test_case.html");
request.SetURL(cross_origin_url);
int32_t rv = OpenUntrusted(request, NULL);
if (rv != PP_ERROR_NOACCESS)
return ReportError(
"Untrusted, unintended cross-origin request restriction", rv);
PASS();
}
|
std::string TestURLLoader::TestUntrustedSameOriginRestriction() {
pp::URLRequestInfo request(instance_);
std::string cross_origin_url = GetReachableCrossOriginURL("test_case.html");
request.SetURL(cross_origin_url);
int32_t rv = OpenUntrusted(request, NULL);
if (rv != PP_ERROR_NOACCESS)
return ReportError(
"Untrusted, unintended cross-origin request restriction", rv);
PASS();
}
|
C
|
Chrome
| 0 |
CVE-2011-1768
|
https://www.cvedetails.com/cve/CVE-2011-1768/
|
CWE-362
|
https://github.com/torvalds/linux/commit/d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
|
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
|
tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
ip6_tnl_lookup(struct net *net, struct in6_addr *remote, struct in6_addr *local)
{
unsigned h0 = HASH(remote);
unsigned h1 = HASH(local);
struct ip6_tnl *t;
struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
for_each_ip6_tunnel_rcu(ip6n->tnls_r_l[h0 ^ h1]) {
if (ipv6_addr_equal(local, &t->parms.laddr) &&
ipv6_addr_equal(remote, &t->parms.raddr) &&
(t->dev->flags & IFF_UP))
return t;
}
t = rcu_dereference(ip6n->tnls_wc[0]);
if (t && (t->dev->flags & IFF_UP))
return t;
return NULL;
}
|
ip6_tnl_lookup(struct net *net, struct in6_addr *remote, struct in6_addr *local)
{
unsigned h0 = HASH(remote);
unsigned h1 = HASH(local);
struct ip6_tnl *t;
struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
for_each_ip6_tunnel_rcu(ip6n->tnls_r_l[h0 ^ h1]) {
if (ipv6_addr_equal(local, &t->parms.laddr) &&
ipv6_addr_equal(remote, &t->parms.raddr) &&
(t->dev->flags & IFF_UP))
return t;
}
t = rcu_dereference(ip6n->tnls_wc[0]);
if (t && (t->dev->flags & IFF_UP))
return t;
return NULL;
}
|
C
|
linux
| 0 |
CVE-2018-16427
|
https://www.cvedetails.com/cve/CVE-2018-16427/
|
CWE-125
|
https://github.com/OpenSC/OpenSC/pull/1447/commits/8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
|
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
|
fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes.
|
gpk_get_default_key(sc_card_t *card, struct sc_cardctl_default_key *data)
{
if (data->method == SC_AC_PRO && data->key_ref == 1) {
if (data->len < 16)
return SC_ERROR_BUFFER_TOO_SMALL;
memcpy(data->key_data, "TEST KEYTEST KEY", 16);
data->len = 16;
return 0;
}
return SC_ERROR_NO_DEFAULT_KEY;
}
|
gpk_get_default_key(sc_card_t *card, struct sc_cardctl_default_key *data)
{
if (data->method == SC_AC_PRO && data->key_ref == 1) {
if (data->len < 16)
return SC_ERROR_BUFFER_TOO_SMALL;
memcpy(data->key_data, "TEST KEYTEST KEY", 16);
data->len = 16;
return 0;
}
return SC_ERROR_NO_DEFAULT_KEY;
}
|
C
|
OpenSC
| 0 |
CVE-2017-5035
|
https://www.cvedetails.com/cve/CVE-2017-5035/
|
CWE-362
|
https://github.com/chromium/chromium/commit/c32cd2069ae8062b52e5b7b1faf5936bd71a583a
|
c32cd2069ae8062b52e5b7b1faf5936bd71a583a
|
Add DumpWithoutCrashing in RendererDidNavigateToExistingPage
This is intended to be reverted after investigating the linked bug.
BUG=688425
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2701523004
Cr-Commit-Position: refs/heads/master@{#450900}
|
bool NavigationControllerImpl::CanViewSource() const {
const std::string& mime_type = delegate_->GetContentsMimeType();
bool is_viewable_mime_type =
mime_util::IsSupportedNonImageMimeType(mime_type) &&
!media::IsSupportedMediaMimeType(mime_type);
NavigationEntry* visible_entry = GetVisibleEntry();
return visible_entry && !visible_entry->IsViewSourceMode() &&
is_viewable_mime_type && !delegate_->GetInterstitialPage();
}
|
bool NavigationControllerImpl::CanViewSource() const {
const std::string& mime_type = delegate_->GetContentsMimeType();
bool is_viewable_mime_type =
mime_util::IsSupportedNonImageMimeType(mime_type) &&
!media::IsSupportedMediaMimeType(mime_type);
NavigationEntry* visible_entry = GetVisibleEntry();
return visible_entry && !visible_entry->IsViewSourceMode() &&
is_viewable_mime_type && !delegate_->GetInterstitialPage();
}
|
C
|
Chrome
| 0 |
CVE-2013-4533
|
https://www.cvedetails.com/cve/CVE-2013-4533/
|
CWE-119
|
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=caa881abe0e01f9931125a0977ec33c5343e4aa7
|
caa881abe0e01f9931125a0977ec33c5343e4aa7
| null |
static uint64_t pxa2xx_clkcfg_read(CPUARMState *env, const ARMCPRegInfo *ri)
{
PXA2xxState *s = (PXA2xxState *)ri->opaque;
return s->clkcfg;
}
|
static uint64_t pxa2xx_clkcfg_read(CPUARMState *env, const ARMCPRegInfo *ri)
{
PXA2xxState *s = (PXA2xxState *)ri->opaque;
return s->clkcfg;
}
|
C
|
qemu
| 0 |
CVE-2019-14763
|
https://www.cvedetails.com/cve/CVE-2019-14763/
|
CWE-189
|
https://github.com/torvalds/linux/commit/c91815b596245fd7da349ecc43c8def670d2269e
|
c91815b596245fd7da349ecc43c8def670d2269e
|
usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_lock_irqsave(&hidg->write_spinlock, flags); // first acquire
/* we our function has been disabled by host */
if (!hidg->req) {
free_ep_req(hidg->in_ep, hidg->req);
goto try_again;
}
[...]
status = usb_ep_queue(hidg->in_ep, hidg->req, GFP_ATOMIC);
=>
[...]
=> usb_gadget_giveback_request
=>
f_hidg_req_complete
=>
spin_lock_irqsave(&hidg->write_spinlock, flags); // second acquire
Note that this happens because dwc3 would call ->complete() on a
failed usb_ep_queue() due to failed Start Transfer command. This is,
anyway, a theoretical situation because dwc3 currently uses "No
Response Update Transfer" command for Bulk and Interrupt endpoints.
It's still good to make this case impossible to happen even if the "No
Reponse Update Transfer" command is changed.
Reported-by: Tuba Yavuz <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static int __dwc3_gadget_get_frame(struct dwc3 *dwc)
{
u32 reg;
reg = dwc3_readl(dwc->regs, DWC3_DSTS);
return DWC3_DSTS_SOFFN(reg);
}
|
static int __dwc3_gadget_get_frame(struct dwc3 *dwc)
{
u32 reg;
reg = dwc3_readl(dwc->regs, DWC3_DSTS);
return DWC3_DSTS_SOFFN(reg);
}
|
C
|
linux
| 0 |
CVE-2019-12982
|
https://www.cvedetails.com/cve/CVE-2019-12982/
|
CWE-119
|
https://github.com/libming/libming/pull/179/commits/2be22fcf56a223dafe8de0e8a20fe20e8bbdb0b9
|
2be22fcf56a223dafe8de0e8a20fe20e8bbdb0b9
|
decompileAction: Prevent heap buffer overflow and underflow with using OpCode
|
dcputchar(char c)
{
dcchkstr(1);
*dcptr++=c;
*dcptr='\000';
strsize++;
}
|
dcputchar(char c)
{
dcchkstr(1);
*dcptr++=c;
*dcptr='\000';
strsize++;
}
|
C
|
libming
| 0 |
CVE-2017-6903
|
https://www.cvedetails.com/cve/CVE-2017-6903/
|
CWE-269
|
https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd
|
376267d534476a875d8b9228149c4ee18b74a4fd
|
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
|
void CL_CheckForResend( void ) {
int port;
char info[MAX_INFO_STRING];
char data[MAX_INFO_STRING + 10];
if ( clc.demoplaying ) {
return;
}
if ( clc.state != CA_CONNECTING && clc.state != CA_CHALLENGING ) {
return;
}
if ( cls.realtime - clc.connectTime < RETRANSMIT_TIMEOUT ) {
return;
}
clc.connectTime = cls.realtime; // for retransmit requests
clc.connectPacketCount++;
switch ( clc.state ) {
case CA_CONNECTING:
#ifndef STANDALONE
if (!com_standalone->integer && clc.serverAddress.type == NA_IP && !Sys_IsLANAddress( clc.serverAddress ) )
CL_RequestAuthorization();
#endif
Com_sprintf(data, sizeof(data), "getchallenge %d %s", clc.challenge, com_gamename->string);
NET_OutOfBandPrint(NS_CLIENT, clc.serverAddress, "%s", data);
break;
case CA_CHALLENGING:
port = Cvar_VariableValue ("net_qport");
Q_strncpyz( info, Cvar_InfoString( CVAR_USERINFO ), sizeof( info ) );
#ifdef LEGACY_PROTOCOL
if(com_legacyprotocol->integer == com_protocol->integer)
clc.compat = qtrue;
if(clc.compat)
Info_SetValueForKey(info, "protocol", va("%i", com_legacyprotocol->integer));
else
#endif
Info_SetValueForKey(info, "protocol", va("%i", com_protocol->integer));
Info_SetValueForKey( info, "qport", va("%i", port ) );
Info_SetValueForKey( info, "challenge", va("%i", clc.challenge ) );
Com_sprintf( data, sizeof(data), "connect \"%s\"", info );
NET_OutOfBandData( NS_CLIENT, clc.serverAddress, (byte *) data, strlen ( data ) );
cvar_modifiedFlags &= ~CVAR_USERINFO;
break;
default:
Com_Error( ERR_FATAL, "CL_CheckForResend: bad clc.state" );
}
}
|
void CL_CheckForResend( void ) {
int port;
char info[MAX_INFO_STRING];
char data[MAX_INFO_STRING + 10];
if ( clc.demoplaying ) {
return;
}
if ( clc.state != CA_CONNECTING && clc.state != CA_CHALLENGING ) {
return;
}
if ( cls.realtime - clc.connectTime < RETRANSMIT_TIMEOUT ) {
return;
}
clc.connectTime = cls.realtime; // for retransmit requests
clc.connectPacketCount++;
switch ( clc.state ) {
case CA_CONNECTING:
#ifndef STANDALONE
if (!com_standalone->integer && clc.serverAddress.type == NA_IP && !Sys_IsLANAddress( clc.serverAddress ) )
CL_RequestAuthorization();
#endif
Com_sprintf(data, sizeof(data), "getchallenge %d %s", clc.challenge, com_gamename->string);
NET_OutOfBandPrint(NS_CLIENT, clc.serverAddress, "%s", data);
break;
case CA_CHALLENGING:
port = Cvar_VariableValue ("net_qport");
Q_strncpyz( info, Cvar_InfoString( CVAR_USERINFO ), sizeof( info ) );
#ifdef LEGACY_PROTOCOL
if(com_legacyprotocol->integer == com_protocol->integer)
clc.compat = qtrue;
if(clc.compat)
Info_SetValueForKey(info, "protocol", va("%i", com_legacyprotocol->integer));
else
#endif
Info_SetValueForKey(info, "protocol", va("%i", com_protocol->integer));
Info_SetValueForKey( info, "qport", va("%i", port ) );
Info_SetValueForKey( info, "challenge", va("%i", clc.challenge ) );
Com_sprintf( data, sizeof(data), "connect \"%s\"", info );
NET_OutOfBandData( NS_CLIENT, clc.serverAddress, (byte *) data, strlen ( data ) );
cvar_modifiedFlags &= ~CVAR_USERINFO;
break;
default:
Com_Error( ERR_FATAL, "CL_CheckForResend: bad clc.state" );
}
}
|
C
|
OpenJK
| 0 |
CVE-2018-1000050
|
https://www.cvedetails.com/cve/CVE-2018-1000050/
|
CWE-119
|
https://github.com/nothings/stb/commit/244d83bc3d859293f55812d48b3db168e581f6ab
|
244d83bc3d859293f55812d48b3db168e581f6ab
|
fix unchecked length in stb_vorbis that could crash on corrupt/invalid files
|
static uint32 vorbis_find_page(stb_vorbis *f, uint32 *end, uint32 *last)
{
for(;;) {
int n;
if (f->eof) return 0;
n = get8(f);
if (n == 0x4f) { // page header candidate
unsigned int retry_loc = stb_vorbis_get_file_offset(f);
int i;
if (retry_loc - 25 > f->stream_len)
return 0;
for (i=1; i < 4; ++i)
if (get8(f) != ogg_page_header[i])
break;
if (f->eof) return 0;
if (i == 4) {
uint8 header[27];
uint32 i, crc, goal, len;
for (i=0; i < 4; ++i)
header[i] = ogg_page_header[i];
for (; i < 27; ++i)
header[i] = get8(f);
if (f->eof) return 0;
if (header[4] != 0) goto invalid;
goal = header[22] + (header[23] << 8) + (header[24]<<16) + (header[25]<<24);
for (i=22; i < 26; ++i)
header[i] = 0;
crc = 0;
for (i=0; i < 27; ++i)
crc = crc32_update(crc, header[i]);
len = 0;
for (i=0; i < header[26]; ++i) {
int s = get8(f);
crc = crc32_update(crc, s);
len += s;
}
if (len && f->eof) return 0;
for (i=0; i < len; ++i)
crc = crc32_update(crc, get8(f));
if (crc == goal) {
if (end)
*end = stb_vorbis_get_file_offset(f);
if (last) {
if (header[5] & 0x04)
*last = 1;
else
*last = 0;
}
set_file_offset(f, retry_loc-1);
return 1;
}
}
invalid:
set_file_offset(f, retry_loc);
}
}
}
|
static uint32 vorbis_find_page(stb_vorbis *f, uint32 *end, uint32 *last)
{
for(;;) {
int n;
if (f->eof) return 0;
n = get8(f);
if (n == 0x4f) { // page header candidate
unsigned int retry_loc = stb_vorbis_get_file_offset(f);
int i;
if (retry_loc - 25 > f->stream_len)
return 0;
for (i=1; i < 4; ++i)
if (get8(f) != ogg_page_header[i])
break;
if (f->eof) return 0;
if (i == 4) {
uint8 header[27];
uint32 i, crc, goal, len;
for (i=0; i < 4; ++i)
header[i] = ogg_page_header[i];
for (; i < 27; ++i)
header[i] = get8(f);
if (f->eof) return 0;
if (header[4] != 0) goto invalid;
goal = header[22] + (header[23] << 8) + (header[24]<<16) + (header[25]<<24);
for (i=22; i < 26; ++i)
header[i] = 0;
crc = 0;
for (i=0; i < 27; ++i)
crc = crc32_update(crc, header[i]);
len = 0;
for (i=0; i < header[26]; ++i) {
int s = get8(f);
crc = crc32_update(crc, s);
len += s;
}
if (len && f->eof) return 0;
for (i=0; i < len; ++i)
crc = crc32_update(crc, get8(f));
if (crc == goal) {
if (end)
*end = stb_vorbis_get_file_offset(f);
if (last) {
if (header[5] & 0x04)
*last = 1;
else
*last = 0;
}
set_file_offset(f, retry_loc-1);
return 1;
}
}
invalid:
set_file_offset(f, retry_loc);
}
}
}
|
C
|
stb
| 0 |
CVE-2015-1539
|
https://www.cvedetails.com/cve/CVE-2015-1539/
|
CWE-189
|
https://android.googlesource.com/platform/frameworks/av/+/5e751957ba692658b7f67eb03ae5ddb2cd3d970c
|
5e751957ba692658b7f67eb03ae5ddb2cd3d970c
|
Fix integer underflow in ESDS processing
Several arithmetic operations within parseESDescriptor could underflow, leading
to an out-of-bounds read operation. Ensure that subtractions from 'size' do not
cause it to wrap around.
Bug: 20139950
(cherry picked from commit 07c0f59d6c48874982d2b5c713487612e5af465a)
Change-Id: I377d21051e07ca654ea1f7037120429d3f71924a
|
status_t ESDS::getCodecSpecificInfo(const void **data, size_t *size) const {
if (mInitCheck != OK) {
return mInitCheck;
}
*data = &mData[mDecoderSpecificOffset];
*size = mDecoderSpecificLength;
return OK;
}
|
status_t ESDS::getCodecSpecificInfo(const void **data, size_t *size) const {
if (mInitCheck != OK) {
return mInitCheck;
}
*data = &mData[mDecoderSpecificOffset];
*size = mDecoderSpecificLength;
return OK;
}
|
C
|
Android
| 0 |
CVE-2019-6978
|
https://www.cvedetails.com/cve/CVE-2019-6978/
|
CWE-415
|
https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae
|
089f7c0bc28d399b0420aa6ef058e4c1c120b2ae
|
Sync with upstream
Even though libgd/libgd#492 is not a relevant bug fix for PHP, since
the binding doesn't use the `gdImage*Ptr()` functions at all, we're
porting the fix to stay in sync here.
|
safeboolean empty_output_buffer (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
if (gdPutBuf (dest->buffer, OUTPUT_BUF_SIZE, dest->outfile) != (size_t) OUTPUT_BUF_SIZE) {
ERREXIT (cinfo, JERR_FILE_WRITE);
}
dest->pub.next_output_byte = dest->buffer;
dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
return TRUE;
}
|
safeboolean empty_output_buffer (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
if (gdPutBuf (dest->buffer, OUTPUT_BUF_SIZE, dest->outfile) != (size_t) OUTPUT_BUF_SIZE) {
ERREXIT (cinfo, JERR_FILE_WRITE);
}
dest->pub.next_output_byte = dest->buffer;
dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
return TRUE;
}
|
C
|
php-src
| 0 |
CVE-2014-3156
|
https://www.cvedetails.com/cve/CVE-2014-3156/
|
CWE-119
|
https://github.com/chromium/chromium/commit/0b694217046d6b2bfa5814676e8615c18e6a45ff
|
0b694217046d6b2bfa5814676e8615c18e6a45ff
|
System Clipboard: Remove extraneous check for bitmap.getPixels()
Bug 369621 originally led to this check being introduced via
https://codereview.chromium.org/289573002/patch/40001/50002, but after
https://crrev.com/c/1345809, I'm not sure that it's still necessary.
This change succeeds when tested against the "minimized test case" provided in
crbug.com/369621 's description, but I'm unsure how to make the minimized test
case fail, so this doesn't prove that the change would succeed against the
fuzzer's test case (which originally filed the bug).
As I'm unable to view the relevant fuzzer test case, (see crbug.com/918705),
I don't know exactly what may have caused the fuzzer to fail. Therefore,
I've added a CHECK for the time being, so that we will be notified in canary
if my assumption was incorrect.
Bug: 369621
Change-Id: Ie9b47a4b38ba1ed47624de776015728e541d27f7
Reviewed-on: https://chromium-review.googlesource.com/c/1393436
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Kai Ninomiya <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Commit-Queue: Victor Costan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#619591}
|
bool SystemClipboard::IsHTMLAvailable() {
if (!IsValidBufferType(buffer_))
return false;
bool result = false;
clipboard_->IsFormatAvailable(mojom::ClipboardFormat::kHtml, buffer_,
&result);
return result;
}
|
bool SystemClipboard::IsHTMLAvailable() {
if (!IsValidBufferType(buffer_))
return false;
bool result = false;
clipboard_->IsFormatAvailable(mojom::ClipboardFormat::kHtml, buffer_,
&result);
return result;
}
|
C
|
Chrome
| 0 |
CVE-2013-3237
|
https://www.cvedetails.com/cve/CVE-2013-3237/
|
CWE-200
|
https://github.com/torvalds/linux/commit/d5e0d0f607a7a029c6563a0470d88255c89a8d11
|
d5e0d0f607a7a029c6563a0470d88255c89a8d11
|
VSOCK: Fix missing msg_namelen update in vsock_stream_recvmsg()
The code misses to update the msg_namelen member to 0 and therefore
makes net/socket.c leak the local, uninitialized sockaddr_storage
variable to userland -- 128 bytes of kernel stack memory.
Cc: Andy King <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: George Zhang <[email protected]>
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static bool __vsock_in_connected_table(struct vsock_sock *vsk)
{
return !list_empty(&vsk->connected_table);
}
|
static bool __vsock_in_connected_table(struct vsock_sock *vsk)
{
return !list_empty(&vsk->connected_table);
}
|
C
|
linux
| 0 |
CVE-2015-4178
|
https://www.cvedetails.com/cve/CVE-2015-4178/
| null |
https://github.com/torvalds/linux/commit/820f9f147dcce2602eefd9b575bbbd9ea14f0953
|
820f9f147dcce2602eefd9b575bbbd9ea14f0953
|
fs_pin: Allow for the possibility that m_list or s_list go unused.
This is needed to support lazily umounting locked mounts. Because the
entire unmounted subtree needs to stay together until there are no
users with references to any part of the subtree.
To support this guarantee that the fs_pin m_list and s_list nodes
are initialized by initializing them in init_fs_pin allowing
for the possibility that pin_insert_group does not touch them.
Further use hlist_del_init in pin_remove so that there is
a hlist_unhashed test before the list we attempt to update
the previous list item.
Signed-off-by: "Eric W. Biederman" <[email protected]>
|
void pin_kill(struct fs_pin *p)
{
wait_queue_t wait;
if (!p) {
rcu_read_unlock();
return;
}
init_wait(&wait);
spin_lock_irq(&p->wait.lock);
if (likely(!p->done)) {
p->done = -1;
spin_unlock_irq(&p->wait.lock);
rcu_read_unlock();
p->kill(p);
return;
}
if (p->done > 0) {
spin_unlock_irq(&p->wait.lock);
rcu_read_unlock();
return;
}
__add_wait_queue(&p->wait, &wait);
while (1) {
set_current_state(TASK_UNINTERRUPTIBLE);
spin_unlock_irq(&p->wait.lock);
rcu_read_unlock();
schedule();
rcu_read_lock();
if (likely(list_empty(&wait.task_list)))
break;
/* OK, we know p couldn't have been freed yet */
spin_lock_irq(&p->wait.lock);
if (p->done > 0) {
spin_unlock_irq(&p->wait.lock);
break;
}
}
rcu_read_unlock();
}
|
void pin_kill(struct fs_pin *p)
{
wait_queue_t wait;
if (!p) {
rcu_read_unlock();
return;
}
init_wait(&wait);
spin_lock_irq(&p->wait.lock);
if (likely(!p->done)) {
p->done = -1;
spin_unlock_irq(&p->wait.lock);
rcu_read_unlock();
p->kill(p);
return;
}
if (p->done > 0) {
spin_unlock_irq(&p->wait.lock);
rcu_read_unlock();
return;
}
__add_wait_queue(&p->wait, &wait);
while (1) {
set_current_state(TASK_UNINTERRUPTIBLE);
spin_unlock_irq(&p->wait.lock);
rcu_read_unlock();
schedule();
rcu_read_lock();
if (likely(list_empty(&wait.task_list)))
break;
/* OK, we know p couldn't have been freed yet */
spin_lock_irq(&p->wait.lock);
if (p->done > 0) {
spin_unlock_irq(&p->wait.lock);
break;
}
}
rcu_read_unlock();
}
|
C
|
linux
| 0 |
Subsets and Splits
CWE-119 Function Changes
This query retrieves specific examples (before and after code changes) of vulnerabilities with CWE-119, providing basic filtering but limited insight.
Vulnerable Code with CWE IDs
The query filters and combines records from multiple datasets to list specific vulnerability details, providing a basic overview of vulnerable functions but lacking deeper insights.
Vulnerable Functions in BigVul
Retrieves details of vulnerable functions from both validation and test datasets where vulnerabilities are present, providing a basic set of data points for further analysis.
Vulnerable Code Functions
This query filters and shows raw data for vulnerable functions, which provides basic insight into specific vulnerabilities but lacks broader analytical value.
Top 100 Vulnerable Functions
Retrieves 100 samples of vulnerabilities from the training dataset, showing the CVE ID, CWE ID, and code changes before and after the vulnerability, which is a basic filtering of vulnerability data.