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
|
---|---|---|---|---|---|---|---|---|---|---|
null | null | null |
https://github.com/chromium/chromium/commit/e93dc535728da259ec16d1c3cc393f80b25f64ae
|
e93dc535728da259ec16d1c3cc393f80b25f64ae
|
Add a unit test that filenames aren't unintentionally converted to URLs.
Also fixes two issues in OSExchangeDataProviderWin:
- It used a disjoint set of clipboard formats when handling
GetUrl(..., true /* filename conversion */) vs GetFilenames(...), so the
actual returned results would vary depending on which one was called.
- It incorrectly used ::DragFinish() instead of ::ReleaseStgMedium().
::DragFinish() is only meant to be used in conjunction with WM_DROPFILES.
BUG=346135
Review URL: https://codereview.chromium.org/380553002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283226 0039d316-1c4b-4281-b951-d872f2087c98
|
HANDLE GetData(UINT format) {
if (!opened_) {
NOTREACHED();
return NULL;
}
return ::GetClipboardData(format);
}
|
HANDLE GetData(UINT format) {
if (!opened_) {
NOTREACHED();
return NULL;
}
return ::GetClipboardData(format);
}
|
C
|
Chrome
| 0 |
CVE-2018-6942
|
https://www.cvedetails.com/cve/CVE-2018-6942/
|
CWE-476
|
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=29c759284e305ec428703c9a5831d0b1fc3497ef
|
29c759284e305ec428703c9a5831d0b1fc3497ef
| null |
Ins_EIF( void )
{
/* nothing to do */
}
|
Ins_EIF( void )
{
/* nothing to do */
}
|
C
|
savannah
| 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 |
format_linenum (char numbuf[LINENUM_LENGTH_BOUND + 1], lin n)
{
char *p = numbuf + LINENUM_LENGTH_BOUND;
*p = '\0';
if (n < 0)
{
do
*--p = '0' - (int) (n % 10);
while ((n /= 10) != 0);
*--p = '-';
}
else
{
do
*--p = '0' + (int) (n % 10);
while ((n /= 10) != 0);
}
return p;
}
|
format_linenum (char numbuf[LINENUM_LENGTH_BOUND + 1], lin n)
{
char *p = numbuf + LINENUM_LENGTH_BOUND;
*p = '\0';
if (n < 0)
{
do
*--p = '0' - (int) (n % 10);
while ((n /= 10) != 0);
*--p = '-';
}
else
{
do
*--p = '0' + (int) (n % 10);
while ((n /= 10) != 0);
}
return p;
}
|
C
|
savannah
| 0 |
CVE-2014-9421
|
https://www.cvedetails.com/cve/CVE-2014-9421/
| null |
https://github.com/krb5/krb5/commit/a197e92349a4aa2141b5dff12e9dd44c2a2166e3
|
a197e92349a4aa2141b5dff12e9dd44c2a2166e3
|
Fix kadm5/gssrpc XDR double free [CVE-2014-9421]
[MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free
partial deserialization results upon failure to deserialize. This
responsibility belongs to the callers, svctcp_getargs() and
svcudp_getargs(); doing it in the unwrap function results in freeing
the results twice.
In xdr_krb5_tl_data() and xdr_krb5_principal(), null out the pointers
we are freeing, as other XDR functions such as xdr_bytes() and
xdr_string().
ticket: 8056 (new)
target_version: 1.13.1
tags: pullup
|
static void auth_gssapi_display_status_1(
char *m,
OM_uint32 code,
int type,
int rec)
{
OM_uint32 gssstat, minor_stat;
gss_buffer_desc msg;
OM_uint32 msg_ctx;
msg_ctx = 0;
while (1) {
gssstat = gss_display_status(&minor_stat, code,
type, GSS_C_NULL_OID,
&msg_ctx, &msg);
if (gssstat != GSS_S_COMPLETE) {
if (!rec) {
auth_gssapi_display_status_1(m,gssstat,GSS_C_GSS_CODE,1);
auth_gssapi_display_status_1(m, minor_stat,
GSS_C_MECH_CODE, 1);
} else {
fputs ("GSS-API authentication error ", stderr);
fwrite (msg.value, msg.length, 1, stderr);
fputs (": recursive failure!\n", stderr);
}
return;
}
fprintf (stderr, "GSS-API authentication error %s: ", m);
fwrite (msg.value, msg.length, 1, stderr);
putc ('\n', stderr);
if (misc_debug_gssapi)
gssrpcint_printf("GSS-API authentication error %s: %*s\n",
m, (int)msg.length, (char *) msg.value);
(void) gss_release_buffer(&minor_stat, &msg);
if (!msg_ctx)
break;
}
}
|
static void auth_gssapi_display_status_1(
char *m,
OM_uint32 code,
int type,
int rec)
{
OM_uint32 gssstat, minor_stat;
gss_buffer_desc msg;
OM_uint32 msg_ctx;
msg_ctx = 0;
while (1) {
gssstat = gss_display_status(&minor_stat, code,
type, GSS_C_NULL_OID,
&msg_ctx, &msg);
if (gssstat != GSS_S_COMPLETE) {
if (!rec) {
auth_gssapi_display_status_1(m,gssstat,GSS_C_GSS_CODE,1);
auth_gssapi_display_status_1(m, minor_stat,
GSS_C_MECH_CODE, 1);
} else {
fputs ("GSS-API authentication error ", stderr);
fwrite (msg.value, msg.length, 1, stderr);
fputs (": recursive failure!\n", stderr);
}
return;
}
fprintf (stderr, "GSS-API authentication error %s: ", m);
fwrite (msg.value, msg.length, 1, stderr);
putc ('\n', stderr);
if (misc_debug_gssapi)
gssrpcint_printf("GSS-API authentication error %s: %*s\n",
m, (int)msg.length, (char *) msg.value);
(void) gss_release_buffer(&minor_stat, &msg);
if (!msg_ctx)
break;
}
}
|
C
|
krb5
| 0 |
CVE-2011-2495
|
https://www.cvedetails.com/cve/CVE-2011-2495/
|
CWE-264
|
https://github.com/torvalds/linux/commit/1d1221f375c94ef961ba8574ac4f85c8870ddd51
|
1d1221f375c94ef961ba8574ac4f85c8870ddd51
|
proc: restrict access to /proc/PID/io
/proc/PID/io may be used for gathering private information. E.g. for
openssh and vsftpd daemons wchars/rchars may be used to learn the
precise password length. Restrict it to processes being able to ptrace
the target process.
ptrace_may_access() is needed to prevent keeping open file descriptor of
"io" file, executing setuid binary and gathering io information of the
setuid'ed process.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
static int proc_fd_link(struct inode *inode, struct path *path)
{
return proc_fd_info(inode, path, NULL);
}
|
static int proc_fd_link(struct inode *inode, struct path *path)
{
return proc_fd_info(inode, path, NULL);
}
|
C
|
linux
| 0 |
CVE-2015-2059
|
https://www.cvedetails.com/cve/CVE-2015-2059/
|
CWE-119
|
https://git.savannah.gnu.org/cgit/libidn.git/commit/?id=2e97c279
|
2e97c2796581c27213962c77f5a8571a598f9a2e
| null |
stringprep_ucs4_nfkc_normalize (const uint32_t * str, ssize_t len)
{
char *p;
uint32_t *result_wc;
p = stringprep_ucs4_to_utf8 (str, len, 0, 0);
result_wc = _g_utf8_normalize_wc (p, -1, G_NORMALIZE_NFKC);
free (p);
return result_wc;
}
|
stringprep_ucs4_nfkc_normalize (const uint32_t * str, ssize_t len)
{
char *p;
uint32_t *result_wc;
p = stringprep_ucs4_to_utf8 (str, len, 0, 0);
result_wc = _g_utf8_normalize_wc (p, -1, G_NORMALIZE_NFKC);
free (p);
return result_wc;
}
|
C
|
savannah
| 0 |
CVE-2016-9391
|
https://www.cvedetails.com/cve/CVE-2016-9391/
| null |
https://github.com/mdadams/jasper/commit/1e84674d95353c64e5c4c0e7232ae86fd6ea813b
|
1e84674d95353c64e5c4c0e7232ae86fd6ea813b
|
Changed the JPC bitstream code to more gracefully handle a request
for a larger sized integer than what can be handled (i.e., return
with an error instead of failing an assert).
|
static void calcstepsizes(uint_fast16_t refstepsize, int numrlvls,
uint_fast16_t *stepsizes)
{
int bandno;
int numbands;
uint_fast16_t expn;
uint_fast16_t mant;
expn = JPC_QCX_GETEXPN(refstepsize);
mant = JPC_QCX_GETMANT(refstepsize);
numbands = 3 * numrlvls - 2;
for (bandno = 0; bandno < numbands; ++bandno) {
////jas_eprintf("DEBUG %d %d %d %d %d\n", bandno, expn, numrlvls, bandno, ((numrlvls - 1) - (numrlvls - 1 - ((bandno > 0) ? ((bandno + 2) / 3) : (0)))));
stepsizes[bandno] = JPC_QCX_MANT(mant) | JPC_QCX_EXPN(expn +
(numrlvls - 1) - (numrlvls - 1 - ((bandno > 0) ? ((bandno + 2) / 3) : (0))));
}
}
|
static void calcstepsizes(uint_fast16_t refstepsize, int numrlvls,
uint_fast16_t *stepsizes)
{
int bandno;
int numbands;
uint_fast16_t expn;
uint_fast16_t mant;
expn = JPC_QCX_GETEXPN(refstepsize);
mant = JPC_QCX_GETMANT(refstepsize);
numbands = 3 * numrlvls - 2;
for (bandno = 0; bandno < numbands; ++bandno) {
////jas_eprintf("DEBUG %d %d %d %d %d\n", bandno, expn, numrlvls, bandno, ((numrlvls - 1) - (numrlvls - 1 - ((bandno > 0) ? ((bandno + 2) / 3) : (0)))));
stepsizes[bandno] = JPC_QCX_MANT(mant) | JPC_QCX_EXPN(expn +
(numrlvls - 1) - (numrlvls - 1 - ((bandno > 0) ? ((bandno + 2) / 3) : (0))));
}
}
|
C
|
jasper
| 1 |
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 <kbr@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657568}
|
ScopedRenderbufferBindingReset::~ScopedRenderbufferBindingReset() {
api_->glBindRenderbufferEXTFn(GL_RENDERBUFFER, renderbuffer_);
}
|
ScopedRenderbufferBindingReset::~ScopedRenderbufferBindingReset() {
api_->glBindRenderbufferEXTFn(GL_RENDERBUFFER, renderbuffer_);
}
|
C
|
Chrome
| 0 |
CVE-2018-16513
|
https://www.cvedetails.com/cve/CVE-2018-16513/
|
CWE-704
|
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=b326a71659b7837d3acde954b18bda1a6f5e9498
|
b326a71659b7837d3acde954b18bda1a6f5e9498
| null |
static int rgb2hsb(float *RGB)
{
float HSB[3], v, diff;
int i, j=0;
v = 1.0;
for (i=0;i<3;i++)
HSB[i] = 0.0;
for (i=0;i<3;i++) {
if (RGB[i] > HSB[2]) {
HSB[2] = RGB[i];
j = i;
}
if (RGB[i] < v)
v = RGB[i];
}
if (HSB[2] != 0) {
diff = HSB[2] - v;
HSB[1] = diff / HSB[2];
switch (j) {
case 0 : /* R == Brightness */
/* diff can only be zero if r == br, so we need to make sure here we
* don't divide by zero
*/
if (diff)
HSB[0] = ((RGB[1] - RGB[2]) / (6.0 * diff)) + (RGB[2] > RGB[1] ? 1.0 : 0.0);
else
HSB[0] = (RGB[1] - RGB[2]) + (RGB[2] > RGB[1] ? 1.0 : 0.0);
break;
case 1 : /* G == Brightness */
HSB[0] = (1.0 / 3.0) + (RGB[2] - RGB[0]) / (6.0 * diff);
break;
case 2 : /* B == Brightness */
HSB[0] = (2.0 / 3.0) + (RGB[0] - RGB[1]) / (6.0 * diff);
break;
}
}
for (i=0;i<3;i++) {
if (HSB[i] < 0)
HSB[i] = 0;
if (RGB[i] > 1)
HSB[i] = 1;
RGB[i] = HSB[i];
}
return 0;
}
|
static int rgb2hsb(float *RGB)
{
float HSB[3], v, diff;
int i, j=0;
v = 1.0;
for (i=0;i<3;i++)
HSB[i] = 0.0;
for (i=0;i<3;i++) {
if (RGB[i] > HSB[2]) {
HSB[2] = RGB[i];
j = i;
}
if (RGB[i] < v)
v = RGB[i];
}
if (HSB[2] != 0) {
diff = HSB[2] - v;
HSB[1] = diff / HSB[2];
switch (j) {
case 0 : /* R == Brightness */
/* diff can only be zero if r == br, so we need to make sure here we
* don't divide by zero
*/
if (diff)
HSB[0] = ((RGB[1] - RGB[2]) / (6.0 * diff)) + (RGB[2] > RGB[1] ? 1.0 : 0.0);
else
HSB[0] = (RGB[1] - RGB[2]) + (RGB[2] > RGB[1] ? 1.0 : 0.0);
break;
case 1 : /* G == Brightness */
HSB[0] = (1.0 / 3.0) + (RGB[2] - RGB[0]) / (6.0 * diff);
break;
case 2 : /* B == Brightness */
HSB[0] = (2.0 / 3.0) + (RGB[0] - RGB[1]) / (6.0 * diff);
break;
}
}
for (i=0;i<3;i++) {
if (HSB[i] < 0)
HSB[i] = 0;
if (RGB[i] > 1)
HSB[i] = 1;
RGB[i] = HSB[i];
}
return 0;
}
|
C
|
ghostscript
| 0 |
CVE-2018-1000050
|
https://www.cvedetails.com/cve/CVE-2018-1000050/
|
CWE-119
|
https://github.com/nothings/stb/commit/244d83bc3d859293f55812d48b3db168e581f6ab
|
244d83bc3d859293f55812d48b3db168e581f6ab
|
fix unchecked length in stb_vorbis that could crash on corrupt/invalid files
|
static void imdct_step3_iter0_loop(int n, float *e, int i_off, int k_off, float *A)
{
float *ee0 = e + i_off;
float *ee2 = ee0 + k_off;
int i;
assert((n & 3) == 0);
for (i=(n>>2); i > 0; --i) {
float k00_20, k01_21;
k00_20 = ee0[ 0] - ee2[ 0];
k01_21 = ee0[-1] - ee2[-1];
ee0[ 0] += ee2[ 0];//ee0[ 0] = ee0[ 0] + ee2[ 0];
ee0[-1] += ee2[-1];//ee0[-1] = ee0[-1] + ee2[-1];
ee2[ 0] = k00_20 * A[0] - k01_21 * A[1];
ee2[-1] = k01_21 * A[0] + k00_20 * A[1];
A += 8;
k00_20 = ee0[-2] - ee2[-2];
k01_21 = ee0[-3] - ee2[-3];
ee0[-2] += ee2[-2];//ee0[-2] = ee0[-2] + ee2[-2];
ee0[-3] += ee2[-3];//ee0[-3] = ee0[-3] + ee2[-3];
ee2[-2] = k00_20 * A[0] - k01_21 * A[1];
ee2[-3] = k01_21 * A[0] + k00_20 * A[1];
A += 8;
k00_20 = ee0[-4] - ee2[-4];
k01_21 = ee0[-5] - ee2[-5];
ee0[-4] += ee2[-4];//ee0[-4] = ee0[-4] + ee2[-4];
ee0[-5] += ee2[-5];//ee0[-5] = ee0[-5] + ee2[-5];
ee2[-4] = k00_20 * A[0] - k01_21 * A[1];
ee2[-5] = k01_21 * A[0] + k00_20 * A[1];
A += 8;
k00_20 = ee0[-6] - ee2[-6];
k01_21 = ee0[-7] - ee2[-7];
ee0[-6] += ee2[-6];//ee0[-6] = ee0[-6] + ee2[-6];
ee0[-7] += ee2[-7];//ee0[-7] = ee0[-7] + ee2[-7];
ee2[-6] = k00_20 * A[0] - k01_21 * A[1];
ee2[-7] = k01_21 * A[0] + k00_20 * A[1];
A += 8;
ee0 -= 8;
ee2 -= 8;
}
}
|
static void imdct_step3_iter0_loop(int n, float *e, int i_off, int k_off, float *A)
{
float *ee0 = e + i_off;
float *ee2 = ee0 + k_off;
int i;
assert((n & 3) == 0);
for (i=(n>>2); i > 0; --i) {
float k00_20, k01_21;
k00_20 = ee0[ 0] - ee2[ 0];
k01_21 = ee0[-1] - ee2[-1];
ee0[ 0] += ee2[ 0];//ee0[ 0] = ee0[ 0] + ee2[ 0];
ee0[-1] += ee2[-1];//ee0[-1] = ee0[-1] + ee2[-1];
ee2[ 0] = k00_20 * A[0] - k01_21 * A[1];
ee2[-1] = k01_21 * A[0] + k00_20 * A[1];
A += 8;
k00_20 = ee0[-2] - ee2[-2];
k01_21 = ee0[-3] - ee2[-3];
ee0[-2] += ee2[-2];//ee0[-2] = ee0[-2] + ee2[-2];
ee0[-3] += ee2[-3];//ee0[-3] = ee0[-3] + ee2[-3];
ee2[-2] = k00_20 * A[0] - k01_21 * A[1];
ee2[-3] = k01_21 * A[0] + k00_20 * A[1];
A += 8;
k00_20 = ee0[-4] - ee2[-4];
k01_21 = ee0[-5] - ee2[-5];
ee0[-4] += ee2[-4];//ee0[-4] = ee0[-4] + ee2[-4];
ee0[-5] += ee2[-5];//ee0[-5] = ee0[-5] + ee2[-5];
ee2[-4] = k00_20 * A[0] - k01_21 * A[1];
ee2[-5] = k01_21 * A[0] + k00_20 * A[1];
A += 8;
k00_20 = ee0[-6] - ee2[-6];
k01_21 = ee0[-7] - ee2[-7];
ee0[-6] += ee2[-6];//ee0[-6] = ee0[-6] + ee2[-6];
ee0[-7] += ee2[-7];//ee0[-7] = ee0[-7] + ee2[-7];
ee2[-6] = k00_20 * A[0] - k01_21 * A[1];
ee2[-7] = k01_21 * A[0] + k00_20 * A[1];
A += 8;
ee0 -= 8;
ee2 -= 8;
}
}
|
C
|
stb
| 0 |
CVE-2018-11596
|
https://www.cvedetails.com/cve/CVE-2018-11596/
|
CWE-119
|
https://github.com/espruino/Espruino/commit/ce1924193862d58cb43d3d4d9dada710a8361b89
|
ce1924193862d58cb43d3d4d9dada710a8361b89
|
fix jsvGetString regression
|
long long jsvGetLongIntegerAndUnLock(JsVar *v) {
long long i = jsvGetLongInteger(v);
jsvUnLock(v);
return i;
}
|
long long jsvGetLongIntegerAndUnLock(JsVar *v) {
long long i = jsvGetLongInteger(v);
jsvUnLock(v);
return i;
}
|
C
|
Espruino
| 0 |
CVE-2017-11144
|
https://www.cvedetails.com/cve/CVE-2017-11144/
|
CWE-754
|
https://git.php.net/?p=php-src.git;a=commit;h=91826a311dd37f4c4e5d605fa7af331e80ddd4c3
|
91826a311dd37f4c4e5d605fa7af331e80ddd4c3
| null |
PHP_FUNCTION(openssl_error_string)
{
char buf[256];
unsigned long val;
if (zend_parse_parameters_none() == FAILURE) {
return;
}
php_openssl_store_errors();
if (OPENSSL_G(errors) == NULL || OPENSSL_G(errors)->top == OPENSSL_G(errors)->bottom) {
RETURN_FALSE;
}
OPENSSL_G(errors)->bottom = (OPENSSL_G(errors)->bottom + 1) % ERR_NUM_ERRORS;
val = OPENSSL_G(errors)->buffer[OPENSSL_G(errors)->bottom];
if (val) {
ERR_error_string_n(val, buf, 256);
RETURN_STRING(buf);
} else {
RETURN_FALSE;
}
}
|
PHP_FUNCTION(openssl_error_string)
{
char buf[256];
unsigned long val;
if (zend_parse_parameters_none() == FAILURE) {
return;
}
php_openssl_store_errors();
if (OPENSSL_G(errors) == NULL || OPENSSL_G(errors)->top == OPENSSL_G(errors)->bottom) {
RETURN_FALSE;
}
OPENSSL_G(errors)->bottom = (OPENSSL_G(errors)->bottom + 1) % ERR_NUM_ERRORS;
val = OPENSSL_G(errors)->buffer[OPENSSL_G(errors)->bottom];
if (val) {
ERR_error_string_n(val, buf, 256);
RETURN_STRING(buf);
} else {
RETURN_FALSE;
}
}
|
C
|
php
| 0 |
CVE-2017-15397
|
https://www.cvedetails.com/cve/CVE-2017-15397/
|
CWE-311
|
https://github.com/chromium/chromium/commit/0579ed631fb37de5704b54ed2ee466bf29630ad0
|
0579ed631fb37de5704b54ed2ee466bf29630ad0
|
Replace base::MakeUnique with std::make_unique in net/.
base/memory/ptr_util.h includes will be cleaned up later.
Bug: 755727
Change-Id: Ibaf46f05c9b02b76f9a91e819984b087a8c0d434
Reviewed-on: https://chromium-review.googlesource.com/627300
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Bence Béky <bnc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498123}
|
NetworkThrottleManagerImpl::~NetworkThrottleManagerImpl() {}
|
NetworkThrottleManagerImpl::~NetworkThrottleManagerImpl() {}
|
C
|
Chrome
| 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 |
int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
int purpose, int trust)
{
int idx;
/* If purpose not set use default */
if (!purpose)
purpose = def_purpose;
/* If we have a purpose then check it is valid */
if (purpose) {
X509_PURPOSE *ptmp;
idx = X509_PURPOSE_get_by_id(purpose);
if (idx == -1) {
X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT,
X509_R_UNKNOWN_PURPOSE_ID);
return 0;
}
ptmp = X509_PURPOSE_get0(idx);
if (ptmp->trust == X509_TRUST_DEFAULT) {
idx = X509_PURPOSE_get_by_id(def_purpose);
if (idx == -1) {
X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT,
X509_R_UNKNOWN_PURPOSE_ID);
return 0;
}
ptmp = X509_PURPOSE_get0(idx);
}
/* If trust not set then get from purpose default */
if (!trust)
trust = ptmp->trust;
}
if (trust) {
idx = X509_TRUST_get_by_id(trust);
if (idx == -1) {
X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT,
X509_R_UNKNOWN_TRUST_ID);
return 0;
}
}
if (purpose && !ctx->param->purpose)
ctx->param->purpose = purpose;
if (trust && !ctx->param->trust)
ctx->param->trust = trust;
return 1;
}
|
int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
int purpose, int trust)
{
int idx;
/* If purpose not set use default */
if (!purpose)
purpose = def_purpose;
/* If we have a purpose then check it is valid */
if (purpose) {
X509_PURPOSE *ptmp;
idx = X509_PURPOSE_get_by_id(purpose);
if (idx == -1) {
X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT,
X509_R_UNKNOWN_PURPOSE_ID);
return 0;
}
ptmp = X509_PURPOSE_get0(idx);
if (ptmp->trust == X509_TRUST_DEFAULT) {
idx = X509_PURPOSE_get_by_id(def_purpose);
if (idx == -1) {
X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT,
X509_R_UNKNOWN_PURPOSE_ID);
return 0;
}
ptmp = X509_PURPOSE_get0(idx);
}
/* If trust not set then get from purpose default */
if (!trust)
trust = ptmp->trust;
}
if (trust) {
idx = X509_TRUST_get_by_id(trust);
if (idx == -1) {
X509err(X509_F_X509_STORE_CTX_PURPOSE_INHERIT,
X509_R_UNKNOWN_TRUST_ID);
return 0;
}
}
if (purpose && !ctx->param->purpose)
ctx->param->purpose = purpose;
if (trust && !ctx->param->trust)
ctx->param->trust = trust;
return 1;
}
|
C
|
openssl
| 0 |
CVE-2011-3188
|
https://www.cvedetails.com/cve/CVE-2011-3188/
| null |
https://github.com/torvalds/linux/commit/6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
|
6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
|
net: Compute protocol sequence numbers and fragment IDs using MD5.
Computers have become a lot faster since we compromised on the
partial MD4 hash which we use currently for performance reasons.
MD5 is a much safer choice, and is inline with both RFC1948 and
other ISS generators (OpenBSD, Solaris, etc.)
Furthermore, only having 24-bits of the sequence number be truly
unpredictable is a very serious limitation. So the periodic
regeneration and 8-bit counter have been removed. We compute and
use a full 32-bit sequence number.
For ipv6, DCCP was found to use a 32-bit truncated initial sequence
number (it needs 43-bits) and that is fixed here as well.
Reported-by: Dan Kaminsky <dan@doxpara.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
static void get_openreq4(struct sock *sk, struct request_sock *req,
struct seq_file *f, int i, int uid, int *len)
{
const struct inet_request_sock *ireq = inet_rsk(req);
int ttd = req->expires - jiffies;
seq_printf(f, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %u %d %pK%n",
i,
ireq->loc_addr,
ntohs(inet_sk(sk)->inet_sport),
ireq->rmt_addr,
ntohs(ireq->rmt_port),
TCP_SYN_RECV,
0, 0, /* could print option size, but that is af dependent. */
1, /* timers active (only the expire timer) */
jiffies_to_clock_t(ttd),
req->retrans,
uid,
0, /* non standard timer */
0, /* open_requests have no inode */
atomic_read(&sk->sk_refcnt),
req,
len);
}
|
static void get_openreq4(struct sock *sk, struct request_sock *req,
struct seq_file *f, int i, int uid, int *len)
{
const struct inet_request_sock *ireq = inet_rsk(req);
int ttd = req->expires - jiffies;
seq_printf(f, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %u %d %pK%n",
i,
ireq->loc_addr,
ntohs(inet_sk(sk)->inet_sport),
ireq->rmt_addr,
ntohs(ireq->rmt_port),
TCP_SYN_RECV,
0, 0, /* could print option size, but that is af dependent. */
1, /* timers active (only the expire timer) */
jiffies_to_clock_t(ttd),
req->retrans,
uid,
0, /* non standard timer */
0, /* open_requests have no inode */
atomic_read(&sk->sk_refcnt),
req,
len);
}
|
C
|
linux
| 0 |
CVE-2016-4539
|
https://www.cvedetails.com/cve/CVE-2016-4539/
|
CWE-119
|
https://git.php.net/?p=php-src.git;a=commit;h=dccda88f27a084bcbbb30198ace12b4e7ae961cc
|
dccda88f27a084bcbbb30198ace12b4e7ae961cc
| null |
inline static unsigned short xml_encode_us_ascii(unsigned char c)
{
return (unsigned short)c;
}
|
inline static unsigned short xml_encode_us_ascii(unsigned char c)
{
return (unsigned short)c;
}
|
C
|
php
| 0 |
CVE-2013-2859
|
https://www.cvedetails.com/cve/CVE-2013-2859/
| null |
https://github.com/chromium/chromium/commit/4801ff6578b3976731b13657715dcbe916c6a221
|
4801ff6578b3976731b13657715dcbe916c6a221
|
Named access checks on DOMWindow miss navigator
The design of the named access check is very fragile. Instead of doing the
access check at the same time as the access, we need to check access in a
separate operation using different parameters. Worse, we need to implement a
part of the access check as a blacklist of dangerous properties.
This CL expands the blacklist slightly by adding in the real named properties
from the DOMWindow instance to the current list (which included the real named
properties of the shadow object).
In the longer term, we should investigate whether we can change the V8 API to
let us do the access check in the same callback as the property access itself.
BUG=237022
Review URL: https://chromiumcodereview.appspot.com/15346002
git-svn-id: svn://svn.chromium.org/blink/trunk@150616 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
v8::Handle<v8::Value> V8DOMWindow::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
DOMWindow* window = V8DOMWindow::toNative(info.Holder());
if (!window)
return v8Undefined();
Frame* frame = window->frame();
if (!frame)
return v8Undefined();
AtomicString propName = toWebCoreAtomicString(name);
Frame* child = frame->tree()->scopedChild(propName);
if (child)
return toV8Fast(child->document()->domWindow(), info, window);
if (!info.Holder()->GetRealNamedProperty(name).IsEmpty())
return v8Undefined();
Document* doc = frame->document();
if (doc && doc->isHTMLDocument()) {
if (toHTMLDocument(doc)->hasNamedItem(propName.impl()) || doc->hasElementWithId(propName.impl())) {
RefPtr<HTMLCollection> items = doc->windowNamedItems(propName);
if (!items->isEmpty()) {
if (items->hasExactlyOneItem())
return toV8Fast(items->item(0), info, window);
return toV8Fast(items.release(), info, window);
}
}
}
return v8Undefined();
}
|
v8::Handle<v8::Value> V8DOMWindow::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
DOMWindow* window = V8DOMWindow::toNative(info.Holder());
if (!window)
return v8Undefined();
Frame* frame = window->frame();
if (!frame)
return v8Undefined();
AtomicString propName = toWebCoreAtomicString(name);
Frame* child = frame->tree()->scopedChild(propName);
if (child)
return toV8Fast(child->document()->domWindow(), info, window);
if (!info.Holder()->GetRealNamedProperty(name).IsEmpty())
return v8Undefined();
Document* doc = frame->document();
if (doc && doc->isHTMLDocument()) {
if (toHTMLDocument(doc)->hasNamedItem(propName.impl()) || doc->hasElementWithId(propName.impl())) {
RefPtr<HTMLCollection> items = doc->windowNamedItems(propName);
if (!items->isEmpty()) {
if (items->hasExactlyOneItem())
return toV8Fast(items->item(0), info, window);
return toV8Fast(items.release(), info, window);
}
}
}
return v8Undefined();
}
|
C
|
Chrome
| 0 |
CVE-2016-6250
|
https://www.cvedetails.com/cve/CVE-2016-6250/
|
CWE-190
|
https://github.com/libarchive/libarchive/commit/3014e198
|
3014e198
|
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
a > limit || b > limit || a + b > limit
to avoid problems when a + b wraps around.
|
idr_extend_identifier(struct idrent *wnp, int numsize, int nullsize)
{
unsigned char *p;
int wnp_ext_off;
wnp_ext_off = wnp->isoent->ext_off;
if (wnp->noff + numsize != wnp_ext_off) {
p = (unsigned char *)wnp->isoent->identifier;
/* Extend the filename; foo.c --> foo___.c */
memmove(p + wnp->noff + numsize, p + wnp_ext_off,
wnp->isoent->ext_len + nullsize);
wnp->isoent->ext_off = wnp_ext_off = wnp->noff + numsize;
wnp->isoent->id_len = wnp_ext_off + wnp->isoent->ext_len;
}
}
|
idr_extend_identifier(struct idrent *wnp, int numsize, int nullsize)
{
unsigned char *p;
int wnp_ext_off;
wnp_ext_off = wnp->isoent->ext_off;
if (wnp->noff + numsize != wnp_ext_off) {
p = (unsigned char *)wnp->isoent->identifier;
/* Extend the filename; foo.c --> foo___.c */
memmove(p + wnp->noff + numsize, p + wnp_ext_off,
wnp->isoent->ext_len + nullsize);
wnp->isoent->ext_off = wnp_ext_off = wnp->noff + numsize;
wnp->isoent->id_len = wnp_ext_off + wnp->isoent->ext_len;
}
}
|
C
|
libarchive
| 0 |
CVE-2016-6295
|
https://www.cvedetails.com/cve/CVE-2016-6295/
|
CWE-416
|
https://git.php.net/?p=php-src.git;a=commit;h=cab1c3b3708eead315e033359d07049b23b147a3
|
cab1c3b3708eead315e033359d07049b23b147a3
| null |
static int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot TSRMLS_DC)
{
if (!strcasecmp(prot, "MD5")) {
s->securityAuthProto = usmHMACMD5AuthProtocol;
s->securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN;
} else if (!strcasecmp(prot, "SHA")) {
s->securityAuthProto = usmHMACSHA1AuthProtocol;
s->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown authentication protocol '%s'", prot);
return (-1);
}
return (0);
}
|
static int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot TSRMLS_DC)
{
if (!strcasecmp(prot, "MD5")) {
s->securityAuthProto = usmHMACMD5AuthProtocol;
s->securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN;
} else if (!strcasecmp(prot, "SHA")) {
s->securityAuthProto = usmHMACSHA1AuthProtocol;
s->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown authentication protocol '%s'", prot);
return (-1);
}
return (0);
}
|
C
|
php
| 0 |
CVE-2019-11599
|
https://www.cvedetails.com/cve/CVE-2019-11599/
|
CWE-362
|
https://github.com/torvalds/linux/commit/04f5866e41fb70690e28397487d8bd8eea7d712a
|
04f5866e41fb70690e28397487d8bd8eea7d712a
|
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes belonging to the mm is not nearly enough.
This was pointed out earlier. For example in Hugh's post from Jul 2017:
https://lkml.kernel.org/r/alpine.LSU.2.11.1707191716030.2055@eggly.anvils
"Not strictly relevant here, but a related note: I was very surprised
to discover, only quite recently, how handle_mm_fault() may be called
without down_read(mmap_sem) - when core dumping. That seems a
misguided optimization to me, which would also be nice to correct"
In particular because the growsdown and growsup can move the
vm_start/vm_end the various loops the core dump does around the vma will
not be consistent if page faults can happen concurrently.
Pretty much all users calling mmget_not_zero()/get_task_mm() and then
taking the mmap_sem had the potential to introduce unexpected side
effects in the core dumping code.
Adding mmap_sem for writing around the ->core_dump invocation is a
viable long term fix, but it requires removing all copy user and page
faults and to replace them with get_dump_page() for all binary formats
which is not suitable as a short term fix.
For the time being this solution manually covers the places that can
confuse the core dump either by altering the vma layout or the vma flags
while it runs. Once ->core_dump runs under mmap_sem for writing the
function mmget_still_valid() can be dropped.
Allowing mmap_sem protected sections to run in parallel with the
coredump provides some minor parallelism advantage to the swapoff code
(which seems to be safe enough by never mangling any vma field and can
keep doing swapins in parallel to the core dumping) and to some other
corner case.
In order to facilitate the backporting I added "Fixes: 86039bd3b4e6"
however the side effect of this same race condition in /proc/pid/mem
should be reproducible since before 2.6.12-rc2 so I couldn't add any
other "Fixes:" because there's no hash beyond the git genesis commit.
Because find_extend_vma() is the only location outside of the process
context that could modify the "mm" structures under mmap_sem for
reading, by adding the mmget_still_valid() check to it, all other cases
that take the mmap_sem for reading don't need the new check after
mmget_not_zero()/get_task_mm(). The expand_stack() in page fault
context also doesn't need the new check, because all tasks under core
dumping are frozen.
Link: http://lkml.kernel.org/r/20190325224949.11068-1-aarcange@redhat.com
Fixes: 86039bd3b4e6 ("userfaultfd: add new syscall to provide memory externalization")
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reported-by: Jann Horn <jannh@google.com>
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Jann Horn <jannh@google.com>
Acked-by: Jason Gunthorpe <jgg@mellanox.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
unsigned long ksys_mmap_pgoff(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff)
{
struct file *file = NULL;
unsigned long retval;
if (!(flags & MAP_ANONYMOUS)) {
audit_mmap_fd(fd, flags);
file = fget(fd);
if (!file)
return -EBADF;
if (is_file_hugepages(file))
len = ALIGN(len, huge_page_size(hstate_file(file)));
retval = -EINVAL;
if (unlikely(flags & MAP_HUGETLB && !is_file_hugepages(file)))
goto out_fput;
} else if (flags & MAP_HUGETLB) {
struct user_struct *user = NULL;
struct hstate *hs;
hs = hstate_sizelog((flags >> MAP_HUGE_SHIFT) & MAP_HUGE_MASK);
if (!hs)
return -EINVAL;
len = ALIGN(len, huge_page_size(hs));
/*
* VM_NORESERVE is used because the reservations will be
* taken when vm_ops->mmap() is called
* A dummy user value is used because we are not locking
* memory so no accounting is necessary
*/
file = hugetlb_file_setup(HUGETLB_ANON_FILE, len,
VM_NORESERVE,
&user, HUGETLB_ANONHUGE_INODE,
(flags >> MAP_HUGE_SHIFT) & MAP_HUGE_MASK);
if (IS_ERR(file))
return PTR_ERR(file);
}
flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
retval = vm_mmap_pgoff(file, addr, len, prot, flags, pgoff);
out_fput:
if (file)
fput(file);
return retval;
}
|
unsigned long ksys_mmap_pgoff(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff)
{
struct file *file = NULL;
unsigned long retval;
if (!(flags & MAP_ANONYMOUS)) {
audit_mmap_fd(fd, flags);
file = fget(fd);
if (!file)
return -EBADF;
if (is_file_hugepages(file))
len = ALIGN(len, huge_page_size(hstate_file(file)));
retval = -EINVAL;
if (unlikely(flags & MAP_HUGETLB && !is_file_hugepages(file)))
goto out_fput;
} else if (flags & MAP_HUGETLB) {
struct user_struct *user = NULL;
struct hstate *hs;
hs = hstate_sizelog((flags >> MAP_HUGE_SHIFT) & MAP_HUGE_MASK);
if (!hs)
return -EINVAL;
len = ALIGN(len, huge_page_size(hs));
/*
* VM_NORESERVE is used because the reservations will be
* taken when vm_ops->mmap() is called
* A dummy user value is used because we are not locking
* memory so no accounting is necessary
*/
file = hugetlb_file_setup(HUGETLB_ANON_FILE, len,
VM_NORESERVE,
&user, HUGETLB_ANONHUGE_INODE,
(flags >> MAP_HUGE_SHIFT) & MAP_HUGE_MASK);
if (IS_ERR(file))
return PTR_ERR(file);
}
flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
retval = vm_mmap_pgoff(file, addr, len, prot, flags, pgoff);
out_fput:
if (file)
fput(file);
return retval;
}
|
C
|
linux
| 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 GpuCommandBufferStub::SetMemoryAllocation(
const GpuMemoryAllocation& allocation) {
allocation_ = allocation;
SendMemoryAllocationToProxy(allocation);
}
|
void GpuCommandBufferStub::SetMemoryAllocation(
const GpuMemoryAllocation& allocation) {
allocation_ = allocation;
SendMemoryAllocationToProxy(allocation);
}
|
C
|
Chrome
| 0 |
CVE-2016-4565
|
https://www.cvedetails.com/cve/CVE-2016-4565/
|
CWE-264
|
https://github.com/torvalds/linux/commit/e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
|
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
|
IB/security: Restrict use of the write() interface
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl(). This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory instead.
For the immediate repair, detect and deny suspicious accesses to
the write API.
For long term, update the user space libraries and the kernel API
to something that doesn't present the same security vulnerabilities
(likely a structured ioctl() interface).
The impacted uAPI interfaces are generally only available if
hardware from drivers/infiniband is installed in the system.
Reported-by: Jann Horn <jann@thejh.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
[ Expanded check to all known write() entry points ]
Cc: stable@vger.kernel.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
|
static ssize_t ib_ucm_listen(struct ib_ucm_file *file,
const char __user *inbuf,
int in_len, int out_len)
{
struct ib_ucm_listen cmd;
struct ib_ucm_context *ctx;
int result;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
ctx = ib_ucm_ctx_get(file, cmd.id);
if (IS_ERR(ctx))
return PTR_ERR(ctx);
result = ucm_validate_listen(cmd.service_id, cmd.service_mask);
if (result)
goto out;
result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask);
out:
ib_ucm_ctx_put(ctx);
return result;
}
|
static ssize_t ib_ucm_listen(struct ib_ucm_file *file,
const char __user *inbuf,
int in_len, int out_len)
{
struct ib_ucm_listen cmd;
struct ib_ucm_context *ctx;
int result;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
ctx = ib_ucm_ctx_get(file, cmd.id);
if (IS_ERR(ctx))
return PTR_ERR(ctx);
result = ucm_validate_listen(cmd.service_id, cmd.service_mask);
if (result)
goto out;
result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask);
out:
ib_ucm_ctx_put(ctx);
return result;
}
|
C
|
linux
| 0 |
CVE-2015-6773
|
https://www.cvedetails.com/cve/CVE-2015-6773/
|
CWE-119
|
https://github.com/chromium/chromium/commit/33827275411b33371e7bb750cce20f11de85002d
|
33827275411b33371e7bb750cce20f11de85002d
|
Move SelectionTemplate::is_handle_visible_ to FrameSelection
This patch moves |is_handle_visible_| to |FrameSelection| from |SelectionTemplate|
since handle visibility is used only for setting |FrameSelection|, hence it is
a redundant member variable of |SelectionTemplate|.
Bug: 742093
Change-Id: I3add4da3844fb40be34dcb4d4b46b5fa6fed1d7e
Reviewed-on: https://chromium-review.googlesource.com/595389
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491660}
|
void Editor::ReplaceSelectionWithFragment(DocumentFragment* fragment,
bool select_replacement,
bool smart_replace,
bool match_style,
InputEvent::InputType input_type) {
DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate());
const VisibleSelection& selection =
GetFrame().Selection().ComputeVisibleSelectionInDOMTree();
if (selection.IsNone() || !selection.IsContentEditable() || !fragment)
return;
ReplaceSelectionCommand::CommandOptions options =
ReplaceSelectionCommand::kPreventNesting |
ReplaceSelectionCommand::kSanitizeFragment;
if (select_replacement)
options |= ReplaceSelectionCommand::kSelectReplacement;
if (smart_replace)
options |= ReplaceSelectionCommand::kSmartReplace;
if (match_style)
options |= ReplaceSelectionCommand::kMatchStyle;
DCHECK(GetFrame().GetDocument());
ReplaceSelectionCommand::Create(*GetFrame().GetDocument(), fragment, options,
input_type)
->Apply();
RevealSelectionAfterEditingOperation();
}
|
void Editor::ReplaceSelectionWithFragment(DocumentFragment* fragment,
bool select_replacement,
bool smart_replace,
bool match_style,
InputEvent::InputType input_type) {
DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate());
const VisibleSelection& selection =
GetFrame().Selection().ComputeVisibleSelectionInDOMTree();
if (selection.IsNone() || !selection.IsContentEditable() || !fragment)
return;
ReplaceSelectionCommand::CommandOptions options =
ReplaceSelectionCommand::kPreventNesting |
ReplaceSelectionCommand::kSanitizeFragment;
if (select_replacement)
options |= ReplaceSelectionCommand::kSelectReplacement;
if (smart_replace)
options |= ReplaceSelectionCommand::kSmartReplace;
if (match_style)
options |= ReplaceSelectionCommand::kMatchStyle;
DCHECK(GetFrame().GetDocument());
ReplaceSelectionCommand::Create(*GetFrame().GetDocument(), fragment, options,
input_type)
->Apply();
RevealSelectionAfterEditingOperation();
}
|
C
|
Chrome
| 0 |
CVE-2017-5009
|
https://www.cvedetails.com/cve/CVE-2017-5009/
|
CWE-119
|
https://github.com/chromium/chromium/commit/1c40f9042ae2d6ee7483d72998aabb5e73b2ff60
|
1c40f9042ae2d6ee7483d72998aabb5e73b2ff60
|
DevTools: send proper resource type in Network.RequestWillBeSent
This patch plumbs resoure type into the DispatchWillSendRequest
instrumenation. This allows us to report accurate type in
Network.RequestWillBeSent event, instead of "Other", that we report
today.
BUG=765501
R=dgozman
Change-Id: I0134c08b841e8dd247fdc8ff208bfd51e462709c
Reviewed-on: https://chromium-review.googlesource.com/667504
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507936}
|
bool ResourceLoader::WillFollowRedirect(
const WebURL& new_url,
const WebURL& new_site_for_cookies,
const WebString& new_referrer,
WebReferrerPolicy new_referrer_policy,
const WebString& new_method,
const WebURLResponse& passed_redirect_response,
bool& report_raw_headers) {
DCHECK(!passed_redirect_response.IsNull());
if (is_cache_aware_loading_activated_) {
HandleError(
ResourceError::CacheMissError(resource_->LastResourceRequest().Url()));
return false;
}
const ResourceRequest& last_request = resource_->LastResourceRequest();
ResourceRequest new_request(new_url);
new_request.SetSiteForCookies(new_site_for_cookies);
new_request.SetDownloadToFile(last_request.DownloadToFile());
new_request.SetUseStreamOnResponse(last_request.UseStreamOnResponse());
new_request.SetRequestContext(last_request.GetRequestContext());
new_request.SetFrameType(last_request.GetFrameType());
new_request.SetServiceWorkerMode(
passed_redirect_response.WasFetchedViaServiceWorker()
? WebURLRequest::ServiceWorkerMode::kAll
: WebURLRequest::ServiceWorkerMode::kNone);
new_request.SetShouldResetAppCache(last_request.ShouldResetAppCache());
new_request.SetFetchRequestMode(last_request.GetFetchRequestMode());
new_request.SetFetchCredentialsMode(last_request.GetFetchCredentialsMode());
new_request.SetKeepalive(last_request.GetKeepalive());
String referrer =
new_referrer.IsEmpty() ? Referrer::NoReferrer() : String(new_referrer);
new_request.SetHTTPReferrer(
Referrer(referrer, static_cast<ReferrerPolicy>(new_referrer_policy)));
new_request.SetPriority(last_request.Priority());
new_request.SetHTTPMethod(new_method);
if (new_request.HttpMethod() == last_request.HttpMethod())
new_request.SetHTTPBody(last_request.HttpBody());
new_request.SetCheckForBrowserSideNavigation(
last_request.CheckForBrowserSideNavigation());
Resource::Type resource_type = resource_->GetType();
const ResourceRequest& initial_request = resource_->GetResourceRequest();
WebURLRequest::RequestContext request_context =
initial_request.GetRequestContext();
WebURLRequest::FrameType frame_type = initial_request.GetFrameType();
WebURLRequest::FetchRequestMode fetch_request_mode =
initial_request.GetFetchRequestMode();
WebURLRequest::FetchCredentialsMode fetch_credentials_mode =
initial_request.GetFetchCredentialsMode();
const ResourceLoaderOptions& options = resource_->Options();
const ResourceResponse& redirect_response(
passed_redirect_response.ToResourceResponse());
new_request.SetRedirectStatus(
ResourceRequest::RedirectStatus::kFollowedRedirect);
if (!IsManualRedirectFetchRequest(initial_request)) {
bool unused_preload = resource_->IsUnusedPreload();
SecurityViolationReportingPolicy reporting_policy =
unused_preload ? SecurityViolationReportingPolicy::kSuppressReporting
: SecurityViolationReportingPolicy::kReport;
Context().CheckCSPForRequest(
request_context, new_url, options, reporting_policy,
ResourceRequest::RedirectStatus::kFollowedRedirect);
ResourceRequestBlockedReason blocked_reason = Context().CanRequest(
resource_type, new_request, new_url, options, reporting_policy,
FetchParameters::kUseDefaultOriginRestrictionForType,
ResourceRequest::RedirectStatus::kFollowedRedirect);
if (blocked_reason != ResourceRequestBlockedReason::kNone) {
CancelForRedirectAccessCheckError(new_url, blocked_reason);
return false;
}
if (options.cors_handling_by_resource_fetcher ==
kEnableCORSHandlingByResourceFetcher &&
fetch_request_mode == WebURLRequest::kFetchRequestModeCORS) {
RefPtr<SecurityOrigin> source_origin = options.security_origin;
if (!source_origin.get())
source_origin = Context().GetSecurityOrigin();
WebSecurityOrigin source_web_origin(source_origin.get());
WrappedResourceRequest new_request_wrapper(new_request);
WebString cors_error_msg;
if (!WebCORS::HandleRedirect(
source_web_origin, new_request_wrapper, redirect_response.Url(),
redirect_response.HttpStatusCode(),
redirect_response.HttpHeaderFields(), fetch_credentials_mode,
resource_->MutableOptions(), cors_error_msg)) {
resource_->SetCORSStatus(CORSStatus::kFailed);
if (!unused_preload) {
Context().AddErrorConsoleMessage(cors_error_msg,
FetchContext::kJSSource);
}
CancelForRedirectAccessCheckError(new_url,
ResourceRequestBlockedReason::kOther);
return false;
}
source_origin = source_web_origin;
}
if (resource_type == Resource::kImage &&
fetcher_->ShouldDeferImageLoad(new_url)) {
CancelForRedirectAccessCheckError(new_url,
ResourceRequestBlockedReason::kOther);
return false;
}
}
bool cross_origin =
!SecurityOrigin::AreSameSchemeHostPort(redirect_response.Url(), new_url);
fetcher_->RecordResourceTimingOnRedirect(resource_.Get(), redirect_response,
cross_origin);
if (options.cors_handling_by_resource_fetcher ==
kEnableCORSHandlingByResourceFetcher &&
fetch_request_mode == WebURLRequest::kFetchRequestModeCORS) {
bool allow_stored_credentials = false;
switch (fetch_credentials_mode) {
case WebURLRequest::kFetchCredentialsModeOmit:
break;
case WebURLRequest::kFetchCredentialsModeSameOrigin:
allow_stored_credentials = !options.cors_flag;
break;
case WebURLRequest::kFetchCredentialsModeInclude:
case WebURLRequest::kFetchCredentialsModePassword:
allow_stored_credentials = true;
break;
}
new_request.SetAllowStoredCredentials(allow_stored_credentials);
}
Context().PrepareRequest(new_request,
FetchContext::RedirectType::kForRedirect);
Context().DispatchWillSendRequest(resource_->Identifier(), new_request,
redirect_response, resource_->GetType(),
options.initiator_info);
DCHECK(KURL(new_site_for_cookies) == new_request.SiteForCookies());
DCHECK_EQ(new_request.GetRequestContext(), request_context);
DCHECK_EQ(new_request.GetFrameType(), frame_type);
DCHECK_EQ(new_request.GetFetchRequestMode(), fetch_request_mode);
DCHECK_EQ(new_request.GetFetchCredentialsMode(), fetch_credentials_mode);
if (new_request.Url() != KURL(new_url)) {
CancelForRedirectAccessCheckError(new_request.Url(),
ResourceRequestBlockedReason::kOther);
return false;
}
if (!resource_->WillFollowRedirect(new_request, redirect_response)) {
CancelForRedirectAccessCheckError(new_request.Url(),
ResourceRequestBlockedReason::kOther);
return false;
}
report_raw_headers = new_request.ReportRawHeaders();
return true;
}
|
bool ResourceLoader::WillFollowRedirect(
const WebURL& new_url,
const WebURL& new_site_for_cookies,
const WebString& new_referrer,
WebReferrerPolicy new_referrer_policy,
const WebString& new_method,
const WebURLResponse& passed_redirect_response,
bool& report_raw_headers) {
DCHECK(!passed_redirect_response.IsNull());
if (is_cache_aware_loading_activated_) {
HandleError(
ResourceError::CacheMissError(resource_->LastResourceRequest().Url()));
return false;
}
const ResourceRequest& last_request = resource_->LastResourceRequest();
ResourceRequest new_request(new_url);
new_request.SetSiteForCookies(new_site_for_cookies);
new_request.SetDownloadToFile(last_request.DownloadToFile());
new_request.SetUseStreamOnResponse(last_request.UseStreamOnResponse());
new_request.SetRequestContext(last_request.GetRequestContext());
new_request.SetFrameType(last_request.GetFrameType());
new_request.SetServiceWorkerMode(
passed_redirect_response.WasFetchedViaServiceWorker()
? WebURLRequest::ServiceWorkerMode::kAll
: WebURLRequest::ServiceWorkerMode::kNone);
new_request.SetShouldResetAppCache(last_request.ShouldResetAppCache());
new_request.SetFetchRequestMode(last_request.GetFetchRequestMode());
new_request.SetFetchCredentialsMode(last_request.GetFetchCredentialsMode());
new_request.SetKeepalive(last_request.GetKeepalive());
String referrer =
new_referrer.IsEmpty() ? Referrer::NoReferrer() : String(new_referrer);
new_request.SetHTTPReferrer(
Referrer(referrer, static_cast<ReferrerPolicy>(new_referrer_policy)));
new_request.SetPriority(last_request.Priority());
new_request.SetHTTPMethod(new_method);
if (new_request.HttpMethod() == last_request.HttpMethod())
new_request.SetHTTPBody(last_request.HttpBody());
new_request.SetCheckForBrowserSideNavigation(
last_request.CheckForBrowserSideNavigation());
Resource::Type resource_type = resource_->GetType();
const ResourceRequest& initial_request = resource_->GetResourceRequest();
WebURLRequest::RequestContext request_context =
initial_request.GetRequestContext();
WebURLRequest::FrameType frame_type = initial_request.GetFrameType();
WebURLRequest::FetchRequestMode fetch_request_mode =
initial_request.GetFetchRequestMode();
WebURLRequest::FetchCredentialsMode fetch_credentials_mode =
initial_request.GetFetchCredentialsMode();
const ResourceLoaderOptions& options = resource_->Options();
const ResourceResponse& redirect_response(
passed_redirect_response.ToResourceResponse());
new_request.SetRedirectStatus(
ResourceRequest::RedirectStatus::kFollowedRedirect);
if (!IsManualRedirectFetchRequest(initial_request)) {
bool unused_preload = resource_->IsUnusedPreload();
SecurityViolationReportingPolicy reporting_policy =
unused_preload ? SecurityViolationReportingPolicy::kSuppressReporting
: SecurityViolationReportingPolicy::kReport;
Context().CheckCSPForRequest(
request_context, new_url, options, reporting_policy,
ResourceRequest::RedirectStatus::kFollowedRedirect);
ResourceRequestBlockedReason blocked_reason = Context().CanRequest(
resource_type, new_request, new_url, options, reporting_policy,
FetchParameters::kUseDefaultOriginRestrictionForType,
ResourceRequest::RedirectStatus::kFollowedRedirect);
if (blocked_reason != ResourceRequestBlockedReason::kNone) {
CancelForRedirectAccessCheckError(new_url, blocked_reason);
return false;
}
if (options.cors_handling_by_resource_fetcher ==
kEnableCORSHandlingByResourceFetcher &&
fetch_request_mode == WebURLRequest::kFetchRequestModeCORS) {
RefPtr<SecurityOrigin> source_origin = options.security_origin;
if (!source_origin.get())
source_origin = Context().GetSecurityOrigin();
WebSecurityOrigin source_web_origin(source_origin.get());
WrappedResourceRequest new_request_wrapper(new_request);
WebString cors_error_msg;
if (!WebCORS::HandleRedirect(
source_web_origin, new_request_wrapper, redirect_response.Url(),
redirect_response.HttpStatusCode(),
redirect_response.HttpHeaderFields(), fetch_credentials_mode,
resource_->MutableOptions(), cors_error_msg)) {
resource_->SetCORSStatus(CORSStatus::kFailed);
if (!unused_preload) {
Context().AddErrorConsoleMessage(cors_error_msg,
FetchContext::kJSSource);
}
CancelForRedirectAccessCheckError(new_url,
ResourceRequestBlockedReason::kOther);
return false;
}
source_origin = source_web_origin;
}
if (resource_type == Resource::kImage &&
fetcher_->ShouldDeferImageLoad(new_url)) {
CancelForRedirectAccessCheckError(new_url,
ResourceRequestBlockedReason::kOther);
return false;
}
}
bool cross_origin =
!SecurityOrigin::AreSameSchemeHostPort(redirect_response.Url(), new_url);
fetcher_->RecordResourceTimingOnRedirect(resource_.Get(), redirect_response,
cross_origin);
if (options.cors_handling_by_resource_fetcher ==
kEnableCORSHandlingByResourceFetcher &&
fetch_request_mode == WebURLRequest::kFetchRequestModeCORS) {
bool allow_stored_credentials = false;
switch (fetch_credentials_mode) {
case WebURLRequest::kFetchCredentialsModeOmit:
break;
case WebURLRequest::kFetchCredentialsModeSameOrigin:
allow_stored_credentials = !options.cors_flag;
break;
case WebURLRequest::kFetchCredentialsModeInclude:
case WebURLRequest::kFetchCredentialsModePassword:
allow_stored_credentials = true;
break;
}
new_request.SetAllowStoredCredentials(allow_stored_credentials);
}
Context().PrepareRequest(new_request,
FetchContext::RedirectType::kForRedirect);
Context().DispatchWillSendRequest(resource_->Identifier(), new_request,
redirect_response, options.initiator_info);
DCHECK(KURL(new_site_for_cookies) == new_request.SiteForCookies());
DCHECK_EQ(new_request.GetRequestContext(), request_context);
DCHECK_EQ(new_request.GetFrameType(), frame_type);
DCHECK_EQ(new_request.GetFetchRequestMode(), fetch_request_mode);
DCHECK_EQ(new_request.GetFetchCredentialsMode(), fetch_credentials_mode);
if (new_request.Url() != KURL(new_url)) {
CancelForRedirectAccessCheckError(new_request.Url(),
ResourceRequestBlockedReason::kOther);
return false;
}
if (!resource_->WillFollowRedirect(new_request, redirect_response)) {
CancelForRedirectAccessCheckError(new_request.Url(),
ResourceRequestBlockedReason::kOther);
return false;
}
report_raw_headers = new_request.ReportRawHeaders();
return true;
}
|
C
|
Chrome
| 1 |
CVE-2016-1647
|
https://www.cvedetails.com/cve/CVE-2016-1647/
| null |
https://github.com/chromium/chromium/commit/e5787005a9004d7be289cc649c6ae4f3051996cd
|
e5787005a9004d7be289cc649c6ae4f3051996cd
|
Check that RWHI isn't deleted manually while owned by a scoped_ptr in RVHI
BUG=590284
Review URL: https://codereview.chromium.org/1747183002
Cr-Commit-Position: refs/heads/master@{#378844}
|
void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) {
DCHECK(base::MessageLoopForUI::IsCurrent());
gfx::Rect view_bounds = GetView()->GetViewBounds();
gfx::Rect snapshot_bounds(view_bounds.size());
std::vector<unsigned char> png;
if (ui::GrabViewSnapshot(
GetView()->GetNativeView(), &png, snapshot_bounds)) {
OnSnapshotDataReceived(snapshot_id, &png.front(), png.size());
return;
}
ui::GrabViewSnapshotAsync(
GetView()->GetNativeView(),
snapshot_bounds,
base::ThreadTaskRunnerHandle::Get(),
base::Bind(&RenderWidgetHostImpl::OnSnapshotDataReceivedAsync,
weak_factory_.GetWeakPtr(),
snapshot_id));
}
|
void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) {
DCHECK(base::MessageLoopForUI::IsCurrent());
gfx::Rect view_bounds = GetView()->GetViewBounds();
gfx::Rect snapshot_bounds(view_bounds.size());
std::vector<unsigned char> png;
if (ui::GrabViewSnapshot(
GetView()->GetNativeView(), &png, snapshot_bounds)) {
OnSnapshotDataReceived(snapshot_id, &png.front(), png.size());
return;
}
ui::GrabViewSnapshotAsync(
GetView()->GetNativeView(),
snapshot_bounds,
base::ThreadTaskRunnerHandle::Get(),
base::Bind(&RenderWidgetHostImpl::OnSnapshotDataReceivedAsync,
weak_factory_.GetWeakPtr(),
snapshot_id));
}
|
C
|
Chrome
| 0 |
CVE-2018-6033
|
https://www.cvedetails.com/cve/CVE-2018-6033/
|
CWE-20
|
https://github.com/chromium/chromium/commit/a8d6ae61d266d8bc44c3dd2d08bda32db701e359
|
a8d6ae61d266d8bc44c3dd2d08bda32db701e359
|
Downloads : Fixed an issue of opening incorrect download file
When one download overwrites another completed download, calling download.open in the old download causes the new download to open, which could be dangerous and undesirable. In this CL, we are trying to avoid this by blocking the opening of the old download.
Bug: 793620
Change-Id: Ic948175756700ad7c08489c3cc347330daedb6f8
Reviewed-on: https://chromium-review.googlesource.com/826477
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525810}
|
void DownloadManagerImpl::ResumeInterruptedDownload(
std::unique_ptr<content::DownloadUrlParameters> params,
uint32_t id) {
BeginDownloadInternal(std::move(params), id);
}
|
void DownloadManagerImpl::ResumeInterruptedDownload(
std::unique_ptr<content::DownloadUrlParameters> params,
uint32_t id) {
BeginDownloadInternal(std::move(params), id);
}
|
C
|
Chrome
| 0 |
CVE-2016-1665
|
https://www.cvedetails.com/cve/CVE-2016-1665/
|
CWE-20
|
https://github.com/chromium/chromium/commit/282f53ffdc3b1902da86f6a0791af736837efbf8
|
282f53ffdc3b1902da86f6a0791af736837efbf8
|
[signin] Add metrics to track the source for refresh token updated events
This CL add a source for update and revoke credentials operations. It then
surfaces the source in the chrome://signin-internals page.
This CL also records the following histograms that track refresh token events:
* Signin.RefreshTokenUpdated.ToValidToken.Source
* Signin.RefreshTokenUpdated.ToInvalidToken.Source
* Signin.RefreshTokenRevoked.Source
These histograms are needed to validate the assumptions of how often tokens
are revoked by the browser and the sources for the token revocations.
Bug: 896182
Change-Id: I2fcab80ee8e5699708e695bc3289fa6d34859a90
Reviewed-on: https://chromium-review.googlesource.com/c/1286464
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606181}
|
std::string GetAuthErrorAccountId(Profile* profile) {
const SigninErrorController* error =
SigninErrorControllerFactory::GetForProfile(profile);
if (!error)
return std::string();
return error->error_account_id();
}
|
std::string GetAuthErrorAccountId(Profile* profile) {
const SigninErrorController* error =
SigninErrorControllerFactory::GetForProfile(profile);
if (!error)
return std::string();
return error->error_account_id();
}
|
C
|
Chrome
| 0 |
CVE-2013-3236
|
https://www.cvedetails.com/cve/CVE-2013-3236/
|
CWE-200
|
https://github.com/torvalds/linux/commit/680d04e0ba7e926233e3b9cee59125ce181f66ba
|
680d04e0ba7e926233e3b9cee59125ce181f66ba
|
VSOCK: vmci - fix possible info leak in vmci_transport_dgram_dequeue()
In case we received no data on the call to skb_recv_datagram(), i.e.
skb->data is NULL, vmci_transport_dgram_dequeue() will return with 0
without updating msg_namelen leading to net/socket.c leaking the local,
uninitialized sockaddr_storage variable to userland -- 128 bytes of
kernel stack memory.
Fix this by moving the already existing msg_namelen assignment a few
lines above.
Cc: Andy King <acking@vmware.com>
Cc: Dmitry Torokhov <dtor@vmware.com>
Cc: George Zhang <georgezhang@vmware.com>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
static u64 vmci_transport_stream_rcvhiwat(struct vsock_sock *vsk)
{
return vmci_trans(vsk)->consume_size;
}
|
static u64 vmci_transport_stream_rcvhiwat(struct vsock_sock *vsk)
{
return vmci_trans(vsk)->consume_size;
}
|
C
|
linux
| 0 |
CVE-2016-1583
|
https://www.cvedetails.com/cve/CVE-2016-1583/
|
CWE-119
|
https://github.com/torvalds/linux/commit/f5364c150aa645b3d7daa21b5c0b9feaa1c9cd6d
|
f5364c150aa645b3d7daa21b5c0b9feaa1c9cd6d
|
Merge branch 'stacking-fixes' (vfs stacking fixes from Jann)
Merge filesystem stacking fixes from Jann Horn.
* emailed patches from Jann Horn <jannh@google.com>:
sched: panic on corrupted stack end
ecryptfs: forbid opening files without mmap handler
proc: prevent stacking filesystems on top
|
static void __fire_sched_in_preempt_notifiers(struct task_struct *curr)
{
struct preempt_notifier *notifier;
hlist_for_each_entry(notifier, &curr->preempt_notifiers, link)
notifier->ops->sched_in(notifier, raw_smp_processor_id());
}
|
static void __fire_sched_in_preempt_notifiers(struct task_struct *curr)
{
struct preempt_notifier *notifier;
hlist_for_each_entry(notifier, &curr->preempt_notifiers, link)
notifier->ops->sched_in(notifier, raw_smp_processor_id());
}
|
C
|
linux
| 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
R=kbr@chromium.org,piman@chromium.org
Change-Id: I3ea54c6cc34f34e249f7c8b9f792d93c5e1958f4
Reviewed-on: https://chromium-review.googlesource.com/570840
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486518}
|
void WebGLRenderingContextBase::vertexAttrib4fv(
GLuint index,
MaybeShared<const DOMFloat32Array> v) {
if (isContextLost())
return;
if (!v.View() || v.View()->length() < 4) {
SynthesizeGLError(GL_INVALID_VALUE, "vertexAttrib4fv", "invalid array");
return;
}
ContextGL()->VertexAttrib4fv(index, v.View()->DataMaybeShared());
SetVertexAttribType(index, kFloat32ArrayType);
}
|
void WebGLRenderingContextBase::vertexAttrib4fv(
GLuint index,
MaybeShared<const DOMFloat32Array> v) {
if (isContextLost())
return;
if (!v.View() || v.View()->length() < 4) {
SynthesizeGLError(GL_INVALID_VALUE, "vertexAttrib4fv", "invalid array");
return;
}
ContextGL()->VertexAttrib4fv(index, v.View()->DataMaybeShared());
SetVertexAttribType(index, kFloat32ArrayType);
}
|
C
|
Chrome
| 0 |
CVE-2011-2877
|
https://www.cvedetails.com/cve/CVE-2011-2877/
|
CWE-20
|
https://github.com/chromium/chromium/commit/d31f450c723ba46b53c1762e51188557447d85fd
|
d31f450c723ba46b53c1762e51188557447d85fd
|
[WK2] LayerTreeCoordinator should release unused UpdatedAtlases
https://bugs.webkit.org/show_bug.cgi?id=95072
Reviewed by Jocelyn Turcotte.
Release graphic buffers that haven't been used for a while in order to save memory.
This way we can give back memory to the system when no user interaction happens
after a period of time, for example when we are in the background.
* Shared/ShareableBitmap.h:
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::beginContentUpdate):
(WebKit):
(WebKit::LayerTreeCoordinator::scheduleReleaseInactiveAtlases):
(WebKit::LayerTreeCoordinator::releaseInactiveAtlasesTimerFired):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
* WebProcess/WebPage/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit::UpdateAtlas::didSwapBuffers):
Don't call buildLayoutIfNeeded here. It's enought to call it in beginPaintingOnAvailableBuffer
and this way we can track whether this atlas is used with m_areaAllocator.
(WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
* WebProcess/WebPage/UpdateAtlas.h:
(WebKit::UpdateAtlas::addTimeInactive):
(WebKit::UpdateAtlas::isInactive):
(WebKit::UpdateAtlas::isInUse):
(UpdateAtlas):
git-svn-id: svn://svn.chromium.org/blink/trunk@128473 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void LayerTreeCoordinator::paintContents(const WebCore::GraphicsLayer* graphicsLayer, WebCore::GraphicsContext& graphicsContext, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect)
{
if (graphicsLayer == m_nonCompositedContentLayer) {
m_webPage->drawRect(graphicsContext, clipRect);
return;
}
if (graphicsLayer == m_pageOverlayLayer) {
graphicsContext.clearRect(clipRect);
m_webPage->drawPageOverlay(graphicsContext, clipRect);
return;
}
}
|
void LayerTreeCoordinator::paintContents(const WebCore::GraphicsLayer* graphicsLayer, WebCore::GraphicsContext& graphicsContext, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect)
{
if (graphicsLayer == m_nonCompositedContentLayer) {
m_webPage->drawRect(graphicsContext, clipRect);
return;
}
if (graphicsLayer == m_pageOverlayLayer) {
graphicsContext.clearRect(clipRect);
m_webPage->drawPageOverlay(graphicsContext, clipRect);
return;
}
}
|
C
|
Chrome
| 0 |
CVE-2011-3107
|
https://www.cvedetails.com/cve/CVE-2011-3107/
| null |
https://github.com/chromium/chromium/commit/89e4098439f73cb5c16996511cbfdb171a26e173
|
89e4098439f73cb5c16996511cbfdb171a26e173
|
[Qt][WK2] There's no way to test the gesture tap on WTR
https://bugs.webkit.org/show_bug.cgi?id=92895
Reviewed by Kenneth Rohde Christiansen.
Source/WebKit2:
Add an instance of QtViewportHandler to QQuickWebViewPrivate, so it's
now available on mobile and desktop modes, as a side effect gesture tap
events can now be created and sent to WebCore.
This is needed to test tap gestures and to get tap gestures working
when you have a WebView (in desktop mode) on notebooks equipped with
touch screens.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebViewFlickablePrivate::onComponentComplete): Implementation
moved to QQuickWebViewPrivate::onComponentComplete.
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
(QQuickWebViewFlickablePrivate):
Tools:
WTR doesn't create the QQuickItem from C++, not from QML, so a call
to componentComplete() was added to mimic the QML behaviour.
* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::PlatformWebView::PlatformWebView):
git-svn-id: svn://svn.chromium.org/blink/trunk@124625 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate(QQuickWebView* viewport)
: QQuickWebViewPrivate(viewport)
{
viewport->setAcceptHoverEvents(false);
}
|
QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate(QQuickWebView* viewport)
: QQuickWebViewPrivate(viewport)
{
viewport->setAcceptHoverEvents(false);
}
|
C
|
Chrome
| 0 |
CVE-2017-12168
|
https://www.cvedetails.com/cve/CVE-2017-12168/
|
CWE-617
|
https://github.com/torvalds/linux/commit/9e3f7a29694049edd728e2400ab57ad7553e5aa9
|
9e3f7a29694049edd728e2400ab57ad7553e5aa9
|
arm64: KVM: pmu: Fix AArch32 cycle counter access
We're missing the handling code for the cycle counter accessed
from a 32bit guest, leading to unexpected results.
Cc: stable@vger.kernel.org # 4.6+
Signed-off-by: Wei Huang <wei@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
|
int kvm_handle_cp14_64(struct kvm_vcpu *vcpu, struct kvm_run *run)
{
return kvm_handle_cp_64(vcpu,
cp14_64_regs, ARRAY_SIZE(cp14_64_regs),
NULL, 0);
}
|
int kvm_handle_cp14_64(struct kvm_vcpu *vcpu, struct kvm_run *run)
{
return kvm_handle_cp_64(vcpu,
cp14_64_regs, ARRAY_SIZE(cp14_64_regs),
NULL, 0);
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/930a732317022195f6ec5674f89fa4de88e2b61e
|
930a732317022195f6ec5674f89fa4de88e2b61e
|
Block Avast! AV DLLs in sandboxed processes.
BUG=140140
Review URL: https://chromiumcodereview.appspot.com/10852008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149909 0039d316-1c4b-4281-b951-d872f2087c98
|
BOOL WINAPI DuplicateHandlePatch(HANDLE source_process_handle,
HANDLE source_handle,
HANDLE target_process_handle,
LPHANDLE target_handle,
DWORD desired_access,
BOOL inherit_handle,
DWORD options) {
if (!g_iat_orig_duplicate_handle(source_process_handle, source_handle,
target_process_handle, target_handle,
desired_access, inherit_handle, options))
return FALSE;
if (source_process_handle == target_process_handle ||
target_process_handle == ::GetCurrentProcess())
return TRUE;
BOOL is_in_job = FALSE;
if (!::IsProcessInJob(target_process_handle, NULL, &is_in_job)) {
if (ERROR_ACCESS_DENIED == ::GetLastError()) {
base::win::ScopedHandle process;
CHECK(g_iat_orig_duplicate_handle(::GetCurrentProcess(),
target_process_handle,
::GetCurrentProcess(),
process.Receive(),
PROCESS_QUERY_INFORMATION,
FALSE, 0));
CHECK(::IsProcessInJob(process, NULL, &is_in_job));
}
}
if (is_in_job) {
CHECK(!inherit_handle) << kDuplicateHandleWarning;
base::win::ScopedHandle handle;
CHECK(g_iat_orig_duplicate_handle(target_process_handle, *target_handle,
::GetCurrentProcess(), handle.Receive(),
0, FALSE, DUPLICATE_SAME_ACCESS));
CheckDuplicateHandle(handle);
}
return TRUE;
}
|
BOOL WINAPI DuplicateHandlePatch(HANDLE source_process_handle,
HANDLE source_handle,
HANDLE target_process_handle,
LPHANDLE target_handle,
DWORD desired_access,
BOOL inherit_handle,
DWORD options) {
if (!g_iat_orig_duplicate_handle(source_process_handle, source_handle,
target_process_handle, target_handle,
desired_access, inherit_handle, options))
return FALSE;
if (source_process_handle == target_process_handle ||
target_process_handle == ::GetCurrentProcess())
return TRUE;
BOOL is_in_job = FALSE;
if (!::IsProcessInJob(target_process_handle, NULL, &is_in_job)) {
if (ERROR_ACCESS_DENIED == ::GetLastError()) {
base::win::ScopedHandle process;
CHECK(g_iat_orig_duplicate_handle(::GetCurrentProcess(),
target_process_handle,
::GetCurrentProcess(),
process.Receive(),
PROCESS_QUERY_INFORMATION,
FALSE, 0));
CHECK(::IsProcessInJob(process, NULL, &is_in_job));
}
}
if (is_in_job) {
CHECK(!inherit_handle) << kDuplicateHandleWarning;
base::win::ScopedHandle handle;
CHECK(g_iat_orig_duplicate_handle(target_process_handle, *target_handle,
::GetCurrentProcess(), handle.Receive(),
0, FALSE, DUPLICATE_SAME_ACCESS));
CheckDuplicateHandle(handle);
}
return TRUE;
}
|
C
|
Chrome
| 0 |
CVE-2019-6974
|
https://www.cvedetails.com/cve/CVE-2019-6974/
|
CWE-362
|
https://github.com/torvalds/linux/commit/cfa39381173d5f969daf43582c95ad679189cbc9
|
cfa39381173d5f969daf43582c95ad679189cbc9
|
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
kvm_ioctl_create_device() does the following:
1. creates a device that holds a reference to the VM object (with a borrowed
reference, the VM's refcount has not been bumped yet)
2. initializes the device
3. transfers the reference to the device to the caller's file descriptor table
4. calls kvm_get_kvm() to turn the borrowed reference to the VM into a real
reference
The ownership transfer in step 3 must not happen before the reference to the VM
becomes a proper, non-borrowed reference, which only happens in step 4.
After step 3, an attacker can close the file descriptor and drop the borrowed
reference, which can cause the refcount of the kvm object to drop to zero.
This means that we need to grab a reference for the device before
anon_inode_getfd(), otherwise the VM can disappear from under us.
Fixes: 852b6d57dc7f ("kvm: add device control API")
Cc: stable@kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
static int __kvm_gfn_to_hva_cache_init(struct kvm_memslots *slots,
struct gfn_to_hva_cache *ghc,
gpa_t gpa, unsigned long len)
{
int offset = offset_in_page(gpa);
gfn_t start_gfn = gpa >> PAGE_SHIFT;
gfn_t end_gfn = (gpa + len - 1) >> PAGE_SHIFT;
gfn_t nr_pages_needed = end_gfn - start_gfn + 1;
gfn_t nr_pages_avail;
int r = start_gfn <= end_gfn ? 0 : -EINVAL;
ghc->gpa = gpa;
ghc->generation = slots->generation;
ghc->len = len;
ghc->hva = KVM_HVA_ERR_BAD;
/*
* If the requested region crosses two memslots, we still
* verify that the entire region is valid here.
*/
while (!r && start_gfn <= end_gfn) {
ghc->memslot = __gfn_to_memslot(slots, start_gfn);
ghc->hva = gfn_to_hva_many(ghc->memslot, start_gfn,
&nr_pages_avail);
if (kvm_is_error_hva(ghc->hva))
r = -EFAULT;
start_gfn += nr_pages_avail;
}
/* Use the slow path for cross page reads and writes. */
if (!r && nr_pages_needed == 1)
ghc->hva += offset;
else
ghc->memslot = NULL;
return r;
}
|
static int __kvm_gfn_to_hva_cache_init(struct kvm_memslots *slots,
struct gfn_to_hva_cache *ghc,
gpa_t gpa, unsigned long len)
{
int offset = offset_in_page(gpa);
gfn_t start_gfn = gpa >> PAGE_SHIFT;
gfn_t end_gfn = (gpa + len - 1) >> PAGE_SHIFT;
gfn_t nr_pages_needed = end_gfn - start_gfn + 1;
gfn_t nr_pages_avail;
int r = start_gfn <= end_gfn ? 0 : -EINVAL;
ghc->gpa = gpa;
ghc->generation = slots->generation;
ghc->len = len;
ghc->hva = KVM_HVA_ERR_BAD;
/*
* If the requested region crosses two memslots, we still
* verify that the entire region is valid here.
*/
while (!r && start_gfn <= end_gfn) {
ghc->memslot = __gfn_to_memslot(slots, start_gfn);
ghc->hva = gfn_to_hva_many(ghc->memslot, start_gfn,
&nr_pages_avail);
if (kvm_is_error_hva(ghc->hva))
r = -EFAULT;
start_gfn += nr_pages_avail;
}
/* Use the slow path for cross page reads and writes. */
if (!r && nr_pages_needed == 1)
ghc->hva += offset;
else
ghc->memslot = NULL;
return r;
}
|
C
|
linux
| 0 |
CVE-2017-7272
|
https://www.cvedetails.com/cve/CVE-2017-7272/
|
CWE-918
|
https://github.com/php/php-src/commit/bab0b99f376dac9170ac81382a5ed526938d595a
|
bab0b99f376dac9170ac81382a5ed526938d595a
|
Detect invalid port in xp_socket parse ip address
For historical reasons, fsockopen() accepts the port and hostname
separately: fsockopen('127.0.0.1', 80)
However, with the introdcution of stream transports in PHP 4.3,
it became possible to include the port in the hostname specifier:
fsockopen('127.0.0.1:80')
Or more formally: fsockopen('tcp://127.0.0.1:80')
Confusing results when these two forms are combined, however.
fsockopen('127.0.0.1:80', 443) results in fsockopen() attempting
to connect to '127.0.0.1:80:443' which any reasonable stack would
consider invalid.
Unfortunately, PHP parses the address looking for the first colon
(with special handling for IPv6, don't worry) and calls atoi()
from there. atoi() in turn, simply stops parsing at the first
non-numeric character and returns the value so far.
The end result is that the explicitly supplied port is treated
as ignored garbage, rather than producing an error.
This diff replaces atoi() with strtol() and inspects the
stop character. If additional "garbage" of any kind is found,
it fails and returns an error.
|
static inline int php_tcp_sockop_accept(php_stream *stream, php_netstream_data_t *sock,
php_stream_xport_param *xparam STREAMS_DC)
{
int clisock;
xparam->outputs.client = NULL;
clisock = php_network_accept_incoming(sock->socket,
xparam->want_textaddr ? &xparam->outputs.textaddr : NULL,
xparam->want_addr ? &xparam->outputs.addr : NULL,
xparam->want_addr ? &xparam->outputs.addrlen : NULL,
xparam->inputs.timeout,
xparam->want_errortext ? &xparam->outputs.error_text : NULL,
&xparam->outputs.error_code
);
if (clisock >= 0) {
php_netstream_data_t *clisockdata;
clisockdata = emalloc(sizeof(*clisockdata));
if (clisockdata == NULL) {
close(clisock);
/* technically a fatal error */
} else {
memcpy(clisockdata, sock, sizeof(*clisockdata));
clisockdata->socket = clisock;
xparam->outputs.client = php_stream_alloc_rel(stream->ops, clisockdata, NULL, "r+");
if (xparam->outputs.client) {
xparam->outputs.client->ctx = stream->ctx;
if (stream->ctx) {
GC_REFCOUNT(stream->ctx)++;
}
}
}
}
return xparam->outputs.client == NULL ? -1 : 0;
}
|
static inline int php_tcp_sockop_accept(php_stream *stream, php_netstream_data_t *sock,
php_stream_xport_param *xparam STREAMS_DC)
{
int clisock;
xparam->outputs.client = NULL;
clisock = php_network_accept_incoming(sock->socket,
xparam->want_textaddr ? &xparam->outputs.textaddr : NULL,
xparam->want_addr ? &xparam->outputs.addr : NULL,
xparam->want_addr ? &xparam->outputs.addrlen : NULL,
xparam->inputs.timeout,
xparam->want_errortext ? &xparam->outputs.error_text : NULL,
&xparam->outputs.error_code
);
if (clisock >= 0) {
php_netstream_data_t *clisockdata;
clisockdata = emalloc(sizeof(*clisockdata));
if (clisockdata == NULL) {
close(clisock);
/* technically a fatal error */
} else {
memcpy(clisockdata, sock, sizeof(*clisockdata));
clisockdata->socket = clisock;
xparam->outputs.client = php_stream_alloc_rel(stream->ops, clisockdata, NULL, "r+");
if (xparam->outputs.client) {
xparam->outputs.client->ctx = stream->ctx;
if (stream->ctx) {
GC_REFCOUNT(stream->ctx)++;
}
}
}
}
return xparam->outputs.client == NULL ? -1 : 0;
}
|
C
|
php-src
| 0 |
CVE-2011-4594
|
https://www.cvedetails.com/cve/CVE-2011-4594/
| null |
https://github.com/torvalds/linux/commit/bc909d9ddbf7778371e36a651d6e4194b1cc7d4c
|
bc909d9ddbf7778371e36a651d6e4194b1cc7d4c
|
sendmmsg/sendmsg: fix unsafe user pointer access
Dereferencing a user pointer directly from kernel-space without going
through the copy_from_user family of functions is a bad idea. Two of
such usages can be found in the sendmsg code path called from sendmmsg,
added by
commit c71d8ebe7a4496fb7231151cb70a6baa0cb56f9a upstream.
commit 5b47b8038f183b44d2d8ff1c7d11a5c1be706b34 in the 3.0-stable tree.
Usages are performed through memcmp() and memcpy() directly. Fix those
by using the already copied msg_sys structure instead of the __user *msg
structure. Note that msg_sys can be set to NULL by verify_compat_iovec()
or verify_iovec(), which requires additional NULL pointer checks.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
CC: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
CC: Anton Blanchard <anton@samba.org>
CC: David S. Miller <davem@davemloft.net>
CC: stable <stable@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
void sock_release(struct socket *sock)
{
if (sock->ops) {
struct module *owner = sock->ops->owner;
sock->ops->release(sock);
sock->ops = NULL;
module_put(owner);
}
if (rcu_dereference_protected(sock->wq, 1)->fasync_list)
printk(KERN_ERR "sock_release: fasync list not empty!\n");
percpu_sub(sockets_in_use, 1);
if (!sock->file) {
iput(SOCK_INODE(sock));
return;
}
sock->file = NULL;
}
|
void sock_release(struct socket *sock)
{
if (sock->ops) {
struct module *owner = sock->ops->owner;
sock->ops->release(sock);
sock->ops = NULL;
module_put(owner);
}
if (rcu_dereference_protected(sock->wq, 1)->fasync_list)
printk(KERN_ERR "sock_release: fasync list not empty!\n");
percpu_sub(sockets_in_use, 1);
if (!sock->file) {
iput(SOCK_INODE(sock));
return;
}
sock->file = NULL;
}
|
C
|
linux
| 0 |
CVE-2018-16427
|
https://www.cvedetails.com/cve/CVE-2018-16427/
|
CWE-125
|
https://github.com/OpenSC/OpenSC/pull/1447/commits/8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
|
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
|
fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes.
|
static int entersafe_decipher(sc_card_t *card,
const u8 * crgram, size_t crgram_len,
u8 * out, size_t outlen)
{
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
return entersafe_compute_with_prkey(card,crgram,crgram_len,out,outlen);
}
|
static int entersafe_decipher(sc_card_t *card,
const u8 * crgram, size_t crgram_len,
u8 * out, size_t outlen)
{
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
return entersafe_compute_with_prkey(card,crgram,crgram_len,out,outlen);
}
|
C
|
OpenSC
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/d57ecffa058b2af3b0678c43dce75f731550bbce
|
d57ecffa058b2af3b0678c43dce75f731550bbce
|
drive: Stop calling OnChangeListLoadComplete() if DirectoryFetchInfo is not empty
Call LoadAfterLoadDirectory() instead.
BUG=333164
TEST=unit_tests
Review URL: https://codereview.chromium.org/132503004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244406 0039d316-1c4b-4281-b951-d872f2087c98
|
void ChangeListLoader::UpdateAboutResource(
const google_apis::AboutResourceCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
scheduler_->GetAboutResource(
base::Bind(&ChangeListLoader::UpdateAboutResourceAfterGetAbout,
weak_ptr_factory_.GetWeakPtr(),
callback));
}
|
void ChangeListLoader::UpdateAboutResource(
const google_apis::AboutResourceCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
scheduler_->GetAboutResource(
base::Bind(&ChangeListLoader::UpdateAboutResourceAfterGetAbout,
weak_ptr_factory_.GetWeakPtr(),
callback));
}
|
C
|
Chrome
| 0 |
CVE-2017-5019
|
https://www.cvedetails.com/cve/CVE-2017-5019/
|
CWE-416
|
https://github.com/chromium/chromium/commit/f03ea5a5c2ff26e239dfd23e263b15da2d9cee93
|
f03ea5a5c2ff26e239dfd23e263b15da2d9cee93
|
Convert FrameHostMsg_DidAddMessageToConsole to Mojo.
Note: Since this required changing the test
RenderViewImplTest.DispatchBeforeUnloadCanDetachFrame, I manually
re-introduced https://crbug.com/666714 locally (the bug the test was
added for), and reran the test to confirm that it still covers the bug.
Bug: 786836
Change-Id: I110668fa6f0f261fd2ac36bb91a8d8b31c99f4f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526270
Commit-Queue: Lowell Manners <lowell@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653137}
|
void RenderFrameImpl::DidChangeLoadProgress(double load_progress) {
Send(new FrameHostMsg_DidChangeLoadProgress(routing_id_, load_progress));
}
|
void RenderFrameImpl::DidChangeLoadProgress(double load_progress) {
Send(new FrameHostMsg_DidChangeLoadProgress(routing_id_, load_progress));
}
|
C
|
Chrome
| 0 |
CVE-2017-17052
|
https://www.cvedetails.com/cve/CVE-2017-17052/
|
CWE-416
|
https://github.com/torvalds/linux/commit/2b7e8665b4ff51c034c55df3cff76518d1a9ee3a
|
2b7e8665b4ff51c034c55df3cff76518d1a9ee3a
|
fork: fix incorrect fput of ->exe_file causing use-after-free
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new error path before
a reference is taken on the mm_struct's ->exe_file. Since the
->exe_file of the new mm_struct was already set to the old ->exe_file by
the memcpy() in dup_mm(), it was possible for the mmput() in the error
path of dup_mm() to drop a reference to ->exe_file which was never
taken.
This caused the struct file to later be freed prematurely.
Fix it by updating mm_init() to NULL out the ->exe_file, in the same
place it clears other things like the list of mmaps.
This bug was found by syzkaller. It can be reproduced using the
following C program:
#define _GNU_SOURCE
#include <pthread.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <sys/wait.h>
#include <unistd.h>
static void *mmap_thread(void *_arg)
{
for (;;) {
mmap(NULL, 0x1000000, PROT_READ,
MAP_POPULATE|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
}
}
static void *fork_thread(void *_arg)
{
usleep(rand() % 10000);
fork();
}
int main(void)
{
fork();
fork();
fork();
for (;;) {
if (fork() == 0) {
pthread_t t;
pthread_create(&t, NULL, mmap_thread, NULL);
pthread_create(&t, NULL, fork_thread, NULL);
usleep(rand() % 10000);
syscall(__NR_exit_group, 0);
}
wait(NULL);
}
}
No special kernel config options are needed. It usually causes a NULL
pointer dereference in __remove_shared_vm_struct() during exit, or in
dup_mmap() (which is usually inlined into copy_process()) during fork.
Both are due to a vm_area_struct's ->vm_file being used after it's
already been freed.
Google Bug Id: 64772007
Link: http://lkml.kernel.org/r/20170823211408.31198-1-ebiggers3@gmail.com
Fixes: 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org> [v4.7+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
void __init fork_init(void)
{
int i;
#ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR
#ifndef ARCH_MIN_TASKALIGN
#define ARCH_MIN_TASKALIGN 0
#endif
int align = max_t(int, L1_CACHE_BYTES, ARCH_MIN_TASKALIGN);
/* create a slab on which task_structs can be allocated */
task_struct_cachep = kmem_cache_create("task_struct",
arch_task_struct_size, align,
SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, NULL);
#endif
/* do the arch specific task caches init */
arch_task_cache_init();
set_max_threads(MAX_THREADS);
init_task.signal->rlim[RLIMIT_NPROC].rlim_cur = max_threads/2;
init_task.signal->rlim[RLIMIT_NPROC].rlim_max = max_threads/2;
init_task.signal->rlim[RLIMIT_SIGPENDING] =
init_task.signal->rlim[RLIMIT_NPROC];
for (i = 0; i < UCOUNT_COUNTS; i++) {
init_user_ns.ucount_max[i] = max_threads/2;
}
#ifdef CONFIG_VMAP_STACK
cpuhp_setup_state(CPUHP_BP_PREPARE_DYN, "fork:vm_stack_cache",
NULL, free_vm_stack_cache);
#endif
}
|
void __init fork_init(void)
{
int i;
#ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR
#ifndef ARCH_MIN_TASKALIGN
#define ARCH_MIN_TASKALIGN 0
#endif
int align = max_t(int, L1_CACHE_BYTES, ARCH_MIN_TASKALIGN);
/* create a slab on which task_structs can be allocated */
task_struct_cachep = kmem_cache_create("task_struct",
arch_task_struct_size, align,
SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, NULL);
#endif
/* do the arch specific task caches init */
arch_task_cache_init();
set_max_threads(MAX_THREADS);
init_task.signal->rlim[RLIMIT_NPROC].rlim_cur = max_threads/2;
init_task.signal->rlim[RLIMIT_NPROC].rlim_max = max_threads/2;
init_task.signal->rlim[RLIMIT_SIGPENDING] =
init_task.signal->rlim[RLIMIT_NPROC];
for (i = 0; i < UCOUNT_COUNTS; i++) {
init_user_ns.ucount_max[i] = max_threads/2;
}
#ifdef CONFIG_VMAP_STACK
cpuhp_setup_state(CPUHP_BP_PREPARE_DYN, "fork:vm_stack_cache",
NULL, free_vm_stack_cache);
#endif
}
|
C
|
linux
| 0 |
CVE-2013-1929
|
https://www.cvedetails.com/cve/CVE-2013-1929/
|
CWE-119
|
https://github.com/torvalds/linux/commit/715230a44310a8cf66fbfb5a46f9a62a9b2de424
|
715230a44310a8cf66fbfb5a46f9a62a9b2de424
|
tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string length (32 bytes). On overflow,
truncate the formatted firmware string instead of potentially overwriting
portions of the tg3 struct.
http://cansecwest.com/slides/2013/PrivateCore%20CSW%202013.pdf
Signed-off-by: Kees Cook <keescook@chromium.org>
Reported-by: Oded Horovitz <oded@privatecore.com>
Reported-by: Brad Spengler <spender@grsecurity.net>
Cc: stable@vger.kernel.org
Cc: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
static void tg3_frag_free(bool is_frag, void *data)
{
if (is_frag)
put_page(virt_to_head_page(data));
else
kfree(data);
}
|
static void tg3_frag_free(bool is_frag, void *data)
{
if (is_frag)
put_page(virt_to_head_page(data));
else
kfree(data);
}
|
C
|
linux
| 0 |
CVE-2012-4530
|
https://www.cvedetails.com/cve/CVE-2012-4530/
|
CWE-200
|
https://github.com/torvalds/linux/commit/b66c5984017533316fd1951770302649baf1aa33
|
b66c5984017533316fd1951770302649baf1aa33
|
exec: do not leave bprm->interp on stack
If a series of scripts are executed, each triggering module loading via
unprintable bytes in the script header, kernel stack contents can leak
into the command line.
Normally execution of binfmt_script and binfmt_misc happens recursively.
However, when modules are enabled, and unprintable bytes exist in the
bprm->buf, execution will restart after attempting to load matching
binfmt modules. Unfortunately, the logic in binfmt_script and
binfmt_misc does not expect to get restarted. They leave bprm->interp
pointing to their local stack. This means on restart bprm->interp is
left pointing into unused stack memory which can then be copied into the
userspace argv areas.
After additional study, it seems that both recursion and restart remains
the desirable way to handle exec with scripts, misc, and modules. As
such, we need to protect the changes to interp.
This changes the logic to require allocation for any changes to the
bprm->interp. To avoid adding a new kmalloc to every exec, the default
value is left as-is. Only when passing through binfmt_script or
binfmt_misc does an allocation take place.
For a proof of concept, see DoTest.sh from:
http://www.halfdog.net/Security/2012/LinuxKernelBinfmtScriptStackDataDisclosure/
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: halfdog <me@halfdog.net>
Cc: P J P <ppandit@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
int get_dumpable(struct mm_struct *mm)
{
return __get_dumpable(mm->flags);
}
|
int get_dumpable(struct mm_struct *mm)
{
return __get_dumpable(mm->flags);
}
|
C
|
linux
| 0 |
CVE-2019-5757
|
https://www.cvedetails.com/cve/CVE-2019-5757/
|
CWE-704
|
https://github.com/chromium/chromium/commit/032c3339bfb454c65ce38e7eafe49a54bac83073
|
032c3339bfb454c65ce38e7eafe49a54bac83073
|
Fix SVG crash for v0 distribution into foreignObject.
We require a parent element to be an SVG element for non-svg-root
elements in order to create a LayoutObject for them. However, we checked
the light tree parent element, not the flat tree one which is the parent
for the layout tree construction. Note that this is just an issue in
Shadow DOM v0 since v1 does not allow shadow roots on SVG elements.
Bug: 915469
Change-Id: Id81843abad08814fae747b5bc81c09666583f130
Reviewed-on: https://chromium-review.googlesource.com/c/1382494
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617487}
|
AffineTransform SVGElement::LocalCoordinateSpaceTransform(CTMScope) const {
return AffineTransform();
}
|
AffineTransform SVGElement::LocalCoordinateSpaceTransform(CTMScope) const {
return AffineTransform();
}
|
C
|
Chrome
| 0 |
CVE-2015-3456
|
https://www.cvedetails.com/cve/CVE-2015-3456/
|
CWE-119
|
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=e907746266721f305d67bc0718795fedee2e824c
|
e907746266721f305d67bc0718795fedee2e824c
| null |
static uint32_t fdctrl_read_dir(FDCtrl *fdctrl)
{
uint32_t retval = 0;
if (fdctrl_media_changed(get_cur_drv(fdctrl))) {
retval |= FD_DIR_DSKCHG;
}
if (retval != 0) {
FLOPPY_DPRINTF("Floppy digital input register: 0x%02x\n", retval);
}
return retval;
}
|
static uint32_t fdctrl_read_dir(FDCtrl *fdctrl)
{
uint32_t retval = 0;
if (fdctrl_media_changed(get_cur_drv(fdctrl))) {
retval |= FD_DIR_DSKCHG;
}
if (retval != 0) {
FLOPPY_DPRINTF("Floppy digital input register: 0x%02x\n", retval);
}
return retval;
}
|
C
|
qemu
| 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 <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489518}
|
void Editor::AddToKillRing(const EphemeralRange& range) {
if (should_start_new_kill_ring_sequence_)
GetKillRing().StartNewSequence();
DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate());
String text = PlainText(range);
GetKillRing().Append(text);
should_start_new_kill_ring_sequence_ = false;
}
|
void Editor::AddToKillRing(const EphemeralRange& range) {
if (should_start_new_kill_ring_sequence_)
GetKillRing().StartNewSequence();
DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate());
String text = PlainText(range);
GetKillRing().Append(text);
should_start_new_kill_ring_sequence_ = false;
}
|
C
|
Chrome
| 0 |
CVE-2017-6210
|
https://www.cvedetails.com/cve/CVE-2017-6210/
|
CWE-476
|
https://cgit.freedesktop.org/virglrenderer/commit/?id=0a5dff15912207b83018485f83e067474e818bab
|
0a5dff15912207b83018485f83e067474e818bab
| null |
static int vrend_decode_end_query(struct vrend_decode_ctx *ctx, int length)
{
if (length != 1)
return EINVAL;
uint32_t handle = get_buf_entry(ctx, VIRGL_QUERY_END_HANDLE);
vrend_end_query(ctx->grctx, handle);
return 0;
}
|
static int vrend_decode_end_query(struct vrend_decode_ctx *ctx, int length)
{
if (length != 1)
return EINVAL;
uint32_t handle = get_buf_entry(ctx, VIRGL_QUERY_END_HANDLE);
vrend_end_query(ctx->grctx, handle);
return 0;
}
|
C
|
virglrenderer
| 0 |
CVE-2013-2915
|
https://www.cvedetails.com/cve/CVE-2013-2915/
| null |
https://github.com/chromium/chromium/commit/b12eb22a27110f49a2ad54b9e4ffd0ccb6cf9ce9
|
b12eb22a27110f49a2ad54b9e4ffd0ccb6cf9ce9
|
Delete unneeded pending entries in DidFailProvisionalLoad to prevent a spoof.
BUG=280512
BUG=278899
TEST=See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/23978003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222146 0039d316-1c4b-4281-b951-d872f2087c98
|
void NavigationControllerImpl::ReloadOriginalRequestURL(bool check_for_repost) {
ReloadInternal(check_for_repost, RELOAD_ORIGINAL_REQUEST_URL);
}
|
void NavigationControllerImpl::ReloadOriginalRequestURL(bool check_for_repost) {
ReloadInternal(check_for_repost, RELOAD_ORIGINAL_REQUEST_URL);
}
|
C
|
Chrome
| 0 |
CVE-2014-7822
|
https://www.cvedetails.com/cve/CVE-2014-7822/
|
CWE-264
|
https://github.com/torvalds/linux/commit/8d0207652cbe27d1f962050737848e5ad4671958
|
8d0207652cbe27d1f962050737848e5ad4671958
|
->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
{
struct inode *inode = file->f_mapping->host;
struct f2fs_inode_info *fi = F2FS_I(inode);
struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
int ret = 0;
bool need_cp = false;
struct writeback_control wbc = {
.sync_mode = WB_SYNC_ALL,
.nr_to_write = LONG_MAX,
.for_reclaim = 0,
};
if (unlikely(f2fs_readonly(inode->i_sb)))
return 0;
trace_f2fs_sync_file_enter(inode);
ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
if (ret) {
trace_f2fs_sync_file_exit(inode, need_cp, datasync, ret);
return ret;
}
/* guarantee free sections for fsync */
f2fs_balance_fs(sbi);
down_read(&fi->i_sem);
/*
* Both of fdatasync() and fsync() are able to be recovered from
* sudden-power-off.
*/
if (!S_ISREG(inode->i_mode) || inode->i_nlink != 1)
need_cp = true;
else if (file_wrong_pino(inode))
need_cp = true;
else if (!space_for_roll_forward(sbi))
need_cp = true;
else if (!is_checkpointed_node(sbi, F2FS_I(inode)->i_pino))
need_cp = true;
else if (F2FS_I(inode)->xattr_ver == cur_cp_version(F2FS_CKPT(sbi)))
need_cp = true;
up_read(&fi->i_sem);
if (need_cp) {
nid_t pino;
/* all the dirty node pages should be flushed for POR */
ret = f2fs_sync_fs(inode->i_sb, 1);
down_write(&fi->i_sem);
F2FS_I(inode)->xattr_ver = 0;
if (file_wrong_pino(inode) && inode->i_nlink == 1 &&
get_parent_ino(inode, &pino)) {
F2FS_I(inode)->i_pino = pino;
file_got_pino(inode);
up_write(&fi->i_sem);
mark_inode_dirty_sync(inode);
ret = f2fs_write_inode(inode, NULL);
if (ret)
goto out;
} else {
up_write(&fi->i_sem);
}
} else {
/* if there is no written node page, write its inode page */
while (!sync_node_pages(sbi, inode->i_ino, &wbc)) {
if (fsync_mark_done(sbi, inode->i_ino))
goto out;
mark_inode_dirty_sync(inode);
ret = f2fs_write_inode(inode, NULL);
if (ret)
goto out;
}
ret = wait_on_node_pages_writeback(sbi, inode->i_ino);
if (ret)
goto out;
ret = f2fs_issue_flush(F2FS_SB(inode->i_sb));
}
out:
trace_f2fs_sync_file_exit(inode, need_cp, datasync, ret);
return ret;
}
|
int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
{
struct inode *inode = file->f_mapping->host;
struct f2fs_inode_info *fi = F2FS_I(inode);
struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
int ret = 0;
bool need_cp = false;
struct writeback_control wbc = {
.sync_mode = WB_SYNC_ALL,
.nr_to_write = LONG_MAX,
.for_reclaim = 0,
};
if (unlikely(f2fs_readonly(inode->i_sb)))
return 0;
trace_f2fs_sync_file_enter(inode);
ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
if (ret) {
trace_f2fs_sync_file_exit(inode, need_cp, datasync, ret);
return ret;
}
/* guarantee free sections for fsync */
f2fs_balance_fs(sbi);
down_read(&fi->i_sem);
/*
* Both of fdatasync() and fsync() are able to be recovered from
* sudden-power-off.
*/
if (!S_ISREG(inode->i_mode) || inode->i_nlink != 1)
need_cp = true;
else if (file_wrong_pino(inode))
need_cp = true;
else if (!space_for_roll_forward(sbi))
need_cp = true;
else if (!is_checkpointed_node(sbi, F2FS_I(inode)->i_pino))
need_cp = true;
else if (F2FS_I(inode)->xattr_ver == cur_cp_version(F2FS_CKPT(sbi)))
need_cp = true;
up_read(&fi->i_sem);
if (need_cp) {
nid_t pino;
/* all the dirty node pages should be flushed for POR */
ret = f2fs_sync_fs(inode->i_sb, 1);
down_write(&fi->i_sem);
F2FS_I(inode)->xattr_ver = 0;
if (file_wrong_pino(inode) && inode->i_nlink == 1 &&
get_parent_ino(inode, &pino)) {
F2FS_I(inode)->i_pino = pino;
file_got_pino(inode);
up_write(&fi->i_sem);
mark_inode_dirty_sync(inode);
ret = f2fs_write_inode(inode, NULL);
if (ret)
goto out;
} else {
up_write(&fi->i_sem);
}
} else {
/* if there is no written node page, write its inode page */
while (!sync_node_pages(sbi, inode->i_ino, &wbc)) {
if (fsync_mark_done(sbi, inode->i_ino))
goto out;
mark_inode_dirty_sync(inode);
ret = f2fs_write_inode(inode, NULL);
if (ret)
goto out;
}
ret = wait_on_node_pages_writeback(sbi, inode->i_ino);
if (ret)
goto out;
ret = f2fs_issue_flush(F2FS_SB(inode->i_sb));
}
out:
trace_f2fs_sync_file_exit(inode, need_cp, datasync, ret);
return ret;
}
|
C
|
linux
| 0 |
CVE-2016-9137
|
https://www.cvedetails.com/cve/CVE-2016-9137/
|
CWE-416
|
https://git.php.net/?p=php-src.git;a=commit;h=0e6fe3a4c96be2d3e88389a5776f878021b4c59f
|
0e6fe3a4c96be2d3e88389a5776f878021b4c59f
| null |
ZEND_API int zend_get_module_started(const char *module_name) /* {{{ */
{
zend_module_entry *module;
return (zend_hash_find(&module_registry, module_name, strlen(module_name)+1, (void**)&module) == SUCCESS && module->module_started) ? SUCCESS : FAILURE;
}
/* }}} */
|
ZEND_API int zend_get_module_started(const char *module_name) /* {{{ */
{
zend_module_entry *module;
return (zend_hash_find(&module_registry, module_name, strlen(module_name)+1, (void**)&module) == SUCCESS && module->module_started) ? SUCCESS : FAILURE;
}
/* }}} */
|
C
|
php
| 0 |
CVE-2012-0207
|
https://www.cvedetails.com/cve/CVE-2012-0207/
|
CWE-399
|
https://github.com/torvalds/linux/commit/a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27
|
a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27
|
igmp: Avoid zero delay when receiving odd mixture of IGMP queries
Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
behavior on v3 query during v2-compatibility mode') added yet another
case for query parsing, which can result in max_delay = 0. Substitute
a value of 1, as in the usual v3 case.
Reported-by: Simon McVittie <smcv@debian.org>
References: http://bugs.debian.org/654876
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
static void igmpv3_clear_zeros(struct ip_sf_list **ppsf)
{
struct ip_sf_list *psf_prev, *psf_next, *psf;
psf_prev = NULL;
for (psf=*ppsf; psf; psf = psf_next) {
psf_next = psf->sf_next;
if (psf->sf_crcount == 0) {
if (psf_prev)
psf_prev->sf_next = psf->sf_next;
else
*ppsf = psf->sf_next;
kfree(psf);
} else
psf_prev = psf;
}
}
|
static void igmpv3_clear_zeros(struct ip_sf_list **ppsf)
{
struct ip_sf_list *psf_prev, *psf_next, *psf;
psf_prev = NULL;
for (psf=*ppsf; psf; psf = psf_next) {
psf_next = psf->sf_next;
if (psf->sf_crcount == 0) {
if (psf_prev)
psf_prev->sf_next = psf->sf_next;
else
*ppsf = psf->sf_next;
kfree(psf);
} else
psf_prev = psf;
}
}
|
C
|
linux
| 0 |
CVE-2011-2350
|
https://www.cvedetails.com/cve/CVE-2011-2350/
|
CWE-20
|
https://github.com/chromium/chromium/commit/b944f670bb7a8a919daac497a4ea0536c954c201
|
b944f670bb7a8a919daac497a4ea0536c954c201
|
[JSC] Implement a helper method createNotEnoughArgumentsError()
https://bugs.webkit.org/show_bug.cgi?id=85102
Reviewed by Geoffrey Garen.
In bug 84787, kbr@ requested to avoid hard-coding
createTypeError(exec, "Not enough arguments") here and there.
This patch implements createNotEnoughArgumentsError(exec)
and uses it in JSC bindings.
c.f. a corresponding bug for V8 bindings is bug 85097.
Source/JavaScriptCore:
* runtime/Error.cpp:
(JSC::createNotEnoughArgumentsError):
(JSC):
* runtime/Error.h:
(JSC):
Source/WebCore:
Test: bindings/scripts/test/TestObj.idl
* bindings/scripts/CodeGeneratorJS.pm: Modified as described above.
(GenerateArgumentsCountCheck):
* bindings/js/JSDataViewCustom.cpp: Ditto.
(WebCore::getDataViewMember):
(WebCore::setDataViewMember):
* bindings/js/JSDeprecatedPeerConnectionCustom.cpp:
(WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
* bindings/js/JSWebKitMutationObserverCustom.cpp:
(WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
(WebCore::JSWebKitMutationObserver::observe):
* bindings/js/JSWorkerCustom.cpp:
(WebCore::JSWorkerConstructor::constructJSWorker):
* bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests.
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionIdbKey):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert3):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
git-svn-id: svn://svn.chromium.org/blink/trunk@115536 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
JSValue jsTestInterfaceConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSTestInterface* domObject = jsCast<JSTestInterface*>(asObject(slotBase));
return JSTestInterface::getConstructor(exec, domObject->globalObject());
}
|
JSValue jsTestInterfaceConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSTestInterface* domObject = jsCast<JSTestInterface*>(asObject(slotBase));
return JSTestInterface::getConstructor(exec, domObject->globalObject());
}
|
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 <kbr@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657568}
|
void GLES2Implementation::SetGLErrorInvalidEnum(const char* function_name,
GLenum value,
const char* label) {
SetGLError(
GL_INVALID_ENUM, function_name,
(std::string(label) + " was " + GLES2Util::GetStringEnum(value)).c_str());
}
|
void GLES2Implementation::SetGLErrorInvalidEnum(const char* function_name,
GLenum value,
const char* label) {
SetGLError(
GL_INVALID_ENUM, function_name,
(std::string(label) + " was " + GLES2Util::GetStringEnum(value)).c_str());
}
|
C
|
Chrome
| 0 |
CVE-2018-18349
|
https://www.cvedetails.com/cve/CVE-2018-18349/
|
CWE-732
|
https://github.com/chromium/chromium/commit/5f8671e7667b8b133bd3664100012a3906e92d65
|
5f8671e7667b8b133bd3664100012a3906e92d65
|
Add a check for disallowing remote frame navigations to local resources.
Previously, RemoteFrame navigations did not perform any renderer-side
checks and relied solely on the browser-side logic to block disallowed
navigations via mechanisms like FilterURL. This means that blocked
remote frame navigations were silently navigated to about:blank
without any console error message.
This CL adds a CanDisplay check to the remote navigation path to match
an equivalent check done for local frame navigations. This way, the
renderer can consistently block disallowed navigations in both cases
and output an error message.
Bug: 894399
Change-Id: I172f68f77c1676f6ca0172d2a6c78f7edc0e3b7a
Reviewed-on: https://chromium-review.googlesource.com/c/1282390
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601022}
|
bool ConvertJSONToPoint(const std::string& str, gfx::PointF* point) {
std::unique_ptr<base::Value> value = base::JSONReader::Read(str);
if (!value)
return false;
base::DictionaryValue* root;
if (!value->GetAsDictionary(&root))
return false;
double x, y;
if (!root->GetDouble("x", &x))
return false;
if (!root->GetDouble("y", &y))
return false;
point->set_x(x);
point->set_y(y);
return true;
}
|
bool ConvertJSONToPoint(const std::string& str, gfx::PointF* point) {
std::unique_ptr<base::Value> value = base::JSONReader::Read(str);
if (!value)
return false;
base::DictionaryValue* root;
if (!value->GetAsDictionary(&root))
return false;
double x, y;
if (!root->GetDouble("x", &x))
return false;
if (!root->GetDouble("y", &y))
return false;
point->set_x(x);
point->set_y(y);
return true;
}
|
C
|
Chrome
| 0 |
CVE-2016-2429
|
https://www.cvedetails.com/cve/CVE-2016-2429/
|
CWE-119
|
https://android.googlesource.com/platform/external/flac/+/b499389da21d89d32deff500376c5ee4f8f0b04c
|
b499389da21d89d32deff500376c5ee4f8f0b04c
|
Avoid free-before-initialize vulnerability in heap
Bug: 27211885
Change-Id: Ib9c93bd9ffdde2a5f8d31a86f06e267dc9c152db
|
FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_FILE(
FLAC__StreamDecoder *decoder,
FILE *file,
FLAC__StreamDecoderWriteCallback write_callback,
FLAC__StreamDecoderMetadataCallback metadata_callback,
FLAC__StreamDecoderErrorCallback error_callback,
void *client_data
)
{
return init_FILE_internal_(decoder, file, write_callback, metadata_callback, error_callback, client_data, /*is_ogg=*/false);
}
|
FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_FILE(
FLAC__StreamDecoder *decoder,
FILE *file,
FLAC__StreamDecoderWriteCallback write_callback,
FLAC__StreamDecoderMetadataCallback metadata_callback,
FLAC__StreamDecoderErrorCallback error_callback,
void *client_data
)
{
return init_FILE_internal_(decoder, file, write_callback, metadata_callback, error_callback, client_data, /*is_ogg=*/false);
}
|
C
|
Android
| 0 |
CVE-2018-9336
|
https://www.cvedetails.com/cve/CVE-2018-9336/
|
CWE-415
|
https://github.com/OpenVPN/openvpn/commit/1394192b210cb3c6624a7419bcf3ff966742e79b
|
1394192b210cb3c6624a7419bcf3ff966742e79b
|
Fix potential double-free() in Interactive Service (CVE-2018-9336)
Malformed input data on the service pipe towards the OpenVPN interactive
service (normally used by the OpenVPN GUI to request openvpn instances
from the service) can result in a double free() in the error handling code.
This usually only leads to a process crash (DoS by an unprivileged local
account) but since it could possibly lead to memory corruption if
happening while multiple other threads are active at the same time,
CVE-2018-9336 has been assigned to acknowledge this risk.
Fix by ensuring that sud->directory is set to NULL in GetStartUpData()
for all error cases (thus not being free()ed in FreeStartupData()).
Rewrite control flow to use explicit error label for error exit.
Discovered and reported by Jacob Baines <jbaines@tenable.com>.
CVE: 2018-9336
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <20180414072617.25075-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/search?l=mid&q=20180414072617.25075-1-gert@greenie.muc.de
Signed-off-by: Gert Doering <gert@greenie.muc.de>
|
ResetOverlapped(LPOVERLAPPED overlapped)
{
HANDLE io_event = overlapped->hEvent;
if (!ResetEvent(io_event))
{
return FALSE;
}
ZeroMemory(overlapped, sizeof(OVERLAPPED));
overlapped->hEvent = io_event;
return TRUE;
}
|
ResetOverlapped(LPOVERLAPPED overlapped)
{
HANDLE io_event = overlapped->hEvent;
if (!ResetEvent(io_event))
{
return FALSE;
}
ZeroMemory(overlapped, sizeof(OVERLAPPED));
overlapped->hEvent = io_event;
return TRUE;
}
|
C
|
openvpn
| 0 |
CVE-2017-18249
|
https://www.cvedetails.com/cve/CVE-2017-18249/
|
CWE-362
|
https://github.com/torvalds/linux/commit/30a61ddf8117c26ac5b295e1233eaa9629a94ca3
|
30a61ddf8117c26ac5b295e1233eaa9629a94ca3
|
f2fs: fix race condition in between free nid allocator/initializer
In below concurrent case, allocated nid can be loaded into free nid cache
and be allocated again.
Thread A Thread B
- f2fs_create
- f2fs_new_inode
- alloc_nid
- __insert_nid_to_list(ALLOC_NID_LIST)
- f2fs_balance_fs_bg
- build_free_nids
- __build_free_nids
- scan_nat_page
- add_free_nid
- __lookup_nat_cache
- f2fs_add_link
- init_inode_metadata
- new_inode_page
- new_node_page
- set_node_addr
- alloc_nid_done
- __remove_nid_from_list(ALLOC_NID_LIST)
- __insert_nid_to_list(FREE_NID_LIST)
This patch makes nat cache lookup and free nid list operation being atomical
to avoid this race condition.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
static int f2fs_write_node_page(struct page *page,
struct writeback_control *wbc)
{
return __write_node_page(page, false, NULL, wbc);
}
|
static int f2fs_write_node_page(struct page *page,
struct writeback_control *wbc)
{
return __write_node_page(page, false, NULL, wbc);
}
|
C
|
linux
| 0 |
CVE-2015-1352
|
https://www.cvedetails.com/cve/CVE-2015-1352/
| null |
https://git.php.net/?p=php-src.git;a=commit;h=124fb22a13fafa3648e4e15b4f207c7096d8155e
|
124fb22a13fafa3648e4e15b4f207c7096d8155e
| null |
PHP_FUNCTION(pg_host)
{
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_HOST);
}
|
PHP_FUNCTION(pg_host)
{
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_HOST);
}
|
C
|
php
| 0 |
CVE-2016-10165
|
https://www.cvedetails.com/cve/CVE-2016-10165/
|
CWE-125
|
https://github.com/mm2/Little-CMS/commit/5ca71a7bc18b6897ab21d815d15e218e204581e2
|
5ca71a7bc18b6897ab21d815d15e218e204581e2
|
Added an extra check to MLU bounds
Thanks to Ibrahim el-sayed for spotting the bug
|
cmsBool Type_MPEmatrix_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsUInt32Number i, nElems;
cmsStage* mpe = (cmsStage*) Ptr;
_cmsStageMatrixData* Matrix = (_cmsStageMatrixData*) mpe ->Data;
if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) mpe ->InputChannels)) return FALSE;
if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) mpe ->OutputChannels)) return FALSE;
nElems = mpe ->InputChannels * mpe ->OutputChannels;
for (i=0; i < nElems; i++) {
if (!_cmsWriteFloat32Number(io, (cmsFloat32Number) Matrix->Double[i])) return FALSE;
}
for (i=0; i < mpe ->OutputChannels; i++) {
if (Matrix ->Offset == NULL) {
if (!_cmsWriteFloat32Number(io, 0)) return FALSE;
}
else {
if (!_cmsWriteFloat32Number(io, (cmsFloat32Number) Matrix->Offset[i])) return FALSE;
}
}
return TRUE;
cmsUNUSED_PARAMETER(nItems);
cmsUNUSED_PARAMETER(self);
}
|
cmsBool Type_MPEmatrix_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsUInt32Number i, nElems;
cmsStage* mpe = (cmsStage*) Ptr;
_cmsStageMatrixData* Matrix = (_cmsStageMatrixData*) mpe ->Data;
if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) mpe ->InputChannels)) return FALSE;
if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) mpe ->OutputChannels)) return FALSE;
nElems = mpe ->InputChannels * mpe ->OutputChannels;
for (i=0; i < nElems; i++) {
if (!_cmsWriteFloat32Number(io, (cmsFloat32Number) Matrix->Double[i])) return FALSE;
}
for (i=0; i < mpe ->OutputChannels; i++) {
if (Matrix ->Offset == NULL) {
if (!_cmsWriteFloat32Number(io, 0)) return FALSE;
}
else {
if (!_cmsWriteFloat32Number(io, (cmsFloat32Number) Matrix->Offset[i])) return FALSE;
}
}
return TRUE;
cmsUNUSED_PARAMETER(nItems);
cmsUNUSED_PARAMETER(self);
}
|
C
|
Little-CMS
| 0 |
CVE-2019-14284
|
https://www.cvedetails.com/cve/CVE-2019-14284/
|
CWE-369
|
https://github.com/torvalds/linux/commit/f3554aeb991214cbfafd17d55e2bfddb50282e32
|
f3554aeb991214cbfafd17d55e2bfddb50282e32
|
floppy: fix div-by-zero in setup_format_params
This fixes a divide by zero error in the setup_format_params function of
the floppy driver.
Two consecutive ioctls can trigger the bug: The first one should set the
drive geometry with such .sect and .rate values for the F_SECT_PER_TRACK
to become zero. Next, the floppy format operation should be called.
A floppy disk is not required to be inserted. An unprivileged user
could trigger the bug if the device is accessible.
The patch checks F_SECT_PER_TRACK for a non-zero value in the
set_geometry function. The proper check should involve a reasonable
upper limit for the .sect and .rate fields, but it could change the
UAPI.
The patch also checks F_SECT_PER_TRACK in the setup_format_params, and
cancels the formatting operation in case of zero.
The bug was found by syzkaller.
Signed-off-by: Denis Efremov <efremov@ispras.ru>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
static int set_next_request(void)
{
current_req = list_first_entry_or_null(&floppy_reqs, struct request,
queuelist);
if (current_req) {
current_req->error_count = 0;
list_del_init(¤t_req->queuelist);
}
return current_req != NULL;
}
|
static int set_next_request(void)
{
current_req = list_first_entry_or_null(&floppy_reqs, struct request,
queuelist);
if (current_req) {
current_req->error_count = 0;
list_del_init(¤t_req->queuelist);
}
return current_req != NULL;
}
|
C
|
linux
| 0 |
CVE-2018-20784
|
https://www.cvedetails.com/cve/CVE-2018-20784/
|
CWE-400
|
https://github.com/torvalds/linux/commit/c40f7d74c741a907cfaeb73a7697081881c497d0
|
c40f7d74c741a907cfaeb73a7697081881c497d0
|
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) revert of:
a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
It turns out that the list_del_leaf_cfs_rq() introduced by this commit
is a surprising property that was not considered in followup commits
such as:
9c2791f936ef ("sched/fair: Fix hierarchical order in rq->leaf_cfs_rq_list")
As Vincent Guittot explains:
"I think that there is a bigger problem with commit a9e7f6544b9c and
cfs_rq throttling:
Let take the example of the following topology TG2 --> TG1 --> root:
1) The 1st time a task is enqueued, we will add TG2 cfs_rq then TG1
cfs_rq to leaf_cfs_rq_list and we are sure to do the whole branch in
one path because it has never been used and can't be throttled so
tmp_alone_branch will point to leaf_cfs_rq_list at the end.
2) Then TG1 is throttled
3) and we add TG3 as a new child of TG1.
4) The 1st enqueue of a task on TG3 will add TG3 cfs_rq just before TG1
cfs_rq and tmp_alone_branch will stay on rq->leaf_cfs_rq_list.
With commit a9e7f6544b9c, we can del a cfs_rq from rq->leaf_cfs_rq_list.
So if the load of TG1 cfs_rq becomes NULL before step 2) above, TG1
cfs_rq is removed from the list.
Then at step 4), TG3 cfs_rq is added at the beginning of rq->leaf_cfs_rq_list
but tmp_alone_branch still points to TG3 cfs_rq because its throttled
parent can't be enqueued when the lock is released.
tmp_alone_branch doesn't point to rq->leaf_cfs_rq_list whereas it should.
So if TG3 cfs_rq is removed or destroyed before tmp_alone_branch
points on another TG cfs_rq, the next TG cfs_rq that will be added,
will be linked outside rq->leaf_cfs_rq_list - which is bad.
In addition, we can break the ordering of the cfs_rq in
rq->leaf_cfs_rq_list but this ordering is used to update and
propagate the update from leaf down to root."
Instead of trying to work through all these cases and trying to reproduce
the very high loads that produced the lockup to begin with, simplify
the code temporarily by reverting a9e7f6544b9c - which change was clearly
not thought through completely.
This (hopefully) gives us a kernel that doesn't lock up so people
can continue to enjoy their holidays without worrying about regressions. ;-)
[ mingo: Wrote changelog, fixed weird spelling in code comment while at it. ]
Analyzed-by: Xie XiuQi <xiexiuqi@huawei.com>
Analyzed-by: Vincent Guittot <vincent.guittot@linaro.org>
Reported-by: Zhipeng Xie <xiezhipeng1@huawei.com>
Reported-by: Sargun Dhillon <sargun@sargun.me>
Reported-by: Xie XiuQi <xiexiuqi@huawei.com>
Tested-by: Zhipeng Xie <xiezhipeng1@huawei.com>
Tested-by: Sargun Dhillon <sargun@sargun.me>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Cc: <stable@vger.kernel.org> # v4.13+
Cc: Bin Li <huawei.libin@huawei.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
Link: http://lkml.kernel.org/r/1545879866-27809-1-git-send-email-xiexiuqi@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
static unsigned long cpu_avg_load_per_task(int cpu)
{
struct rq *rq = cpu_rq(cpu);
unsigned long nr_running = READ_ONCE(rq->cfs.h_nr_running);
unsigned long load_avg = weighted_cpuload(rq);
if (nr_running)
return load_avg / nr_running;
return 0;
}
|
static unsigned long cpu_avg_load_per_task(int cpu)
{
struct rq *rq = cpu_rq(cpu);
unsigned long nr_running = READ_ONCE(rq->cfs.h_nr_running);
unsigned long load_avg = weighted_cpuload(rq);
if (nr_running)
return load_avg / nr_running;
return 0;
}
|
C
|
linux
| 0 |
CVE-2014-9644
|
https://www.cvedetails.com/cve/CVE-2014-9644/
|
CWE-264
|
https://github.com/torvalds/linux/commit/4943ba16bbc2db05115707b3ff7b4874e9e3c560
|
4943ba16bbc2db05115707b3ff7b4874e9e3c560
|
crypto: include crypto- module prefix in template
This adds the module loading prefix "crypto-" to the template lookup
as well.
For example, attempting to load 'vfat(blowfish)' via AF_ALG now correctly
includes the "crypto-" prefix at every level, correctly rejecting "vfat":
net-pf-38
algif-hash
crypto-vfat(blowfish)
crypto-vfat(blowfish)-all
crypto-vfat
Reported-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
static void authenc_esn_request_complete(struct aead_request *req, int err)
{
if (err != -EINPROGRESS)
aead_request_complete(req, err);
}
|
static void authenc_esn_request_complete(struct aead_request *req, int err)
{
if (err != -EINPROGRESS)
aead_request_complete(req, err);
}
|
C
|
linux
| 0 |
CVE-2012-5140
|
https://www.cvedetails.com/cve/CVE-2012-5140/
|
CWE-416
|
https://github.com/chromium/chromium/commit/a75c45bf1cad925548a75bf88f828443bc8ee27d
|
a75c45bf1cad925548a75bf88f828443bc8ee27d
|
Break path whereby AssociatedURLLoader::~AssociatedURLLoader() is re-entered on top of itself.
BUG=159429
Review URL: https://chromiumcodereview.appspot.com/11359222
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168150 0039d316-1c4b-4281-b951-d872f2087c98
|
PPB_URLLoader_Impl::PPB_URLLoader_Impl(PP_Instance instance,
bool main_document_loader)
: Resource(::ppapi::OBJECT_IS_IMPL, instance),
main_document_loader_(main_document_loader),
pending_callback_(),
bytes_sent_(0),
total_bytes_to_be_sent_(-1),
bytes_received_(0),
total_bytes_to_be_received_(-1),
user_buffer_(NULL),
user_buffer_size_(0),
done_status_(PP_OK_COMPLETIONPENDING),
is_streaming_to_file_(false),
is_asynchronous_load_suspended_(false),
has_universal_access_(false),
status_callback_(NULL) {
}
|
PPB_URLLoader_Impl::PPB_URLLoader_Impl(PP_Instance instance,
bool main_document_loader)
: Resource(::ppapi::OBJECT_IS_IMPL, instance),
main_document_loader_(main_document_loader),
pending_callback_(),
bytes_sent_(0),
total_bytes_to_be_sent_(-1),
bytes_received_(0),
total_bytes_to_be_received_(-1),
user_buffer_(NULL),
user_buffer_size_(0),
done_status_(PP_OK_COMPLETIONPENDING),
is_streaming_to_file_(false),
is_asynchronous_load_suspended_(false),
has_universal_access_(false),
status_callback_(NULL) {
}
|
C
|
Chrome
| 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 <Trond.Myklebust@netapp.com>
|
static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request)
{
struct nfs_server *server = NFS_SERVER(state->inode);
struct nfs4_exception exception = { };
int err;
do {
/* Cache the lock if possible... */
if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0)
return 0;
err = _nfs4_do_setlk(state, F_SETLK, request, 1);
if (err != -NFS4ERR_DELAY)
break;
nfs4_handle_exception(server, err, &exception);
} while (exception.retry);
return err;
}
|
static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request)
{
struct nfs_server *server = NFS_SERVER(state->inode);
struct nfs4_exception exception = { };
int err;
do {
/* Cache the lock if possible... */
if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0)
return 0;
err = _nfs4_do_setlk(state, F_SETLK, request, 1);
if (err != -NFS4ERR_DELAY)
break;
nfs4_handle_exception(server, err, &exception);
} while (exception.retry);
return err;
}
|
C
|
linux
| 0 |
CVE-2015-1281
|
https://www.cvedetails.com/cve/CVE-2015-1281/
|
CWE-254
|
https://github.com/chromium/chromium/commit/dff368031150a1033a1a3c913f8857679a0279be
|
dff368031150a1033a1a3c913f8857679a0279be
|
Correctly keep track of isolates for microtask execution
BUG=487155
R=haraken@chromium.org
Review URL: https://codereview.chromium.org/1161823002
git-svn-id: svn://svn.chromium.org/blink/trunk@195985 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
MainThreadTaskRunner(WTF::MainThreadFunction* function, void* context)
: m_function(function)
, m_context(context) { }
|
MainThreadTaskRunner(WTF::MainThreadFunction* function, void* context)
: m_function(function)
, m_context(context) { }
|
C
|
Chrome
| 0 |
CVE-2017-14166
|
https://www.cvedetails.com/cve/CVE-2017-14166/
|
CWE-125
|
https://github.com/libarchive/libarchive/commit/fa7438a0ff4033e4741c807394a9af6207940d71
|
fa7438a0ff4033e4741c807394a9af6207940d71
|
Do something sensible for empty strings to make fuzzers happy.
|
xml2_xmlattr_setup(struct archive_read *a,
struct xmlattr_list *list, xmlTextReaderPtr reader)
{
struct xmlattr *attr;
int r;
list->first = NULL;
list->last = &(list->first);
r = xmlTextReaderMoveToFirstAttribute(reader);
while (r == 1) {
attr = malloc(sizeof*(attr));
if (attr == NULL) {
archive_set_error(&a->archive, ENOMEM, "Out of memory");
return (ARCHIVE_FATAL);
}
attr->name = strdup(
(const char *)xmlTextReaderConstLocalName(reader));
if (attr->name == NULL) {
free(attr);
archive_set_error(&a->archive, ENOMEM, "Out of memory");
return (ARCHIVE_FATAL);
}
attr->value = strdup(
(const char *)xmlTextReaderConstValue(reader));
if (attr->value == NULL) {
free(attr->name);
free(attr);
archive_set_error(&a->archive, ENOMEM, "Out of memory");
return (ARCHIVE_FATAL);
}
attr->next = NULL;
*list->last = attr;
list->last = &(attr->next);
r = xmlTextReaderMoveToNextAttribute(reader);
}
return (r);
}
|
xml2_xmlattr_setup(struct archive_read *a,
struct xmlattr_list *list, xmlTextReaderPtr reader)
{
struct xmlattr *attr;
int r;
list->first = NULL;
list->last = &(list->first);
r = xmlTextReaderMoveToFirstAttribute(reader);
while (r == 1) {
attr = malloc(sizeof*(attr));
if (attr == NULL) {
archive_set_error(&a->archive, ENOMEM, "Out of memory");
return (ARCHIVE_FATAL);
}
attr->name = strdup(
(const char *)xmlTextReaderConstLocalName(reader));
if (attr->name == NULL) {
free(attr);
archive_set_error(&a->archive, ENOMEM, "Out of memory");
return (ARCHIVE_FATAL);
}
attr->value = strdup(
(const char *)xmlTextReaderConstValue(reader));
if (attr->value == NULL) {
free(attr->name);
free(attr);
archive_set_error(&a->archive, ENOMEM, "Out of memory");
return (ARCHIVE_FATAL);
}
attr->next = NULL;
*list->last = attr;
list->last = &(attr->next);
r = xmlTextReaderMoveToNextAttribute(reader);
}
return (r);
}
|
C
|
libarchive
| 0 |
CVE-2015-3228
|
https://www.cvedetails.com/cve/CVE-2015-3228/
|
CWE-189
|
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=0c0b0859
|
0c0b0859ae1aba64861599f0e7f74f143f305932
| null |
gs_heap_alloc_struct_array(gs_memory_t * mem, uint num_elements,
gs_memory_type_ptr_t pstype, client_name_t cname)
{
void *ptr =
gs_heap_alloc_byte_array(mem, num_elements,
gs_struct_type_size(pstype), cname);
if (ptr == 0)
return 0;
((gs_malloc_block_t *) ptr)[-1].type = pstype;
return ptr;
}
|
gs_heap_alloc_struct_array(gs_memory_t * mem, uint num_elements,
gs_memory_type_ptr_t pstype, client_name_t cname)
{
void *ptr =
gs_heap_alloc_byte_array(mem, num_elements,
gs_struct_type_size(pstype), cname);
if (ptr == 0)
return 0;
((gs_malloc_block_t *) ptr)[-1].type = pstype;
return ptr;
}
|
C
|
moodle
| 0 |
CVE-2016-8633
|
https://www.cvedetails.com/cve/CVE-2016-8633/
|
CWE-119
|
https://github.com/torvalds/linux/commit/667121ace9dbafb368618dbabcf07901c962ddac
|
667121ace9dbafb368618dbabcf07901c962ddac
|
firewire: net: guard against rx buffer overflows
The IP-over-1394 driver firewire-net lacked input validation when
handling incoming fragmented datagrams. A maliciously formed fragment
with a respectively large datagram_offset would cause a memcpy past the
datagram buffer.
So, drop any packets carrying a fragment with offset + length larger
than datagram_size.
In addition, ensure that
- GASP header, unfragmented encapsulation header, or fragment
encapsulation header actually exists before we access it,
- the encapsulated datagram or fragment is of nonzero size.
Reported-by: Eyal Itkin <eyal.itkin@gmail.com>
Reviewed-by: Eyal Itkin <eyal.itkin@gmail.com>
Fixes: CVE 2016-8633
Cc: stable@vger.kernel.org
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
|
static void dec_queued_datagrams(struct fwnet_device *dev)
{
if (--dev->queued_datagrams == FWNET_MIN_QUEUED_DATAGRAMS)
netif_wake_queue(dev->netdev);
}
|
static void dec_queued_datagrams(struct fwnet_device *dev)
{
if (--dev->queued_datagrams == FWNET_MIN_QUEUED_DATAGRAMS)
netif_wake_queue(dev->netdev);
}
|
C
|
linux
| 0 |
CVE-2016-7134
|
https://www.cvedetails.com/cve/CVE-2016-7134/
|
CWE-119
|
https://github.com/php/php-src/commit/72dbb7f416160f490c4e9987040989a10ad431c7?w=1
|
72dbb7f416160f490c4e9987040989a10ad431c7?w=1
|
Fix bug #72674 - check both curl_escape and curl_unescape
|
static void _php_curl_close_ex(php_curl *ch)
{
#if PHP_CURL_DEBUG
fprintf(stderr, "DTOR CALLED, ch = %x\n", ch);
#endif
_php_curl_verify_handlers(ch, 0);
/*
* Libcurl is doing connection caching. When easy handle is cleaned up,
* if the handle was previously used by the curl_multi_api, the connection
* remains open un the curl multi handle is cleaned up. Some protocols are
* sending content like the FTP one, and libcurl try to use the
* WRITEFUNCTION or the HEADERFUNCTION. Since structures used in those
* callback are freed, we need to use an other callback to which avoid
* segfaults.
*
* Libcurl commit d021f2e8a00 fix this issue and should be part of 7.28.2
*/
curl_easy_setopt(ch->cp, CURLOPT_HEADERFUNCTION, curl_write_nothing);
curl_easy_setopt(ch->cp, CURLOPT_WRITEFUNCTION, curl_write_nothing);
curl_easy_cleanup(ch->cp);
/* cURL destructors should be invoked only by last curl handle */
if (--(*ch->clone) == 0) {
zend_llist_clean(&ch->to_free->str);
zend_llist_clean(&ch->to_free->post);
zend_hash_destroy(ch->to_free->slist);
efree(ch->to_free->slist);
efree(ch->to_free);
efree(ch->clone);
}
smart_str_free(&ch->handlers->write->buf);
zval_ptr_dtor(&ch->handlers->write->func_name);
zval_ptr_dtor(&ch->handlers->read->func_name);
zval_ptr_dtor(&ch->handlers->write_header->func_name);
#if CURLOPT_PASSWDFUNCTION != 0
zval_ptr_dtor(&ch->handlers->passwd);
#endif
zval_ptr_dtor(&ch->handlers->std_err);
if (ch->header.str) {
zend_string_release(ch->header.str);
}
zval_ptr_dtor(&ch->handlers->write_header->stream);
zval_ptr_dtor(&ch->handlers->write->stream);
zval_ptr_dtor(&ch->handlers->read->stream);
efree(ch->handlers->write);
efree(ch->handlers->write_header);
efree(ch->handlers->read);
if (ch->handlers->progress) {
zval_ptr_dtor(&ch->handlers->progress->func_name);
efree(ch->handlers->progress);
}
#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
if (ch->handlers->fnmatch) {
zval_ptr_dtor(&ch->handlers->fnmatch->func_name);
efree(ch->handlers->fnmatch);
}
#endif
efree(ch->handlers);
efree(ch);
}
|
static void _php_curl_close_ex(php_curl *ch)
{
#if PHP_CURL_DEBUG
fprintf(stderr, "DTOR CALLED, ch = %x\n", ch);
#endif
_php_curl_verify_handlers(ch, 0);
/*
* Libcurl is doing connection caching. When easy handle is cleaned up,
* if the handle was previously used by the curl_multi_api, the connection
* remains open un the curl multi handle is cleaned up. Some protocols are
* sending content like the FTP one, and libcurl try to use the
* WRITEFUNCTION or the HEADERFUNCTION. Since structures used in those
* callback are freed, we need to use an other callback to which avoid
* segfaults.
*
* Libcurl commit d021f2e8a00 fix this issue and should be part of 7.28.2
*/
curl_easy_setopt(ch->cp, CURLOPT_HEADERFUNCTION, curl_write_nothing);
curl_easy_setopt(ch->cp, CURLOPT_WRITEFUNCTION, curl_write_nothing);
curl_easy_cleanup(ch->cp);
/* cURL destructors should be invoked only by last curl handle */
if (--(*ch->clone) == 0) {
zend_llist_clean(&ch->to_free->str);
zend_llist_clean(&ch->to_free->post);
zend_hash_destroy(ch->to_free->slist);
efree(ch->to_free->slist);
efree(ch->to_free);
efree(ch->clone);
}
smart_str_free(&ch->handlers->write->buf);
zval_ptr_dtor(&ch->handlers->write->func_name);
zval_ptr_dtor(&ch->handlers->read->func_name);
zval_ptr_dtor(&ch->handlers->write_header->func_name);
#if CURLOPT_PASSWDFUNCTION != 0
zval_ptr_dtor(&ch->handlers->passwd);
#endif
zval_ptr_dtor(&ch->handlers->std_err);
if (ch->header.str) {
zend_string_release(ch->header.str);
}
zval_ptr_dtor(&ch->handlers->write_header->stream);
zval_ptr_dtor(&ch->handlers->write->stream);
zval_ptr_dtor(&ch->handlers->read->stream);
efree(ch->handlers->write);
efree(ch->handlers->write_header);
efree(ch->handlers->read);
if (ch->handlers->progress) {
zval_ptr_dtor(&ch->handlers->progress->func_name);
efree(ch->handlers->progress);
}
#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
if (ch->handlers->fnmatch) {
zval_ptr_dtor(&ch->handlers->fnmatch->func_name);
efree(ch->handlers->fnmatch);
}
#endif
efree(ch->handlers);
efree(ch);
}
|
C
|
php-src
| 0 |
CVE-2016-10746
|
https://www.cvedetails.com/cve/CVE-2016-10746/
|
CWE-254
|
https://github.com/libvirt/libvirt/commit/506e9d6c2d4baaf580d489fff0690c0ff2ff588f
|
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
|
virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
virDomainRename(virDomainPtr dom,
const char *new_name,
unsigned int flags)
{
VIR_DEBUG("dom=%p, new_name=%s", dom, NULLSTR(new_name));
virResetLastError();
virCheckDomainReturn(dom, -1);
virCheckNonNullArgGoto(new_name, error);
virCheckReadOnlyGoto(dom->conn->flags, error);
if (dom->conn->driver->domainRename) {
int ret = dom->conn->driver->domainRename(dom, new_name, flags);
if (ret < 0)
goto error;
return ret;
}
virReportUnsupportedError();
error:
virDispatchError(dom->conn);
return -1;
}
|
virDomainRename(virDomainPtr dom,
const char *new_name,
unsigned int flags)
{
VIR_DEBUG("dom=%p, new_name=%s", dom, NULLSTR(new_name));
virResetLastError();
virCheckDomainReturn(dom, -1);
virCheckNonNullArgGoto(new_name, error);
virCheckReadOnlyGoto(dom->conn->flags, error);
if (dom->conn->driver->domainRename) {
int ret = dom->conn->driver->domainRename(dom, new_name, flags);
if (ret < 0)
goto error;
return ret;
}
virReportUnsupportedError();
error:
virDispatchError(dom->conn);
return -1;
}
|
C
|
libvirt
| 0 |
CVE-2011-3105
|
https://www.cvedetails.com/cve/CVE-2011-3105/
|
CWE-399
|
https://github.com/chromium/chromium/commit/d6cc2749d2f90acc2d92a526c1d2cbebbc101a19
|
d6cc2749d2f90acc2d92a526c1d2cbebbc101a19
|
sync: remove Chrome OS specific logic to deal with flimflam shutdown / sync race.
No longer necessary as the ProfileSyncService now aborts sync network traffic on shutdown.
BUG=chromium-os:20841
Review URL: http://codereview.chromium.org/9358007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120912 0039d316-1c4b-4281-b951-d872f2087c98
|
bool SyncManager::SyncInternal::Init(
const FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
const std::string& sync_server_and_path,
int port,
bool use_ssl,
HttpPostProviderFactory* post_factory,
ModelSafeWorkerRegistrar* model_safe_worker_registrar,
ChangeDelegate* change_delegate,
const std::string& user_agent,
const SyncCredentials& credentials,
sync_notifier::SyncNotifier* sync_notifier,
const std::string& restored_key_for_bootstrapping,
bool setup_for_test_mode,
UnrecoverableErrorHandler* unrecoverable_error_handler) {
CHECK(!initialized_);
DCHECK(thread_checker_.CalledOnValidThread());
DVLOG(1) << "Starting SyncInternal initialization.";
weak_handle_this_ = MakeWeakHandle(weak_ptr_factory_.GetWeakPtr());
registrar_ = model_safe_worker_registrar;
change_delegate_ = change_delegate;
setup_for_test_mode_ = setup_for_test_mode;
sync_notifier_.reset(sync_notifier);
AddObserver(&js_sync_manager_observer_);
SetJsEventHandler(event_handler);
AddObserver(&debug_info_event_listener_);
share_.dir_manager.reset(new DirectoryManager(database_location));
connection_manager_.reset(new SyncAPIServerConnectionManager(
sync_server_and_path, port, use_ssl, user_agent, post_factory));
net::NetworkChangeNotifier::AddIPAddressObserver(this);
observing_ip_address_changes_ = true;
connection_manager()->AddListener(this);
unrecoverable_error_handler_ = unrecoverable_error_handler;
if (!setup_for_test_mode_) {
DVLOG(1) << "Sync is bringing up SyncSessionContext.";
std::vector<SyncEngineEventListener*> listeners;
listeners.push_back(&allstatus_);
listeners.push_back(this);
SyncSessionContext* context = new SyncSessionContext(
connection_manager_.get(),
dir_manager(),
model_safe_worker_registrar,
listeners,
&debug_info_event_listener_);
context->set_account_name(credentials.email);
scheduler_.reset(new SyncScheduler(name_, context, new Syncer()));
}
bool signed_in = SignIn(credentials);
if (signed_in) {
if (scheduler()) {
scheduler()->Start(
browser_sync::SyncScheduler::CONFIGURATION_MODE, base::Closure());
}
initialized_ = true;
ReadTransaction trans(FROM_HERE, GetUserShare());
trans.GetCryptographer()->Bootstrap(restored_key_for_bootstrapping);
trans.GetCryptographer()->AddObserver(this);
}
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
OnInitializationComplete(
MakeWeakHandle(weak_ptr_factory_.GetWeakPtr()),
signed_in));
if (!signed_in && !setup_for_test_mode_)
return false;
sync_notifier_->AddObserver(this);
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncThrowUnrecoverableError)) {
ReadTransaction trans(FROM_HERE, GetUserShare());
trans.GetWrappedTrans()->OnUnrecoverableError(FROM_HERE,
"Simulating unrecoverable error for testing purpose.");
}
return signed_in;
}
|
bool SyncManager::SyncInternal::Init(
const FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
const std::string& sync_server_and_path,
int port,
bool use_ssl,
HttpPostProviderFactory* post_factory,
ModelSafeWorkerRegistrar* model_safe_worker_registrar,
ChangeDelegate* change_delegate,
const std::string& user_agent,
const SyncCredentials& credentials,
sync_notifier::SyncNotifier* sync_notifier,
const std::string& restored_key_for_bootstrapping,
bool setup_for_test_mode,
UnrecoverableErrorHandler* unrecoverable_error_handler) {
CHECK(!initialized_);
DCHECK(thread_checker_.CalledOnValidThread());
DVLOG(1) << "Starting SyncInternal initialization.";
weak_handle_this_ = MakeWeakHandle(weak_ptr_factory_.GetWeakPtr());
registrar_ = model_safe_worker_registrar;
change_delegate_ = change_delegate;
setup_for_test_mode_ = setup_for_test_mode;
sync_notifier_.reset(sync_notifier);
AddObserver(&js_sync_manager_observer_);
SetJsEventHandler(event_handler);
AddObserver(&debug_info_event_listener_);
share_.dir_manager.reset(new DirectoryManager(database_location));
connection_manager_.reset(new SyncAPIServerConnectionManager(
sync_server_and_path, port, use_ssl, user_agent, post_factory));
net::NetworkChangeNotifier::AddIPAddressObserver(this);
observing_ip_address_changes_ = true;
connection_manager()->AddListener(this);
unrecoverable_error_handler_ = unrecoverable_error_handler;
if (!setup_for_test_mode_) {
DVLOG(1) << "Sync is bringing up SyncSessionContext.";
std::vector<SyncEngineEventListener*> listeners;
listeners.push_back(&allstatus_);
listeners.push_back(this);
SyncSessionContext* context = new SyncSessionContext(
connection_manager_.get(),
dir_manager(),
model_safe_worker_registrar,
listeners,
&debug_info_event_listener_);
context->set_account_name(credentials.email);
scheduler_.reset(new SyncScheduler(name_, context, new Syncer()));
}
bool signed_in = SignIn(credentials);
if (signed_in) {
if (scheduler()) {
scheduler()->Start(
browser_sync::SyncScheduler::CONFIGURATION_MODE, base::Closure());
}
initialized_ = true;
ReadTransaction trans(FROM_HERE, GetUserShare());
trans.GetCryptographer()->Bootstrap(restored_key_for_bootstrapping);
trans.GetCryptographer()->AddObserver(this);
}
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
OnInitializationComplete(
MakeWeakHandle(weak_ptr_factory_.GetWeakPtr()),
signed_in));
if (!signed_in && !setup_for_test_mode_)
return false;
sync_notifier_->AddObserver(this);
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSyncThrowUnrecoverableError)) {
ReadTransaction trans(FROM_HERE, GetUserShare());
trans.GetWrappedTrans()->OnUnrecoverableError(FROM_HERE,
"Simulating unrecoverable error for testing purpose.");
}
return signed_in;
}
|
C
|
Chrome
| 0 |
CVE-2019-13307
|
https://www.cvedetails.com/cve/CVE-2019-13307/
|
CWE-119
|
https://github.com/ImageMagick/ImageMagick6/commit/91e58d967a92250439ede038ccfb0913a81e59fe
|
91e58d967a92250439ede038ccfb0913a81e59fe
|
https://github.com/ImageMagick/ImageMagick/issues/1615
|
static MagickPixelPacket **DestroyPixelThreadSet(MagickPixelPacket **pixels)
{
register ssize_t
i;
assert(pixels != (MagickPixelPacket **) NULL);
for (i=0; i < (ssize_t) GetMagickResourceLimit(ThreadResource); i++)
if (pixels[i] != (MagickPixelPacket *) NULL)
pixels[i]=(MagickPixelPacket *) RelinquishMagickMemory(pixels[i]);
pixels=(MagickPixelPacket **) RelinquishMagickMemory(pixels);
return(pixels);
}
|
static MagickPixelPacket **DestroyPixelThreadSet(MagickPixelPacket **pixels)
{
register ssize_t
i;
assert(pixels != (MagickPixelPacket **) NULL);
for (i=0; i < (ssize_t) GetMagickResourceLimit(ThreadResource); i++)
if (pixels[i] != (MagickPixelPacket *) NULL)
pixels[i]=(MagickPixelPacket *) RelinquishMagickMemory(pixels[i]);
pixels=(MagickPixelPacket **) RelinquishMagickMemory(pixels);
return(pixels);
}
|
C
|
ImageMagick6
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/d1a59e4e845a01d7d7b80ef184b672752a9eae4d
|
d1a59e4e845a01d7d7b80ef184b672752a9eae4d
|
Fixing cross-process postMessage replies on more than two iterations.
When two frames are replying to each other using event.source across processes,
after the first two replies, things break down. The root cause is that in
RenderViewImpl::GetFrameByMappedID, the lookup was incorrect. It is now
properly searching for the remote frame id and returning the local one.
BUG=153445
Review URL: https://chromiumcodereview.appspot.com/11040015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159924 0039d316-1c4b-4281-b951-d872f2087c98
|
void RenderViewImpl::OnCopyImageAt(int x, int y) {
webview()->copyImageAt(WebPoint(x, y));
}
|
void RenderViewImpl::OnCopyImageAt(int x, int y) {
webview()->copyImageAt(WebPoint(x, y));
}
|
C
|
Chrome
| 0 |
CVE-2015-8617
|
https://www.cvedetails.com/cve/CVE-2015-8617/
|
CWE-134
|
https://github.com/php/php-src/commit/b101a6bbd4f2181c360bd38e7683df4a03cba83e
|
b101a6bbd4f2181c360bd38e7683df4a03cba83e
|
Use format string
|
static void zend_verify_abstract_class_function(zend_function *fn, zend_abstract_info *ai) /* {{{ */
{
if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
if (ai->cnt < MAX_ABSTRACT_INFO_CNT) {
ai->afn[ai->cnt] = fn;
}
if (fn->common.fn_flags & ZEND_ACC_CTOR) {
if (!ai->ctor) {
ai->cnt++;
ai->ctor = 1;
} else {
ai->afn[ai->cnt] = NULL;
}
} else {
ai->cnt++;
}
}
}
/* }}} */
|
static void zend_verify_abstract_class_function(zend_function *fn, zend_abstract_info *ai) /* {{{ */
{
if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
if (ai->cnt < MAX_ABSTRACT_INFO_CNT) {
ai->afn[ai->cnt] = fn;
}
if (fn->common.fn_flags & ZEND_ACC_CTOR) {
if (!ai->ctor) {
ai->cnt++;
ai->ctor = 1;
} else {
ai->afn[ai->cnt] = NULL;
}
} else {
ai->cnt++;
}
}
}
/* }}} */
|
C
|
php-src
| 0 |
CVE-2018-19134
|
https://www.cvedetails.com/cve/CVE-2018-19134/
|
CWE-704
|
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=693baf02152119af6e6afd30bb8ec76d14f84bbf
|
693baf02152119af6e6afd30bb8ec76d14f84bbf
| null |
gx_dc_binary_masked_equal(const gx_device_color * pdevc1,
const gx_device_color * pdevc2)
{
return (*gx_dc_type_ht_binary->equal) (pdevc1, pdevc2) &&
pdevc1->mask.id == pdevc2->mask.id;
}
|
gx_dc_binary_masked_equal(const gx_device_color * pdevc1,
const gx_device_color * pdevc2)
{
return (*gx_dc_type_ht_binary->equal) (pdevc1, pdevc2) &&
pdevc1->mask.id == pdevc2->mask.id;
}
|
C
|
ghostscript
| 0 |
CVE-2013-6663
|
https://www.cvedetails.com/cve/CVE-2013-6663/
|
CWE-399
|
https://github.com/chromium/chromium/commit/fb5dce12f0462056fc9f66967b0f7b2b7bcd88f5
|
fb5dce12f0462056fc9f66967b0f7b2b7bcd88f5
|
One polymer_config.js to rule them all.
R=michaelpg@chromium.org,fukino@chromium.org,mfoltz@chromium.org
BUG=425626
Review URL: https://codereview.chromium.org/1224783005
Cr-Commit-Position: refs/heads/master@{#337882}
|
DeviceDisabledScreenActor* OobeUI::GetDeviceDisabledScreenActor() {
return device_disabled_screen_actor_;
}
|
DeviceDisabledScreenActor* OobeUI::GetDeviceDisabledScreenActor() {
return device_disabled_screen_actor_;
}
|
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 WebPluginProxy::SetAcceleratedDIB(
gfx::PluginWindowHandle window,
const gfx::Size& size,
const TransportDIB::Handle& dib_handle) {
Send(new PluginHostMsg_AcceleratedSurfaceSetTransportDIB(
route_id_, window, size.width(), size.height(), dib_handle));
}
|
void WebPluginProxy::SetAcceleratedDIB(
gfx::PluginWindowHandle window,
const gfx::Size& size,
const TransportDIB::Handle& dib_handle) {
Send(new PluginHostMsg_AcceleratedSurfaceSetTransportDIB(
route_id_, window, size.width(), size.height(), dib_handle));
}
|
C
|
Chrome
| 0 |
CVE-2013-2141
|
https://www.cvedetails.com/cve/CVE-2013-2141/
|
CWE-399
|
https://github.com/torvalds/linux/commit/b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f
|
b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f
|
kernel/signal.c: stop info leak via the tkill and the tgkill syscalls
This fixes a kernel memory contents leak via the tkill and tgkill syscalls
for compat processes.
This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field
when handling signals delivered from tkill.
The place of the infoleak:
int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
{
...
put_user_ex(ptr_to_compat(from->si_ptr), &to->si_ptr);
...
}
Signed-off-by: Emese Revfy <re.emese@gmail.com>
Reviewed-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask)
{
sigset_t blocked;
siginitset(&blocked, mask);
return sigsuspend(&blocked);
}
|
SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask)
{
sigset_t blocked;
siginitset(&blocked, mask);
return sigsuspend(&blocked);
}
|
C
|
linux
| 0 |
CVE-2016-1670
|
https://www.cvedetails.com/cve/CVE-2016-1670/
|
CWE-362
|
https://github.com/chromium/chromium/commit/1af4fada49c4f3890f16daac31d38379a9d782b2
|
1af4fada49c4f3890f16daac31d38379a9d782b2
|
Block a compromised renderer from reusing request ids.
BUG=578882
Review URL: https://codereview.chromium.org/1608573002
Cr-Commit-Position: refs/heads/master@{#372547}
|
void SecurityExploitBrowserTest::TestFileChooserWithPath(
const base::FilePath& path) {
GURL foo("http://foo.com/simple_page.html");
NavigateToURL(shell(), foo);
EXPECT_EQ(base::ASCIIToUTF16("OK"), shell()->web_contents()->GetTitle());
RenderViewHost* compromised_renderer =
shell()->web_contents()->GetRenderViewHost();
RenderProcessHostWatcher terminated(
shell()->web_contents(),
RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
FileChooserParams params;
params.default_file_name = path;
ViewHostMsg_RunFileChooser evil(compromised_renderer->GetRoutingID(), params);
IpcSecurityTestUtil::PwnMessageReceived(
compromised_renderer->GetProcess()->GetChannel(), evil);
terminated.Wait();
}
|
void SecurityExploitBrowserTest::TestFileChooserWithPath(
const base::FilePath& path) {
GURL foo("http://foo.com/simple_page.html");
NavigateToURL(shell(), foo);
EXPECT_EQ(base::ASCIIToUTF16("OK"), shell()->web_contents()->GetTitle());
RenderViewHost* compromised_renderer =
shell()->web_contents()->GetRenderViewHost();
RenderProcessHostWatcher terminated(
shell()->web_contents(),
RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
FileChooserParams params;
params.default_file_name = path;
ViewHostMsg_RunFileChooser evil(compromised_renderer->GetRoutingID(), params);
IpcSecurityTestUtil::PwnMessageReceived(
compromised_renderer->GetProcess()->GetChannel(), evil);
terminated.Wait();
}
|
C
|
Chrome
| 0 |
CVE-2011-2491
|
https://www.cvedetails.com/cve/CVE-2011-2491/
|
CWE-399
|
https://github.com/torvalds/linux/commit/0b760113a3a155269a3fba93a409c640031dd68f
|
0b760113a3a155269a3fba93a409c640031dd68f
|
NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
|
static int rpc_complete_task(struct rpc_task *task)
{
void *m = &task->tk_runstate;
wait_queue_head_t *wq = bit_waitqueue(m, RPC_TASK_ACTIVE);
struct wait_bit_key k = __WAIT_BIT_KEY_INITIALIZER(m, RPC_TASK_ACTIVE);
unsigned long flags;
int ret;
spin_lock_irqsave(&wq->lock, flags);
clear_bit(RPC_TASK_ACTIVE, &task->tk_runstate);
ret = atomic_dec_and_test(&task->tk_count);
if (waitqueue_active(wq))
__wake_up_locked_key(wq, TASK_NORMAL, &k);
spin_unlock_irqrestore(&wq->lock, flags);
return ret;
}
|
static int rpc_complete_task(struct rpc_task *task)
{
void *m = &task->tk_runstate;
wait_queue_head_t *wq = bit_waitqueue(m, RPC_TASK_ACTIVE);
struct wait_bit_key k = __WAIT_BIT_KEY_INITIALIZER(m, RPC_TASK_ACTIVE);
unsigned long flags;
int ret;
spin_lock_irqsave(&wq->lock, flags);
clear_bit(RPC_TASK_ACTIVE, &task->tk_runstate);
ret = atomic_dec_and_test(&task->tk_count);
if (waitqueue_active(wq))
__wake_up_locked_key(wq, TASK_NORMAL, &k);
spin_unlock_irqrestore(&wq->lock, flags);
return ret;
}
|
C
|
linux
| 0 |
CVE-2013-6622
|
https://www.cvedetails.com/cve/CVE-2013-6622/
|
CWE-399
|
https://github.com/chromium/chromium/commit/438b99bc730bc665eedfc62c4eb864c981e5c65f
|
438b99bc730bc665eedfc62c4eb864c981e5c65f
|
Remove --disable-app-shims.
App shims have been enabled by default for 3 milestones
(since r242711).
BUG=350161
Review URL: https://codereview.chromium.org/298953002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272786 0039d316-1c4b-4281-b951-d872f2087c98
|
AppLauncherHandler::AppLauncherHandler(ExtensionService* extension_service)
: extension_service_(extension_service),
ignore_changes_(false),
attempted_bookmark_app_install_(false),
has_loaded_apps_(false) {
if (IsAppLauncherEnabled())
RecordAppLauncherPromoHistogram(apps::APP_LAUNCHER_PROMO_ALREADY_INSTALLED);
else if (ShouldShowAppLauncherPromo())
RecordAppLauncherPromoHistogram(apps::APP_LAUNCHER_PROMO_SHOWN);
}
|
AppLauncherHandler::AppLauncherHandler(ExtensionService* extension_service)
: extension_service_(extension_service),
ignore_changes_(false),
attempted_bookmark_app_install_(false),
has_loaded_apps_(false) {
if (IsAppLauncherEnabled())
RecordAppLauncherPromoHistogram(apps::APP_LAUNCHER_PROMO_ALREADY_INSTALLED);
else if (ShouldShowAppLauncherPromo())
RecordAppLauncherPromoHistogram(apps::APP_LAUNCHER_PROMO_SHOWN);
}
|
C
|
Chrome
| 0 |
CVE-2017-13013
|
https://www.cvedetails.com/cve/CVE-2017-13013/
|
CWE-125
|
https://github.com/the-tcpdump-group/tcpdump/commit/13ab8d18617d616c7d343530f8a842e7143fb5cc
|
13ab8d18617d616c7d343530f8a842e7143fb5cc
|
CVE-2017-13013/ARP: Fix printing of ARP protocol addresses.
If the protocol type isn't ETHERTYPE_IP or ETHERTYPE_TRAIL, or if the
protocol address length isn't 4, don't print the address as an IPv4 address.
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.
Update another test file's tcpdump output to reflect this change.
|
arp_print(netdissect_options *ndo,
const u_char *bp, u_int length, u_int caplen)
{
const struct arp_pkthdr *ap;
u_short pro, hrd, op, linkaddr;
ap = (const struct arp_pkthdr *)bp;
ND_TCHECK(*ap);
hrd = HRD(ap);
pro = PRO(ap);
op = OP(ap);
/* if its ATM then call the ATM ARP printer
for Frame-relay ARP most of the fields
are similar to Ethernet so overload the Ethernet Printer
and set the linkaddr type for linkaddr_string(ndo, ) accordingly */
switch(hrd) {
case ARPHRD_ATM2225:
atmarp_print(ndo, bp, length, caplen);
return;
case ARPHRD_FRELAY:
linkaddr = LINKADDR_FRELAY;
break;
default:
linkaddr = LINKADDR_ETHER;
break;
}
if (!ND_TTEST2(*TPA(ap), PROTO_LEN(ap))) {
ND_PRINT((ndo, "%s", tstr));
ND_DEFAULTPRINT((const u_char *)ap, length);
return;
}
if (!ndo->ndo_eflag) {
ND_PRINT((ndo, "ARP, "));
}
/* print hardware type/len and proto type/len */
if ((pro != ETHERTYPE_IP && pro != ETHERTYPE_TRAIL) ||
PROTO_LEN(ap) != 4 ||
HRD_LEN(ap) == 0 ||
ndo->ndo_vflag) {
ND_PRINT((ndo, "%s (len %u), %s (len %u)",
tok2str(arphrd_values, "Unknown Hardware (%u)", hrd),
HRD_LEN(ap),
tok2str(ethertype_values, "Unknown Protocol (0x%04x)", pro),
PROTO_LEN(ap)));
/* don't know know about the address formats */
if (!ndo->ndo_vflag) {
goto out;
}
}
/* print operation */
ND_PRINT((ndo, "%s%s ",
ndo->ndo_vflag ? ", " : "",
tok2str(arpop_values, "Unknown (%u)", op)));
switch (op) {
case ARPOP_REQUEST:
ND_PRINT((ndo, "who-has "));
tpaddr_print_ip(ndo, ap, pro);
if (isnonzero((const u_char *)THA(ap), HRD_LEN(ap)))
ND_PRINT((ndo, " (%s)",
linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap))));
ND_PRINT((ndo, " tell "));
spaddr_print_ip(ndo, ap, pro);
break;
case ARPOP_REPLY:
spaddr_print_ip(ndo, ap, pro);
ND_PRINT((ndo, " is-at %s",
linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
break;
case ARPOP_REVREQUEST:
ND_PRINT((ndo, "who-is %s tell %s",
linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap)),
linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
break;
case ARPOP_REVREPLY:
ND_PRINT((ndo, "%s at ",
linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap))));
tpaddr_print_ip(ndo, ap, pro);
break;
case ARPOP_INVREQUEST:
ND_PRINT((ndo, "who-is %s tell %s",
linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap)),
linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
break;
case ARPOP_INVREPLY:
ND_PRINT((ndo,"%s at ",
linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
spaddr_print_ip(ndo, ap, pro);
break;
default:
ND_DEFAULTPRINT((const u_char *)ap, caplen);
return;
}
out:
ND_PRINT((ndo, ", length %u", length));
return;
trunc:
ND_PRINT((ndo, "%s", tstr));
}
|
arp_print(netdissect_options *ndo,
const u_char *bp, u_int length, u_int caplen)
{
const struct arp_pkthdr *ap;
u_short pro, hrd, op, linkaddr;
ap = (const struct arp_pkthdr *)bp;
ND_TCHECK(*ap);
hrd = HRD(ap);
pro = PRO(ap);
op = OP(ap);
/* if its ATM then call the ATM ARP printer
for Frame-relay ARP most of the fields
are similar to Ethernet so overload the Ethernet Printer
and set the linkaddr type for linkaddr_string(ndo, ) accordingly */
switch(hrd) {
case ARPHRD_ATM2225:
atmarp_print(ndo, bp, length, caplen);
return;
case ARPHRD_FRELAY:
linkaddr = LINKADDR_FRELAY;
break;
default:
linkaddr = LINKADDR_ETHER;
break;
}
if (!ND_TTEST2(*ar_tpa(ap), PROTO_LEN(ap))) {
ND_PRINT((ndo, "%s", tstr));
ND_DEFAULTPRINT((const u_char *)ap, length);
return;
}
if (!ndo->ndo_eflag) {
ND_PRINT((ndo, "ARP, "));
}
/* print hardware type/len and proto type/len */
if ((pro != ETHERTYPE_IP && pro != ETHERTYPE_TRAIL) ||
PROTO_LEN(ap) != 4 ||
HRD_LEN(ap) == 0 ||
ndo->ndo_vflag) {
ND_PRINT((ndo, "%s (len %u), %s (len %u)",
tok2str(arphrd_values, "Unknown Hardware (%u)", hrd),
HRD_LEN(ap),
tok2str(ethertype_values, "Unknown Protocol (0x%04x)", pro),
PROTO_LEN(ap)));
/* don't know know about the address formats */
if (!ndo->ndo_vflag) {
goto out;
}
}
/* print operation */
ND_PRINT((ndo, "%s%s ",
ndo->ndo_vflag ? ", " : "",
tok2str(arpop_values, "Unknown (%u)", op)));
switch (op) {
case ARPOP_REQUEST:
ND_PRINT((ndo, "who-has %s", ipaddr_string(ndo, TPA(ap))));
if (isnonzero((const u_char *)THA(ap), HRD_LEN(ap)))
ND_PRINT((ndo, " (%s)",
linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap))));
ND_PRINT((ndo, " tell %s", ipaddr_string(ndo, SPA(ap))));
break;
case ARPOP_REPLY:
ND_PRINT((ndo, "%s is-at %s",
ipaddr_string(ndo, SPA(ap)),
linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
break;
case ARPOP_REVREQUEST:
ND_PRINT((ndo, "who-is %s tell %s",
linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap)),
linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
break;
case ARPOP_REVREPLY:
ND_PRINT((ndo, "%s at %s",
linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap)),
ipaddr_string(ndo, TPA(ap))));
break;
case ARPOP_INVREQUEST:
ND_PRINT((ndo, "who-is %s tell %s",
linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap)),
linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
break;
case ARPOP_INVREPLY:
ND_PRINT((ndo,"%s at %s",
linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap)),
ipaddr_string(ndo, SPA(ap))));
break;
default:
ND_DEFAULTPRINT((const u_char *)ap, caplen);
return;
}
out:
ND_PRINT((ndo, ", length %u", length));
return;
trunc:
ND_PRINT((ndo, "%s", tstr));
}
|
C
|
tcpdump
| 1 |
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_foreign_load_gif_render( VipsForeignLoadGif *gif )
{
GifFileType *file = gif->file;
/* Update the colour map for this frame.
*/
vips_foreign_load_gif_build_cmap( gif );
/* BACKGROUND means we reset the frame to 0 (transparent) before we
* render the next set of pixels.
*/
if( gif->dispose == DISPOSE_BACKGROUND )
memset( VIPS_IMAGE_ADDR( gif->frame, 0, 0 ), 0,
VIPS_IMAGE_SIZEOF_IMAGE( gif->frame ) );
/* PREVIOUS means we init the frame with the frame before last, ie. we
* undo the last render.
*
* Anything other than PREVIOUS, we must update the previous buffer,
*/
if( gif->dispose == DISPOSE_PREVIOUS )
memcpy( VIPS_IMAGE_ADDR( gif->frame, 0, 0 ),
VIPS_IMAGE_ADDR( gif->previous, 0, 0 ),
VIPS_IMAGE_SIZEOF_IMAGE( gif->frame ) );
else
memcpy( VIPS_IMAGE_ADDR( gif->previous, 0, 0 ),
VIPS_IMAGE_ADDR( gif->frame, 0, 0 ),
VIPS_IMAGE_SIZEOF_IMAGE( gif->frame ) );
if( file->Image.Interlace ) {
int i;
VIPS_DEBUG_MSG( "vips_foreign_load_gif_render: "
"interlaced frame of %d x %d pixels at %d x %d\n",
file->Image.Width, file->Image.Height,
file->Image.Left, file->Image.Top );
for( i = 0; i < 4; i++ ) {
int y;
for( y = InterlacedOffset[i];
y < file->Image.Height;
y += InterlacedJumps[i] ) {
VipsPel *q = VIPS_IMAGE_ADDR( gif->frame,
file->Image.Left, file->Image.Top + y );
if( DGifGetLine( gif->file, gif->line,
file->Image.Width ) == GIF_ERROR ) {
vips_foreign_load_gif_error( gif );
return( -1 );
}
vips_foreign_load_gif_render_line( gif,
file->Image.Width, q, gif->line );
}
}
}
else {
int y;
VIPS_DEBUG_MSG( "vips_foreign_load_gif_render: "
"non-interlaced frame of %d x %d pixels at %d x %d\n",
file->Image.Width, file->Image.Height,
file->Image.Left, file->Image.Top );
for( y = 0; y < file->Image.Height; y++ ) {
VipsPel *q = VIPS_IMAGE_ADDR( gif->frame,
file->Image.Left, file->Image.Top + y );
if( DGifGetLine( gif->file, gif->line,
file->Image.Width ) == GIF_ERROR ) {
vips_foreign_load_gif_error( gif );
return( -1 );
}
vips_foreign_load_gif_render_line( gif,
file->Image.Width, q, gif->line );
}
}
return( 0 );
}
|
vips_foreign_load_gif_render( VipsForeignLoadGif *gif )
{
GifFileType *file = gif->file;
/* Update the colour map for this frame.
*/
vips_foreign_load_gif_build_cmap( gif );
/* BACKGROUND means we reset the frame to 0 (transparent) before we
* render the next set of pixels.
*/
if( gif->dispose == DISPOSE_BACKGROUND )
memset( VIPS_IMAGE_ADDR( gif->frame, 0, 0 ), 0,
VIPS_IMAGE_SIZEOF_IMAGE( gif->frame ) );
/* PREVIOUS means we init the frame with the frame before last, ie. we
* undo the last render.
*
* Anything other than PREVIOUS, we must update the previous buffer,
*/
if( gif->dispose == DISPOSE_PREVIOUS )
memcpy( VIPS_IMAGE_ADDR( gif->frame, 0, 0 ),
VIPS_IMAGE_ADDR( gif->previous, 0, 0 ),
VIPS_IMAGE_SIZEOF_IMAGE( gif->frame ) );
else
memcpy( VIPS_IMAGE_ADDR( gif->previous, 0, 0 ),
VIPS_IMAGE_ADDR( gif->frame, 0, 0 ),
VIPS_IMAGE_SIZEOF_IMAGE( gif->frame ) );
if( file->Image.Interlace ) {
int i;
VIPS_DEBUG_MSG( "vips_foreign_load_gif_render: "
"interlaced frame of %d x %d pixels at %d x %d\n",
file->Image.Width, file->Image.Height,
file->Image.Left, file->Image.Top );
for( i = 0; i < 4; i++ ) {
int y;
for( y = InterlacedOffset[i];
y < file->Image.Height;
y += InterlacedJumps[i] ) {
VipsPel *q = VIPS_IMAGE_ADDR( gif->frame,
file->Image.Left, file->Image.Top + y );
if( DGifGetLine( gif->file, gif->line,
file->Image.Width ) == GIF_ERROR ) {
vips_foreign_load_gif_error( gif );
return( -1 );
}
vips_foreign_load_gif_render_line( gif,
file->Image.Width, q, gif->line );
}
}
}
else {
int y;
VIPS_DEBUG_MSG( "vips_foreign_load_gif_render: "
"non-interlaced frame of %d x %d pixels at %d x %d\n",
file->Image.Width, file->Image.Height,
file->Image.Left, file->Image.Top );
for( y = 0; y < file->Image.Height; y++ ) {
VipsPel *q = VIPS_IMAGE_ADDR( gif->frame,
file->Image.Left, file->Image.Top + y );
if( DGifGetLine( gif->file, gif->line,
file->Image.Width ) == GIF_ERROR ) {
vips_foreign_load_gif_error( gif );
return( -1 );
}
vips_foreign_load_gif_render_line( gif,
file->Image.Width, q, gif->line );
}
}
return( 0 );
}
|
C
|
libvips
| 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 <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
|
void lxc_free_array(void **array, lxc_free_fn element_free_fn)
{
void **p;
for (p = array; p && *p; p++)
element_free_fn(*p);
free((void*)array);
}
|
void lxc_free_array(void **array, lxc_free_fn element_free_fn)
{
void **p;
for (p = array; p && *p; p++)
element_free_fn(*p);
free((void*)array);
}
|
C
|
lxc
| 0 |
CVE-2017-18216
|
https://www.cvedetails.com/cve/CVE-2017-18216/
|
CWE-476
|
https://github.com/torvalds/linux/commit/853bc26a7ea39e354b9f8889ae7ad1492ffa28d2
|
853bc26a7ea39e354b9f8889ae7ad1492ffa28d2
|
ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent
The subsystem.su_mutex is required while accessing the item->ci_parent,
otherwise, NULL pointer dereference to the item->ci_parent will be
triggered in the following situation:
add node delete node
sys_write
vfs_write
configfs_write_file
o2nm_node_store
o2nm_node_local_write
do_rmdir
vfs_rmdir
configfs_rmdir
mutex_lock(&subsys->su_mutex);
unlink_obj
item->ci_group = NULL;
item->ci_parent = NULL;
to_o2nm_cluster_from_node
node->nd_item.ci_parent->ci_parent
BUG since of NULL pointer dereference to nd_item.ci_parent
Moreover, the o2nm_cluster also should be protected by the
subsystem.su_mutex.
[alex.chen@huawei.com: v2]
Link: http://lkml.kernel.org/r/59EEAA69.9080703@huawei.com
Link: http://lkml.kernel.org/r/59E9B36A.10700@huawei.com
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Jun Piao <piaojun@huawei.com>
Reviewed-by: Joseph Qi <jiangqi903@gmail.com>
Cc: Mark Fasheh <mfasheh@versity.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
struct o2nm_node *o2nm_get_node_by_ip(__be32 addr)
{
struct o2nm_node *node = NULL;
struct o2nm_cluster *cluster = o2nm_single_cluster;
if (cluster == NULL)
goto out;
read_lock(&cluster->cl_nodes_lock);
node = o2nm_node_ip_tree_lookup(cluster, addr, NULL, NULL);
if (node)
config_item_get(&node->nd_item);
read_unlock(&cluster->cl_nodes_lock);
out:
return node;
}
|
struct o2nm_node *o2nm_get_node_by_ip(__be32 addr)
{
struct o2nm_node *node = NULL;
struct o2nm_cluster *cluster = o2nm_single_cluster;
if (cluster == NULL)
goto out;
read_lock(&cluster->cl_nodes_lock);
node = o2nm_node_ip_tree_lookup(cluster, addr, NULL, NULL);
if (node)
config_item_get(&node->nd_item);
read_unlock(&cluster->cl_nodes_lock);
out:
return node;
}
|
C
|
linux
| 0 |
CVE-2011-2182
|
https://www.cvedetails.com/cve/CVE-2011-2182/
|
CWE-119
|
https://github.com/torvalds/linux/commit/cae13fe4cc3f24820ffb990c09110626837e85d4
|
cae13fe4cc3f24820ffb990c09110626837e85d4
|
Fix for buffer overflow in ldm_frag_add not sufficient
As Ben Hutchings discovered [1], the patch for CVE-2011-1017 (buffer
overflow in ldm_frag_add) is not sufficient. The original patch in
commit c340b1d64000 ("fs/partitions/ldm.c: fix oops caused by corrupted
partition table") does not consider that, for subsequent fragments,
previously allocated memory is used.
[1] http://lkml.org/lkml/2011/5/6/407
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Timo Warns <warns@pre-sense.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
static bool ldm_frag_commit (struct list_head *frags, struct ldmdb *ldb)
{
struct frag *f;
struct list_head *item;
BUG_ON (!frags || !ldb);
list_for_each (item, frags) {
f = list_entry (item, struct frag, list);
if (f->map != 0xFF) {
ldm_error ("VBLK group %d is incomplete (0x%02x).",
f->group, f->map);
return false;
}
if (!ldm_ldmdb_add (f->data, f->num*ldb->vm.vblk_size, ldb))
return false; /* Already logged */
}
return true;
}
|
static bool ldm_frag_commit (struct list_head *frags, struct ldmdb *ldb)
{
struct frag *f;
struct list_head *item;
BUG_ON (!frags || !ldb);
list_for_each (item, frags) {
f = list_entry (item, struct frag, list);
if (f->map != 0xFF) {
ldm_error ("VBLK group %d is incomplete (0x%02x).",
f->group, f->map);
return false;
}
if (!ldm_ldmdb_add (f->data, f->num*ldb->vm.vblk_size, ldb))
return false; /* Already logged */
}
return true;
}
|
C
|
linux
| 0 |
CVE-2016-1646
|
https://www.cvedetails.com/cve/CVE-2016-1646/
|
CWE-119
|
https://github.com/chromium/chromium/commit/84fbaf8414b4911ef122557d1518b50f79c2eaef
|
84fbaf8414b4911ef122557d1518b50f79c2eaef
|
OomIntervention opt-out should work properly with 'show original'
OomIntervention should not be re-triggered on the same page if the user declines the intervention once.
This CL fixes the bug.
Bug: 889131, 887119
Change-Id: Idb9eebb2bb9f79756b63f0e010fe018ba5c490e8
Reviewed-on: https://chromium-review.googlesource.com/1245019
Commit-Queue: Yuzu Saijo <yuzus@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594574}
|
void RecordInterventionStateOnCrash(bool accepted) {
UMA_HISTOGRAM_BOOLEAN(
"Memory.Experimental.OomIntervention.InterventionStateOnCrash", accepted);
}
|
void RecordInterventionStateOnCrash(bool accepted) {
UMA_HISTOGRAM_BOOLEAN(
"Memory.Experimental.OomIntervention.InterventionStateOnCrash", accepted);
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/77b498aa18e610ed8ac3863ae048573d4f943b16
|
77b498aa18e610ed8ac3863ae048573d4f943b16
|
Add CHECKs for file descriptors used in select() by InotifyReaderTask
Since these are used in an fd_set, there's the possibility that invalid file descriptors cause stack overflow/corruption.
BUG=chromium:105162
TEST=No functional changes, compiles and passes tests.
Review URL: http://codereview.chromium.org/8681006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111369 0039d316-1c4b-4281-b951-d872f2087c98
|
bool FilePathWatcherImpl::Watch(const FilePath& path,
FilePathWatcher::Delegate* delegate) {
DCHECK(target_.empty());
DCHECK(MessageLoopForIO::current());
set_message_loop(base::MessageLoopProxy::current());
delegate_ = delegate;
target_ = path;
MessageLoop::current()->AddDestructionObserver(this);
std::vector<FilePath::StringType> comps;
target_.GetComponents(&comps);
DCHECK(!comps.empty());
for (std::vector<FilePath::StringType>::const_iterator comp(++comps.begin());
comp != comps.end(); ++comp) {
watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch, *comp));
}
watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch,
FilePath::StringType()));
return UpdateWatches();
}
|
bool FilePathWatcherImpl::Watch(const FilePath& path,
FilePathWatcher::Delegate* delegate) {
DCHECK(target_.empty());
DCHECK(MessageLoopForIO::current());
set_message_loop(base::MessageLoopProxy::current());
delegate_ = delegate;
target_ = path;
MessageLoop::current()->AddDestructionObserver(this);
std::vector<FilePath::StringType> comps;
target_.GetComponents(&comps);
DCHECK(!comps.empty());
for (std::vector<FilePath::StringType>::const_iterator comp(++comps.begin());
comp != comps.end(); ++comp) {
watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch, *comp));
}
watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch,
FilePath::StringType()));
return UpdateWatches();
}
|
C
|
Chrome
| 0 |
CVE-2017-5039
|
https://www.cvedetails.com/cve/CVE-2017-5039/
|
CWE-416
|
https://github.com/chromium/chromium/commit/69b4b9ef7455753b12c3efe4eec71647e6fb1da1
|
69b4b9ef7455753b12c3efe4eec71647e6fb1da1
|
Disable all DRP URL fetches when holdback is enabled
Disable secure proxy checker, warmup url fetcher
and client config fetch when the client is in DRP
(Data Reduction Proxy) holdback.
This CL does not disable pingbacks when client is in the
holdback, but the pingback code is going away soon.
Change-Id: Icbb59d814d1452123869c609e0770d1439c1db51
Bug: 984964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1709965
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679649}
|
DataReductionProxyConfigServiceClient::DataReductionProxyConfigServiceClient(
const net::BackoffEntry::Policy& backoff_policy,
DataReductionProxyRequestOptions* request_options,
DataReductionProxyMutableConfigValues* config_values,
DataReductionProxyConfig* config,
DataReductionProxyIOData* io_data,
network::NetworkConnectionTracker* network_connection_tracker,
ConfigStorer config_storer)
: request_options_(request_options),
config_values_(config_values),
config_(config),
io_data_(io_data),
network_connection_tracker_(network_connection_tracker),
config_storer_(config_storer),
backoff_policy_(backoff_policy),
backoff_entry_(&backoff_policy_),
config_service_url_(util::AddApiKeyToUrl(params::GetConfigServiceURL())),
enabled_(false),
remote_config_applied_(false),
#if defined(OS_ANDROID)
foreground_fetch_pending_(false),
#endif
previous_request_failed_authentication_(false),
failed_attempts_before_success_(0),
fetch_in_progress_(false),
client_config_override_used_(false) {
DCHECK(request_options);
DCHECK(config_values);
DCHECK(config);
DCHECK(io_data);
DCHECK(config_service_url_.is_valid());
DCHECK(!params::IsIncludedInHoldbackFieldTrial());
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
client_config_override_ = command_line.GetSwitchValueASCII(
switches::kDataReductionProxyServerClientConfig);
thread_checker_.DetachFromThread();
}
|
DataReductionProxyConfigServiceClient::DataReductionProxyConfigServiceClient(
const net::BackoffEntry::Policy& backoff_policy,
DataReductionProxyRequestOptions* request_options,
DataReductionProxyMutableConfigValues* config_values,
DataReductionProxyConfig* config,
DataReductionProxyIOData* io_data,
network::NetworkConnectionTracker* network_connection_tracker,
ConfigStorer config_storer)
: request_options_(request_options),
config_values_(config_values),
config_(config),
io_data_(io_data),
network_connection_tracker_(network_connection_tracker),
config_storer_(config_storer),
backoff_policy_(backoff_policy),
backoff_entry_(&backoff_policy_),
config_service_url_(util::AddApiKeyToUrl(params::GetConfigServiceURL())),
enabled_(false),
remote_config_applied_(false),
#if defined(OS_ANDROID)
foreground_fetch_pending_(false),
#endif
previous_request_failed_authentication_(false),
failed_attempts_before_success_(0),
fetch_in_progress_(false),
client_config_override_used_(false) {
DCHECK(request_options);
DCHECK(config_values);
DCHECK(config);
DCHECK(io_data);
DCHECK(config_service_url_.is_valid());
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
client_config_override_ = command_line.GetSwitchValueASCII(
switches::kDataReductionProxyServerClientConfig);
thread_checker_.DetachFromThread();
}
|
C
|
Chrome
| 1 |
CVE-2013-0828
|
https://www.cvedetails.com/cve/CVE-2013-0828/
|
CWE-399
|
https://github.com/chromium/chromium/commit/4d17163f4b66be517dc49019a029e5ddbd45078c
|
4d17163f4b66be517dc49019a029e5ddbd45078c
|
Remove the Simple Default Stylesheet, it's just a foot-gun.
We've been bitten by the Simple Default Stylesheet being out
of sync with the real html.css twice this week.
The Simple Default Stylesheet was invented years ago for Mac:
http://trac.webkit.org/changeset/36135
It nicely handles the case where you just want to create
a single WebView and parse some simple HTML either without
styling said HTML, or only to display a small string, etc.
Note that this optimization/complexity *only* helps for the
very first document, since the default stylesheets are
all static (process-global) variables. Since any real page
on the internet uses a tag not covered by the simple default
stylesheet, not real load benefits from this optimization.
Only uses of WebView which were just rendering small bits
of text might have benefited from this. about:blank would
also have used this sheet.
This was a common application for some uses of WebView back
in those days. These days, even with WebView on Android,
there are likely much larger overheads than parsing the
html.css stylesheet, so making it required seems like the
right tradeoff of code-simplicity for this case.
BUG=319556
Review URL: https://codereview.chromium.org/73723005
git-svn-id: svn://svn.chromium.org/blink/trunk@162153 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void StyleResolver::fontsNeedUpdate(FontSelector* fontSelector)
{
invalidateMatchedPropertiesCache();
m_document.setNeedsStyleRecalc();
}
|
void StyleResolver::fontsNeedUpdate(FontSelector* fontSelector)
{
invalidateMatchedPropertiesCache();
m_document.setNeedsStyleRecalc();
}
|
C
|
Chrome
| 0 |
CVE-2016-1641
|
https://www.cvedetails.com/cve/CVE-2016-1641/
| null |
https://github.com/chromium/chromium/commit/75ca8ffd7bd7c58ace1144df05e1307d8d707662
|
75ca8ffd7bd7c58ace1144df05e1307d8d707662
|
Don't call WebContents::DownloadImage() callback if the WebContents were deleted
BUG=583718
Review URL: https://codereview.chromium.org/1685343004
Cr-Commit-Position: refs/heads/master@{#375700}
|
void WebContentsImpl::OnFrameRemoved(RenderFrameHost* render_frame_host) {
FOR_EACH_OBSERVER(
WebContentsObserver, observers_, FrameDeleted(render_frame_host));
}
|
void WebContentsImpl::OnFrameRemoved(RenderFrameHost* render_frame_host) {
FOR_EACH_OBSERVER(
WebContentsObserver, observers_, FrameDeleted(render_frame_host));
}
|
C
|
Chrome
| 0 |
CVE-2016-3699
|
https://www.cvedetails.com/cve/CVE-2016-3699/
|
CWE-264
|
https://github.com/mjg59/linux/commit/a4a5ed2835e8ea042868b7401dced3f517cafa76
|
a4a5ed2835e8ea042868b7401dced3f517cafa76
|
acpi: Disable ACPI table override if securelevel is set
From the kernel documentation (initrd_table_override.txt):
If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible
to override nearly any ACPI table provided by the BIOS with an
instrumented, modified one.
When securelevel is set, the kernel should disallow any unauthenticated
changes to kernel space. ACPI tables contain code invoked by the kernel, so
do not allow ACPI tables to be overridden if securelevel is set.
Signed-off-by: Linn Crosetto <linn@hpe.com>
|
static void __init reserve_initrd(void)
{
/* Assume only end is not page aligned */
u64 ramdisk_image = get_ramdisk_image();
u64 ramdisk_size = get_ramdisk_size();
u64 ramdisk_end = PAGE_ALIGN(ramdisk_image + ramdisk_size);
u64 mapped_size;
if (!boot_params.hdr.type_of_loader ||
!ramdisk_image || !ramdisk_size)
return; /* No initrd provided by bootloader */
initrd_start = 0;
mapped_size = memblock_mem_size(max_pfn_mapped);
if (ramdisk_size >= (mapped_size>>1))
panic("initrd too large to handle, "
"disabling initrd (%lld needed, %lld available)\n",
ramdisk_size, mapped_size>>1);
printk(KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n", ramdisk_image,
ramdisk_end - 1);
if (pfn_range_is_mapped(PFN_DOWN(ramdisk_image),
PFN_DOWN(ramdisk_end))) {
/* All are mapped, easy case */
initrd_start = ramdisk_image + PAGE_OFFSET;
initrd_end = initrd_start + ramdisk_size;
return;
}
relocate_initrd();
memblock_free(ramdisk_image, ramdisk_end - ramdisk_image);
}
|
static void __init reserve_initrd(void)
{
/* Assume only end is not page aligned */
u64 ramdisk_image = get_ramdisk_image();
u64 ramdisk_size = get_ramdisk_size();
u64 ramdisk_end = PAGE_ALIGN(ramdisk_image + ramdisk_size);
u64 mapped_size;
if (!boot_params.hdr.type_of_loader ||
!ramdisk_image || !ramdisk_size)
return; /* No initrd provided by bootloader */
initrd_start = 0;
mapped_size = memblock_mem_size(max_pfn_mapped);
if (ramdisk_size >= (mapped_size>>1))
panic("initrd too large to handle, "
"disabling initrd (%lld needed, %lld available)\n",
ramdisk_size, mapped_size>>1);
printk(KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n", ramdisk_image,
ramdisk_end - 1);
if (pfn_range_is_mapped(PFN_DOWN(ramdisk_image),
PFN_DOWN(ramdisk_end))) {
/* All are mapped, easy case */
initrd_start = ramdisk_image + PAGE_OFFSET;
initrd_end = initrd_start + ramdisk_size;
return;
}
relocate_initrd();
memblock_free(ramdisk_image, ramdisk_end - ramdisk_image);
}
|
C
|
linux
| 0 |
CVE-2016-5358
|
https://www.cvedetails.com/cve/CVE-2016-5358/
|
CWE-20
|
https://github.com/wireshark/wireshark/commit/2c13e97d656c1c0ac4d76eb9d307664aae0e0cf7
|
2c13e97d656c1c0ac4d76eb9d307664aae0e0cf7
|
The WTAP_ENCAP_ETHERNET dissector needs to be passed a struct eth_phdr.
We now require that. Make it so.
Bug: 12440
Change-Id: Iffee520976b013800699bde3c6092a3e86be0d76
Reviewed-on: https://code.wireshark.org/review/15424
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
get_rpcap_pdu_len (packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
{
return tvb_get_ntohl (tvb, offset + 4) + 8;
}
|
get_rpcap_pdu_len (packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
{
return tvb_get_ntohl (tvb, offset + 4) + 8;
}
|
C
|
wireshark
| 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
|
sec_out_mcs_connect_initial_pdu(STREAM s, uint32 selected_protocol)
{
int length = 162 + 76 + 12 + 4 + (g_dpi > 0 ? 18 : 0);
unsigned int i;
uint32 rdpversion = RDP_40;
uint16 capflags = RNS_UD_CS_SUPPORT_ERRINFO_PDU;
uint16 colorsupport = RNS_UD_24BPP_SUPPORT | RNS_UD_16BPP_SUPPORT | RNS_UD_32BPP_SUPPORT;
uint32 physwidth, physheight, desktopscale, devicescale;
logger(Protocol, Debug, "%s()", __func__);
if (g_rdp_version >= RDP_V5)
rdpversion = RDP_50;
if (g_num_channels > 0)
length += g_num_channels * 12 + 8;
/* Generic Conference Control (T.124) ConferenceCreateRequest */
out_uint16_be(s, 5);
out_uint16_be(s, 0x14);
out_uint8(s, 0x7c);
out_uint16_be(s, 1);
out_uint16_be(s, (length | 0x8000)); /* remaining length */
out_uint16_be(s, 8); /* length? */
out_uint16_be(s, 16);
out_uint8(s, 0);
out_uint16_le(s, 0xc001);
out_uint8(s, 0);
out_uint32_le(s, 0x61637544); /* OEM ID: "Duca", as in Ducati. */
out_uint16_be(s, ((length - 14) | 0x8000)); /* remaining length */
/* Client information (TS_UD_CS_CORE) */
out_uint16_le(s, CS_CORE); /* type */
out_uint16_le(s, 216 + (g_dpi > 0 ? 18 : 0)); /* length */
out_uint32_le(s, rdpversion); /* version */
out_uint16_le(s, g_requested_session_width); /* desktopWidth */
out_uint16_le(s, g_requested_session_height); /* desktopHeight */
out_uint16_le(s, RNS_UD_COLOR_8BPP); /* colorDepth */
out_uint16_le(s, RNS_UD_SAS_DEL); /* SASSequence */
out_uint32_le(s, g_keylayout); /* keyboardLayout */
out_uint32_le(s, 2600); /* Client build. We are now 2600 compatible :-) */
/* Unicode name of client, padded to 32 bytes */
out_utf16s_padded(s, g_hostname, 32, 0x00);
out_uint32_le(s, g_keyboard_type); /* keyboardType */
out_uint32_le(s, g_keyboard_subtype); /* keyboardSubtype */
out_uint32_le(s, g_keyboard_functionkeys); /* keyboardFunctionKey */
out_uint8s(s, 64); /* imeFileName */
out_uint16_le(s, RNS_UD_COLOR_8BPP); /* postBeta2ColorDepth (overrides colorDepth) */
out_uint16_le(s, 1); /* clientProductId (should be 1) */
out_uint32_le(s, 0); /* serialNumber (should be 0) */
/* highColorDepth (overrides postBeta2ColorDepth). Capped at 24BPP.
To get 32BPP sessions, we need to set a capability flag. */
out_uint16_le(s, MIN(g_server_depth, 24));
if (g_server_depth == 32)
capflags |= RNS_UD_CS_WANT_32BPP_SESSION;
out_uint16_le(s, colorsupport); /* supportedColorDepths */
out_uint16_le(s, capflags); /* earlyCapabilityFlags */
out_uint8s(s, 64); /* clientDigProductId */
out_uint8(s, 0); /* connectionType */
out_uint8(s, 0); /* pad */
out_uint32_le(s, selected_protocol); /* serverSelectedProtocol */
if (g_dpi > 0)
{
/* Extended client info describing monitor geometry */
utils_calculate_dpi_scale_factors(g_requested_session_width,
g_requested_session_height, g_dpi, &physwidth,
&physheight, &desktopscale, &devicescale);
out_uint32_le(s, physwidth); /* physicalwidth */
out_uint32_le(s, physheight); /* physicalheight */
out_uint16_le(s, ORIENTATION_LANDSCAPE); /* Orientation */
out_uint32_le(s, desktopscale); /* DesktopScaleFactor */
out_uint32_le(s, devicescale); /* DeviceScaleFactor */
}
/* Write a Client Cluster Data (TS_UD_CS_CLUSTER) */
uint32 cluster_flags = 0;
out_uint16_le(s, CS_CLUSTER); /* header.type */
out_uint16_le(s, 12); /* length */
cluster_flags |= SEC_CC_REDIRECTION_SUPPORTED;
cluster_flags |= (SEC_CC_REDIRECT_VERSION_3 << 2);
if (g_console_session || g_redirect_session_id != 0)
cluster_flags |= SEC_CC_REDIRECT_SESSIONID_FIELD_VALID;
out_uint32_le(s, cluster_flags);
out_uint32(s, g_redirect_session_id);
/* Client encryption settings (TS_UD_CS_SEC) */
out_uint16_le(s, CS_SECURITY); /* type */
out_uint16_le(s, 12); /* length */
out_uint32_le(s, g_encryption ? 0x3 : 0); /* encryptionMethods */
out_uint32(s, 0); /* extEncryptionMethods */
/* Channel definitions (TS_UD_CS_NET) */
logger(Protocol, Debug, "sec_out_mcs_data(), g_num_channels is %d", g_num_channels);
if (g_num_channels > 0)
{
out_uint16_le(s, CS_NET); /* type */
out_uint16_le(s, g_num_channels * 12 + 8); /* length */
out_uint32_le(s, g_num_channels); /* number of virtual channels */
for (i = 0; i < g_num_channels; i++)
{
logger(Protocol, Debug, "sec_out_mcs_data(), requesting channel %s",
g_channels[i].name);
out_uint8a(s, g_channels[i].name, 8);
out_uint32_be(s, g_channels[i].flags);
}
}
s_mark_end(s);
}
|
sec_out_mcs_connect_initial_pdu(STREAM s, uint32 selected_protocol)
{
int length = 162 + 76 + 12 + 4 + (g_dpi > 0 ? 18 : 0);
unsigned int i;
uint32 rdpversion = RDP_40;
uint16 capflags = RNS_UD_CS_SUPPORT_ERRINFO_PDU;
uint16 colorsupport = RNS_UD_24BPP_SUPPORT | RNS_UD_16BPP_SUPPORT | RNS_UD_32BPP_SUPPORT;
uint32 physwidth, physheight, desktopscale, devicescale;
logger(Protocol, Debug, "%s()", __func__);
if (g_rdp_version >= RDP_V5)
rdpversion = RDP_50;
if (g_num_channels > 0)
length += g_num_channels * 12 + 8;
/* Generic Conference Control (T.124) ConferenceCreateRequest */
out_uint16_be(s, 5);
out_uint16_be(s, 0x14);
out_uint8(s, 0x7c);
out_uint16_be(s, 1);
out_uint16_be(s, (length | 0x8000)); /* remaining length */
out_uint16_be(s, 8); /* length? */
out_uint16_be(s, 16);
out_uint8(s, 0);
out_uint16_le(s, 0xc001);
out_uint8(s, 0);
out_uint32_le(s, 0x61637544); /* OEM ID: "Duca", as in Ducati. */
out_uint16_be(s, ((length - 14) | 0x8000)); /* remaining length */
/* Client information (TS_UD_CS_CORE) */
out_uint16_le(s, CS_CORE); /* type */
out_uint16_le(s, 216 + (g_dpi > 0 ? 18 : 0)); /* length */
out_uint32_le(s, rdpversion); /* version */
out_uint16_le(s, g_requested_session_width); /* desktopWidth */
out_uint16_le(s, g_requested_session_height); /* desktopHeight */
out_uint16_le(s, RNS_UD_COLOR_8BPP); /* colorDepth */
out_uint16_le(s, RNS_UD_SAS_DEL); /* SASSequence */
out_uint32_le(s, g_keylayout); /* keyboardLayout */
out_uint32_le(s, 2600); /* Client build. We are now 2600 compatible :-) */
/* Unicode name of client, padded to 32 bytes */
out_utf16s_padded(s, g_hostname, 32, 0x00);
out_uint32_le(s, g_keyboard_type); /* keyboardType */
out_uint32_le(s, g_keyboard_subtype); /* keyboardSubtype */
out_uint32_le(s, g_keyboard_functionkeys); /* keyboardFunctionKey */
out_uint8s(s, 64); /* imeFileName */
out_uint16_le(s, RNS_UD_COLOR_8BPP); /* postBeta2ColorDepth (overrides colorDepth) */
out_uint16_le(s, 1); /* clientProductId (should be 1) */
out_uint32_le(s, 0); /* serialNumber (should be 0) */
/* highColorDepth (overrides postBeta2ColorDepth). Capped at 24BPP.
To get 32BPP sessions, we need to set a capability flag. */
out_uint16_le(s, MIN(g_server_depth, 24));
if (g_server_depth == 32)
capflags |= RNS_UD_CS_WANT_32BPP_SESSION;
out_uint16_le(s, colorsupport); /* supportedColorDepths */
out_uint16_le(s, capflags); /* earlyCapabilityFlags */
out_uint8s(s, 64); /* clientDigProductId */
out_uint8(s, 0); /* connectionType */
out_uint8(s, 0); /* pad */
out_uint32_le(s, selected_protocol); /* serverSelectedProtocol */
if (g_dpi > 0)
{
/* Extended client info describing monitor geometry */
utils_calculate_dpi_scale_factors(g_requested_session_width,
g_requested_session_height, g_dpi, &physwidth,
&physheight, &desktopscale, &devicescale);
out_uint32_le(s, physwidth); /* physicalwidth */
out_uint32_le(s, physheight); /* physicalheight */
out_uint16_le(s, ORIENTATION_LANDSCAPE); /* Orientation */
out_uint32_le(s, desktopscale); /* DesktopScaleFactor */
out_uint32_le(s, devicescale); /* DeviceScaleFactor */
}
/* Write a Client Cluster Data (TS_UD_CS_CLUSTER) */
uint32 cluster_flags = 0;
out_uint16_le(s, CS_CLUSTER); /* header.type */
out_uint16_le(s, 12); /* length */
cluster_flags |= SEC_CC_REDIRECTION_SUPPORTED;
cluster_flags |= (SEC_CC_REDIRECT_VERSION_3 << 2);
if (g_console_session || g_redirect_session_id != 0)
cluster_flags |= SEC_CC_REDIRECT_SESSIONID_FIELD_VALID;
out_uint32_le(s, cluster_flags);
out_uint32(s, g_redirect_session_id);
/* Client encryption settings (TS_UD_CS_SEC) */
out_uint16_le(s, CS_SECURITY); /* type */
out_uint16_le(s, 12); /* length */
out_uint32_le(s, g_encryption ? 0x3 : 0); /* encryptionMethods */
out_uint32(s, 0); /* extEncryptionMethods */
/* Channel definitions (TS_UD_CS_NET) */
logger(Protocol, Debug, "sec_out_mcs_data(), g_num_channels is %d", g_num_channels);
if (g_num_channels > 0)
{
out_uint16_le(s, CS_NET); /* type */
out_uint16_le(s, g_num_channels * 12 + 8); /* length */
out_uint32_le(s, g_num_channels); /* number of virtual channels */
for (i = 0; i < g_num_channels; i++)
{
logger(Protocol, Debug, "sec_out_mcs_data(), requesting channel %s",
g_channels[i].name);
out_uint8a(s, g_channels[i].name, 8);
out_uint32_be(s, g_channels[i].flags);
}
}
s_mark_end(s);
}
|
C
|
rdesktop
| 0 |
CVE-2017-6991
|
https://www.cvedetails.com/cve/CVE-2017-6991/
|
CWE-119
|
https://github.com/chromium/chromium/commit/3bfe67c9c4b45eb713326aae7a67c8f7390dae08
|
3bfe67c9c4b45eb713326aae7a67c8f7390dae08
|
sqlite: safely move pointer values through SQL.
This lands https://www.sqlite.org/src/timeline?c=d6a44b35 in
third_party/sqlite/src/ and
third_party/sqlite/patches/0013-Add-new-interfaces-sqlite3_bind_pointer-sqlite3_resu.patch
and re-generates third_party/sqlite/amalgamation/* using the script at
third_party/sqlite/google_generate_amalgamation.sh.
The CL also adds a layout test that verifies the patch works as intended.
BUG=742407
Change-Id: I2e1a457459cd2e975e6241b630e7b79c82545981
Reviewed-on: https://chromium-review.googlesource.com/572976
Reviewed-by: Chris Mumford <cmumford@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487275}
|
static int AdjustTree(
Rtree *pRtree, /* Rtree table */
RtreeNode *pNode, /* Adjust ancestry of this node. */
RtreeCell *pCell /* This cell was just inserted */
){
RtreeNode *p = pNode;
while( p->pParent ){
RtreeNode *pParent = p->pParent;
RtreeCell cell;
int iCell;
if( nodeParentIndex(pRtree, p, &iCell) ){
return SQLITE_CORRUPT_VTAB;
}
nodeGetCell(pRtree, pParent, iCell, &cell);
if( !cellContains(pRtree, &cell, pCell) ){
cellUnion(pRtree, &cell, pCell);
nodeOverwriteCell(pRtree, pParent, &cell, iCell);
}
p = pParent;
}
return SQLITE_OK;
}
|
static int AdjustTree(
Rtree *pRtree, /* Rtree table */
RtreeNode *pNode, /* Adjust ancestry of this node. */
RtreeCell *pCell /* This cell was just inserted */
){
RtreeNode *p = pNode;
while( p->pParent ){
RtreeNode *pParent = p->pParent;
RtreeCell cell;
int iCell;
if( nodeParentIndex(pRtree, p, &iCell) ){
return SQLITE_CORRUPT_VTAB;
}
nodeGetCell(pRtree, pParent, iCell, &cell);
if( !cellContains(pRtree, &cell, pCell) ){
cellUnion(pRtree, &cell, pCell);
nodeOverwriteCell(pRtree, pParent, &cell, iCell);
}
p = pParent;
}
return SQLITE_OK;
}
|
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 <kbr@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657568}
|
bool GLES2DecoderImpl::DoBindOrCopyTexImageIfNeeded(Texture* texture,
GLenum textarget,
GLuint texture_unit) {
if (texture && !texture->IsAttachedToFramebuffer()) {
Texture::ImageState image_state;
gl::GLImage* image = texture->GetLevelImage(textarget, 0, &image_state);
if (image && image_state == Texture::UNBOUND) {
ScopedGLErrorSuppressor suppressor(
"GLES2DecoderImpl::DoBindOrCopyTexImageIfNeeded", error_state_.get());
if (texture_unit)
api()->glActiveTextureFn(texture_unit);
api()->glBindTextureFn(textarget, texture->service_id());
if (image->ShouldBindOrCopy() == gl::GLImage::BIND) {
bool rv = image->BindTexImage(textarget);
DCHECK(rv) << "BindTexImage() failed";
image_state = Texture::BOUND;
} else {
DoCopyTexImage(texture, textarget, image);
}
if (!texture_unit) {
RestoreCurrentTextureBindings(&state_, textarget,
state_.active_texture_unit);
return false;
}
return true;
}
}
return false;
}
|
bool GLES2DecoderImpl::DoBindOrCopyTexImageIfNeeded(Texture* texture,
GLenum textarget,
GLuint texture_unit) {
if (texture && !texture->IsAttachedToFramebuffer()) {
Texture::ImageState image_state;
gl::GLImage* image = texture->GetLevelImage(textarget, 0, &image_state);
if (image && image_state == Texture::UNBOUND) {
ScopedGLErrorSuppressor suppressor(
"GLES2DecoderImpl::DoBindOrCopyTexImageIfNeeded", error_state_.get());
if (texture_unit)
api()->glActiveTextureFn(texture_unit);
api()->glBindTextureFn(textarget, texture->service_id());
if (image->ShouldBindOrCopy() == gl::GLImage::BIND) {
bool rv = image->BindTexImage(textarget);
DCHECK(rv) << "BindTexImage() failed";
image_state = Texture::BOUND;
} else {
DoCopyTexImage(texture, textarget, image);
}
if (!texture_unit) {
RestoreCurrentTextureBindings(&state_, textarget,
state_.active_texture_unit);
return false;
}
return true;
}
}
return false;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/6834289784ed45b5524de0fb7ef43ae283b0d6d3
|
6834289784ed45b5524de0fb7ef43ae283b0d6d3
|
Output silence if the MediaElementAudioSourceNode has a different origin
See http://webaudio.github.io/web-audio-api/#security-with-mediaelementaudiosourcenode-and-cross-origin-resources
Two new tests added for the same origin and a cross origin source.
BUG=313939
Review URL: https://codereview.chromium.org/520433002
git-svn-id: svn://svn.chromium.org/blink/trunk@189527 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
bool AudioContext::tryLock()
{
ASSERT(isAudioThread());
if (!isAudioThread()) {
lock();
return true;
}
return m_contextGraphMutex.tryLock();
}
|
bool AudioContext::tryLock()
{
ASSERT(isAudioThread());
if (!isAudioThread()) {
lock();
return true;
}
return m_contextGraphMutex.tryLock();
}
|
C
|
Chrome
| 0 |
CVE-2013-2220
|
https://www.cvedetails.com/cve/CVE-2013-2220/
|
CWE-119
|
https://github.com/LawnGnome/php-radius/commit/13c149b051f82b709e8d7cc32111e84b49d57234
|
13c149b051f82b709e8d7cc32111e84b49d57234
|
Fix a security issue in radius_get_vendor_attr().
The underlying rad_get_vendor_attr() function assumed that it would always be
given valid VSA data. Indeed, the buffer length wasn't even passed in; the
assumption was that the length field within the VSA structure would be valid.
This could result in denial of service by providing a length that would be
beyond the memory limit, or potential arbitrary memory access by providing a
length greater than the actual data given.
rad_get_vendor_attr() has been changed to require the raw data length be
provided, and this is then used to check that the VSA is valid.
Conflicts:
radlib_vs.h
|
rad_open(void)
{
return rad_auth_open();
}
|
rad_open(void)
{
return rad_auth_open();
}
|
C
|
php-radius
| 0 |
CVE-2017-5077
|
https://www.cvedetails.com/cve/CVE-2017-5077/
|
CWE-125
|
https://github.com/chromium/chromium/commit/fec26ff33bf372476a70326f3669a35f34a9d474
|
fec26ff33bf372476a70326f3669a35f34a9d474
|
Origins should be represented as url::Origin (not as GURL).
As pointed out in //docs/security/origin-vs-url.md, origins should be
represented as url::Origin (not as GURL). This CL applies this
guideline to predictor-related code and changes the type of the
following fields from GURL to url::Origin:
- OriginRequestSummary::origin
- PreconnectedRequestStats::origin
- PreconnectRequest::origin
The old code did not depend on any non-origin parts of GURL
(like path and/or query). Therefore, this CL has no intended
behavior change.
Bug: 973885
Change-Id: Idd14590b4834cb9d50c74ed747b595fe1a4ba357
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895167
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716311}
|
void PreconnectManager::StartPreconnectUrl(
const GURL& url,
bool allow_credentials,
net::NetworkIsolationKey network_isolation_key) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!url.SchemeIsHTTPOrHTTPS())
return;
PreresolveJobId job_id = preresolve_jobs_.Add(std::make_unique<PreresolveJob>(
url.GetOrigin(), 1, allow_credentials, std::move(network_isolation_key),
nullptr));
queued_jobs_.push_front(job_id);
TryToLaunchPreresolveJobs();
}
|
void PreconnectManager::StartPreconnectUrl(
const GURL& url,
bool allow_credentials,
net::NetworkIsolationKey network_isolation_key) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!url.SchemeIsHTTPOrHTTPS())
return;
PreresolveJobId job_id = preresolve_jobs_.Add(std::make_unique<PreresolveJob>(
url.GetOrigin(), 1, allow_credentials, std::move(network_isolation_key),
nullptr));
queued_jobs_.push_front(job_id);
TryToLaunchPreresolveJobs();
}
|
C
|
Chrome
| 0 |
CVE-2014-3185
|
https://www.cvedetails.com/cve/CVE-2014-3185/
|
CWE-119
|
https://github.com/torvalds/linux/commit/6817ae225cd650fb1c3295d769298c38b1eba818
|
6817ae225cd650fb1c3295d769298c38b1eba818
|
USB: whiteheat: Added bounds checking for bulk command response
This patch fixes a potential security issue in the whiteheat USB driver
which might allow a local attacker to cause kernel memory corrpution. This
is due to an unchecked memcpy into a fixed size buffer (of 64 bytes). On
EHCI and XHCI busses it's possible to craft responses greater than 64
bytes leading a buffer overflow.
Signed-off-by: James Forshaw <forshaw@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
static int whiteheat_firmware_download(struct usb_serial *serial,
const struct usb_device_id *id)
{
int response;
response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat_loader.fw");
if (response >= 0) {
response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat.fw");
if (response >= 0)
return 0;
}
return -ENOENT;
}
|
static int whiteheat_firmware_download(struct usb_serial *serial,
const struct usb_device_id *id)
{
int response;
response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat_loader.fw");
if (response >= 0) {
response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat.fw");
if (response >= 0)
return 0;
}
return -ENOENT;
}
|
C
|
linux
| 0 |
Subsets and Splits
CWE-119 Function Changes
This query retrieves specific examples (before and after code changes) of vulnerabilities with CWE-119, providing basic filtering but limited insight.
Vulnerable Code with CWE IDs
The query filters and combines records from multiple datasets to list specific vulnerability details, providing a basic overview of vulnerable functions but lacking deeper insights.
Vulnerable Functions in BigVul
Retrieves details of vulnerable functions from both validation and test datasets where vulnerabilities are present, providing a basic set of data points for further analysis.
Vulnerable Code Functions
This query filters and shows raw data for vulnerable functions, which provides basic insight into specific vulnerabilities but lacks broader analytical value.
Top 100 Vulnerable Functions
Retrieves 100 samples of vulnerabilities from the training dataset, showing the CVE ID, CWE ID, and code changes before and after the vulnerability, which is a basic filtering of vulnerability data.