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-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 |
DCTStream::DCTStream(Stream *strA, int colorXformA):
FilterStream(strA) {
int i, j;
colorXform = colorXformA;
progressive = interleaved = gFalse;
width = height = 0;
mcuWidth = mcuHeight = 0;
numComps = 0;
comp = 0;
x = y = dy = 0;
for (i = 0; i < 4; ++i) {
for (j = 0; j < 32; ++j) {
rowBuf[i][j] = NULL;
}
frameBuf[i] = NULL;
}
if (!dctClipInit) {
for (i = -256; i < 0; ++i)
dctClip[dctClipOffset + i] = 0;
for (i = 0; i < 256; ++i)
dctClip[dctClipOffset + i] = i;
for (i = 256; i < 512; ++i)
dctClip[dctClipOffset + i] = 255;
dctClipInit = 1;
}
}
|
DCTStream::DCTStream(Stream *strA, int colorXformA):
FilterStream(strA) {
int i, j;
colorXform = colorXformA;
progressive = interleaved = gFalse;
width = height = 0;
mcuWidth = mcuHeight = 0;
numComps = 0;
comp = 0;
x = y = dy = 0;
for (i = 0; i < 4; ++i) {
for (j = 0; j < 32; ++j) {
rowBuf[i][j] = NULL;
}
frameBuf[i] = NULL;
}
if (!dctClipInit) {
for (i = -256; i < 0; ++i)
dctClip[dctClipOffset + i] = 0;
for (i = 0; i < 256; ++i)
dctClip[dctClipOffset + i] = i;
for (i = 256; i < 512; ++i)
dctClip[dctClipOffset + i] = 255;
dctClipInit = 1;
}
}
|
CPP
|
poppler
| 0 |
CVE-2013-7456
|
https://www.cvedetails.com/cve/CVE-2013-7456/
|
CWE-125
|
https://github.com/libgd/libgd/commit/4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a
|
4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a
|
Fixed memory overrun bug in gdImageScaleTwoPass
_gdContributionsCalc would compute a window size and then adjust
the left and right positions of the window to make a window within
that size. However, it was storing the values in the struct *before*
it made the adjustment. This change fixes that.
|
gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, const int bgColor)
{
float _angle = ((float) (-degrees / 180.0f) * (float)M_PI);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int)(src_h * sin(_angle))) + 0.5f);
const unsigned int new_height = (unsigned int)(abs((int)(src_w * sin(_angle))) + abs((int)(src_h * cos(_angle))) + 0.5f);
const gdFixed f_0_5 = gd_ftofx(0.5f);
const gdFixed f_H = gd_itofx(src_h/2);
const gdFixed f_W = gd_itofx(src_w/2);
const gdFixed f_cos = gd_ftofx(cos(-_angle));
const gdFixed f_sin = gd_ftofx(sin(-_angle));
unsigned int dst_offset_x;
unsigned int dst_offset_y = 0;
unsigned int i;
gdImagePtr dst;
/* impact perf a bit, but not that much. Implementation for palette
images can be done at a later point.
*/
if (src->trueColor == 0) {
gdImagePaletteToTrueColor(src);
}
dst = gdImageCreateTrueColor(new_width, new_height);
if (!dst) {
return NULL;
}
dst->saveAlphaFlag = 1;
for (i = 0; i < new_height; i++) {
unsigned int j;
dst_offset_x = 0;
for (j = 0; j < new_width; j++) {
gdFixed f_i = gd_itofx((int)i - (int)new_height / 2);
gdFixed f_j = gd_itofx((int)j - (int)new_width / 2);
gdFixed f_m = gd_mulfx(f_j,f_sin) + gd_mulfx(f_i,f_cos) + f_0_5 + f_H;
gdFixed f_n = gd_mulfx(f_j,f_cos) - gd_mulfx(f_i,f_sin) + f_0_5 + f_W;
long m = gd_fxtoi(f_m);
long n = gd_fxtoi(f_n);
if ((m > 0) && (m < src_h-1) && (n > 0) && (n < src_w-1)) {
if (dst_offset_y < new_height) {
dst->tpixels[dst_offset_y][dst_offset_x++] = src->tpixels[m][n];
}
} else {
if (dst_offset_y < new_height) {
dst->tpixels[dst_offset_y][dst_offset_x++] = bgColor;
}
}
}
dst_offset_y++;
}
return dst;
}
|
gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, const int bgColor)
{
float _angle = ((float) (-degrees / 180.0f) * (float)M_PI);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int)(src_h * sin(_angle))) + 0.5f);
const unsigned int new_height = (unsigned int)(abs((int)(src_w * sin(_angle))) + abs((int)(src_h * cos(_angle))) + 0.5f);
const gdFixed f_0_5 = gd_ftofx(0.5f);
const gdFixed f_H = gd_itofx(src_h/2);
const gdFixed f_W = gd_itofx(src_w/2);
const gdFixed f_cos = gd_ftofx(cos(-_angle));
const gdFixed f_sin = gd_ftofx(sin(-_angle));
unsigned int dst_offset_x;
unsigned int dst_offset_y = 0;
unsigned int i;
gdImagePtr dst;
/* impact perf a bit, but not that much. Implementation for palette
images can be done at a later point.
*/
if (src->trueColor == 0) {
gdImagePaletteToTrueColor(src);
}
dst = gdImageCreateTrueColor(new_width, new_height);
if (!dst) {
return NULL;
}
dst->saveAlphaFlag = 1;
for (i = 0; i < new_height; i++) {
unsigned int j;
dst_offset_x = 0;
for (j = 0; j < new_width; j++) {
gdFixed f_i = gd_itofx((int)i - (int)new_height / 2);
gdFixed f_j = gd_itofx((int)j - (int)new_width / 2);
gdFixed f_m = gd_mulfx(f_j,f_sin) + gd_mulfx(f_i,f_cos) + f_0_5 + f_H;
gdFixed f_n = gd_mulfx(f_j,f_cos) - gd_mulfx(f_i,f_sin) + f_0_5 + f_W;
long m = gd_fxtoi(f_m);
long n = gd_fxtoi(f_n);
if ((m > 0) && (m < src_h-1) && (n > 0) && (n < src_w-1)) {
if (dst_offset_y < new_height) {
dst->tpixels[dst_offset_y][dst_offset_x++] = src->tpixels[m][n];
}
} else {
if (dst_offset_y < new_height) {
dst->tpixels[dst_offset_y][dst_offset_x++] = bgColor;
}
}
}
dst_offset_y++;
}
return dst;
}
|
C
|
libgd
| 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 PictureLayer::SetNearestNeighbor(bool nearest_neighbor) {
if (nearest_neighbor_ == nearest_neighbor)
return;
nearest_neighbor_ = nearest_neighbor;
SetNeedsCommit();
}
|
void PictureLayer::SetNearestNeighbor(bool nearest_neighbor) {
if (nearest_neighbor_ == nearest_neighbor)
return;
nearest_neighbor_ = nearest_neighbor;
SetNeedsCommit();
}
|
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]>
|
void console_unlock(void)
{
unsigned long flags;
unsigned _con_start, _log_end;
unsigned wake_klogd = 0, retry = 0;
if (console_suspended) {
up(&console_sem);
return;
}
console_may_schedule = 0;
again:
for ( ; ; ) {
raw_spin_lock_irqsave(&logbuf_lock, flags);
wake_klogd |= log_start - log_end;
if (con_start == log_end)
break; /* Nothing to print */
_con_start = con_start;
_log_end = log_end;
con_start = log_end; /* Flush */
raw_spin_unlock(&logbuf_lock);
stop_critical_timings(); /* don't trace print latency */
call_console_drivers(_con_start, _log_end);
start_critical_timings();
local_irq_restore(flags);
}
console_locked = 0;
/* Release the exclusive_console once it is used */
if (unlikely(exclusive_console))
exclusive_console = NULL;
raw_spin_unlock(&logbuf_lock);
up(&console_sem);
/*
* Someone could have filled up the buffer again, so re-check if there's
* something to flush. In case we cannot trylock the console_sem again,
* there's a new owner and the console_unlock() from them will do the
* flush, no worries.
*/
raw_spin_lock(&logbuf_lock);
if (con_start != log_end)
retry = 1;
raw_spin_unlock_irqrestore(&logbuf_lock, flags);
if (retry && console_trylock())
goto again;
if (wake_klogd)
wake_up_klogd();
}
|
void console_unlock(void)
{
unsigned long flags;
unsigned _con_start, _log_end;
unsigned wake_klogd = 0, retry = 0;
if (console_suspended) {
up(&console_sem);
return;
}
console_may_schedule = 0;
again:
for ( ; ; ) {
raw_spin_lock_irqsave(&logbuf_lock, flags);
wake_klogd |= log_start - log_end;
if (con_start == log_end)
break; /* Nothing to print */
_con_start = con_start;
_log_end = log_end;
con_start = log_end; /* Flush */
raw_spin_unlock(&logbuf_lock);
stop_critical_timings(); /* don't trace print latency */
call_console_drivers(_con_start, _log_end);
start_critical_timings();
local_irq_restore(flags);
}
console_locked = 0;
/* Release the exclusive_console once it is used */
if (unlikely(exclusive_console))
exclusive_console = NULL;
raw_spin_unlock(&logbuf_lock);
up(&console_sem);
/*
* Someone could have filled up the buffer again, so re-check if there's
* something to flush. In case we cannot trylock the console_sem again,
* there's a new owner and the console_unlock() from them will do the
* flush, no worries.
*/
raw_spin_lock(&logbuf_lock);
if (con_start != log_end)
retry = 1;
raw_spin_unlock_irqrestore(&logbuf_lock, flags);
if (retry && console_trylock())
goto again;
if (wake_klogd)
wake_up_klogd();
}
|
C
|
linux
| 0 |
CVE-2016-5217
|
https://www.cvedetails.com/cve/CVE-2016-5217/
|
CWE-284
|
https://github.com/chromium/chromium/commit/0d68cbd77addd38909101f76847deea56de00524
|
0d68cbd77addd38909101f76847deea56de00524
|
Fix PIP window being blank after minimize/show
DesktopWindowTreeHostX11::SetVisible only made the call into
OnNativeWidgetVisibilityChanged when transitioning from shown
to minimized and not vice versa. This is because this change
https://chromium-review.googlesource.com/c/chromium/src/+/1437263
considered IsVisible to be true when minimized, which made
IsVisible always true in this case. This caused layers to be hidden
but never shown again.
This is a reland of:
https://chromium-review.googlesource.com/c/chromium/src/+/1580103
Bug: 949199
Change-Id: I2151cd09e537d8ce8781897f43a3b8e9cec75996
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1584617
Reviewed-by: Scott Violet <[email protected]>
Commit-Queue: enne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#654280}
|
void DesktopWindowTreeHostX11::RestartDelayedResizeTask() {
delayed_resize_task_.Reset(base::BindOnce(
&DesktopWindowTreeHostX11::DelayedResize,
close_widget_factory_.GetWeakPtr(), bounds_in_pixels_.size()));
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, delayed_resize_task_.callback());
}
|
void DesktopWindowTreeHostX11::RestartDelayedResizeTask() {
delayed_resize_task_.Reset(base::BindOnce(
&DesktopWindowTreeHostX11::DelayedResize,
close_widget_factory_.GetWeakPtr(), bounds_in_pixels_.size()));
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, delayed_resize_task_.callback());
}
|
C
|
Chrome
| 0 |
CVE-2017-9059
|
https://www.cvedetails.com/cve/CVE-2017-9059/
|
CWE-404
|
https://github.com/torvalds/linux/commit/c70422f760c120480fee4de6c38804c72aa26bc1
|
c70422f760c120480fee4de6c38804c72aa26bc1
|
Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"Another RDMA update from Chuck Lever, and a bunch of miscellaneous
bugfixes"
* tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux: (26 commits)
nfsd: Fix up the "supattr_exclcreat" attributes
nfsd: encoders mustn't use unitialized values in error cases
nfsd: fix undefined behavior in nfsd4_layout_verify
lockd: fix lockd shutdown race
NFSv4: Fix callback server shutdown
SUNRPC: Refactor svc_set_num_threads()
NFSv4.x/callback: Create the callback service through svc_create_pooled
lockd: remove redundant check on block
svcrdma: Clean out old XDR encoders
svcrdma: Remove the req_map cache
svcrdma: Remove unused RDMA Write completion handler
svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt
svcrdma: Clean up RPC-over-RDMA backchannel reply processing
svcrdma: Report Write/Reply chunk overruns
svcrdma: Clean up RDMA_ERROR path
svcrdma: Use rdma_rw API in RPC reply path
svcrdma: Introduce local rdma_rw API helpers
svcrdma: Clean up svc_rdma_get_inv_rkey()
svcrdma: Add helper to save pages under I/O
svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT
...
|
nfsd4_encode_bitmap(struct xdr_stream *xdr, u32 bmval0, u32 bmval1, u32 bmval2)
{
__be32 *p;
if (bmval2) {
p = xdr_reserve_space(xdr, 16);
if (!p)
goto out_resource;
*p++ = cpu_to_be32(3);
*p++ = cpu_to_be32(bmval0);
*p++ = cpu_to_be32(bmval1);
*p++ = cpu_to_be32(bmval2);
} else if (bmval1) {
p = xdr_reserve_space(xdr, 12);
if (!p)
goto out_resource;
*p++ = cpu_to_be32(2);
*p++ = cpu_to_be32(bmval0);
*p++ = cpu_to_be32(bmval1);
} else {
p = xdr_reserve_space(xdr, 8);
if (!p)
goto out_resource;
*p++ = cpu_to_be32(1);
*p++ = cpu_to_be32(bmval0);
}
return 0;
out_resource:
return nfserr_resource;
}
|
nfsd4_encode_bitmap(struct xdr_stream *xdr, u32 bmval0, u32 bmval1, u32 bmval2)
{
__be32 *p;
if (bmval2) {
p = xdr_reserve_space(xdr, 16);
if (!p)
goto out_resource;
*p++ = cpu_to_be32(3);
*p++ = cpu_to_be32(bmval0);
*p++ = cpu_to_be32(bmval1);
*p++ = cpu_to_be32(bmval2);
} else if (bmval1) {
p = xdr_reserve_space(xdr, 12);
if (!p)
goto out_resource;
*p++ = cpu_to_be32(2);
*p++ = cpu_to_be32(bmval0);
*p++ = cpu_to_be32(bmval1);
} else {
p = xdr_reserve_space(xdr, 8);
if (!p)
goto out_resource;
*p++ = cpu_to_be32(1);
*p++ = cpu_to_be32(bmval0);
}
return 0;
out_resource:
return nfserr_resource;
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/8353baf8d1504dbdd4ad7584ff2466de657521cd
|
8353baf8d1504dbdd4ad7584ff2466de657521cd
|
Remove WebFrame::canHaveSecureChild
To simplify the public API, ServiceWorkerNetworkProvider can do the
parent walk itself.
Follow-up to https://crrev.com/ad1850962644e19.
BUG=607543
Review-Url: https://codereview.chromium.org/2082493002
Cr-Commit-Position: refs/heads/master@{#400896}
|
void Document::setupFontBuilder(ComputedStyle& documentStyle)
{
FontBuilder fontBuilder(*this);
CSSFontSelector* selector = styleEngine().fontSelector();
fontBuilder.createFontForDocument(selector, documentStyle);
}
|
void Document::setupFontBuilder(ComputedStyle& documentStyle)
{
FontBuilder fontBuilder(*this);
CSSFontSelector* selector = styleEngine().fontSelector();
fontBuilder.createFontForDocument(selector, documentStyle);
}
|
C
|
Chrome
| 0 |
CVE-2014-1743
|
https://www.cvedetails.com/cve/CVE-2014-1743/
|
CWE-399
|
https://github.com/chromium/chromium/commit/6d9425ec7badda912555d46ea7abcfab81fdd9b9
|
6d9425ec7badda912555d46ea7abcfab81fdd9b9
|
sync compositor: pass simple gfx types by const ref
See bug for reasoning
BUG=159273
Review URL: https://codereview.chromium.org/1417893006
Cr-Commit-Position: refs/heads/master@{#356653}
|
void AwContents::UpdateScrollState(gfx::Vector2d max_scroll_offset,
void AwContents::UpdateScrollState(const gfx::Vector2d& max_scroll_offset,
const gfx::SizeF& contents_size_dip,
float page_scale_factor,
float min_page_scale_factor,
float max_page_scale_factor) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (obj.is_null())
return;
Java_AwContents_updateScrollState(env,
obj.obj(),
max_scroll_offset.x(),
max_scroll_offset.y(),
contents_size_dip.width(),
contents_size_dip.height(),
page_scale_factor,
min_page_scale_factor,
max_page_scale_factor);
}
|
void AwContents::UpdateScrollState(gfx::Vector2d max_scroll_offset,
gfx::SizeF contents_size_dip,
float page_scale_factor,
float min_page_scale_factor,
float max_page_scale_factor) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (obj.is_null())
return;
Java_AwContents_updateScrollState(env,
obj.obj(),
max_scroll_offset.x(),
max_scroll_offset.y(),
contents_size_dip.width(),
contents_size_dip.height(),
page_scale_factor,
min_page_scale_factor,
max_page_scale_factor);
}
|
C
|
Chrome
| 1 |
CVE-2012-2875
|
https://www.cvedetails.com/cve/CVE-2012-2875/
| null |
https://github.com/chromium/chromium/commit/f81fcab3b31dfaff3473e8eb94c6531677116242
|
f81fcab3b31dfaff3473e8eb94c6531677116242
|
[BlackBerry] Prevent text selection inside Colour and Date/Time input fields
https://bugs.webkit.org/show_bug.cgi?id=111733
Reviewed by Rob Buis.
PR 305194.
Prevent selection for popup input fields as they are buttons.
Informally Reviewed Gen Mak.
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
git-svn-id: svn://svn.chromium.org/blink/trunk@145121 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void EditorClientBlackBerry::getGuessesForWord(const WTF::String&, WTF::Vector<WTF::String, 0u>&)
{
notImplemented();
}
|
void EditorClientBlackBerry::getGuessesForWord(const WTF::String&, WTF::Vector<WTF::String, 0u>&)
{
notImplemented();
}
|
C
|
Chrome
| 0 |
CVE-2017-5120
|
https://www.cvedetails.com/cve/CVE-2017-5120/
| null |
https://github.com/chromium/chromium/commit/b7277af490d28ac7f802c015bb0ff31395768556
|
b7277af490d28ac7f802c015bb0ff31395768556
|
bindings: Support "attribute FrozenArray<T>?"
Adds a quick hack to support a case of "attribute FrozenArray<T>?".
Bug: 1028047
Change-Id: Ib3cecc4beb6bcc0fb0dbc667aca595454cc90c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933866
Reviewed-by: Hitoshi Yoshida <[email protected]>
Commit-Queue: Yuki Shiino <[email protected]>
Cr-Commit-Position: refs/heads/master@{#718676}
|
static void LongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
V8SetReturnValue(info, static_cast<double>(impl->longLongMethod()));
}
|
static void LongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
V8SetReturnValue(info, static_cast<double>(impl->longLongMethod()));
}
|
C
|
Chrome
| 0 |
CVE-2017-5118
|
https://www.cvedetails.com/cve/CVE-2017-5118/
|
CWE-732
|
https://github.com/chromium/chromium/commit/0ab2412a104d2f235d7b9fe19d30ef605a410832
|
0ab2412a104d2f235d7b9fe19d30ef605a410832
|
Inherit CSP when we inherit the security origin
This prevents attacks that use main window navigation to get out of the
existing csp constraints such as the related bug
Bug: 747847
Change-Id: I1e57b50da17f65d38088205b0a3c7c49ef2ae4d8
Reviewed-on: https://chromium-review.googlesource.com/592027
Reviewed-by: Mike West <[email protected]>
Commit-Queue: Andy Paicu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#492333}
|
void WebLocalFrameImpl::SelectRange(const WebPoint& base_in_viewport,
const WebPoint& extent_in_viewport) {
MoveRangeSelection(base_in_viewport, extent_in_viewport);
}
|
void WebLocalFrameImpl::SelectRange(const WebPoint& base_in_viewport,
const WebPoint& extent_in_viewport) {
MoveRangeSelection(base_in_viewport, extent_in_viewport);
}
|
C
|
Chrome
| 0 |
CVE-2015-2806
|
https://www.cvedetails.com/cve/CVE-2015-2806/
|
CWE-119
|
https://git.savannah.gnu.org/gitweb/?p=libtasn1.git;a=commit;h=4d4f992826a4962790ecd0cce6fbba4a415ce149
|
4d4f992826a4962790ecd0cce6fbba4a415ce149
| null |
asn1_find_node (asn1_node pointer, const char *name)
{
asn1_node p;
char *n_end, n[ASN1_MAX_NAME_SIZE + 1];
const char *n_start;
unsigned int nsize;
unsigned int nhash;
if (pointer == NULL)
return NULL;
if (name == NULL)
return NULL;
p = pointer;
n_start = name;
if (name[0] == '?' && name[1] == 'C' && p->name[0] == '?')
{ /* ?CURRENT */
n_start = strchr(n_start, '.');
if (n_start)
n_start++;
}
else if (p->name[0] != 0)
{ /* has *pointer got a name ? */
n_end = strchr (n_start, '.'); /* search the first dot */
if (n_end)
{
nsize = n_end - n_start;
memcpy (n, n_start, nsize);
n[nsize] = 0;
n_start = n_end;
n_start++;
nhash = hash_pjw_bare (n, nsize);
}
else
{
nsize = _asn1_str_cpy (n, sizeof (n), n_start);
nhash = hash_pjw_bare (n, nsize);
n_start = NULL;
}
while (p)
{
if (nhash == p->name_hash && (!strcmp (p->name, n)))
break;
else
p = p->right;
} /* while */
if (p == NULL)
return NULL;
}
else
{ /* *pointer doesn't have a name */
if (n_start[0] == 0)
return p;
}
while (n_start)
{ /* Has the end of NAME been reached? */
n_end = strchr (n_start, '.'); /* search the next dot */
if (n_end)
{
nsize = n_end - n_start;
memcpy (n, n_start, nsize);
n[nsize] = 0;
n_start = n_end;
n_start++;
nhash = hash_pjw_bare (n, nsize);
}
else
{
nsize = _asn1_str_cpy (n, sizeof (n), n_start);
nhash = hash_pjw_bare (n, nsize);
n_start = NULL;
}
if (p->down == NULL)
return NULL;
p = p->down;
if (p == NULL)
return NULL;
/* The identifier "?LAST" indicates the last element
in the right chain. */
if (n[0] == '?' && n[1] == 'L') /* ?LAST */
{
while (p->right)
p = p->right;
}
else
{ /* no "?LAST" */
while (p)
{
if (p->name_hash == nhash && !strcmp (p->name, n))
break;
else
p = p->right;
}
}
if (p == NULL)
return NULL;
} /* while */
return p;
}
|
asn1_find_node (asn1_node pointer, const char *name)
{
asn1_node p;
char *n_end, n[ASN1_MAX_NAME_SIZE + 1];
const char *n_start;
unsigned int nsize;
unsigned int nhash;
if (pointer == NULL)
return NULL;
if (name == NULL)
return NULL;
p = pointer;
n_start = name;
if (name[0] == '?' && name[1] == 'C' && p->name[0] == '?')
{ /* ?CURRENT */
n_start = strchr(n_start, '.');
if (n_start)
n_start++;
}
else if (p->name[0] != 0)
{ /* has *pointer got a name ? */
n_end = strchr (n_start, '.'); /* search the first dot */
if (n_end)
{
nsize = n_end - n_start;
memcpy (n, n_start, nsize);
n[nsize] = 0;
n_start = n_end;
n_start++;
nhash = hash_pjw_bare (n, nsize);
}
else
{
nsize = _asn1_str_cpy (n, sizeof (n), n_start);
nhash = hash_pjw_bare (n, nsize);
n_start = NULL;
}
while (p)
{
if (nhash == p->name_hash && (!strcmp (p->name, n)))
break;
else
p = p->right;
} /* while */
if (p == NULL)
return NULL;
}
else
{ /* *pointer doesn't have a name */
if (n_start[0] == 0)
return p;
}
while (n_start)
{ /* Has the end of NAME been reached? */
n_end = strchr (n_start, '.'); /* search the next dot */
if (n_end)
{
nsize = n_end - n_start;
memcpy (n, n_start, nsize);
n[nsize] = 0;
n_start = n_end;
n_start++;
nhash = hash_pjw_bare (n, nsize);
}
else
{
nsize = _asn1_str_cpy (n, sizeof (n), n_start);
nhash = hash_pjw_bare (n, nsize);
n_start = NULL;
}
if (p->down == NULL)
return NULL;
p = p->down;
if (p == NULL)
return NULL;
/* The identifier "?LAST" indicates the last element
in the right chain. */
if (n[0] == '?' && n[1] == 'L') /* ?LAST */
{
while (p->right)
p = p->right;
}
else
{ /* no "?LAST" */
while (p)
{
if (p->name_hash == nhash && !strcmp (p->name, n))
break;
else
p = p->right;
}
}
if (p == NULL)
return NULL;
} /* while */
return p;
}
|
C
|
savannah
| 0 |
CVE-2017-12187
|
https://www.cvedetails.com/cve/CVE-2017-12187/
|
CWE-20
|
https://cgit.freedesktop.org/xorg/xserver/commit/?id=cad5a1050b7184d828aef9c1dd151c3ab649d37e
|
cad5a1050b7184d828aef9c1dd151c3ab649d37e
| null |
SProcRenderReferenceGlyphSet(ClientPtr client)
{
REQUEST(xRenderReferenceGlyphSetReq);
REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq);
swaps(&stuff->length);
swapl(&stuff->gsid);
swapl(&stuff->existing);
return (*ProcRenderVector[stuff->renderReqType]) (client);
}
|
SProcRenderReferenceGlyphSet(ClientPtr client)
{
REQUEST(xRenderReferenceGlyphSetReq);
REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq);
swaps(&stuff->length);
swapl(&stuff->gsid);
swapl(&stuff->existing);
return (*ProcRenderVector[stuff->renderReqType]) (client);
}
|
C
|
xserver
| 0 |
CVE-2012-2890
|
https://www.cvedetails.com/cve/CVE-2012-2890/
|
CWE-399
|
https://github.com/chromium/chromium/commit/a6f7726de20450074a01493e4e85409ce3f2595a
|
a6f7726de20450074a01493e4e85409ce3f2595a
|
Unreviewed, rolling out r147402.
http://trac.webkit.org/changeset/147402
https://bugs.webkit.org/show_bug.cgi?id=112903
Source/WebCore:
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
LayoutTests:
* http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html:
* http/tests/security/XFrameOptions/x-frame-options-deny.html:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny.html:
* http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:
git-svn-id: svn://svn.chromium.org/blink/trunk@147450 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void Document::buildAccessKeyMap(TreeScope* scope)
{
ASSERT(scope);
Node* rootNode = scope->rootNode();
for (Element* element = ElementTraversal::firstWithin(rootNode); element; element = ElementTraversal::next(element, rootNode)) {
const AtomicString& accessKey = element->getAttribute(accesskeyAttr);
if (!accessKey.isEmpty())
m_elementsByAccessKey.set(accessKey.impl(), element);
for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root->olderShadowRoot())
buildAccessKeyMap(root);
}
}
|
void Document::buildAccessKeyMap(TreeScope* scope)
{
ASSERT(scope);
Node* rootNode = scope->rootNode();
for (Element* element = ElementTraversal::firstWithin(rootNode); element; element = ElementTraversal::next(element, rootNode)) {
const AtomicString& accessKey = element->getAttribute(accesskeyAttr);
if (!accessKey.isEmpty())
m_elementsByAccessKey.set(accessKey.impl(), element);
for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root->olderShadowRoot())
buildAccessKeyMap(root);
}
}
|
C
|
Chrome
| 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 |
GBool BufStream::isBinary(GBool last) {
return str->isBinary(gTrue);
}
|
GBool BufStream::isBinary(GBool last) {
return str->isBinary(gTrue);
}
|
CPP
|
poppler
| 0 |
CVE-2012-1571
|
https://www.cvedetails.com/cve/CVE-2012-1571/
|
CWE-119
|
https://github.com/glensc/file/commit/1aec04dbf8a24b8a6ba64c4f74efa0628e36db0b
|
1aec04dbf8a24b8a6ba64c4f74efa0628e36db0b
|
Fix bounds checks again.
|
cdf_read_sector_chain(const cdf_info_t *info, const cdf_header_t *h,
const cdf_sat_t *sat, const cdf_sat_t *ssat, const cdf_stream_t *sst,
cdf_secid_t sid, size_t len, cdf_stream_t *scn)
{
if (len < h->h_min_size_standard_stream && sst->sst_tab != NULL)
return cdf_read_short_sector_chain(h, ssat, sst, sid, len,
scn);
else
return cdf_read_long_sector_chain(info, h, sat, sid, len, scn);
}
|
cdf_read_sector_chain(const cdf_info_t *info, const cdf_header_t *h,
const cdf_sat_t *sat, const cdf_sat_t *ssat, const cdf_stream_t *sst,
cdf_secid_t sid, size_t len, cdf_stream_t *scn)
{
if (len < h->h_min_size_standard_stream && sst->sst_tab != NULL)
return cdf_read_short_sector_chain(h, ssat, sst, sid, len,
scn);
else
return cdf_read_long_sector_chain(info, h, sat, sid, len, scn);
}
|
C
|
file
| 0 |
CVE-2012-6540
|
https://www.cvedetails.com/cve/CVE-2012-6540/
|
CWE-200
|
https://github.com/torvalds/linux/commit/2d8a041b7bfe1097af21441cb77d6af95f4f4680
|
2d8a041b7bfe1097af21441cb77d6af95f4f4680
|
ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing the structure to
__ip_vs_get_timeouts() to avoid the info leak.
Signed-off-by: Mathias Krause <[email protected]>
Cc: Wensong Zhang <[email protected]>
Cc: Simon Horman <[email protected]>
Cc: Julian Anastasov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static struct ip_vs_service *ip_vs_genl_find_service(struct net *net,
struct nlattr *nla)
{
struct ip_vs_service_user_kern usvc;
struct ip_vs_service *svc;
int ret;
ret = ip_vs_genl_parse_service(net, &usvc, nla, 0, &svc);
return ret ? ERR_PTR(ret) : svc;
}
|
static struct ip_vs_service *ip_vs_genl_find_service(struct net *net,
struct nlattr *nla)
{
struct ip_vs_service_user_kern usvc;
struct ip_vs_service *svc;
int ret;
ret = ip_vs_genl_parse_service(net, &usvc, nla, 0, &svc);
return ret ? ERR_PTR(ret) : svc;
}
|
C
|
linux
| 0 |
CVE-2014-9428
|
https://www.cvedetails.com/cve/CVE-2014-9428/
|
CWE-399
|
https://github.com/torvalds/linux/commit/5b6698b0e4a37053de35cc24ee695b98a7eb712b
|
5b6698b0e4a37053de35cc24ee695b98a7eb712b
|
batman-adv: Calculate extra tail size based on queued fragments
The fragmentation code was replaced in 610bfc6bc99bc83680d190ebc69359a05fc7f605
("batman-adv: Receive fragmented packets and merge"). The new code provided a
mostly unused parameter skb for the merging function. It is used inside the
function to calculate the additionally needed skb tailroom. But instead of
increasing its own tailroom, it is only increasing the tailroom of the first
queued skb. This is not correct in some situations because the first queued
entry can be a different one than the parameter.
An observed problem was:
1. packet with size 104, total_size 1464, fragno 1 was received
- packet is queued
2. packet with size 1400, total_size 1464, fragno 0 was received
- packet is queued at the end of the list
3. enough data was received and can be given to the merge function
(1464 == (1400 - 20) + (104 - 20))
- merge functions gets 1400 byte large packet as skb argument
4. merge function gets first entry in queue (104 byte)
- stored as skb_out
5. merge function calculates the required extra tail as total_size - skb->len
- pskb_expand_head tail of skb_out with 64 bytes
6. merge function tries to squeeze the extra 1380 bytes from the second queued
skb (1400 byte aka skb parameter) in the 64 extra tail bytes of skb_out
Instead calculate the extra required tail bytes for skb_out also using skb_out
instead of using the parameter skb. The skb parameter is only used to get the
total_size from the last received packet. This is also the total_size used to
decide that all fragments were received.
Reported-by: Philipp Psurek <[email protected]>
Signed-off-by: Sven Eckelmann <[email protected]>
Acked-by: Martin Hundebøll <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
batadv_frag_merge_packets(struct hlist_head *chain, struct sk_buff *skb)
{
struct batadv_frag_packet *packet;
struct batadv_frag_list_entry *entry;
struct sk_buff *skb_out = NULL;
int size, hdr_size = sizeof(struct batadv_frag_packet);
/* Make sure incoming skb has non-bogus data. */
packet = (struct batadv_frag_packet *)skb->data;
size = ntohs(packet->total_size);
if (size > batadv_frag_size_limit())
goto free;
/* Remove first entry, as this is the destination for the rest of the
* fragments.
*/
entry = hlist_entry(chain->first, struct batadv_frag_list_entry, list);
hlist_del(&entry->list);
skb_out = entry->skb;
kfree(entry);
/* Make room for the rest of the fragments. */
if (pskb_expand_head(skb_out, 0, size - skb_out->len, GFP_ATOMIC) < 0) {
kfree_skb(skb_out);
skb_out = NULL;
goto free;
}
/* Move the existing MAC header to just before the payload. (Override
* the fragment header.)
*/
skb_pull_rcsum(skb_out, hdr_size);
memmove(skb_out->data - ETH_HLEN, skb_mac_header(skb_out), ETH_HLEN);
skb_set_mac_header(skb_out, -ETH_HLEN);
skb_reset_network_header(skb_out);
skb_reset_transport_header(skb_out);
/* Copy the payload of the each fragment into the last skb */
hlist_for_each_entry(entry, chain, list) {
size = entry->skb->len - hdr_size;
memcpy(skb_put(skb_out, size), entry->skb->data + hdr_size,
size);
}
free:
/* Locking is not needed, because 'chain' is not part of any orig. */
batadv_frag_clear_chain(chain);
return skb_out;
}
|
batadv_frag_merge_packets(struct hlist_head *chain, struct sk_buff *skb)
{
struct batadv_frag_packet *packet;
struct batadv_frag_list_entry *entry;
struct sk_buff *skb_out = NULL;
int size, hdr_size = sizeof(struct batadv_frag_packet);
/* Make sure incoming skb has non-bogus data. */
packet = (struct batadv_frag_packet *)skb->data;
size = ntohs(packet->total_size);
if (size > batadv_frag_size_limit())
goto free;
/* Remove first entry, as this is the destination for the rest of the
* fragments.
*/
entry = hlist_entry(chain->first, struct batadv_frag_list_entry, list);
hlist_del(&entry->list);
skb_out = entry->skb;
kfree(entry);
/* Make room for the rest of the fragments. */
if (pskb_expand_head(skb_out, 0, size - skb->len, GFP_ATOMIC) < 0) {
kfree_skb(skb_out);
skb_out = NULL;
goto free;
}
/* Move the existing MAC header to just before the payload. (Override
* the fragment header.)
*/
skb_pull_rcsum(skb_out, hdr_size);
memmove(skb_out->data - ETH_HLEN, skb_mac_header(skb_out), ETH_HLEN);
skb_set_mac_header(skb_out, -ETH_HLEN);
skb_reset_network_header(skb_out);
skb_reset_transport_header(skb_out);
/* Copy the payload of the each fragment into the last skb */
hlist_for_each_entry(entry, chain, list) {
size = entry->skb->len - hdr_size;
memcpy(skb_put(skb_out, size), entry->skb->data + hdr_size,
size);
}
free:
/* Locking is not needed, because 'chain' is not part of any orig. */
batadv_frag_clear_chain(chain);
return skb_out;
}
|
C
|
linux
| 1 |
CVE-2019-13106
|
https://www.cvedetails.com/cve/CVE-2019-13106/
|
CWE-787
|
https://github.com/u-boot/u-boot/commits/master
|
master
|
Merge branch '2020-01-22-master-imports'
- Re-add U8500 platform support
- Add bcm968360bg support
- Assorted Keymile fixes
- Other assorted bugfixes
|
static struct part_driver *part_driver_lookup_type(struct blk_desc *dev_desc)
{
struct part_driver *drv =
ll_entry_start(struct part_driver, part_driver);
const int n_ents = ll_entry_count(struct part_driver, part_driver);
struct part_driver *entry;
if (dev_desc->part_type == PART_TYPE_UNKNOWN) {
for (entry = drv; entry != drv + n_ents; entry++) {
int ret;
ret = entry->test(dev_desc);
if (!ret) {
dev_desc->part_type = entry->part_type;
return entry;
}
}
} else {
for (entry = drv; entry != drv + n_ents; entry++) {
if (dev_desc->part_type == entry->part_type)
return entry;
}
}
/* Not found */
return NULL;
}
|
static struct part_driver *part_driver_lookup_type(struct blk_desc *dev_desc)
{
struct part_driver *drv =
ll_entry_start(struct part_driver, part_driver);
const int n_ents = ll_entry_count(struct part_driver, part_driver);
struct part_driver *entry;
if (dev_desc->part_type == PART_TYPE_UNKNOWN) {
for (entry = drv; entry != drv + n_ents; entry++) {
int ret;
ret = entry->test(dev_desc);
if (!ret) {
dev_desc->part_type = entry->part_type;
return entry;
}
}
} else {
for (entry = drv; entry != drv + n_ents; entry++) {
if (dev_desc->part_type == entry->part_type)
return entry;
}
}
/* Not found */
return NULL;
}
|
C
|
u-boot
| 0 |
CVE-2012-2686
|
https://www.cvedetails.com/cve/CVE-2012-2686/
|
CWE-310
|
https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=125093b59f3c2a2d33785b5563d929d0472f1721
|
125093b59f3c2a2d33785b5563d929d0472f1721
| null |
static int aesni_cbc_hmac_sha1_init_key(EVP_CIPHER_CTX *ctx,
const unsigned char *inkey,
const unsigned char *iv, int enc)
{
EVP_AES_HMAC_SHA1 *key = data(ctx);
int ret;
if (enc)
ret=aesni_set_encrypt_key(inkey,ctx->key_len*8,&key->ks);
else
ret=aesni_set_decrypt_key(inkey,ctx->key_len*8,&key->ks);
SHA1_Init(&key->head); /* handy when benchmarking */
key->tail = key->head;
key->md = key->head;
key->payload_length = NO_PAYLOAD_LENGTH;
return ret<0?0:1;
}
|
static int aesni_cbc_hmac_sha1_init_key(EVP_CIPHER_CTX *ctx,
const unsigned char *inkey,
const unsigned char *iv, int enc)
{
EVP_AES_HMAC_SHA1 *key = data(ctx);
int ret;
if (enc)
ret=aesni_set_encrypt_key(inkey,ctx->key_len*8,&key->ks);
else
ret=aesni_set_decrypt_key(inkey,ctx->key_len*8,&key->ks);
SHA1_Init(&key->head); /* handy when benchmarking */
key->tail = key->head;
key->md = key->head;
key->payload_length = NO_PAYLOAD_LENGTH;
return ret<0?0:1;
}
|
C
|
openssl
| 0 |
CVE-2019-17178
|
https://www.cvedetails.com/cve/CVE-2019-17178/
|
CWE-772
|
https://github.com/akallabeth/FreeRDP/commit/fc80ab45621bd966f70594c0b7393ec005a94007
|
fc80ab45621bd966f70594c0b7393ec005a94007
|
Fixed #5645: realloc return handling
|
size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color)
{
return (w * h * lodepng_get_bpp(color) + 7) / 8;
}
|
size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color)
{
return (w * h * lodepng_get_bpp(color) + 7) / 8;
}
|
C
|
FreeRDP
| 0 |
CVE-2018-20182
|
https://www.cvedetails.com/cve/CVE-2018-20182/
|
CWE-119
|
https://github.com/rdesktop/rdesktop/commit/4dca546d04321a610c1835010b5dad85163b65e1
|
4dca546d04321a610c1835010b5dad85163b65e1
|
Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix possible integer overflow in s_check_rem() on 32bit arch
* Fix memory corruption in process_bitmap_data - CVE-2018-8794
* Fix remote code execution in process_bitmap_data - CVE-2018-8795
* Fix remote code execution in process_plane - CVE-2018-8797
* Fix Denial of Service in mcs_recv_connect_response - CVE-2018-20175
* Fix Denial of Service in mcs_parse_domain_params - CVE-2018-20175
* Fix Denial of Service in sec_parse_crypt_info - CVE-2018-20176
* Fix Denial of Service in sec_recv - CVE-2018-20176
* Fix minor information leak in rdpdr_process - CVE-2018-8791
* Fix Denial of Service in cssp_read_tsrequest - CVE-2018-8792
* Fix remote code execution in cssp_read_tsrequest - CVE-2018-8793
* Fix Denial of Service in process_bitmap_data - CVE-2018-8796
* Fix minor information leak in rdpsnd_process_ping - CVE-2018-8798
* Fix Denial of Service in process_secondary_order - CVE-2018-8799
* Fix remote code execution in in ui_clip_handle_data - CVE-2018-8800
* Fix major information leak in ui_clip_handle_data - CVE-2018-20174
* Fix memory corruption in rdp_in_unistr - CVE-2018-20177
* Fix Denial of Service in process_demand_active - CVE-2018-20178
* Fix remote code execution in lspci_process - CVE-2018-20179
* Fix remote code execution in rdpsnddbg_process - CVE-2018-20180
* Fix remote code execution in seamless_process - CVE-2018-20181
* Fix remote code execution in seamless_process_line - CVE-2018-20182
|
mcs_send_edrq(void)
{
STREAM s;
logger(Protocol, Debug, "%s()", __func__);
s = iso_init(5);
out_uint8(s, (MCS_EDRQ << 2));
out_uint16_be(s, 1); /* height */
out_uint16_be(s, 1); /* interval */
s_mark_end(s);
iso_send(s);
}
|
mcs_send_edrq(void)
{
STREAM s;
logger(Protocol, Debug, "%s()", __func__);
s = iso_init(5);
out_uint8(s, (MCS_EDRQ << 2));
out_uint16_be(s, 1); /* height */
out_uint16_be(s, 1); /* interval */
s_mark_end(s);
iso_send(s);
}
|
C
|
rdesktop
| 0 |
CVE-2013-2905
|
https://www.cvedetails.com/cve/CVE-2013-2905/
|
CWE-264
|
https://github.com/chromium/chromium/commit/afb848acb43ba316097ab4fddfa38dbd80bc6a71
|
afb848acb43ba316097ab4fddfa38dbd80bc6a71
|
Posix: fix named SHM mappings permissions.
Make sure that named mappings in /dev/shm/ aren't created with
broad permissions.
BUG=254159
[email protected], [email protected]
Review URL: https://codereview.chromium.org/17779002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209814 0039d316-1c4b-4281-b951-d872f2087c98
|
bool SharedMemory::FilePathForMemoryName(const std::string& mem_name,
FilePath* path) {
DCHECK_EQ(std::string::npos, mem_name.find('/'));
DCHECK_EQ(std::string::npos, mem_name.find('\0'));
FilePath temp_dir;
if (!file_util::GetShmemTempDir(&temp_dir, false))
return false;
#if !defined(OS_MACOSX)
#if defined(GOOGLE_CHROME_BUILD)
std::string name_base = std::string("com.google.Chrome");
#else
std::string name_base = std::string("org.chromium.Chromium");
#endif
#else // OS_MACOSX
std::string name_base = std::string(base::mac::BaseBundleID());
#endif // OS_MACOSX
*path = temp_dir.AppendASCII(name_base + ".shmem." + mem_name);
return true;
}
|
bool SharedMemory::FilePathForMemoryName(const std::string& mem_name,
FilePath* path) {
DCHECK_EQ(std::string::npos, mem_name.find('/'));
DCHECK_EQ(std::string::npos, mem_name.find('\0'));
FilePath temp_dir;
if (!file_util::GetShmemTempDir(&temp_dir, false))
return false;
#if !defined(OS_MACOSX)
#if defined(GOOGLE_CHROME_BUILD)
std::string name_base = std::string("com.google.Chrome");
#else
std::string name_base = std::string("org.chromium.Chromium");
#endif
#else // OS_MACOSX
std::string name_base = std::string(base::mac::BaseBundleID());
#endif // OS_MACOSX
*path = temp_dir.AppendASCII(name_base + ".shmem." + mem_name);
return true;
}
|
C
|
Chrome
| 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_sot(Jpeg2000DecoderContext *s, int n)
{
Jpeg2000TilePart *tp;
uint16_t Isot;
uint32_t Psot;
uint8_t TPsot;
if (bytestream2_get_bytes_left(&s->g) < 8)
return AVERROR_INVALIDDATA;
s->curtileno = 0;
Isot = bytestream2_get_be16u(&s->g); // Isot
if (Isot >= s->numXtiles * s->numYtiles)
return AVERROR_INVALIDDATA;
s->curtileno = Isot;
Psot = bytestream2_get_be32u(&s->g); // Psot
TPsot = bytestream2_get_byteu(&s->g); // TPsot
/* Read TNSot but not used */
bytestream2_get_byteu(&s->g); // TNsot
if (Psot > bytestream2_get_bytes_left(&s->g) + n + 2) {
av_log(s->avctx, AV_LOG_ERROR, "Psot %d too big\n", Psot);
return AVERROR_INVALIDDATA;
}
if (TPsot >= FF_ARRAY_ELEMS(s->tile[Isot].tile_part)) {
avpriv_request_sample(s->avctx, "Support for %d components", TPsot);
return AVERROR_PATCHWELCOME;
}
s->tile[Isot].tp_idx = TPsot;
tp = s->tile[Isot].tile_part + TPsot;
tp->tile_index = Isot;
tp->tp_end = s->g.buffer + Psot - n - 2;
if (!TPsot) {
Jpeg2000Tile *tile = s->tile + s->curtileno;
/* copy defaults */
memcpy(tile->codsty, s->codsty, s->ncomponents * sizeof(Jpeg2000CodingStyle));
memcpy(tile->qntsty, s->qntsty, s->ncomponents * sizeof(Jpeg2000QuantStyle));
}
return 0;
}
|
static int get_sot(Jpeg2000DecoderContext *s, int n)
{
Jpeg2000TilePart *tp;
uint16_t Isot;
uint32_t Psot;
uint8_t TPsot;
if (bytestream2_get_bytes_left(&s->g) < 8)
return AVERROR_INVALIDDATA;
s->curtileno = 0;
Isot = bytestream2_get_be16u(&s->g); // Isot
if (Isot >= s->numXtiles * s->numYtiles)
return AVERROR_INVALIDDATA;
s->curtileno = Isot;
Psot = bytestream2_get_be32u(&s->g); // Psot
TPsot = bytestream2_get_byteu(&s->g); // TPsot
/* Read TNSot but not used */
bytestream2_get_byteu(&s->g); // TNsot
if (Psot > bytestream2_get_bytes_left(&s->g) + n + 2) {
av_log(s->avctx, AV_LOG_ERROR, "Psot %d too big\n", Psot);
return AVERROR_INVALIDDATA;
}
if (TPsot >= FF_ARRAY_ELEMS(s->tile[Isot].tile_part)) {
avpriv_request_sample(s->avctx, "Support for %d components", TPsot);
return AVERROR_PATCHWELCOME;
}
s->tile[Isot].tp_idx = TPsot;
tp = s->tile[Isot].tile_part + TPsot;
tp->tile_index = Isot;
tp->tp_end = s->g.buffer + Psot - n - 2;
if (!TPsot) {
Jpeg2000Tile *tile = s->tile + s->curtileno;
/* copy defaults */
memcpy(tile->codsty, s->codsty, s->ncomponents * sizeof(Jpeg2000CodingStyle));
memcpy(tile->qntsty, s->qntsty, s->ncomponents * sizeof(Jpeg2000QuantStyle));
}
return 0;
}
|
C
|
FFmpeg
| 0 |
CVE-2016-3695
|
https://www.cvedetails.com/cve/CVE-2016-3695/
|
CWE-74
|
https://github.com/mjg59/linux/commit/d7a6be58edc01b1c66ecd8fcc91236bfbce0a420
|
d7a6be58edc01b1c66ecd8fcc91236bfbce0a420
|
acpi: Disable APEI error injection if securelevel is set
ACPI provides an error injection mechanism, EINJ, for debugging and testing
the ACPI Platform Error Interface (APEI) and other RAS features. If
supported by the firmware, ACPI specification 5.0 and later provide for a
way to specify a physical memory address to which to inject the error.
Injecting errors through EINJ can produce errors which to the platform are
indistinguishable from real hardware errors. This can have undesirable
side-effects, such as causing the platform to mark hardware as needing
replacement.
While it does not provide a method to load unauthenticated privileged code,
the effect of these errors may persist across reboots and affect trust in
the underlying hardware, so disable error injection through EINJ if
securelevel is set.
Signed-off-by: Linn Crosetto <[email protected]>
|
static int einj_check_table(struct acpi_table_einj *einj_tab)
{
if ((einj_tab->header_length !=
(sizeof(struct acpi_table_einj) - sizeof(einj_tab->header)))
&& (einj_tab->header_length != sizeof(struct acpi_table_einj)))
return -EINVAL;
if (einj_tab->header.length < sizeof(struct acpi_table_einj))
return -EINVAL;
if (einj_tab->entries !=
(einj_tab->header.length - sizeof(struct acpi_table_einj)) /
sizeof(struct acpi_einj_entry))
return -EINVAL;
return 0;
}
|
static int einj_check_table(struct acpi_table_einj *einj_tab)
{
if ((einj_tab->header_length !=
(sizeof(struct acpi_table_einj) - sizeof(einj_tab->header)))
&& (einj_tab->header_length != sizeof(struct acpi_table_einj)))
return -EINVAL;
if (einj_tab->header.length < sizeof(struct acpi_table_einj))
return -EINVAL;
if (einj_tab->entries !=
(einj_tab->header.length - sizeof(struct acpi_table_einj)) /
sizeof(struct acpi_einj_entry))
return -EINVAL;
return 0;
}
|
C
|
linux
| 0 |
CVE-2018-6135
|
https://www.cvedetails.com/cve/CVE-2018-6135/
| null |
https://github.com/chromium/chromium/commit/2ccbb407dccc976ae4bdbaa5ff2f777f4eb0723b
|
2ccbb407dccc976ae4bdbaa5ff2f777f4eb0723b
|
Force a flush of drawing to the widget when a dialog is shown.
BUG=823353
TEST=as in bug
Change-Id: I5da777068fc29c5638ef02d50e59d5d7b2729260
Reviewed-on: https://chromium-review.googlesource.com/971661
Reviewed-by: Ken Buchanan <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#544518}
|
void RenderWidgetHostImpl::RestartHangMonitorTimeoutIfNecessary() {
if (hang_monitor_timeout_ && in_flight_event_count_ > 0 && !is_hidden_)
hang_monitor_timeout_->Restart(hung_renderer_delay_);
}
|
void RenderWidgetHostImpl::RestartHangMonitorTimeoutIfNecessary() {
if (hang_monitor_timeout_ && in_flight_event_count_ > 0 && !is_hidden_)
hang_monitor_timeout_->Restart(hung_renderer_delay_);
}
|
C
|
Chrome
| 0 |
CVE-2011-1799
|
https://www.cvedetails.com/cve/CVE-2011-1799/
|
CWE-20
|
https://github.com/chromium/chromium/commit/5fd35e5359c6345b8709695cd71fba307318e6aa
|
5fd35e5359c6345b8709695cd71fba307318e6aa
|
Source/WebCore: Fix for bug 64046 - Wrong image height in absolutely positioned div in
relatively positioned parent with bottom padding.
https://bugs.webkit.org/show_bug.cgi?id=64046
Patch by Kulanthaivel Palanichamy <[email protected]> on 2011-07-21
Reviewed by David Hyatt.
Test: fast/css/absolute-child-with-percent-height-inside-relative-parent.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::availableLogicalHeightUsing):
LayoutTests: Test to cover absolutely positioned child with percentage height
in relatively positioned parent with bottom padding.
https://bugs.webkit.org/show_bug.cgi?id=64046
Patch by Kulanthaivel Palanichamy <[email protected]> on 2011-07-21
Reviewed by David Hyatt.
* fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.txt: Added.
* fast/css/absolute-child-with-percent-height-inside-relative-parent.html: Added.
git-svn-id: svn://svn.chromium.org/blink/trunk@91533 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo)
{
const FillLayer* bgLayer = style()->backgroundLayers();
Color bgColor = style()->visitedDependentColor(CSSPropertyBackgroundColor);
RenderObject* bodyObject = 0;
if (!hasBackground() && node() && node()->hasTagName(HTMLNames::htmlTag)) {
HTMLElement* body = document()->body();
bodyObject = (body && body->hasLocalName(bodyTag)) ? body->renderer() : 0;
if (bodyObject) {
bgLayer = bodyObject->style()->backgroundLayers();
bgColor = bodyObject->style()->visitedDependentColor(CSSPropertyBackgroundColor);
}
}
paintFillLayers(paintInfo, bgColor, bgLayer, view()->documentRect(), BackgroundBleedNone, CompositeSourceOver, bodyObject);
}
|
void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo)
{
const FillLayer* bgLayer = style()->backgroundLayers();
Color bgColor = style()->visitedDependentColor(CSSPropertyBackgroundColor);
RenderObject* bodyObject = 0;
if (!hasBackground() && node() && node()->hasTagName(HTMLNames::htmlTag)) {
HTMLElement* body = document()->body();
bodyObject = (body && body->hasLocalName(bodyTag)) ? body->renderer() : 0;
if (bodyObject) {
bgLayer = bodyObject->style()->backgroundLayers();
bgColor = bodyObject->style()->visitedDependentColor(CSSPropertyBackgroundColor);
}
}
paintFillLayers(paintInfo, bgColor, bgLayer, view()->documentRect(), BackgroundBleedNone, CompositeSourceOver, bodyObject);
}
|
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::GetCookieManagerForBrowserProcess() {
if (!cookie_manager_for_browser_process_ ||
cookie_manager_for_browser_process_.encountered_error()) {
GetNetworkContext()->GetCookieManager(
mojo::MakeRequest(&cookie_manager_for_browser_process_));
}
return cookie_manager_for_browser_process_.get();
}
|
StoragePartitionImpl::GetCookieManagerForBrowserProcess() {
if (!cookie_manager_for_browser_process_ ||
cookie_manager_for_browser_process_.encountered_error()) {
GetNetworkContext()->GetCookieManager(
mojo::MakeRequest(&cookie_manager_for_browser_process_));
}
return cookie_manager_for_browser_process_.get();
}
|
C
|
Chrome
| 0 |
CVE-2016-5219
|
https://www.cvedetails.com/cve/CVE-2016-5219/
|
CWE-416
|
https://github.com/chromium/chromium/commit/a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
cheaper by minimizing the round-trip to the GPU thread.
Bug: 881152, 957001
Change-Id: Iadfa798af29225e752c710ca5c25f50b3dd3101a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586630
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657568}
|
CommandBufferHelper* GLES2Implementation::cmd_buffer_helper() {
return helper_;
}
|
CommandBufferHelper* GLES2Implementation::cmd_buffer_helper() {
return helper_;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/fc790462b4f248712bbc8c3734664dd6b05f80f2
|
fc790462b4f248712bbc8c3734664dd6b05f80f2
|
Set the job name for the print job on the Mac.
BUG=http://crbug.com/29188
TEST=as in bug
Review URL: http://codereview.chromium.org/1997016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47056 0039d316-1c4b-4281-b951-d872f2087c98
|
void ResourceMessageFilter::OnFilterAdded(IPC::Channel* channel) {
channel_ = channel;
registrar_.Add(this, NotificationType::BLACKLIST_NONVISUAL_RESOURCE_BLOCKED,
NotificationService::AllSources());
}
|
void ResourceMessageFilter::OnFilterAdded(IPC::Channel* channel) {
channel_ = channel;
registrar_.Add(this, NotificationType::BLACKLIST_NONVISUAL_RESOURCE_BLOCKED,
NotificationService::AllSources());
}
|
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 |
SPICE_GNUC_VISIBLE int spice_server_kbd_leds(SpiceKbdInstance *sin, int leds)
{
inputs_on_keyboard_leds_change(NULL, leds);
return 0;
}
|
SPICE_GNUC_VISIBLE int spice_server_kbd_leds(SpiceKbdInstance *sin, int leds)
{
inputs_on_keyboard_leds_change(NULL, leds);
return 0;
}
|
C
|
spice
| 0 |
CVE-2013-2237
|
https://www.cvedetails.com/cve/CVE-2013-2237/
|
CWE-119
|
https://github.com/torvalds/linux/commit/85dfb745ee40232876663ae206cba35f24ab2a40
|
85dfb745ee40232876663ae206cba35f24ab2a40
|
af_key: initialize satype in key_notify_policy_flush()
This field was left uninitialized. Some user daemons perform check against this
field.
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
|
static struct sk_buff *compose_sadb_supported(const struct sadb_msg *orig,
gfp_t allocation)
{
struct sk_buff *skb;
struct sadb_msg *hdr;
int len, auth_len, enc_len, i;
auth_len = xfrm_count_pfkey_auth_supported();
if (auth_len) {
auth_len *= sizeof(struct sadb_alg);
auth_len += sizeof(struct sadb_supported);
}
enc_len = xfrm_count_pfkey_enc_supported();
if (enc_len) {
enc_len *= sizeof(struct sadb_alg);
enc_len += sizeof(struct sadb_supported);
}
len = enc_len + auth_len + sizeof(struct sadb_msg);
skb = alloc_skb(len + 16, allocation);
if (!skb)
goto out_put_algs;
hdr = (struct sadb_msg *) skb_put(skb, sizeof(*hdr));
pfkey_hdr_dup(hdr, orig);
hdr->sadb_msg_errno = 0;
hdr->sadb_msg_len = len / sizeof(uint64_t);
if (auth_len) {
struct sadb_supported *sp;
struct sadb_alg *ap;
sp = (struct sadb_supported *) skb_put(skb, auth_len);
ap = (struct sadb_alg *) (sp + 1);
sp->sadb_supported_len = auth_len / sizeof(uint64_t);
sp->sadb_supported_exttype = SADB_EXT_SUPPORTED_AUTH;
for (i = 0; ; i++) {
struct xfrm_algo_desc *aalg = xfrm_aalg_get_byidx(i);
if (!aalg)
break;
if (!aalg->pfkey_supported)
continue;
if (aalg->available)
*ap++ = aalg->desc;
}
}
if (enc_len) {
struct sadb_supported *sp;
struct sadb_alg *ap;
sp = (struct sadb_supported *) skb_put(skb, enc_len);
ap = (struct sadb_alg *) (sp + 1);
sp->sadb_supported_len = enc_len / sizeof(uint64_t);
sp->sadb_supported_exttype = SADB_EXT_SUPPORTED_ENCRYPT;
for (i = 0; ; i++) {
struct xfrm_algo_desc *ealg = xfrm_ealg_get_byidx(i);
if (!ealg)
break;
if (!ealg->pfkey_supported)
continue;
if (ealg->available)
*ap++ = ealg->desc;
}
}
out_put_algs:
return skb;
}
|
static struct sk_buff *compose_sadb_supported(const struct sadb_msg *orig,
gfp_t allocation)
{
struct sk_buff *skb;
struct sadb_msg *hdr;
int len, auth_len, enc_len, i;
auth_len = xfrm_count_pfkey_auth_supported();
if (auth_len) {
auth_len *= sizeof(struct sadb_alg);
auth_len += sizeof(struct sadb_supported);
}
enc_len = xfrm_count_pfkey_enc_supported();
if (enc_len) {
enc_len *= sizeof(struct sadb_alg);
enc_len += sizeof(struct sadb_supported);
}
len = enc_len + auth_len + sizeof(struct sadb_msg);
skb = alloc_skb(len + 16, allocation);
if (!skb)
goto out_put_algs;
hdr = (struct sadb_msg *) skb_put(skb, sizeof(*hdr));
pfkey_hdr_dup(hdr, orig);
hdr->sadb_msg_errno = 0;
hdr->sadb_msg_len = len / sizeof(uint64_t);
if (auth_len) {
struct sadb_supported *sp;
struct sadb_alg *ap;
sp = (struct sadb_supported *) skb_put(skb, auth_len);
ap = (struct sadb_alg *) (sp + 1);
sp->sadb_supported_len = auth_len / sizeof(uint64_t);
sp->sadb_supported_exttype = SADB_EXT_SUPPORTED_AUTH;
for (i = 0; ; i++) {
struct xfrm_algo_desc *aalg = xfrm_aalg_get_byidx(i);
if (!aalg)
break;
if (!aalg->pfkey_supported)
continue;
if (aalg->available)
*ap++ = aalg->desc;
}
}
if (enc_len) {
struct sadb_supported *sp;
struct sadb_alg *ap;
sp = (struct sadb_supported *) skb_put(skb, enc_len);
ap = (struct sadb_alg *) (sp + 1);
sp->sadb_supported_len = enc_len / sizeof(uint64_t);
sp->sadb_supported_exttype = SADB_EXT_SUPPORTED_ENCRYPT;
for (i = 0; ; i++) {
struct xfrm_algo_desc *ealg = xfrm_ealg_get_byidx(i);
if (!ealg)
break;
if (!ealg->pfkey_supported)
continue;
if (ealg->available)
*ap++ = ealg->desc;
}
}
out_put_algs:
return skb;
}
|
C
|
linux
| 0 |
CVE-2010-0011
|
https://www.cvedetails.com/cve/CVE-2010-0011/
|
CWE-264
|
https://github.com/Dieterbe/uzbl/commit/1958b52d41cba96956dc1995660de49525ed1047
|
1958b52d41cba96956dc1995660de49525ed1047
|
disable Uzbl javascript object because of security problem.
|
test_scroll (void) {
uzbl.gui.scbar_v = (GtkScrollbar*) gtk_vscrollbar_new (NULL);
uzbl.gui.bar_v = gtk_range_get_adjustment((GtkRange*) uzbl.gui.scbar_v);
gtk_adjustment_set_lower(uzbl.gui.bar_v, 0);
gtk_adjustment_set_upper(uzbl.gui.bar_v, 100);
gtk_adjustment_set_page_size(uzbl.gui.bar_v, 5);
/* scroll vertical end should scroll it to upper - page_size */
parse_cmd_line("scroll vertical end", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 95);
/* scroll vertical begin should scroll it to lower */
parse_cmd_line("scroll vertical begin", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 0);
/* scroll vertical can scroll by pixels */
parse_cmd_line("scroll vertical 15", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 15);
parse_cmd_line("scroll vertical -10", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 5);
/* scroll vertical can scroll by a percentage of the page size */
parse_cmd_line("scroll vertical 100%", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 10);
parse_cmd_line("scroll vertical 150%", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 17.5);
/* scroll_horz behaves basically the same way. */
}
|
test_scroll (void) {
uzbl.gui.scbar_v = (GtkScrollbar*) gtk_vscrollbar_new (NULL);
uzbl.gui.bar_v = gtk_range_get_adjustment((GtkRange*) uzbl.gui.scbar_v);
gtk_adjustment_set_lower(uzbl.gui.bar_v, 0);
gtk_adjustment_set_upper(uzbl.gui.bar_v, 100);
gtk_adjustment_set_page_size(uzbl.gui.bar_v, 5);
/* scroll vertical end should scroll it to upper - page_size */
parse_cmd_line("scroll vertical end", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 95);
/* scroll vertical begin should scroll it to lower */
parse_cmd_line("scroll vertical begin", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 0);
/* scroll vertical can scroll by pixels */
parse_cmd_line("scroll vertical 15", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 15);
parse_cmd_line("scroll vertical -10", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 5);
/* scroll vertical can scroll by a percentage of the page size */
parse_cmd_line("scroll vertical 100%", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 10);
parse_cmd_line("scroll vertical 150%", NULL);
g_assert_cmpfloat(gtk_adjustment_get_value(uzbl.gui.bar_v), ==, 17.5);
/* scroll_horz behaves basically the same way. */
}
|
C
|
uzbl
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/19190765882e272a6a2162c89acdb29110f7e3cf
|
19190765882e272a6a2162c89acdb29110f7e3cf
|
Revert 102184 - [Sync] use base::Time in sync
Make EntryKernel/Entry/BaseNode use base::Time instead of int64s.
Add sync/util/time.h, with utility functions to manage the sync proto
time format.
Store times on disk in proto format instead of the local system.
This requires a database version bump (to 77).
Update SessionChangeProcessor/SessionModelAssociator
to use base::Time, too.
Remove hackish Now() function.
Remove ZeroFields() function, and instead zero-initialize in EntryKernel::EntryKernel() directly.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7981006
[email protected]
Review URL: http://codereview.chromium.org/7977034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102186 0039d316-1c4b-4281-b951-d872f2087c98
|
DirOpenResult DirectoryBackingStore::DoLoad(MetahandlesIndex* entry_bucket,
Directory::KernelLoadInfo* kernel_load_info) {
{
DirOpenResult result = InitializeTables();
if (result != OPENED)
return result;
}
if (!DropDeletedEntries())
return FAILED_DATABASE_CORRUPT;
if (!LoadEntries(entry_bucket))
return FAILED_DATABASE_CORRUPT;
if (!LoadInfo(kernel_load_info))
return FAILED_DATABASE_CORRUPT;
return OPENED;
}
|
DirOpenResult DirectoryBackingStore::DoLoad(MetahandlesIndex* entry_bucket,
Directory::KernelLoadInfo* kernel_load_info) {
{
DirOpenResult result = InitializeTables();
if (result != OPENED)
return result;
}
if (!DropDeletedEntries())
return FAILED_DATABASE_CORRUPT;
if (!LoadEntries(entry_bucket))
return FAILED_DATABASE_CORRUPT;
if (!LoadInfo(kernel_load_info))
return FAILED_DATABASE_CORRUPT;
return OPENED;
}
|
C
|
Chrome
| 0 |
CVE-2014-4014
|
https://www.cvedetails.com/cve/CVE-2014-4014/
|
CWE-264
|
https://github.com/torvalds/linux/commit/23adbe12ef7d3d4195e80800ab36b37bee28cd03
|
23adbe12ef7d3d4195e80800ab36b37bee28cd03
|
fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces. For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.
This patch changes inode_capable to check for uid and gid mappings and
renames it to capable_wrt_inode_uidgid, which should make it more
obvious what it does.
Fixes CVE-2014-4014.
Cc: Theodore Ts'o <[email protected]>
Cc: Serge Hallyn <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: [email protected]
Signed-off-by: Andy Lutomirski <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
void clear_inode(struct inode *inode)
{
might_sleep();
/*
* We have to cycle tree_lock here because reclaim can be still in the
* process of removing the last page (in __delete_from_page_cache())
* and we must not free mapping under it.
*/
spin_lock_irq(&inode->i_data.tree_lock);
BUG_ON(inode->i_data.nrpages);
BUG_ON(inode->i_data.nrshadows);
spin_unlock_irq(&inode->i_data.tree_lock);
BUG_ON(!list_empty(&inode->i_data.private_list));
BUG_ON(!(inode->i_state & I_FREEING));
BUG_ON(inode->i_state & I_CLEAR);
/* don't need i_lock here, no concurrent mods to i_state */
inode->i_state = I_FREEING | I_CLEAR;
}
|
void clear_inode(struct inode *inode)
{
might_sleep();
/*
* We have to cycle tree_lock here because reclaim can be still in the
* process of removing the last page (in __delete_from_page_cache())
* and we must not free mapping under it.
*/
spin_lock_irq(&inode->i_data.tree_lock);
BUG_ON(inode->i_data.nrpages);
BUG_ON(inode->i_data.nrshadows);
spin_unlock_irq(&inode->i_data.tree_lock);
BUG_ON(!list_empty(&inode->i_data.private_list));
BUG_ON(!(inode->i_state & I_FREEING));
BUG_ON(inode->i_state & I_CLEAR);
/* don't need i_lock here, no concurrent mods to i_state */
inode->i_state = I_FREEING | I_CLEAR;
}
|
C
|
linux
| 0 |
CVE-2013-2916
|
https://www.cvedetails.com/cve/CVE-2013-2916/
| null |
https://github.com/chromium/chromium/commit/47a054e9ad826421b789097d82b44c102ab6ac97
|
47a054e9ad826421b789097d82b44c102ab6ac97
|
Don't wait to notify client of spoof attempt if a modal dialog is created.
BUG=281256
TEST=See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/23620020
git-svn-id: svn://svn.chromium.org/blink/trunk@157196 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void FrameLoader::checkTimerFired(Timer<FrameLoader>*)
{
RefPtr<Frame> protect(m_frame);
if (Page* page = m_frame->page()) {
if (page->defersLoading())
return;
}
if (m_shouldCallCheckCompleted)
checkCompleted();
}
|
void FrameLoader::checkTimerFired(Timer<FrameLoader>*)
{
RefPtr<Frame> protect(m_frame);
if (Page* page = m_frame->page()) {
if (page->defersLoading())
return;
}
if (m_shouldCallCheckCompleted)
checkCompleted();
}
|
C
|
Chrome
| 0 |
CVE-2012-2119
|
https://www.cvedetails.com/cve/CVE-2012-2119/
|
CWE-119
|
https://github.com/torvalds/linux/commit/b92946e2919134ebe2a4083e4302236295ea2a73
|
b92946e2919134ebe2a4083e4302236295ea2a73
|
macvtap: zerocopy: validate vectors before building skb
There're several reasons that the vectors need to be validated:
- Return error when caller provides vectors whose num is greater than UIO_MAXIOV.
- Linearize part of skb when userspace provides vectors grater than MAX_SKB_FRAGS.
- Return error when userspace provides vectors whose total length may exceed
- MAX_SKB_FRAGS * PAGE_SIZE.
Signed-off-by: Jason Wang <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
|
static int macvtap_skb_to_vnet_hdr(const struct sk_buff *skb,
struct virtio_net_hdr *vnet_hdr)
{
memset(vnet_hdr, 0, sizeof(*vnet_hdr));
if (skb_is_gso(skb)) {
struct skb_shared_info *sinfo = skb_shinfo(skb);
/* This is a hint as to how much should be linear. */
vnet_hdr->hdr_len = skb_headlen(skb);
vnet_hdr->gso_size = sinfo->gso_size;
if (sinfo->gso_type & SKB_GSO_TCPV4)
vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
else if (sinfo->gso_type & SKB_GSO_TCPV6)
vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6;
else if (sinfo->gso_type & SKB_GSO_UDP)
vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_UDP;
else
BUG();
if (sinfo->gso_type & SKB_GSO_TCP_ECN)
vnet_hdr->gso_type |= VIRTIO_NET_HDR_GSO_ECN;
} else
vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE;
if (skb->ip_summed == CHECKSUM_PARTIAL) {
vnet_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
vnet_hdr->csum_start = skb_checksum_start_offset(skb);
vnet_hdr->csum_offset = skb->csum_offset;
} else if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
vnet_hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;
} /* else everything is zero */
return 0;
}
|
static int macvtap_skb_to_vnet_hdr(const struct sk_buff *skb,
struct virtio_net_hdr *vnet_hdr)
{
memset(vnet_hdr, 0, sizeof(*vnet_hdr));
if (skb_is_gso(skb)) {
struct skb_shared_info *sinfo = skb_shinfo(skb);
/* This is a hint as to how much should be linear. */
vnet_hdr->hdr_len = skb_headlen(skb);
vnet_hdr->gso_size = sinfo->gso_size;
if (sinfo->gso_type & SKB_GSO_TCPV4)
vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
else if (sinfo->gso_type & SKB_GSO_TCPV6)
vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6;
else if (sinfo->gso_type & SKB_GSO_UDP)
vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_UDP;
else
BUG();
if (sinfo->gso_type & SKB_GSO_TCP_ECN)
vnet_hdr->gso_type |= VIRTIO_NET_HDR_GSO_ECN;
} else
vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE;
if (skb->ip_summed == CHECKSUM_PARTIAL) {
vnet_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
vnet_hdr->csum_start = skb_checksum_start_offset(skb);
vnet_hdr->csum_offset = skb->csum_offset;
} else if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
vnet_hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;
} /* else everything is zero */
return 0;
}
|
C
|
linux
| 0 |
CVE-2015-1265
|
https://www.cvedetails.com/cve/CVE-2015-1265/
| null |
https://github.com/chromium/chromium/commit/8ea5693d5cf304e56174bb6b65412f04209904db
|
8ea5693d5cf304e56174bb6b65412f04209904db
|
Move Editor::Transpose() out of Editor class
This patch moves |Editor::Transpose()| out of |Editor| class as preparation of
expanding it into |ExecutTranspose()| in "EditorCommand.cpp" to make |Editor|
class simpler for improving code health.
Following patch will expand |Transpose()| into |ExecutTranspose()|.
Bug: 672405
Change-Id: Icde253623f31813d2b4517c4da7d4798bd5fadf6
Reviewed-on: https://chromium-review.googlesource.com/583880
Reviewed-by: Xiaocheng Hu <[email protected]>
Commit-Queue: Yoshifumi Inoue <[email protected]>
Cr-Commit-Position: refs/heads/master@{#489518}
|
static bool IsUnicodeBidiNestedOrMultipleEmbeddings(CSSValueID value_id) {
return value_id == CSSValueEmbed || value_id == CSSValueBidiOverride ||
value_id == CSSValueWebkitIsolate ||
value_id == CSSValueWebkitIsolateOverride ||
value_id == CSSValueWebkitPlaintext || value_id == CSSValueIsolate ||
value_id == CSSValueIsolateOverride || value_id == CSSValuePlaintext;
}
|
static bool IsUnicodeBidiNestedOrMultipleEmbeddings(CSSValueID value_id) {
return value_id == CSSValueEmbed || value_id == CSSValueBidiOverride ||
value_id == CSSValueWebkitIsolate ||
value_id == CSSValueWebkitIsolateOverride ||
value_id == CSSValueWebkitPlaintext || value_id == CSSValueIsolate ||
value_id == CSSValueIsolateOverride || value_id == CSSValuePlaintext;
}
|
C
|
Chrome
| 0 |
CVE-2015-1573
|
https://www.cvedetails.com/cve/CVE-2015-1573/
|
CWE-19
|
https://github.com/torvalds/linux/commit/a2f18db0c68fec96631c10cad9384c196e9008ac
|
a2f18db0c68fec96631c10cad9384c196e9008ac
|
netfilter: nf_tables: fix flush ruleset chain dependencies
Jumping between chains doesn't mix well with flush ruleset. Rules
from a different chain and set elements may still refer to us.
[ 353.373791] ------------[ cut here ]------------
[ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[ 353.373896] invalid opcode: 0000 [#1] SMP
[ 353.373942] Modules linked in: intel_powerclamp uas iwldvm iwlwifi
[ 353.374017] CPU: 0 PID: 6445 Comm: 31c3.nft Not tainted 3.18.0 #98
[ 353.374069] Hardware name: LENOVO 5129CTO/5129CTO, BIOS 6QET47WW (1.17 ) 07/14/2010
[...]
[ 353.375018] Call Trace:
[ 353.375046] [<ffffffff81964c31>] ? nf_tables_commit+0x381/0x540
[ 353.375101] [<ffffffff81949118>] nfnetlink_rcv+0x3d8/0x4b0
[ 353.375150] [<ffffffff81943fc5>] netlink_unicast+0x105/0x1a0
[ 353.375200] [<ffffffff8194438e>] netlink_sendmsg+0x32e/0x790
[ 353.375253] [<ffffffff818f398e>] sock_sendmsg+0x8e/0xc0
[ 353.375300] [<ffffffff818f36b9>] ? move_addr_to_kernel.part.20+0x19/0x70
[ 353.375357] [<ffffffff818f44f9>] ? move_addr_to_kernel+0x19/0x30
[ 353.375410] [<ffffffff819016d2>] ? verify_iovec+0x42/0xd0
[ 353.375459] [<ffffffff818f3e10>] ___sys_sendmsg+0x3f0/0x400
[ 353.375510] [<ffffffff810615fa>] ? native_sched_clock+0x2a/0x90
[ 353.375563] [<ffffffff81176697>] ? acct_account_cputime+0x17/0x20
[ 353.375616] [<ffffffff8110dc78>] ? account_user_time+0x88/0xa0
[ 353.375667] [<ffffffff818f4bbd>] __sys_sendmsg+0x3d/0x80
[ 353.375719] [<ffffffff81b184f4>] ? int_check_syscall_exit_work+0x34/0x3d
[ 353.375776] [<ffffffff818f4c0d>] SyS_sendmsg+0xd/0x20
[ 353.375823] [<ffffffff81b1826d>] system_call_fastpath+0x16/0x1b
Release objects in this order: rules -> sets -> chains -> tables, to
make sure no references to chains are held anymore.
Reported-by: Asbjoern Sloth Toennesen <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
int nft_register_afinfo(struct net *net, struct nft_af_info *afi)
{
INIT_LIST_HEAD(&afi->tables);
nfnl_lock(NFNL_SUBSYS_NFTABLES);
list_add_tail_rcu(&afi->list, &net->nft.af_info);
nfnl_unlock(NFNL_SUBSYS_NFTABLES);
return 0;
}
|
int nft_register_afinfo(struct net *net, struct nft_af_info *afi)
{
INIT_LIST_HEAD(&afi->tables);
nfnl_lock(NFNL_SUBSYS_NFTABLES);
list_add_tail_rcu(&afi->list, &net->nft.af_info);
nfnl_unlock(NFNL_SUBSYS_NFTABLES);
return 0;
}
|
C
|
linux
| 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]>
|
ofport_destroy__(struct ofport *port)
{
struct ofproto *ofproto = port->ofproto;
const char *name = netdev_get_name(port->netdev);
hmap_remove(&ofproto->ports, &port->hmap_node);
shash_delete(&ofproto->port_by_name,
shash_find(&ofproto->port_by_name, name));
netdev_close(port->netdev);
ofproto->ofproto_class->port_dealloc(port);
}
|
ofport_destroy__(struct ofport *port)
{
struct ofproto *ofproto = port->ofproto;
const char *name = netdev_get_name(port->netdev);
hmap_remove(&ofproto->ports, &port->hmap_node);
shash_delete(&ofproto->port_by_name,
shash_find(&ofproto->port_by_name, name));
netdev_close(port->netdev);
ofproto->ofproto_class->port_dealloc(port);
}
|
C
|
ovs
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/dfd28b1909358445e838fb0fdf3995c77a420aa8
|
dfd28b1909358445e838fb0fdf3995c77a420aa8
|
Refactor ScrollableShelf on |space_for_icons_|
|space_for_icons_| indicates the available space in scrollable shelf
to accommodate shelf icons. Now it is an integer type. Replace it with
gfx::Rect.
Bug: 997807
Change-Id: I4f9ba3206bd69dfdaf50894de46239e676db6454
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1801326
Commit-Queue: Andrew Xu <[email protected]>
Reviewed-by: Manu Cornet <[email protected]>
Reviewed-by: Xiyuan Xia <[email protected]>
Cr-Commit-Position: refs/heads/master@{#696446}
|
int GetUnit() {
return ShelfConfig::Get()->button_size() +
ShelfConfig::Get()->button_spacing();
}
|
int GetUnit() {
return ShelfConfig::Get()->button_size() +
ShelfConfig::Get()->button_spacing();
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/9a3dbf43f97aa7cb6b4399f9b11ce1de20f0680f
|
9a3dbf43f97aa7cb6b4399f9b11ce1de20f0680f
|
Fix crash if utterance is garbage-collected before speech ends.
BUG=359130,348863
Review URL: https://codereview.chromium.org/228133002
git-svn-id: svn://svn.chromium.org/blink/trunk@171077 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void SpeechSynthesis::setPlatformSynthesizer(PassOwnPtr<PlatformSpeechSynthesizer> synthesizer)
{
m_platformSpeechSynthesizer = synthesizer;
}
|
void SpeechSynthesis::setPlatformSynthesizer(PassOwnPtr<PlatformSpeechSynthesizer> synthesizer)
{
m_platformSpeechSynthesizer = synthesizer;
}
|
C
|
Chrome
| 0 |
CVE-2016-4425
|
https://www.cvedetails.com/cve/CVE-2016-4425/
|
CWE-20
|
https://github.com/akheron/jansson/pull/284/commits/64ce0ad3731ebd77e02897b07920eadd0e2cc318
|
64ce0ad3731ebd77e02897b07920eadd0e2cc318
|
Fix for issue #282
The fix limits recursion depths when parsing arrays and objects.
The limit is configurable via the `JSON_PARSER_MAX_DEPTH` setting
within `jansson_config.h` and is set by default to 2048.
Update the RFC conformance document to note the limit; the RFC
allows limits to be set by the implementation so nothing has
actually changed w.r.t. conformance state.
Reported by Gustavo Grieco.
|
static int lex_scan(lex_t *lex, json_error_t *error)
{
int c;
strbuffer_clear(&lex->saved_text);
if(lex->token == TOKEN_STRING)
lex_free_string(lex);
do
c = lex_get(lex, error);
while(c == ' ' || c == '\t' || c == '\n' || c == '\r');
if(c == STREAM_STATE_EOF) {
lex->token = TOKEN_EOF;
goto out;
}
if(c == STREAM_STATE_ERROR) {
lex->token = TOKEN_INVALID;
goto out;
}
lex_save(lex, c);
if(c == '{' || c == '}' || c == '[' || c == ']' || c == ':' || c == ',')
lex->token = c;
else if(c == '"')
lex_scan_string(lex, error);
else if(l_isdigit(c) || c == '-') {
if(lex_scan_number(lex, c, error))
goto out;
}
else if(l_isalpha(c)) {
/* eat up the whole identifier for clearer error messages */
const char *saved_text;
do
c = lex_get_save(lex, error);
while(l_isalpha(c));
lex_unget_unsave(lex, c);
saved_text = strbuffer_value(&lex->saved_text);
if(strcmp(saved_text, "true") == 0)
lex->token = TOKEN_TRUE;
else if(strcmp(saved_text, "false") == 0)
lex->token = TOKEN_FALSE;
else if(strcmp(saved_text, "null") == 0)
lex->token = TOKEN_NULL;
else
lex->token = TOKEN_INVALID;
}
else {
/* save the rest of the input UTF-8 sequence to get an error
message of valid UTF-8 */
lex_save_cached(lex);
lex->token = TOKEN_INVALID;
}
out:
return lex->token;
}
|
static int lex_scan(lex_t *lex, json_error_t *error)
{
int c;
strbuffer_clear(&lex->saved_text);
if(lex->token == TOKEN_STRING)
lex_free_string(lex);
do
c = lex_get(lex, error);
while(c == ' ' || c == '\t' || c == '\n' || c == '\r');
if(c == STREAM_STATE_EOF) {
lex->token = TOKEN_EOF;
goto out;
}
if(c == STREAM_STATE_ERROR) {
lex->token = TOKEN_INVALID;
goto out;
}
lex_save(lex, c);
if(c == '{' || c == '}' || c == '[' || c == ']' || c == ':' || c == ',')
lex->token = c;
else if(c == '"')
lex_scan_string(lex, error);
else if(l_isdigit(c) || c == '-') {
if(lex_scan_number(lex, c, error))
goto out;
}
else if(l_isalpha(c)) {
/* eat up the whole identifier for clearer error messages */
const char *saved_text;
do
c = lex_get_save(lex, error);
while(l_isalpha(c));
lex_unget_unsave(lex, c);
saved_text = strbuffer_value(&lex->saved_text);
if(strcmp(saved_text, "true") == 0)
lex->token = TOKEN_TRUE;
else if(strcmp(saved_text, "false") == 0)
lex->token = TOKEN_FALSE;
else if(strcmp(saved_text, "null") == 0)
lex->token = TOKEN_NULL;
else
lex->token = TOKEN_INVALID;
}
else {
/* save the rest of the input UTF-8 sequence to get an error
message of valid UTF-8 */
lex_save_cached(lex);
lex->token = TOKEN_INVALID;
}
out:
return lex->token;
}
|
C
|
jansson
| 0 |
CVE-2016-2392
|
https://www.cvedetails.com/cve/CVE-2016-2392/
| null |
https://git.qemu.org/?p=qemu.git;a=commit;h=80eecda8e5d09c442c24307f340840a5b70ea3b9
|
80eecda8e5d09c442c24307f340840a5b70ea3b9
| null |
static void usb_net_handle_dataout(USBNetState *s, USBPacket *p)
{
int sz = sizeof(s->out_buf) - s->out_ptr;
struct rndis_packet_msg_type *msg =
(struct rndis_packet_msg_type *) s->out_buf;
uint32_t len;
#ifdef TRAFFIC_DEBUG
fprintf(stderr, "usbnet: data out len %zu\n", p->iov.size);
iov_hexdump(p->iov.iov, p->iov.niov, stderr, "usbnet", p->iov.size);
#endif
if (sz > p->iov.size) {
sz = p->iov.size;
}
usb_packet_copy(p, &s->out_buf[s->out_ptr], sz);
s->out_ptr += sz;
if (!is_rndis(s)) {
if (p->iov.size < 64) {
qemu_send_packet(qemu_get_queue(s->nic), s->out_buf, s->out_ptr);
s->out_ptr = 0;
}
return;
}
len = le32_to_cpu(msg->MessageLength);
if (s->out_ptr < 8 || s->out_ptr < len) {
return;
}
if (le32_to_cpu(msg->MessageType) == RNDIS_PACKET_MSG) {
uint32_t offs = 8 + le32_to_cpu(msg->DataOffset);
uint32_t size = le32_to_cpu(msg->DataLength);
if (offs + size <= len)
qemu_send_packet(qemu_get_queue(s->nic), s->out_buf + offs, size);
}
s->out_ptr -= len;
memmove(s->out_buf, &s->out_buf[len], s->out_ptr);
}
|
static void usb_net_handle_dataout(USBNetState *s, USBPacket *p)
{
int sz = sizeof(s->out_buf) - s->out_ptr;
struct rndis_packet_msg_type *msg =
(struct rndis_packet_msg_type *) s->out_buf;
uint32_t len;
#ifdef TRAFFIC_DEBUG
fprintf(stderr, "usbnet: data out len %zu\n", p->iov.size);
iov_hexdump(p->iov.iov, p->iov.niov, stderr, "usbnet", p->iov.size);
#endif
if (sz > p->iov.size) {
sz = p->iov.size;
}
usb_packet_copy(p, &s->out_buf[s->out_ptr], sz);
s->out_ptr += sz;
if (!is_rndis(s)) {
if (p->iov.size < 64) {
qemu_send_packet(qemu_get_queue(s->nic), s->out_buf, s->out_ptr);
s->out_ptr = 0;
}
return;
}
len = le32_to_cpu(msg->MessageLength);
if (s->out_ptr < 8 || s->out_ptr < len) {
return;
}
if (le32_to_cpu(msg->MessageType) == RNDIS_PACKET_MSG) {
uint32_t offs = 8 + le32_to_cpu(msg->DataOffset);
uint32_t size = le32_to_cpu(msg->DataLength);
if (offs + size <= len)
qemu_send_packet(qemu_get_queue(s->nic), s->out_buf + offs, size);
}
s->out_ptr -= len;
memmove(s->out_buf, &s->out_buf[len], s->out_ptr);
}
|
C
|
qemu
| 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::OnWindowPosChanged(WINDOWPOS* window_pos) {
if (DidClientAreaSizeChange(window_pos))
ClientAreaSizeChanged();
if (remove_standard_frame_ && window_pos->flags & SWP_FRAMECHANGED &&
ui::win::IsAeroGlassEnabled() &&
(window_ex_style() & WS_EX_COMPOSITED) == 0) {
MARGINS m = {10, 10, 10, 10};
DwmExtendFrameIntoClientArea(hwnd(), &m);
}
if (window_pos->flags & SWP_SHOWWINDOW)
delegate_->HandleVisibilityChanged(true);
else if (window_pos->flags & SWP_HIDEWINDOW)
delegate_->HandleVisibilityChanged(false);
SetMsgHandled(FALSE);
}
|
void HWNDMessageHandler::OnWindowPosChanged(WINDOWPOS* window_pos) {
if (DidClientAreaSizeChange(window_pos))
ClientAreaSizeChanged();
if (remove_standard_frame_ && window_pos->flags & SWP_FRAMECHANGED &&
ui::win::IsAeroGlassEnabled() &&
(window_ex_style() & WS_EX_COMPOSITED) == 0) {
MARGINS m = {10, 10, 10, 10};
DwmExtendFrameIntoClientArea(hwnd(), &m);
}
if (window_pos->flags & SWP_SHOWWINDOW)
delegate_->HandleVisibilityChanged(true);
else if (window_pos->flags & SWP_HIDEWINDOW)
delegate_->HandleVisibilityChanged(false);
SetMsgHandled(FALSE);
}
|
C
|
Chrome
| 0 |
CVE-2017-12982
|
https://www.cvedetails.com/cve/CVE-2017-12982/
|
CWE-119
|
https://github.com/uclouvain/openjpeg/commit/baf0c1ad4572daa89caa3b12985bdd93530f0dd7
|
baf0c1ad4572daa89caa3b12985bdd93530f0dd7
|
bmp_read_info_header(): reject bmp files with biBitCount == 0 (#983)
|
static void bmp_mask_get_shift_and_prec(OPJ_UINT32 mask, OPJ_UINT32* shift,
OPJ_UINT32* prec)
{
OPJ_UINT32 l_shift, l_prec;
l_shift = l_prec = 0U;
if (mask != 0U) {
while ((mask & 1U) == 0U) {
mask >>= 1;
l_shift++;
}
while (mask & 1U) {
mask >>= 1;
l_prec++;
}
}
*shift = l_shift;
*prec = l_prec;
}
|
static void bmp_mask_get_shift_and_prec(OPJ_UINT32 mask, OPJ_UINT32* shift,
OPJ_UINT32* prec)
{
OPJ_UINT32 l_shift, l_prec;
l_shift = l_prec = 0U;
if (mask != 0U) {
while ((mask & 1U) == 0U) {
mask >>= 1;
l_shift++;
}
while (mask & 1U) {
mask >>= 1;
l_prec++;
}
}
*shift = l_shift;
*prec = l_prec;
}
|
C
|
openjpeg
| 0 |
CVE-2015-1793
|
https://www.cvedetails.com/cve/CVE-2015-1793/
|
CWE-254
|
https://git.openssl.org/?p=openssl.git;a=commit;h=9a0db453ba017ebcaccbee933ee6511a9ae4d1c8
|
9a0db453ba017ebcaccbee933ee6511a9ae4d1c8
| null |
void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param)
{
if (ctx->param)
X509_VERIFY_PARAM_free(ctx->param);
ctx->param = param;
}
|
void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param)
{
if (ctx->param)
X509_VERIFY_PARAM_free(ctx->param);
ctx->param = param;
}
|
C
|
openssl
| 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 |
int DCTStream::readAmp(int size) {
int amp, bit;
int bits;
amp = 0;
for (bits = 0; bits < size; ++bits) {
if ((bit = readBit()) == EOF)
return 9999;
amp = (amp << 1) + bit;
}
if (amp < (1 << (size - 1)))
amp -= (1 << size) - 1;
return amp;
}
|
int DCTStream::readAmp(int size) {
int amp, bit;
int bits;
amp = 0;
for (bits = 0; bits < size; ++bits) {
if ((bit = readBit()) == EOF)
return 9999;
amp = (amp << 1) + bit;
}
if (amp < (1 << (size - 1)))
amp -= (1 << size) - 1;
return amp;
}
|
CPP
|
poppler
| 0 |
CVE-2016-9557
|
https://www.cvedetails.com/cve/CVE-2016-9557/
|
CWE-190
|
https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a
|
d42b2388f7f8e0332c846675133acea151fc557a
|
The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now.
|
int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1)
{
jas_matind_t i;
jas_matind_t j;
if (mat0->numrows_ != mat1->numrows_ || mat0->numcols_ !=
mat1->numcols_) {
return 1;
}
for (i = 0; i < mat0->numrows_; i++) {
for (j = 0; j < mat0->numcols_; j++) {
if (jas_matrix_get(mat0, i, j) != jas_matrix_get(mat1, i, j)) {
return 1;
}
}
}
return 0;
}
|
int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1)
{
int i;
int j;
if (mat0->numrows_ != mat1->numrows_ || mat0->numcols_ !=
mat1->numcols_) {
return 1;
}
for (i = 0; i < mat0->numrows_; i++) {
for (j = 0; j < mat0->numcols_; j++) {
if (jas_matrix_get(mat0, i, j) != jas_matrix_get(mat1, i, j)) {
return 1;
}
}
}
return 0;
}
|
C
|
jasper
| 1 |
CVE-2016-10208
|
https://www.cvedetails.com/cve/CVE-2016-10208/
|
CWE-125
|
https://github.com/torvalds/linux/commit/3a4b77cd47bb837b8557595ec7425f281f2ca1fe
|
3a4b77cd47bb837b8557595ec7425f281f2ca1fe
|
ext4: validate s_first_meta_bg at mount time
Ralf Spenneberg reported that he hit a kernel crash when mounting a
modified ext4 image. And it turns out that kernel crashed when
calculating fs overhead (ext4_calculate_overhead()), this is because
the image has very large s_first_meta_bg (debug code shows it's
842150400), and ext4 overruns the memory in count_overhead() when
setting bitmap buffer, which is PAGE_SIZE.
ext4_calculate_overhead():
buf = get_zeroed_page(GFP_NOFS); <=== PAGE_SIZE buffer
blks = count_overhead(sb, i, buf);
count_overhead():
for (j = ext4_bg_num_gdb(sb, grp); j > 0; j--) { <=== j = 842150400
ext4_set_bit(EXT4_B2C(sbi, s++), buf); <=== buffer overrun
count++;
}
This can be reproduced easily for me by this script:
#!/bin/bash
rm -f fs.img
mkdir -p /mnt/ext4
fallocate -l 16M fs.img
mke2fs -t ext4 -O bigalloc,meta_bg,^resize_inode -F fs.img
debugfs -w -R "ssv first_meta_bg 842150400" fs.img
mount -o loop fs.img /mnt/ext4
Fix it by validating s_first_meta_bg first at mount time, and
refusing to mount if its value exceeds the largest possible meta_bg
number.
Reported-by: Ralf Spenneberg <[email protected]>
Signed-off-by: Eryu Guan <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Reviewed-by: Andreas Dilger <[email protected]>
|
static int ext4_lazyinit_thread(void *arg)
{
struct ext4_lazy_init *eli = (struct ext4_lazy_init *)arg;
struct list_head *pos, *n;
struct ext4_li_request *elr;
unsigned long next_wakeup, cur;
BUG_ON(NULL == eli);
cont_thread:
while (true) {
next_wakeup = MAX_JIFFY_OFFSET;
mutex_lock(&eli->li_list_mtx);
if (list_empty(&eli->li_request_list)) {
mutex_unlock(&eli->li_list_mtx);
goto exit_thread;
}
list_for_each_safe(pos, n, &eli->li_request_list) {
int err = 0;
int progress = 0;
elr = list_entry(pos, struct ext4_li_request,
lr_request);
if (time_before(jiffies, elr->lr_next_sched)) {
if (time_before(elr->lr_next_sched, next_wakeup))
next_wakeup = elr->lr_next_sched;
continue;
}
if (down_read_trylock(&elr->lr_super->s_umount)) {
if (sb_start_write_trylock(elr->lr_super)) {
progress = 1;
/*
* We hold sb->s_umount, sb can not
* be removed from the list, it is
* now safe to drop li_list_mtx
*/
mutex_unlock(&eli->li_list_mtx);
err = ext4_run_li_request(elr);
sb_end_write(elr->lr_super);
mutex_lock(&eli->li_list_mtx);
n = pos->next;
}
up_read((&elr->lr_super->s_umount));
}
/* error, remove the lazy_init job */
if (err) {
ext4_remove_li_request(elr);
continue;
}
if (!progress) {
elr->lr_next_sched = jiffies +
(prandom_u32()
% (EXT4_DEF_LI_MAX_START_DELAY * HZ));
}
if (time_before(elr->lr_next_sched, next_wakeup))
next_wakeup = elr->lr_next_sched;
}
mutex_unlock(&eli->li_list_mtx);
try_to_freeze();
cur = jiffies;
if ((time_after_eq(cur, next_wakeup)) ||
(MAX_JIFFY_OFFSET == next_wakeup)) {
cond_resched();
continue;
}
schedule_timeout_interruptible(next_wakeup - cur);
if (kthread_should_stop()) {
ext4_clear_request_list();
goto exit_thread;
}
}
exit_thread:
/*
* It looks like the request list is empty, but we need
* to check it under the li_list_mtx lock, to prevent any
* additions into it, and of course we should lock ext4_li_mtx
* to atomically free the list and ext4_li_info, because at
* this point another ext4 filesystem could be registering
* new one.
*/
mutex_lock(&ext4_li_mtx);
mutex_lock(&eli->li_list_mtx);
if (!list_empty(&eli->li_request_list)) {
mutex_unlock(&eli->li_list_mtx);
mutex_unlock(&ext4_li_mtx);
goto cont_thread;
}
mutex_unlock(&eli->li_list_mtx);
kfree(ext4_li_info);
ext4_li_info = NULL;
mutex_unlock(&ext4_li_mtx);
return 0;
}
|
static int ext4_lazyinit_thread(void *arg)
{
struct ext4_lazy_init *eli = (struct ext4_lazy_init *)arg;
struct list_head *pos, *n;
struct ext4_li_request *elr;
unsigned long next_wakeup, cur;
BUG_ON(NULL == eli);
cont_thread:
while (true) {
next_wakeup = MAX_JIFFY_OFFSET;
mutex_lock(&eli->li_list_mtx);
if (list_empty(&eli->li_request_list)) {
mutex_unlock(&eli->li_list_mtx);
goto exit_thread;
}
list_for_each_safe(pos, n, &eli->li_request_list) {
int err = 0;
int progress = 0;
elr = list_entry(pos, struct ext4_li_request,
lr_request);
if (time_before(jiffies, elr->lr_next_sched)) {
if (time_before(elr->lr_next_sched, next_wakeup))
next_wakeup = elr->lr_next_sched;
continue;
}
if (down_read_trylock(&elr->lr_super->s_umount)) {
if (sb_start_write_trylock(elr->lr_super)) {
progress = 1;
/*
* We hold sb->s_umount, sb can not
* be removed from the list, it is
* now safe to drop li_list_mtx
*/
mutex_unlock(&eli->li_list_mtx);
err = ext4_run_li_request(elr);
sb_end_write(elr->lr_super);
mutex_lock(&eli->li_list_mtx);
n = pos->next;
}
up_read((&elr->lr_super->s_umount));
}
/* error, remove the lazy_init job */
if (err) {
ext4_remove_li_request(elr);
continue;
}
if (!progress) {
elr->lr_next_sched = jiffies +
(prandom_u32()
% (EXT4_DEF_LI_MAX_START_DELAY * HZ));
}
if (time_before(elr->lr_next_sched, next_wakeup))
next_wakeup = elr->lr_next_sched;
}
mutex_unlock(&eli->li_list_mtx);
try_to_freeze();
cur = jiffies;
if ((time_after_eq(cur, next_wakeup)) ||
(MAX_JIFFY_OFFSET == next_wakeup)) {
cond_resched();
continue;
}
schedule_timeout_interruptible(next_wakeup - cur);
if (kthread_should_stop()) {
ext4_clear_request_list();
goto exit_thread;
}
}
exit_thread:
/*
* It looks like the request list is empty, but we need
* to check it under the li_list_mtx lock, to prevent any
* additions into it, and of course we should lock ext4_li_mtx
* to atomically free the list and ext4_li_info, because at
* this point another ext4 filesystem could be registering
* new one.
*/
mutex_lock(&ext4_li_mtx);
mutex_lock(&eli->li_list_mtx);
if (!list_empty(&eli->li_request_list)) {
mutex_unlock(&eli->li_list_mtx);
mutex_unlock(&ext4_li_mtx);
goto cont_thread;
}
mutex_unlock(&eli->li_list_mtx);
kfree(ext4_li_info);
ext4_li_info = NULL;
mutex_unlock(&ext4_li_mtx);
return 0;
}
|
C
|
linux
| 0 |
CVE-2012-0044
|
https://www.cvedetails.com/cve/CVE-2012-0044/
|
CWE-189
|
https://github.com/torvalds/linux/commit/a5cd335165e31db9dbab636fd29895d41da55dd2
|
a5cd335165e31db9dbab636fd29895d41da55dd2
|
drm: integer overflow in drm_mode_dirtyfb_ioctl()
There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips. The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.
Reported-by: Haogang Chen <[email protected]>
Signed-off-by: Xi Wang <[email protected]>
Cc: [email protected]
Signed-off-by: Dave Airlie <[email protected]>
|
int drm_mode_attachmode_crtc(struct drm_device *dev, struct drm_crtc *crtc,
struct drm_display_mode *mode)
{
struct drm_connector *connector;
int ret = 0;
struct drm_display_mode *dup_mode;
int need_dup = 0;
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (!connector->encoder)
break;
if (connector->encoder->crtc == crtc) {
if (need_dup)
dup_mode = drm_mode_duplicate(dev, mode);
else
dup_mode = mode;
ret = drm_mode_attachmode(dev, connector, dup_mode);
if (ret)
return ret;
need_dup = 1;
}
}
return 0;
}
|
int drm_mode_attachmode_crtc(struct drm_device *dev, struct drm_crtc *crtc,
struct drm_display_mode *mode)
{
struct drm_connector *connector;
int ret = 0;
struct drm_display_mode *dup_mode;
int need_dup = 0;
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (!connector->encoder)
break;
if (connector->encoder->crtc == crtc) {
if (need_dup)
dup_mode = drm_mode_duplicate(dev, mode);
else
dup_mode = mode;
ret = drm_mode_attachmode(dev, connector, dup_mode);
if (ret)
return ret;
need_dup = 1;
}
}
return 0;
}
|
C
|
linux
| 0 |
CVE-2018-6085
|
https://www.cvedetails.com/cve/CVE-2018-6085/
|
CWE-20
|
https://github.com/chromium/chromium/commit/df5b1e1f88e013bc96107cc52c4a4f33a8238444
|
df5b1e1f88e013bc96107cc52c4a4f33a8238444
|
Blockfile cache: fix long-standing sparse + evict reentrancy problem
Thanks to nedwilliamson@ (on gmail) for an alternative perspective
plus a reduction to make fixing this much easier.
Bug: 826626, 518908, 537063, 802886
Change-Id: Ibfa01416f9a8e7f7b361e4f93b4b6b134728b85f
Reviewed-on: https://chromium-review.googlesource.com/985052
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Maks Orlovich <[email protected]>
Cr-Commit-Position: refs/heads/master@{#547103}
|
int BackendImpl::SyncOpenEntry(const std::string& key,
scoped_refptr<EntryImpl>* entry) {
DCHECK(entry);
*entry = OpenEntryImpl(key);
return (*entry) ? net::OK : net::ERR_FAILED;
}
|
int BackendImpl::SyncOpenEntry(const std::string& key,
scoped_refptr<EntryImpl>* entry) {
DCHECK(entry);
*entry = OpenEntryImpl(key);
return (*entry) ? net::OK : net::ERR_FAILED;
}
|
C
|
Chrome
| 0 |
CVE-2017-5112
|
https://www.cvedetails.com/cve/CVE-2017-5112/
|
CWE-119
|
https://github.com/chromium/chromium/commit/f6ac1dba5e36f338a490752a2cbef3339096d9fe
|
f6ac1dba5e36f338a490752a2cbef3339096d9fe
|
Reset ES3 pixel pack parameters and PIXEL_PACK_BUFFER binding in DrawingBuffer before ReadPixels() and recover them later.
BUG=740603
TEST=new conformance test
[email protected],[email protected]
Change-Id: I3ea54c6cc34f34e249f7c8b9f792d93c5e1958f4
Reviewed-on: https://chromium-review.googlesource.com/570840
Reviewed-by: Antoine Labour <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Zhenyao Mo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#486518}
|
void WebGLRenderingContextBase::blendEquationSeparate(GLenum mode_rgb,
GLenum mode_alpha) {
if (isContextLost() ||
!ValidateBlendEquation("blendEquationSeparate", mode_rgb) ||
!ValidateBlendEquation("blendEquationSeparate", mode_alpha))
return;
ContextGL()->BlendEquationSeparate(mode_rgb, mode_alpha);
}
|
void WebGLRenderingContextBase::blendEquationSeparate(GLenum mode_rgb,
GLenum mode_alpha) {
if (isContextLost() ||
!ValidateBlendEquation("blendEquationSeparate", mode_rgb) ||
!ValidateBlendEquation("blendEquationSeparate", mode_alpha))
return;
ContextGL()->BlendEquationSeparate(mode_rgb, mode_alpha);
}
|
C
|
Chrome
| 0 |
CVE-2015-1271
|
https://www.cvedetails.com/cve/CVE-2015-1271/
|
CWE-119
|
https://github.com/chromium/chromium/commit/74fce5949bdf05a92c2bc0bd98e6e3e977c55376
|
74fce5949bdf05a92c2bc0bd98e6e3e977c55376
|
Fixed volume slider element event handling
MediaControlVolumeSliderElement::defaultEventHandler has making
redundant calls to setVolume() & setMuted() on mouse activity. E.g. if
a mouse click changed the slider position, the above calls were made 4
times, once for each of these events: mousedown, input, mouseup,
DOMActive, click. This crack got exposed when PointerEvents are enabled
by default on M55, adding pointermove, pointerdown & pointerup to the
list.
This CL fixes the code to trigger the calls to setVolume() & setMuted()
only when the slider position is changed. Also added pointer events to
certain lists of mouse events in the code.
BUG=677900
Review-Url: https://codereview.chromium.org/2622273003
Cr-Commit-Position: refs/heads/master@{#446032}
|
void MediaControlTextTrackListElement::defaultEventHandler(Event* event) {
if (event->type() == EventTypeNames::change) {
Node* target = event->target()->toNode();
if (!target || !target->isElementNode())
return;
mediaControls().disableShowingTextTracks();
int trackIndex =
toElement(target)->getIntegralAttribute(trackIndexAttrName());
if (trackIndex != trackIndexOffValue) {
DCHECK_GE(trackIndex, 0);
mediaControls().showTextTrackAtIndex(trackIndex);
mediaElement().disableAutomaticTextTrackSelection();
}
event->setDefaultHandled();
}
MediaControlDivElement::defaultEventHandler(event);
}
|
void MediaControlTextTrackListElement::defaultEventHandler(Event* event) {
if (event->type() == EventTypeNames::change) {
Node* target = event->target()->toNode();
if (!target || !target->isElementNode())
return;
mediaControls().disableShowingTextTracks();
int trackIndex =
toElement(target)->getIntegralAttribute(trackIndexAttrName());
if (trackIndex != trackIndexOffValue) {
DCHECK_GE(trackIndex, 0);
mediaControls().showTextTrackAtIndex(trackIndex);
mediaElement().disableAutomaticTextTrackSelection();
}
event->setDefaultHandled();
}
MediaControlDivElement::defaultEventHandler(event);
}
|
C
|
Chrome
| 0 |
CVE-2013-0904
|
https://www.cvedetails.com/cve/CVE-2013-0904/
|
CWE-119
|
https://github.com/chromium/chromium/commit/b2b21468c1f7f08b30a7c1755316f6026c50eb2a
|
b2b21468c1f7f08b30a7c1755316f6026c50eb2a
|
Separate repaint and layout requirements of StyleDifference (Step 1)
Previously StyleDifference was an enum that proximately bigger values
imply smaller values (e.g. StyleDifferenceLayout implies
StyleDifferenceRepaint). This causes unnecessary repaints in some cases
on layout change.
Convert StyleDifference to a structure containing relatively independent
flags.
This change doesn't directly improve the result, but can make further
repaint optimizations possible.
Step 1 doesn't change any functionality. RenderStyle still generate the
legacy StyleDifference enum when comparing styles and convert the result
to the new StyleDifference. Implicit requirements are not handled during
the conversion.
Converted call sites to use the new StyleDifference according to the
following conversion rules:
- diff == StyleDifferenceEqual (&& !context) => diff.hasNoChange()
- diff == StyleDifferenceRepaint => diff.needsRepaintObjectOnly()
- diff == StyleDifferenceRepaintLayer => diff.needsRepaintLayer()
- diff == StyleDifferenceRepaint || diff == StyleDifferenceRepaintLayer => diff.needsRepaintLayer()
- diff >= StyleDifferenceRepaint => diff.needsRepaint() || diff.needsLayout()
- diff >= StyleDifferenceRepaintLayer => diff.needsRepaintLayer() || diff.needsLayout()
- diff > StyleDifferenceRepaintLayer => diff.needsLayout()
- diff == StyleDifferencePositionedMovementLayoutOnly => diff.needsPositionedMovementLayoutOnly()
- diff == StyleDifferenceLayout => diff.needsFullLayout()
BUG=358460
TEST=All existing layout tests.
[email protected], [email protected], [email protected]
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171983
Review URL: https://codereview.chromium.org/236203020
git-svn-id: svn://svn.chromium.org/blink/trunk@172331 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
PaintPhase paintPhase = paintInfo.phase;
LayoutPoint scrolledOffset = paintOffset;
if (hasOverflowClip())
scrolledOffset.move(-scrolledContentOffset());
if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style()->visibility() == VISIBLE) {
if (hasBoxDecorations())
paintBoxDecorations(paintInfo, paintOffset);
if (hasColumns() && !paintInfo.paintRootBackgroundOnly())
paintColumnRules(paintInfo, scrolledOffset);
}
if (paintPhase == PaintPhaseMask && style()->visibility() == VISIBLE) {
paintMask(paintInfo, paintOffset);
return;
}
if (paintPhase == PaintPhaseClippingMask && style()->visibility() == VISIBLE) {
paintClippingMask(paintInfo, paintOffset);
return;
}
if (paintPhase == PaintPhaseBlockBackground || paintInfo.paintRootBackgroundOnly())
return;
if (paintPhase != PaintPhaseSelfOutline) {
if (hasColumns())
paintColumnContents(paintInfo, scrolledOffset);
else
paintContents(paintInfo, scrolledOffset);
}
bool isPrinting = document().printing();
if (!isPrinting && !hasColumns())
paintSelection(paintInfo, scrolledOffset); // Fill in gaps in selection on lines and between blocks.
if (paintPhase == PaintPhaseFloat || paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip) {
if (hasColumns())
paintColumnContents(paintInfo, scrolledOffset, true);
else
paintFloats(paintInfo, scrolledOffset, paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip);
}
if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style()->visibility() == VISIBLE)
paintOutline(paintInfo, LayoutRect(paintOffset, size()));
if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutlines)) {
RenderInline* inlineCont = inlineElementContinuation();
if (inlineCont && inlineCont->hasOutline() && inlineCont->style()->visibility() == VISIBLE) {
RenderInline* inlineRenderer = toRenderInline(inlineCont->node()->renderer());
RenderBlock* cb = containingBlock();
bool inlineEnclosedInSelfPaintingLayer = false;
for (RenderBoxModelObject* box = inlineRenderer; box != cb; box = box->parent()->enclosingBoxModelObject()) {
if (box->hasSelfPaintingLayer()) {
inlineEnclosedInSelfPaintingLayer = true;
break;
}
}
if (!inlineEnclosedInSelfPaintingLayer && !hasLayer())
cb->addContinuationWithOutline(inlineRenderer);
else if (!inlineRenderer->firstLineBox() || (!inlineEnclosedInSelfPaintingLayer && hasLayer()))
inlineRenderer->paintOutline(paintInfo, paintOffset - locationOffset() + inlineRenderer->containingBlock()->location());
}
paintContinuationOutlines(paintInfo, paintOffset);
}
if (paintPhase == PaintPhaseForeground) {
paintCaret(paintInfo, paintOffset, CursorCaret);
paintCaret(paintInfo, paintOffset, DragCaret);
}
}
|
void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
PaintPhase paintPhase = paintInfo.phase;
LayoutPoint scrolledOffset = paintOffset;
if (hasOverflowClip())
scrolledOffset.move(-scrolledContentOffset());
if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style()->visibility() == VISIBLE) {
if (hasBoxDecorations())
paintBoxDecorations(paintInfo, paintOffset);
if (hasColumns() && !paintInfo.paintRootBackgroundOnly())
paintColumnRules(paintInfo, scrolledOffset);
}
if (paintPhase == PaintPhaseMask && style()->visibility() == VISIBLE) {
paintMask(paintInfo, paintOffset);
return;
}
if (paintPhase == PaintPhaseClippingMask && style()->visibility() == VISIBLE) {
paintClippingMask(paintInfo, paintOffset);
return;
}
if (paintPhase == PaintPhaseBlockBackground || paintInfo.paintRootBackgroundOnly())
return;
if (paintPhase != PaintPhaseSelfOutline) {
if (hasColumns())
paintColumnContents(paintInfo, scrolledOffset);
else
paintContents(paintInfo, scrolledOffset);
}
bool isPrinting = document().printing();
if (!isPrinting && !hasColumns())
paintSelection(paintInfo, scrolledOffset); // Fill in gaps in selection on lines and between blocks.
if (paintPhase == PaintPhaseFloat || paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip) {
if (hasColumns())
paintColumnContents(paintInfo, scrolledOffset, true);
else
paintFloats(paintInfo, scrolledOffset, paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip);
}
if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style()->visibility() == VISIBLE)
paintOutline(paintInfo, LayoutRect(paintOffset, size()));
if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutlines)) {
RenderInline* inlineCont = inlineElementContinuation();
if (inlineCont && inlineCont->hasOutline() && inlineCont->style()->visibility() == VISIBLE) {
RenderInline* inlineRenderer = toRenderInline(inlineCont->node()->renderer());
RenderBlock* cb = containingBlock();
bool inlineEnclosedInSelfPaintingLayer = false;
for (RenderBoxModelObject* box = inlineRenderer; box != cb; box = box->parent()->enclosingBoxModelObject()) {
if (box->hasSelfPaintingLayer()) {
inlineEnclosedInSelfPaintingLayer = true;
break;
}
}
if (!inlineEnclosedInSelfPaintingLayer && !hasLayer())
cb->addContinuationWithOutline(inlineRenderer);
else if (!inlineRenderer->firstLineBox() || (!inlineEnclosedInSelfPaintingLayer && hasLayer()))
inlineRenderer->paintOutline(paintInfo, paintOffset - locationOffset() + inlineRenderer->containingBlock()->location());
}
paintContinuationOutlines(paintInfo, paintOffset);
}
if (paintPhase == PaintPhaseForeground) {
paintCaret(paintInfo, paintOffset, CursorCaret);
paintCaret(paintInfo, paintOffset, DragCaret);
}
}
|
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 int pivot_root(const char * new_root, const char * put_old)
{
#ifdef __NR_pivot_root
return syscall(__NR_pivot_root, new_root, put_old);
#else
errno = ENOSYS;
return -1;
#endif
}
|
static int pivot_root(const char * new_root, const char * put_old)
{
#ifdef __NR_pivot_root
return syscall(__NR_pivot_root, new_root, put_old);
#else
errno = ENOSYS;
return -1;
#endif
}
|
C
|
lxc
| 0 |
CVE-2015-6787
|
https://www.cvedetails.com/cve/CVE-2015-6787/
| null |
https://github.com/chromium/chromium/commit/f911e11e7f6b5c0d6f5ee694a9871de6619889f7
|
f911e11e7f6b5c0d6f5ee694a9871de6619889f7
|
Reland "[CI] Make paint property nodes non-ref-counted"
This reverts commit 887383b30842d9d9006e11bb6932660a3cb5b1b7.
Reason for revert: Retry in M69.
Original change's description:
> Revert "[CI] Make paint property nodes non-ref-counted"
>
> This reverts commit 70fc0b018c9517558b7aa2be00edf2debb449123.
>
> Reason for revert: Caused bugs found by clusterfuzz
>
> Original change's description:
> > [CI] Make paint property nodes non-ref-counted
> >
> > Now all paint property nodes are owned by ObjectPaintProperties
> > (and LocalFrameView temporarily before removing non-RLS mode).
> > Others just use raw pointers or references.
> >
> > Bug: 833496
> > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> > Change-Id: I2d544fe153bb94698623248748df63c8aa2081ae
> > Reviewed-on: https://chromium-review.googlesource.com/1031101
> > Reviewed-by: Tien-Ren Chen <[email protected]>
> > Commit-Queue: Xianzhu Wang <[email protected]>
> > Cr-Commit-Position: refs/heads/master@{#554626}
>
> [email protected],[email protected],[email protected]
>
> Change-Id: I02bb50d6744cb81a797246a0116b677e80a3c69f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 833496,837932,837943
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Reviewed-on: https://chromium-review.googlesource.com/1034292
> Reviewed-by: Xianzhu Wang <[email protected]>
> Commit-Queue: Xianzhu Wang <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#554653}
[email protected],[email protected],[email protected]
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 833496, 837932, 837943
Change-Id: I0b4ef70db1f1f211ba97c30d617225355c750992
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/1083491
Commit-Queue: Xianzhu Wang <[email protected]>
Reviewed-by: Xianzhu Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#563930}
|
void ScrollHitTestDisplayItem::AppendToDisplayItemList(
const FloatSize&,
cc::DisplayItemList&) const {
NOTREACHED();
}
|
void ScrollHitTestDisplayItem::AppendToDisplayItemList(
const FloatSize&,
cc::DisplayItemList&) const {
NOTREACHED();
}
|
C
|
Chrome
| 0 |
CVE-2018-6125
| null | null |
https://github.com/chromium/chromium/commit/ac149a8d4371c0e01e0934fdd57b09e86f96b5b9
|
ac149a8d4371c0e01e0934fdd57b09e86f96b5b9
|
Remove libusb-Windows support for HID devices
This patch removes the Windows-specific support in libusb that provided
a translation between the WinUSB API and the HID API. Applications
currently depending on this using the chrome.usb API should switch to
using the chrome.hid API.
Bug: 818592
Change-Id: I82ee6ccdcbccc21d2910dc62845c7785e78b64f6
Reviewed-on: https://chromium-review.googlesource.com/951635
Reviewed-by: Ken Rockot <[email protected]>
Commit-Queue: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/master@{#541265}
|
static int unsupported_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size) {
PRINT_UNSUPPORTED_API(copy_transfer_data);
}
|
static int unsupported_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size) {
PRINT_UNSUPPORTED_API(copy_transfer_data);
}
|
C
|
Chrome
| 0 |
CVE-2014-9425
|
https://www.cvedetails.com/cve/CVE-2014-9425/
| null |
https://git.php.net/?p=php-src.git;a=commit;h=2bcf69d073190e4f032d883f3416dea1b027a39e
|
2bcf69d073190e4f032d883f3416dea1b027a39e
| null |
ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor)
{
begin_read(source);
begin_write(target);
zend_hash_copy(TS_HASH(target), TS_HASH(source), pCopyConstructor);
end_write(target);
end_read(source);
}
|
ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor)
{
begin_read(source);
begin_write(target);
zend_hash_copy(TS_HASH(target), TS_HASH(source), pCopyConstructor);
end_write(target);
end_read(source);
}
|
C
|
php
| 0 |
CVE-2016-3839
|
https://www.cvedetails.com/cve/CVE-2016-3839/
|
CWE-284
|
https://android.googlesource.com/platform/system/bt/+/472271b153c5dc53c28beac55480a8d8434b2d5c
|
472271b153c5dc53c28beac55480a8d8434b2d5c
|
DO NOT MERGE Fix potential DoS caused by delivering signal to BT process
Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360
Conflicts:
btif/co/bta_hh_co.c
btif/src/btif_core.c
Merge conflict resolution of ag/1161415 (referencing ag/1164670)
- Directly into mnc-mr2-release
|
static inline int bta_role_to_btpan(int bta_pan_role)
{
int btpan_role = 0;
BTIF_TRACE_DEBUG("bta_pan_role:0x%x", bta_pan_role);
if (bta_pan_role & PAN_ROLE_NAP_SERVER)
btpan_role |= BTPAN_ROLE_PANNAP;
if (bta_pan_role & PAN_ROLE_CLIENT)
btpan_role |= BTPAN_ROLE_PANU;
return btpan_role;
}
|
static inline int bta_role_to_btpan(int bta_pan_role)
{
int btpan_role = 0;
BTIF_TRACE_DEBUG("bta_pan_role:0x%x", bta_pan_role);
if (bta_pan_role & PAN_ROLE_NAP_SERVER)
btpan_role |= BTPAN_ROLE_PANNAP;
if (bta_pan_role & PAN_ROLE_CLIENT)
btpan_role |= BTPAN_ROLE_PANU;
return btpan_role;
}
|
C
|
Android
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/19190765882e272a6a2162c89acdb29110f7e3cf
|
19190765882e272a6a2162c89acdb29110f7e3cf
|
Revert 102184 - [Sync] use base::Time in sync
Make EntryKernel/Entry/BaseNode use base::Time instead of int64s.
Add sync/util/time.h, with utility functions to manage the sync proto
time format.
Store times on disk in proto format instead of the local system.
This requires a database version bump (to 77).
Update SessionChangeProcessor/SessionModelAssociator
to use base::Time, too.
Remove hackish Now() function.
Remove ZeroFields() function, and instead zero-initialize in EntryKernel::EntryKernel() directly.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7981006
[email protected]
Review URL: http://codereview.chromium.org/7977034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102186 0039d316-1c4b-4281-b951-d872f2087c98
|
SessionChangeProcessor::SessionChangeProcessor(
UnrecoverableErrorHandler* error_handler,
SessionModelAssociator* session_model_associator)
: ChangeProcessor(error_handler),
session_model_associator_(session_model_associator),
profile_(NULL),
setup_for_test_(false) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(error_handler);
DCHECK(session_model_associator_);
}
|
SessionChangeProcessor::SessionChangeProcessor(
UnrecoverableErrorHandler* error_handler,
SessionModelAssociator* session_model_associator)
: ChangeProcessor(error_handler),
session_model_associator_(session_model_associator),
profile_(NULL),
setup_for_test_(false) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(error_handler);
DCHECK(session_model_associator_);
}
|
C
|
Chrome
| 0 |
CVE-2018-6152
|
https://www.cvedetails.com/cve/CVE-2018-6152/
| null |
https://github.com/chromium/chromium/commit/81ad563077484d112e544347da87c09dd2ba0af8
|
81ad563077484d112e544347da87c09dd2ba0af8
|
Always mark content downloaded by devtools delegate as potentially dangerous
Bug: 805445
Change-Id: I7051f519205e178db57e23320ab979f8fa9ce38b
Reviewed-on: https://chromium-review.googlesource.com/894782
Commit-Queue: David Vallet <[email protected]>
Reviewed-by: Pavel Feldman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#533215}
|
bool DevToolsDownloadManagerDelegate::ShouldOpenDownload(
content::DownloadItem* item,
const content::DownloadOpenDelayedCallback& callback) {
DevToolsDownloadManagerHelper* download_helper =
DevToolsDownloadManagerHelper::FromWebContents(item->GetWebContents());
if (download_helper)
return true;
if (proxy_download_delegate_)
return proxy_download_delegate_->ShouldOpenDownload(item, callback);
return false;
}
|
bool DevToolsDownloadManagerDelegate::ShouldOpenDownload(
content::DownloadItem* item,
const content::DownloadOpenDelayedCallback& callback) {
DevToolsDownloadManagerHelper* download_helper =
DevToolsDownloadManagerHelper::FromWebContents(item->GetWebContents());
if (download_helper)
return true;
if (proxy_download_delegate_)
return proxy_download_delegate_->ShouldOpenDownload(item, callback);
return false;
}
|
C
|
Chrome
| 0 |
CVE-2018-17467
|
https://www.cvedetails.com/cve/CVE-2018-17467/
|
CWE-20
|
https://github.com/chromium/chromium/commit/7da6c3419fd172405bcece1ae4ec6ec8316cd345
|
7da6c3419fd172405bcece1ae4ec6ec8316cd345
|
Start rendering timer after first navigation
Currently the new content rendering timer in the browser process,
which clears an old page's contents 4 seconds after a navigation if the
new page doesn't draw in that time, is not set on the first navigation
for a top-level frame.
This is problematic because content can exist before the first
navigation, for instance if it was created by a javascript: URL.
This CL removes the code that skips the timer activation on the first
navigation.
Bug: 844881
Change-Id: I19b3ad1ff62c69ded3a5f7b1c0afde191aaf4584
Reviewed-on: https://chromium-review.googlesource.com/1188589
Reviewed-by: Fady Samuel <[email protected]>
Reviewed-by: ccameron <[email protected]>
Commit-Queue: Ken Buchanan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586913}
|
void RenderWidgetHostImpl::DidUpdateVisualProperties(
const cc::RenderFrameMetadata& metadata) {
TRACE_EVENT0("renderer_host",
"RenderWidgetHostImpl::DidUpdateVisualProperties");
DCHECK(!metadata.viewport_size_in_pixels.IsEmpty());
visual_properties_ack_pending_ = false;
NotificationService::current()->Notify(
NOTIFICATION_RENDER_WIDGET_HOST_DID_UPDATE_VISUAL_PROPERTIES,
Source<RenderWidgetHost>(this), NotificationService::NoDetails());
if (!view_ || is_hidden_)
return;
viz::ScopedSurfaceIdAllocator scoped_allocator =
view_->DidUpdateVisualProperties(metadata);
if (auto_resize_enabled_ && delegate_) {
gfx::Size viewport_size_in_dip = gfx::ScaleToCeiledSize(
metadata.viewport_size_in_pixels, 1.f / metadata.device_scale_factor);
delegate_->ResizeDueToAutoResize(this, viewport_size_in_dip);
}
}
|
void RenderWidgetHostImpl::DidUpdateVisualProperties(
const cc::RenderFrameMetadata& metadata) {
TRACE_EVENT0("renderer_host",
"RenderWidgetHostImpl::DidUpdateVisualProperties");
DCHECK(!metadata.viewport_size_in_pixels.IsEmpty());
visual_properties_ack_pending_ = false;
NotificationService::current()->Notify(
NOTIFICATION_RENDER_WIDGET_HOST_DID_UPDATE_VISUAL_PROPERTIES,
Source<RenderWidgetHost>(this), NotificationService::NoDetails());
if (!view_ || is_hidden_)
return;
viz::ScopedSurfaceIdAllocator scoped_allocator =
view_->DidUpdateVisualProperties(metadata);
if (auto_resize_enabled_ && delegate_) {
gfx::Size viewport_size_in_dip = gfx::ScaleToCeiledSize(
metadata.viewport_size_in_pixels, 1.f / metadata.device_scale_factor);
delegate_->ResizeDueToAutoResize(this, viewport_size_in_dip);
}
}
|
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}
|
void StoragePartitionImpl::QuotaManagedDataDeletionHelper::ClearDataOnIOThread(
const scoped_refptr<storage::QuotaManager>& quota_manager,
const base::Time begin,
const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy,
const StoragePartition::OriginMatcherFunction& origin_matcher,
bool perform_storage_cleanup) {
IncrementTaskCountOnIO();
base::RepeatingClosure decrement_callback = base::BindRepeating(
&QuotaManagedDataDeletionHelper::DecrementTaskCountOnIO,
base::Unretained(this));
if (quota_storage_remove_mask_ & QUOTA_MANAGED_STORAGE_MASK_PERSISTENT) {
IncrementTaskCountOnIO();
quota_manager->GetOriginsModifiedSince(
blink::mojom::StorageType::kPersistent, begin,
base::BindOnce(&QuotaManagedDataDeletionHelper::ClearOriginsOnIOThread,
base::Unretained(this), base::RetainedRef(quota_manager),
special_storage_policy, origin_matcher,
perform_storage_cleanup, decrement_callback));
}
if (quota_storage_remove_mask_ & QUOTA_MANAGED_STORAGE_MASK_TEMPORARY) {
IncrementTaskCountOnIO();
quota_manager->GetOriginsModifiedSince(
blink::mojom::StorageType::kTemporary, begin,
base::BindOnce(&QuotaManagedDataDeletionHelper::ClearOriginsOnIOThread,
base::Unretained(this), base::RetainedRef(quota_manager),
special_storage_policy, origin_matcher,
perform_storage_cleanup, decrement_callback));
}
if (quota_storage_remove_mask_ & QUOTA_MANAGED_STORAGE_MASK_SYNCABLE) {
IncrementTaskCountOnIO();
quota_manager->GetOriginsModifiedSince(
blink::mojom::StorageType::kSyncable, begin,
base::BindOnce(&QuotaManagedDataDeletionHelper::ClearOriginsOnIOThread,
base::Unretained(this), base::RetainedRef(quota_manager),
special_storage_policy, origin_matcher,
perform_storage_cleanup, decrement_callback));
}
DecrementTaskCountOnIO();
}
|
void StoragePartitionImpl::QuotaManagedDataDeletionHelper::ClearDataOnIOThread(
const scoped_refptr<storage::QuotaManager>& quota_manager,
const base::Time begin,
const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy,
const StoragePartition::OriginMatcherFunction& origin_matcher,
bool perform_storage_cleanup) {
IncrementTaskCountOnIO();
base::RepeatingClosure decrement_callback = base::BindRepeating(
&QuotaManagedDataDeletionHelper::DecrementTaskCountOnIO,
base::Unretained(this));
if (quota_storage_remove_mask_ & QUOTA_MANAGED_STORAGE_MASK_PERSISTENT) {
IncrementTaskCountOnIO();
quota_manager->GetOriginsModifiedSince(
blink::mojom::StorageType::kPersistent, begin,
base::BindOnce(&QuotaManagedDataDeletionHelper::ClearOriginsOnIOThread,
base::Unretained(this), base::RetainedRef(quota_manager),
special_storage_policy, origin_matcher,
perform_storage_cleanup, decrement_callback));
}
if (quota_storage_remove_mask_ & QUOTA_MANAGED_STORAGE_MASK_TEMPORARY) {
IncrementTaskCountOnIO();
quota_manager->GetOriginsModifiedSince(
blink::mojom::StorageType::kTemporary, begin,
base::BindOnce(&QuotaManagedDataDeletionHelper::ClearOriginsOnIOThread,
base::Unretained(this), base::RetainedRef(quota_manager),
special_storage_policy, origin_matcher,
perform_storage_cleanup, decrement_callback));
}
if (quota_storage_remove_mask_ & QUOTA_MANAGED_STORAGE_MASK_SYNCABLE) {
IncrementTaskCountOnIO();
quota_manager->GetOriginsModifiedSince(
blink::mojom::StorageType::kSyncable, begin,
base::BindOnce(&QuotaManagedDataDeletionHelper::ClearOriginsOnIOThread,
base::Unretained(this), base::RetainedRef(quota_manager),
special_storage_policy, origin_matcher,
perform_storage_cleanup, decrement_callback));
}
DecrementTaskCountOnIO();
}
|
C
|
Chrome
| 0 |
CVE-2015-6763
|
https://www.cvedetails.com/cve/CVE-2015-6763/
| null |
https://github.com/chromium/chromium/commit/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables secure text input
when activated and it's in the secure text entry mode.
RenderWidgetHostViewMac did the similar thing for ages following the
WebKit example.
views::Textfield needs to do the same thing in a fashion that's
sycnrhonized with RenderWidgetHostViewMac, otherwise the race conditions
are possible when the Textfield gets focus, activates the secure text
input mode and the RWHVM loses focus immediately afterwards and disables
the secure text input instead of leaving it in the enabled state.
BUG=818133,677220
Change-Id: I6db6c4b59e4a1a72cbb7f8c7056f71b04a3df08b
Reviewed-on: https://chromium-review.googlesource.com/943064
Commit-Queue: Michail Pishchagin <[email protected]>
Reviewed-by: Pavel Feldman <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Peter Kasting <[email protected]>
Cr-Commit-Position: refs/heads/master@{#542517}
|
void LocalDOMWindow::scrollTo(double x, double y) const {
ScrollToOptions options;
options.setLeft(x);
options.setTop(y);
scrollTo(options);
}
|
void LocalDOMWindow::scrollTo(double x, double y) const {
ScrollToOptions options;
options.setLeft(x);
options.setTop(y);
scrollTo(options);
}
|
C
|
Chrome
| 0 |
CVE-2015-1331
|
https://www.cvedetails.com/cve/CVE-2015-1331/
|
CWE-59
|
https://github.com/lxc/lxc/commit/72cf81f6a3404e35028567db2c99a90406e9c6e6
|
72cf81f6a3404e35028567db2c99a90406e9c6e6
|
CVE-2015-1331: lxclock: use /run/lxc/lock rather than /run/lock/lxc
This prevents an unprivileged user to use LXC to create arbitrary file
on the filesystem.
Signed-off-by: Serge Hallyn <[email protected]>
Signed-off-by: Tyler Hicks <[email protected]>
Acked-by: Stéphane Graber <[email protected]>
|
void process_unlock(void)
{
unlock_mutex(&thread_mutex);
}
|
void process_unlock(void)
{
unlock_mutex(&thread_mutex);
}
|
C
|
lxc
| 0 |
CVE-2016-7976
|
https://www.cvedetails.com/cve/CVE-2016-7976/
|
CWE-20
|
http://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commit;h=6d444c273da5499a4cd72f21cb6d4c9a5256807d
|
6d444c273da5499a4cd72f21cb6d4c9a5256807d
| null |
gsicc_fill_srcgtag_item(gsicc_rendering_param_t *r_params, char **pstrlast, bool cmyk)
{
char *curr_ptr;
int blackptcomp;
int or_icc, preserve_k;
int ri;
/* Get the intent */
curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast);
if (sscanf(curr_ptr, "%d", &ri) != 1)
return_error(gs_error_unknownerror);
r_params->rendering_intent = ri | gsRI_OVERRIDE;
/* Get the black point compensation setting */
curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast);
if (sscanf(curr_ptr, "%d", &blackptcomp) != 1)
return_error(gs_error_unknownerror);
r_params->black_point_comp = blackptcomp | gsBP_OVERRIDE;
/* Get the over-ride embedded ICC boolean */
curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast);
if (sscanf(curr_ptr, "%d", &or_icc) != 1)
return_error(gs_error_unknownerror);
r_params->override_icc = or_icc;
if (cmyk) {
/* Get the preserve K control */
curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast);
if (sscanf(curr_ptr, "%d", &preserve_k) < 1)
return_error(gs_error_unknownerror);
r_params->preserve_black = preserve_k | gsKP_OVERRIDE;
} else {
r_params->preserve_black = gsBKPRESNOTSPECIFIED;
}
return 0;
}
|
gsicc_fill_srcgtag_item(gsicc_rendering_param_t *r_params, char **pstrlast, bool cmyk)
{
char *curr_ptr;
int blackptcomp;
int or_icc, preserve_k;
int ri;
/* Get the intent */
curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast);
if (sscanf(curr_ptr, "%d", &ri) != 1)
return_error(gs_error_unknownerror);
r_params->rendering_intent = ri | gsRI_OVERRIDE;
/* Get the black point compensation setting */
curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast);
if (sscanf(curr_ptr, "%d", &blackptcomp) != 1)
return_error(gs_error_unknownerror);
r_params->black_point_comp = blackptcomp | gsBP_OVERRIDE;
/* Get the over-ride embedded ICC boolean */
curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast);
if (sscanf(curr_ptr, "%d", &or_icc) != 1)
return_error(gs_error_unknownerror);
r_params->override_icc = or_icc;
if (cmyk) {
/* Get the preserve K control */
curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast);
if (sscanf(curr_ptr, "%d", &preserve_k) < 1)
return_error(gs_error_unknownerror);
r_params->preserve_black = preserve_k | gsKP_OVERRIDE;
} else {
r_params->preserve_black = gsBKPRESNOTSPECIFIED;
}
return 0;
}
|
C
|
ghostscript
| 0 |
CVE-2010-4651
|
https://www.cvedetails.com/cve/CVE-2010-4651/
|
CWE-22
|
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=685a78b6052f4df6eac6d625a545cfb54a6ac0e1
|
685a78b6052f4df6eac6d625a545cfb54a6ac0e1
| null |
append_to_file (char const *from, char const *to)
{
int tofd;
if ((tofd = open (to, O_WRONLY | O_BINARY | O_APPEND)) < 0)
pfatal ("Can't reopen file %s", quotearg (to));
copy_to_fd (from, tofd);
if (close (tofd) != 0)
write_fatal ();
}
|
append_to_file (char const *from, char const *to)
{
int tofd;
if ((tofd = open (to, O_WRONLY | O_BINARY | O_APPEND)) < 0)
pfatal ("Can't reopen file %s", quotearg (to));
copy_to_fd (from, tofd);
if (close (tofd) != 0)
write_fatal ();
}
|
C
|
savannah
| 0 |
CVE-2019-5892
|
https://www.cvedetails.com/cve/CVE-2019-5892/
| null |
https://github.com/FRRouting/frr/commit/943d595a018e69b550db08cccba1d0778a86705a
|
943d595a018e69b550db08cccba1d0778a86705a
|
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined
Signed-off-by: Lou Berger <[email protected]>
|
int cluster_loop_check(struct cluster_list *cluster, struct in_addr originator)
{
int i;
for (i = 0; i < cluster->length / 4; i++)
if (cluster->list[i].s_addr == originator.s_addr)
return 1;
return 0;
}
|
int cluster_loop_check(struct cluster_list *cluster, struct in_addr originator)
{
int i;
for (i = 0; i < cluster->length / 4; i++)
if (cluster->list[i].s_addr == originator.s_addr)
return 1;
return 0;
}
|
C
|
frr
| 0 |
CVE-2017-5548
|
https://www.cvedetails.com/cve/CVE-2017-5548/
|
CWE-119
|
https://github.com/torvalds/linux/commit/05a974efa4bdf6e2a150e3f27dc6fcf0a9ad5655
|
05a974efa4bdf6e2a150e3f27dc6fcf0a9ad5655
|
ieee802154: atusb: do not use the stack for buffers to make them DMA able
From 4.9 we should really avoid using the stack here as this will not be DMA
able on various platforms. This changes the buffers already being present in
time of 4.9 being released. This should go into stable as well.
Reported-by: Dan Carpenter <[email protected]>
Cc: [email protected]
Signed-off-by: Stefan Schmidt <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
|
static int atusb_alloc_urbs(struct atusb *atusb, int n)
{
struct urb *urb;
while (n) {
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
atusb_free_urbs(atusb);
return -ENOMEM;
}
usb_anchor_urb(urb, &atusb->idle_urbs);
n--;
}
return 0;
}
|
static int atusb_alloc_urbs(struct atusb *atusb, int n)
{
struct urb *urb;
while (n) {
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
atusb_free_urbs(atusb);
return -ENOMEM;
}
usb_anchor_urb(urb, &atusb->idle_urbs);
n--;
}
return 0;
}
|
C
|
linux
| 0 |
CVE-2011-4324
|
https://www.cvedetails.com/cve/CVE-2011-4324/
| null |
https://github.com/torvalds/linux/commit/dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
|
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
|
NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <[email protected]>
|
void nfs4_close_sync(struct path *path, struct nfs4_state *state, mode_t mode)
void nfs4_close_sync(struct path *path, struct nfs4_state *state, fmode_t fmode)
{
__nfs4_close(path, state, fmode, 1);
}
|
void nfs4_close_sync(struct path *path, struct nfs4_state *state, mode_t mode)
{
__nfs4_close(path, state, mode, 1);
}
|
C
|
linux
| 1 |
CVE-2014-1445
|
https://www.cvedetails.com/cve/CVE-2014-1445/
|
CWE-399
|
https://github.com/torvalds/linux/commit/2b13d06c9584b4eb773f1e80bbaedab9a1c344e1
|
2b13d06c9584b4eb773f1e80bbaedab9a1c344e1
|
wanxl: fix info leak in ioctl
The wanxl_ioctl() code fails to initialize the two padding bytes of
struct sync_serial_settings after the ->loopback member. Add an explicit
memset(0) before filling the structure to avoid the info leak.
Signed-off-by: Salva Peiró <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static irqreturn_t wanxl_intr(int irq, void* dev_id)
{
card_t *card = dev_id;
int i;
u32 stat;
int handled = 0;
while((stat = readl(card->plx + PLX_DOORBELL_FROM_CARD)) != 0) {
handled = 1;
writel(stat, card->plx + PLX_DOORBELL_FROM_CARD);
for (i = 0; i < card->n_ports; i++) {
if (stat & (1 << (DOORBELL_FROM_CARD_TX_0 + i)))
wanxl_tx_intr(&card->ports[i]);
if (stat & (1 << (DOORBELL_FROM_CARD_CABLE_0 + i)))
wanxl_cable_intr(&card->ports[i]);
}
if (stat & (1 << DOORBELL_FROM_CARD_RX))
wanxl_rx_intr(card);
}
return IRQ_RETVAL(handled);
}
|
static irqreturn_t wanxl_intr(int irq, void* dev_id)
{
card_t *card = dev_id;
int i;
u32 stat;
int handled = 0;
while((stat = readl(card->plx + PLX_DOORBELL_FROM_CARD)) != 0) {
handled = 1;
writel(stat, card->plx + PLX_DOORBELL_FROM_CARD);
for (i = 0; i < card->n_ports; i++) {
if (stat & (1 << (DOORBELL_FROM_CARD_TX_0 + i)))
wanxl_tx_intr(&card->ports[i]);
if (stat & (1 << (DOORBELL_FROM_CARD_CABLE_0 + i)))
wanxl_cable_intr(&card->ports[i]);
}
if (stat & (1 << DOORBELL_FROM_CARD_RX))
wanxl_rx_intr(card);
}
return IRQ_RETVAL(handled);
}
|
C
|
linux
| 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
|
int TabStripGtk::GetTabCount() const {
return static_cast<int>(tab_data_.size());
}
|
int TabStripGtk::GetTabCount() const {
return static_cast<int>(tab_data_.size());
}
|
C
|
Chrome
| 0 |
CVE-2016-7115
|
https://www.cvedetails.com/cve/CVE-2016-7115/
|
CWE-119
|
https://github.com/haakonnessjoen/MAC-Telnet/commit/b69d11727d4f0f8cf719c79e3fb700f55ca03e9a
|
b69d11727d4f0f8cf719c79e3fb700f55ca03e9a
|
Merge pull request #20 from eyalitki/master
2nd round security fixes from eyalitki
|
void sigterm_handler() {
struct mt_connection *p;
struct mt_packet pdata;
struct net_interface *interface, *tmp;
/*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */
char message[] = gettext_noop("\r\n\r\nDaemon shutting down.\r\n");
syslog(LOG_NOTICE, _("Daemon shutting down"));
DL_FOREACH(connections_head, p) {
if (p->state == STATE_ACTIVE) {
init_packet(&pdata, MT_PTYPE_DATA, p->interface->mac_addr, p->srcmac, p->seskey, p->outcounter);
add_control_packet(&pdata, MT_CPTYPE_PLAINDATA, _(message), strlen(_(message)));
send_udp(p, &pdata);
init_packet(&pdata, MT_PTYPE_END, p->interface->mac_addr, p->srcmac, p->seskey, p->outcounter);
send_udp(p, &pdata);
}
}
/* Doesn't hurt to tidy up */
close(sockfd);
close(insockfd);
if (!use_raw_socket) {
DL_FOREACH(interfaces, interface) {
if (interface->socketfd > 0)
close(interface->socketfd);
}
}
DL_FOREACH_SAFE(interfaces, interface, tmp) {
DL_DELETE(interfaces, interface);
free(interface);
}
closelog();
exit(0);
}
|
void sigterm_handler() {
struct mt_connection *p;
struct mt_packet pdata;
struct net_interface *interface, *tmp;
/*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */
char message[] = gettext_noop("\r\n\r\nDaemon shutting down.\r\n");
syslog(LOG_NOTICE, _("Daemon shutting down"));
DL_FOREACH(connections_head, p) {
if (p->state == STATE_ACTIVE) {
init_packet(&pdata, MT_PTYPE_DATA, p->interface->mac_addr, p->srcmac, p->seskey, p->outcounter);
add_control_packet(&pdata, MT_CPTYPE_PLAINDATA, _(message), strlen(_(message)));
send_udp(p, &pdata);
init_packet(&pdata, MT_PTYPE_END, p->interface->mac_addr, p->srcmac, p->seskey, p->outcounter);
send_udp(p, &pdata);
}
}
/* Doesn't hurt to tidy up */
close(sockfd);
close(insockfd);
if (!use_raw_socket) {
DL_FOREACH(interfaces, interface) {
if (interface->socketfd > 0)
close(interface->socketfd);
}
}
DL_FOREACH_SAFE(interfaces, interface, tmp) {
DL_DELETE(interfaces, interface);
free(interface);
}
closelog();
exit(0);
}
|
C
|
MAC-Telnet
| 0 |
CVE-2011-2840
|
https://www.cvedetails.com/cve/CVE-2011-2840/
|
CWE-20
|
https://github.com/chromium/chromium/commit/2db5a2048dfcacfe5ad4311c2b1e435c4c67febc
|
2db5a2048dfcacfe5ad4311c2b1e435c4c67febc
|
chromeos: fix bug where "aw snap" page replaces first tab if it was a NTP when closing window with > 1 tab.
BUG=chromium-os:12088
TEST=verify bug per bug report.
Review URL: http://codereview.chromium.org/6882058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83031 0039d316-1c4b-4281-b951-d872f2087c98
|
void DefaultTabHandler::TabMoved(TabContentsWrapper* contents,
int from_index,
int to_index) {
delegate_->AsBrowser()->TabMoved(contents, from_index, to_index);
}
|
void DefaultTabHandler::TabMoved(TabContentsWrapper* contents,
int from_index,
int to_index) {
delegate_->AsBrowser()->TabMoved(contents, from_index, to_index);
}
|
C
|
Chrome
| 0 |
CVE-2017-18120
|
https://www.cvedetails.com/cve/CVE-2017-18120/
|
CWE-415
|
https://github.com/kohler/gifsicle/commit/118a46090c50829dc543179019e6140e1235f909
|
118a46090c50829dc543179019e6140e1235f909
|
gif_read: Set last_name = NULL unconditionally.
With a non-malicious GIF, last_name is set to NULL when a name
extension is followed by an image. Reported in #117, via
Debian, via a KAIST fuzzing program.
|
Gif_SetErrorHandler(Gif_ReadErrorHandler handler) {
default_error_handler = handler;
}
|
Gif_SetErrorHandler(Gif_ReadErrorHandler handler) {
default_error_handler = handler;
}
|
C
|
gifsicle
| 0 |
CVE-2016-10190
|
https://www.cvedetails.com/cve/CVE-2016-10190/
|
CWE-119
|
https://github.com/FFmpeg/FFmpeg/commit/2a05c8f813de6f2278827734bf8102291e7484aa
|
2a05c8f813de6f2278827734bf8102291e7484aa
|
http: make length/offset-related variables unsigned.
Fixes #5992, reported and found by Paul Cher <[email protected]>.
|
static int http_write(URLContext *h, const uint8_t *buf, int size)
{
char temp[11] = ""; /* 32-bit hex + CRLF + nul */
int ret;
char crlf[] = "\r\n";
HTTPContext *s = h->priv_data;
if (!s->chunked_post) {
/* non-chunked data is sent without any special encoding */
return ffurl_write(s->hd, buf, size);
}
/* silently ignore zero-size data since chunk encoding that would
* signal EOF */
if (size > 0) {
/* upload data using chunked encoding */
snprintf(temp, sizeof(temp), "%x\r\n", size);
if ((ret = ffurl_write(s->hd, temp, strlen(temp))) < 0 ||
(ret = ffurl_write(s->hd, buf, size)) < 0 ||
(ret = ffurl_write(s->hd, crlf, sizeof(crlf) - 1)) < 0)
return ret;
}
return size;
}
|
static int http_write(URLContext *h, const uint8_t *buf, int size)
{
char temp[11] = ""; /* 32-bit hex + CRLF + nul */
int ret;
char crlf[] = "\r\n";
HTTPContext *s = h->priv_data;
if (!s->chunked_post) {
/* non-chunked data is sent without any special encoding */
return ffurl_write(s->hd, buf, size);
}
/* silently ignore zero-size data since chunk encoding that would
* signal EOF */
if (size > 0) {
/* upload data using chunked encoding */
snprintf(temp, sizeof(temp), "%x\r\n", size);
if ((ret = ffurl_write(s->hd, temp, strlen(temp))) < 0 ||
(ret = ffurl_write(s->hd, buf, size)) < 0 ||
(ret = ffurl_write(s->hd, crlf, sizeof(crlf) - 1)) < 0)
return ret;
}
return size;
}
|
C
|
FFmpeg
| 0 |
CVE-2018-6077
|
https://www.cvedetails.com/cve/CVE-2018-6077/
|
CWE-200
|
https://github.com/chromium/chromium/commit/6ed26f014f76f10e76e80636027a2db9dcbe1664
|
6ed26f014f76f10e76e80636027a2db9dcbe1664
|
[PE] Distinguish between tainting due to canvas content and filter.
A filter on a canvas can itself lead to origin tainting, for reasons
other than that the canvas contents are tainted. This CL changes
to distinguish these two causes, so that we recompute filters
on content-tainting change.
Bug: 778506
Change-Id: I3cec8ef3b2772f2af78cdd4b290520113092cca6
Reviewed-on: https://chromium-review.googlesource.com/811767
Reviewed-by: Fredrik Söderquist <[email protected]>
Commit-Queue: Chris Harrelson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#522274}
|
void BaseRenderingContext2D::clip(const String& winding_rule_string) {
ClipInternal(path_, winding_rule_string);
}
|
void BaseRenderingContext2D::clip(const String& winding_rule_string) {
ClipInternal(path_, winding_rule_string);
}
|
C
|
Chrome
| 0 |
CVE-2013-7022
|
https://www.cvedetails.com/cve/CVE-2013-7022/
|
CWE-119
|
https://github.com/FFmpeg/FFmpeg/commit/e07ac727c1cc9eed39e7f9117c97006f719864bd
|
e07ac727c1cc9eed39e7f9117c97006f719864bd
|
avcodec/g2meet: Fix framebuf size
Currently the code can in some cases draw tiles that hang outside the
allocated buffer. This patch increases the buffer size to avoid out
of array accesses. An alternative would be to fail if such tiles are
encountered.
I do not know if any valid files use such hanging tiles.
Fixes Ticket2971
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y,
const uint8_t *src, int src_size)
{
int width, height;
int hdr, zsize, npal, tidx = -1, ret;
int i, j;
const uint8_t *src_end = src + src_size;
uint8_t pal[768], transp[3];
uLongf dlen = (c->tile_width + 1) * c->tile_height;
int sub_type;
int nblocks, cblocks, bstride;
int bits, bitbuf, coded;
uint8_t *dst = c->framebuf + tile_x * c->tile_width * 3 +
tile_y * c->tile_height * c->framebuf_stride;
if (src_size < 2)
return AVERROR_INVALIDDATA;
width = FFMIN(c->width - tile_x * c->tile_width, c->tile_width);
height = FFMIN(c->height - tile_y * c->tile_height, c->tile_height);
hdr = *src++;
sub_type = hdr >> 5;
if (sub_type == 0) {
int j;
memcpy(transp, src, 3);
src += 3;
for (j = 0; j < height; j++, dst += c->framebuf_stride)
for (i = 0; i < width; i++)
memcpy(dst + i * 3, transp, 3);
return 0;
} else if (sub_type == 1) {
return jpg_decode_data(&c->jc, width, height, src, src_end - src,
dst, c->framebuf_stride, NULL, 0, 0, 0);
}
if (sub_type != 2) {
memcpy(transp, src, 3);
src += 3;
}
npal = *src++ + 1;
memcpy(pal, src, npal * 3); src += npal * 3;
if (sub_type != 2) {
for (i = 0; i < npal; i++) {
if (!memcmp(pal + i * 3, transp, 3)) {
tidx = i;
break;
}
}
}
if (src_end - src < 2)
return 0;
zsize = (src[0] << 8) | src[1]; src += 2;
if (src_end - src < zsize + (sub_type != 2))
return AVERROR_INVALIDDATA;
ret = uncompress(c->kempf_buf, &dlen, src, zsize);
if (ret)
return AVERROR_INVALIDDATA;
src += zsize;
if (sub_type == 2) {
kempf_restore_buf(c->kempf_buf, dlen, dst, c->framebuf_stride,
NULL, 0, width, height, pal, npal, tidx);
return 0;
}
nblocks = *src++ + 1;
cblocks = 0;
bstride = FFALIGN(width, 16) >> 4;
bits = 0;
for (i = 0; i < (FFALIGN(height, 16) >> 4); i++) {
for (j = 0; j < (FFALIGN(width, 16) >> 4); j++) {
if (!bits) {
if (src >= src_end)
return AVERROR_INVALIDDATA;
bitbuf = *src++;
bits = 8;
}
coded = bitbuf & 1;
bits--;
bitbuf >>= 1;
cblocks += coded;
if (cblocks > nblocks)
return AVERROR_INVALIDDATA;
c->kempf_flags[j + i * bstride] = coded;
}
}
memset(c->jpeg_tile, 0, c->tile_stride * height);
jpg_decode_data(&c->jc, width, height, src, src_end - src,
c->jpeg_tile, c->tile_stride,
c->kempf_flags, bstride, nblocks, 0);
kempf_restore_buf(c->kempf_buf, dlen, dst, c->framebuf_stride,
c->jpeg_tile, c->tile_stride,
width, height, pal, npal, tidx);
return 0;
}
|
static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y,
const uint8_t *src, int src_size)
{
int width, height;
int hdr, zsize, npal, tidx = -1, ret;
int i, j;
const uint8_t *src_end = src + src_size;
uint8_t pal[768], transp[3];
uLongf dlen = (c->tile_width + 1) * c->tile_height;
int sub_type;
int nblocks, cblocks, bstride;
int bits, bitbuf, coded;
uint8_t *dst = c->framebuf + tile_x * c->tile_width * 3 +
tile_y * c->tile_height * c->framebuf_stride;
if (src_size < 2)
return AVERROR_INVALIDDATA;
width = FFMIN(c->width - tile_x * c->tile_width, c->tile_width);
height = FFMIN(c->height - tile_y * c->tile_height, c->tile_height);
hdr = *src++;
sub_type = hdr >> 5;
if (sub_type == 0) {
int j;
memcpy(transp, src, 3);
src += 3;
for (j = 0; j < height; j++, dst += c->framebuf_stride)
for (i = 0; i < width; i++)
memcpy(dst + i * 3, transp, 3);
return 0;
} else if (sub_type == 1) {
return jpg_decode_data(&c->jc, width, height, src, src_end - src,
dst, c->framebuf_stride, NULL, 0, 0, 0);
}
if (sub_type != 2) {
memcpy(transp, src, 3);
src += 3;
}
npal = *src++ + 1;
memcpy(pal, src, npal * 3); src += npal * 3;
if (sub_type != 2) {
for (i = 0; i < npal; i++) {
if (!memcmp(pal + i * 3, transp, 3)) {
tidx = i;
break;
}
}
}
if (src_end - src < 2)
return 0;
zsize = (src[0] << 8) | src[1]; src += 2;
if (src_end - src < zsize + (sub_type != 2))
return AVERROR_INVALIDDATA;
ret = uncompress(c->kempf_buf, &dlen, src, zsize);
if (ret)
return AVERROR_INVALIDDATA;
src += zsize;
if (sub_type == 2) {
kempf_restore_buf(c->kempf_buf, dlen, dst, c->framebuf_stride,
NULL, 0, width, height, pal, npal, tidx);
return 0;
}
nblocks = *src++ + 1;
cblocks = 0;
bstride = FFALIGN(width, 16) >> 4;
bits = 0;
for (i = 0; i < (FFALIGN(height, 16) >> 4); i++) {
for (j = 0; j < (FFALIGN(width, 16) >> 4); j++) {
if (!bits) {
if (src >= src_end)
return AVERROR_INVALIDDATA;
bitbuf = *src++;
bits = 8;
}
coded = bitbuf & 1;
bits--;
bitbuf >>= 1;
cblocks += coded;
if (cblocks > nblocks)
return AVERROR_INVALIDDATA;
c->kempf_flags[j + i * bstride] = coded;
}
}
memset(c->jpeg_tile, 0, c->tile_stride * height);
jpg_decode_data(&c->jc, width, height, src, src_end - src,
c->jpeg_tile, c->tile_stride,
c->kempf_flags, bstride, nblocks, 0);
kempf_restore_buf(c->kempf_buf, dlen, dst, c->framebuf_stride,
c->jpeg_tile, c->tile_stride,
width, height, pal, npal, tidx);
return 0;
}
|
C
|
FFmpeg
| 0 |
CVE-2018-20067
|
https://www.cvedetails.com/cve/CVE-2018-20067/
|
CWE-254
|
https://github.com/chromium/chromium/commit/a7d715ae5b654d1f98669fd979a00282a7229044
|
a7d715ae5b654d1f98669fd979a00282a7229044
|
Prevent renderer initiated back navigation to cancel a browser one.
Renderer initiated back/forward navigations must not be able to cancel ongoing
browser initiated navigation if they are not user initiated.
Note: 'normal' renderer initiated navigation uses the
FrameHost::BeginNavigation() path. A code similar to this patch is done
in NavigatorImpl::OnBeginNavigation().
Test:
-----
Added: NavigationBrowserTest.
* HistoryBackInBeforeUnload
* HistoryBackInBeforeUnloadAfterSetTimeout
* HistoryBackCancelPendingNavigationNoUserGesture
* HistoryBackCancelPendingNavigationUserGesture
Fixed:
* (WPT) .../the-history-interface/traverse_the_history_2.html
* (WPT) .../the-history-interface/traverse_the_history_3.html
* (WPT) .../the-history-interface/traverse_the_history_4.html
* (WPT) .../the-history-interface/traverse_the_history_5.html
Bug: 879965
Change-Id: I1a9bfaaea1ffc219e6c32f6e676b660e746c578c
Reviewed-on: https://chromium-review.googlesource.com/1209744
Commit-Queue: Arthur Sonzogni <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Mustaq Ahmed <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Cr-Commit-Position: refs/heads/master@{#592823}
|
bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() {
return CreateRenderViewForRenderManager(
GetRenderViewHost(), MSG_ROUTING_NONE, MSG_ROUTING_NONE,
frame_tree_.root()->devtools_frame_token(),
frame_tree_.root()->current_replication_state());
}
|
bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() {
return CreateRenderViewForRenderManager(
GetRenderViewHost(), MSG_ROUTING_NONE, MSG_ROUTING_NONE,
frame_tree_.root()->devtools_frame_token(),
frame_tree_.root()->current_replication_state());
}
|
C
|
Chrome
| 0 |
CVE-2012-2816
|
https://www.cvedetails.com/cve/CVE-2012-2816/
| null |
https://github.com/chromium/chromium/commit/cd0bd79d6ebdb72183e6f0833673464cc10b3600
|
cd0bd79d6ebdb72183e6f0833673464cc10b3600
|
Convert plugin and GPU process to brokered handle duplication.
BUG=119250
Review URL: https://chromiumcodereview.appspot.com/9958034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132303 0039d316-1c4b-4281-b951-d872f2087c98
|
void WebGraphicsContext3DCommandBufferImpl::postSubBufferCHROMIUM(
int x, int y, int width, int height) {
if (ShouldUseSwapClient())
swap_client_->OnViewContextSwapBuffersPosted();
gl_->PostSubBufferCHROMIUM(x, y, width, height);
command_buffer_->Echo(base::Bind(
&WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete,
weak_ptr_factory_.GetWeakPtr()));
}
|
void WebGraphicsContext3DCommandBufferImpl::postSubBufferCHROMIUM(
int x, int y, int width, int height) {
if (ShouldUseSwapClient())
swap_client_->OnViewContextSwapBuffersPosted();
gl_->PostSubBufferCHROMIUM(x, y, width, height);
command_buffer_->Echo(base::Bind(
&WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete,
weak_ptr_factory_.GetWeakPtr()));
}
|
C
|
Chrome
| 0 |
CVE-2017-5061
|
https://www.cvedetails.com/cve/CVE-2017-5061/
|
CWE-362
|
https://github.com/chromium/chromium/commit/5d78b84d39bd34bc9fce9d01c0dcd5a22a330d34
|
5d78b84d39bd34bc9fce9d01c0dcd5a22a330d34
|
(Reland) Discard compositor frames from unloaded web content
This is a reland of https://codereview.chromium.org/2707243005/ with a
small change to fix an uninitialized memory error that fails on MSAN
bots.
BUG=672847
[email protected], [email protected]
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2731283003
Cr-Commit-Position: refs/heads/master@{#454954}
|
LayerTreeHostImpl::AsValueWithFrame(FrameData* frame) const {
std::unique_ptr<base::trace_event::TracedValue> state(
new base::trace_event::TracedValue());
AsValueWithFrameInto(frame, state.get());
return std::move(state);
}
|
LayerTreeHostImpl::AsValueWithFrame(FrameData* frame) const {
std::unique_ptr<base::trace_event::TracedValue> state(
new base::trace_event::TracedValue());
AsValueWithFrameInto(frame, state.get());
return std::move(state);
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/4fdb2b3ebb31e39852fb1bc20fcdf3b5e4de382e
|
4fdb2b3ebb31e39852fb1bc20fcdf3b5e4de382e
|
ur_ls -> urls in ResourceFetcher
Blink Reformat miss? fix
BUG=675877
Review-Url: https://codereview.chromium.org/2809103002
Cr-Commit-Position: refs/heads/master@{#463599}
|
void ResourceFetcher::RequestLoadStarted(unsigned long identifier,
Resource* resource,
const FetchRequest& request,
RevalidationPolicy policy,
bool is_static_data) {
if (policy == kUse && resource->GetStatus() == ResourceStatus::kCached &&
!validated_urls_.Contains(resource->Url())) {
DidLoadResourceFromMemoryCache(identifier, resource,
request.GetResourceRequest());
}
if (is_static_data)
return;
if (policy == kUse && !resource->StillNeedsLoad() &&
!validated_urls_.Contains(request.GetResourceRequest().Url())) {
RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::Create(
request.Options().initiator_info.name, MonotonicallyIncreasingTime(),
resource->GetType() == Resource::kMainResource);
PopulateTimingInfo(info.Get(), resource);
info->ClearLoadTimings();
info->SetLoadFinishTime(info->InitialTime());
scheduled_resource_timing_reports_.push_back(info.Release());
if (!resource_timing_report_timer_.IsActive())
resource_timing_report_timer_.StartOneShot(0, BLINK_FROM_HERE);
}
if (validated_urls_.size() >= kMaxValidatedURLsSize) {
validated_urls_.Clear();
}
validated_urls_.insert(request.GetResourceRequest().Url());
}
|
void ResourceFetcher::RequestLoadStarted(unsigned long identifier,
Resource* resource,
const FetchRequest& request,
RevalidationPolicy policy,
bool is_static_data) {
if (policy == kUse && resource->GetStatus() == ResourceStatus::kCached &&
!validated_ur_ls_.Contains(resource->Url())) {
DidLoadResourceFromMemoryCache(identifier, resource,
request.GetResourceRequest());
}
if (is_static_data)
return;
if (policy == kUse && !resource->StillNeedsLoad() &&
!validated_ur_ls_.Contains(request.GetResourceRequest().Url())) {
RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::Create(
request.Options().initiator_info.name, MonotonicallyIncreasingTime(),
resource->GetType() == Resource::kMainResource);
PopulateTimingInfo(info.Get(), resource);
info->ClearLoadTimings();
info->SetLoadFinishTime(info->InitialTime());
scheduled_resource_timing_reports_.push_back(info.Release());
if (!resource_timing_report_timer_.IsActive())
resource_timing_report_timer_.StartOneShot(0, BLINK_FROM_HERE);
}
if (validated_ur_ls_.size() >= kMaxValidatedURLsSize) {
validated_ur_ls_.Clear();
}
validated_ur_ls_.insert(request.GetResourceRequest().Url());
}
|
C
|
Chrome
| 1 |
CVE-2012-2891
|
https://www.cvedetails.com/cve/CVE-2012-2891/
|
CWE-200
|
https://github.com/chromium/chromium/commit/116d0963cadfbf55ef2ec3d13781987c4d80517a
|
116d0963cadfbf55ef2ec3d13781987c4d80517a
|
Print preview: Use an ID instead of memory pointer string in WebUI.
BUG=144051
Review URL: https://chromiumcodereview.appspot.com/10870003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153342 0039d316-1c4b-4281-b951-d872f2087c98
|
bool Get(const std::string& addr, int* out_value) {
// Gets the value for |preview_id|.
// Returns true and sets |out_value| on success.
bool Get(int32 preview_id, int* out_value) {
base::AutoLock lock(lock_);
PrintPreviewRequestIdMap::const_iterator it = map_.find(preview_id);
if (it == map_.end())
return false;
*out_value = it->second;
return true;
}
|
bool Get(const std::string& addr, int* out_value) {
base::AutoLock lock(lock_);
PrintPreviewRequestIdMap::const_iterator it = map_.find(addr);
if (it == map_.end())
return false;
*out_value = it->second;
return true;
}
|
C
|
Chrome
| 1 |
CVE-2017-9996
|
https://www.cvedetails.com/cve/CVE-2017-9996/
|
CWE-119
|
https://github.com/FFmpeg/FFmpeg/commit/1e42736b95065c69a7481d0cf55247024f54b660
|
1e42736b95065c69a7481d0cf55247024f54b660
|
avcodec/cdxl: Check format for BGR24
Fixes: out of array access
Fixes: 1427/clusterfuzz-testcase-minimized-5020737339392000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *pkt)
{
CDXLVideoContext *c = avctx->priv_data;
AVFrame * const p = data;
int ret, w, h, encoding, aligned_width, buf_size = pkt->size;
const uint8_t *buf = pkt->data;
if (buf_size < 32)
return AVERROR_INVALIDDATA;
encoding = buf[1] & 7;
c->format = buf[1] & 0xE0;
w = AV_RB16(&buf[14]);
h = AV_RB16(&buf[16]);
c->bpp = buf[19];
c->palette_size = AV_RB16(&buf[20]);
c->palette = buf + 32;
c->video = c->palette + c->palette_size;
c->video_size = buf_size - c->palette_size - 32;
if (c->palette_size > 512)
return AVERROR_INVALIDDATA;
if (buf_size < c->palette_size + 32)
return AVERROR_INVALIDDATA;
if (c->bpp < 1)
return AVERROR_INVALIDDATA;
if (c->format != BIT_PLANAR && c->format != BIT_LINE && c->format != CHUNKY) {
avpriv_request_sample(avctx, "Pixel format 0x%0x", c->format);
return AVERROR_PATCHWELCOME;
}
if ((ret = ff_set_dimensions(avctx, w, h)) < 0)
return ret;
if (c->format == CHUNKY)
aligned_width = avctx->width;
else
aligned_width = FFALIGN(c->avctx->width, 16);
c->padded_bits = aligned_width - c->avctx->width;
if (c->video_size < aligned_width * avctx->height * (int64_t)c->bpp / 8)
return AVERROR_INVALIDDATA;
if (!encoding && c->palette_size && c->bpp <= 8 && c->format != CHUNKY) {
avctx->pix_fmt = AV_PIX_FMT_PAL8;
} else if (encoding == 1 && (c->bpp == 6 || c->bpp == 8) && c->format != CHUNKY) {
if (c->palette_size != (1 << (c->bpp - 1)))
return AVERROR_INVALIDDATA;
avctx->pix_fmt = AV_PIX_FMT_BGR24;
} else if (!encoding && c->bpp == 24 && c->format == CHUNKY &&
!c->palette_size) {
avctx->pix_fmt = AV_PIX_FMT_RGB24;
} else {
avpriv_request_sample(avctx, "Encoding %d, bpp %d and format 0x%x",
encoding, c->bpp, c->format);
return AVERROR_PATCHWELCOME;
}
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
p->pict_type = AV_PICTURE_TYPE_I;
if (encoding) {
av_fast_padded_malloc(&c->new_video, &c->new_video_size,
h * w + AV_INPUT_BUFFER_PADDING_SIZE);
if (!c->new_video)
return AVERROR(ENOMEM);
if (c->bpp == 8)
cdxl_decode_ham8(c, p);
else
cdxl_decode_ham6(c, p);
} else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
cdxl_decode_rgb(c, p);
} else {
cdxl_decode_raw(c, p);
}
*got_frame = 1;
return buf_size;
}
|
static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *pkt)
{
CDXLVideoContext *c = avctx->priv_data;
AVFrame * const p = data;
int ret, w, h, encoding, aligned_width, buf_size = pkt->size;
const uint8_t *buf = pkt->data;
if (buf_size < 32)
return AVERROR_INVALIDDATA;
encoding = buf[1] & 7;
c->format = buf[1] & 0xE0;
w = AV_RB16(&buf[14]);
h = AV_RB16(&buf[16]);
c->bpp = buf[19];
c->palette_size = AV_RB16(&buf[20]);
c->palette = buf + 32;
c->video = c->palette + c->palette_size;
c->video_size = buf_size - c->palette_size - 32;
if (c->palette_size > 512)
return AVERROR_INVALIDDATA;
if (buf_size < c->palette_size + 32)
return AVERROR_INVALIDDATA;
if (c->bpp < 1)
return AVERROR_INVALIDDATA;
if (c->format != BIT_PLANAR && c->format != BIT_LINE && c->format != CHUNKY) {
avpriv_request_sample(avctx, "Pixel format 0x%0x", c->format);
return AVERROR_PATCHWELCOME;
}
if ((ret = ff_set_dimensions(avctx, w, h)) < 0)
return ret;
if (c->format == CHUNKY)
aligned_width = avctx->width;
else
aligned_width = FFALIGN(c->avctx->width, 16);
c->padded_bits = aligned_width - c->avctx->width;
if (c->video_size < aligned_width * avctx->height * (int64_t)c->bpp / 8)
return AVERROR_INVALIDDATA;
if (!encoding && c->palette_size && c->bpp <= 8 && c->format != CHUNKY) {
avctx->pix_fmt = AV_PIX_FMT_PAL8;
} else if (encoding == 1 && (c->bpp == 6 || c->bpp == 8)) {
if (c->palette_size != (1 << (c->bpp - 1)))
return AVERROR_INVALIDDATA;
avctx->pix_fmt = AV_PIX_FMT_BGR24;
} else if (!encoding && c->bpp == 24 && c->format == CHUNKY &&
!c->palette_size) {
avctx->pix_fmt = AV_PIX_FMT_RGB24;
} else {
avpriv_request_sample(avctx, "Encoding %d, bpp %d and format 0x%x",
encoding, c->bpp, c->format);
return AVERROR_PATCHWELCOME;
}
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
p->pict_type = AV_PICTURE_TYPE_I;
if (encoding) {
av_fast_padded_malloc(&c->new_video, &c->new_video_size,
h * w + AV_INPUT_BUFFER_PADDING_SIZE);
if (!c->new_video)
return AVERROR(ENOMEM);
if (c->bpp == 8)
cdxl_decode_ham8(c, p);
else
cdxl_decode_ham6(c, p);
} else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
cdxl_decode_rgb(c, p);
} else {
cdxl_decode_raw(c, p);
}
*got_frame = 1;
return buf_size;
}
|
C
|
FFmpeg
| 1 |
CVE-2017-13037
|
https://www.cvedetails.com/cve/CVE-2017-13037/
|
CWE-125
|
https://github.com/the-tcpdump-group/tcpdump/commit/2c2cfbd2b771ac888bc5c4a6d922f749d3822538
|
2c2cfbd2b771ac888bc5c4a6d922f749d3822538
|
CVE-2017-13037/IP: Add bounds checks when printing time stamp options.
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file supplied by the reporter(s), modified
so the capture file won't be rejected as an invalid capture.
|
ip_printroute(netdissect_options *ndo,
register const u_char *cp, u_int length)
{
register u_int ptr;
register u_int len;
if (length < 3) {
ND_PRINT((ndo, " [bad length %u]", length));
return (0);
}
if ((length + 1) & 3)
ND_PRINT((ndo, " [bad length %u]", length));
ND_TCHECK(cp[2]);
ptr = cp[2] - 1;
if (ptr < 3 || ((ptr + 1) & 3) || ptr > length + 1)
ND_PRINT((ndo, " [bad ptr %u]", cp[2]));
for (len = 3; len < length; len += 4) {
ND_TCHECK2(cp[len], 4);
ND_PRINT((ndo, " %s", ipaddr_string(ndo, &cp[len])));
if (ptr > len)
ND_PRINT((ndo, ","));
}
return (0);
trunc:
return (-1);
}
|
ip_printroute(netdissect_options *ndo,
register const u_char *cp, u_int length)
{
register u_int ptr;
register u_int len;
if (length < 3) {
ND_PRINT((ndo, " [bad length %u]", length));
return (0);
}
if ((length + 1) & 3)
ND_PRINT((ndo, " [bad length %u]", length));
ND_TCHECK(cp[2]);
ptr = cp[2] - 1;
if (ptr < 3 || ((ptr + 1) & 3) || ptr > length + 1)
ND_PRINT((ndo, " [bad ptr %u]", cp[2]));
for (len = 3; len < length; len += 4) {
ND_TCHECK2(cp[len], 4);
ND_PRINT((ndo, " %s", ipaddr_string(ndo, &cp[len])));
if (ptr > len)
ND_PRINT((ndo, ","));
}
return (0);
trunc:
return (-1);
}
|
C
|
tcpdump
| 0 |
CVE-2018-13006
|
https://www.cvedetails.com/cve/CVE-2018-13006/
|
CWE-125
|
https://github.com/gpac/gpac/commit/bceb03fd2be95097a7b409ea59914f332fb6bc86
|
bceb03fd2be95097a7b409ea59914f332fb6bc86
|
fixed 2 possible heap overflows (inc. #1088)
|
void cslg_del(GF_Box *s)
{
GF_CompositionToDecodeBox *ptr = (GF_CompositionToDecodeBox *)s;
if (ptr == NULL) return;
gf_free(ptr);
return;
}
|
void cslg_del(GF_Box *s)
{
GF_CompositionToDecodeBox *ptr = (GF_CompositionToDecodeBox *)s;
if (ptr == NULL) return;
gf_free(ptr);
return;
}
|
C
|
gpac
| 0 |
CVE-2011-2829
|
https://www.cvedetails.com/cve/CVE-2011-2829/
|
CWE-189
|
https://github.com/chromium/chromium/commit/a4b20ed4917f1f6fc83b6375a48e2c3895d43a8a
|
a4b20ed4917f1f6fc83b6375a48e2c3895d43a8a
|
Add chromium_code: 1 to surface.gyp and gl.gyp to pick up -Werror.
It looks like this was dropped accidentally in http://codereview.chromium.org/6718027 (surface.gyp) and http://codereview.chromium.org/6722026 (gl.gyp)
Remove now-redudant code that's implied by chromium_code: 1.
Fix the warnings that have crept in since chromium_code: 1 was removed.
BUG=none
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91598
Review URL: http://codereview.chromium.org/7227009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91813 0039d316-1c4b-4281-b951-d872f2087c98
|
GLvoid StubGLDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
glDeleteFramebuffersEXT(n, framebuffers);
}
|
GLvoid StubGLDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
glDeleteFramebuffersEXT(n, framebuffers);
}
|
C
|
Chrome
| 0 |
CVE-2019-17534
|
https://www.cvedetails.com/cve/CVE-2019-17534/
| null |
https://github.com/libvips/libvips/commit/ce684dd008532ea0bf9d4a1d89bacb35f4a83f4d
|
ce684dd008532ea0bf9d4a1d89bacb35f4a83f4d
|
fetch map after DGifGetImageDesc()
Earlier refactoring broke GIF map fetch.
|
vips_gifload( const char *filename, VipsImage **out, ... )
{
va_list ap;
int result;
va_start( ap, out );
result = vips_call_split( "gifload", ap, filename, out );
va_end( ap );
return( result );
}
|
vips_gifload( const char *filename, VipsImage **out, ... )
{
va_list ap;
int result;
va_start( ap, out );
result = vips_call_split( "gifload", ap, filename, out );
va_end( ap );
return( result );
}
|
C
|
libvips
| 0 |
CVE-2011-4127
|
https://www.cvedetails.com/cve/CVE-2011-4127/
|
CWE-264
|
https://github.com/torvalds/linux/commit/ec8013beddd717d1740cfefb1a9b900deef85462
|
ec8013beddd717d1740cfefb1a9b900deef85462
|
dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
static int __init dm_flakey_init(void)
{
int r = dm_register_target(&flakey_target);
if (r < 0)
DMERR("register failed %d", r);
return r;
}
|
static int __init dm_flakey_init(void)
{
int r = dm_register_target(&flakey_target);
if (r < 0)
DMERR("register failed %d", r);
return r;
}
|
C
|
linux
| 0 |
CVE-2010-5328
|
https://www.cvedetails.com/cve/CVE-2010-5328/
|
CWE-20
|
https://github.com/torvalds/linux/commit/f106eee10038c2ee5b6056aaf3f6d5229be6dcdd
|
f106eee10038c2ee5b6056aaf3f6d5229be6dcdd
|
pids: fix fork_idle() to setup ->pids correctly
copy_process(pid => &init_struct_pid) doesn't do attach_pid/etc.
It shouldn't, but this means that the idle threads run with the wrong
pids copied from the caller's task_struct. In x86 case the caller is
either kernel_init() thread or keventd.
In particular, this means that after the series of cpu_up/cpu_down an
idle thread (which never exits) can run with .pid pointing to nowhere.
Change fork_idle() to initialize idle->pids[] correctly. We only set
.pid = &init_struct_pid but do not add .node to list, INIT_TASK() does
the same for the boot-cpu idle thread (swapper).
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Cedric Le Goater <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Herbert Poetzl <[email protected]>
Cc: Mathias Krause <[email protected]>
Acked-by: Roland McGrath <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Cc: Sukadev Bhattiprolu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
struct task_struct * __cpuinit fork_idle(int cpu)
{
struct task_struct *task;
struct pt_regs regs;
task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL,
&init_struct_pid, 0);
if (!IS_ERR(task)) {
init_idle_pids(task->pids);
init_idle(task, cpu);
}
return task;
}
|
struct task_struct * __cpuinit fork_idle(int cpu)
{
struct task_struct *task;
struct pt_regs regs;
task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL,
&init_struct_pid, 0);
if (!IS_ERR(task))
init_idle(task, cpu);
return task;
}
|
C
|
linux
| 1 |
CVE-2013-7421
|
https://www.cvedetails.com/cve/CVE-2013-7421/
|
CWE-264
|
https://github.com/torvalds/linux/commit/5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypto API,
as demonstrated by Mathias Krause:
https://lkml.org/lkml/2013/3/4/70
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
static int ccm_decrypt(struct aead_request *req)
{
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct crypto_aes_ctx *ctx = crypto_aead_ctx(aead);
unsigned int authsize = crypto_aead_authsize(aead);
struct blkcipher_desc desc = { .info = req->iv };
struct blkcipher_walk walk;
u8 __aligned(8) mac[AES_BLOCK_SIZE];
u8 buf[AES_BLOCK_SIZE];
u32 len = req->cryptlen - authsize;
int err;
err = ccm_init_mac(req, mac, len);
if (err)
return err;
kernel_neon_begin_partial(6);
if (req->assoclen)
ccm_calculate_auth_mac(req, mac);
/* preserve the original iv for the final round */
memcpy(buf, req->iv, AES_BLOCK_SIZE);
blkcipher_walk_init(&walk, req->dst, req->src, len);
err = blkcipher_aead_walk_virt_block(&desc, &walk, aead,
AES_BLOCK_SIZE);
while (walk.nbytes) {
u32 tail = walk.nbytes % AES_BLOCK_SIZE;
if (walk.nbytes == len)
tail = 0;
ce_aes_ccm_decrypt(walk.dst.virt.addr, walk.src.virt.addr,
walk.nbytes - tail, ctx->key_enc,
num_rounds(ctx), mac, walk.iv);
len -= walk.nbytes - tail;
err = blkcipher_walk_done(&desc, &walk, tail);
}
if (!err)
ce_aes_ccm_final(mac, buf, ctx->key_enc, num_rounds(ctx));
kernel_neon_end();
if (err)
return err;
/* compare calculated auth tag with the stored one */
scatterwalk_map_and_copy(buf, req->src, req->cryptlen - authsize,
authsize, 0);
if (memcmp(mac, buf, authsize))
return -EBADMSG;
return 0;
}
|
static int ccm_decrypt(struct aead_request *req)
{
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct crypto_aes_ctx *ctx = crypto_aead_ctx(aead);
unsigned int authsize = crypto_aead_authsize(aead);
struct blkcipher_desc desc = { .info = req->iv };
struct blkcipher_walk walk;
u8 __aligned(8) mac[AES_BLOCK_SIZE];
u8 buf[AES_BLOCK_SIZE];
u32 len = req->cryptlen - authsize;
int err;
err = ccm_init_mac(req, mac, len);
if (err)
return err;
kernel_neon_begin_partial(6);
if (req->assoclen)
ccm_calculate_auth_mac(req, mac);
/* preserve the original iv for the final round */
memcpy(buf, req->iv, AES_BLOCK_SIZE);
blkcipher_walk_init(&walk, req->dst, req->src, len);
err = blkcipher_aead_walk_virt_block(&desc, &walk, aead,
AES_BLOCK_SIZE);
while (walk.nbytes) {
u32 tail = walk.nbytes % AES_BLOCK_SIZE;
if (walk.nbytes == len)
tail = 0;
ce_aes_ccm_decrypt(walk.dst.virt.addr, walk.src.virt.addr,
walk.nbytes - tail, ctx->key_enc,
num_rounds(ctx), mac, walk.iv);
len -= walk.nbytes - tail;
err = blkcipher_walk_done(&desc, &walk, tail);
}
if (!err)
ce_aes_ccm_final(mac, buf, ctx->key_enc, num_rounds(ctx));
kernel_neon_end();
if (err)
return err;
/* compare calculated auth tag with the stored one */
scatterwalk_map_and_copy(buf, req->src, req->cryptlen - authsize,
authsize, 0);
if (memcmp(mac, buf, authsize))
return -EBADMSG;
return 0;
}
|
C
|
linux
| 0 |
CVE-2017-5013
|
https://www.cvedetails.com/cve/CVE-2017-5013/
| null |
https://github.com/chromium/chromium/commit/8f3a9a68b2dcdd2c54cf49a41ad34729ab576702
|
8f3a9a68b2dcdd2c54cf49a41ad34729ab576702
|
Don't focus the location bar for NTP navigations in non-selected tabs.
BUG=677716
TEST=See bug for repro steps.
Review-Url: https://codereview.chromium.org/2624373002
Cr-Commit-Position: refs/heads/master@{#443338}
|
void Browser::DidNavigateMainFramePostCommit(WebContents* web_contents) {
if (web_contents == tab_strip_model_->GetActiveWebContents())
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
}
|
void Browser::DidNavigateMainFramePostCommit(WebContents* web_contents) {
if (web_contents == tab_strip_model_->GetActiveWebContents())
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
}
|
C
|
Chrome
| 0 |
CVE-2013-6644
|
https://www.cvedetails.com/cve/CVE-2013-6644/
| null |
https://github.com/chromium/chromium/commit/db93178bcaaf7e99ebb18bd51fa99b2feaf47e1f
|
db93178bcaaf7e99ebb18bd51fa99b2feaf47e1f
|
[Extensions] Add GetInstalledExtension() method to ExtensionRegistry
This CL adds GetInstalledExtension() method to ExtensionRegistry and
uses it instead of deprecated ExtensionService::GetInstalledExtension()
in chrome/browser/ui/app_list/.
Part of removing the deprecated GetInstalledExtension() call
from the ExtensionService.
BUG=489687
Review URL: https://codereview.chromium.org/1130353010
Cr-Commit-Position: refs/heads/master@{#333036}
|
void ExtensionAppItem::OnExtensionIconImageChanged(
extensions::IconImage* image) {
DCHECK(icon_.get() == image);
UpdateIcon();
}
|
void ExtensionAppItem::OnExtensionIconImageChanged(
extensions::IconImage* image) {
DCHECK(icon_.get() == image);
UpdateIcon();
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/9d02cda7a634fbd6e53d98091f618057f0174387
|
9d02cda7a634fbd6e53d98091f618057f0174387
|
Coverity: Fixing pass by value.
CID=101462, 101458, 101437, 101471, 101467
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/9006023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115257 0039d316-1c4b-4281-b951-d872f2087c98
|
IPAddressNumber ConvertIPv4NumberToIPv6Number(
const IPAddressNumber& ipv4_number) {
DCHECK(ipv4_number.size() == 4);
IPAddressNumber ipv6_number;
ipv6_number.reserve(16);
ipv6_number.insert(ipv6_number.end(), 10, 0);
ipv6_number.push_back(0xFF);
ipv6_number.push_back(0xFF);
ipv6_number.insert(ipv6_number.end(), ipv4_number.begin(), ipv4_number.end());
return ipv6_number;
}
|
IPAddressNumber ConvertIPv4NumberToIPv6Number(
const IPAddressNumber& ipv4_number) {
DCHECK(ipv4_number.size() == 4);
IPAddressNumber ipv6_number;
ipv6_number.reserve(16);
ipv6_number.insert(ipv6_number.end(), 10, 0);
ipv6_number.push_back(0xFF);
ipv6_number.push_back(0xFF);
ipv6_number.insert(ipv6_number.end(), ipv4_number.begin(), ipv4_number.end());
return ipv6_number;
}
|
C
|
Chrome
| 0 |
CVE-2015-3215
|
https://www.cvedetails.com/cve/CVE-2015-3215/
|
CWE-20
|
https://github.com/YanVugenfirer/kvm-guest-drivers-windows/commit/fbfa4d1083ea84c5429992ca3e996d7d4fbc8238
|
fbfa4d1083ea84c5429992ca3e996d7d4fbc8238
|
NetKVM: BZ#1169718: More rigoruous testing of incoming packet
Signed-off-by: Joseph Hindin <[email protected]>
|
VOID ParaNdis_OnPnPEvent(
PARANDIS_ADAPTER *pContext,
NDIS_DEVICE_PNP_EVENT pEvent,
PVOID pInfo,
ULONG ulSize)
{
const char *pName = "";
UNREFERENCED_PARAMETER(pInfo);
UNREFERENCED_PARAMETER(ulSize);
DEBUG_ENTRY(0);
#undef MAKECASE
#define MAKECASE(x) case (x): pName = #x; break;
switch (pEvent)
{
MAKECASE(NdisDevicePnPEventQueryRemoved)
MAKECASE(NdisDevicePnPEventRemoved)
MAKECASE(NdisDevicePnPEventSurpriseRemoved)
MAKECASE(NdisDevicePnPEventQueryStopped)
MAKECASE(NdisDevicePnPEventStopped)
MAKECASE(NdisDevicePnPEventPowerProfileChanged)
MAKECASE(NdisDevicePnPEventFilterListChanged)
default:
break;
}
ParaNdis_DebugHistory(pContext, hopPnpEvent, NULL, pEvent, 0, 0);
DPrintf(0, ("[%s] (%s)\n", __FUNCTION__, pName));
if (pEvent == NdisDevicePnPEventSurpriseRemoved)
{
pContext->bSurprizeRemoved = TRUE;
ParaNdis_ResetVirtIONetDevice(pContext);
{
UINT i;
for (i = 0; i < pContext->nPathBundles; i++)
{
pContext->pPathBundles[i].txPath.Pause();
}
}
}
pContext->PnpEvents[pContext->nPnpEventIndex++] = pEvent;
if (pContext->nPnpEventIndex > sizeof(pContext->PnpEvents)/sizeof(pContext->PnpEvents[0]))
pContext->nPnpEventIndex = 0;
}
|
VOID ParaNdis_OnPnPEvent(
PARANDIS_ADAPTER *pContext,
NDIS_DEVICE_PNP_EVENT pEvent,
PVOID pInfo,
ULONG ulSize)
{
const char *pName = "";
UNREFERENCED_PARAMETER(pInfo);
UNREFERENCED_PARAMETER(ulSize);
DEBUG_ENTRY(0);
#undef MAKECASE
#define MAKECASE(x) case (x): pName = #x; break;
switch (pEvent)
{
MAKECASE(NdisDevicePnPEventQueryRemoved)
MAKECASE(NdisDevicePnPEventRemoved)
MAKECASE(NdisDevicePnPEventSurpriseRemoved)
MAKECASE(NdisDevicePnPEventQueryStopped)
MAKECASE(NdisDevicePnPEventStopped)
MAKECASE(NdisDevicePnPEventPowerProfileChanged)
MAKECASE(NdisDevicePnPEventFilterListChanged)
default:
break;
}
ParaNdis_DebugHistory(pContext, hopPnpEvent, NULL, pEvent, 0, 0);
DPrintf(0, ("[%s] (%s)\n", __FUNCTION__, pName));
if (pEvent == NdisDevicePnPEventSurpriseRemoved)
{
pContext->bSurprizeRemoved = TRUE;
ParaNdis_ResetVirtIONetDevice(pContext);
{
UINT i;
for (i = 0; i < pContext->nPathBundles; i++)
{
pContext->pPathBundles[i].txPath.Pause();
}
}
}
pContext->PnpEvents[pContext->nPnpEventIndex++] = pEvent;
if (pContext->nPnpEventIndex > sizeof(pContext->PnpEvents)/sizeof(pContext->PnpEvents[0]))
pContext->nPnpEventIndex = 0;
}
|
C
|
kvm-guest-drivers-windows
| 0 |
CVE-2015-7515
|
https://www.cvedetails.com/cve/CVE-2015-7515/
| null |
https://github.com/torvalds/linux/commit/8e20cf2bce122ce9262d6034ee5d5b76fbb92f96
|
8e20cf2bce122ce9262d6034ee5d5b76fbb92f96
|
Input: aiptek - fix crash on detecting device without endpoints
The aiptek driver crashes in aiptek_probe() when a specially crafted USB
device without endpoints is detected. This fix adds a check that the device
has proper configuration expected by the driver. Also an error return value
is changed to more matching one in one of the error paths.
Reported-by: Ralf Spenneberg <[email protected]>
Signed-off-by: Vladis Dronov <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
static int aiptek_open(struct input_dev *inputdev)
{
struct aiptek *aiptek = input_get_drvdata(inputdev);
aiptek->urb->dev = aiptek->usbdev;
if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0)
return -EIO;
return 0;
}
|
static int aiptek_open(struct input_dev *inputdev)
{
struct aiptek *aiptek = input_get_drvdata(inputdev);
aiptek->urb->dev = aiptek->usbdev;
if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0)
return -EIO;
return 0;
}
|
C
|
linux
| 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}
|
Response PageHandler::StartScreencast(Maybe<std::string> format,
Maybe<int> quality,
Maybe<int> max_width,
Maybe<int> max_height,
Maybe<int> every_nth_frame) {
RenderWidgetHostImpl* widget_host =
host_ ? host_->GetRenderWidgetHost() : nullptr;
if (!widget_host)
return Response::InternalError();
screencast_enabled_ = true;
screencast_format_ = format.fromMaybe(kPng);
screencast_quality_ = quality.fromMaybe(kDefaultScreenshotQuality);
if (screencast_quality_ < 0 || screencast_quality_ > 100)
screencast_quality_ = kDefaultScreenshotQuality;
screencast_max_width_ = max_width.fromMaybe(-1);
screencast_max_height_ = max_height.fromMaybe(-1);
++session_id_;
frame_counter_ = 0;
frames_in_flight_ = 0;
capture_every_nth_frame_ = every_nth_frame.fromMaybe(1);
bool visible = !widget_host->is_hidden();
NotifyScreencastVisibility(visible);
if (visible) {
if (has_compositor_frame_metadata_) {
InnerSwapCompositorFrame();
} else {
widget_host->Send(new ViewMsg_ForceRedraw(widget_host->GetRoutingID(),
ui::LatencyInfo()));
}
}
return Response::FallThrough();
}
|
Response PageHandler::StartScreencast(Maybe<std::string> format,
Maybe<int> quality,
Maybe<int> max_width,
Maybe<int> max_height,
Maybe<int> every_nth_frame) {
RenderWidgetHostImpl* widget_host =
host_ ? host_->GetRenderWidgetHost() : nullptr;
if (!widget_host)
return Response::InternalError();
screencast_enabled_ = true;
screencast_format_ = format.fromMaybe(kPng);
screencast_quality_ = quality.fromMaybe(kDefaultScreenshotQuality);
if (screencast_quality_ < 0 || screencast_quality_ > 100)
screencast_quality_ = kDefaultScreenshotQuality;
screencast_max_width_ = max_width.fromMaybe(-1);
screencast_max_height_ = max_height.fromMaybe(-1);
++session_id_;
frame_counter_ = 0;
frames_in_flight_ = 0;
capture_every_nth_frame_ = every_nth_frame.fromMaybe(1);
bool visible = !widget_host->is_hidden();
NotifyScreencastVisibility(visible);
if (visible) {
if (has_compositor_frame_metadata_) {
InnerSwapCompositorFrame();
} else {
widget_host->Send(new ViewMsg_ForceRedraw(widget_host->GetRoutingID(),
ui::LatencyInfo()));
}
}
return Response::FallThrough();
}
|
C
|
Chrome
| 0 |
CVE-2014-3610
|
https://www.cvedetails.com/cve/CVE-2014-3610/
|
CWE-264
|
https://github.com/torvalds/linux/commit/854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
|
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
|
KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTER_ESP and IA32_SYSENTER_EIP cause #GP if
non-canonical address is written on Intel but not on AMD (which ignores the top
32-bits).
Accordingly, this patch injects a #GP on the MSRs which behave identically on
Intel and AMD. To eliminate the differences between the architecutres, the
value which is written to IA32_SYSENTER_ESP and IA32_SYSENTER_EIP is turned to
canonical value before writing instead of injecting a #GP.
Some references from Intel and AMD manuals:
According to Intel SDM description of WRMSR instruction #GP is expected on
WRMSR "If the source register contains a non-canonical address and ECX
specifies one of the following MSRs: IA32_DS_AREA, IA32_FS_BASE, IA32_GS_BASE,
IA32_KERNEL_GS_BASE, IA32_LSTAR, IA32_SYSENTER_EIP, IA32_SYSENTER_ESP."
According to AMD manual instruction manual:
LSTAR/CSTAR (SYSCALL): "The WRMSR instruction loads the target RIP into the
LSTAR and CSTAR registers. If an RIP written by WRMSR is not in canonical
form, a general-protection exception (#GP) occurs."
IA32_GS_BASE and IA32_FS_BASE (WRFSBASE/WRGSBASE): "The address written to the
base field must be in canonical form or a #GP fault will occur."
IA32_KERNEL_GS_BASE (SWAPGS): "The address stored in the KernelGSbase MSR must
be in canonical form."
This patch fixes CVE-2014-3610.
Cc: [email protected]
Signed-off-by: Nadav Amit <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb)
{
to_vmcb->save.fs = from_vmcb->save.fs;
to_vmcb->save.gs = from_vmcb->save.gs;
to_vmcb->save.tr = from_vmcb->save.tr;
to_vmcb->save.ldtr = from_vmcb->save.ldtr;
to_vmcb->save.kernel_gs_base = from_vmcb->save.kernel_gs_base;
to_vmcb->save.star = from_vmcb->save.star;
to_vmcb->save.lstar = from_vmcb->save.lstar;
to_vmcb->save.cstar = from_vmcb->save.cstar;
to_vmcb->save.sfmask = from_vmcb->save.sfmask;
to_vmcb->save.sysenter_cs = from_vmcb->save.sysenter_cs;
to_vmcb->save.sysenter_esp = from_vmcb->save.sysenter_esp;
to_vmcb->save.sysenter_eip = from_vmcb->save.sysenter_eip;
}
|
static void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb)
{
to_vmcb->save.fs = from_vmcb->save.fs;
to_vmcb->save.gs = from_vmcb->save.gs;
to_vmcb->save.tr = from_vmcb->save.tr;
to_vmcb->save.ldtr = from_vmcb->save.ldtr;
to_vmcb->save.kernel_gs_base = from_vmcb->save.kernel_gs_base;
to_vmcb->save.star = from_vmcb->save.star;
to_vmcb->save.lstar = from_vmcb->save.lstar;
to_vmcb->save.cstar = from_vmcb->save.cstar;
to_vmcb->save.sfmask = from_vmcb->save.sfmask;
to_vmcb->save.sysenter_cs = from_vmcb->save.sysenter_cs;
to_vmcb->save.sysenter_esp = from_vmcb->save.sysenter_esp;
to_vmcb->save.sysenter_eip = from_vmcb->save.sysenter_eip;
}
|
C
|
linux
| 0 |
CVE-2015-6780
|
https://www.cvedetails.com/cve/CVE-2015-6780/
| null |
https://github.com/chromium/chromium/commit/f2cba0d13b3a6d76dedede66731e5ca253d3b2af
|
f2cba0d13b3a6d76dedede66731e5ca253d3b2af
|
Fix UAF in Origin Info Bubble and permission settings UI.
In addition to fixing the UAF, will this also fix the problem of the bubble
showing over the previous tab (if the bubble is open when the tab it was opened
for closes).
BUG=490492
TBR=tedchoc
Review URL: https://codereview.chromium.org/1317443002
Cr-Commit-Position: refs/heads/master@{#346023}
|
void PopupHeaderView::SetIdentityName(const base::string16& name) {
name_->SetText(name);
}
|
void PopupHeaderView::SetIdentityName(const base::string16& name) {
name_->SetText(name);
}
|
C
|
Chrome
| 0 |
Subsets and Splits
CWE-119 Function Changes
This query retrieves specific examples (before and after code changes) of vulnerabilities with CWE-119, providing basic filtering but limited insight.
Vulnerable Code with CWE IDs
The query filters and combines records from multiple datasets to list specific vulnerability details, providing a basic overview of vulnerable functions but lacking deeper insights.
Vulnerable Functions in BigVul
Retrieves details of vulnerable functions from both validation and test datasets where vulnerabilities are present, providing a basic set of data points for further analysis.
Vulnerable Code Functions
This query filters and shows raw data for vulnerable functions, which provides basic insight into specific vulnerabilities but lacks broader analytical value.
Top 100 Vulnerable Functions
Retrieves 100 samples of vulnerabilities from the training dataset, showing the CVE ID, CWE ID, and code changes before and after the vulnerability, which is a basic filtering of vulnerability data.