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-1705
|
https://www.cvedetails.com/cve/CVE-2016-1705/
| null |
https://github.com/chromium/chromium/commit/4afb628e068367d5b73440537555902cd12416f8
|
4afb628e068367d5b73440537555902cd12416f8
|
gpu/android : Add support for partial swap with surface control.
Add support for PostSubBuffer to GLSurfaceEGLSurfaceControl. This should
allow the display compositor to draw the minimum sub-rect necessary from
the damage tracking in BufferQueue on the client-side, and also to pass
this damage rect to the framework.
[email protected]
Bug: 926020
Change-Id: I73d3320cab68250d4c6865bf21c5531682d8bf61
Reviewed-on: https://chromium-review.googlesource.com/c/1457467
Commit-Queue: Khushal <[email protected]>
Commit-Queue: Antoine Labour <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Auto-Submit: Khushal <[email protected]>
Cr-Commit-Position: refs/heads/master@{#629852}
|
SingleThreadTaskGraphRunner() {
Start("CompositorTileWorker1", base::SimpleThread::Options());
}
|
SingleThreadTaskGraphRunner() {
Start("CompositorTileWorker1", base::SimpleThread::Options());
}
|
C
|
Chrome
| 0 |
CVE-2013-4282
|
https://www.cvedetails.com/cve/CVE-2013-4282/
|
CWE-119
|
https://cgit.freedesktop.org/spice/spice/commit/?id=8af619009660b24e0b41ad26b30289eea288fcc2
|
8af619009660b24e0b41ad26b30289eea288fcc2
| null |
static void reds_handle_read_header_done(void *opaque)
{
RedLinkInfo *link = (RedLinkInfo *)opaque;
SpiceLinkHeader *header = &link->link_header;
AsyncRead *obj = &link->async_read;
if (header->magic != SPICE_MAGIC) {
reds_send_link_error(link, SPICE_LINK_ERR_INVALID_MAGIC);
reds_link_free(link);
return;
}
if (header->major_version != SPICE_VERSION_MAJOR) {
if (header->major_version > 0) {
reds_send_link_error(link, SPICE_LINK_ERR_VERSION_MISMATCH);
}
spice_warning("version mismatch");
reds_link_free(link);
return;
}
reds->peer_minor_version = header->minor_version;
if (header->size < sizeof(SpiceLinkMess)) {
reds_send_link_error(link, SPICE_LINK_ERR_INVALID_DATA);
spice_warning("bad size %u", header->size);
reds_link_free(link);
return;
}
link->link_mess = spice_malloc(header->size);
obj->now = (uint8_t *)link->link_mess;
obj->end = obj->now + header->size;
obj->done = reds_handle_read_link_done;
async_read_handler(0, 0, &link->async_read);
}
|
static void reds_handle_read_header_done(void *opaque)
{
RedLinkInfo *link = (RedLinkInfo *)opaque;
SpiceLinkHeader *header = &link->link_header;
AsyncRead *obj = &link->async_read;
if (header->magic != SPICE_MAGIC) {
reds_send_link_error(link, SPICE_LINK_ERR_INVALID_MAGIC);
reds_link_free(link);
return;
}
if (header->major_version != SPICE_VERSION_MAJOR) {
if (header->major_version > 0) {
reds_send_link_error(link, SPICE_LINK_ERR_VERSION_MISMATCH);
}
spice_warning("version mismatch");
reds_link_free(link);
return;
}
reds->peer_minor_version = header->minor_version;
if (header->size < sizeof(SpiceLinkMess)) {
reds_send_link_error(link, SPICE_LINK_ERR_INVALID_DATA);
spice_warning("bad size %u", header->size);
reds_link_free(link);
return;
}
link->link_mess = spice_malloc(header->size);
obj->now = (uint8_t *)link->link_mess;
obj->end = obj->now + header->size;
obj->done = reds_handle_read_link_done;
async_read_handler(0, 0, &link->async_read);
}
|
C
|
spice
| 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_reorient_image(struct iw_context *ctx, unsigned int x)
{
static const unsigned int transpose_tbl[8] = { 4,6,5,7,0,2,1,3 };
int tmpi;
double tmpd;
x = x & 0x07;
if(x&0x04) {
ctx->img1.orient_transform = transpose_tbl[ctx->img1.orient_transform];
tmpi = ctx->img1.width;
ctx->img1.width = ctx->img1.height;
ctx->img1.height = tmpi;
tmpd = ctx->img1.density_x;
ctx->img1.density_x = ctx->img1.density_y;
ctx->img1.density_y = tmpd;
}
ctx->img1.orient_transform ^= (x&0x03);
}
|
IW_IMPL(void) iw_reorient_image(struct iw_context *ctx, unsigned int x)
{
static const unsigned int transpose_tbl[8] = { 4,6,5,7,0,2,1,3 };
int tmpi;
double tmpd;
x = x & 0x07;
if(x&0x04) {
ctx->img1.orient_transform = transpose_tbl[ctx->img1.orient_transform];
tmpi = ctx->img1.width;
ctx->img1.width = ctx->img1.height;
ctx->img1.height = tmpi;
tmpd = ctx->img1.density_x;
ctx->img1.density_x = ctx->img1.density_y;
ctx->img1.density_y = tmpd;
}
ctx->img1.orient_transform ^= (x&0x03);
}
|
C
|
imageworsener
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/3e5dae3b38fdb566fb2b7183e810b82eb3ce6f21
|
3e5dae3b38fdb566fb2b7183e810b82eb3ce6f21
|
Use a new field trial group to enable the SWReporter
BUG=533484
Review URL: https://codereview.chromium.org/1376803002
Cr-Commit-Position: refs/heads/master@{#351788}
|
bool IsInSRTPromptFieldTrialGroups() {
return !base::StartsWith(base::FieldTrialList::FindFullName(kSRTPromptTrial),
kSRTPromptOffGroup, base::CompareCase::SENSITIVE);
}
|
bool IsInSRTPromptFieldTrialGroups() {
return base::FieldTrialList::FindFullName(kSRTPromptTrial) !=
kSRTPromptOffGroup;
}
|
C
|
Chrome
| 1 |
CVE-2013-0910
|
https://www.cvedetails.com/cve/CVE-2013-0910/
|
CWE-287
|
https://github.com/chromium/chromium/commit/ac8bd041b81e46e4e4fcd5021aaa5499703952e6
|
ac8bd041b81e46e4e4fcd5021aaa5499703952e6
|
Follow-on fixes and naming changes for https://codereview.chromium.org/12086077/
BUG=172573
Review URL: https://codereview.chromium.org/12177018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180600 0039d316-1c4b-4281-b951-d872f2087c98
|
ResourceContext* GetResourceContext() {
return shell()->web_contents()->GetBrowserContext()->GetResourceContext();
}
|
ResourceContext* GetResourceContext() {
return shell()->web_contents()->GetBrowserContext()->GetResourceContext();
}
|
C
|
Chrome
| 0 |
CVE-2016-10066
|
https://www.cvedetails.com/cve/CVE-2016-10066/
|
CWE-119
|
https://github.com/ImageMagick/ImageMagick/commit/f6e9d0d9955e85bdd7540b251cd50d598dacc5e6
|
f6e9d0d9955e85bdd7540b251cd50d598dacc5e6
| null |
static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
double
bounding_height,
bounding_width,
image_height,
image_height_inch,
image_width,
image_width_inch,
resolution_y,
resolution_x,
units_per_inch;
float
wmf_width,
wmf_height;
Image
*image;
MagickBooleanType
status;
unsigned long
wmf_options_flags = 0;
wmf_error_t
wmf_error;
wmf_magick_t
*ddata = 0;
wmfAPI
*API = 0;
wmfAPI_Options
wmf_api_options;
wmfD_Rect
bbox;
image=AcquireImage(image_info);
if (OpenBlob(image_info,image,ReadBinaryBlobMode,exception) == MagickFalse)
{
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" OpenBlob failed");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
image=DestroyImageList(image);
return((Image *) NULL);
}
/*
* Create WMF API
*
*/
/* Register callbacks */
wmf_options_flags |= WMF_OPT_FUNCTION;
(void) ResetMagickMemory(&wmf_api_options, 0, sizeof(wmf_api_options));
wmf_api_options.function = ipa_functions;
/* Ignore non-fatal errors */
wmf_options_flags |= WMF_OPT_IGNORE_NONFATAL;
wmf_error = wmf_api_create(&API, wmf_options_flags, &wmf_api_options);
if (wmf_error != wmf_E_None)
{
if (API)
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" wmf_api_create failed");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowReaderException(DelegateError,"UnableToInitializeWMFLibrary");
}
/* Register progress monitor */
wmf_status_function(API,image,magick_progress_callback);
ddata=WMF_MAGICK_GetData(API);
ddata->image=image;
ddata->image_info=image_info;
ddata->draw_info=CloneDrawInfo(image_info,(const DrawInfo *) NULL);
ddata->draw_info->font=(char *)
RelinquishMagickMemory(ddata->draw_info->font);
ddata->draw_info->text=(char *)
RelinquishMagickMemory(ddata->draw_info->text);
#if defined(MAGICKCORE_WMFLITE_DELEGATE)
/* Must initialize font subystem for WMFlite interface */
lite_font_init (API,&wmf_api_options); /* similar to wmf_ipa_font_init in src/font.c */
/* wmf_arg_fontdirs (API,options); */ /* similar to wmf_arg_fontdirs in src/wmf.c */
#endif
/*
* Open BLOB input via libwmf API
*
*/
wmf_error = wmf_bbuf_input(API,ipa_blob_read,ipa_blob_seek,
ipa_blob_tell,(void*)image);
if (wmf_error != wmf_E_None)
{
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" wmf_bbuf_input failed");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowFileException(exception,FileOpenError,"UnableToOpenFile",
image->filename);
image=DestroyImageList(image);
return((Image *) NULL);
}
/*
* Scan WMF file
*
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Scanning WMF to obtain bounding box");
wmf_error=wmf_scan(API, 0, &bbox);
if (wmf_error != wmf_E_None)
{
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" wmf_scan failed with wmf_error %d", wmf_error);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowReaderException(DelegateError,"FailedToScanFile");
}
/*
* Compute dimensions and scale factors
*
*/
ddata->bbox=bbox;
/* User specified resolution */
resolution_y=DefaultResolution;
if (image->y_resolution != 0.0)
{
resolution_y = image->y_resolution;
if (image->units == PixelsPerCentimeterResolution)
resolution_y *= CENTIMETERS_PER_INCH;
}
resolution_x=DefaultResolution;
if (image->x_resolution != 0.0)
{
resolution_x = image->x_resolution;
if (image->units == PixelsPerCentimeterResolution)
resolution_x *= CENTIMETERS_PER_INCH;
}
/* Obtain output size expressed in metafile units */
wmf_error=wmf_size(API,&wmf_width,&wmf_height);
if (wmf_error != wmf_E_None)
{
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" wmf_size failed with wmf_error %d", wmf_error);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowReaderException(DelegateError,"FailedToComputeOutputSize");
}
/* Obtain (or guess) metafile units */
if ((API)->File->placeable)
units_per_inch=(API)->File->pmh->Inch;
else if ( (wmf_width*wmf_height) < 1024*1024)
units_per_inch=POINTS_PER_INCH; /* MM_TEXT */
else
units_per_inch=TWIPS_PER_INCH; /* MM_TWIPS */
/* Calculate image width and height based on specified DPI
resolution */
image_width_inch = (double) wmf_width / units_per_inch;
image_height_inch = (double) wmf_height / units_per_inch;
image_width = image_width_inch * resolution_x;
image_height = image_height_inch * resolution_y;
/* Compute bounding box scale factors and origin translations
*
* This all just a hack since libwmf does not currently seem to
* provide the mapping between LOGICAL coordinates and DEVICE
* coordinates. This mapping is necessary in order to know
* where to place the logical bounding box within the image.
*
*/
bounding_width = bbox.BR.x - bbox.TL.x;
bounding_height = bbox.BR.y - bbox.TL.y;
ddata->scale_x = image_width/bounding_width;
ddata->translate_x = 0-bbox.TL.x;
ddata->rotate = 0;
/* Heuristic: guess that if the vertical coordinates mostly span
negative values, then the image must be inverted. */
if ( fabs(bbox.BR.y) > fabs(bbox.TL.y) )
{
/* Normal (Origin at top left of image) */
ddata->scale_y = (image_height/bounding_height);
ddata->translate_y = 0-bbox.TL.y;
}
else
{
/* Inverted (Origin at bottom left of image) */
ddata->scale_y = (-image_height/bounding_height);
ddata->translate_y = 0-bbox.BR.y;
}
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Placeable metafile: %s",
(API)->File->placeable ? "Yes" : "No");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Size in metafile units: %gx%g",wmf_width,wmf_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Metafile units/inch: %g",units_per_inch);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Size in inches: %gx%g",
image_width_inch,image_height_inch);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Bounding Box: %g,%g %g,%g",
bbox.TL.x, bbox.TL.y, bbox.BR.x, bbox.BR.y);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Bounding width x height: %gx%g",bounding_width,
bounding_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Output resolution: %gx%g",resolution_x,resolution_y);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Image size: %gx%g",image_width,image_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Bounding box scale factor: %g,%g",ddata->scale_x,
ddata->scale_y);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Translation: %g,%g",
ddata->translate_x, ddata->translate_y);
}
#if 0
#if 0
{
typedef struct _wmfPlayer_t wmfPlayer_t;
struct _wmfPlayer_t
{
wmfPen default_pen;
wmfBrush default_brush;
wmfFont default_font;
wmfDC* dc; /* current dc */
};
wmfDC
*dc;
#define WMF_ELICIT_DC(API) (((wmfPlayer_t*)((API)->player_data))->dc)
dc = WMF_ELICIT_DC(API);
printf("dc->Window.Ox = %d\n", dc->Window.Ox);
printf("dc->Window.Oy = %d\n", dc->Window.Oy);
printf("dc->Window.width = %d\n", dc->Window.width);
printf("dc->Window.height = %d\n", dc->Window.height);
printf("dc->pixel_width = %g\n", dc->pixel_width);
printf("dc->pixel_height = %g\n", dc->pixel_height);
#if defined(MAGICKCORE_WMFLITE_DELEGATE) /* Only in libwmf 0.3 */
printf("dc->Ox = %.d\n", dc->Ox);
printf("dc->Oy = %.d\n", dc->Oy);
printf("dc->width = %.d\n", dc->width);
printf("dc->height = %.d\n", dc->height);
#endif
}
#endif
#endif
/*
* Create canvas image
*
*/
image->rows=(unsigned long) ceil(image_height);
image->columns=(unsigned long) ceil(image_width);
if (image_info->ping != MagickFalse)
{
wmf_api_destroy(API);
(void) CloseBlob(image);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
return(GetFirstImageInList(image));
}
status=SetImageExtent(image,image->columns,image->rows);
if (status == MagickFalse)
{
InheritException(exception,&image->exception);
return(DestroyImageList(image));
}
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Creating canvas image with size %lux%lu",(unsigned long) image->rows,
(unsigned long) image->columns);
/*
* Set solid background color
*/
{
image->background_color = image_info->background_color;
if (image->background_color.opacity != OpaqueOpacity)
image->matte = MagickTrue;
(void) SetImageBackgroundColor(image);
}
/*
* Play file to generate Vector drawing commands
*
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Playing WMF to prepare vectors");
wmf_error = wmf_play(API, 0, &bbox);
if (wmf_error != wmf_E_None)
{
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Playing WMF failed with wmf_error %d", wmf_error);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowReaderException(DelegateError,"FailedToRenderFile");
}
/*
* Scribble on canvas image
*
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Rendering WMF vectors");
DrawRender(ddata->draw_wand);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"leave ReadWMFImage()");
/* Cleanup allocated data */
wmf_api_destroy(API);
(void) CloseBlob(image);
/* Return image */
return image;
}
|
static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
double
bounding_height,
bounding_width,
image_height,
image_height_inch,
image_width,
image_width_inch,
resolution_y,
resolution_x,
units_per_inch;
float
wmf_width,
wmf_height;
Image
*image;
unsigned long
wmf_options_flags = 0;
wmf_error_t
wmf_error;
wmf_magick_t
*ddata = 0;
wmfAPI
*API = 0;
wmfAPI_Options
wmf_api_options;
wmfD_Rect
bbox;
image=AcquireImage(image_info);
if (OpenBlob(image_info,image,ReadBinaryBlobMode,exception) == MagickFalse)
{
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" OpenBlob failed");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
image=DestroyImageList(image);
return((Image *) NULL);
}
/*
* Create WMF API
*
*/
/* Register callbacks */
wmf_options_flags |= WMF_OPT_FUNCTION;
(void) ResetMagickMemory(&wmf_api_options, 0, sizeof(wmf_api_options));
wmf_api_options.function = ipa_functions;
/* Ignore non-fatal errors */
wmf_options_flags |= WMF_OPT_IGNORE_NONFATAL;
wmf_error = wmf_api_create(&API, wmf_options_flags, &wmf_api_options);
if (wmf_error != wmf_E_None)
{
if (API)
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" wmf_api_create failed");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowReaderException(DelegateError,"UnableToInitializeWMFLibrary");
}
/* Register progress monitor */
wmf_status_function(API,image,magick_progress_callback);
ddata=WMF_MAGICK_GetData(API);
ddata->image=image;
ddata->image_info=image_info;
ddata->draw_info=CloneDrawInfo(image_info,(const DrawInfo *) NULL);
ddata->draw_info->font=(char *)
RelinquishMagickMemory(ddata->draw_info->font);
ddata->draw_info->text=(char *)
RelinquishMagickMemory(ddata->draw_info->text);
#if defined(MAGICKCORE_WMFLITE_DELEGATE)
/* Must initialize font subystem for WMFlite interface */
lite_font_init (API,&wmf_api_options); /* similar to wmf_ipa_font_init in src/font.c */
/* wmf_arg_fontdirs (API,options); */ /* similar to wmf_arg_fontdirs in src/wmf.c */
#endif
/*
* Open BLOB input via libwmf API
*
*/
wmf_error = wmf_bbuf_input(API,ipa_blob_read,ipa_blob_seek,
ipa_blob_tell,(void*)image);
if (wmf_error != wmf_E_None)
{
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" wmf_bbuf_input failed");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowFileException(exception,FileOpenError,"UnableToOpenFile",
image->filename);
image=DestroyImageList(image);
return((Image *) NULL);
}
/*
* Scan WMF file
*
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Scanning WMF to obtain bounding box");
wmf_error=wmf_scan(API, 0, &bbox);
if (wmf_error != wmf_E_None)
{
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" wmf_scan failed with wmf_error %d", wmf_error);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowReaderException(DelegateError,"FailedToScanFile");
}
/*
* Compute dimensions and scale factors
*
*/
ddata->bbox=bbox;
/* User specified resolution */
resolution_y=DefaultResolution;
if (image->y_resolution != 0.0)
{
resolution_y = image->y_resolution;
if (image->units == PixelsPerCentimeterResolution)
resolution_y *= CENTIMETERS_PER_INCH;
}
resolution_x=DefaultResolution;
if (image->x_resolution != 0.0)
{
resolution_x = image->x_resolution;
if (image->units == PixelsPerCentimeterResolution)
resolution_x *= CENTIMETERS_PER_INCH;
}
/* Obtain output size expressed in metafile units */
wmf_error=wmf_size(API,&wmf_width,&wmf_height);
if (wmf_error != wmf_E_None)
{
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" wmf_size failed with wmf_error %d", wmf_error);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowReaderException(DelegateError,"FailedToComputeOutputSize");
}
/* Obtain (or guess) metafile units */
if ((API)->File->placeable)
units_per_inch=(API)->File->pmh->Inch;
else if ( (wmf_width*wmf_height) < 1024*1024)
units_per_inch=POINTS_PER_INCH; /* MM_TEXT */
else
units_per_inch=TWIPS_PER_INCH; /* MM_TWIPS */
/* Calculate image width and height based on specified DPI
resolution */
image_width_inch = (double) wmf_width / units_per_inch;
image_height_inch = (double) wmf_height / units_per_inch;
image_width = image_width_inch * resolution_x;
image_height = image_height_inch * resolution_y;
/* Compute bounding box scale factors and origin translations
*
* This all just a hack since libwmf does not currently seem to
* provide the mapping between LOGICAL coordinates and DEVICE
* coordinates. This mapping is necessary in order to know
* where to place the logical bounding box within the image.
*
*/
bounding_width = bbox.BR.x - bbox.TL.x;
bounding_height = bbox.BR.y - bbox.TL.y;
ddata->scale_x = image_width/bounding_width;
ddata->translate_x = 0-bbox.TL.x;
ddata->rotate = 0;
/* Heuristic: guess that if the vertical coordinates mostly span
negative values, then the image must be inverted. */
if ( fabs(bbox.BR.y) > fabs(bbox.TL.y) )
{
/* Normal (Origin at top left of image) */
ddata->scale_y = (image_height/bounding_height);
ddata->translate_y = 0-bbox.TL.y;
}
else
{
/* Inverted (Origin at bottom left of image) */
ddata->scale_y = (-image_height/bounding_height);
ddata->translate_y = 0-bbox.BR.y;
}
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Placeable metafile: %s",
(API)->File->placeable ? "Yes" : "No");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Size in metafile units: %gx%g",wmf_width,wmf_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Metafile units/inch: %g",units_per_inch);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Size in inches: %gx%g",
image_width_inch,image_height_inch);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Bounding Box: %g,%g %g,%g",
bbox.TL.x, bbox.TL.y, bbox.BR.x, bbox.BR.y);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Bounding width x height: %gx%g",bounding_width,
bounding_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Output resolution: %gx%g",resolution_x,resolution_y);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Image size: %gx%g",image_width,image_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Bounding box scale factor: %g,%g",ddata->scale_x,
ddata->scale_y);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Translation: %g,%g",
ddata->translate_x, ddata->translate_y);
}
#if 0
#if 0
{
typedef struct _wmfPlayer_t wmfPlayer_t;
struct _wmfPlayer_t
{
wmfPen default_pen;
wmfBrush default_brush;
wmfFont default_font;
wmfDC* dc; /* current dc */
};
wmfDC
*dc;
#define WMF_ELICIT_DC(API) (((wmfPlayer_t*)((API)->player_data))->dc)
dc = WMF_ELICIT_DC(API);
printf("dc->Window.Ox = %d\n", dc->Window.Ox);
printf("dc->Window.Oy = %d\n", dc->Window.Oy);
printf("dc->Window.width = %d\n", dc->Window.width);
printf("dc->Window.height = %d\n", dc->Window.height);
printf("dc->pixel_width = %g\n", dc->pixel_width);
printf("dc->pixel_height = %g\n", dc->pixel_height);
#if defined(MAGICKCORE_WMFLITE_DELEGATE) /* Only in libwmf 0.3 */
printf("dc->Ox = %.d\n", dc->Ox);
printf("dc->Oy = %.d\n", dc->Oy);
printf("dc->width = %.d\n", dc->width);
printf("dc->height = %.d\n", dc->height);
#endif
}
#endif
#endif
/*
* Create canvas image
*
*/
image->rows=(unsigned long) ceil(image_height);
image->columns=(unsigned long) ceil(image_width);
if (image_info->ping != MagickFalse)
{
wmf_api_destroy(API);
(void) CloseBlob(image);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
return(GetFirstImageInList(image));
}
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Creating canvas image with size %lux%lu",(unsigned long) image->rows,
(unsigned long) image->columns);
/*
* Set solid background color
*/
{
image->background_color = image_info->background_color;
if (image->background_color.opacity != OpaqueOpacity)
image->matte = MagickTrue;
(void) SetImageBackgroundColor(image);
}
/*
* Play file to generate Vector drawing commands
*
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Playing WMF to prepare vectors");
wmf_error = wmf_play(API, 0, &bbox);
if (wmf_error != wmf_E_None)
{
wmf_api_destroy(API);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Playing WMF failed with wmf_error %d", wmf_error);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"leave ReadWMFImage()");
}
ThrowReaderException(DelegateError,"FailedToRenderFile");
}
/*
* Scribble on canvas image
*
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Rendering WMF vectors");
DrawRender(ddata->draw_wand);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"leave ReadWMFImage()");
/* Cleanup allocated data */
wmf_api_destroy(API);
(void) CloseBlob(image);
/* Return image */
return image;
}
|
C
|
ImageMagick
| 1 |
CVE-2016-0826
|
https://www.cvedetails.com/cve/CVE-2016-0826/
|
CWE-264
|
https://android.googlesource.com/platform/frameworks/av/+/c9ab2b0bb05a7e19fb057e79b36e232809d70122
|
c9ab2b0bb05a7e19fb057e79b36e232809d70122
|
Camera: Disallow dumping clients directly
Camera service dumps should only be initiated through
ICameraService::dump.
Bug: 26265403
Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
|
bool CameraService::isValidCameraId(int cameraId) {
int facing;
int deviceVersion = getDeviceVersion(cameraId, &facing);
switch(deviceVersion) {
case CAMERA_DEVICE_API_VERSION_1_0:
case CAMERA_DEVICE_API_VERSION_2_0:
case CAMERA_DEVICE_API_VERSION_2_1:
case CAMERA_DEVICE_API_VERSION_3_0:
return true;
default:
return false;
}
return false;
}
|
bool CameraService::isValidCameraId(int cameraId) {
int facing;
int deviceVersion = getDeviceVersion(cameraId, &facing);
switch(deviceVersion) {
case CAMERA_DEVICE_API_VERSION_1_0:
case CAMERA_DEVICE_API_VERSION_2_0:
case CAMERA_DEVICE_API_VERSION_2_1:
case CAMERA_DEVICE_API_VERSION_3_0:
return true;
default:
return false;
}
return false;
}
|
C
|
Android
| 0 |
CVE-2017-18509
|
https://www.cvedetails.com/cve/CVE-2017-18509/
|
CWE-20
|
https://github.com/torvalds/linux/commit/99253eb750fda6a644d5188fb26c43bad8d5a745
|
99253eb750fda6a644d5188fb26c43bad8d5a745
|
ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt
Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed
the issue for ipv4 ipmr:
ip_mroute_setsockopt() & ip_mroute_getsockopt() should not
access/set raw_sk(sk)->ipmr_table before making sure the socket
is a raw socket, and protocol is IGMP
The same fix should be done for ipv6 ipmr as well.
This patch can fix the panic caused by overwriting the same offset
as ipmr_table as in raw_sk(sk) when accessing other type's socket
by ip_mroute_setsockopt().
Signed-off-by: Xin Long <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static void reg_vif_setup(struct net_device *dev)
{
dev->type = ARPHRD_PIMREG;
dev->mtu = 1500 - sizeof(struct ipv6hdr) - 8;
dev->flags = IFF_NOARP;
dev->netdev_ops = ®_vif_netdev_ops;
dev->destructor = free_netdev;
dev->features |= NETIF_F_NETNS_LOCAL;
}
|
static void reg_vif_setup(struct net_device *dev)
{
dev->type = ARPHRD_PIMREG;
dev->mtu = 1500 - sizeof(struct ipv6hdr) - 8;
dev->flags = IFF_NOARP;
dev->netdev_ops = ®_vif_netdev_ops;
dev->destructor = free_netdev;
dev->features |= NETIF_F_NETNS_LOCAL;
}
|
C
|
linux
| 0 |
CVE-2016-4303
|
https://www.cvedetails.com/cve/CVE-2016-4303/
|
CWE-119
|
https://github.com/esnet/iperf/commit/91f2fa59e8ed80dfbf400add0164ee0e508e412a
|
91f2fa59e8ed80dfbf400add0164ee0e508e412a
|
Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and reported by Dave McDaniel, Cisco Talos.
Based on a patch by @dopheide-esnet, with input from @DaveGamble.
Cross-references: TALOS-CAN-0164, ESNET-SECADV-2016-0001,
CVE-2016-4303
(cherry picked from commit ed94082be27d971a5e1b08b666e2c217cf470a40)
Signed-off-by: Bruce A. Mah <[email protected]>
|
iperf_set_test_burst(struct iperf_test *ipt, int burst)
{
ipt->settings->burst = burst;
}
|
iperf_set_test_burst(struct iperf_test *ipt, int burst)
{
ipt->settings->burst = burst;
}
|
C
|
iperf
| 0 |
CVE-2012-2880
|
https://www.cvedetails.com/cve/CVE-2012-2880/
|
CWE-362
|
https://github.com/chromium/chromium/commit/fcd3a7a671ecf2d5f46ea34787d27507a914d2f5
|
fcd3a7a671ecf2d5f46ea34787d27507a914d2f5
|
[Sync] Cleanup all tab sync enabling logic now that its on by default.
BUG=none
TEST=
Review URL: https://chromiumcodereview.appspot.com/10443046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139462 0039d316-1c4b-4281-b951-d872f2087c98
|
int SyncTest::NumberOfDefaultSyncItems() const {
return number_of_default_sync_items_;
}
|
int SyncTest::NumberOfDefaultSyncItems() const {
return number_of_default_sync_items_;
}
|
C
|
Chrome
| 0 |
CVE-2017-5069
|
https://www.cvedetails.com/cve/CVE-2017-5069/
|
CWE-79
|
https://github.com/chromium/chromium/commit/7a0dee9d17d0ee7fd1b40b017442f4952384a7c2
|
7a0dee9d17d0ee7fd1b40b017442f4952384a7c2
|
Prevent regular mode session startup pref type turning to default.
When user loses past session tabs of regular mode after
invoking a new window from the incognito mode.
This was happening because the SessionStartUpPref type was being set
to default, from last, for regular user mode. This was happening in
the RestoreIfNecessary method where the restoration was taking place
for users whose SessionStartUpPref type was set to last.
The fix was to make the protocol of changing the pref type to
default more explicit to incognito users and not regular users
of pref type last.
Bug: 481373
Change-Id: I96efb4cf196949312181c83c6dcd45986ddded13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1774441
Reviewed-by: Tommy Martino <[email protected]>
Reviewed-by: Ramin Halavati <[email protected]>
Commit-Queue: Rohit Agarwal <[email protected]>
Cr-Commit-Position: refs/heads/master@{#691726}
|
Profile* GetStartupProfile(const base::FilePath& user_data_dir,
const base::CommandLine& command_line) {
ProfileManager* profile_manager = g_browser_process->profile_manager();
base::FilePath profile_path =
GetStartupProfilePath(user_data_dir, command_line);
Profile* profile = profile_manager->GetProfile(profile_path);
auto* storage = &profile_manager->GetProfileAttributesStorage();
ProfileAttributesEntry* entry;
bool has_entry = storage->GetProfileAttributesWithPath(profile_path, &entry);
if (has_entry && (!entry->IsSigninRequired() || !profile)) {
return profile;
}
return profile_manager->GetProfile(ProfileManager::GetSystemProfilePath()) ?
profile_manager->GetProfile(ProfileManager::GetGuestProfilePath()) :
nullptr;
}
|
Profile* GetStartupProfile(const base::FilePath& user_data_dir,
const base::CommandLine& command_line) {
ProfileManager* profile_manager = g_browser_process->profile_manager();
base::FilePath profile_path =
GetStartupProfilePath(user_data_dir, command_line);
Profile* profile = profile_manager->GetProfile(profile_path);
auto* storage = &profile_manager->GetProfileAttributesStorage();
ProfileAttributesEntry* entry;
bool has_entry = storage->GetProfileAttributesWithPath(profile_path, &entry);
if (has_entry && (!entry->IsSigninRequired() || !profile)) {
return profile;
}
return profile_manager->GetProfile(ProfileManager::GetSystemProfilePath()) ?
profile_manager->GetProfile(ProfileManager::GetGuestProfilePath()) :
nullptr;
}
|
C
|
Chrome
| 0 |
CVE-2017-3730
|
https://www.cvedetails.com/cve/CVE-2017-3730/
|
CWE-476
|
https://github.com/openssl/openssl/commit/efbe126e3ebb9123ac9d058aa2bb044261342aaa
|
efbe126e3ebb9123ac9d058aa2bb044261342aaa
|
Fix missing NULL checks in CKE processing
Reviewed-by: Rich Salz <[email protected]>
|
static ossl_inline int cert_req_allowed(SSL *s)
{
/* TLS does not like anon-DH with client cert */
if ((s->version > SSL3_VERSION
&& (s->s3->tmp.new_cipher->algorithm_auth & SSL_aNULL))
|| (s->s3->tmp.new_cipher->algorithm_auth & (SSL_aSRP | SSL_aPSK)))
return 0;
return 1;
}
|
static ossl_inline int cert_req_allowed(SSL *s)
{
/* TLS does not like anon-DH with client cert */
if ((s->version > SSL3_VERSION
&& (s->s3->tmp.new_cipher->algorithm_auth & SSL_aNULL))
|| (s->s3->tmp.new_cipher->algorithm_auth & (SSL_aSRP | SSL_aPSK)))
return 0;
return 1;
}
|
C
|
openssl
| 0 |
CVE-2017-5009
|
https://www.cvedetails.com/cve/CVE-2017-5009/
|
CWE-119
|
https://github.com/chromium/chromium/commit/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60
|
1c40f9042ae2d6ee7483d72998aabb5e73b2ff60
|
DevTools: send proper resource type in Network.RequestWillBeSent
This patch plumbs resoure type into the DispatchWillSendRequest
instrumenation. This allows us to report accurate type in
Network.RequestWillBeSent event, instead of "Other", that we report
today.
BUG=765501
R=dgozman
Change-Id: I0134c08b841e8dd247fdc8ff208bfd51e462709c
Reviewed-on: https://chromium-review.googlesource.com/667504
Reviewed-by: Pavel Feldman <[email protected]>
Reviewed-by: Dmitry Gozman <[email protected]>
Commit-Queue: Andrey Lushnikov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#507936}
|
void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) {
Document* initiator_document = document_ && info.IsMainResource()
? document_->ParentDocument()
: document_.Get();
if (!initiator_document || !initiator_document->domWindow())
return;
DOMWindowPerformance::performance(*initiator_document->domWindow())
->AddResourceTiming(info);
}
|
void FrameFetchContext::AddResourceTiming(const ResourceTimingInfo& info) {
Document* initiator_document = document_ && info.IsMainResource()
? document_->ParentDocument()
: document_.Get();
if (!initiator_document || !initiator_document->domWindow())
return;
DOMWindowPerformance::performance(*initiator_document->domWindow())
->AddResourceTiming(info);
}
|
C
|
Chrome
| 0 |
CVE-2013-6626
|
https://www.cvedetails.com/cve/CVE-2013-6626/
| null |
https://github.com/chromium/chromium/commit/90fb08ed0146c9beacfd4dde98a20fc45419fff3
|
90fb08ed0146c9beacfd4dde98a20fc45419fff3
|
Cancel JavaScript dialogs when an interstitial appears.
BUG=295695
TEST=See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/24360011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225026 0039d316-1c4b-4281-b951-d872f2087c98
|
void WebContents::AddCreatedCallback(const CreatedCallback& callback) {
g_created_callbacks.Get().push_back(callback);
}
|
void WebContents::AddCreatedCallback(const CreatedCallback& callback) {
g_created_callbacks.Get().push_back(callback);
}
|
C
|
Chrome
| 0 |
CVE-2016-7412
|
https://www.cvedetails.com/cve/CVE-2016-7412/
|
CWE-119
|
https://github.com/php/php-src/commit/28f80baf3c53e267c9ce46a2a0fadbb981585132?w=1
|
28f80baf3c53e267c9ce46a2a0fadbb981585132?w=1
|
Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields
|
MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC)
{
struct st_mysqlnd_packet_stats * packet = mnd_pecalloc(1, packet_methods[PROT_STATS_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_stats_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_STATS_PACKET];
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
}
|
MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC)
{
struct st_mysqlnd_packet_stats * packet = mnd_pecalloc(1, packet_methods[PROT_STATS_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_stats_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_STATS_PACKET];
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
}
|
C
|
php-src
| 0 |
CVE-2009-3605
|
https://www.cvedetails.com/cve/CVE-2009-3605/
|
CWE-189
|
https://cgit.freedesktop.org/poppler/poppler/commit/?id=9cf2325fb22f812b31858e519411f57747d39bd8
|
9cf2325fb22f812b31858e519411f57747d39bd8
| null |
void SplashBitmap::getPixel(int x, int y, SplashColorPtr pixel) {
SplashColorPtr p;
if (y < 0 || y >= height || x < 0 || x >= width) {
return;
}
switch (mode) {
case splashModeMono1:
p = &data[y * rowSize + (x >> 3)];
pixel[0] = (p[0] & (0x80 >> (x & 7))) ? 0xff : 0x00;
break;
case splashModeMono8:
p = &data[y * rowSize + x];
pixel[0] = p[0];
break;
case splashModeRGB8:
p = &data[y * rowSize + 3 * x];
pixel[0] = p[0];
pixel[1] = p[1];
pixel[2] = p[2];
break;
case splashModeXBGR8:
p = &data[y * rowSize + 4 * x];
pixel[0] = p[2];
pixel[1] = p[1];
pixel[2] = p[0];
pixel[3] = p[3];
break;
case splashModeBGR8:
p = &data[y * rowSize + 3 * x];
pixel[0] = p[2];
pixel[1] = p[1];
pixel[2] = p[0];
break;
#if SPLASH_CMYK
case splashModeCMYK8:
p = &data[y * rowSize + 4 * x];
pixel[0] = p[0];
pixel[1] = p[1];
pixel[2] = p[2];
pixel[3] = p[3];
break;
#endif
}
}
|
void SplashBitmap::getPixel(int x, int y, SplashColorPtr pixel) {
SplashColorPtr p;
if (y < 0 || y >= height || x < 0 || x >= width) {
return;
}
switch (mode) {
case splashModeMono1:
p = &data[y * rowSize + (x >> 3)];
pixel[0] = (p[0] & (0x80 >> (x & 7))) ? 0xff : 0x00;
break;
case splashModeMono8:
p = &data[y * rowSize + x];
pixel[0] = p[0];
break;
case splashModeRGB8:
p = &data[y * rowSize + 3 * x];
pixel[0] = p[0];
pixel[1] = p[1];
pixel[2] = p[2];
break;
case splashModeXBGR8:
p = &data[y * rowSize + 4 * x];
pixel[0] = p[2];
pixel[1] = p[1];
pixel[2] = p[0];
pixel[3] = p[3];
break;
case splashModeBGR8:
p = &data[y * rowSize + 3 * x];
pixel[0] = p[2];
pixel[1] = p[1];
pixel[2] = p[0];
break;
#if SPLASH_CMYK
case splashModeCMYK8:
p = &data[y * rowSize + 4 * x];
pixel[0] = p[0];
pixel[1] = p[1];
pixel[2] = p[2];
pixel[3] = p[3];
break;
#endif
}
}
|
CPP
|
poppler
| 0 |
CVE-2012-5148
|
https://www.cvedetails.com/cve/CVE-2012-5148/
|
CWE-20
|
https://github.com/chromium/chromium/commit/e89cfcb9090e8c98129ae9160c513f504db74599
|
e89cfcb9090e8c98129ae9160c513f504db74599
|
Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167122 0039d316-1c4b-4281-b951-d872f2087c98
|
LocationBar* BrowserView::GetLocationBar() const {
return GetLocationBarView();
}
|
LocationBar* BrowserView::GetLocationBar() const {
return GetLocationBarView();
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/a03d4448faf2c40f4ef444a88cb9aace5b98e8c4
|
a03d4448faf2c40f4ef444a88cb9aace5b98e8c4
|
Introduce background.scripts feature for extension manifests.
This optimizes for the common use case where background pages
just include a reference to one or more script files and no
additional HTML.
BUG=107791
Review URL: http://codereview.chromium.org/9150008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117110 0039d316-1c4b-4281-b951-d872f2087c98
|
void TestingAutomationProvider::SetPolicies(
DictionaryValue* args,
IPC::Message* reply_message) {
scoped_ptr<AutomationJSONReply> reply(
new AutomationJSONReply(this, reply_message));
#if !defined(ENABLE_CONFIGURATION_POLICY) || defined(OFFICIAL_BUILD)
reply->SendError("Configuration Policy disabled");
#else
const policy::PolicyDefinitionList* list =
policy::GetChromePolicyDefinitionList();
policy::BrowserPolicyConnector* connector =
g_browser_process->browser_policy_connector();
struct {
std::string name;
policy::ConfigurationPolicyProvider* provider;
} providers[] = {
{ "managed_cloud", connector->GetManagedCloudProvider() },
{ "managed_platform", connector->GetManagedPlatformProvider() },
{ "recommended_cloud", connector->GetRecommendedCloudProvider() },
{ "recommended_platform", connector->GetRecommendedPlatformProvider() }
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(providers); ++i) {
DictionaryValue* policies = NULL;
if (args->GetDictionary(providers[i].name, &policies) &&
policies &&
!providers[i].provider) {
reply->SendError("Provider not available: " + providers[i].name);
return;
}
}
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(providers); ++i) {
DictionaryValue* policies = NULL;
if (args->GetDictionary(providers[i].name, &policies) && policies) {
policy::PolicyMap* map = new policy::PolicyMap;
map->LoadFrom(policies, list);
providers[i].provider->OverridePolicies(map);
}
}
PolicyUpdatesObserver::PostCallbackAfterPolicyUpdates(
base::Bind(&AutomationJSONReply::SendSuccess,
base::Owned(reply.release()),
static_cast<const Value*>(NULL)));
#endif // defined(OFFICIAL_BUILD)
}
|
void TestingAutomationProvider::SetPolicies(
DictionaryValue* args,
IPC::Message* reply_message) {
scoped_ptr<AutomationJSONReply> reply(
new AutomationJSONReply(this, reply_message));
#if !defined(ENABLE_CONFIGURATION_POLICY) || defined(OFFICIAL_BUILD)
reply->SendError("Configuration Policy disabled");
#else
const policy::PolicyDefinitionList* list =
policy::GetChromePolicyDefinitionList();
policy::BrowserPolicyConnector* connector =
g_browser_process->browser_policy_connector();
struct {
std::string name;
policy::ConfigurationPolicyProvider* provider;
} providers[] = {
{ "managed_cloud", connector->GetManagedCloudProvider() },
{ "managed_platform", connector->GetManagedPlatformProvider() },
{ "recommended_cloud", connector->GetRecommendedCloudProvider() },
{ "recommended_platform", connector->GetRecommendedPlatformProvider() }
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(providers); ++i) {
DictionaryValue* policies = NULL;
if (args->GetDictionary(providers[i].name, &policies) &&
policies &&
!providers[i].provider) {
reply->SendError("Provider not available: " + providers[i].name);
return;
}
}
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(providers); ++i) {
DictionaryValue* policies = NULL;
if (args->GetDictionary(providers[i].name, &policies) && policies) {
policy::PolicyMap* map = new policy::PolicyMap;
map->LoadFrom(policies, list);
providers[i].provider->OverridePolicies(map);
}
}
PolicyUpdatesObserver::PostCallbackAfterPolicyUpdates(
base::Bind(&AutomationJSONReply::SendSuccess,
base::Owned(reply.release()),
static_cast<const Value*>(NULL)));
#endif // defined(OFFICIAL_BUILD)
}
|
C
|
Chrome
| 0 |
CVE-2016-9601
|
https://www.cvedetails.com/cve/CVE-2016-9601/
|
CWE-119
|
http://git.ghostscript.com/?p=jbig2dec.git;a=commit;h=e698d5c11d27212aa1098bc5b1673a3378563092
|
e698d5c11d27212aa1098bc5b1673a3378563092
| null |
jbig2_huffman_get(Jbig2HuffmanState *hs, const Jbig2HuffmanTable *table, bool *oob)
{
Jbig2HuffmanEntry *entry;
byte flags;
int offset_bits = hs->offset_bits;
uint32_t this_word = hs->this_word;
uint32_t next_word;
int RANGELEN;
int32_t result;
if (hs->offset_limit && hs->offset >= hs->offset_limit) {
jbig2_error(hs->ctx, JBIG2_SEVERITY_FATAL, -1, "end of Jbig2WordStream reached at offset %d", hs->offset);
if (oob)
*oob = -1;
return -1;
}
for (;;) {
int log_table_size = table->log_table_size;
int PREFLEN;
/* SumatraPDF: shifting by the size of the operand is undefined */
entry = &table->entries[log_table_size > 0 ? this_word >> (32 - log_table_size) : 0];
flags = entry->flags;
PREFLEN = entry->PREFLEN;
if ((flags == (byte) - 1) && (PREFLEN == (byte) - 1) && (entry->u.RANGELOW == -1)) {
if (oob)
*oob = -1;
return -1;
}
next_word = hs->next_word;
offset_bits += PREFLEN;
if (offset_bits >= 32) {
this_word = next_word;
hs->offset += 4;
next_word = huff_get_next_word(hs, hs->offset + 4);
offset_bits -= 32;
hs->next_word = next_word;
PREFLEN = offset_bits;
}
if (PREFLEN)
this_word = (this_word << PREFLEN) | (next_word >> (32 - offset_bits));
if (flags & JBIG2_HUFFMAN_FLAGS_ISEXT) {
table = entry->u.ext_table;
} else
break;
}
result = entry->u.RANGELOW;
RANGELEN = entry->RANGELEN;
if (RANGELEN > 0) {
int32_t HTOFFSET;
HTOFFSET = this_word >> (32 - RANGELEN);
if (flags & JBIG2_HUFFMAN_FLAGS_ISLOW)
result -= HTOFFSET;
else
result += HTOFFSET;
offset_bits += RANGELEN;
if (offset_bits >= 32) {
this_word = next_word;
hs->offset += 4;
next_word = huff_get_next_word(hs, hs->offset + 4);
offset_bits -= 32;
hs->next_word = next_word;
RANGELEN = offset_bits;
}
if (RANGELEN)
this_word = (this_word << RANGELEN) | (next_word >> (32 - offset_bits));
}
hs->this_word = this_word;
hs->offset_bits = offset_bits;
if (oob != NULL)
*oob = (flags & JBIG2_HUFFMAN_FLAGS_ISOOB);
return result;
}
|
jbig2_huffman_get(Jbig2HuffmanState *hs, const Jbig2HuffmanTable *table, bool *oob)
{
Jbig2HuffmanEntry *entry;
byte flags;
int offset_bits = hs->offset_bits;
uint32_t this_word = hs->this_word;
uint32_t next_word;
int RANGELEN;
int32_t result;
if (hs->offset_limit && hs->offset >= hs->offset_limit) {
jbig2_error(hs->ctx, JBIG2_SEVERITY_FATAL, -1, "end of Jbig2WordStream reached at offset %d", hs->offset);
if (oob)
*oob = -1;
return -1;
}
for (;;) {
int log_table_size = table->log_table_size;
int PREFLEN;
/* SumatraPDF: shifting by the size of the operand is undefined */
entry = &table->entries[log_table_size > 0 ? this_word >> (32 - log_table_size) : 0];
flags = entry->flags;
PREFLEN = entry->PREFLEN;
if ((flags == (byte) - 1) && (PREFLEN == (byte) - 1) && (entry->u.RANGELOW == -1)) {
if (oob)
*oob = -1;
return -1;
}
next_word = hs->next_word;
offset_bits += PREFLEN;
if (offset_bits >= 32) {
this_word = next_word;
hs->offset += 4;
next_word = huff_get_next_word(hs, hs->offset + 4);
offset_bits -= 32;
hs->next_word = next_word;
PREFLEN = offset_bits;
}
if (PREFLEN)
this_word = (this_word << PREFLEN) | (next_word >> (32 - offset_bits));
if (flags & JBIG2_HUFFMAN_FLAGS_ISEXT) {
table = entry->u.ext_table;
} else
break;
}
result = entry->u.RANGELOW;
RANGELEN = entry->RANGELEN;
if (RANGELEN > 0) {
int32_t HTOFFSET;
HTOFFSET = this_word >> (32 - RANGELEN);
if (flags & JBIG2_HUFFMAN_FLAGS_ISLOW)
result -= HTOFFSET;
else
result += HTOFFSET;
offset_bits += RANGELEN;
if (offset_bits >= 32) {
this_word = next_word;
hs->offset += 4;
next_word = huff_get_next_word(hs, hs->offset + 4);
offset_bits -= 32;
hs->next_word = next_word;
RANGELEN = offset_bits;
}
if (RANGELEN)
this_word = (this_word << RANGELEN) | (next_word >> (32 - offset_bits));
}
hs->this_word = this_word;
hs->offset_bits = offset_bits;
if (oob != NULL)
*oob = (flags & JBIG2_HUFFMAN_FLAGS_ISOOB);
return result;
}
|
C
|
ghostscript
| 0 |
CVE-2018-6031
|
https://www.cvedetails.com/cve/CVE-2018-6031/
|
CWE-416
|
https://github.com/chromium/chromium/commit/01c9a7e71ca435651723e8cbcab0b3ad4c5351e2
|
01c9a7e71ca435651723e8cbcab0b3ad4c5351e2
|
[pdf] Use a temporary list when unloading pages
When traversing the |deferred_page_unloads_| list and handling the
unloads it's possible for new pages to get added to the list which will
invalidate the iterator.
This CL swaps the list with an empty list and does the iteration on the
list copy. New items that are unloaded while handling the defers will be
unloaded at a later point.
Bug: 780450
Change-Id: Ic7ced1c82227109784fb536ce19a4dd51b9119ac
Reviewed-on: https://chromium-review.googlesource.com/758916
Commit-Queue: dsinclair <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#515056}
|
void PDFiumEngine::FillPageSides(int progressive_index) {
DCHECK_GE(progressive_index, 0);
DCHECK_LT(static_cast<size_t>(progressive_index), progressive_paints_.size());
int page_index = progressive_paints_[progressive_index].page_index;
const pp::Rect& dirty_in_screen = progressive_paints_[progressive_index].rect;
FPDF_BITMAP bitmap = progressive_paints_[progressive_index].bitmap;
pp::Rect page_rect = pages_[page_index]->rect();
if (page_rect.x() > 0) {
pp::Rect left(0, page_rect.y() - kPageShadowTop,
page_rect.x() - kPageShadowLeft,
page_rect.height() + kPageShadowTop + kPageShadowBottom +
kPageSeparatorThickness);
left = GetScreenRect(left).Intersect(dirty_in_screen);
FPDFBitmap_FillRect(bitmap, left.x() - dirty_in_screen.x(),
left.y() - dirty_in_screen.y(), left.width(),
left.height(), client_->GetBackgroundColor());
}
if (page_rect.right() < document_size_.width()) {
pp::Rect right(
page_rect.right() + kPageShadowRight, page_rect.y() - kPageShadowTop,
document_size_.width() - page_rect.right() - kPageShadowRight,
page_rect.height() + kPageShadowTop + kPageShadowBottom +
kPageSeparatorThickness);
right = GetScreenRect(right).Intersect(dirty_in_screen);
FPDFBitmap_FillRect(bitmap, right.x() - dirty_in_screen.x(),
right.y() - dirty_in_screen.y(), right.width(),
right.height(), client_->GetBackgroundColor());
}
pp::Rect bottom(page_rect.x() - kPageShadowLeft,
page_rect.bottom() + kPageShadowBottom,
page_rect.width() + kPageShadowLeft + kPageShadowRight,
kPageSeparatorThickness);
bottom = GetScreenRect(bottom).Intersect(dirty_in_screen);
FPDFBitmap_FillRect(bitmap, bottom.x() - dirty_in_screen.x(),
bottom.y() - dirty_in_screen.y(), bottom.width(),
bottom.height(), client_->GetBackgroundColor());
}
|
void PDFiumEngine::FillPageSides(int progressive_index) {
DCHECK_GE(progressive_index, 0);
DCHECK_LT(static_cast<size_t>(progressive_index), progressive_paints_.size());
int page_index = progressive_paints_[progressive_index].page_index;
const pp::Rect& dirty_in_screen = progressive_paints_[progressive_index].rect;
FPDF_BITMAP bitmap = progressive_paints_[progressive_index].bitmap;
pp::Rect page_rect = pages_[page_index]->rect();
if (page_rect.x() > 0) {
pp::Rect left(0, page_rect.y() - kPageShadowTop,
page_rect.x() - kPageShadowLeft,
page_rect.height() + kPageShadowTop + kPageShadowBottom +
kPageSeparatorThickness);
left = GetScreenRect(left).Intersect(dirty_in_screen);
FPDFBitmap_FillRect(bitmap, left.x() - dirty_in_screen.x(),
left.y() - dirty_in_screen.y(), left.width(),
left.height(), client_->GetBackgroundColor());
}
if (page_rect.right() < document_size_.width()) {
pp::Rect right(
page_rect.right() + kPageShadowRight, page_rect.y() - kPageShadowTop,
document_size_.width() - page_rect.right() - kPageShadowRight,
page_rect.height() + kPageShadowTop + kPageShadowBottom +
kPageSeparatorThickness);
right = GetScreenRect(right).Intersect(dirty_in_screen);
FPDFBitmap_FillRect(bitmap, right.x() - dirty_in_screen.x(),
right.y() - dirty_in_screen.y(), right.width(),
right.height(), client_->GetBackgroundColor());
}
pp::Rect bottom(page_rect.x() - kPageShadowLeft,
page_rect.bottom() + kPageShadowBottom,
page_rect.width() + kPageShadowLeft + kPageShadowRight,
kPageSeparatorThickness);
bottom = GetScreenRect(bottom).Intersect(dirty_in_screen);
FPDFBitmap_FillRect(bitmap, bottom.x() - dirty_in_screen.x(),
bottom.y() - dirty_in_screen.y(), bottom.width(),
bottom.height(), client_->GetBackgroundColor());
}
|
C
|
Chrome
| 0 |
CVE-2011-2918
|
https://www.cvedetails.com/cve/CVE-2011-2918/
|
CWE-399
|
https://github.com/torvalds/linux/commit/a8b0ca17b80e92faab46ee7179ba9e99ccb61233
|
a8b0ca17b80e92faab46ee7179ba9e99ccb61233
|
perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter indicated if we could do wakeups from the current
context, if not, we would set some state and self-IPI and let the
resulting interrupt do the wakeup.
For the various event classes:
- hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from
the PMI-tail (ARM etc.)
- tracepoint: nmi=0; since tracepoint could be from NMI context.
- software: nmi=[0,1]; some, like the schedule thing cannot
perform wakeups, and hence need 0.
As one can see, there is very little nmi=1 usage, and the down-side of
not using it is that on some platforms some software events can have a
jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).
The up-side however is that we can remove the nmi parameter and save a
bunch of conditionals in fast paths.
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Michael Cree <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Deng-Cheng Zhu <[email protected]>
Cc: Anton Blanchard <[email protected]>
Cc: Eric B Munson <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jason Wessel <[email protected]>
Cc: Don Zickus <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
|
static inline unsigned int x86_pmu_event_addr(int index)
{
return x86_pmu.perfctr + x86_pmu_addr_offset(index);
}
|
static inline unsigned int x86_pmu_event_addr(int index)
{
return x86_pmu.perfctr + x86_pmu_addr_offset(index);
}
|
C
|
linux
| 0 |
CVE-2018-11219
|
https://www.cvedetails.com/cve/CVE-2018-11219/
|
CWE-190
|
https://github.com/antirez/redis/commit/1eb08bcd4634ae42ec45e8284923ac048beaa4c3
|
1eb08bcd4634ae42ec45e8284923ac048beaa4c3
|
Security: update Lua struct package for security.
During an auditing Apple found that the "struct" Lua package
we ship with Redis (http://www.inf.puc-rio.br/~roberto/struct/) contains
a security problem. A bound-checking statement fails because of integer
overflow. The bug exists since we initially integrated this package with
Lua, when scripting was introduced, so every version of Redis with
EVAL/EVALSHA capabilities exposed is affected.
Instead of just fixing the bug, the library was updated to the latest
version shipped by the author.
|
static void controloptions (lua_State *L, int opt, const char **fmt,
Header *h) {
switch (opt) {
case ' ': return; /* ignore white spaces */
case '>': h->endian = BIG; return;
case '<': h->endian = LITTLE; return;
case '!': {
int a = getnum(fmt, MAXALIGN);
if (!isp2(a))
luaL_error(L, "alignment %d is not a power of 2", a);
h->align = a;
return;
}
default: {
const char *msg = lua_pushfstring(L, "invalid format option '%c'", opt);
luaL_argerror(L, 1, msg);
}
}
}
|
static void controloptions (lua_State *L, int opt, const char **fmt,
Header *h) {
switch (opt) {
case ' ': return; /* ignore white spaces */
case '>': h->endian = BIG; return;
case '<': h->endian = LITTLE; return;
case '!': {
int a = getnum(L, fmt, MAXALIGN);
if (!isp2(a))
luaL_error(L, "alignment %d is not a power of 2", a);
h->align = a;
return;
}
default: {
const char *msg = lua_pushfstring(L, "invalid format option '%c'", opt);
luaL_argerror(L, 1, msg);
}
}
}
|
C
|
redis
| 1 |
CVE-2018-10360
|
https://www.cvedetails.com/cve/CVE-2018-10360/
|
CWE-125
|
https://github.com/file/file/commit/a642587a9c9e2dd7feacdf513c3643ce26ad3c22
|
a642587a9c9e2dd7feacdf513c3643ce26ad3c22
|
Avoid reading past the end of buffer (Rui Reis)
|
file_tryelf(struct magic_set *ms, const struct buffer *b)
{
int fd = b->fd;
const unsigned char *buf = b->fbuf;
size_t nbytes = b->flen;
union {
int32_t l;
char c[sizeof(int32_t)];
} u;
int clazz;
int swap;
struct stat st;
off_t fsize;
int flags = 0;
Elf32_Ehdr elf32hdr;
Elf64_Ehdr elf64hdr;
uint16_t type, phnum, shnum, notecount;
if (ms->flags & (MAGIC_MIME|MAGIC_APPLE|MAGIC_EXTENSION))
return 0;
/*
* ELF executables have multiple section headers in arbitrary
* file locations and thus file(1) cannot determine it from easily.
* Instead we traverse thru all section headers until a symbol table
* one is found or else the binary is stripped.
* Return immediately if it's not ELF (so we avoid pipe2file unless needed).
*/
if (buf[EI_MAG0] != ELFMAG0
|| (buf[EI_MAG1] != ELFMAG1 && buf[EI_MAG1] != OLFMAG1)
|| buf[EI_MAG2] != ELFMAG2 || buf[EI_MAG3] != ELFMAG3)
return 0;
/*
* If we cannot seek, it must be a pipe, socket or fifo.
*/
if((lseek(fd, CAST(off_t, 0), SEEK_SET) == CAST(off_t, -1))
&& (errno == ESPIPE))
fd = file_pipe2file(ms, fd, buf, nbytes);
if (fstat(fd, &st) == -1) {
file_badread(ms);
return -1;
}
if (S_ISREG(st.st_mode) || st.st_size != 0)
fsize = st.st_size;
else
fsize = SIZE_UNKNOWN;
clazz = buf[EI_CLASS];
switch (clazz) {
case ELFCLASS32:
#undef elf_getu
#define elf_getu(a, b) elf_getu32(a, b)
#undef elfhdr
#define elfhdr elf32hdr
#include "elfclass.h"
case ELFCLASS64:
#undef elf_getu
#define elf_getu(a, b) elf_getu64(a, b)
#undef elfhdr
#define elfhdr elf64hdr
#include "elfclass.h"
default:
if (file_printf(ms, ", unknown class %d", clazz) == -1)
return -1;
break;
}
return 0;
}
|
file_tryelf(struct magic_set *ms, const struct buffer *b)
{
int fd = b->fd;
const unsigned char *buf = b->fbuf;
size_t nbytes = b->flen;
union {
int32_t l;
char c[sizeof(int32_t)];
} u;
int clazz;
int swap;
struct stat st;
off_t fsize;
int flags = 0;
Elf32_Ehdr elf32hdr;
Elf64_Ehdr elf64hdr;
uint16_t type, phnum, shnum, notecount;
if (ms->flags & (MAGIC_MIME|MAGIC_APPLE|MAGIC_EXTENSION))
return 0;
/*
* ELF executables have multiple section headers in arbitrary
* file locations and thus file(1) cannot determine it from easily.
* Instead we traverse thru all section headers until a symbol table
* one is found or else the binary is stripped.
* Return immediately if it's not ELF (so we avoid pipe2file unless needed).
*/
if (buf[EI_MAG0] != ELFMAG0
|| (buf[EI_MAG1] != ELFMAG1 && buf[EI_MAG1] != OLFMAG1)
|| buf[EI_MAG2] != ELFMAG2 || buf[EI_MAG3] != ELFMAG3)
return 0;
/*
* If we cannot seek, it must be a pipe, socket or fifo.
*/
if((lseek(fd, CAST(off_t, 0), SEEK_SET) == CAST(off_t, -1))
&& (errno == ESPIPE))
fd = file_pipe2file(ms, fd, buf, nbytes);
if (fstat(fd, &st) == -1) {
file_badread(ms);
return -1;
}
if (S_ISREG(st.st_mode) || st.st_size != 0)
fsize = st.st_size;
else
fsize = SIZE_UNKNOWN;
clazz = buf[EI_CLASS];
switch (clazz) {
case ELFCLASS32:
#undef elf_getu
#define elf_getu(a, b) elf_getu32(a, b)
#undef elfhdr
#define elfhdr elf32hdr
#include "elfclass.h"
case ELFCLASS64:
#undef elf_getu
#define elf_getu(a, b) elf_getu64(a, b)
#undef elfhdr
#define elfhdr elf64hdr
#include "elfclass.h"
default:
if (file_printf(ms, ", unknown class %d", clazz) == -1)
return -1;
break;
}
return 0;
}
|
C
|
file
| 0 |
CVE-2016-2451
|
https://www.cvedetails.com/cve/CVE-2016-2451/
|
CWE-264
|
https://android.googlesource.com/platform/frameworks/av/+/f9ed2fe6d61259e779a37d4c2d7edb33a1c1f8ba
|
f9ed2fe6d61259e779a37d4c2d7edb33a1c1f8ba
|
Add VPX output buffer size check
and handle dead observers more gracefully
Bug: 27597103
Change-Id: Id7acb25d5ef69b197da15ec200a9e4f9e7b03518
|
OMX::CallbackDispatcher::CallbackDispatcher(OMXNodeInstance *owner)
: mOwner(owner),
mDone(false) {
mThread = new CallbackDispatcherThread(this);
mThread->run("OMXCallbackDisp", ANDROID_PRIORITY_FOREGROUND);
}
|
OMX::CallbackDispatcher::CallbackDispatcher(OMXNodeInstance *owner)
: mOwner(owner),
mDone(false) {
mThread = new CallbackDispatcherThread(this);
mThread->run("OMXCallbackDisp", ANDROID_PRIORITY_FOREGROUND);
}
|
C
|
Android
| 0 |
CVE-2016-3899
|
https://www.cvedetails.com/cve/CVE-2016-3899/
|
CWE-284
|
https://android.googlesource.com/platform/frameworks/av/+/97837bb6cbac21ea679843a0037779d3834bed64
|
97837bb6cbac21ea679843a0037779d3834bed64
|
OMXCodec: check IMemory::pointer() before using allocation
Bug: 29421811
Change-Id: I0a73ba12bae4122f1d89fc92e5ea4f6a96cd1ed1
|
int64_t OMXCodec::getDecodingTimeUs() {
CHECK(mIsEncoder && mIsVideo);
if (mDecodingTimeList.empty()) {
CHECK(mSignalledEOS || mNoMoreOutputData);
return 0;
}
List<int64_t>::iterator it = mDecodingTimeList.begin();
int64_t timeUs = *it;
mDecodingTimeList.erase(it);
return timeUs;
}
|
int64_t OMXCodec::getDecodingTimeUs() {
CHECK(mIsEncoder && mIsVideo);
if (mDecodingTimeList.empty()) {
CHECK(mSignalledEOS || mNoMoreOutputData);
return 0;
}
List<int64_t>::iterator it = mDecodingTimeList.begin();
int64_t timeUs = *it;
mDecodingTimeList.erase(it);
return timeUs;
}
|
C
|
Android
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/a0af50481db56aa780942e8595a20c36b2c34f5c
|
a0af50481db56aa780942e8595a20c36b2c34f5c
|
Build fix following bug #30696.
Patch by Gavin Barraclough <[email protected]> on 2009-10-22
Reviewed by NOBODY (build fix).
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::windowObjectCleared):
* webkit/webkitwebframe.cpp:
(webkit_web_frame_get_global_context):
git-svn-id: svn://svn.chromium.org/blink/trunk@49964 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
GSList* webkit_web_frame_get_children(WebKitWebFrame* frame)
{
g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
Frame* coreFrame = core(frame);
if (!coreFrame)
return NULL;
GSList* children = NULL;
for (Frame* child = coreFrame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
FrameLoader* loader = child->loader();
WebKit::FrameLoaderClient* client = static_cast<WebKit::FrameLoaderClient*>(loader->client());
if (client)
children = g_slist_append(children, client->webFrame());
}
return children;
}
|
GSList* webkit_web_frame_get_children(WebKitWebFrame* frame)
{
g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
Frame* coreFrame = core(frame);
if (!coreFrame)
return NULL;
GSList* children = NULL;
for (Frame* child = coreFrame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
FrameLoader* loader = child->loader();
WebKit::FrameLoaderClient* client = static_cast<WebKit::FrameLoaderClient*>(loader->client());
if (client)
children = g_slist_append(children, client->webFrame());
}
return children;
}
|
C
|
Chrome
| 0 |
CVE-2014-3645
|
https://www.cvedetails.com/cve/CVE-2014-3645/
|
CWE-20
|
https://github.com/torvalds/linux/commit/bfd0a56b90005f8c8a004baf407ad90045c2b11e
|
bfd0a56b90005f8c8a004baf407ad90045c2b11e
|
nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our current nested EPT implementation, when L1 changes its EPT table
for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in
the course of this modification already calls INVEPT. But if last level
of shadow page is unsync not all L1's changes to EPT12 are intercepted,
which means roots need to be synced when L1 calls INVEPT. Global INVEPT
should not be different since roots are synced by kvm_mmu_load() each
time EPTP02 changes.
Reviewed-by: Xiao Guangrong <[email protected]>
Signed-off-by: Nadav Har'El <[email protected]>
Signed-off-by: Jun Nakajima <[email protected]>
Signed-off-by: Xinhao Xu <[email protected]>
Signed-off-by: Yang Zhang <[email protected]>
Signed-off-by: Gleb Natapov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
gfn_t gfn,
gva_t gaddr,
unsigned level,
int direct,
unsigned access,
u64 *parent_pte)
{
union kvm_mmu_page_role role;
unsigned quadrant;
struct kvm_mmu_page *sp;
bool need_sync = false;
role = vcpu->arch.mmu.base_role;
role.level = level;
role.direct = direct;
if (role.direct)
role.cr4_pae = 0;
role.access = access;
if (!vcpu->arch.mmu.direct_map
&& vcpu->arch.mmu.root_level <= PT32_ROOT_LEVEL) {
quadrant = gaddr >> (PAGE_SHIFT + (PT64_PT_BITS * level));
quadrant &= (1 << ((PT32_PT_BITS - PT64_PT_BITS) * level)) - 1;
role.quadrant = quadrant;
}
for_each_gfn_sp(vcpu->kvm, sp, gfn) {
if (is_obsolete_sp(vcpu->kvm, sp))
continue;
if (!need_sync && sp->unsync)
need_sync = true;
if (sp->role.word != role.word)
continue;
if (sp->unsync && kvm_sync_page_transient(vcpu, sp))
break;
mmu_page_add_parent_pte(vcpu, sp, parent_pte);
if (sp->unsync_children) {
kvm_make_request(KVM_REQ_MMU_SYNC, vcpu);
kvm_mmu_mark_parents_unsync(sp);
} else if (sp->unsync)
kvm_mmu_mark_parents_unsync(sp);
__clear_sp_write_flooding_count(sp);
trace_kvm_mmu_get_page(sp, false);
return sp;
}
++vcpu->kvm->stat.mmu_cache_miss;
sp = kvm_mmu_alloc_page(vcpu, parent_pte, direct);
if (!sp)
return sp;
sp->gfn = gfn;
sp->role = role;
hlist_add_head(&sp->hash_link,
&vcpu->kvm->arch.mmu_page_hash[kvm_page_table_hashfn(gfn)]);
if (!direct) {
if (rmap_write_protect(vcpu->kvm, gfn))
kvm_flush_remote_tlbs(vcpu->kvm);
if (level > PT_PAGE_TABLE_LEVEL && need_sync)
kvm_sync_pages(vcpu, gfn);
account_shadowed(vcpu->kvm, gfn);
}
sp->mmu_valid_gen = vcpu->kvm->arch.mmu_valid_gen;
init_shadow_page_table(sp);
trace_kvm_mmu_get_page(sp, true);
return sp;
}
|
static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
gfn_t gfn,
gva_t gaddr,
unsigned level,
int direct,
unsigned access,
u64 *parent_pte)
{
union kvm_mmu_page_role role;
unsigned quadrant;
struct kvm_mmu_page *sp;
bool need_sync = false;
role = vcpu->arch.mmu.base_role;
role.level = level;
role.direct = direct;
if (role.direct)
role.cr4_pae = 0;
role.access = access;
if (!vcpu->arch.mmu.direct_map
&& vcpu->arch.mmu.root_level <= PT32_ROOT_LEVEL) {
quadrant = gaddr >> (PAGE_SHIFT + (PT64_PT_BITS * level));
quadrant &= (1 << ((PT32_PT_BITS - PT64_PT_BITS) * level)) - 1;
role.quadrant = quadrant;
}
for_each_gfn_sp(vcpu->kvm, sp, gfn) {
if (is_obsolete_sp(vcpu->kvm, sp))
continue;
if (!need_sync && sp->unsync)
need_sync = true;
if (sp->role.word != role.word)
continue;
if (sp->unsync && kvm_sync_page_transient(vcpu, sp))
break;
mmu_page_add_parent_pte(vcpu, sp, parent_pte);
if (sp->unsync_children) {
kvm_make_request(KVM_REQ_MMU_SYNC, vcpu);
kvm_mmu_mark_parents_unsync(sp);
} else if (sp->unsync)
kvm_mmu_mark_parents_unsync(sp);
__clear_sp_write_flooding_count(sp);
trace_kvm_mmu_get_page(sp, false);
return sp;
}
++vcpu->kvm->stat.mmu_cache_miss;
sp = kvm_mmu_alloc_page(vcpu, parent_pte, direct);
if (!sp)
return sp;
sp->gfn = gfn;
sp->role = role;
hlist_add_head(&sp->hash_link,
&vcpu->kvm->arch.mmu_page_hash[kvm_page_table_hashfn(gfn)]);
if (!direct) {
if (rmap_write_protect(vcpu->kvm, gfn))
kvm_flush_remote_tlbs(vcpu->kvm);
if (level > PT_PAGE_TABLE_LEVEL && need_sync)
kvm_sync_pages(vcpu, gfn);
account_shadowed(vcpu->kvm, gfn);
}
sp->mmu_valid_gen = vcpu->kvm->arch.mmu_valid_gen;
init_shadow_page_table(sp);
trace_kvm_mmu_get_page(sp, true);
return sp;
}
|
C
|
linux
| 0 |
CVE-2017-5550
|
https://www.cvedetails.com/cve/CVE-2017-5550/
|
CWE-200
|
https://github.com/torvalds/linux/commit/b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb
|
b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb
|
fix a fencepost error in pipe_advance()
The logics in pipe_advance() used to release all buffers past the new
position failed in cases when the number of buffers to release was equal
to pipe->buffers. If that happened, none of them had been released,
leaving pipe full. Worse, it was trivial to trigger and we end up with
pipe full of uninitialized pages. IOW, it's an infoleak.
Cc: [email protected] # v4.9
Reported-by: "Alan J. Wylie" <[email protected]>
Tested-by: "Alan J. Wylie" <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
ssize_t iov_iter_get_pages(struct iov_iter *i,
struct page **pages, size_t maxsize, unsigned maxpages,
size_t *start)
{
if (maxsize > i->count)
maxsize = i->count;
if (unlikely(i->type & ITER_PIPE))
return pipe_get_pages(i, pages, maxsize, maxpages, start);
iterate_all_kinds(i, maxsize, v, ({
unsigned long addr = (unsigned long)v.iov_base;
size_t len = v.iov_len + (*start = addr & (PAGE_SIZE - 1));
int n;
int res;
if (len > maxpages * PAGE_SIZE)
len = maxpages * PAGE_SIZE;
addr &= ~(PAGE_SIZE - 1);
n = DIV_ROUND_UP(len, PAGE_SIZE);
res = get_user_pages_fast(addr, n, (i->type & WRITE) != WRITE, pages);
if (unlikely(res < 0))
return res;
return (res == n ? len : res * PAGE_SIZE) - *start;
0;}),({
/* can't be more than PAGE_SIZE */
*start = v.bv_offset;
get_page(*pages = v.bv_page);
return v.bv_len;
}),({
return -EFAULT;
})
)
return 0;
}
|
ssize_t iov_iter_get_pages(struct iov_iter *i,
struct page **pages, size_t maxsize, unsigned maxpages,
size_t *start)
{
if (maxsize > i->count)
maxsize = i->count;
if (unlikely(i->type & ITER_PIPE))
return pipe_get_pages(i, pages, maxsize, maxpages, start);
iterate_all_kinds(i, maxsize, v, ({
unsigned long addr = (unsigned long)v.iov_base;
size_t len = v.iov_len + (*start = addr & (PAGE_SIZE - 1));
int n;
int res;
if (len > maxpages * PAGE_SIZE)
len = maxpages * PAGE_SIZE;
addr &= ~(PAGE_SIZE - 1);
n = DIV_ROUND_UP(len, PAGE_SIZE);
res = get_user_pages_fast(addr, n, (i->type & WRITE) != WRITE, pages);
if (unlikely(res < 0))
return res;
return (res == n ? len : res * PAGE_SIZE) - *start;
0;}),({
/* can't be more than PAGE_SIZE */
*start = v.bv_offset;
get_page(*pages = v.bv_page);
return v.bv_len;
}),({
return -EFAULT;
})
)
return 0;
}
|
C
|
linux
| 0 |
CVE-2019-5803
|
https://www.cvedetails.com/cve/CVE-2019-5803/
|
CWE-20
|
https://github.com/chromium/chromium/commit/0e3b0c22a5c596bdc24a391b3f02952c1c3e4f1b
|
0e3b0c22a5c596bdc24a391b3f02952c1c3e4f1b
|
Check the source browsing context's CSP in Location::SetLocation prior to dispatching a navigation to a `javascript:` URL.
Makes `javascript:` navigations via window.location.href compliant with
https://html.spec.whatwg.org/#navigate, which states that the source
browsing context must be checked (rather than the current browsing
context).
Bug: 909865
Change-Id: Id6aef6eef56865e164816c67eb9fe07ea1cb1b4e
Reviewed-on: https://chromium-review.googlesource.com/c/1359823
Reviewed-by: Andy Paicu <[email protected]>
Reviewed-by: Mike West <[email protected]>
Commit-Queue: Andrew Comminos <[email protected]>
Cr-Commit-Position: refs/heads/master@{#614451}
|
void Location::setHost(LocalDOMWindow* current_window,
LocalDOMWindow* entered_window,
const String& host,
ExceptionState& exception_state) {
KURL url = GetDocument()->Url();
url.SetHostAndPort(host);
SetLocation(url.GetString(), current_window, entered_window,
&exception_state);
}
|
void Location::setHost(LocalDOMWindow* current_window,
LocalDOMWindow* entered_window,
const String& host,
ExceptionState& exception_state) {
KURL url = GetDocument()->Url();
url.SetHostAndPort(host);
SetLocation(url.GetString(), current_window, entered_window,
&exception_state);
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/d193f6bb5aa5bdc05e07f314abacf7d7bc466d3d
|
d193f6bb5aa5bdc05e07f314abacf7d7bc466d3d
|
cc: Make the PictureLayerImpl raster source null until commit.
No need to make a raster source that is never used.
R=enne, vmpstr
BUG=387116
Review URL: https://codereview.chromium.org/809433003
Cr-Commit-Position: refs/heads/master@{#308466}
|
void SetupPendingTree(scoped_refptr<RasterSource> raster_source) {
SetupPendingTreeInternal(raster_source, gfx::Size(), Region());
}
|
void SetupPendingTree(scoped_refptr<RasterSource> raster_source) {
SetupPendingTreeInternal(raster_source, gfx::Size(), Region());
}
|
C
|
Chrome
| 0 |
CVE-2013-1772
|
https://www.cvedetails.com/cve/CVE-2013-1772/
|
CWE-119
|
https://github.com/torvalds/linux/commit/ce0030c00f95cf9110d9cdcd41e901e1fb814417
|
ce0030c00f95cf9110d9cdcd41e901e1fb814417
|
printk: fix buffer overflow when calling log_prefix function from call_console_drivers
This patch corrects a buffer overflow in kernels from 3.0 to 3.4 when calling
log_prefix() function from call_console_drivers().
This bug existed in previous releases but has been revealed with commit
162a7e7500f9664636e649ba59defe541b7c2c60 (2.6.39 => 3.0) that made changes
about how to allocate memory for early printk buffer (use of memblock_alloc).
It disappears with commit 7ff9554bb578ba02166071d2d487b7fc7d860d62 (3.4 => 3.5)
that does a refactoring of printk buffer management.
In log_prefix(), the access to "p[0]", "p[1]", "p[2]" or
"simple_strtoul(&p[1], &endp, 10)" may cause a buffer overflow as this
function is called from call_console_drivers by passing "&LOG_BUF(cur_index)"
where the index must be masked to do not exceed the buffer's boundary.
The trick is to prepare in call_console_drivers() a buffer with the necessary
data (PRI field of syslog message) to be safely evaluated in log_prefix().
This patch can be applied to stable kernel branches 3.0.y, 3.2.y and 3.4.y.
Without this patch, one can freeze a server running this loop from shell :
$ export DUMMY=`cat /dev/urandom | tr -dc '12345AZERTYUIOPQSDFGHJKLMWXCVBNazertyuiopqsdfghjklmwxcvbn' | head -c255`
$ while true do ; echo $DUMMY > /dev/kmsg ; done
The "server freeze" depends on where memblock_alloc does allocate printk buffer :
if the buffer overflow is inside another kernel allocation the problem may not
be revealed, else the server may hangs up.
Signed-off-by: Alexandre SIMON <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static void _call_console_drivers(unsigned start,
unsigned end, int msg_log_level)
{
trace_console(&LOG_BUF(0), start, end, log_buf_len);
if ((msg_log_level < console_loglevel || ignore_loglevel) &&
console_drivers && start != end) {
if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
/* wrapped write */
__call_console_drivers(start & LOG_BUF_MASK,
log_buf_len);
__call_console_drivers(0, end & LOG_BUF_MASK);
} else {
__call_console_drivers(start, end);
}
}
}
|
static void _call_console_drivers(unsigned start,
unsigned end, int msg_log_level)
{
trace_console(&LOG_BUF(0), start, end, log_buf_len);
if ((msg_log_level < console_loglevel || ignore_loglevel) &&
console_drivers && start != end) {
if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
/* wrapped write */
__call_console_drivers(start & LOG_BUF_MASK,
log_buf_len);
__call_console_drivers(0, end & LOG_BUF_MASK);
} else {
__call_console_drivers(start, end);
}
}
}
|
C
|
linux
| 0 |
CVE-2011-3188
|
https://www.cvedetails.com/cve/CVE-2011-3188/
| null |
https://github.com/torvalds/linux/commit/6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
|
6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
|
net: Compute protocol sequence numbers and fragment IDs using MD5.
Computers have become a lot faster since we compromised on the
partial MD4 hash which we use currently for performance reasons.
MD5 is a much safer choice, and is inline with both RFC1948 and
other ISS generators (OpenBSD, Solaris, etc.)
Furthermore, only having 24-bits of the sequence number be truly
unpredictable is a very serious limitation. So the periodic
regeneration and 8-bit counter have been removed. We compute and
use a full 32-bit sequence number.
For ipv6, DCCP was found to use a 32-bit truncated initial sequence
number (it needs 43-bits) and that is fixed here as well.
Reported-by: Dan Kaminsky <[email protected]>
Tested-by: Willy Tarreau <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static struct inet_peer_base *family_to_base(int family)
{
return family == AF_INET ? &v4_peers : &v6_peers;
}
|
static struct inet_peer_base *family_to_base(int family)
{
return family == AF_INET ? &v4_peers : &v6_peers;
}
|
C
|
linux
| 0 |
CVE-2009-3604
|
https://www.cvedetails.com/cve/CVE-2009-3604/
|
CWE-399
|
https://cgit.freedesktop.org/poppler/poppler/diff/?id=284a928996&id2=75c3466ba2
|
284a92899602daa4a7f429e61849e794569310b5
| null |
char *gstrndup(const char *s, size_t n) {
char *s1 = (char*)gmalloc(n + 1); /* cannot return NULL for size > 0 */
s1[n] = '\0';
memcpy(s1, s, n);
return s1;
}
|
char *gstrndup(const char *s, size_t n) {
char *s1 = (char*)gmalloc(n + 1); /* cannot return NULL for size > 0 */
s1[n] = '\0';
memcpy(s1, s, n);
return s1;
}
|
CPP
|
poppler
| 0 |
CVE-2017-5847
|
https://www.cvedetails.com/cve/CVE-2017-5847/
|
CWE-125
|
https://github.com/GStreamer/gst-plugins-ugly/commit/d21017b52a585f145e8d62781bcc1c5fefc7ee37
|
d21017b52a585f145e8d62781bcc1c5fefc7ee37
|
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors
https://bugzilla.gnome.org/show_bug.cgi?id=777955
|
gst_asf_demux_change_state (GstElement * element, GstStateChange transition)
{
GstASFDemux *demux = GST_ASF_DEMUX (element);
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:{
gst_segment_init (&demux->segment, GST_FORMAT_TIME);
demux->need_newsegment = TRUE;
demux->segment_running = FALSE;
demux->keyunit_sync = FALSE;
demux->accurate = FALSE;
demux->adapter = gst_adapter_new ();
demux->metadata = gst_caps_new_empty ();
demux->global_metadata = gst_structure_new_empty ("metadata");
demux->data_size = 0;
demux->data_offset = 0;
demux->index_offset = 0;
demux->base_offset = 0;
demux->flowcombiner = gst_flow_combiner_new ();
break;
}
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
if (ret == GST_STATE_CHANGE_FAILURE)
return ret;
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_asf_demux_reset (demux, FALSE);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
gst_asf_demux_reset (demux, FALSE);
gst_flow_combiner_free (demux->flowcombiner);
demux->flowcombiner = NULL;
break;
default:
break;
}
return ret;
}
|
gst_asf_demux_change_state (GstElement * element, GstStateChange transition)
{
GstASFDemux *demux = GST_ASF_DEMUX (element);
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:{
gst_segment_init (&demux->segment, GST_FORMAT_TIME);
demux->need_newsegment = TRUE;
demux->segment_running = FALSE;
demux->keyunit_sync = FALSE;
demux->accurate = FALSE;
demux->adapter = gst_adapter_new ();
demux->metadata = gst_caps_new_empty ();
demux->global_metadata = gst_structure_new_empty ("metadata");
demux->data_size = 0;
demux->data_offset = 0;
demux->index_offset = 0;
demux->base_offset = 0;
demux->flowcombiner = gst_flow_combiner_new ();
break;
}
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
if (ret == GST_STATE_CHANGE_FAILURE)
return ret;
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_asf_demux_reset (demux, FALSE);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
gst_asf_demux_reset (demux, FALSE);
gst_flow_combiner_free (demux->flowcombiner);
demux->flowcombiner = NULL;
break;
default:
break;
}
return ret;
}
|
C
|
gst-plugins-ugly
| 0 |
CVE-2011-1296
|
https://www.cvedetails.com/cve/CVE-2011-1296/
|
CWE-20
|
https://github.com/chromium/chromium/commit/c90c6ca59378d7e86d1a2f28fe96bada35df1508
|
c90c6ca59378d7e86d1a2f28fe96bada35df1508
|
Rename the TabContentWrapper pieces to be "TabHelper"s. (Except for the PasswordManager... for now.) Also, just pre-create them up-front. It saves us effort, as they're all going to be eventually created anyway, so being lazy saves us nothing and creates headaches since the rules about what can be lazy differ from feature to feature.
BUG=71097
TEST=zero visible change
Review URL: http://codereview.chromium.org/6480117
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75170 0039d316-1c4b-4281-b951-d872f2087c98
|
void AutomationProvider::HandleUnused(const IPC::Message& message, int handle) {
if (window_tracker_->ContainsHandle(handle)) {
window_tracker_->Remove(window_tracker_->GetResource(handle));
}
}
|
void AutomationProvider::HandleUnused(const IPC::Message& message, int handle) {
if (window_tracker_->ContainsHandle(handle)) {
window_tracker_->Remove(window_tracker_->GetResource(handle));
}
}
|
C
|
Chrome
| 0 |
CVE-2019-5797
| null | null |
https://github.com/chromium/chromium/commit/ba169c14aa9cc2efd708a878ae21ff34f3898fe0
|
ba169c14aa9cc2efd708a878ae21ff34f3898fe0
|
Fixing BadMessageCallback usage by SessionStorage
TBR: [email protected]
Bug: 916523
Change-Id: I027cc818cfba917906844ad2ec0edd7fa4761bd1
Reviewed-on: https://chromium-review.googlesource.com/c/1401604
Commit-Queue: Daniel Murphy <[email protected]>
Reviewed-by: Marijn Kruisselbrink <[email protected]>
Reviewed-by: Ken Rockot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#621772}
|
StoragePartitionImpl::GetURLLoaderFactoryForBrowserProcess() {
if (!shared_url_loader_factory_for_browser_process_) {
shared_url_loader_factory_for_browser_process_ =
new URLLoaderFactoryForBrowserProcess(this);
}
return shared_url_loader_factory_for_browser_process_;
}
|
StoragePartitionImpl::GetURLLoaderFactoryForBrowserProcess() {
if (!shared_url_loader_factory_for_browser_process_) {
shared_url_loader_factory_for_browser_process_ =
new URLLoaderFactoryForBrowserProcess(this);
}
return shared_url_loader_factory_for_browser_process_;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/2513dd6b9abb188c1c666609aa9c24a498e1dba4
|
2513dd6b9abb188c1c666609aa9c24a498e1dba4
|
Relanding this as this caused layout tests failures on Win7 due to the call to ShowScrollBars being incorrectly deleted
in the HWNDMessageHandler::OnSize for a regular WM_SIZE. Added that call back. The rest of the CL is exactly the same as
the previous one. TBR'ing sky.
Don't set the scroll styles (WS_VSCROLL and WS_HSCROLL) for WS_POPUP windows.
This causes issues with select boxes on Windows 7 where hovering at the end of the window returns the scroll WM_NCHITTEST
codes. Works fine on Windows 8. In any case we don't want the scrolling styles set on windows other than the main Chrome window
which is the only window which should be receive mousewheel messages.
I moved the scroll style setting code from the HWNDMessageHandler::OnCreate function to HWNDMessageHandler::Init function as that
would prevent the initial WM_SIZE message from hiding the scrollbar. The other change is to hide the scrollbars and readd the
scroll styles if we are sizing the window, when the sizing completes. Basically when we receive the WM_EXITSIZEMOVE message.
For normal sizing operations we continue to do this in WM_SIZE as before.
From testing on my thinkpad with Win7, desktop with Win7 and Win8 this works well
BUG=334454, 334541
TBR=sky
Review URL: https://codereview.chromium.org/133273020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245289 0039d316-1c4b-4281-b951-d872f2087c98
|
void HWNDMessageHandler::CloseNow() {
waiting_for_close_now_ = false;
if (IsWindow(hwnd()))
DestroyWindow(hwnd());
}
|
void HWNDMessageHandler::CloseNow() {
waiting_for_close_now_ = false;
if (IsWindow(hwnd()))
DestroyWindow(hwnd());
}
|
C
|
Chrome
| 0 |
CVE-2013-0910
|
https://www.cvedetails.com/cve/CVE-2013-0910/
|
CWE-287
|
https://github.com/chromium/chromium/commit/ac8bd041b81e46e4e4fcd5021aaa5499703952e6
|
ac8bd041b81e46e4e4fcd5021aaa5499703952e6
|
Follow-on fixes and naming changes for https://codereview.chromium.org/12086077/
BUG=172573
Review URL: https://codereview.chromium.org/12177018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180600 0039d316-1c4b-4281-b951-d872f2087c98
|
bool FakePluginServiceFilter::CanLoadPlugin(int render_process_id,
const FilePath& path) {
return true;
}
|
bool FakePluginServiceFilter::CanLoadPlugin(int render_process_id,
const FilePath& path) {
return true;
}
|
C
|
Chrome
| 0 |
CVE-2018-17476
|
https://www.cvedetails.com/cve/CVE-2018-17476/
|
CWE-20
|
https://github.com/chromium/chromium/commit/3d41e77125f3de8d722b6d8303599abaf2a91667
|
3d41e77125f3de8d722b6d8303599abaf2a91667
|
If a dialog is shown, drop fullscreen.
BUG=875066, 817809, 792876, 812769, 813815
TEST=included
Change-Id: Ic3d697fa3c4b01f5d7fea77391857177ada660db
Reviewed-on: https://chromium-review.googlesource.com/1185208
Reviewed-by: Sidney San Martín <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586418}
|
void Browser::TabDetachedAt(WebContents* contents, int index, bool was_active) {
if (!tab_strip_model_->closing_all()) {
SessionService* session_service =
SessionServiceFactory::GetForProfileIfExisting(profile_);
if (session_service) {
session_service->SetSelectedTabInWindow(session_id(),
tab_strip_model_->active_index());
}
}
TabDetachedAtImpl(contents, was_active, DETACH_TYPE_DETACH);
}
|
void Browser::TabDetachedAt(WebContents* contents, int index, bool was_active) {
if (!tab_strip_model_->closing_all()) {
SessionService* session_service =
SessionServiceFactory::GetForProfileIfExisting(profile_);
if (session_service) {
session_service->SetSelectedTabInWindow(session_id(),
tab_strip_model_->active_index());
}
}
TabDetachedAtImpl(contents, was_active, DETACH_TYPE_DETACH);
}
|
C
|
Chrome
| 0 |
CVE-2016-3760
|
https://www.cvedetails.com/cve/CVE-2016-3760/
|
CWE-20
|
https://android.googlesource.com/platform/system/bt/+/37c88107679d36c419572732b4af6e18bb2f7dce
|
37c88107679d36c419572732b4af6e18bb2f7dce
|
Add guest mode functionality (2/3)
Add a flag to enable() to start Bluetooth in restricted
mode. In restricted mode, all devices that are paired during
restricted mode are deleted upon leaving restricted mode.
Right now restricted mode is only entered while a guest
user is active.
Bug: 27410683
Change-Id: I8f23d28ef0aa3a8df13d469c73005c8e1b894d19
|
static int remove_bond(const bt_bdaddr_t *bd_addr)
{
if (is_restricted_mode() && !btif_storage_is_restricted_device(bd_addr))
return BT_STATUS_SUCCESS;
/* sanity check */
if (interface_ready() == FALSE)
return BT_STATUS_NOT_READY;
return btif_dm_remove_bond(bd_addr);
}
|
static int remove_bond(const bt_bdaddr_t *bd_addr)
{
/* sanity check */
if (interface_ready() == FALSE)
return BT_STATUS_NOT_READY;
return btif_dm_remove_bond(bd_addr);
}
|
C
|
Android
| 1 |
CVE-2011-2783
|
https://www.cvedetails.com/cve/CVE-2011-2783/
|
CWE-20
|
https://github.com/chromium/chromium/commit/5fb88938e3210391f8c948f127fd96d9c2979119
|
5fb88938e3210391f8c948f127fd96d9c2979119
|
Unrevert: Show the install dialog for the initial load of an unpacked extension
with plugins.
First landing broke some browser tests.
BUG=83273
TEST=in the extensions managmenet page, with developer mode enabled, Load an unpacked extension on an extension with NPAPI plugins. You should get an install dialog.
TBR=mihaip
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87738 0039d316-1c4b-4281-b951-d872f2087c98
|
static void WindowOpenHelper(Browser* browser, const GURL& start_url,
const std::string& newtab_url,
TabContents** newtab_result) {
ui_test_utils::NavigateToURL(browser, start_url);
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
browser->GetSelectedTabContents()->render_view_host(), L"",
L"window.open('" + UTF8ToWide(newtab_url) + L"');"));
Browser* last_active_browser = BrowserList::GetLastActive();
EXPECT_TRUE(last_active_browser);
TabContents* newtab = last_active_browser->GetSelectedTabContents();
EXPECT_TRUE(newtab);
GURL expected_url = start_url.Resolve(newtab_url);
if (!newtab->controller().GetLastCommittedEntry() ||
newtab->controller().GetLastCommittedEntry()->url() != expected_url)
ui_test_utils::WaitForNavigation(&newtab->controller());
EXPECT_EQ(expected_url,
newtab->controller().GetLastCommittedEntry()->url());
if (newtab_result)
*newtab_result = newtab;
}
|
static void WindowOpenHelper(Browser* browser, const GURL& start_url,
const std::string& newtab_url,
TabContents** newtab_result) {
ui_test_utils::NavigateToURL(browser, start_url);
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
browser->GetSelectedTabContents()->render_view_host(), L"",
L"window.open('" + UTF8ToWide(newtab_url) + L"');"));
Browser* last_active_browser = BrowserList::GetLastActive();
EXPECT_TRUE(last_active_browser);
TabContents* newtab = last_active_browser->GetSelectedTabContents();
EXPECT_TRUE(newtab);
GURL expected_url = start_url.Resolve(newtab_url);
if (!newtab->controller().GetLastCommittedEntry() ||
newtab->controller().GetLastCommittedEntry()->url() != expected_url)
ui_test_utils::WaitForNavigation(&newtab->controller());
EXPECT_EQ(expected_url,
newtab->controller().GetLastCommittedEntry()->url());
if (newtab_result)
*newtab_result = newtab;
}
|
C
|
Chrome
| 0 |
CVE-2015-8325
|
https://www.cvedetails.com/cve/CVE-2015-8325/
|
CWE-264
|
https://anongit.mindrot.org/openssh.git/commit/?id=85bdcd7c92fe7ff133bbc4e10a65c91810f88755
|
85bdcd7c92fe7ff133bbc4e10a65c91810f88755
| null |
session_close_x11(int id)
{
Channel *c;
if ((c = channel_by_id(id)) == NULL) {
debug("session_close_x11: x11 channel %d missing", id);
} else {
/* Detach X11 listener */
debug("session_close_x11: detach x11 channel %d", id);
channel_cancel_cleanup(id);
if (c->ostate != CHAN_OUTPUT_CLOSED)
chan_mark_dead(c);
}
}
|
session_close_x11(int id)
{
Channel *c;
if ((c = channel_by_id(id)) == NULL) {
debug("session_close_x11: x11 channel %d missing", id);
} else {
/* Detach X11 listener */
debug("session_close_x11: detach x11 channel %d", id);
channel_cancel_cleanup(id);
if (c->ostate != CHAN_OUTPUT_CLOSED)
chan_mark_dead(c);
}
}
|
C
|
mindrot
| 0 |
CVE-2011-1019
|
https://www.cvedetails.com/cve/CVE-2011-1019/
|
CWE-264
|
https://github.com/torvalds/linux/commit/8909c9ad8ff03611c9c96c9a92656213e4bb495b
|
8909c9ad8ff03611c9c96c9a92656213e4bb495b
|
net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules
Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean
that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
limited to /lib/modules/**. However, CAP_NET_ADMIN capability shouldn't
allow anybody load any module not related to networking.
This patch restricts an ability of autoloading modules to netdev modules
with explicit aliases. This fixes CVE-2011-1019.
Arnd Bergmann suggested to leave untouched the old pre-v2.6.32 behavior
of loading netdev modules by name (without any prefix) for processes
with CAP_SYS_MODULE to maintain the compatibility with network scripts
that use autoloading netdev modules by aliases like "eth0", "wlan0".
Currently there are only three users of the feature in the upstream
kernel: ipip, ip_gre and sit.
root@albatros:~# capsh --drop=$(seq -s, 0 11),$(seq -s, 13 34) --
root@albatros:~# grep Cap /proc/$$/status
CapInh: 0000000000000000
CapPrm: fffffff800001000
CapEff: fffffff800001000
CapBnd: fffffff800001000
root@albatros:~# modprobe xfs
FATAL: Error inserting xfs
(/lib/modules/2.6.38-rc6-00001-g2bf4ca3/kernel/fs/xfs/xfs.ko): Operation not permitted
root@albatros:~# lsmod | grep xfs
root@albatros:~# ifconfig xfs
xfs: error fetching interface information: Device not found
root@albatros:~# lsmod | grep xfs
root@albatros:~# lsmod | grep sit
root@albatros:~# ifconfig sit
sit: error fetching interface information: Device not found
root@albatros:~# lsmod | grep sit
root@albatros:~# ifconfig sit0
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
root@albatros:~# lsmod | grep sit
sit 10457 0
tunnel4 2957 1 sit
For CAP_SYS_MODULE module loading is still relaxed:
root@albatros:~# grep Cap /proc/$$/status
CapInh: 0000000000000000
CapPrm: ffffffffffffffff
CapEff: ffffffffffffffff
CapBnd: ffffffffffffffff
root@albatros:~# ifconfig xfs
xfs: error fetching interface information: Device not found
root@albatros:~# lsmod | grep xfs
xfs 745319 0
Reference: https://lkml.org/lkml/2011/2/24/203
Signed-off-by: Vasiliy Kulikov <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
Acked-by: David S. Miller <[email protected]>
Acked-by: Kees Cook <[email protected]>
Signed-off-by: James Morris <[email protected]>
|
static void ipip_dev_free(struct net_device *dev)
{
free_percpu(dev->tstats);
free_netdev(dev);
}
|
static void ipip_dev_free(struct net_device *dev)
{
free_percpu(dev->tstats);
free_netdev(dev);
}
|
C
|
linux
| 0 |
CVE-2014-2669
|
https://www.cvedetails.com/cve/CVE-2014-2669/
|
CWE-189
|
https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a
|
31400a673325147e1205326008e32135a78b4d8a
|
Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064
|
box_contained(PG_FUNCTION_ARGS)
{
BOX *box1 = PG_GETARG_BOX_P(0);
BOX *box2 = PG_GETARG_BOX_P(1);
PG_RETURN_BOOL(FPle(box1->high.x, box2->high.x) &&
FPge(box1->low.x, box2->low.x) &&
FPle(box1->high.y, box2->high.y) &&
FPge(box1->low.y, box2->low.y));
}
|
box_contained(PG_FUNCTION_ARGS)
{
BOX *box1 = PG_GETARG_BOX_P(0);
BOX *box2 = PG_GETARG_BOX_P(1);
PG_RETURN_BOOL(FPle(box1->high.x, box2->high.x) &&
FPge(box1->low.x, box2->low.x) &&
FPle(box1->high.y, box2->high.y) &&
FPge(box1->low.y, box2->low.y));
}
|
C
|
postgres
| 0 |
CVE-2013-7024
|
https://www.cvedetails.com/cve/CVE-2013-7024/
|
CWE-119
|
https://github.com/FFmpeg/FFmpeg/commit/fe448cd28d674c3eff3072552eae366d0b659ce9
|
fe448cd28d674c3eff3072552eae366d0b659ce9
|
avcodec/jpeg2000dec: prevent out of array accesses in pixel addressing
Fixes Ticket2921
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int get_coc(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c,
uint8_t *properties)
{
int compno, ret;
if (bytestream2_get_bytes_left(&s->g) < 2)
return AVERROR_INVALIDDATA;
compno = bytestream2_get_byteu(&s->g);
if (compno >= s->ncomponents) {
av_log(s->avctx, AV_LOG_ERROR,
"Invalid compno %d. There are %d components in the image.\n",
compno, s->ncomponents);
return AVERROR_INVALIDDATA;
}
c += compno;
c->csty = bytestream2_get_byteu(&s->g);
if ((ret = get_cox(s, c)) < 0)
return ret;
properties[compno] |= HAD_COC;
return 0;
}
|
static int get_coc(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c,
uint8_t *properties)
{
int compno, ret;
if (bytestream2_get_bytes_left(&s->g) < 2)
return AVERROR_INVALIDDATA;
compno = bytestream2_get_byteu(&s->g);
if (compno >= s->ncomponents) {
av_log(s->avctx, AV_LOG_ERROR,
"Invalid compno %d. There are %d components in the image.\n",
compno, s->ncomponents);
return AVERROR_INVALIDDATA;
}
c += compno;
c->csty = bytestream2_get_byteu(&s->g);
if ((ret = get_cox(s, c)) < 0)
return ret;
properties[compno] |= HAD_COC;
return 0;
}
|
C
|
FFmpeg
| 0 |
CVE-2011-1428
|
https://www.cvedetails.com/cve/CVE-2011-1428/
|
CWE-20
|
https://git.savannah.gnu.org/gitweb/?p=weechat.git;a=commit;h=c265cad1c95b84abfd4e8d861f25926ef13b5d91
|
c265cad1c95b84abfd4e8d861f25926ef13b5d91
| null |
hook_command_run (struct t_weechat_plugin *plugin, const char *command,
t_hook_callback_command_run *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_command_run *new_hook_command_run;
int priority;
const char *ptr_command;
if (!callback)
return NULL;
new_hook = malloc (sizeof (*new_hook));
if (!new_hook)
return NULL;
new_hook_command_run = malloc (sizeof (*new_hook_command_run));
if (!new_hook_command_run)
{
free (new_hook);
return NULL;
}
hook_get_priority_and_name (command, &priority, &ptr_command);
hook_init_data (new_hook, plugin, HOOK_TYPE_COMMAND_RUN, priority,
callback_data);
new_hook->hook_data = new_hook_command_run;
new_hook_command_run->callback = callback;
new_hook_command_run->command = strdup ((ptr_command) ? ptr_command :
((command) ? command : ""));
hook_add_to_list (new_hook);
return new_hook;
}
|
hook_command_run (struct t_weechat_plugin *plugin, const char *command,
t_hook_callback_command_run *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_command_run *new_hook_command_run;
int priority;
const char *ptr_command;
if (!callback)
return NULL;
new_hook = malloc (sizeof (*new_hook));
if (!new_hook)
return NULL;
new_hook_command_run = malloc (sizeof (*new_hook_command_run));
if (!new_hook_command_run)
{
free (new_hook);
return NULL;
}
hook_get_priority_and_name (command, &priority, &ptr_command);
hook_init_data (new_hook, plugin, HOOK_TYPE_COMMAND_RUN, priority,
callback_data);
new_hook->hook_data = new_hook_command_run;
new_hook_command_run->callback = callback;
new_hook_command_run->command = strdup ((ptr_command) ? ptr_command :
((command) ? command : ""));
hook_add_to_list (new_hook);
return new_hook;
}
|
C
|
savannah
| 0 |
CVE-2013-7446
|
https://www.cvedetails.com/cve/CVE-2013-7446/
| null |
https://github.com/torvalds/linux/commit/7d267278a9ece963d77eefec61630223fce08c6c
|
7d267278a9ece963d77eefec61630223fce08c6c
|
unix: avoid use-after-free in ep_remove_wait_queue
Rainer Weikusat <[email protected]> writes:
An AF_UNIX datagram socket being the client in an n:1 association with
some server socket is only allowed to send messages to the server if the
receive queue of this socket contains at most sk_max_ack_backlog
datagrams. This implies that prospective writers might be forced to go
to sleep despite none of the message presently enqueued on the server
receive queue were sent by them. In order to ensure that these will be
woken up once space becomes again available, the present unix_dgram_poll
routine does a second sock_poll_wait call with the peer_wait wait queue
of the server socket as queue argument (unix_dgram_recvmsg does a wake
up on this queue after a datagram was received). This is inherently
problematic because the server socket is only guaranteed to remain alive
for as long as the client still holds a reference to it. In case the
connection is dissolved via connect or by the dead peer detection logic
in unix_dgram_sendmsg, the server socket may be freed despite "the
polling mechanism" (in particular, epoll) still has a pointer to the
corresponding peer_wait queue. There's no way to forcibly deregister a
wait queue with epoll.
Based on an idea by Jason Baron, the patch below changes the code such
that a wait_queue_t belonging to the client socket is enqueued on the
peer_wait queue of the server whenever the peer receive queue full
condition is detected by either a sendmsg or a poll. A wake up on the
peer queue is then relayed to the ordinary wait queue of the client
socket via wake function. The connection to the peer wait queue is again
dissolved if either a wake up is about to be relayed or the client
socket reconnects or a dead peer is detected or the client socket is
itself closed. This enables removing the second sock_poll_wait from
unix_dgram_poll, thus avoiding the use-after-free, while still ensuring
that no blocked writer sleeps forever.
Signed-off-by: Rainer Weikusat <[email protected]>
Fixes: ec0d215f9420 ("af_unix: fix 'poll for write'/connected DGRAM sockets")
Reviewed-by: Jason Baron <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int __init af_unix_init(void)
{
int rc = -1;
BUILD_BUG_ON(sizeof(struct unix_skb_parms) > FIELD_SIZEOF(struct sk_buff, cb));
rc = proto_register(&unix_proto, 1);
if (rc != 0) {
pr_crit("%s: Cannot create unix_sock SLAB cache!\n", __func__);
goto out;
}
sock_register(&unix_family_ops);
register_pernet_subsys(&unix_net_ops);
out:
return rc;
}
|
static int __init af_unix_init(void)
{
int rc = -1;
BUILD_BUG_ON(sizeof(struct unix_skb_parms) > FIELD_SIZEOF(struct sk_buff, cb));
rc = proto_register(&unix_proto, 1);
if (rc != 0) {
pr_crit("%s: Cannot create unix_sock SLAB cache!\n", __func__);
goto out;
}
sock_register(&unix_family_ops);
register_pernet_subsys(&unix_net_ops);
out:
return rc;
}
|
C
|
linux
| 0 |
CVE-2011-2909
|
https://www.cvedetails.com/cve/CVE-2011-2909/
|
CWE-200
|
https://github.com/torvalds/linux/commit/819cbb120eaec7e014e5abd029260db1ca8c5735
|
819cbb120eaec7e014e5abd029260db1ca8c5735
|
staging: comedi: fix infoleak to userspace
driver_name and board_name are pointers to strings, not buffers of size
COMEDI_NAMELEN. Copying COMEDI_NAMELEN bytes of a string containing
less than COMEDI_NAMELEN-1 bytes would leak some unrelated bytes.
Signed-off-by: Vasiliy Kulikov <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static void comedi_cleanup_legacy_minors(void)
{
unsigned i;
for (i = 0; i < comedi_num_legacy_minors; i++)
comedi_free_board_minor(i);
}
|
static void comedi_cleanup_legacy_minors(void)
{
unsigned i;
for (i = 0; i < comedi_num_legacy_minors; i++)
comedi_free_board_minor(i);
}
|
C
|
linux
| 0 |
CVE-2018-18349
|
https://www.cvedetails.com/cve/CVE-2018-18349/
|
CWE-732
|
https://github.com/chromium/chromium/commit/5f8671e7667b8b133bd3664100012a3906e92d65
|
5f8671e7667b8b133bd3664100012a3906e92d65
|
Add a check for disallowing remote frame navigations to local resources.
Previously, RemoteFrame navigations did not perform any renderer-side
checks and relied solely on the browser-side logic to block disallowed
navigations via mechanisms like FilterURL. This means that blocked
remote frame navigations were silently navigated to about:blank
without any console error message.
This CL adds a CanDisplay check to the remote navigation path to match
an equivalent check done for local frame navigations. This way, the
renderer can consistently block disallowed navigations in both cases
and output an error message.
Bug: 894399
Change-Id: I172f68f77c1676f6ca0172d2a6c78f7edc0e3b7a
Reviewed-on: https://chromium-review.googlesource.com/c/1282390
Reviewed-by: Charlie Reis <[email protected]>
Reviewed-by: Nate Chapin <[email protected]>
Commit-Queue: Alex Moshchuk <[email protected]>
Cr-Commit-Position: refs/heads/master@{#601022}
|
void RemoteFrame::PointerEventsChanged() {
if (!cc_layer_ || !is_surface_layer_)
return;
static_cast<cc::SurfaceLayer*>(cc_layer_)->SetHasPointerEventsNone(
IsIgnoredForHitTest());
}
|
void RemoteFrame::PointerEventsChanged() {
if (!cc_layer_ || !is_surface_layer_)
return;
static_cast<cc::SurfaceLayer*>(cc_layer_)->SetHasPointerEventsNone(
IsIgnoredForHitTest());
}
|
C
|
Chrome
| 0 |
CVE-2017-18255
|
https://www.cvedetails.com/cve/CVE-2017-18255/
|
CWE-190
|
https://github.com/torvalds/linux/commit/1572e45a924f254d9570093abde46430c3172e3d
|
1572e45a924f254d9570093abde46430c3172e3d
|
perf/core: Fix the perf_cpu_time_max_percent check
Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input
value from user-space.
If not, we can set a big value and some vars will overflow like
"sysctl_perf_event_sample_rate" which will cause a lot of unexpected
problems.
Signed-off-by: Tan Xiaojun <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vince Weaver <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
|
static int perf_event_read(struct perf_event *event, bool group)
{
int event_cpu, ret = 0;
/*
* If event is enabled and currently active on a CPU, update the
* value in the event structure:
*/
if (event->state == PERF_EVENT_STATE_ACTIVE) {
struct perf_read_data data = {
.event = event,
.group = group,
.ret = 0,
};
event_cpu = READ_ONCE(event->oncpu);
if ((unsigned)event_cpu >= nr_cpu_ids)
return 0;
preempt_disable();
event_cpu = __perf_event_read_cpu(event, event_cpu);
/*
* Purposely ignore the smp_call_function_single() return
* value.
*
* If event_cpu isn't a valid CPU it means the event got
* scheduled out and that will have updated the event count.
*
* Therefore, either way, we'll have an up-to-date event count
* after this.
*/
(void)smp_call_function_single(event_cpu, __perf_event_read, &data, 1);
preempt_enable();
ret = data.ret;
} else if (event->state == PERF_EVENT_STATE_INACTIVE) {
struct perf_event_context *ctx = event->ctx;
unsigned long flags;
raw_spin_lock_irqsave(&ctx->lock, flags);
/*
* may read while context is not active
* (e.g., thread is blocked), in that case
* we cannot update context time
*/
if (ctx->is_active) {
update_context_time(ctx);
update_cgrp_time_from_event(event);
}
if (group)
update_group_times(event);
else
update_event_times(event);
raw_spin_unlock_irqrestore(&ctx->lock, flags);
}
return ret;
}
|
static int perf_event_read(struct perf_event *event, bool group)
{
int event_cpu, ret = 0;
/*
* If event is enabled and currently active on a CPU, update the
* value in the event structure:
*/
if (event->state == PERF_EVENT_STATE_ACTIVE) {
struct perf_read_data data = {
.event = event,
.group = group,
.ret = 0,
};
event_cpu = READ_ONCE(event->oncpu);
if ((unsigned)event_cpu >= nr_cpu_ids)
return 0;
preempt_disable();
event_cpu = __perf_event_read_cpu(event, event_cpu);
/*
* Purposely ignore the smp_call_function_single() return
* value.
*
* If event_cpu isn't a valid CPU it means the event got
* scheduled out and that will have updated the event count.
*
* Therefore, either way, we'll have an up-to-date event count
* after this.
*/
(void)smp_call_function_single(event_cpu, __perf_event_read, &data, 1);
preempt_enable();
ret = data.ret;
} else if (event->state == PERF_EVENT_STATE_INACTIVE) {
struct perf_event_context *ctx = event->ctx;
unsigned long flags;
raw_spin_lock_irqsave(&ctx->lock, flags);
/*
* may read while context is not active
* (e.g., thread is blocked), in that case
* we cannot update context time
*/
if (ctx->is_active) {
update_context_time(ctx);
update_cgrp_time_from_event(event);
}
if (group)
update_group_times(event);
else
update_event_times(event);
raw_spin_unlock_irqrestore(&ctx->lock, flags);
}
return ret;
}
|
C
|
linux
| 0 |
CVE-2014-1747
|
https://www.cvedetails.com/cve/CVE-2014-1747/
|
CWE-79
|
https://github.com/chromium/chromium/commit/1924f747637265f563892b8f56a64391f6208194
|
1924f747637265f563892b8f56a64391f6208194
|
Allow the cast tray to function as expected when the installed extension is missing API methods.
BUG=489445
Review URL: https://codereview.chromium.org/1145833003
Cr-Commit-Position: refs/heads/master@{#330663}
|
void TrayCast::DestroyDetailedView() {
detailed_ = nullptr;
}
|
void TrayCast::DestroyDetailedView() {
detailed_ = nullptr;
}
|
C
|
Chrome
| 0 |
CVE-2019-13302
|
https://www.cvedetails.com/cve/CVE-2019-13302/
|
CWE-125
|
https://github.com/ImageMagick/ImageMagick/commit/d5089971bd792311aaab5cb73460326d7ef7f32d
|
d5089971bd792311aaab5cb73460326d7ef7f32d
|
https://github.com/ImageMagick/ImageMagick/issues/1597
|
static MagickBooleanType ForwardFourierTransformChannel(const Image *image,
const PixelChannel channel,const MagickBooleanType modulus,
Image *fourier_image,ExceptionInfo *exception)
{
double
*magnitude_pixels,
*phase_pixels;
FourierInfo
fourier_info;
MagickBooleanType
status;
MemoryInfo
*magnitude_info,
*phase_info;
fourier_info.width=image->columns;
fourier_info.height=image->rows;
if ((image->columns != image->rows) || ((image->columns % 2) != 0) ||
((image->rows % 2) != 0))
{
size_t extent=image->columns < image->rows ? image->rows : image->columns;
fourier_info.width=(extent & 0x01) == 1 ? extent+1UL : extent;
}
fourier_info.height=fourier_info.width;
fourier_info.center=(ssize_t) (fourier_info.width/2L)+1L;
fourier_info.channel=channel;
fourier_info.modulus=modulus;
magnitude_info=AcquireVirtualMemory((size_t) fourier_info.width,
(fourier_info.height/2+1)*sizeof(*magnitude_pixels));
phase_info=AcquireVirtualMemory((size_t) fourier_info.width,
(fourier_info.height/2+1)*sizeof(*phase_pixels));
if ((magnitude_info == (MemoryInfo *) NULL) ||
(phase_info == (MemoryInfo *) NULL))
{
if (phase_info != (MemoryInfo *) NULL)
phase_info=RelinquishVirtualMemory(phase_info);
if (magnitude_info == (MemoryInfo *) NULL)
magnitude_info=RelinquishVirtualMemory(magnitude_info);
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
return(MagickFalse);
}
magnitude_pixels=(double *) GetVirtualMemoryBlob(magnitude_info);
phase_pixels=(double *) GetVirtualMemoryBlob(phase_info);
status=ForwardFourierTransform(&fourier_info,image,magnitude_pixels,
phase_pixels,exception);
if (status != MagickFalse)
status=ForwardFourier(&fourier_info,fourier_image,magnitude_pixels,
phase_pixels,exception);
phase_info=RelinquishVirtualMemory(phase_info);
magnitude_info=RelinquishVirtualMemory(magnitude_info);
return(status);
}
|
static MagickBooleanType ForwardFourierTransformChannel(const Image *image,
const PixelChannel channel,const MagickBooleanType modulus,
Image *fourier_image,ExceptionInfo *exception)
{
double
*magnitude_pixels,
*phase_pixels;
FourierInfo
fourier_info;
MagickBooleanType
status;
MemoryInfo
*magnitude_info,
*phase_info;
fourier_info.width=image->columns;
fourier_info.height=image->rows;
if ((image->columns != image->rows) || ((image->columns % 2) != 0) ||
((image->rows % 2) != 0))
{
size_t extent=image->columns < image->rows ? image->rows : image->columns;
fourier_info.width=(extent & 0x01) == 1 ? extent+1UL : extent;
}
fourier_info.height=fourier_info.width;
fourier_info.center=(ssize_t) (fourier_info.width/2L)+1L;
fourier_info.channel=channel;
fourier_info.modulus=modulus;
magnitude_info=AcquireVirtualMemory((size_t) fourier_info.width,
(fourier_info.height/2+1)*sizeof(*magnitude_pixels));
phase_info=AcquireVirtualMemory((size_t) fourier_info.width,
(fourier_info.height/2+1)*sizeof(*phase_pixels));
if ((magnitude_info == (MemoryInfo *) NULL) ||
(phase_info == (MemoryInfo *) NULL))
{
if (phase_info != (MemoryInfo *) NULL)
phase_info=RelinquishVirtualMemory(phase_info);
if (magnitude_info == (MemoryInfo *) NULL)
magnitude_info=RelinquishVirtualMemory(magnitude_info);
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
return(MagickFalse);
}
magnitude_pixels=(double *) GetVirtualMemoryBlob(magnitude_info);
phase_pixels=(double *) GetVirtualMemoryBlob(phase_info);
status=ForwardFourierTransform(&fourier_info,image,magnitude_pixels,
phase_pixels,exception);
if (status != MagickFalse)
status=ForwardFourier(&fourier_info,fourier_image,magnitude_pixels,
phase_pixels,exception);
phase_info=RelinquishVirtualMemory(phase_info);
magnitude_info=RelinquishVirtualMemory(magnitude_info);
return(status);
}
|
C
|
ImageMagick
| 0 |
CVE-2012-2844
|
https://www.cvedetails.com/cve/CVE-2012-2844/
| null |
https://github.com/chromium/chromium/commit/46afbe7f7f55280947e9c06c429a68983ba9d8dd
|
46afbe7f7f55280947e9c06c429a68983ba9d8dd
|
[EFL][WK2] Add --window-size command line option to EFL MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=100942
Patch by Mikhail Pozdnyakov <[email protected]> on 2012-11-05
Reviewed by Kenneth Rohde Christiansen.
Added window-size (-s) command line option to EFL MiniBrowser.
* MiniBrowser/efl/main.c:
(window_create):
(parse_window_size):
(elm_main):
git-svn-id: svn://svn.chromium.org/blink/trunk@133450 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
on_title_changed(void *user_data, Evas_Object *webview, void *event_info)
{
Browser_Window *window = (Browser_Window *)user_data;
const char *title = (const char *)event_info;
title_set(window->window, title, 100);
}
|
on_title_changed(void *user_data, Evas_Object *webview, void *event_info)
{
Browser_Window *window = (Browser_Window *)user_data;
const char *title = (const char *)event_info;
title_set(window->window, title, 100);
}
|
C
|
Chrome
| 0 |
CVE-2011-1476
|
https://www.cvedetails.com/cve/CVE-2011-1476/
|
CWE-189
|
https://github.com/torvalds/linux/commit/b769f49463711205d57286e64cf535ed4daf59e9
|
b769f49463711205d57286e64cf535ed4daf59e9
|
sound/oss: remove offset from load_patch callbacks
Was: [PATCH] sound/oss/midi_synth: prevent underflow, use of
uninitialized value, and signedness issue
The offset passed to midi_synth_load_patch() can be essentially
arbitrary. If it's greater than the header length, this will result in
a copy_from_user(dst, src, negative_val). While this will just return
-EFAULT on x86, on other architectures this may cause memory corruption.
Additionally, the length field of the sysex_info structure may not be
initialized prior to its use. Finally, a signed comparison may result
in an unintentionally large loop.
On suggestion by Takashi Iwai, version two removes the offset argument
from the load_patch callbacks entirely, which also resolves similar
issues in opl3. Compile tested only.
v3 adjusts comments and hopefully gets copy offsets right.
Signed-off-by: Dan Rosenberg <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
|
int note_to_freq(int note_num)
{
/*
* This routine converts a midi note to a frequency (multiplied by 1000)
*/
int note, octave, note_freq;
static int notes[] =
{
261632, 277189, 293671, 311132, 329632, 349232,
369998, 391998, 415306, 440000, 466162, 493880
};
#define BASE_OCTAVE 5
octave = note_num / 12;
note = note_num % 12;
note_freq = notes[note];
if (octave < BASE_OCTAVE)
note_freq >>= (BASE_OCTAVE - octave);
else if (octave > BASE_OCTAVE)
note_freq <<= (octave - BASE_OCTAVE);
/*
* note_freq >>= 1;
*/
return note_freq;
}
|
int note_to_freq(int note_num)
{
/*
* This routine converts a midi note to a frequency (multiplied by 1000)
*/
int note, octave, note_freq;
static int notes[] =
{
261632, 277189, 293671, 311132, 329632, 349232,
369998, 391998, 415306, 440000, 466162, 493880
};
#define BASE_OCTAVE 5
octave = note_num / 12;
note = note_num % 12;
note_freq = notes[note];
if (octave < BASE_OCTAVE)
note_freq >>= (BASE_OCTAVE - octave);
else if (octave > BASE_OCTAVE)
note_freq <<= (octave - BASE_OCTAVE);
/*
* note_freq >>= 1;
*/
return note_freq;
}
|
C
|
linux
| 0 |
CVE-2016-1586
|
https://www.cvedetails.com/cve/CVE-2016-1586/
|
CWE-20
|
https://git.launchpad.net/oxide/commit/?id=29014da83e5fc358d6bff0f574e9ed45e61a35ac
|
29014da83e5fc358d6bff0f574e9ed45e61a35ac
| null |
void WebContext::SetCookieCallback(scoped_refptr<SetCookiesContext> ctxt,
const QNetworkCookie& cookie,
bool success) {
DCHECK_GT(ctxt->remaining, 0);
if (!success) {
ctxt->failed.push_back(cookie);
}
if (--ctxt->remaining > 0) {
return;
}
DeliverSetCookiesResponse(ctxt);
}
|
void WebContext::SetCookieCallback(scoped_refptr<SetCookiesContext> ctxt,
const QNetworkCookie& cookie,
bool success) {
DCHECK_GT(ctxt->remaining, 0);
if (!success) {
ctxt->failed.push_back(cookie);
}
if (--ctxt->remaining > 0) {
return;
}
DeliverSetCookiesResponse(ctxt);
}
|
CPP
|
launchpad
| 0 |
CVE-2013-1790
|
https://www.cvedetails.com/cve/CVE-2013-1790/
|
CWE-119
|
https://cgit.freedesktop.org/poppler/poppler/commit/?h=poppler-0.22&id=b1026b5978c385328f2a15a2185c599a563edf91
|
b1026b5978c385328f2a15a2185c599a563edf91
| null |
RunLengthStream::RunLengthStream(Stream *strA):
FilterStream(strA) {
bufPtr = bufEnd = buf;
eof = gFalse;
}
|
RunLengthStream::RunLengthStream(Stream *strA):
FilterStream(strA) {
bufPtr = bufEnd = buf;
eof = gFalse;
}
|
CPP
|
poppler
| 0 |
CVE-2011-1800
|
https://www.cvedetails.com/cve/CVE-2011-1800/
|
CWE-189
|
https://github.com/chromium/chromium/commit/1777aa6484af15014b8691082a8c3075418786f5
|
1777aa6484af15014b8691082a8c3075418786f5
|
[Qt][WK2] Allow transparent WebViews
https://bugs.webkit.org/show_bug.cgi?id=80608
Reviewed by Tor Arne Vestbø.
Added support for transparentBackground in QQuickWebViewExperimental.
This uses the existing drawsTransparentBackground property in WebKit2.
Also, changed LayerTreeHostQt to set the contentsOpaque flag when the root layer changes,
otherwise the change doesn't take effect.
A new API test was added.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setTransparentBackground):
(QQuickWebViewPrivate::transparentBackground):
(QQuickWebViewExperimental::transparentBackground):
(QQuickWebViewExperimental::setTransparentBackground):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView):
(tst_QQuickWebView::transparentWebViews):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::LayerTreeHostQt):
(WebKit::LayerTreeHostQt::setRootCompositingLayer):
git-svn-id: svn://svn.chromium.org/blink/trunk@110254 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
QQuickWebView::QQuickWebView(QQuickItem* parent)
: QQuickItem(parent)
, d_ptr(createPrivateObject(this))
, m_experimental(new QQuickWebViewExperimental(this))
{
Q_D(QQuickWebView);
d->initialize();
}
|
QQuickWebView::QQuickWebView(QQuickItem* parent)
: QQuickItem(parent)
, d_ptr(createPrivateObject(this))
, m_experimental(new QQuickWebViewExperimental(this))
{
Q_D(QQuickWebView);
d->initialize();
}
|
C
|
Chrome
| 0 |
CVE-2013-4119
|
https://www.cvedetails.com/cve/CVE-2013-4119/
|
CWE-476
|
https://github.com/FreeRDP/FreeRDP/commit/0773bb9303d24473fe1185d85a424dfe159aff53
|
0773bb9303d24473fe1185d85a424dfe159aff53
|
nla: invalidate sec handle after creation
If sec pointer isn't invalidated after creation it is not possible
to check if the upper and lower pointers are valid.
This fixes a segfault in the server part if the client disconnects before
the authentication was finished.
|
SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesA(PCredHandle phCredential, ULONG ulAttribute, void* pBuffer)
{
char* Name;
SECURITY_STATUS status;
SecurityFunctionTableA* table;
Name = (char*) sspi_SecureHandleGetUpperPointer(phCredential);
if (!Name)
return SEC_E_SECPKG_NOT_FOUND;
table = sspi_GetSecurityFunctionTableAByNameA(Name);
if (!table)
return SEC_E_SECPKG_NOT_FOUND;
if (table->QueryCredentialsAttributesA == NULL)
return SEC_E_UNSUPPORTED_FUNCTION;
status = table->QueryCredentialsAttributesA(phCredential, ulAttribute, pBuffer);
return status;
}
|
SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesA(PCredHandle phCredential, ULONG ulAttribute, void* pBuffer)
{
char* Name;
SECURITY_STATUS status;
SecurityFunctionTableA* table;
Name = (char*) sspi_SecureHandleGetUpperPointer(phCredential);
if (!Name)
return SEC_E_SECPKG_NOT_FOUND;
table = sspi_GetSecurityFunctionTableAByNameA(Name);
if (!table)
return SEC_E_SECPKG_NOT_FOUND;
if (table->QueryCredentialsAttributesA == NULL)
return SEC_E_UNSUPPORTED_FUNCTION;
status = table->QueryCredentialsAttributesA(phCredential, ulAttribute, pBuffer);
return status;
}
|
C
|
FreeRDP
| 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 reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectV8Internal::reflectedCustomBooleanAttrAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
|
static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectV8Internal::reflectedCustomBooleanAttrAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
|
C
|
Chrome
| 0 |
CVE-2014-2669
|
https://www.cvedetails.com/cve/CVE-2014-2669/
|
CWE-189
|
https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a
|
31400a673325147e1205326008e32135a78b4d8a
|
Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064
|
circle_div_pt(PG_FUNCTION_ARGS)
{
CIRCLE *circle = PG_GETARG_CIRCLE_P(0);
Point *point = PG_GETARG_POINT_P(1);
CIRCLE *result;
Point *p;
result = circle_copy(circle);
p = DatumGetPointP(DirectFunctionCall2(point_div,
PointPGetDatum(&circle->center),
PointPGetDatum(point)));
result->center.x = p->x;
result->center.y = p->y;
result->radius /= HYPOT(point->x, point->y);
PG_RETURN_CIRCLE_P(result);
}
|
circle_div_pt(PG_FUNCTION_ARGS)
{
CIRCLE *circle = PG_GETARG_CIRCLE_P(0);
Point *point = PG_GETARG_POINT_P(1);
CIRCLE *result;
Point *p;
result = circle_copy(circle);
p = DatumGetPointP(DirectFunctionCall2(point_div,
PointPGetDatum(&circle->center),
PointPGetDatum(point)));
result->center.x = p->x;
result->center.y = p->y;
result->radius /= HYPOT(point->x, point->y);
PG_RETURN_CIRCLE_P(result);
}
|
C
|
postgres
| 0 |
CVE-2013-0884
|
https://www.cvedetails.com/cve/CVE-2013-0884/
| null |
https://github.com/chromium/chromium/commit/4c39b8e5670c4a0f2bb06008502ebb0c4fe322e0
|
4c39b8e5670c4a0f2bb06008502ebb0c4fe322e0
|
[4/4] Process clearBrowserCahce/cookies commands in browser.
BUG=366585
Review URL: https://codereview.chromium.org/251183005
git-svn-id: svn://svn.chromium.org/blink/trunk@172984 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
DebuggerTask(PassOwnPtr<WebDevToolsAgent::MessageDescriptor> descriptor)
: m_descriptor(descriptor)
{
}
|
DebuggerTask(PassOwnPtr<WebDevToolsAgent::MessageDescriptor> descriptor)
: m_descriptor(descriptor)
{
}
|
C
|
Chrome
| 0 |
CVE-2016-0826
|
https://www.cvedetails.com/cve/CVE-2016-0826/
|
CWE-264
|
https://android.googlesource.com/platform/frameworks/av/+/c9ab2b0bb05a7e19fb057e79b36e232809d70122
|
c9ab2b0bb05a7e19fb057e79b36e232809d70122
|
Camera: Disallow dumping clients directly
Camera service dumps should only be initiated through
ICameraService::dump.
Bug: 26265403
Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
|
int CameraClient::getOrientation(int degrees, bool mirror) {
if (!mirror) {
if (degrees == 0) return 0;
else if (degrees == 90) return HAL_TRANSFORM_ROT_90;
else if (degrees == 180) return HAL_TRANSFORM_ROT_180;
else if (degrees == 270) return HAL_TRANSFORM_ROT_270;
} else { // Do mirror (horizontal flip)
if (degrees == 0) { // FLIP_H and ROT_0
return HAL_TRANSFORM_FLIP_H;
} else if (degrees == 90) { // FLIP_H and ROT_90
return HAL_TRANSFORM_FLIP_H | HAL_TRANSFORM_ROT_90;
} else if (degrees == 180) { // FLIP_H and ROT_180
return HAL_TRANSFORM_FLIP_V;
} else if (degrees == 270) { // FLIP_H and ROT_270
return HAL_TRANSFORM_FLIP_V | HAL_TRANSFORM_ROT_90;
}
}
ALOGE("Invalid setDisplayOrientation degrees=%d", degrees);
return -1;
}
|
int CameraClient::getOrientation(int degrees, bool mirror) {
if (!mirror) {
if (degrees == 0) return 0;
else if (degrees == 90) return HAL_TRANSFORM_ROT_90;
else if (degrees == 180) return HAL_TRANSFORM_ROT_180;
else if (degrees == 270) return HAL_TRANSFORM_ROT_270;
} else { // Do mirror (horizontal flip)
if (degrees == 0) { // FLIP_H and ROT_0
return HAL_TRANSFORM_FLIP_H;
} else if (degrees == 90) { // FLIP_H and ROT_90
return HAL_TRANSFORM_FLIP_H | HAL_TRANSFORM_ROT_90;
} else if (degrees == 180) { // FLIP_H and ROT_180
return HAL_TRANSFORM_FLIP_V;
} else if (degrees == 270) { // FLIP_H and ROT_270
return HAL_TRANSFORM_FLIP_V | HAL_TRANSFORM_ROT_90;
}
}
ALOGE("Invalid setDisplayOrientation degrees=%d", degrees);
return -1;
}
|
C
|
Android
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/690d0a9175790c4bd3abd066932bc08203c164ca
|
690d0a9175790c4bd3abd066932bc08203c164ca
|
Avoid excessive nesting / recursion in browser URL handling.
BUG=31517
TEST=ChildProcessSecurityPolicyTest
Review URL: http://codereview.chromium.org/525038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35585 0039d316-1c4b-4281-b951-d872f2087c98
|
bool CanUploadFile(const FilePath& file) {
return uploadable_files_.find(file) != uploadable_files_.end();
}
|
bool CanUploadFile(const FilePath& file) {
return uploadable_files_.find(file) != uploadable_files_.end();
}
|
C
|
Chrome
| 0 |
CVE-2011-2350
|
https://www.cvedetails.com/cve/CVE-2011-2350/
|
CWE-20
|
https://github.com/chromium/chromium/commit/b944f670bb7a8a919daac497a4ea0536c954c201
|
b944f670bb7a8a919daac497a4ea0536c954c201
|
[JSC] Implement a helper method createNotEnoughArgumentsError()
https://bugs.webkit.org/show_bug.cgi?id=85102
Reviewed by Geoffrey Garen.
In bug 84787, kbr@ requested to avoid hard-coding
createTypeError(exec, "Not enough arguments") here and there.
This patch implements createNotEnoughArgumentsError(exec)
and uses it in JSC bindings.
c.f. a corresponding bug for V8 bindings is bug 85097.
Source/JavaScriptCore:
* runtime/Error.cpp:
(JSC::createNotEnoughArgumentsError):
(JSC):
* runtime/Error.h:
(JSC):
Source/WebCore:
Test: bindings/scripts/test/TestObj.idl
* bindings/scripts/CodeGeneratorJS.pm: Modified as described above.
(GenerateArgumentsCountCheck):
* bindings/js/JSDataViewCustom.cpp: Ditto.
(WebCore::getDataViewMember):
(WebCore::setDataViewMember):
* bindings/js/JSDeprecatedPeerConnectionCustom.cpp:
(WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
* bindings/js/JSWebKitMutationObserverCustom.cpp:
(WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
(WebCore::JSWebKitMutationObserver::observe):
* bindings/js/JSWorkerCustom.cpp:
(WebCore::JSWorkerConstructor::constructJSWorker):
* bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests.
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionIdbKey):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert3):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
git-svn-id: svn://svn.chromium.org/blink/trunk@115536 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
bool JSTestActiveDOMObjectConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSTestActiveDOMObjectConstructor, JSDOMWrapper>(exec, &JSTestActiveDOMObjectConstructorTable, jsCast<JSTestActiveDOMObjectConstructor*>(cell), propertyName, slot);
}
|
bool JSTestActiveDOMObjectConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSTestActiveDOMObjectConstructor, JSDOMWrapper>(exec, &JSTestActiveDOMObjectConstructorTable, jsCast<JSTestActiveDOMObjectConstructor*>(cell), propertyName, slot);
}
|
C
|
Chrome
| 0 |
CVE-2015-7837
|
https://www.cvedetails.com/cve/CVE-2015-7837/
|
CWE-254
|
https://github.com/mjg59/linux/commit/4b2b64d5a6ebc84214755ebccd599baef7c1b798
|
4b2b64d5a6ebc84214755ebccd599baef7c1b798
|
kexec/uefi: copy secure_boot flag in boot params across kexec reboot
Kexec reboot in case secure boot being enabled does not keep the secure
boot mode in new kernel, so later one can load unsigned kernel via legacy
kexec_load. In this state, the system is missing the protections provided
by secure boot. Adding a patch to fix this by retain the secure_boot flag
in original kernel.
secure_boot flag in boot_params is set in EFI stub, but kexec bypasses the
stub. Fixing this issue by copying secure_boot flag across kexec reboot.
Signed-off-by: Dave Young <[email protected]>
|
static int setup_e820_entries(struct boot_params *params)
{
unsigned int nr_e820_entries;
nr_e820_entries = e820_saved.nr_map;
/* TODO: Pass entries more than E820MAX in bootparams setup data */
if (nr_e820_entries > E820MAX)
nr_e820_entries = E820MAX;
params->e820_entries = nr_e820_entries;
memcpy(¶ms->e820_map, &e820_saved.map,
nr_e820_entries * sizeof(struct e820entry));
return 0;
}
|
static int setup_e820_entries(struct boot_params *params)
{
unsigned int nr_e820_entries;
nr_e820_entries = e820_saved.nr_map;
/* TODO: Pass entries more than E820MAX in bootparams setup data */
if (nr_e820_entries > E820MAX)
nr_e820_entries = E820MAX;
params->e820_entries = nr_e820_entries;
memcpy(¶ms->e820_map, &e820_saved.map,
nr_e820_entries * sizeof(struct e820entry));
return 0;
}
|
C
|
linux
| 0 |
CVE-2019-12951
|
https://www.cvedetails.com/cve/CVE-2019-12951/
|
CWE-119
|
https://github.com/cesanta/mongoose/commit/b3e0f780c34cea88f057a62213c012aa88fe2deb
|
b3e0f780c34cea88f057a62213c012aa88fe2deb
|
Fix heap-based overflow in parse_mqtt
PUBLISHED_FROM=3306592896298597fff5269634df0c1a1555113b
|
static void byteReverse(unsigned char *buf, unsigned longs) {
/* Forrest: MD5 expect LITTLE_ENDIAN, swap if BIG_ENDIAN */
#if BYTE_ORDER == BIG_ENDIAN
do {
uint32_t t = (uint32_t)((unsigned) buf[3] << 8 | buf[2]) << 16 |
((unsigned) buf[1] << 8 | buf[0]);
*(uint32_t *) buf = t;
buf += 4;
} while (--longs);
#else
(void) buf;
(void) longs;
#endif
}
|
static void byteReverse(unsigned char *buf, unsigned longs) {
/* Forrest: MD5 expect LITTLE_ENDIAN, swap if BIG_ENDIAN */
#if BYTE_ORDER == BIG_ENDIAN
do {
uint32_t t = (uint32_t)((unsigned) buf[3] << 8 | buf[2]) << 16 |
((unsigned) buf[1] << 8 | buf[0]);
*(uint32_t *) buf = t;
buf += 4;
} while (--longs);
#else
(void) buf;
(void) longs;
#endif
}
|
C
|
mongoose
| 0 |
CVE-2017-13143
|
https://www.cvedetails.com/cve/CVE-2017-13143/
|
CWE-200
|
https://github.com/ImageMagick/ImageMagick/commit/51b0ae01709adc1e4a9245e158ef17b85a110960
|
51b0ae01709adc1e4a9245e158ef17b85a110960
|
https://github.com/ImageMagick/ImageMagick/issues/362
|
static void InsertComplexFloatRow(Image *image,float *p,int y,double MinVal,
double MaxVal,ExceptionInfo *exception)
{
double f;
int x;
register Quantum *q;
if (MinVal == 0)
MinVal = -1;
if (MaxVal == 0)
MaxVal = 1;
q = QueueAuthenticPixels(image, 0, y, image->columns, 1,exception);
if (q == (Quantum *) NULL)
return;
for (x = 0; x < (ssize_t) image->columns; x++)
{
if (*p > 0)
{
f = (*p / MaxVal) * (QuantumRange-GetPixelRed(image,q));
if (f+GetPixelRed(image,q) > QuantumRange)
SetPixelRed(image,QuantumRange,q);
else
SetPixelRed(image,GetPixelRed(image,q)+(int) f,q);
if ((int) f / 2.0 > GetPixelGreen(image,q))
{
SetPixelGreen(image,0,q);
SetPixelBlue(image,0,q);
}
else
{
SetPixelBlue(image,GetPixelBlue(image,q)-(int) (f/2.0),q);
SetPixelGreen(image,GetPixelBlue(image,q),q);
}
}
if (*p < 0)
{
f = (*p / MaxVal) * (QuantumRange - GetPixelBlue(image,q));
if (f + GetPixelBlue(image,q) > QuantumRange)
SetPixelBlue(image,QuantumRange,q);
else
SetPixelBlue(image,GetPixelBlue(image,q)+
(int) f,q);
if ((int) f / 2.0 > GetPixelGreen(image,q))
{
SetPixelGreen(image,0,q);
SetPixelRed(image,0,q);
}
else
{
SetPixelRed(image,GetPixelRed(image,q)-(int) (f/2.0),q);
SetPixelGreen(image,GetPixelRed(image,q),q);
}
}
p++;
q++;
}
if (!SyncAuthenticPixels(image,exception))
return;
return;
}
|
static void InsertComplexFloatRow(Image *image,float *p,int y,double MinVal,
double MaxVal,ExceptionInfo *exception)
{
double f;
int x;
register Quantum *q;
if (MinVal == 0)
MinVal = -1;
if (MaxVal == 0)
MaxVal = 1;
q = QueueAuthenticPixels(image, 0, y, image->columns, 1,exception);
if (q == (Quantum *) NULL)
return;
for (x = 0; x < (ssize_t) image->columns; x++)
{
if (*p > 0)
{
f = (*p / MaxVal) * (QuantumRange-GetPixelRed(image,q));
if (f+GetPixelRed(image,q) > QuantumRange)
SetPixelRed(image,QuantumRange,q);
else
SetPixelRed(image,GetPixelRed(image,q)+(int) f,q);
if ((int) f / 2.0 > GetPixelGreen(image,q))
{
SetPixelGreen(image,0,q);
SetPixelBlue(image,0,q);
}
else
{
SetPixelBlue(image,GetPixelBlue(image,q)-(int) (f/2.0),q);
SetPixelGreen(image,GetPixelBlue(image,q),q);
}
}
if (*p < 0)
{
f = (*p / MaxVal) * (QuantumRange - GetPixelBlue(image,q));
if (f + GetPixelBlue(image,q) > QuantumRange)
SetPixelBlue(image,QuantumRange,q);
else
SetPixelBlue(image,GetPixelBlue(image,q)+
(int) f,q);
if ((int) f / 2.0 > GetPixelGreen(image,q))
{
SetPixelGreen(image,0,q);
SetPixelRed(image,0,q);
}
else
{
SetPixelRed(image,GetPixelRed(image,q)-(int) (f/2.0),q);
SetPixelGreen(image,GetPixelRed(image,q),q);
}
}
p++;
q++;
}
if (!SyncAuthenticPixels(image,exception))
return;
return;
}
|
C
|
ImageMagick
| 0 |
CVE-2016-7906
|
https://www.cvedetails.com/cve/CVE-2016-7906/
|
CWE-416
|
https://github.com/ImageMagick/ImageMagick/commit/d63a3c5729df59f183e9e110d5d8385d17caaad0
|
d63a3c5729df59f183e9e110d5d8385d17caaad0
|
https://github.com/ImageMagick/ImageMagick/issues/281
|
MagickExport MagickBooleanType IsGrayImage(const Image *image,
ExceptionInfo *exception)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
if ((image->type == BilevelType) || (image->type == GrayscaleType) ||
(image->type == GrayscaleMatteType))
return(MagickTrue);
return(MagickFalse);
}
|
MagickExport MagickBooleanType IsGrayImage(const Image *image,
ExceptionInfo *exception)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
if ((image->type == BilevelType) || (image->type == GrayscaleType) ||
(image->type == GrayscaleMatteType))
return(MagickTrue);
return(MagickFalse);
}
|
C
|
ImageMagick
| 0 |
CVE-2014-3690
|
https://www.cvedetails.com/cve/CVE-2014-3690/
|
CWE-399
|
https://github.com/torvalds/linux/commit/d974baa398f34393db76be45f7d4d04fbdbb4a0a
|
d974baa398f34393db76be45f7d4d04fbdbb4a0a
|
x86,kvm,vmx: Preserve CR4 across VM entry
CR4 isn't constant; at least the TSD and PCE bits can vary.
TBH, treating CR0 and CR3 as constant scares me a bit, too, but it looks
like it's correct.
This adds a branch and a read from cr4 to each vm entry. Because it is
extremely likely that consecutive entries into the same vcpu will have
the same host cr4 value, this fixes up the vmcs instead of restoring cr4
after the fact. A subsequent patch will add a kernel-wide cr4 shadow,
reducing the overhead in the common case to just two memory reads and a
branch.
Signed-off-by: Andy Lutomirski <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: Petr Matousek <[email protected]>
Cc: Gleb Natapov <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
static void vmx_get_cs_db_l_bits(struct kvm_vcpu *vcpu, int *db, int *l)
{
u32 ar = vmx_read_guest_seg_ar(to_vmx(vcpu), VCPU_SREG_CS);
*db = (ar >> 14) & 1;
*l = (ar >> 13) & 1;
}
|
static void vmx_get_cs_db_l_bits(struct kvm_vcpu *vcpu, int *db, int *l)
{
u32 ar = vmx_read_guest_seg_ar(to_vmx(vcpu), VCPU_SREG_CS);
*db = (ar >> 14) & 1;
*l = (ar >> 13) & 1;
}
|
C
|
linux
| 0 |
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 struct sock *dn_alloc_sock(struct net *net, struct socket *sock, gfp_t gfp, int kern)
{
struct dn_scp *scp;
struct sock *sk = sk_alloc(net, PF_DECnet, gfp, &dn_proto, kern);
if (!sk)
goto out;
if (sock)
sock->ops = &dn_proto_ops;
sock_init_data(sock, sk);
sk->sk_backlog_rcv = dn_nsp_backlog_rcv;
sk->sk_destruct = dn_destruct;
sk->sk_no_check_tx = 1;
sk->sk_family = PF_DECnet;
sk->sk_protocol = 0;
sk->sk_allocation = gfp;
sk->sk_sndbuf = sysctl_decnet_wmem[1];
sk->sk_rcvbuf = sysctl_decnet_rmem[1];
/* Initialization of DECnet Session Control Port */
scp = DN_SK(sk);
scp->state = DN_O; /* Open */
scp->numdat = 1; /* Next data seg to tx */
scp->numoth = 1; /* Next oth data to tx */
scp->ackxmt_dat = 0; /* Last data seg ack'ed */
scp->ackxmt_oth = 0; /* Last oth data ack'ed */
scp->ackrcv_dat = 0; /* Highest data ack recv*/
scp->ackrcv_oth = 0; /* Last oth data ack rec*/
scp->flowrem_sw = DN_SEND;
scp->flowloc_sw = DN_SEND;
scp->flowrem_dat = 0;
scp->flowrem_oth = 1;
scp->flowloc_dat = 0;
scp->flowloc_oth = 1;
scp->services_rem = 0;
scp->services_loc = 1 | NSP_FC_NONE;
scp->info_rem = 0;
scp->info_loc = 0x03; /* NSP version 4.1 */
scp->segsize_rem = 230 - DN_MAX_NSP_DATA_HEADER; /* Default: Updated by remote segsize */
scp->nonagle = 0;
scp->multi_ireq = 1;
scp->accept_mode = ACC_IMMED;
scp->addr.sdn_family = AF_DECnet;
scp->peer.sdn_family = AF_DECnet;
scp->accessdata.acc_accl = 5;
memcpy(scp->accessdata.acc_acc, "LINUX", 5);
scp->max_window = NSP_MAX_WINDOW;
scp->snd_window = NSP_MIN_WINDOW;
scp->nsp_srtt = NSP_INITIAL_SRTT;
scp->nsp_rttvar = NSP_INITIAL_RTTVAR;
scp->nsp_rxtshift = 0;
skb_queue_head_init(&scp->data_xmit_queue);
skb_queue_head_init(&scp->other_xmit_queue);
skb_queue_head_init(&scp->other_receive_queue);
scp->persist = 0;
scp->persist_fxn = NULL;
scp->keepalive = 10 * HZ;
scp->keepalive_fxn = dn_keepalive;
init_timer(&scp->delack_timer);
scp->delack_pending = 0;
scp->delack_fxn = dn_nsp_delayed_ack;
dn_start_slow_timer(sk);
out:
return sk;
}
|
static struct sock *dn_alloc_sock(struct net *net, struct socket *sock, gfp_t gfp, int kern)
{
struct dn_scp *scp;
struct sock *sk = sk_alloc(net, PF_DECnet, gfp, &dn_proto, kern);
if (!sk)
goto out;
if (sock)
sock->ops = &dn_proto_ops;
sock_init_data(sock, sk);
sk->sk_backlog_rcv = dn_nsp_backlog_rcv;
sk->sk_destruct = dn_destruct;
sk->sk_no_check_tx = 1;
sk->sk_family = PF_DECnet;
sk->sk_protocol = 0;
sk->sk_allocation = gfp;
sk->sk_sndbuf = sysctl_decnet_wmem[1];
sk->sk_rcvbuf = sysctl_decnet_rmem[1];
/* Initialization of DECnet Session Control Port */
scp = DN_SK(sk);
scp->state = DN_O; /* Open */
scp->numdat = 1; /* Next data seg to tx */
scp->numoth = 1; /* Next oth data to tx */
scp->ackxmt_dat = 0; /* Last data seg ack'ed */
scp->ackxmt_oth = 0; /* Last oth data ack'ed */
scp->ackrcv_dat = 0; /* Highest data ack recv*/
scp->ackrcv_oth = 0; /* Last oth data ack rec*/
scp->flowrem_sw = DN_SEND;
scp->flowloc_sw = DN_SEND;
scp->flowrem_dat = 0;
scp->flowrem_oth = 1;
scp->flowloc_dat = 0;
scp->flowloc_oth = 1;
scp->services_rem = 0;
scp->services_loc = 1 | NSP_FC_NONE;
scp->info_rem = 0;
scp->info_loc = 0x03; /* NSP version 4.1 */
scp->segsize_rem = 230 - DN_MAX_NSP_DATA_HEADER; /* Default: Updated by remote segsize */
scp->nonagle = 0;
scp->multi_ireq = 1;
scp->accept_mode = ACC_IMMED;
scp->addr.sdn_family = AF_DECnet;
scp->peer.sdn_family = AF_DECnet;
scp->accessdata.acc_accl = 5;
memcpy(scp->accessdata.acc_acc, "LINUX", 5);
scp->max_window = NSP_MAX_WINDOW;
scp->snd_window = NSP_MIN_WINDOW;
scp->nsp_srtt = NSP_INITIAL_SRTT;
scp->nsp_rttvar = NSP_INITIAL_RTTVAR;
scp->nsp_rxtshift = 0;
skb_queue_head_init(&scp->data_xmit_queue);
skb_queue_head_init(&scp->other_xmit_queue);
skb_queue_head_init(&scp->other_receive_queue);
scp->persist = 0;
scp->persist_fxn = NULL;
scp->keepalive = 10 * HZ;
scp->keepalive_fxn = dn_keepalive;
init_timer(&scp->delack_timer);
scp->delack_pending = 0;
scp->delack_fxn = dn_nsp_delayed_ack;
dn_start_slow_timer(sk);
out:
return sk;
}
|
C
|
linux
| 0 |
CVE-2013-0886
|
https://www.cvedetails.com/cve/CVE-2013-0886/
| null |
https://github.com/chromium/chromium/commit/18d67244984a574ba2dd8779faabc0e3e34f4b76
|
18d67244984a574ba2dd8779faabc0e3e34f4b76
|
Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the renderer contexts
- do not require a context to be able to generate textures when
creating the GLSurfaceHandle
- clearer ownership semantics that potentially allows for more
robust and easier lost context handling/thumbnailing/etc., since a texture is at
any given time owned by either: UI parent, mailbox, or
TextureImageTransportSurface
- simplify frontbuffer protection logic;
the frontbuffer textures are now owned by RWHV where they are refcounted
The TextureImageTransportSurface informs RenderWidgetHostView of the
mailbox names for the front- and backbuffer textures by
associating them with a surface_handle (1 or 2) in the AcceleratedSurfaceNew message.
During SwapBuffers() or PostSubBuffer() cycles, it then uses
produceTextureCHROMIUM() and consumeTextureCHROMIUM()
to transfer ownership between renderer and browser compositor.
RWHV sends back the surface_handle of the buffer being returned with the Swap ACK
(or 0 if no buffer is being returned in which case TextureImageTransportSurface will
allocate a new texture - note that this could be used to
simply keep textures for thumbnailing).
BUG=154815,139616
[email protected]
Review URL: https://chromiumcodereview.appspot.com/11194042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171569 0039d316-1c4b-4281-b951-d872f2087c98
|
void RenderWidgetHostViewAndroid::InitAsChild(gfx::NativeView parent_view) {
NOTIMPLEMENTED();
}
|
void RenderWidgetHostViewAndroid::InitAsChild(gfx::NativeView parent_view) {
NOTIMPLEMENTED();
}
|
C
|
Chrome
| 0 |
CVE-2018-11379
|
https://www.cvedetails.com/cve/CVE-2018-11379/
|
CWE-125
|
https://github.com/radare/radare2/commit/4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
|
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
|
Fix crash in pe
|
struct PE_(r_bin_pe_obj_t)* PE_(r_bin_pe_new_buf)(RBuffer * buf, bool verbose) {
struct PE_(r_bin_pe_obj_t)* bin = R_NEW0 (struct PE_(r_bin_pe_obj_t));
if (!bin) {
return NULL;
}
bin->kv = sdb_new0 ();
bin->b = r_buf_new ();
bin->verbose = verbose;
bin->size = buf->length;
if (!r_buf_set_bytes (bin->b, buf->buf, bin->size)) {
return PE_(r_bin_pe_free)(bin);
}
if (!bin_pe_init (bin)) {
return PE_(r_bin_pe_free)(bin);
}
return bin;
}
|
struct PE_(r_bin_pe_obj_t)* PE_(r_bin_pe_new_buf)(RBuffer * buf, bool verbose) {
struct PE_(r_bin_pe_obj_t)* bin = R_NEW0 (struct PE_(r_bin_pe_obj_t));
if (!bin) {
return NULL;
}
bin->kv = sdb_new0 ();
bin->b = r_buf_new ();
bin->verbose = verbose;
bin->size = buf->length;
if (!r_buf_set_bytes (bin->b, buf->buf, bin->size)) {
return PE_(r_bin_pe_free)(bin);
}
if (!bin_pe_init (bin)) {
return PE_(r_bin_pe_free)(bin);
}
return bin;
}
|
C
|
radare2
| 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
|
istr_hash (gconstpointer key)
{
const char *p;
guint h;
h = 0;
for (p = key; *p != '\0'; p++)
{
h = (h << 5) - h + g_ascii_tolower (*p);
}
return h;
}
|
istr_hash (gconstpointer key)
{
const char *p;
guint h;
h = 0;
for (p = key; *p != '\0'; p++)
{
h = (h << 5) - h + g_ascii_tolower (*p);
}
return h;
}
|
C
|
nautilus
| 0 |
CVE-2018-17205
|
https://www.cvedetails.com/cve/CVE-2018-17205/
|
CWE-617
|
https://github.com/openvswitch/ovs/commit/0befd1f3745055c32940f5faf9559be6a14395e6
|
0befd1f3745055c32940f5faf9559be6a14395e6
|
ofproto: Fix OVS crash when reverting old flows in bundle commit
During bundle commit flows which are added in bundle are applied
to ofproto in-order. In case if a flow cannot be added (e.g. flow
action is go-to group id which does not exist), OVS tries to
revert back all previous flows which were successfully applied
from the same bundle. This is possible since OVS maintains list
of old flows which were replaced by flows from the bundle.
While reinserting old flows ovs asserts due to check on rule
state != RULE_INITIALIZED. This will work only for new flows, but
for old flow the rule state will be RULE_REMOVED. This is causing
an assert and OVS crash.
The ovs assert check should be modified to != RULE_INSERTED to prevent
any existing rule being re-inserted and allow new rules and old rules
(in case of revert) to get inserted.
Here is an example to trigger the assert:
$ ovs-vsctl add-br br-test -- set Bridge br-test datapath_type=netdev
$ cat flows.txt
flow add table=1,priority=0,in_port=2,actions=NORMAL
flow add table=1,priority=0,in_port=3,actions=NORMAL
$ ovs-ofctl dump-flows -OOpenflow13 br-test
cookie=0x0, duration=2.465s, table=1, n_packets=0, n_bytes=0, priority=0,in_port=2 actions=NORMAL
cookie=0x0, duration=2.465s, table=1, n_packets=0, n_bytes=0, priority=0,in_port=3 actions=NORMAL
$ cat flow-modify.txt
flow modify table=1,priority=0,in_port=2,actions=drop
flow modify table=1,priority=0,in_port=3,actions=group:10
$ ovs-ofctl bundle br-test flow-modify.txt -OOpenflow13
First flow rule will be modified since it is a valid rule. However second
rule is invalid since no group with id 10 exists. Bundle commit tries to
revert (insert) the first rule to old flow which results in ovs_assert at
ofproto_rule_insert__() since old rule->state = RULE_REMOVED.
Signed-off-by: Vishal Deep Ajmera <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
|
ofproto_flow_mod_uninit(struct ofproto_flow_mod *ofm)
{
if (ofm->temp_rule) {
ofproto_rule_unref(ofm->temp_rule);
ofm->temp_rule = NULL;
}
if (ofm->criteria.version != OVS_VERSION_NOT_REMOVED) {
rule_criteria_destroy(&ofm->criteria);
}
if (ofm->conjs) {
free(ofm->conjs);
ofm->conjs = NULL;
ofm->n_conjs = 0;
}
}
|
ofproto_flow_mod_uninit(struct ofproto_flow_mod *ofm)
{
if (ofm->temp_rule) {
ofproto_rule_unref(ofm->temp_rule);
ofm->temp_rule = NULL;
}
if (ofm->criteria.version != OVS_VERSION_NOT_REMOVED) {
rule_criteria_destroy(&ofm->criteria);
}
if (ofm->conjs) {
free(ofm->conjs);
ofm->conjs = NULL;
ofm->n_conjs = 0;
}
}
|
C
|
ovs
| 0 |
CVE-2017-11176
|
https://www.cvedetails.com/cve/CVE-2017-11176/
|
CWE-416
|
https://github.com/torvalds/linux/commit/f991af3daabaecff34684fd51fac80319d1baad1
|
f991af3daabaecff34684fd51fac80319d1baad1
|
mqueue: fix a use-after-free in sys_mq_notify()
The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:
1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
release the file refcnt
so we when retry but the fd has been just closed by user-space
during this small window, we end up calling netlink_detachskb()
on the error path which releases the sock again, later when
the user-space closes this socket a use-after-free could be
triggered.
Setting 'sock' to NULL here should be sufficient to fix it.
Reported-by: GeneBlue <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Manfred Spraul <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
|
static int mqueue_unlink(struct inode *dir, struct dentry *dentry)
{
struct inode *inode = d_inode(dentry);
dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir);
dir->i_size -= DIRENT_SIZE;
drop_nlink(inode);
dput(dentry);
return 0;
}
|
static int mqueue_unlink(struct inode *dir, struct dentry *dentry)
{
struct inode *inode = d_inode(dentry);
dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir);
dir->i_size -= DIRENT_SIZE;
drop_nlink(inode);
dput(dentry);
return 0;
}
|
C
|
linux
| 0 |
CVE-2016-1541
|
https://www.cvedetails.com/cve/CVE-2016-1541/
|
CWE-20
|
https://github.com/libarchive/libarchive/commit/d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
|
d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
|
Issue #656: Fix CVE-2016-1541, VU#862384
When reading OS X metadata entries in Zip archives that were stored
without compression, libarchive would use the uncompressed entry size
to allocate a buffer but would use the compressed entry size to limit
the amount of data copied into that buffer. Since the compressed
and uncompressed sizes are provided by data in the archive itself,
an attacker could manipulate these values to write data beyond
the end of the allocated buffer.
This fix provides three new checks to guard against such
manipulation and to make libarchive generally more robust when
handling this type of entry:
1. If an OS X metadata entry is stored without compression,
abort the entire archive if the compressed and uncompressed
data sizes do not match.
2. When sanity-checking the size of an OS X metadata entry,
abort this entry if either the compressed or uncompressed
size is larger than 4MB.
3. When copying data into the allocated buffer, check the copy
size against both the compressed entry size and uncompressed
entry size.
|
trad_enc_decrypt_update(struct trad_enc_ctx *ctx, const uint8_t *in,
size_t in_len, uint8_t *out, size_t out_len)
{
unsigned i, max;
max = (unsigned)((in_len < out_len)? in_len: out_len);
for (i = 0; i < max; i++) {
uint8_t t = in[i] ^ trad_enc_decypt_byte(ctx);
out[i] = t;
trad_enc_update_keys(ctx, t);
}
}
|
trad_enc_decrypt_update(struct trad_enc_ctx *ctx, const uint8_t *in,
size_t in_len, uint8_t *out, size_t out_len)
{
unsigned i, max;
max = (unsigned)((in_len < out_len)? in_len: out_len);
for (i = 0; i < max; i++) {
uint8_t t = in[i] ^ trad_enc_decypt_byte(ctx);
out[i] = t;
trad_enc_update_keys(ctx, t);
}
}
|
C
|
libarchive
| 0 |
CVE-2014-9427
|
https://www.cvedetails.com/cve/CVE-2014-9427/
|
CWE-119
|
https://git.php.net/?p=php-src.git;a=commit;h=f9ad3086693fce680fbe246e4a45aa92edd2ac35
|
f9ad3086693fce680fbe246e4a45aa92edd2ac35
| null |
static void print_modules(TSRMLS_D)
{
HashTable sorted_registry;
zend_module_entry tmp;
zend_hash_init(&sorted_registry, 50, NULL, NULL, 1);
zend_hash_copy(&sorted_registry, &module_registry, NULL, &tmp, sizeof(zend_module_entry));
zend_hash_sort(&sorted_registry, zend_qsort, module_name_cmp, 0 TSRMLS_CC);
zend_hash_apply_with_argument(&sorted_registry, (apply_func_arg_t) print_module_info, NULL TSRMLS_CC);
zend_hash_destroy(&sorted_registry);
}
|
static void print_modules(TSRMLS_D)
{
HashTable sorted_registry;
zend_module_entry tmp;
zend_hash_init(&sorted_registry, 50, NULL, NULL, 1);
zend_hash_copy(&sorted_registry, &module_registry, NULL, &tmp, sizeof(zend_module_entry));
zend_hash_sort(&sorted_registry, zend_qsort, module_name_cmp, 0 TSRMLS_CC);
zend_hash_apply_with_argument(&sorted_registry, (apply_func_arg_t) print_module_info, NULL TSRMLS_CC);
zend_hash_destroy(&sorted_registry);
}
|
C
|
php
| 0 |
CVE-2013-1929
|
https://www.cvedetails.com/cve/CVE-2013-1929/
|
CWE-119
|
https://github.com/torvalds/linux/commit/715230a44310a8cf66fbfb5a46f9a62a9b2de424
|
715230a44310a8cf66fbfb5a46f9a62a9b2de424
|
tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string length (32 bytes). On overflow,
truncate the formatted firmware string instead of potentially overwriting
portions of the tg3 struct.
http://cansecwest.com/slides/2013/PrivateCore%20CSW%202013.pdf
Signed-off-by: Kees Cook <[email protected]>
Reported-by: Oded Horovitz <[email protected]>
Reported-by: Brad Spengler <[email protected]>
Cc: [email protected]
Cc: Matt Carlson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int tg3_fiber_aneg_smachine(struct tg3 *tp,
struct tg3_fiber_aneginfo *ap)
{
u16 flowctrl;
unsigned long delta;
u32 rx_cfg_reg;
int ret;
if (ap->state == ANEG_STATE_UNKNOWN) {
ap->rxconfig = 0;
ap->link_time = 0;
ap->cur_time = 0;
ap->ability_match_cfg = 0;
ap->ability_match_count = 0;
ap->ability_match = 0;
ap->idle_match = 0;
ap->ack_match = 0;
}
ap->cur_time++;
if (tr32(MAC_STATUS) & MAC_STATUS_RCVD_CFG) {
rx_cfg_reg = tr32(MAC_RX_AUTO_NEG);
if (rx_cfg_reg != ap->ability_match_cfg) {
ap->ability_match_cfg = rx_cfg_reg;
ap->ability_match = 0;
ap->ability_match_count = 0;
} else {
if (++ap->ability_match_count > 1) {
ap->ability_match = 1;
ap->ability_match_cfg = rx_cfg_reg;
}
}
if (rx_cfg_reg & ANEG_CFG_ACK)
ap->ack_match = 1;
else
ap->ack_match = 0;
ap->idle_match = 0;
} else {
ap->idle_match = 1;
ap->ability_match_cfg = 0;
ap->ability_match_count = 0;
ap->ability_match = 0;
ap->ack_match = 0;
rx_cfg_reg = 0;
}
ap->rxconfig = rx_cfg_reg;
ret = ANEG_OK;
switch (ap->state) {
case ANEG_STATE_UNKNOWN:
if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN))
ap->state = ANEG_STATE_AN_ENABLE;
/* fallthru */
case ANEG_STATE_AN_ENABLE:
ap->flags &= ~(MR_AN_COMPLETE | MR_PAGE_RX);
if (ap->flags & MR_AN_ENABLE) {
ap->link_time = 0;
ap->cur_time = 0;
ap->ability_match_cfg = 0;
ap->ability_match_count = 0;
ap->ability_match = 0;
ap->idle_match = 0;
ap->ack_match = 0;
ap->state = ANEG_STATE_RESTART_INIT;
} else {
ap->state = ANEG_STATE_DISABLE_LINK_OK;
}
break;
case ANEG_STATE_RESTART_INIT:
ap->link_time = ap->cur_time;
ap->flags &= ~(MR_NP_LOADED);
ap->txconfig = 0;
tw32(MAC_TX_AUTO_NEG, 0);
tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
udelay(40);
ret = ANEG_TIMER_ENAB;
ap->state = ANEG_STATE_RESTART;
/* fallthru */
case ANEG_STATE_RESTART:
delta = ap->cur_time - ap->link_time;
if (delta > ANEG_STATE_SETTLE_TIME)
ap->state = ANEG_STATE_ABILITY_DETECT_INIT;
else
ret = ANEG_TIMER_ENAB;
break;
case ANEG_STATE_DISABLE_LINK_OK:
ret = ANEG_DONE;
break;
case ANEG_STATE_ABILITY_DETECT_INIT:
ap->flags &= ~(MR_TOGGLE_TX);
ap->txconfig = ANEG_CFG_FD;
flowctrl = tg3_advert_flowctrl_1000X(tp->link_config.flowctrl);
if (flowctrl & ADVERTISE_1000XPAUSE)
ap->txconfig |= ANEG_CFG_PS1;
if (flowctrl & ADVERTISE_1000XPSE_ASYM)
ap->txconfig |= ANEG_CFG_PS2;
tw32(MAC_TX_AUTO_NEG, ap->txconfig);
tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
udelay(40);
ap->state = ANEG_STATE_ABILITY_DETECT;
break;
case ANEG_STATE_ABILITY_DETECT:
if (ap->ability_match != 0 && ap->rxconfig != 0)
ap->state = ANEG_STATE_ACK_DETECT_INIT;
break;
case ANEG_STATE_ACK_DETECT_INIT:
ap->txconfig |= ANEG_CFG_ACK;
tw32(MAC_TX_AUTO_NEG, ap->txconfig);
tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
udelay(40);
ap->state = ANEG_STATE_ACK_DETECT;
/* fallthru */
case ANEG_STATE_ACK_DETECT:
if (ap->ack_match != 0) {
if ((ap->rxconfig & ~ANEG_CFG_ACK) ==
(ap->ability_match_cfg & ~ANEG_CFG_ACK)) {
ap->state = ANEG_STATE_COMPLETE_ACK_INIT;
} else {
ap->state = ANEG_STATE_AN_ENABLE;
}
} else if (ap->ability_match != 0 &&
ap->rxconfig == 0) {
ap->state = ANEG_STATE_AN_ENABLE;
}
break;
case ANEG_STATE_COMPLETE_ACK_INIT:
if (ap->rxconfig & ANEG_CFG_INVAL) {
ret = ANEG_FAILED;
break;
}
ap->flags &= ~(MR_LP_ADV_FULL_DUPLEX |
MR_LP_ADV_HALF_DUPLEX |
MR_LP_ADV_SYM_PAUSE |
MR_LP_ADV_ASYM_PAUSE |
MR_LP_ADV_REMOTE_FAULT1 |
MR_LP_ADV_REMOTE_FAULT2 |
MR_LP_ADV_NEXT_PAGE |
MR_TOGGLE_RX |
MR_NP_RX);
if (ap->rxconfig & ANEG_CFG_FD)
ap->flags |= MR_LP_ADV_FULL_DUPLEX;
if (ap->rxconfig & ANEG_CFG_HD)
ap->flags |= MR_LP_ADV_HALF_DUPLEX;
if (ap->rxconfig & ANEG_CFG_PS1)
ap->flags |= MR_LP_ADV_SYM_PAUSE;
if (ap->rxconfig & ANEG_CFG_PS2)
ap->flags |= MR_LP_ADV_ASYM_PAUSE;
if (ap->rxconfig & ANEG_CFG_RF1)
ap->flags |= MR_LP_ADV_REMOTE_FAULT1;
if (ap->rxconfig & ANEG_CFG_RF2)
ap->flags |= MR_LP_ADV_REMOTE_FAULT2;
if (ap->rxconfig & ANEG_CFG_NP)
ap->flags |= MR_LP_ADV_NEXT_PAGE;
ap->link_time = ap->cur_time;
ap->flags ^= (MR_TOGGLE_TX);
if (ap->rxconfig & 0x0008)
ap->flags |= MR_TOGGLE_RX;
if (ap->rxconfig & ANEG_CFG_NP)
ap->flags |= MR_NP_RX;
ap->flags |= MR_PAGE_RX;
ap->state = ANEG_STATE_COMPLETE_ACK;
ret = ANEG_TIMER_ENAB;
break;
case ANEG_STATE_COMPLETE_ACK:
if (ap->ability_match != 0 &&
ap->rxconfig == 0) {
ap->state = ANEG_STATE_AN_ENABLE;
break;
}
delta = ap->cur_time - ap->link_time;
if (delta > ANEG_STATE_SETTLE_TIME) {
if (!(ap->flags & (MR_LP_ADV_NEXT_PAGE))) {
ap->state = ANEG_STATE_IDLE_DETECT_INIT;
} else {
if ((ap->txconfig & ANEG_CFG_NP) == 0 &&
!(ap->flags & MR_NP_RX)) {
ap->state = ANEG_STATE_IDLE_DETECT_INIT;
} else {
ret = ANEG_FAILED;
}
}
}
break;
case ANEG_STATE_IDLE_DETECT_INIT:
ap->link_time = ap->cur_time;
tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
udelay(40);
ap->state = ANEG_STATE_IDLE_DETECT;
ret = ANEG_TIMER_ENAB;
break;
case ANEG_STATE_IDLE_DETECT:
if (ap->ability_match != 0 &&
ap->rxconfig == 0) {
ap->state = ANEG_STATE_AN_ENABLE;
break;
}
delta = ap->cur_time - ap->link_time;
if (delta > ANEG_STATE_SETTLE_TIME) {
/* XXX another gem from the Broadcom driver :( */
ap->state = ANEG_STATE_LINK_OK;
}
break;
case ANEG_STATE_LINK_OK:
ap->flags |= (MR_AN_COMPLETE | MR_LINK_OK);
ret = ANEG_DONE;
break;
case ANEG_STATE_NEXT_PAGE_WAIT_INIT:
/* ??? unimplemented */
break;
case ANEG_STATE_NEXT_PAGE_WAIT:
/* ??? unimplemented */
break;
default:
ret = ANEG_FAILED;
break;
}
return ret;
}
|
static int tg3_fiber_aneg_smachine(struct tg3 *tp,
struct tg3_fiber_aneginfo *ap)
{
u16 flowctrl;
unsigned long delta;
u32 rx_cfg_reg;
int ret;
if (ap->state == ANEG_STATE_UNKNOWN) {
ap->rxconfig = 0;
ap->link_time = 0;
ap->cur_time = 0;
ap->ability_match_cfg = 0;
ap->ability_match_count = 0;
ap->ability_match = 0;
ap->idle_match = 0;
ap->ack_match = 0;
}
ap->cur_time++;
if (tr32(MAC_STATUS) & MAC_STATUS_RCVD_CFG) {
rx_cfg_reg = tr32(MAC_RX_AUTO_NEG);
if (rx_cfg_reg != ap->ability_match_cfg) {
ap->ability_match_cfg = rx_cfg_reg;
ap->ability_match = 0;
ap->ability_match_count = 0;
} else {
if (++ap->ability_match_count > 1) {
ap->ability_match = 1;
ap->ability_match_cfg = rx_cfg_reg;
}
}
if (rx_cfg_reg & ANEG_CFG_ACK)
ap->ack_match = 1;
else
ap->ack_match = 0;
ap->idle_match = 0;
} else {
ap->idle_match = 1;
ap->ability_match_cfg = 0;
ap->ability_match_count = 0;
ap->ability_match = 0;
ap->ack_match = 0;
rx_cfg_reg = 0;
}
ap->rxconfig = rx_cfg_reg;
ret = ANEG_OK;
switch (ap->state) {
case ANEG_STATE_UNKNOWN:
if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN))
ap->state = ANEG_STATE_AN_ENABLE;
/* fallthru */
case ANEG_STATE_AN_ENABLE:
ap->flags &= ~(MR_AN_COMPLETE | MR_PAGE_RX);
if (ap->flags & MR_AN_ENABLE) {
ap->link_time = 0;
ap->cur_time = 0;
ap->ability_match_cfg = 0;
ap->ability_match_count = 0;
ap->ability_match = 0;
ap->idle_match = 0;
ap->ack_match = 0;
ap->state = ANEG_STATE_RESTART_INIT;
} else {
ap->state = ANEG_STATE_DISABLE_LINK_OK;
}
break;
case ANEG_STATE_RESTART_INIT:
ap->link_time = ap->cur_time;
ap->flags &= ~(MR_NP_LOADED);
ap->txconfig = 0;
tw32(MAC_TX_AUTO_NEG, 0);
tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
udelay(40);
ret = ANEG_TIMER_ENAB;
ap->state = ANEG_STATE_RESTART;
/* fallthru */
case ANEG_STATE_RESTART:
delta = ap->cur_time - ap->link_time;
if (delta > ANEG_STATE_SETTLE_TIME)
ap->state = ANEG_STATE_ABILITY_DETECT_INIT;
else
ret = ANEG_TIMER_ENAB;
break;
case ANEG_STATE_DISABLE_LINK_OK:
ret = ANEG_DONE;
break;
case ANEG_STATE_ABILITY_DETECT_INIT:
ap->flags &= ~(MR_TOGGLE_TX);
ap->txconfig = ANEG_CFG_FD;
flowctrl = tg3_advert_flowctrl_1000X(tp->link_config.flowctrl);
if (flowctrl & ADVERTISE_1000XPAUSE)
ap->txconfig |= ANEG_CFG_PS1;
if (flowctrl & ADVERTISE_1000XPSE_ASYM)
ap->txconfig |= ANEG_CFG_PS2;
tw32(MAC_TX_AUTO_NEG, ap->txconfig);
tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
udelay(40);
ap->state = ANEG_STATE_ABILITY_DETECT;
break;
case ANEG_STATE_ABILITY_DETECT:
if (ap->ability_match != 0 && ap->rxconfig != 0)
ap->state = ANEG_STATE_ACK_DETECT_INIT;
break;
case ANEG_STATE_ACK_DETECT_INIT:
ap->txconfig |= ANEG_CFG_ACK;
tw32(MAC_TX_AUTO_NEG, ap->txconfig);
tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
udelay(40);
ap->state = ANEG_STATE_ACK_DETECT;
/* fallthru */
case ANEG_STATE_ACK_DETECT:
if (ap->ack_match != 0) {
if ((ap->rxconfig & ~ANEG_CFG_ACK) ==
(ap->ability_match_cfg & ~ANEG_CFG_ACK)) {
ap->state = ANEG_STATE_COMPLETE_ACK_INIT;
} else {
ap->state = ANEG_STATE_AN_ENABLE;
}
} else if (ap->ability_match != 0 &&
ap->rxconfig == 0) {
ap->state = ANEG_STATE_AN_ENABLE;
}
break;
case ANEG_STATE_COMPLETE_ACK_INIT:
if (ap->rxconfig & ANEG_CFG_INVAL) {
ret = ANEG_FAILED;
break;
}
ap->flags &= ~(MR_LP_ADV_FULL_DUPLEX |
MR_LP_ADV_HALF_DUPLEX |
MR_LP_ADV_SYM_PAUSE |
MR_LP_ADV_ASYM_PAUSE |
MR_LP_ADV_REMOTE_FAULT1 |
MR_LP_ADV_REMOTE_FAULT2 |
MR_LP_ADV_NEXT_PAGE |
MR_TOGGLE_RX |
MR_NP_RX);
if (ap->rxconfig & ANEG_CFG_FD)
ap->flags |= MR_LP_ADV_FULL_DUPLEX;
if (ap->rxconfig & ANEG_CFG_HD)
ap->flags |= MR_LP_ADV_HALF_DUPLEX;
if (ap->rxconfig & ANEG_CFG_PS1)
ap->flags |= MR_LP_ADV_SYM_PAUSE;
if (ap->rxconfig & ANEG_CFG_PS2)
ap->flags |= MR_LP_ADV_ASYM_PAUSE;
if (ap->rxconfig & ANEG_CFG_RF1)
ap->flags |= MR_LP_ADV_REMOTE_FAULT1;
if (ap->rxconfig & ANEG_CFG_RF2)
ap->flags |= MR_LP_ADV_REMOTE_FAULT2;
if (ap->rxconfig & ANEG_CFG_NP)
ap->flags |= MR_LP_ADV_NEXT_PAGE;
ap->link_time = ap->cur_time;
ap->flags ^= (MR_TOGGLE_TX);
if (ap->rxconfig & 0x0008)
ap->flags |= MR_TOGGLE_RX;
if (ap->rxconfig & ANEG_CFG_NP)
ap->flags |= MR_NP_RX;
ap->flags |= MR_PAGE_RX;
ap->state = ANEG_STATE_COMPLETE_ACK;
ret = ANEG_TIMER_ENAB;
break;
case ANEG_STATE_COMPLETE_ACK:
if (ap->ability_match != 0 &&
ap->rxconfig == 0) {
ap->state = ANEG_STATE_AN_ENABLE;
break;
}
delta = ap->cur_time - ap->link_time;
if (delta > ANEG_STATE_SETTLE_TIME) {
if (!(ap->flags & (MR_LP_ADV_NEXT_PAGE))) {
ap->state = ANEG_STATE_IDLE_DETECT_INIT;
} else {
if ((ap->txconfig & ANEG_CFG_NP) == 0 &&
!(ap->flags & MR_NP_RX)) {
ap->state = ANEG_STATE_IDLE_DETECT_INIT;
} else {
ret = ANEG_FAILED;
}
}
}
break;
case ANEG_STATE_IDLE_DETECT_INIT:
ap->link_time = ap->cur_time;
tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
udelay(40);
ap->state = ANEG_STATE_IDLE_DETECT;
ret = ANEG_TIMER_ENAB;
break;
case ANEG_STATE_IDLE_DETECT:
if (ap->ability_match != 0 &&
ap->rxconfig == 0) {
ap->state = ANEG_STATE_AN_ENABLE;
break;
}
delta = ap->cur_time - ap->link_time;
if (delta > ANEG_STATE_SETTLE_TIME) {
/* XXX another gem from the Broadcom driver :( */
ap->state = ANEG_STATE_LINK_OK;
}
break;
case ANEG_STATE_LINK_OK:
ap->flags |= (MR_AN_COMPLETE | MR_LINK_OK);
ret = ANEG_DONE;
break;
case ANEG_STATE_NEXT_PAGE_WAIT_INIT:
/* ??? unimplemented */
break;
case ANEG_STATE_NEXT_PAGE_WAIT:
/* ??? unimplemented */
break;
default:
ret = ANEG_FAILED;
break;
}
return ret;
}
|
C
|
linux
| 0 |
CVE-2015-3185
|
https://www.cvedetails.com/cve/CVE-2015-3185/
|
CWE-264
|
https://github.com/apache/httpd/commit/cd2b7a26c776b0754fb98426a67804fd48118708
|
cd2b7a26c776b0754fb98426a67804fd48118708
|
SECURITY: CVE-2015-3183 (cve.mitre.org)
Replacement of ap_some_auth_required (unusable in Apache httpd 2.4)
with new ap_some_authn_required and ap_force_authn hook.
Submitted by: breser
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1684524 13f79535-47bb-0310-9956-ffa450edef68
|
AP_DECLARE(void) ap_setup_auth_internal(apr_pool_t *ptemp)
{
int total_auth_hooks = 0;
int total_auth_providers = 0;
auth_internal_per_conf = 0;
if (_hooks.link_access_checker) {
total_auth_hooks += _hooks.link_access_checker->nelts;
}
if (_hooks.link_access_checker_ex) {
total_auth_hooks += _hooks.link_access_checker_ex->nelts;
}
if (_hooks.link_check_user_id) {
total_auth_hooks += _hooks.link_check_user_id->nelts;
}
if (_hooks.link_auth_checker) {
total_auth_hooks += _hooks.link_auth_checker->nelts;
}
if (total_auth_hooks > auth_internal_per_conf_hooks) {
return;
}
total_auth_providers +=
ap_list_provider_names(ptemp, AUTHN_PROVIDER_GROUP,
AUTHN_PROVIDER_VERSION)->nelts;
total_auth_providers +=
ap_list_provider_names(ptemp, AUTHZ_PROVIDER_GROUP,
AUTHZ_PROVIDER_VERSION)->nelts;
if (total_auth_providers > auth_internal_per_conf_providers) {
return;
}
auth_internal_per_conf = 1;
}
|
AP_DECLARE(void) ap_setup_auth_internal(apr_pool_t *ptemp)
{
int total_auth_hooks = 0;
int total_auth_providers = 0;
auth_internal_per_conf = 0;
if (_hooks.link_access_checker) {
total_auth_hooks += _hooks.link_access_checker->nelts;
}
if (_hooks.link_access_checker_ex) {
total_auth_hooks += _hooks.link_access_checker_ex->nelts;
}
if (_hooks.link_check_user_id) {
total_auth_hooks += _hooks.link_check_user_id->nelts;
}
if (_hooks.link_auth_checker) {
total_auth_hooks += _hooks.link_auth_checker->nelts;
}
if (total_auth_hooks > auth_internal_per_conf_hooks) {
return;
}
total_auth_providers +=
ap_list_provider_names(ptemp, AUTHN_PROVIDER_GROUP,
AUTHN_PROVIDER_VERSION)->nelts;
total_auth_providers +=
ap_list_provider_names(ptemp, AUTHZ_PROVIDER_GROUP,
AUTHZ_PROVIDER_VERSION)->nelts;
if (total_auth_providers > auth_internal_per_conf_providers) {
return;
}
auth_internal_per_conf = 1;
}
|
C
|
httpd
| 0 |
CVE-2018-12904
|
https://www.cvedetails.com/cve/CVE-2018-12904/
| null |
https://github.com/torvalds/linux/commit/727ba748e110b4de50d142edca9d6a9b7e6111d8
|
727ba748e110b4de50d142edca9d6a9b7e6111d8
|
kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: [email protected]
Signed-off-by: Felix Wilhelm <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static void __always_inline vmx_enable_intercept_for_msr(unsigned long *msr_bitmap,
u32 msr, int type)
{
int f = sizeof(unsigned long);
if (!cpu_has_vmx_msr_bitmap())
return;
if (static_branch_unlikely(&enable_evmcs))
evmcs_touch_msr_bitmap();
/*
* See Intel PRM Vol. 3, 20.6.9 (MSR-Bitmap Address). Early manuals
* have the write-low and read-high bitmap offsets the wrong way round.
* We can control MSRs 0x00000000-0x00001fff and 0xc0000000-0xc0001fff.
*/
if (msr <= 0x1fff) {
if (type & MSR_TYPE_R)
/* read-low */
__set_bit(msr, msr_bitmap + 0x000 / f);
if (type & MSR_TYPE_W)
/* write-low */
__set_bit(msr, msr_bitmap + 0x800 / f);
} else if ((msr >= 0xc0000000) && (msr <= 0xc0001fff)) {
msr &= 0x1fff;
if (type & MSR_TYPE_R)
/* read-high */
__set_bit(msr, msr_bitmap + 0x400 / f);
if (type & MSR_TYPE_W)
/* write-high */
__set_bit(msr, msr_bitmap + 0xc00 / f);
}
}
|
static void __always_inline vmx_enable_intercept_for_msr(unsigned long *msr_bitmap,
u32 msr, int type)
{
int f = sizeof(unsigned long);
if (!cpu_has_vmx_msr_bitmap())
return;
if (static_branch_unlikely(&enable_evmcs))
evmcs_touch_msr_bitmap();
/*
* See Intel PRM Vol. 3, 20.6.9 (MSR-Bitmap Address). Early manuals
* have the write-low and read-high bitmap offsets the wrong way round.
* We can control MSRs 0x00000000-0x00001fff and 0xc0000000-0xc0001fff.
*/
if (msr <= 0x1fff) {
if (type & MSR_TYPE_R)
/* read-low */
__set_bit(msr, msr_bitmap + 0x000 / f);
if (type & MSR_TYPE_W)
/* write-low */
__set_bit(msr, msr_bitmap + 0x800 / f);
} else if ((msr >= 0xc0000000) && (msr <= 0xc0001fff)) {
msr &= 0x1fff;
if (type & MSR_TYPE_R)
/* read-high */
__set_bit(msr, msr_bitmap + 0x400 / f);
if (type & MSR_TYPE_W)
/* write-high */
__set_bit(msr, msr_bitmap + 0xc00 / f);
}
}
|
C
|
linux
| 0 |
CVE-2015-8215
|
https://www.cvedetails.com/cve/CVE-2015-8215/
|
CWE-20
|
https://github.com/torvalds/linux/commit/77751427a1ff25b27d47a4c36b12c3c8667855ac
|
77751427a1ff25b27d47a4c36b12c3c8667855ac
|
ipv6: addrconf: validate new MTU before applying it
Currently we don't check if the new MTU is valid or not and this allows
one to configure a smaller than minimum allowed by RFCs or even bigger
than interface own MTU, which is a problem as it may lead to packet
drops.
If you have a daemon like NetworkManager running, this may be exploited
by remote attackers by forging RA packets with an invalid MTU, possibly
leading to a DoS. (NetworkManager currently only validates for values
too small, but not for too big ones.)
The fix is just to make sure the new value is valid. That is, between
IPV6_MIN_MTU and interface's MTU.
Note that similar check is already performed at
ndisc_router_discovery(), for when kernel itself parses the RA.
Signed-off-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: Sabrina Dubroca <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static void addrconf_disable_change(struct net *net, __s32 newf)
{
struct net_device *dev;
struct inet6_dev *idev;
rcu_read_lock();
for_each_netdev_rcu(net, dev) {
idev = __in6_dev_get(dev);
if (idev) {
int changed = (!idev->cnf.disable_ipv6) ^ (!newf);
idev->cnf.disable_ipv6 = newf;
if (changed)
dev_disable_change(idev);
}
}
rcu_read_unlock();
}
|
static void addrconf_disable_change(struct net *net, __s32 newf)
{
struct net_device *dev;
struct inet6_dev *idev;
rcu_read_lock();
for_each_netdev_rcu(net, dev) {
idev = __in6_dev_get(dev);
if (idev) {
int changed = (!idev->cnf.disable_ipv6) ^ (!newf);
idev->cnf.disable_ipv6 = newf;
if (changed)
dev_disable_change(idev);
}
}
rcu_read_unlock();
}
|
C
|
linux
| 0 |
CVE-2016-10192
|
https://www.cvedetails.com/cve/CVE-2016-10192/
|
CWE-119
|
https://github.com/FFmpeg/FFmpeg/commit/a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156
|
a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156
|
ffserver: Check chunk size
Fixes out of array access
Fixes: poc_ffserver.py
Found-by: Paul Cher <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
|
static void compute_bandwidth(void)
{
unsigned bandwidth;
int i;
FFServerStream *stream;
for(stream = config.first_stream; stream; stream = stream->next) {
bandwidth = 0;
for(i=0;i<stream->nb_streams;i++) {
LayeredAVStream *st = stream->streams[i];
switch(st->codec->codec_type) {
case AVMEDIA_TYPE_AUDIO:
case AVMEDIA_TYPE_VIDEO:
bandwidth += st->codec->bit_rate;
break;
default:
break;
}
}
stream->bandwidth = (bandwidth + 999) / 1000;
}
}
|
static void compute_bandwidth(void)
{
unsigned bandwidth;
int i;
FFServerStream *stream;
for(stream = config.first_stream; stream; stream = stream->next) {
bandwidth = 0;
for(i=0;i<stream->nb_streams;i++) {
LayeredAVStream *st = stream->streams[i];
switch(st->codec->codec_type) {
case AVMEDIA_TYPE_AUDIO:
case AVMEDIA_TYPE_VIDEO:
bandwidth += st->codec->bit_rate;
break;
default:
break;
}
}
stream->bandwidth = (bandwidth + 999) / 1000;
}
}
|
C
|
FFmpeg
| 0 |
CVE-2018-6111
|
https://www.cvedetails.com/cve/CVE-2018-6111/
|
CWE-20
|
https://github.com/chromium/chromium/commit/3c8e4852477d5b1e2da877808c998dc57db9460f
|
3c8e4852477d5b1e2da877808c998dc57db9460f
|
DevTools: speculative fix for crash in NetworkHandler::Disable
This keeps BrowserContext* and StoragePartition* instead of
RenderProcessHost* in an attemp to resolve UAF of RenderProcessHost
upon closure of DevTools front-end.
Bug: 801117, 783067, 780694
Change-Id: I6c2cca60cc0c29f0949d189cf918769059f80c1b
Reviewed-on: https://chromium-review.googlesource.com/876657
Commit-Queue: Andrey Kosyakov <[email protected]>
Reviewed-by: Dmitry Gozman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#531157}
|
IOHandler::~IOHandler() {}
|
IOHandler::~IOHandler() {}
|
C
|
Chrome
| 0 |
CVE-2010-3704
|
https://www.cvedetails.com/cve/CVE-2010-3704/
|
CWE-20
|
https://cgit.freedesktop.org/poppler/poppler/commit/?id=39d140bfc0b8239bdd96d6a55842034ae5c05473
|
39d140bfc0b8239bdd96d6a55842034ae5c05473
| null |
void FoFiType1::writeEncoded(char **newEncoding,
FoFiOutputFunc outputFunc, void *outputStream) {
char buf[512];
char *line, *line2, *p;
int i;
for (line = (char *)file;
line && strncmp(line, "/Encoding", 9);
line = getNextLine(line)) ;
if (!line) {
(*outputFunc)(outputStream, (char *)file, len);
return;
}
(*outputFunc)(outputStream, (char *)file, line - (char *)file);
(*outputFunc)(outputStream, "/Encoding 256 array\n", 20);
(*outputFunc)(outputStream,
"0 1 255 {1 index exch /.notdef put} for\n", 40);
for (i = 0; i < 256; ++i) {
if (newEncoding[i]) {
sprintf(buf, "dup %d /%s put\n", i, newEncoding[i]);
(*outputFunc)(outputStream, buf, strlen(buf));
}
}
(*outputFunc)(outputStream, "readonly def\n", 13);
if (!strncmp(line, "/Encoding StandardEncoding def", 30)) {
line = getNextLine(line);
} else {
p = line + 10;
line = NULL;
for (; p < (char *)file + len; ++p) {
if ((*p == ' ' || *p == '\t' || *p == '\x0a' ||
*p == '\x0d' || *p == '\x0c' || *p == '\0') &&
p + 4 <= (char *)file + len &&
!strncmp(p + 1, "def", 3)) {
line = p + 4;
break;
}
}
}
if (line) {
for (line2 = line, i = 0;
i < 20 && line2 && strncmp(line2, "/Encoding", 9);
line2 = getNextLine(line2), ++i) ;
if (i < 20 && line2) {
(*outputFunc)(outputStream, line, line2 - line);
if (!strncmp(line2, "/Encoding StandardEncoding def", 30)) {
line = getNextLine(line2);
} else {
p = line2 + 10;
line = NULL;
for (; p < (char *)file + len; ++p) {
if ((*p == ' ' || *p == '\t' || *p == '\x0a' ||
*p == '\x0d' || *p == '\x0c' || *p == '\0') &&
p + 4 <= (char *)file + len &&
!strncmp(p + 1, "def", 3)) {
line = p + 4;
break;
}
}
}
}
if (line) {
(*outputFunc)(outputStream, line, ((char *)file + len) - line);
}
}
}
|
void FoFiType1::writeEncoded(char **newEncoding,
FoFiOutputFunc outputFunc, void *outputStream) {
char buf[512];
char *line, *line2, *p;
int i;
for (line = (char *)file;
line && strncmp(line, "/Encoding", 9);
line = getNextLine(line)) ;
if (!line) {
(*outputFunc)(outputStream, (char *)file, len);
return;
}
(*outputFunc)(outputStream, (char *)file, line - (char *)file);
(*outputFunc)(outputStream, "/Encoding 256 array\n", 20);
(*outputFunc)(outputStream,
"0 1 255 {1 index exch /.notdef put} for\n", 40);
for (i = 0; i < 256; ++i) {
if (newEncoding[i]) {
sprintf(buf, "dup %d /%s put\n", i, newEncoding[i]);
(*outputFunc)(outputStream, buf, strlen(buf));
}
}
(*outputFunc)(outputStream, "readonly def\n", 13);
if (!strncmp(line, "/Encoding StandardEncoding def", 30)) {
line = getNextLine(line);
} else {
p = line + 10;
line = NULL;
for (; p < (char *)file + len; ++p) {
if ((*p == ' ' || *p == '\t' || *p == '\x0a' ||
*p == '\x0d' || *p == '\x0c' || *p == '\0') &&
p + 4 <= (char *)file + len &&
!strncmp(p + 1, "def", 3)) {
line = p + 4;
break;
}
}
}
if (line) {
for (line2 = line, i = 0;
i < 20 && line2 && strncmp(line2, "/Encoding", 9);
line2 = getNextLine(line2), ++i) ;
if (i < 20 && line2) {
(*outputFunc)(outputStream, line, line2 - line);
if (!strncmp(line2, "/Encoding StandardEncoding def", 30)) {
line = getNextLine(line2);
} else {
p = line2 + 10;
line = NULL;
for (; p < (char *)file + len; ++p) {
if ((*p == ' ' || *p == '\t' || *p == '\x0a' ||
*p == '\x0d' || *p == '\x0c' || *p == '\0') &&
p + 4 <= (char *)file + len &&
!strncmp(p + 1, "def", 3)) {
line = p + 4;
break;
}
}
}
}
if (line) {
(*outputFunc)(outputStream, line, ((char *)file + len) - line);
}
}
}
|
CPP
|
poppler
| 0 |
CVE-2017-6348
|
https://www.cvedetails.com/cve/CVE-2017-6348/
| null |
https://github.com/torvalds/linux/commit/4c03b862b12f980456f9de92db6d508a4999b788
|
4c03b862b12f980456f9de92db6d508a4999b788
|
irda: Fix lockdep annotations in hashbin_delete().
A nested lock depth was added to the hasbin_delete() code but it
doesn't actually work some well and results in tons of lockdep splats.
Fix the code instead to properly drop the lock around the operation
and just keep peeking the head of the hashbin queue.
Reported-by: Dmitry Vyukov <[email protected]>
Tested-by: Dmitry Vyukov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
irda_queue_t *hashbin_get_first( hashbin_t* hashbin)
{
irda_queue_t *entry;
int i;
IRDA_ASSERT( hashbin != NULL, return NULL;);
IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
if ( hashbin == NULL)
return NULL;
for ( i = 0; i < HASHBIN_SIZE; i ++ ) {
entry = hashbin->hb_queue[ i];
if ( entry) {
hashbin->hb_current = entry;
return entry;
}
}
/*
* Did not find any item in hashbin
*/
return NULL;
}
|
irda_queue_t *hashbin_get_first( hashbin_t* hashbin)
{
irda_queue_t *entry;
int i;
IRDA_ASSERT( hashbin != NULL, return NULL;);
IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
if ( hashbin == NULL)
return NULL;
for ( i = 0; i < HASHBIN_SIZE; i ++ ) {
entry = hashbin->hb_queue[ i];
if ( entry) {
hashbin->hb_current = entry;
return entry;
}
}
/*
* Did not find any item in hashbin
*/
return NULL;
}
|
C
|
linux
| 0 |
CVE-2012-5138
|
https://www.cvedetails.com/cve/CVE-2012-5138/
| null |
https://github.com/chromium/chromium/commit/8083841913b8eb8018ae52f67c923f0b3d66c466
|
8083841913b8eb8018ae52f67c923f0b3d66c466
|
Apply missing kParentDirectory check
BUG=161564
Review URL: https://chromiumcodereview.appspot.com/11414046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168692 0039d316-1c4b-4281-b951-d872f2087c98
|
bool ChildProcessSecurityPolicyImpl::HasWebUIBindings(int child_id) {
base::AutoLock lock(lock_);
SecurityStateMap::iterator state = security_state_.find(child_id);
if (state == security_state_.end())
return false;
return state->second->has_web_ui_bindings();
}
|
bool ChildProcessSecurityPolicyImpl::HasWebUIBindings(int child_id) {
base::AutoLock lock(lock_);
SecurityStateMap::iterator state = security_state_.find(child_id);
if (state == security_state_.end())
return false;
return state->second->has_web_ui_bindings();
}
|
C
|
Chrome
| 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 octetAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionState), exceptionState);
imp->setOctetAttribute(cppValue);
}
|
static void octetAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionState), exceptionState);
imp->setOctetAttribute(cppValue);
}
|
C
|
Chrome
| 0 |
CVE-2015-1335
|
https://www.cvedetails.com/cve/CVE-2015-1335/
|
CWE-59
|
https://github.com/lxc/lxc/commit/592fd47a6245508b79fe6ac819fe6d3b2c1289be
|
592fd47a6245508b79fe6ac819fe6d3b2c1289be
|
CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. However, since the
mount target is in the container, it's possible that the container admin
could divert the mount with symbolic links. This could bypass proper
container startup (i.e. confinement of a root-owned container by the
restrictive apparmor policy, by diverting the required write to
/proc/self/attr/current), or bypass the (path-based) apparmor policy
by diverting, say, /proc to /mnt in the container.
To prevent this,
1. do not allow mounts to paths containing symbolic links
2. do not allow bind mounts from relative paths containing symbolic
links.
Details:
Define safe_mount which ensures that the container has not inserted any
symbolic links into any mount targets for mounts to be done during
container setup.
The host's mount path may contain symbolic links. As it is under the
control of the administrator, that's ok. So safe_mount begins the check
for symbolic links after the rootfs->mount, by opening that directory.
It opens each directory along the path using openat() relative to the
parent directory using O_NOFOLLOW. When the target is reached, it
mounts onto /proc/self/fd/<targetfd>.
Use safe_mount() in mount_entry(), when mounting container proc,
and when needed. In particular, safe_mount() need not be used in
any case where:
1. the mount is done in the container's namespace
2. the mount is for the container's rootfs
3. the mount is relative to a tmpfs or proc/sysfs which we have
just safe_mount()ed ourselves
Since we were using proc/net as a temporary placeholder for /proc/sys/net
during container startup, and proc/net is a symbolic link, use proc/tty
instead.
Update the lxc.container.conf manpage with details about the new
restrictions.
Finally, add a testcase to test some symbolic link possibilities.
Reported-by: Roman Fiedler
Signed-off-by: Serge Hallyn <[email protected]>
Acked-by: Stéphane Graber <[email protected]>
|
static struct cgroup_process_info *lxc_cgroup_process_info_get_self(struct cgroup_meta_data *meta)
{
struct cgroup_process_info *i;
i = lxc_cgroup_process_info_getx("/proc/self/cgroup", meta);
if (!i)
i = lxc_cgroup_process_info_get(getpid(), meta);
return i;
}
|
static struct cgroup_process_info *lxc_cgroup_process_info_get_self(struct cgroup_meta_data *meta)
{
struct cgroup_process_info *i;
i = lxc_cgroup_process_info_getx("/proc/self/cgroup", meta);
if (!i)
i = lxc_cgroup_process_info_get(getpid(), meta);
return i;
}
|
C
|
lxc
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/8353baf8d1504dbdd4ad7584ff2466de657521cd
|
8353baf8d1504dbdd4ad7584ff2466de657521cd
|
Remove WebFrame::canHaveSecureChild
To simplify the public API, ServiceWorkerNetworkProvider can do the
parent walk itself.
Follow-up to https://crrev.com/ad1850962644e19.
BUG=607543
Review-Url: https://codereview.chromium.org/2082493002
Cr-Commit-Position: refs/heads/master@{#400896}
|
LayoutViewItem Document::layoutViewItem() const
{
return LayoutViewItem(m_layoutView);
}
|
LayoutViewItem Document::layoutViewItem() const
{
return LayoutViewItem(m_layoutView);
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/4698aea3e347d67c817d7acebd16054b9f763cfb
|
4698aea3e347d67c817d7acebd16054b9f763cfb
|
Revert "Move assistant icon animation to CompositorAnimationOberver"
This reverts commit 33fc6c64a3b5af5627b7e28874f4583793e74da8.
Reason for revert: One or the other of this CL and https://crrev.com/c/748268 (perhaps both in combination?) broke PaletteTrayTestWithVoiceInteraction.StylusBarrelButtonActivatesHighlighter on Linux ChromiumOS Tests (dbg)(1):
https://uberchromegw.corp.google.com/i/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/31692
The connection to these voice interaction Cls seems pretty clear. I can't identify which one it is, though, so while I apologize for the trouble, I'm going to revert both to ensure that the bot turns green again.
Original change's description:
> Move assistant icon animation to CompositorAnimationOberver
>
> BUG=None
> TEST=locally build and see animation running as before.
>
> Change-Id: I1eb62490108beaaec0795adb4251054c03b364e1
> Reviewed-on: https://chromium-review.googlesource.com/748273
> Commit-Queue: Xiaohui Chen <[email protected]>
> Reviewed-by: Xiyuan Xia <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#513211}
[email protected],[email protected]
Change-Id: I5ef677c189808601f8e357f56a171bf920b10fa0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/749851
Reviewed-by: Justin Donnelly <[email protected]>
Commit-Queue: Justin Donnelly <[email protected]>
Cr-Commit-Position: refs/heads/master@{#513272}
|
void VoiceInteractionOverlay::StartAnimation(bool show_icon) {
animation_state_ = AnimationState::STARTING;
show_icon_ = show_icon;
SetVisible(true);
ripple_layer_->SetOpacity(0);
SkMScalar scale_factor =
kRippleCircleStartRadiusDip / kRippleCircleInitRadiusDip;
gfx::Transform transform;
const gfx::Point center = host_view_->GetAppListButtonCenterPoint();
transform.Translate(center.x() - kRippleCircleStartRadiusDip,
center.y() - kRippleCircleStartRadiusDip);
transform.Scale(scale_factor, scale_factor);
ripple_layer_->SetTransform(transform);
{
scale_factor = kRippleCircleRadiusDip / kRippleCircleInitRadiusDip;
transform.MakeIdentity();
transform.Translate(center.x() - kRippleCircleRadiusDip,
center.y() - kRippleCircleRadiusDip);
transform.Scale(scale_factor, scale_factor);
ui::ScopedLayerAnimationSettings settings(ripple_layer_->GetAnimator());
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kRippleExpandDurationMs));
settings.SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN_2);
ripple_layer_->SetTransform(transform);
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kRippleOpacityDurationMs));
ripple_layer_->SetOpacity(kRippleOpacity);
}
icon_layer_->SetOpacity(0);
background_layer_->SetOpacity(0);
if (!show_icon_)
return;
transform.MakeIdentity();
transform.Translate(center.x() - kIconStartSizeDip / 2.f,
center.y() - kIconStartSizeDip / 2.f);
scale_factor = kIconStartSizeDip / kIconInitSizeDip;
transform.Scale(scale_factor, scale_factor);
icon_layer_->SetTransform(transform);
const bool is_tablet_mode = Shell::Get()
->tablet_mode_controller()
->IsTabletModeWindowManagerEnabled();
const int icon_x_offset = is_tablet_mode ? 0 : kIconOffsetDip;
const int icon_y_offset =
is_tablet_mode ? -kRippleCircleRadiusDip : -kIconOffsetDip;
scale_factor = kIconSizeDip / kIconInitSizeDip;
transform.MakeIdentity();
transform.Translate(center.x() - kIconSizeDip / 2 + icon_x_offset,
center.y() - kIconSizeDip / 2 + icon_y_offset);
transform.Scale(scale_factor, scale_factor);
{
ui::ScopedLayerAnimationSettings settings(icon_layer_->GetAnimator());
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kFullExpandDurationMs));
settings.SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN_2);
icon_layer_->SetTransform(transform);
icon_layer_->SetOpacity(kIconOpacity);
}
background_layer_->ResetShape();
transform.MakeIdentity();
transform.Translate(center.x() - kBackgroundStartSizeDip / 2.f,
center.y() - kBackgroundStartSizeDip / 2.f);
scale_factor = kBackgroundStartSizeDip / kBackgroundInitSizeDip;
transform.Scale(scale_factor, scale_factor);
background_layer_->SetTransform(transform);
scale_factor = kBackgroundSizeDip / kBackgroundInitSizeDip;
transform.MakeIdentity();
transform.Translate(center.x() - kBackgroundSizeDip / 2 + icon_x_offset,
center.y() - kBackgroundSizeDip / 2 + icon_y_offset);
transform.Scale(scale_factor, scale_factor);
{
ui::ScopedLayerAnimationSettings settings(background_layer_->GetAnimator());
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kFullExpandDurationMs));
settings.SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN_2);
background_layer_->SetTransform(transform);
}
{
ui::ScopedLayerAnimationSettings settings(background_layer_->GetAnimator());
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kBackgroundOpacityDurationMs));
settings.SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN_2);
background_layer_->SetOpacity(1);
}
}
|
void VoiceInteractionOverlay::StartAnimation(bool show_icon) {
animation_state_ = AnimationState::STARTING;
show_icon_ = show_icon;
SetVisible(true);
ripple_layer_->SetOpacity(0);
SkMScalar scale_factor =
kRippleCircleStartRadiusDip / kRippleCircleInitRadiusDip;
gfx::Transform transform;
const gfx::Point center = host_view_->GetAppListButtonCenterPoint();
transform.Translate(center.x() - kRippleCircleStartRadiusDip,
center.y() - kRippleCircleStartRadiusDip);
transform.Scale(scale_factor, scale_factor);
ripple_layer_->SetTransform(transform);
{
scale_factor = kRippleCircleRadiusDip / kRippleCircleInitRadiusDip;
transform.MakeIdentity();
transform.Translate(center.x() - kRippleCircleRadiusDip,
center.y() - kRippleCircleRadiusDip);
transform.Scale(scale_factor, scale_factor);
ui::ScopedLayerAnimationSettings settings(ripple_layer_->GetAnimator());
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kRippleExpandDurationMs));
settings.SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN_2);
ripple_layer_->SetTransform(transform);
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kRippleOpacityDurationMs));
ripple_layer_->SetOpacity(kRippleOpacity);
}
icon_layer_->SetOpacity(0);
background_layer_->SetOpacity(0);
if (!show_icon_)
return;
transform.MakeIdentity();
transform.Translate(center.x() - kIconStartSizeDip / 2.f,
center.y() - kIconStartSizeDip / 2.f);
scale_factor = kIconStartSizeDip / kIconInitSizeDip;
transform.Scale(scale_factor, scale_factor);
icon_layer_->SetTransform(transform);
const bool is_tablet_mode = Shell::Get()
->tablet_mode_controller()
->IsTabletModeWindowManagerEnabled();
const int icon_x_offset = is_tablet_mode ? 0 : kIconOffsetDip;
const int icon_y_offset =
is_tablet_mode ? -kRippleCircleRadiusDip : -kIconOffsetDip;
scale_factor = kIconSizeDip / kIconInitSizeDip;
transform.MakeIdentity();
transform.Translate(center.x() - kIconSizeDip / 2 + icon_x_offset,
center.y() - kIconSizeDip / 2 + icon_y_offset);
transform.Scale(scale_factor, scale_factor);
{
ui::ScopedLayerAnimationSettings settings(icon_layer_->GetAnimator());
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kFullExpandDurationMs));
settings.SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN_2);
icon_layer_->SetTransform(transform);
icon_layer_->SetOpacity(kIconOpacity);
}
background_layer_->ResetShape();
transform.MakeIdentity();
transform.Translate(center.x() - kBackgroundStartSizeDip / 2.f,
center.y() - kBackgroundStartSizeDip / 2.f);
scale_factor = kBackgroundStartSizeDip / kBackgroundInitSizeDip;
transform.Scale(scale_factor, scale_factor);
background_layer_->SetTransform(transform);
scale_factor = kBackgroundSizeDip / kBackgroundInitSizeDip;
transform.MakeIdentity();
transform.Translate(center.x() - kBackgroundSizeDip / 2 + icon_x_offset,
center.y() - kBackgroundSizeDip / 2 + icon_y_offset);
transform.Scale(scale_factor, scale_factor);
{
ui::ScopedLayerAnimationSettings settings(background_layer_->GetAnimator());
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kFullExpandDurationMs));
settings.SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN_2);
background_layer_->SetTransform(transform);
}
{
ui::ScopedLayerAnimationSettings settings(background_layer_->GetAnimator());
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kBackgroundOpacityDurationMs));
settings.SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN_2);
background_layer_->SetOpacity(1);
}
}
|
C
|
Chrome
| 0 |
CVE-2015-2304
|
https://www.cvedetails.com/cve/CVE-2015-2304/
|
CWE-22
|
https://github.com/libarchive/libarchive/commit/59357157706d47c365b2227739e17daba3607526
|
59357157706d47c365b2227739e17daba3607526
|
Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
This fixes a directory traversal in the cpio tool.
|
set_xattrs(struct archive_write_disk *a)
{
struct archive_entry *entry = a->entry;
static int warning_done = 0;
int ret = ARCHIVE_OK;
int i = archive_entry_xattr_reset(entry);
while (i--) {
const char *name;
const void *value;
size_t size;
archive_entry_xattr_next(entry, &name, &value, &size);
if (name != NULL) {
int e;
int namespace;
if (strncmp(name, "user.", 5) == 0) {
/* "user." attributes go to user namespace */
name += 5;
namespace = EXTATTR_NAMESPACE_USER;
} else {
/* Warn about other extended attributes. */
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
"Can't restore extended attribute ``%s''",
name);
ret = ARCHIVE_WARN;
continue;
}
errno = 0;
#if HAVE_EXTATTR_SET_FD
if (a->fd >= 0)
e = extattr_set_fd(a->fd, namespace, name, value, size);
else
#endif
/* TODO: should we use extattr_set_link() instead? */
{
e = extattr_set_file(archive_entry_pathname(entry),
namespace, name, value, size);
}
if (e != (int)size) {
if (errno == ENOTSUP || errno == ENOSYS) {
if (!warning_done) {
warning_done = 1;
archive_set_error(&a->archive, errno,
"Cannot restore extended "
"attributes on this file "
"system");
}
} else {
archive_set_error(&a->archive, errno,
"Failed to set extended attribute");
}
ret = ARCHIVE_WARN;
}
}
}
return (ret);
}
|
set_xattrs(struct archive_write_disk *a)
{
struct archive_entry *entry = a->entry;
static int warning_done = 0;
int ret = ARCHIVE_OK;
int i = archive_entry_xattr_reset(entry);
while (i--) {
const char *name;
const void *value;
size_t size;
archive_entry_xattr_next(entry, &name, &value, &size);
if (name != NULL) {
int e;
int namespace;
if (strncmp(name, "user.", 5) == 0) {
/* "user." attributes go to user namespace */
name += 5;
namespace = EXTATTR_NAMESPACE_USER;
} else {
/* Warn about other extended attributes. */
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
"Can't restore extended attribute ``%s''",
name);
ret = ARCHIVE_WARN;
continue;
}
errno = 0;
#if HAVE_EXTATTR_SET_FD
if (a->fd >= 0)
e = extattr_set_fd(a->fd, namespace, name, value, size);
else
#endif
/* TODO: should we use extattr_set_link() instead? */
{
e = extattr_set_file(archive_entry_pathname(entry),
namespace, name, value, size);
}
if (e != (int)size) {
if (errno == ENOTSUP || errno == ENOSYS) {
if (!warning_done) {
warning_done = 1;
archive_set_error(&a->archive, errno,
"Cannot restore extended "
"attributes on this file "
"system");
}
} else {
archive_set_error(&a->archive, errno,
"Failed to set extended attribute");
}
ret = ARCHIVE_WARN;
}
}
}
return (ret);
}
|
C
|
libarchive
| 0 |
CVE-2015-6791
|
https://www.cvedetails.com/cve/CVE-2015-6791/
| null |
https://github.com/chromium/chromium/commit/7e995b26a5a503adefc0ad40435f7e16a45434c2
|
7e995b26a5a503adefc0ad40435f7e16a45434c2
|
Add a fake DriveFS launcher client.
Using DriveFS requires building and deploying ChromeOS. Add a client for
the fake DriveFS launcher to allow the use of a real DriveFS from a
ChromeOS chroot to be used with a target_os="chromeos" build of chrome.
This connects to the fake DriveFS launcher using mojo over a unix domain
socket named by a command-line flag, using the launcher to create
DriveFS instances.
Bug: 848126
Change-Id: I22dcca154d41bda196dd7c1782bb503f6bcba5b1
Reviewed-on: https://chromium-review.googlesource.com/1098434
Reviewed-by: Xiyuan Xia <[email protected]>
Commit-Queue: Sam McNally <[email protected]>
Cr-Commit-Position: refs/heads/master@{#567513}
|
bool IsVoiceInteractionLocalesSupported() {
if (base::FeatureList::IsEnabled(kAssistantFeatureForLocale))
return true;
std::string kLocale = icu::Locale::getDefault().getName();
if (kLocale != ULOC_US && kLocale != ULOC_UK && kLocale != ULOC_CANADA &&
base::CommandLine::ForCurrentProcess()
->GetSwitchValueASCII(
chromeos::switches::kVoiceInteractionLocales)
.find(kLocale) == std::string::npos) {
return false;
}
return true;
}
|
bool IsVoiceInteractionLocalesSupported() {
if (base::FeatureList::IsEnabled(kAssistantFeatureForLocale))
return true;
std::string kLocale = icu::Locale::getDefault().getName();
if (kLocale != ULOC_US && kLocale != ULOC_UK && kLocale != ULOC_CANADA &&
base::CommandLine::ForCurrentProcess()
->GetSwitchValueASCII(
chromeos::switches::kVoiceInteractionLocales)
.find(kLocale) == std::string::npos) {
return false;
}
return true;
}
|
C
|
Chrome
| 0 |
CVE-2012-2896
|
https://www.cvedetails.com/cve/CVE-2012-2896/
|
CWE-189
|
https://github.com/chromium/chromium/commit/3aad1a37affb1ab70d1897f2b03eb8c077264984
|
3aad1a37affb1ab70d1897f2b03eb8c077264984
|
Fix SafeAdd and SafeMultiply
BUG=145648,145544
Review URL: https://chromiumcodereview.appspot.com/10916165
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155478 0039d316-1c4b-4281-b951-d872f2087c98
|
void GLES2DecoderImpl::DoRegisterSharedIdsCHROMIUM(
GLuint namespace_id, GLsizei n, const GLuint* ids) {
IdAllocatorInterface* id_allocator = group_->GetIdAllocator(namespace_id);
for (GLsizei ii = 0; ii < n; ++ii) {
if (!id_allocator->MarkAsUsed(ids[ii])) {
for (GLsizei jj = 0; jj < ii; ++jj) {
id_allocator->FreeID(ids[jj]);
}
SetGLError(
GL_INVALID_VALUE, "RegisterSharedIdsCHROMIUM",
"attempt to register id that already exists");
return;
}
}
}
|
void GLES2DecoderImpl::DoRegisterSharedIdsCHROMIUM(
GLuint namespace_id, GLsizei n, const GLuint* ids) {
IdAllocatorInterface* id_allocator = group_->GetIdAllocator(namespace_id);
for (GLsizei ii = 0; ii < n; ++ii) {
if (!id_allocator->MarkAsUsed(ids[ii])) {
for (GLsizei jj = 0; jj < ii; ++jj) {
id_allocator->FreeID(ids[jj]);
}
SetGLError(
GL_INVALID_VALUE, "RegisterSharedIdsCHROMIUM",
"attempt to register id that already exists");
return;
}
}
}
|
C
|
Chrome
| 0 |
CVE-2016-1503
|
https://www.cvedetails.com/cve/CVE-2016-1503/
|
CWE-119
|
https://android.googlesource.com/platform/external/dhcpcd/+/1390ace71179f04a09c300ee8d0300aa69d9db09
|
1390ace71179f04a09c300ee8d0300aa69d9db09
|
Improve length checks in DHCP Options parsing of dhcpcd.
Bug: 26461634
Change-Id: Ic4c2eb381a6819e181afc8ab13891f3fc58b7deb
|
decode_rfc3361(int dl, const uint8_t *data)
{
uint8_t enc;
unsigned int l;
char *sip = NULL;
struct in_addr addr;
char *p;
if (dl < 2) {
errno = EINVAL;
return 0;
}
enc = *data++;
dl--;
switch (enc) {
case 0:
if ((l = decode_rfc3397(NULL, 0, dl, data)) > 0) {
sip = xmalloc(l);
decode_rfc3397(sip, l, dl, data);
}
break;
case 1:
if (dl == 0 || dl % 4 != 0) {
errno = EINVAL;
break;
}
addr.s_addr = INADDR_BROADCAST;
l = ((dl / sizeof(addr.s_addr)) * ((4 * 4) + 1)) + 1;
sip = p = xmalloc(l);
while (dl != 0) {
memcpy(&addr.s_addr, data, sizeof(addr.s_addr));
data += sizeof(addr.s_addr);
p += snprintf(p, l - (p - sip), "%s ", inet_ntoa(addr));
dl -= sizeof(addr.s_addr);
}
*--p = '\0';
break;
default:
errno = EINVAL;
return 0;
}
return sip;
}
|
decode_rfc3361(int dl, const uint8_t *data)
{
uint8_t enc;
unsigned int l;
char *sip = NULL;
struct in_addr addr;
char *p;
if (dl < 2) {
errno = EINVAL;
return 0;
}
enc = *data++;
dl--;
switch (enc) {
case 0:
if ((l = decode_rfc3397(NULL, 0, dl, data)) > 0) {
sip = xmalloc(l);
decode_rfc3397(sip, l, dl, data);
}
break;
case 1:
if (dl == 0 || dl % 4 != 0) {
errno = EINVAL;
break;
}
addr.s_addr = INADDR_BROADCAST;
l = ((dl / sizeof(addr.s_addr)) * ((4 * 4) + 1)) + 1;
sip = p = xmalloc(l);
while (dl != 0) {
memcpy(&addr.s_addr, data, sizeof(addr.s_addr));
data += sizeof(addr.s_addr);
p += snprintf(p, l - (p - sip), "%s ", inet_ntoa(addr));
dl -= sizeof(addr.s_addr);
}
*--p = '\0';
break;
default:
errno = EINVAL;
return 0;
}
return sip;
}
|
C
|
Android
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/dc3857aac17be72c96f28d860d875235b3be349a
|
dc3857aac17be72c96f28d860d875235b3be349a
|
Unreviewed, rolling out r142736.
http://trac.webkit.org/changeset/142736
https://bugs.webkit.org/show_bug.cgi?id=109716
Broke ABI, nightly builds crash on launch (Requested by ap on
#webkit).
Patch by Sheriff Bot <[email protected]> on 2013-02-13
Source/WebKit2:
* Shared/APIClientTraits.cpp:
(WebKit):
* Shared/APIClientTraits.h:
* UIProcess/API/C/WKPage.h:
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
Tools:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
git-svn-id: svn://svn.chromium.org/blink/trunk@142762 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
bool InjectedBundlePage::shouldChangeSelectedRange(WKBundleRangeHandleRef fromRange, WKBundleRangeHandleRef toRange, WKAffinityType affinity, bool stillSelecting)
{
if (!InjectedBundle::shared().isTestRunning())
return true;
static const char *affinitystring[] = {
"NSSelectionAffinityUpstream",
"NSSelectionAffinityDownstream"
};
static const char *boolstring[] = {
"FALSE",
"TRUE"
};
if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
StringBuilder stringBuilder;
stringBuilder.appendLiteral("EDITING DELEGATE: shouldChangeSelectedDOMRange:");
stringBuilder.append(rangeToStr(m_page, m_world.get(), fromRange));
stringBuilder.appendLiteral(" toDOMRange:");
stringBuilder.append(rangeToStr(m_page, m_world.get(), toRange));
stringBuilder.appendLiteral(" affinity:");
stringBuilder.append(affinitystring[affinity]);
stringBuilder.appendLiteral(" stillSelecting:");
stringBuilder.append(boolstring[stillSelecting]);
stringBuilder.append('\n');
InjectedBundle::shared().outputText(stringBuilder.toString());
}
return InjectedBundle::shared().testRunner()->shouldAllowEditing();
}
|
bool InjectedBundlePage::shouldChangeSelectedRange(WKBundleRangeHandleRef fromRange, WKBundleRangeHandleRef toRange, WKAffinityType affinity, bool stillSelecting)
{
if (!InjectedBundle::shared().isTestRunning())
return true;
static const char *affinitystring[] = {
"NSSelectionAffinityUpstream",
"NSSelectionAffinityDownstream"
};
static const char *boolstring[] = {
"FALSE",
"TRUE"
};
if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
StringBuilder stringBuilder;
stringBuilder.appendLiteral("EDITING DELEGATE: shouldChangeSelectedDOMRange:");
stringBuilder.append(rangeToStr(m_page, m_world.get(), fromRange));
stringBuilder.appendLiteral(" toDOMRange:");
stringBuilder.append(rangeToStr(m_page, m_world.get(), toRange));
stringBuilder.appendLiteral(" affinity:");
stringBuilder.append(affinitystring[affinity]);
stringBuilder.appendLiteral(" stillSelecting:");
stringBuilder.append(boolstring[stillSelecting]);
stringBuilder.append('\n');
InjectedBundle::shared().outputText(stringBuilder.toString());
}
return InjectedBundle::shared().testRunner()->shouldAllowEditing();
}
|
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 |
oxide::BrowserContext* WebContext::GetContext() {
BrowserContext* WebContext::GetContext() {
if (context_.get()) {
return context_.get();
}
DCHECK(construct_props_);
BrowserContext::Params params(
construct_props_->data_path,
construct_props_->cache_path,
construct_props_->max_cache_size_hint,
construct_props_->session_cookie_mode);
params.host_mapping_rules = construct_props_->host_mapping_rules;
context_ = BrowserContext::Create(params);
UserAgentSettings* ua_settings = UserAgentSettings::Get(context_.get());
if (!construct_props_->product.empty()) {
ua_settings->SetProduct(construct_props_->product);
}
if (!construct_props_->user_agent.empty()) {
ua_settings->SetUserAgent(construct_props_->user_agent);
}
if (!construct_props_->accept_langs.empty()) {
ua_settings->SetAcceptLangs(construct_props_->accept_langs);
}
ua_settings->SetUserAgentOverrides(construct_props_->user_agent_overrides);
ua_settings->SetLegacyUserAgentOverrideEnabled(
construct_props_->legacy_user_agent_override_enabled);
context_->SetCookiePolicy(construct_props_->cookie_policy);
context_->SetIsPopupBlockerEnabled(construct_props_->popup_blocker_enabled);
context_->SetDoNotTrack(construct_props_->do_not_track);
MediaCaptureDevicesContext* dc =
MediaCaptureDevicesContext::Get(context_.get());
if (!construct_props_->default_audio_capture_device_id.empty()) {
if (!dc->SetDefaultAudioDeviceId(
construct_props_->default_audio_capture_device_id)) {
client_->DefaultAudioCaptureDeviceChanged();
}
}
if (!construct_props_->default_video_capture_device_id.empty()) {
if (!dc->SetDefaultVideoDeviceId(
construct_props_->default_video_capture_device_id)) {
client_->DefaultVideoCaptureDeviceChanged();
}
}
dc->set_client(this);
DevToolsManager* devtools = DevToolsManager::Get(context_.get());
if (!construct_props_->devtools_ip.empty()) {
devtools->SetAddress(construct_props_->devtools_ip);
}
if (construct_props_->devtools_port != -1) {
devtools->SetPort(construct_props_->devtools_port);
}
devtools->SetEnabled(construct_props_->devtools_enabled);
context_->SetDelegate(delegate_.get());
construct_props_.reset();
UpdateUserScripts();
return context_.get();
}
|
oxide::BrowserContext* WebContext::GetContext() {
if (context_.get()) {
return context_.get();
}
DCHECK(construct_props_);
oxide::BrowserContext::Params params(
construct_props_->data_path,
construct_props_->cache_path,
construct_props_->max_cache_size_hint,
construct_props_->session_cookie_mode);
params.host_mapping_rules = construct_props_->host_mapping_rules;
context_ = oxide::BrowserContext::Create(params);
UserAgentSettings* ua_settings = UserAgentSettings::Get(context_.get());
if (!construct_props_->product.empty()) {
ua_settings->SetProduct(construct_props_->product);
}
if (!construct_props_->user_agent.empty()) {
ua_settings->SetUserAgent(construct_props_->user_agent);
}
if (!construct_props_->accept_langs.empty()) {
ua_settings->SetAcceptLangs(construct_props_->accept_langs);
}
ua_settings->SetUserAgentOverrides(construct_props_->user_agent_overrides);
ua_settings->SetLegacyUserAgentOverrideEnabled(
construct_props_->legacy_user_agent_override_enabled);
context_->SetCookiePolicy(construct_props_->cookie_policy);
context_->SetIsPopupBlockerEnabled(construct_props_->popup_blocker_enabled);
context_->SetDoNotTrack(construct_props_->do_not_track);
MediaCaptureDevicesContext* dc =
MediaCaptureDevicesContext::Get(context_.get());
if (!construct_props_->default_audio_capture_device_id.empty()) {
if (!dc->SetDefaultAudioDeviceId(
construct_props_->default_audio_capture_device_id)) {
client_->DefaultAudioCaptureDeviceChanged();
}
}
if (!construct_props_->default_video_capture_device_id.empty()) {
if (!dc->SetDefaultVideoDeviceId(
construct_props_->default_video_capture_device_id)) {
client_->DefaultVideoCaptureDeviceChanged();
}
}
dc->set_client(this);
DevToolsManager* devtools = DevToolsManager::Get(context_.get());
if (!construct_props_->devtools_ip.empty()) {
devtools->SetAddress(construct_props_->devtools_ip);
}
if (construct_props_->devtools_port != -1) {
devtools->SetPort(construct_props_->devtools_port);
}
devtools->SetEnabled(construct_props_->devtools_enabled);
context_->SetDelegate(delegate_.get());
construct_props_.reset();
UpdateUserScripts();
return context_.get();
}
|
CPP
|
launchpad
| 1 |
CVE-2018-18344
|
https://www.cvedetails.com/cve/CVE-2018-18344/
|
CWE-20
|
https://github.com/chromium/chromium/commit/c71d8045ce0592cf3f4290744ab57b23c1d1b4c6
|
c71d8045ce0592cf3f4290744ab57b23c1d1b4c6
|
[DevTools] Do not allow Page.setDownloadBehavior for extensions
Bug: 866426
Change-Id: I71b672978e1a8ec779ede49da16b21198567d3a4
Reviewed-on: https://chromium-review.googlesource.com/c/1270007
Commit-Queue: Dmitry Gozman <[email protected]>
Reviewed-by: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#598004}
|
void ExtensionDevToolsClientHost::SendDetachedEvent() {
if (!EventRouter::Get(profile_))
return;
std::unique_ptr<base::ListValue> args(
OnDetach::Create(debuggee_, detach_reason_));
auto event =
std::make_unique<Event>(events::DEBUGGER_ON_DETACH, OnDetach::kEventName,
std::move(args), profile_);
EventRouter::Get(profile_)->DispatchEventToExtension(extension_id(),
std::move(event));
}
|
void ExtensionDevToolsClientHost::SendDetachedEvent() {
if (!EventRouter::Get(profile_))
return;
std::unique_ptr<base::ListValue> args(
OnDetach::Create(debuggee_, detach_reason_));
auto event =
std::make_unique<Event>(events::DEBUGGER_ON_DETACH, OnDetach::kEventName,
std::move(args), profile_);
EventRouter::Get(profile_)->DispatchEventToExtension(extension_id(),
std::move(event));
}
|
C
|
Chrome
| 0 |
CVE-2019-17533
|
https://www.cvedetails.com/cve/CVE-2019-17533/
| null |
https://github.com/tbeu/matio/commit/651a8e28099edb5fbb9e4e1d4d3238848f446c9a
|
651a8e28099edb5fbb9e4e1d4d3238848f446c9a
|
Avoid uninitialized memory
As reported by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16856
|
Mat_VarReadDataLinear4(mat_t *mat,matvar_t *matvar,void *data,int start,
int stride,int edge)
{
int err;
size_t nelems = 1;
err = SafeMulDims(matvar, &nelems);
if ( err ) {
Mat_Critical("Integer multiplication overflow");
return err;
}
(void)fseek((FILE*)mat->fp,matvar->internal->datapos,SEEK_SET);
matvar->data_size = Mat_SizeOf(matvar->data_type);
if ( (size_t)stride*(edge-1)+start+1 > nelems ) {
return 1;
}
if ( matvar->isComplex ) {
mat_complex_split_t *complex_data = (mat_complex_split_t*)data;
err = SafeMul(&nelems, nelems, matvar->data_size);
if ( err ) {
Mat_Critical("Integer multiplication overflow");
return err;
}
ReadDataSlab1(mat,complex_data->Re,matvar->class_type,
matvar->data_type,start,stride,edge);
(void)fseek((FILE*)mat->fp,matvar->internal->datapos+nelems,SEEK_SET);
ReadDataSlab1(mat,complex_data->Im,matvar->class_type,
matvar->data_type,start,stride,edge);
} else {
ReadDataSlab1(mat,data,matvar->class_type,matvar->data_type,start,
stride,edge);
}
return err;
}
|
Mat_VarReadDataLinear4(mat_t *mat,matvar_t *matvar,void *data,int start,
int stride,int edge)
{
int err;
size_t nelems = 1;
err = SafeMulDims(matvar, &nelems);
if ( err ) {
Mat_Critical("Integer multiplication overflow");
return err;
}
(void)fseek((FILE*)mat->fp,matvar->internal->datapos,SEEK_SET);
matvar->data_size = Mat_SizeOf(matvar->data_type);
if ( (size_t)stride*(edge-1)+start+1 > nelems ) {
return 1;
}
if ( matvar->isComplex ) {
mat_complex_split_t *complex_data = (mat_complex_split_t*)data;
err = SafeMul(&nelems, nelems, matvar->data_size);
if ( err ) {
Mat_Critical("Integer multiplication overflow");
return err;
}
ReadDataSlab1(mat,complex_data->Re,matvar->class_type,
matvar->data_type,start,stride,edge);
(void)fseek((FILE*)mat->fp,matvar->internal->datapos+nelems,SEEK_SET);
ReadDataSlab1(mat,complex_data->Im,matvar->class_type,
matvar->data_type,start,stride,edge);
} else {
ReadDataSlab1(mat,data,matvar->class_type,matvar->data_type,start,
stride,edge);
}
return err;
}
|
C
|
matio
| 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}
|
void DiskCacheBackendTest::BackendInvalidEntry9(bool eviction) {
const int kSize = 0x3000; // 12 kB.
SetMaxSize(kSize * 10);
InitCache();
std::string first("some key");
std::string second("something else");
disk_cache::Entry* entry;
ASSERT_THAT(CreateEntry(first, &entry), IsOk());
entry->Close();
ASSERT_THAT(CreateEntry(second, &entry), IsOk());
disk_cache::EntryImpl* entry_impl =
static_cast<disk_cache::EntryImpl*>(entry);
entry_impl->entry()->Data()->state = 0xbad;
entry_impl->entry()->Store();
entry->Close();
FlushQueueForTest();
EXPECT_EQ(2, cache_->GetEntryCount());
if (eviction) {
TrimForTest(false);
EXPECT_EQ(1, cache_->GetEntryCount());
TrimForTest(false);
EXPECT_EQ(1, cache_->GetEntryCount());
} else {
std::unique_ptr<TestIterator> iter = CreateIterator();
EXPECT_NE(net::OK, iter->OpenNextEntry(&entry));
ASSERT_THAT(iter->OpenNextEntry(&entry), IsOk());
entry->Close();
EXPECT_NE(net::OK, iter->OpenNextEntry(&entry));
EXPECT_NE(net::OK, OpenEntry(second, &entry));
EXPECT_EQ(2, cache_->GetEntryCount());
}
DisableIntegrityCheck();
}
|
void DiskCacheBackendTest::BackendInvalidEntry9(bool eviction) {
const int kSize = 0x3000; // 12 kB.
SetMaxSize(kSize * 10);
InitCache();
std::string first("some key");
std::string second("something else");
disk_cache::Entry* entry;
ASSERT_THAT(CreateEntry(first, &entry), IsOk());
entry->Close();
ASSERT_THAT(CreateEntry(second, &entry), IsOk());
disk_cache::EntryImpl* entry_impl =
static_cast<disk_cache::EntryImpl*>(entry);
entry_impl->entry()->Data()->state = 0xbad;
entry_impl->entry()->Store();
entry->Close();
FlushQueueForTest();
EXPECT_EQ(2, cache_->GetEntryCount());
if (eviction) {
TrimForTest(false);
EXPECT_EQ(1, cache_->GetEntryCount());
TrimForTest(false);
EXPECT_EQ(1, cache_->GetEntryCount());
} else {
std::unique_ptr<TestIterator> iter = CreateIterator();
EXPECT_NE(net::OK, iter->OpenNextEntry(&entry));
ASSERT_THAT(iter->OpenNextEntry(&entry), IsOk());
entry->Close();
EXPECT_NE(net::OK, iter->OpenNextEntry(&entry));
EXPECT_NE(net::OK, OpenEntry(second, &entry));
EXPECT_EQ(2, cache_->GetEntryCount());
}
DisableIntegrityCheck();
}
|
C
|
Chrome
| 0 |
CVE-2018-18710
|
https://www.cvedetails.com/cve/CVE-2018-18710/
|
CWE-200
|
https://github.com/torvalds/linux/commit/e4f3aa2e1e67bb48dfbaaf1cad59013d5a5bc276
|
e4f3aa2e1e67bb48dfbaaf1cad59013d5a5bc276
|
cdrom: fix improper type cast, which can leat to information leak.
There is another cast from unsigned long to int which causes
a bounds check to fail with specially crafted input. The value is
then used as an index in the slot array in cdrom_slot_status().
This issue is similar to CVE-2018-16658 and CVE-2018-10940.
Signed-off-by: Young_X <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
|
static void cdrom_update_events(struct cdrom_device_info *cdi,
unsigned int clearing)
{
unsigned int events;
events = cdi->ops->check_events(cdi, clearing, CDSL_CURRENT);
cdi->vfs_events |= events;
cdi->ioctl_events |= events;
}
|
static void cdrom_update_events(struct cdrom_device_info *cdi,
unsigned int clearing)
{
unsigned int events;
events = cdi->ops->check_events(cdi, clearing, CDSL_CURRENT);
cdi->vfs_events |= events;
cdi->ioctl_events |= events;
}
|
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.