CVE ID
stringlengths 13
43
⌀ | CVE Page
stringlengths 45
48
⌀ | CWE ID
stringclasses 90
values | codeLink
stringlengths 46
139
| commit_id
stringlengths 6
81
| commit_message
stringlengths 3
13.3k
⌀ | func_after
stringlengths 14
241k
| func_before
stringlengths 14
241k
| lang
stringclasses 3
values | project
stringclasses 309
values | vul
int8 0
1
|
---|---|---|---|---|---|---|---|---|---|---|
CVE-2011-2859
|
https://www.cvedetails.com/cve/CVE-2011-2859/
|
CWE-264
|
https://github.com/chromium/chromium/commit/454434f6100cb6a529652a25b5fc181caa7c7f32
|
454434f6100cb6a529652a25b5fc181caa7c7f32
|
Limit extent of webstore app to just chrome.google.com/webstore.
BUG=93497
TEST=Try installing extensions and apps from the webstore, starting both being
initially logged in, and not.
Review URL: http://codereview.chromium.org/7719003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97986 0039d316-1c4b-4281-b951-d872f2087c98
|
void ExtensionService::LoadComponentExtensions() {
for (RegisteredComponentExtensions::iterator it =
component_extension_manifests_.begin();
it != component_extension_manifests_.end(); ++it) {
LoadComponentExtension(*it);
}
}
|
void ExtensionService::LoadComponentExtensions() {
for (RegisteredComponentExtensions::iterator it =
component_extension_manifests_.begin();
it != component_extension_manifests_.end(); ++it) {
LoadComponentExtension(*it);
}
}
|
C
|
Chrome
| 0 |
CVE-2017-10807
|
https://www.cvedetails.com/cve/CVE-2017-10807/
|
CWE-287
|
https://github.com/jabberd2/jabberd2/commit/8416ae54ecefa670534f27a31db71d048b9c7f16
|
8416ae54ecefa670534f27a31db71d048b9c7f16
|
Fixed offered SASL mechanism check
|
int sx_sasl_init(sx_env_t env, sx_plugin_t p, va_list args) {
const char *appname;
sx_sasl_callback_t cb;
void *cbarg;
_sx_sasl_t ctx;
int ret, i;
_sx_debug(ZONE, "initialising sasl plugin");
appname = va_arg(args, const char *);
if(appname == NULL) {
_sx_debug(ZONE, "appname was NULL, failing");
return 1;
}
cb = va_arg(args, sx_sasl_callback_t);
cbarg = va_arg(args, void *);
ctx = (_sx_sasl_t) calloc(1, sizeof(struct _sx_sasl_st));
ctx->appname = strdup(appname);
ctx->cb = cb;
ctx->cbarg = cbarg;
for (i = 0; i < SX_CONN_EXTERNAL_ID_MAX_COUNT; i++)
ctx->ext_id[i] = NULL;
ret = gsasl_init(&ctx->gsasl_ctx);
if(ret != GSASL_OK) {
_sx_debug(ZONE, "couldn't initialize libgsasl (%d): %s", ret, gsasl_strerror (ret));
free(ctx);
return 1;
}
gsasl_callback_set (ctx->gsasl_ctx, &_sx_sasl_gsasl_callback);
_sx_debug(ZONE, "sasl context initialised");
p->private = (void *) ctx;
p->unload = _sx_sasl_unload;
p->wio = _sx_sasl_wio;
p->rio = _sx_sasl_rio;
p->stream = _sx_sasl_stream;
p->features = _sx_sasl_features;
p->process = _sx_sasl_process;
p->free = _sx_sasl_free;
return 0;
}
|
int sx_sasl_init(sx_env_t env, sx_plugin_t p, va_list args) {
const char *appname;
sx_sasl_callback_t cb;
void *cbarg;
_sx_sasl_t ctx;
int ret, i;
_sx_debug(ZONE, "initialising sasl plugin");
appname = va_arg(args, const char *);
if(appname == NULL) {
_sx_debug(ZONE, "appname was NULL, failing");
return 1;
}
cb = va_arg(args, sx_sasl_callback_t);
cbarg = va_arg(args, void *);
ctx = (_sx_sasl_t) calloc(1, sizeof(struct _sx_sasl_st));
ctx->appname = strdup(appname);
ctx->cb = cb;
ctx->cbarg = cbarg;
for (i = 0; i < SX_CONN_EXTERNAL_ID_MAX_COUNT; i++)
ctx->ext_id[i] = NULL;
ret = gsasl_init(&ctx->gsasl_ctx);
if(ret != GSASL_OK) {
_sx_debug(ZONE, "couldn't initialize libgsasl (%d): %s", ret, gsasl_strerror (ret));
free(ctx);
return 1;
}
gsasl_callback_set (ctx->gsasl_ctx, &_sx_sasl_gsasl_callback);
_sx_debug(ZONE, "sasl context initialised");
p->private = (void *) ctx;
p->unload = _sx_sasl_unload;
p->wio = _sx_sasl_wio;
p->rio = _sx_sasl_rio;
p->stream = _sx_sasl_stream;
p->features = _sx_sasl_features;
p->process = _sx_sasl_process;
p->free = _sx_sasl_free;
return 0;
}
|
C
|
jabberd2
| 0 |
CVE-2015-1229
|
https://www.cvedetails.com/cve/CVE-2015-1229/
|
CWE-19
|
https://github.com/chromium/chromium/commit/7933c117fd16b192e70609c331641e9112af5e42
|
7933c117fd16b192e70609c331641e9112af5e42
|
Sanitize headers in Proxy Authentication Required responses
BUG=431504
Review URL: https://codereview.chromium.org/769043003
Cr-Commit-Position: refs/heads/master@{#310014}
|
int HttpProxyClientSocket::Connect(const CompletionCallback& callback) {
DCHECK(transport_.get());
DCHECK(transport_->socket());
DCHECK(user_callback_.is_null());
if (using_spdy_ || !tunnel_)
next_state_ = STATE_DONE;
if (next_state_ == STATE_DONE)
return OK;
DCHECK_EQ(STATE_NONE, next_state_);
next_state_ = STATE_GENERATE_AUTH_TOKEN;
int rv = DoLoop(OK);
if (rv == ERR_IO_PENDING)
user_callback_ = callback;
return rv;
}
|
int HttpProxyClientSocket::Connect(const CompletionCallback& callback) {
DCHECK(transport_.get());
DCHECK(transport_->socket());
DCHECK(user_callback_.is_null());
if (using_spdy_ || !tunnel_)
next_state_ = STATE_DONE;
if (next_state_ == STATE_DONE)
return OK;
DCHECK_EQ(STATE_NONE, next_state_);
next_state_ = STATE_GENERATE_AUTH_TOKEN;
int rv = DoLoop(OK);
if (rv == ERR_IO_PENDING)
user_callback_ = callback;
return rv;
}
|
C
|
Chrome
| 0 |
CVE-2013-6381
|
https://www.cvedetails.com/cve/CVE-2013-6381/
|
CWE-119
|
https://github.com/torvalds/linux/commit/6fb392b1a63ae36c31f62bc3fc8630b49d602b62
|
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
|
qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: Frank Blaschka <[email protected]>
Reviewed-by: Heiko Carstens <[email protected]>
Reported-by: Nico Golde <[email protected]>
Reported-by: Fabian Yamaguchi <[email protected]>
Cc: <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply,
unsigned long data)
{
__u16 mtu, framesize;
__u16 len;
__u8 link_type;
struct qeth_cmd_buffer *iob;
QETH_DBF_TEXT(SETUP, 2, "ulpenacb");
iob = (struct qeth_cmd_buffer *) data;
memcpy(&card->token.ulp_filter_r,
QETH_ULP_ENABLE_RESP_FILTER_TOKEN(iob->data),
QETH_MPC_TOKEN_LENGTH);
if (card->info.type == QETH_CARD_TYPE_IQD) {
memcpy(&framesize, QETH_ULP_ENABLE_RESP_MAX_MTU(iob->data), 2);
mtu = qeth_get_mtu_outof_framesize(framesize);
if (!mtu) {
iob->rc = -EINVAL;
QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc);
return 0;
}
if (card->info.initial_mtu && (card->info.initial_mtu != mtu)) {
/* frame size has changed */
if (card->dev &&
((card->dev->mtu == card->info.initial_mtu) ||
(card->dev->mtu > mtu)))
card->dev->mtu = mtu;
qeth_free_qdio_buffers(card);
}
card->info.initial_mtu = mtu;
card->info.max_mtu = mtu;
card->qdio.in_buf_size = mtu + 2 * PAGE_SIZE;
} else {
card->info.max_mtu = *(__u16 *)QETH_ULP_ENABLE_RESP_MAX_MTU(
iob->data);
card->info.initial_mtu = min(card->info.max_mtu,
qeth_get_initial_mtu_for_card(card));
card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT;
}
memcpy(&len, QETH_ULP_ENABLE_RESP_DIFINFO_LEN(iob->data), 2);
if (len >= QETH_MPC_DIFINFO_LEN_INDICATES_LINK_TYPE) {
memcpy(&link_type,
QETH_ULP_ENABLE_RESP_LINK_TYPE(iob->data), 1);
card->info.link_type = link_type;
} else
card->info.link_type = 0;
QETH_DBF_TEXT_(SETUP, 2, "link%d", card->info.link_type);
QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc);
return 0;
}
|
static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply,
unsigned long data)
{
__u16 mtu, framesize;
__u16 len;
__u8 link_type;
struct qeth_cmd_buffer *iob;
QETH_DBF_TEXT(SETUP, 2, "ulpenacb");
iob = (struct qeth_cmd_buffer *) data;
memcpy(&card->token.ulp_filter_r,
QETH_ULP_ENABLE_RESP_FILTER_TOKEN(iob->data),
QETH_MPC_TOKEN_LENGTH);
if (card->info.type == QETH_CARD_TYPE_IQD) {
memcpy(&framesize, QETH_ULP_ENABLE_RESP_MAX_MTU(iob->data), 2);
mtu = qeth_get_mtu_outof_framesize(framesize);
if (!mtu) {
iob->rc = -EINVAL;
QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc);
return 0;
}
if (card->info.initial_mtu && (card->info.initial_mtu != mtu)) {
/* frame size has changed */
if (card->dev &&
((card->dev->mtu == card->info.initial_mtu) ||
(card->dev->mtu > mtu)))
card->dev->mtu = mtu;
qeth_free_qdio_buffers(card);
}
card->info.initial_mtu = mtu;
card->info.max_mtu = mtu;
card->qdio.in_buf_size = mtu + 2 * PAGE_SIZE;
} else {
card->info.max_mtu = *(__u16 *)QETH_ULP_ENABLE_RESP_MAX_MTU(
iob->data);
card->info.initial_mtu = min(card->info.max_mtu,
qeth_get_initial_mtu_for_card(card));
card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT;
}
memcpy(&len, QETH_ULP_ENABLE_RESP_DIFINFO_LEN(iob->data), 2);
if (len >= QETH_MPC_DIFINFO_LEN_INDICATES_LINK_TYPE) {
memcpy(&link_type,
QETH_ULP_ENABLE_RESP_LINK_TYPE(iob->data), 1);
card->info.link_type = link_type;
} else
card->info.link_type = 0;
QETH_DBF_TEXT_(SETUP, 2, "link%d", card->info.link_type);
QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc);
return 0;
}
|
C
|
linux
| 0 |
CVE-2016-3698
|
https://www.cvedetails.com/cve/CVE-2016-3698/
|
CWE-284
|
https://github.com/jpirko/libndp/commit/a4892df306e0532487f1634ba6d4c6d4bb381c7f
|
a4892df306e0532487f1634ba6d4c6d4bb381c7f
|
libndp: validate the IPv6 hop limit
None of the NDP messages should ever come from a non-local network; as
stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA),
and 8.1. (redirect):
- The IP Hop Limit field has a value of 255, i.e., the packet
could not possibly have been forwarded by a router.
This fixes CVE-2016-3698.
Reported by: Julien BERNARD <[email protected]>
Signed-off-by: Lubomir Rintel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
|
uint32_t ndp_msg_ifindex(struct ndp_msg *msg)
{
return msg->ifindex;
}
|
uint32_t ndp_msg_ifindex(struct ndp_msg *msg)
{
return msg->ifindex;
}
|
C
|
libndp
| 0 |
CVE-2011-3106
|
https://www.cvedetails.com/cve/CVE-2011-3106/
|
CWE-119
|
https://github.com/chromium/chromium/commit/5385c44d9634d00b1cec2abf0fe7290d4205c7b0
|
5385c44d9634d00b1cec2abf0fe7290d4205c7b0
|
Inherits SupportsWeakPtr<T> instead of having WeakPtrFactory<T>
This change refines r137676.
BUG=122654
TEST=browser_test
Review URL: https://chromiumcodereview.appspot.com/10332233
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139771 0039d316-1c4b-4281-b951-d872f2087c98
|
bool SocketStreamDispatcherHost::CanGetCookies(net::SocketStream* socket,
const GURL& url) {
return content::GetContentClient()->browser()->AllowGetCookie(
url, url, net::CookieList(), resource_context_, 0, MSG_ROUTING_NONE);
}
|
bool SocketStreamDispatcherHost::CanGetCookies(net::SocketStream* socket,
const GURL& url) {
return content::GetContentClient()->browser()->AllowGetCookie(
url, url, net::CookieList(), resource_context_, 0, MSG_ROUTING_NONE);
}
|
C
|
Chrome
| 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.
|
auth_delete_file(struct sc_card *card, const struct sc_path *path)
{
struct sc_apdu apdu;
unsigned char sbuf[2];
int rv;
char pbuf[SC_MAX_PATH_STRING_SIZE];
LOG_FUNC_CALLED(card->ctx);
rv = sc_path_print(pbuf, sizeof(pbuf), path);
if (rv != SC_SUCCESS)
pbuf[0] = '\0';
sc_log(card->ctx, "path; type=%d, path=%s", path->type, pbuf);
if (path->len < 2) {
sc_log(card->ctx, "Invalid path length");
LOG_FUNC_RETURN(card->ctx, SC_ERROR_INVALID_ARGUMENTS);
}
if (path->len > 2) {
struct sc_path parent = *path;
parent.len -= 2;
parent.type = SC_PATH_TYPE_PATH;
rv = auth_select_file(card, &parent, NULL);
LOG_TEST_RET(card->ctx, rv, "select parent failed ");
}
sbuf[0] = path->value[path->len - 2];
sbuf[1] = path->value[path->len - 1];
if (memcmp(sbuf,"\x00\x00",2)==0 || (memcmp(sbuf,"\xFF\xFF",2)==0) ||
memcmp(sbuf,"\x3F\xFF",2)==0)
LOG_FUNC_RETURN(card->ctx, SC_ERROR_INCORRECT_PARAMETERS);
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xE4, 0x02, 0x00);
apdu.lc = 2;
apdu.datalen = 2;
apdu.data = sbuf;
rv = sc_transmit_apdu(card, &apdu);
LOG_TEST_RET(card->ctx, rv, "APDU transmit failed");
if (apdu.sw1==0x6A && apdu.sw2==0x82) {
/* Clean up tDF contents.*/
struct sc_path tmp_path;
int ii, len;
unsigned char lbuf[SC_MAX_APDU_BUFFER_SIZE];
memset(&tmp_path, 0, sizeof(struct sc_path));
tmp_path.type = SC_PATH_TYPE_FILE_ID;
memcpy(tmp_path.value, sbuf, 2);
tmp_path.len = 2;
rv = auth_select_file(card, &tmp_path, NULL);
LOG_TEST_RET(card->ctx, rv, "select DF failed");
len = auth_list_files(card, lbuf, sizeof(lbuf));
LOG_TEST_RET(card->ctx, len, "list DF failed");
for (ii=0; ii<len/2; ii++) {
struct sc_path tmp_path_x;
memset(&tmp_path_x, 0, sizeof(struct sc_path));
tmp_path_x.type = SC_PATH_TYPE_FILE_ID;
tmp_path_x.value[0] = *(lbuf + ii*2);
tmp_path_x.value[1] = *(lbuf + ii*2 + 1);
tmp_path_x.len = 2;
rv = auth_delete_file(card, &tmp_path_x);
LOG_TEST_RET(card->ctx, rv, "delete failed");
}
tmp_path.type = SC_PATH_TYPE_PARENT;
rv = auth_select_file(card, &tmp_path, NULL);
LOG_TEST_RET(card->ctx, rv, "select parent failed");
apdu.p1 = 1;
rv = sc_transmit_apdu(card, &apdu);
}
LOG_TEST_RET(card->ctx, rv, "APDU transmit failed");
rv = sc_check_sw(card, apdu.sw1, apdu.sw2);
LOG_FUNC_RETURN(card->ctx, rv);
}
|
auth_delete_file(struct sc_card *card, const struct sc_path *path)
{
struct sc_apdu apdu;
unsigned char sbuf[2];
int rv;
char pbuf[SC_MAX_PATH_STRING_SIZE];
LOG_FUNC_CALLED(card->ctx);
rv = sc_path_print(pbuf, sizeof(pbuf), path);
if (rv != SC_SUCCESS)
pbuf[0] = '\0';
sc_log(card->ctx, "path; type=%d, path=%s", path->type, pbuf);
if (path->len < 2) {
sc_log(card->ctx, "Invalid path length");
LOG_FUNC_RETURN(card->ctx, SC_ERROR_INVALID_ARGUMENTS);
}
if (path->len > 2) {
struct sc_path parent = *path;
parent.len -= 2;
parent.type = SC_PATH_TYPE_PATH;
rv = auth_select_file(card, &parent, NULL);
LOG_TEST_RET(card->ctx, rv, "select parent failed ");
}
sbuf[0] = path->value[path->len - 2];
sbuf[1] = path->value[path->len - 1];
if (memcmp(sbuf,"\x00\x00",2)==0 || (memcmp(sbuf,"\xFF\xFF",2)==0) ||
memcmp(sbuf,"\x3F\xFF",2)==0)
LOG_FUNC_RETURN(card->ctx, SC_ERROR_INCORRECT_PARAMETERS);
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xE4, 0x02, 0x00);
apdu.lc = 2;
apdu.datalen = 2;
apdu.data = sbuf;
rv = sc_transmit_apdu(card, &apdu);
LOG_TEST_RET(card->ctx, rv, "APDU transmit failed");
if (apdu.sw1==0x6A && apdu.sw2==0x82) {
/* Clean up tDF contents.*/
struct sc_path tmp_path;
int ii, len;
unsigned char lbuf[SC_MAX_APDU_BUFFER_SIZE];
memset(&tmp_path, 0, sizeof(struct sc_path));
tmp_path.type = SC_PATH_TYPE_FILE_ID;
memcpy(tmp_path.value, sbuf, 2);
tmp_path.len = 2;
rv = auth_select_file(card, &tmp_path, NULL);
LOG_TEST_RET(card->ctx, rv, "select DF failed");
len = auth_list_files(card, lbuf, sizeof(lbuf));
LOG_TEST_RET(card->ctx, len, "list DF failed");
for (ii=0; ii<len/2; ii++) {
struct sc_path tmp_path_x;
memset(&tmp_path_x, 0, sizeof(struct sc_path));
tmp_path_x.type = SC_PATH_TYPE_FILE_ID;
tmp_path_x.value[0] = *(lbuf + ii*2);
tmp_path_x.value[1] = *(lbuf + ii*2 + 1);
tmp_path_x.len = 2;
rv = auth_delete_file(card, &tmp_path_x);
LOG_TEST_RET(card->ctx, rv, "delete failed");
}
tmp_path.type = SC_PATH_TYPE_PARENT;
rv = auth_select_file(card, &tmp_path, NULL);
LOG_TEST_RET(card->ctx, rv, "select parent failed");
apdu.p1 = 1;
rv = sc_transmit_apdu(card, &apdu);
}
LOG_TEST_RET(card->ctx, rv, "APDU transmit failed");
rv = sc_check_sw(card, apdu.sw1, apdu.sw2);
LOG_FUNC_RETURN(card->ctx, rv);
}
|
C
|
OpenSC
| 0 |
CVE-2016-7969
|
https://www.cvedetails.com/cve/CVE-2016-7969/
|
CWE-125
|
https://github.com/libass/libass/pull/240/commits/b72b283b936a600c730e00875d7d067bded3fc26
|
b72b283b936a600c730e00875d7d067bded3fc26
|
Fix line wrapping mode 0/3 bugs
This fixes two separate bugs:
a) Don't move a linebreak into the first symbol. This results in a empty
line at the front, which does not help to equalize line lengths at all.
b) When moving a linebreak into a symbol that already is a break, the
number of lines must be decremented. Otherwise, uninitialized memory
is possibly used for later layout operations.
Found by fuzzer test case
id:000085,sig:11,src:003377+003350,op:splice,rep:8.
|
static int fit_segment(Segment *s, Segment *fixed, int *cnt, int dir)
{
int i;
int shift = 0;
if (dir == 1) // move down
for (i = 0; i < *cnt; ++i) {
if (s->b + shift <= fixed[i].a || s->a + shift >= fixed[i].b ||
s->hb <= fixed[i].ha || s->ha >= fixed[i].hb)
continue;
shift = fixed[i].b - s->a;
} else // dir == -1, move up
for (i = *cnt - 1; i >= 0; --i) {
if (s->b + shift <= fixed[i].a || s->a + shift >= fixed[i].b ||
s->hb <= fixed[i].ha || s->ha >= fixed[i].hb)
continue;
shift = fixed[i].a - s->b;
}
fixed[*cnt].a = s->a + shift;
fixed[*cnt].b = s->b + shift;
fixed[*cnt].ha = s->ha;
fixed[*cnt].hb = s->hb;
(*cnt)++;
qsort(fixed, *cnt, sizeof(Segment), cmp_segment);
return shift;
}
|
static int fit_segment(Segment *s, Segment *fixed, int *cnt, int dir)
{
int i;
int shift = 0;
if (dir == 1) // move down
for (i = 0; i < *cnt; ++i) {
if (s->b + shift <= fixed[i].a || s->a + shift >= fixed[i].b ||
s->hb <= fixed[i].ha || s->ha >= fixed[i].hb)
continue;
shift = fixed[i].b - s->a;
} else // dir == -1, move up
for (i = *cnt - 1; i >= 0; --i) {
if (s->b + shift <= fixed[i].a || s->a + shift >= fixed[i].b ||
s->hb <= fixed[i].ha || s->ha >= fixed[i].hb)
continue;
shift = fixed[i].a - s->b;
}
fixed[*cnt].a = s->a + shift;
fixed[*cnt].b = s->b + shift;
fixed[*cnt].ha = s->ha;
fixed[*cnt].hb = s->hb;
(*cnt)++;
qsort(fixed, *cnt, sizeof(Segment), cmp_segment);
return shift;
}
|
C
|
libass
| 0 |
CVE-2015-8746
|
https://www.cvedetails.com/cve/CVE-2015-8746/
| null |
https://github.com/torvalds/linux/commit/18e3b739fdc826481c6a1335ce0c5b19b3d415da
|
18e3b739fdc826481c6a1335ce0c5b19b3d415da
|
NFS: Fix a NULL pointer dereference of migration recovery ops for v4.2 client
---Steps to Reproduce--
<nfs-server>
# cat /etc/exports
/nfs/referal *(rw,insecure,no_subtree_check,no_root_squash,crossmnt)
/nfs/old *(ro,insecure,subtree_check,root_squash,crossmnt)
<nfs-client>
# mount -t nfs nfs-server:/nfs/ /mnt/
# ll /mnt/*/
<nfs-server>
# cat /etc/exports
/nfs/referal *(rw,insecure,no_subtree_check,no_root_squash,crossmnt,refer=/nfs/old/@nfs-server)
/nfs/old *(ro,insecure,subtree_check,root_squash,crossmnt)
# service nfs restart
<nfs-client>
# ll /mnt/*/ --->>>>> oops here
[ 5123.102925] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 5123.103363] IP: [<ffffffffa03ed38b>] nfs4_proc_get_locations+0x9b/0x120 [nfsv4]
[ 5123.103752] PGD 587b9067 PUD 3cbf5067 PMD 0
[ 5123.104131] Oops: 0000 [#1]
[ 5123.104529] Modules linked in: nfsv4(OE) nfs(OE) fscache(E) nfsd(OE) xfs libcrc32c iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi coretemp crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel ppdev vmw_balloon parport_pc parport i2c_piix4 shpchp auth_rpcgss nfs_acl vmw_vmci lockd grace sunrpc vmwgfx drm_kms_helper ttm drm mptspi serio_raw scsi_transport_spi e1000 mptscsih mptbase ata_generic pata_acpi [last unloaded: nfsd]
[ 5123.105887] CPU: 0 PID: 15853 Comm: ::1-manager Tainted: G OE 4.2.0-rc6+ #214
[ 5123.106358] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014
[ 5123.106860] task: ffff88007620f300 ti: ffff88005877c000 task.ti: ffff88005877c000
[ 5123.107363] RIP: 0010:[<ffffffffa03ed38b>] [<ffffffffa03ed38b>] nfs4_proc_get_locations+0x9b/0x120 [nfsv4]
[ 5123.107909] RSP: 0018:ffff88005877fdb8 EFLAGS: 00010246
[ 5123.108435] RAX: ffff880053f3bc00 RBX: ffff88006ce6c908 RCX: ffff880053a0d240
[ 5123.108968] RDX: ffffea0000e6d940 RSI: ffff8800399a0000 RDI: ffff88006ce6c908
[ 5123.109503] RBP: ffff88005877fe28 R08: ffffffff81c708a0 R09: 0000000000000000
[ 5123.110045] R10: 00000000000001a2 R11: ffff88003ba7f5c8 R12: ffff880054c55800
[ 5123.110618] R13: 0000000000000000 R14: ffff880053a0d240 R15: ffff880053a0d240
[ 5123.111169] FS: 0000000000000000(0000) GS:ffffffff81c27000(0000) knlGS:0000000000000000
[ 5123.111726] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 5123.112286] CR2: 0000000000000000 CR3: 0000000054cac000 CR4: 00000000001406f0
[ 5123.112888] Stack:
[ 5123.113458] ffffea0000e6d940 ffff8800399a0000 00000000000167d0 0000000000000000
[ 5123.114049] 0000000000000000 0000000000000000 0000000000000000 00000000a7ec82c6
[ 5123.114662] ffff88005877fe18 ffffea0000e6d940 ffff8800399a0000 ffff880054c55800
[ 5123.115264] Call Trace:
[ 5123.115868] [<ffffffffa03fb44b>] nfs4_try_migration+0xbb/0x220 [nfsv4]
[ 5123.116487] [<ffffffffa03fcb3b>] nfs4_run_state_manager+0x4ab/0x7b0 [nfsv4]
[ 5123.117104] [<ffffffffa03fc690>] ? nfs4_do_reclaim+0x510/0x510 [nfsv4]
[ 5123.117813] [<ffffffff810a4527>] kthread+0xd7/0xf0
[ 5123.118456] [<ffffffff810a4450>] ? kthread_worker_fn+0x160/0x160
[ 5123.119108] [<ffffffff816d9cdf>] ret_from_fork+0x3f/0x70
[ 5123.119723] [<ffffffff810a4450>] ? kthread_worker_fn+0x160/0x160
[ 5123.120329] Code: 4c 8b 6a 58 74 17 eb 52 48 8d 55 a8 89 c6 4c 89 e7 e8 4a b5 ff ff 8b 45 b0 85 c0 74 1c 4c 89 f9 48 8b 55 90 48 8b 75 98 48 89 df <41> ff 55 00 3d e8 d8 ff ff 41 89 c6 74 cf 48 8b 4d c8 65 48 33
[ 5123.121643] RIP [<ffffffffa03ed38b>] nfs4_proc_get_locations+0x9b/0x120 [nfsv4]
[ 5123.122308] RSP <ffff88005877fdb8>
[ 5123.122942] CR2: 0000000000000000
Fixes: ec011fe847 ("NFS: Introduce a vector of migration recovery ops")
Cc: [email protected] # v3.13+
Signed-off-by: Kinglong Mee <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
|
int nfs40_setup_sequence(struct nfs4_slot_table *tbl,
struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res,
struct rpc_task *task)
{
struct nfs4_slot *slot;
/* slot already allocated? */
if (res->sr_slot != NULL)
goto out_start;
spin_lock(&tbl->slot_tbl_lock);
if (nfs4_slot_tbl_draining(tbl) && !args->sa_privileged)
goto out_sleep;
slot = nfs4_alloc_slot(tbl);
if (IS_ERR(slot)) {
if (slot == ERR_PTR(-ENOMEM))
task->tk_timeout = HZ >> 2;
goto out_sleep;
}
spin_unlock(&tbl->slot_tbl_lock);
args->sa_slot = slot;
res->sr_slot = slot;
out_start:
rpc_call_start(task);
return 0;
out_sleep:
if (args->sa_privileged)
rpc_sleep_on_priority(&tbl->slot_tbl_waitq, task,
NULL, RPC_PRIORITY_PRIVILEGED);
else
rpc_sleep_on(&tbl->slot_tbl_waitq, task, NULL);
spin_unlock(&tbl->slot_tbl_lock);
return -EAGAIN;
}
|
int nfs40_setup_sequence(struct nfs4_slot_table *tbl,
struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res,
struct rpc_task *task)
{
struct nfs4_slot *slot;
/* slot already allocated? */
if (res->sr_slot != NULL)
goto out_start;
spin_lock(&tbl->slot_tbl_lock);
if (nfs4_slot_tbl_draining(tbl) && !args->sa_privileged)
goto out_sleep;
slot = nfs4_alloc_slot(tbl);
if (IS_ERR(slot)) {
if (slot == ERR_PTR(-ENOMEM))
task->tk_timeout = HZ >> 2;
goto out_sleep;
}
spin_unlock(&tbl->slot_tbl_lock);
args->sa_slot = slot;
res->sr_slot = slot;
out_start:
rpc_call_start(task);
return 0;
out_sleep:
if (args->sa_privileged)
rpc_sleep_on_priority(&tbl->slot_tbl_waitq, task,
NULL, RPC_PRIORITY_PRIVILEGED);
else
rpc_sleep_on(&tbl->slot_tbl_waitq, task, NULL);
spin_unlock(&tbl->slot_tbl_lock);
return -EAGAIN;
}
|
C
|
linux
| 0 |
CVE-2013-4470
|
https://www.cvedetails.com/cve/CVE-2013-4470/
|
CWE-264
|
https://github.com/torvalds/linux/commit/e93b7d748be887cd7639b113ba7d7ef792a7efb9
|
e93b7d748be887cd7639b113ba7d7ef792a7efb9
|
ip_output: do skb ufo init for peeked non ufo skb as well
Now, if user application does:
sendto len<mtu flag MSG_MORE
sendto len>mtu flag 0
The skb is not treated as fragmented one because it is not initialized
that way. So move the initialization to fix this.
introduced by:
commit e89e9cf539a28df7d0eb1d0a545368e9920b34ac "[IPv4/IPv6]: UFO Scatter-gather approach"
Signed-off-by: Jiri Pirko <[email protected]>
Acked-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,
__be32 saddr, const struct ip_reply_arg *arg,
unsigned int len)
{
struct ip_options_data replyopts;
struct ipcm_cookie ipc;
struct flowi4 fl4;
struct rtable *rt = skb_rtable(skb);
struct sk_buff *nskb;
struct sock *sk;
struct inet_sock *inet;
if (ip_options_echo(&replyopts.opt.opt, skb))
return;
ipc.addr = daddr;
ipc.opt = NULL;
ipc.tx_flags = 0;
if (replyopts.opt.opt.optlen) {
ipc.opt = &replyopts.opt;
if (replyopts.opt.opt.srr)
daddr = replyopts.opt.opt.faddr;
}
flowi4_init_output(&fl4, arg->bound_dev_if, 0,
RT_TOS(arg->tos),
RT_SCOPE_UNIVERSE, ip_hdr(skb)->protocol,
ip_reply_arg_flowi_flags(arg),
daddr, saddr,
tcp_hdr(skb)->source, tcp_hdr(skb)->dest);
security_skb_classify_flow(skb, flowi4_to_flowi(&fl4));
rt = ip_route_output_key(net, &fl4);
if (IS_ERR(rt))
return;
inet = &get_cpu_var(unicast_sock);
inet->tos = arg->tos;
sk = &inet->sk;
sk->sk_priority = skb->priority;
sk->sk_protocol = ip_hdr(skb)->protocol;
sk->sk_bound_dev_if = arg->bound_dev_if;
sock_net_set(sk, net);
__skb_queue_head_init(&sk->sk_write_queue);
sk->sk_sndbuf = sysctl_wmem_default;
ip_append_data(sk, &fl4, ip_reply_glue_bits, arg->iov->iov_base, len, 0,
&ipc, &rt, MSG_DONTWAIT);
nskb = skb_peek(&sk->sk_write_queue);
if (nskb) {
if (arg->csumoffset >= 0)
*((__sum16 *)skb_transport_header(nskb) +
arg->csumoffset) = csum_fold(csum_add(nskb->csum,
arg->csum));
nskb->ip_summed = CHECKSUM_NONE;
skb_orphan(nskb);
skb_set_queue_mapping(nskb, skb_get_queue_mapping(skb));
ip_push_pending_frames(sk, &fl4);
}
put_cpu_var(unicast_sock);
ip_rt_put(rt);
}
|
void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,
__be32 saddr, const struct ip_reply_arg *arg,
unsigned int len)
{
struct ip_options_data replyopts;
struct ipcm_cookie ipc;
struct flowi4 fl4;
struct rtable *rt = skb_rtable(skb);
struct sk_buff *nskb;
struct sock *sk;
struct inet_sock *inet;
if (ip_options_echo(&replyopts.opt.opt, skb))
return;
ipc.addr = daddr;
ipc.opt = NULL;
ipc.tx_flags = 0;
if (replyopts.opt.opt.optlen) {
ipc.opt = &replyopts.opt;
if (replyopts.opt.opt.srr)
daddr = replyopts.opt.opt.faddr;
}
flowi4_init_output(&fl4, arg->bound_dev_if, 0,
RT_TOS(arg->tos),
RT_SCOPE_UNIVERSE, ip_hdr(skb)->protocol,
ip_reply_arg_flowi_flags(arg),
daddr, saddr,
tcp_hdr(skb)->source, tcp_hdr(skb)->dest);
security_skb_classify_flow(skb, flowi4_to_flowi(&fl4));
rt = ip_route_output_key(net, &fl4);
if (IS_ERR(rt))
return;
inet = &get_cpu_var(unicast_sock);
inet->tos = arg->tos;
sk = &inet->sk;
sk->sk_priority = skb->priority;
sk->sk_protocol = ip_hdr(skb)->protocol;
sk->sk_bound_dev_if = arg->bound_dev_if;
sock_net_set(sk, net);
__skb_queue_head_init(&sk->sk_write_queue);
sk->sk_sndbuf = sysctl_wmem_default;
ip_append_data(sk, &fl4, ip_reply_glue_bits, arg->iov->iov_base, len, 0,
&ipc, &rt, MSG_DONTWAIT);
nskb = skb_peek(&sk->sk_write_queue);
if (nskb) {
if (arg->csumoffset >= 0)
*((__sum16 *)skb_transport_header(nskb) +
arg->csumoffset) = csum_fold(csum_add(nskb->csum,
arg->csum));
nskb->ip_summed = CHECKSUM_NONE;
skb_orphan(nskb);
skb_set_queue_mapping(nskb, skb_get_queue_mapping(skb));
ip_push_pending_frames(sk, &fl4);
}
put_cpu_var(unicast_sock);
ip_rt_put(rt);
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/8a50f99c25fb70ff43aaa82b6f9569db383f0ca8
|
8a50f99c25fb70ff43aaa82b6f9569db383f0ca8
|
[Sync] Rework unit tests for ChromeInvalidationClient
In particular, add unit tests that would have caught bug 139424.
Dep-inject InvalidationClient into ChromeInvalidationClient.
Use the function name 'UpdateRegisteredIds' consistently.
Replace some mocks with fakes.
BUG=139424
Review URL: https://chromiumcodereview.appspot.com/10827133
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150665 0039d316-1c4b-4281-b951-d872f2087c98
|
double RegistrationManager::CalculateBackoff(
double retry_interval,
double initial_retry_interval,
double min_retry_interval,
double max_retry_interval,
double backoff_exponent,
double jitter,
double max_jitter) {
double scaled_jitter = jitter * max_jitter;
double new_retry_interval =
(retry_interval == 0.0) ?
(initial_retry_interval * (1.0 + scaled_jitter)) :
(retry_interval * (backoff_exponent + scaled_jitter));
return std::max(min_retry_interval,
std::min(max_retry_interval, new_retry_interval));
}
|
double RegistrationManager::CalculateBackoff(
double retry_interval,
double initial_retry_interval,
double min_retry_interval,
double max_retry_interval,
double backoff_exponent,
double jitter,
double max_jitter) {
double scaled_jitter = jitter * max_jitter;
double new_retry_interval =
(retry_interval == 0.0) ?
(initial_retry_interval * (1.0 + scaled_jitter)) :
(retry_interval * (backoff_exponent + scaled_jitter));
return std::max(min_retry_interval,
std::min(max_retry_interval, new_retry_interval));
}
|
C
|
Chrome
| 0 |
CVE-2016-3689
|
https://www.cvedetails.com/cve/CVE-2016-3689/
| null |
https://github.com/torvalds/linux/commit/a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff
|
a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff
|
Input: ims-pcu - sanity check against missing interfaces
A malicious device missing interface can make the driver oops.
Add sanity checking.
Signed-off-by: Oliver Neukum <[email protected]>
CC: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
static int ims_pcu_setup_backlight(struct ims_pcu *pcu)
{
struct ims_pcu_backlight *backlight = &pcu->backlight;
int error;
INIT_WORK(&backlight->work, ims_pcu_backlight_work);
snprintf(backlight->name, sizeof(backlight->name),
"pcu%d::kbd_backlight", pcu->device_no);
backlight->cdev.name = backlight->name;
backlight->cdev.max_brightness = IMS_PCU_MAX_BRIGHTNESS;
backlight->cdev.brightness_get = ims_pcu_backlight_get_brightness;
backlight->cdev.brightness_set = ims_pcu_backlight_set_brightness;
error = led_classdev_register(pcu->dev, &backlight->cdev);
if (error) {
dev_err(pcu->dev,
"Failed to register backlight LED device, error: %d\n",
error);
return error;
}
return 0;
}
|
static int ims_pcu_setup_backlight(struct ims_pcu *pcu)
{
struct ims_pcu_backlight *backlight = &pcu->backlight;
int error;
INIT_WORK(&backlight->work, ims_pcu_backlight_work);
snprintf(backlight->name, sizeof(backlight->name),
"pcu%d::kbd_backlight", pcu->device_no);
backlight->cdev.name = backlight->name;
backlight->cdev.max_brightness = IMS_PCU_MAX_BRIGHTNESS;
backlight->cdev.brightness_get = ims_pcu_backlight_get_brightness;
backlight->cdev.brightness_set = ims_pcu_backlight_set_brightness;
error = led_classdev_register(pcu->dev, &backlight->cdev);
if (error) {
dev_err(pcu->dev,
"Failed to register backlight LED device, error: %d\n",
error);
return error;
}
return 0;
}
|
C
|
linux
| 0 |
CVE-2018-12714
|
https://www.cvedetails.com/cve/CVE-2018-12714/
|
CWE-787
|
https://github.com/torvalds/linux/commit/81f9c4e4177d31ced6f52a89bb70e93bfb77ca03
|
81f9c4e4177d31ced6f52a89bb70e93bfb77ca03
|
Merge tag 'trace-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt:
"This contains a few fixes and a clean up.
- a bad merge caused an "endif" to go in the wrong place in
scripts/Makefile.build
- softirq tracing fix for tracing that corrupts lockdep and causes a
false splat
- histogram documentation typo fixes
- fix a bad memory reference when passing in no filter to the filter
code
- simplify code by using the swap macro instead of open coding the
swap"
* tag 'trace-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount
tracing: Fix some errors in histogram documentation
tracing: Use swap macro in update_max_tr
softirq: Reorder trace_softirqs_on to prevent lockdep splat
tracing: Check for no filter when processing event filters
|
int tracing_update_buffers(void)
{
int ret = 0;
mutex_lock(&trace_types_lock);
if (!ring_buffer_expanded)
ret = __tracing_resize_ring_buffer(&global_trace, trace_buf_size,
RING_BUFFER_ALL_CPUS);
mutex_unlock(&trace_types_lock);
return ret;
}
|
int tracing_update_buffers(void)
{
int ret = 0;
mutex_lock(&trace_types_lock);
if (!ring_buffer_expanded)
ret = __tracing_resize_ring_buffer(&global_trace, trace_buf_size,
RING_BUFFER_ALL_CPUS);
mutex_unlock(&trace_types_lock);
return ret;
}
|
C
|
linux
| 0 |
CVE-2016-3834
|
https://www.cvedetails.com/cve/CVE-2016-3834/
|
CWE-200
|
https://android.googlesource.com/platform/frameworks/av/+/1f24c730ab6ca5aff1e3137b340b8aeaeda4bdbc
|
1f24c730ab6ca5aff1e3137b340b8aeaeda4bdbc
|
DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak
Subtract address of a random static object from pointers being routed
through app process.
Bug: 28466701
Change-Id: Idcbfe81e9507433769672f3dc6d67db5eeed4e04
|
void StreamingProcessor::releaseAllRecordingFramesLocked() {
ATRACE_CALL();
status_t res;
if (mRecordingConsumer == 0) {
return;
}
ALOGV("%s: Camera %d: Releasing all recording buffers", __FUNCTION__,
mId);
size_t releasedCount = 0;
for (size_t itemIndex = 0; itemIndex < mRecordingBuffers.size(); itemIndex++) {
const BufferItem item = mRecordingBuffers[itemIndex];
if (item.mBuf != BufferItemConsumer::INVALID_BUFFER_SLOT) {
res = mRecordingConsumer->releaseBuffer(mRecordingBuffers[itemIndex]);
if (res != OK) {
ALOGE("%s: Camera %d: Unable to free recording frame "
"(buffer_handle_t: %p): %s (%d)", __FUNCTION__,
mId, item.mGraphicBuffer->handle, strerror(-res), res);
}
mRecordingBuffers.replaceAt(itemIndex);
releasedCount++;
}
}
if (releasedCount > 0) {
ALOGW("%s: Camera %d: Force-freed %zu outstanding buffers "
"from previous recording session", __FUNCTION__, mId, releasedCount);
ALOGE_IF(releasedCount != mRecordingHeapCount - mRecordingHeapFree,
"%s: Camera %d: Force-freed %zu buffers, but expected %zu",
__FUNCTION__, mId, releasedCount, mRecordingHeapCount - mRecordingHeapFree);
}
mRecordingHeapHead = 0;
mRecordingHeapFree = mRecordingHeapCount;
}
|
void StreamingProcessor::releaseAllRecordingFramesLocked() {
ATRACE_CALL();
status_t res;
if (mRecordingConsumer == 0) {
return;
}
ALOGV("%s: Camera %d: Releasing all recording buffers", __FUNCTION__,
mId);
size_t releasedCount = 0;
for (size_t itemIndex = 0; itemIndex < mRecordingBuffers.size(); itemIndex++) {
const BufferItem item = mRecordingBuffers[itemIndex];
if (item.mBuf != BufferItemConsumer::INVALID_BUFFER_SLOT) {
res = mRecordingConsumer->releaseBuffer(mRecordingBuffers[itemIndex]);
if (res != OK) {
ALOGE("%s: Camera %d: Unable to free recording frame "
"(buffer_handle_t: %p): %s (%d)", __FUNCTION__,
mId, item.mGraphicBuffer->handle, strerror(-res), res);
}
mRecordingBuffers.replaceAt(itemIndex);
releasedCount++;
}
}
if (releasedCount > 0) {
ALOGW("%s: Camera %d: Force-freed %zu outstanding buffers "
"from previous recording session", __FUNCTION__, mId, releasedCount);
ALOGE_IF(releasedCount != mRecordingHeapCount - mRecordingHeapFree,
"%s: Camera %d: Force-freed %zu buffers, but expected %zu",
__FUNCTION__, mId, releasedCount, mRecordingHeapCount - mRecordingHeapFree);
}
mRecordingHeapHead = 0;
mRecordingHeapFree = mRecordingHeapCount;
}
|
C
|
Android
| 0 |
CVE-2013-6626
|
https://www.cvedetails.com/cve/CVE-2013-6626/
| null |
https://github.com/chromium/chromium/commit/90fb08ed0146c9beacfd4dde98a20fc45419fff3
|
90fb08ed0146c9beacfd4dde98a20fc45419fff3
|
Cancel JavaScript dialogs when an interstitial appears.
BUG=295695
TEST=See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/24360011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225026 0039d316-1c4b-4281-b951-d872f2087c98
|
void WebContentsImpl::DidChooseColorInColorChooser(SkColor color) {
Send(new ViewMsg_DidChooseColorResponse(
GetRoutingID(), color_chooser_identifier_, color));
}
|
void WebContentsImpl::DidChooseColorInColorChooser(SkColor color) {
Send(new ViewMsg_DidChooseColorResponse(
GetRoutingID(), color_chooser_identifier_, color));
}
|
C
|
Chrome
| 0 |
CVE-2011-3193
|
https://www.cvedetails.com/cve/CVE-2011-3193/
|
CWE-119
|
https://cgit.freedesktop.org/harfbuzz.old/commit/?id=81c8ef785b079980ad5b46be4fe7c7bf156dbf65
|
81c8ef785b079980ad5b46be4fe7c7bf156dbf65
| null |
HB_Error HB_GPOS_Query_Languages( HB_GPOSHeader* gpos,
HB_UShort script_index,
HB_UInt** language_tag_list )
{
HB_Error error;
HB_UShort n;
HB_UInt* ltl;
HB_ScriptList* sl;
HB_ScriptRecord* sr;
HB_ScriptTable* s;
HB_LangSysRecord* lsr;
if ( !gpos || !language_tag_list )
return ERR(HB_Err_Invalid_Argument);
sl = &gpos->ScriptList;
sr = sl->ScriptRecord;
if ( script_index >= sl->ScriptCount )
return ERR(HB_Err_Invalid_Argument);
s = &sr[script_index].Script;
lsr = s->LangSysRecord;
if ( ALLOC_ARRAY( ltl, s->LangSysCount + 1, HB_UInt ) )
return error;
for ( n = 0; n < s->LangSysCount; n++ )
ltl[n] = lsr[n].LangSysTag;
ltl[n] = 0;
*language_tag_list = ltl;
return HB_Err_Ok;
}
|
HB_Error HB_GPOS_Query_Languages( HB_GPOSHeader* gpos,
HB_UShort script_index,
HB_UInt** language_tag_list )
{
HB_Error error;
HB_UShort n;
HB_UInt* ltl;
HB_ScriptList* sl;
HB_ScriptRecord* sr;
HB_ScriptTable* s;
HB_LangSysRecord* lsr;
if ( !gpos || !language_tag_list )
return ERR(HB_Err_Invalid_Argument);
sl = &gpos->ScriptList;
sr = sl->ScriptRecord;
if ( script_index >= sl->ScriptCount )
return ERR(HB_Err_Invalid_Argument);
s = &sr[script_index].Script;
lsr = s->LangSysRecord;
if ( ALLOC_ARRAY( ltl, s->LangSysCount + 1, HB_UInt ) )
return error;
for ( n = 0; n < s->LangSysCount; n++ )
ltl[n] = lsr[n].LangSysTag;
ltl[n] = 0;
*language_tag_list = ltl;
return HB_Err_Ok;
}
|
C
|
harfbuzz
| 0 |
CVE-2018-6040
|
https://www.cvedetails.com/cve/CVE-2018-6040/
|
CWE-732
|
https://github.com/chromium/chromium/commit/209f225b2d51334eaf69ffdf002e25eaa1e0d448
|
209f225b2d51334eaf69ffdf002e25eaa1e0d448
|
Fixed bug where PlzNavigate CSP in a iframe did not get the inherited CSP
When inheriting the CSP from a parent document to a local-scheme CSP,
it does not always get propagated to the PlzNavigate CSP. This means
that PlzNavigate CSP checks (like `frame-src`) would be ran against
a blank policy instead of the proper inherited policy.
Bug: 778658
Change-Id: I61bb0d432e1cea52f199e855624cb7b3078f56a9
Reviewed-on: https://chromium-review.googlesource.com/765969
Commit-Queue: Andy Paicu <[email protected]>
Reviewed-by: Mike West <[email protected]>
Cr-Commit-Position: refs/heads/master@{#518245}
|
Document::Document(const DocumentInit& initializer,
DocumentClassFlags document_classes)
: ContainerNode(nullptr, kCreateDocument),
TreeScope(*this),
has_nodes_with_placeholder_style_(false),
evaluate_media_queries_on_style_recalc_(false),
pending_sheet_layout_(kNoLayoutWithPendingSheets),
frame_(initializer.GetFrame()),
dom_window_(frame_ ? frame_->DomWindow() : nullptr),
imports_controller_(initializer.ImportsController()),
context_document_(initializer.ContextDocument()),
context_features_(ContextFeatures::DefaultSwitch()),
well_formed_(false),
printing_(kNotPrinting),
paginated_for_screen_(false),
compatibility_mode_(kNoQuirksMode),
compatibility_mode_locked_(false),
has_autofocused_(false),
clear_focused_element_timer_(GetTaskRunner(TaskType::kUnspecedTimer),
this,
&Document::ClearFocusedElementTimerFired),
dom_tree_version_(++global_tree_version_),
style_version_(0),
listener_types_(0),
mutation_observer_types_(0),
visited_link_state_(VisitedLinkState::Create(*this)),
visually_ordered_(false),
ready_state_(kComplete),
parsing_state_(kFinishedParsing),
goto_anchor_needed_after_stylesheets_load_(false),
contains_validity_style_rules_(false),
contains_plugins_(false),
ignore_destructive_write_count_(0),
throw_on_dynamic_markup_insertion_count_(0),
markers_(new DocumentMarkerController(*this)),
update_focus_appearance_timer_(
GetTaskRunner(TaskType::kUnspecedTimer),
this,
&Document::UpdateFocusAppearanceTimerFired),
css_target_(nullptr),
load_event_progress_(kLoadEventCompleted),
start_time_(CurrentTime()),
script_runner_(ScriptRunner::Create(this)),
xml_version_("1.0"),
xml_standalone_(kStandaloneUnspecified),
has_xml_declaration_(0),
design_mode_(false),
is_running_exec_command_(false),
has_annotated_regions_(false),
annotated_regions_dirty_(false),
document_classes_(document_classes),
is_view_source_(false),
saw_elements_in_known_namespaces_(false),
is_srcdoc_document_(initializer.ShouldTreatURLAsSrcdocDocument()),
is_mobile_document_(false),
layout_view_(nullptr),
has_fullscreen_supplement_(false),
load_event_delay_count_(0),
load_event_delay_timer_(GetTaskRunner(TaskType::kNetworking),
this,
&Document::LoadEventDelayTimerFired),
plugin_loading_timer_(GetTaskRunner(TaskType::kUnspecedLoading),
this,
&Document::PluginLoadingTimerFired),
document_timing_(*this),
write_recursion_is_too_deep_(false),
write_recursion_depth_(0),
registration_context_(initializer.RegistrationContext(this)),
element_data_cache_clear_timer_(
GetTaskRunner(TaskType::kUnspecedTimer),
this,
&Document::ElementDataCacheClearTimerFired),
timeline_(DocumentTimeline::Create(this)),
pending_animations_(new PendingAnimations(*this)),
worklet_animation_controller_(new WorkletAnimationController(this)),
template_document_host_(nullptr),
did_associate_form_controls_timer_(
GetTaskRunner(TaskType::kUnspecedLoading),
this,
&Document::DidAssociateFormControlsTimerFired),
timers_(GetTaskRunner(TaskType::kJavascriptTimer)),
has_viewport_units_(false),
parser_sync_policy_(kAllowAsynchronousParsing),
node_count_(0),
would_load_reason_(WouldLoadReason::kInvalid),
password_count_(0),
logged_field_edit_(false),
engagement_level_(mojom::blink::EngagementLevel::NONE) {
if (frame_) {
DCHECK(frame_->GetPage());
ProvideContextFeaturesToDocumentFrom(*this, *frame_->GetPage());
fetcher_ = frame_->Loader().GetDocumentLoader()->Fetcher();
FrameFetchContext::ProvideDocumentToContext(fetcher_->Context(), this);
CustomElementRegistry* registry =
frame_->DomWindow() ? frame_->DomWindow()->MaybeCustomElements()
: nullptr;
if (registry && registration_context_)
registry->Entangle(registration_context_);
} else if (imports_controller_) {
fetcher_ = FrameFetchContext::CreateFetcherFromDocument(this);
} else {
fetcher_ = ResourceFetcher::Create(nullptr);
}
DCHECK(fetcher_);
root_scroller_controller_ = RootScrollerController::Create(*this);
if (initializer.ShouldSetURL()) {
SetURL(initializer.Url());
} else {
UpdateBaseURL();
}
InitSecurityContext(initializer);
InitDNSPrefetch();
InstanceCounters::IncrementCounter(InstanceCounters::kDocumentCounter);
lifecycle_.AdvanceTo(DocumentLifecycle::kInactive);
style_engine_ = StyleEngine::Create(*this);
DCHECK(!ParentDocument() || !ParentDocument()->IsContextPaused());
#ifndef NDEBUG
liveDocumentSet().insert(this);
#endif
}
|
Document::Document(const DocumentInit& initializer,
DocumentClassFlags document_classes)
: ContainerNode(nullptr, kCreateDocument),
TreeScope(*this),
has_nodes_with_placeholder_style_(false),
evaluate_media_queries_on_style_recalc_(false),
pending_sheet_layout_(kNoLayoutWithPendingSheets),
frame_(initializer.GetFrame()),
dom_window_(frame_ ? frame_->DomWindow() : nullptr),
imports_controller_(initializer.ImportsController()),
context_document_(initializer.ContextDocument()),
context_features_(ContextFeatures::DefaultSwitch()),
well_formed_(false),
printing_(kNotPrinting),
paginated_for_screen_(false),
compatibility_mode_(kNoQuirksMode),
compatibility_mode_locked_(false),
has_autofocused_(false),
clear_focused_element_timer_(GetTaskRunner(TaskType::kUnspecedTimer),
this,
&Document::ClearFocusedElementTimerFired),
dom_tree_version_(++global_tree_version_),
style_version_(0),
listener_types_(0),
mutation_observer_types_(0),
visited_link_state_(VisitedLinkState::Create(*this)),
visually_ordered_(false),
ready_state_(kComplete),
parsing_state_(kFinishedParsing),
goto_anchor_needed_after_stylesheets_load_(false),
contains_validity_style_rules_(false),
contains_plugins_(false),
ignore_destructive_write_count_(0),
throw_on_dynamic_markup_insertion_count_(0),
markers_(new DocumentMarkerController(*this)),
update_focus_appearance_timer_(
GetTaskRunner(TaskType::kUnspecedTimer),
this,
&Document::UpdateFocusAppearanceTimerFired),
css_target_(nullptr),
load_event_progress_(kLoadEventCompleted),
start_time_(CurrentTime()),
script_runner_(ScriptRunner::Create(this)),
xml_version_("1.0"),
xml_standalone_(kStandaloneUnspecified),
has_xml_declaration_(0),
design_mode_(false),
is_running_exec_command_(false),
has_annotated_regions_(false),
annotated_regions_dirty_(false),
document_classes_(document_classes),
is_view_source_(false),
saw_elements_in_known_namespaces_(false),
is_srcdoc_document_(initializer.ShouldTreatURLAsSrcdocDocument()),
is_mobile_document_(false),
layout_view_(nullptr),
has_fullscreen_supplement_(false),
load_event_delay_count_(0),
load_event_delay_timer_(GetTaskRunner(TaskType::kNetworking),
this,
&Document::LoadEventDelayTimerFired),
plugin_loading_timer_(GetTaskRunner(TaskType::kUnspecedLoading),
this,
&Document::PluginLoadingTimerFired),
document_timing_(*this),
write_recursion_is_too_deep_(false),
write_recursion_depth_(0),
registration_context_(initializer.RegistrationContext(this)),
element_data_cache_clear_timer_(
GetTaskRunner(TaskType::kUnspecedTimer),
this,
&Document::ElementDataCacheClearTimerFired),
timeline_(DocumentTimeline::Create(this)),
pending_animations_(new PendingAnimations(*this)),
worklet_animation_controller_(new WorkletAnimationController(this)),
template_document_host_(nullptr),
did_associate_form_controls_timer_(
GetTaskRunner(TaskType::kUnspecedLoading),
this,
&Document::DidAssociateFormControlsTimerFired),
timers_(GetTaskRunner(TaskType::kJavascriptTimer)),
has_viewport_units_(false),
parser_sync_policy_(kAllowAsynchronousParsing),
node_count_(0),
would_load_reason_(WouldLoadReason::kInvalid),
password_count_(0),
logged_field_edit_(false),
engagement_level_(mojom::blink::EngagementLevel::NONE) {
if (frame_) {
DCHECK(frame_->GetPage());
ProvideContextFeaturesToDocumentFrom(*this, *frame_->GetPage());
fetcher_ = frame_->Loader().GetDocumentLoader()->Fetcher();
FrameFetchContext::ProvideDocumentToContext(fetcher_->Context(), this);
CustomElementRegistry* registry =
frame_->DomWindow() ? frame_->DomWindow()->MaybeCustomElements()
: nullptr;
if (registry && registration_context_)
registry->Entangle(registration_context_);
} else if (imports_controller_) {
fetcher_ = FrameFetchContext::CreateFetcherFromDocument(this);
} else {
fetcher_ = ResourceFetcher::Create(nullptr);
}
DCHECK(fetcher_);
root_scroller_controller_ = RootScrollerController::Create(*this);
if (initializer.ShouldSetURL()) {
SetURL(initializer.Url());
} else {
UpdateBaseURL();
}
InitSecurityContext(initializer);
InitDNSPrefetch();
InstanceCounters::IncrementCounter(InstanceCounters::kDocumentCounter);
lifecycle_.AdvanceTo(DocumentLifecycle::kInactive);
style_engine_ = StyleEngine::Create(*this);
DCHECK(!ParentDocument() || !ParentDocument()->IsContextPaused());
#ifndef NDEBUG
liveDocumentSet().insert(this);
#endif
}
|
C
|
Chrome
| 0 |
CVE-2011-4930
|
https://www.cvedetails.com/cve/CVE-2011-4930/
|
CWE-134
|
https://htcondor-git.cs.wisc.edu/?p=condor.git;a=commitdiff;h=5e5571d1a431eb3c61977b6dd6ec90186ef79867
|
5e5571d1a431eb3c61977b6dd6ec90186ef79867
| null |
Condor_Auth_SSL :: Condor_Auth_SSL(ReliSock * sock, int /* remote */)
: Condor_Auth_Base ( sock, CAUTH_SSL )
{
m_crypto = NULL;
}
|
Condor_Auth_SSL :: Condor_Auth_SSL(ReliSock * sock, int /* remote */)
: Condor_Auth_Base ( sock, CAUTH_SSL )
{
m_crypto = NULL;
}
|
CPP
|
htcondor
| 0 |
CVE-2013-7271
|
https://www.cvedetails.com/cve/CVE-2013-7271/
|
CWE-20
|
https://github.com/torvalds/linux/commit/f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
|
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
|
net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers and makes it harder for new code to accidentally leak
uninitialized memory.
Optimize for the case recvfrom is called with NULL as address. We don't
need to copy the address at all, so set it to NULL before invoking the
recvmsg handler. We can do so, because all the recvmsg handlers must
cope with the case a plain read() is called on them. read() also sets
msg_name to NULL.
Also document these changes in include/linux/net.h as suggested by David
Miller.
Changes since RFC:
Set msg->msg_name = NULL if user specified a NULL in msg_name but had a
non-null msg_namelen in verify_iovec/verify_compat_iovec. This doesn't
affect sendto as it would bail out earlier while trying to copy-in the
address. It also more naturally reflects the logic by the callers of
verify_iovec.
With this change in place I could remove "
if (!uaddr || msg_sys->msg_namelen == 0)
msg->msg_name = NULL
".
This change does not alter the user visible error logic as we ignore
msg_namelen as long as msg_name is NULL.
Also remove two unnecessary curly brackets in ___sys_recvmsg and change
comments to netdev style.
Cc: David Miller <[email protected]>
Suggested-by: Eric Dumazet <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static void pppol2tp_session_close(struct l2tp_session *session)
{
struct pppol2tp_session *ps = l2tp_session_priv(session);
struct sock *sk = ps->sock;
struct socket *sock = sk->sk_socket;
BUG_ON(session->magic != L2TP_SESSION_MAGIC);
if (sock) {
inet_shutdown(sock, 2);
/* Don't let the session go away before our socket does */
l2tp_session_inc_refcount(session);
}
return;
}
|
static void pppol2tp_session_close(struct l2tp_session *session)
{
struct pppol2tp_session *ps = l2tp_session_priv(session);
struct sock *sk = ps->sock;
struct socket *sock = sk->sk_socket;
BUG_ON(session->magic != L2TP_SESSION_MAGIC);
if (sock) {
inet_shutdown(sock, 2);
/* Don't let the session go away before our socket does */
l2tp_session_inc_refcount(session);
}
return;
}
|
C
|
linux
| 0 |
CVE-2012-5375
|
https://www.cvedetails.com/cve/CVE-2012-5375/
|
CWE-310
|
https://github.com/torvalds/linux/commit/9c52057c698fb96f8f07e7a4bcf4801a092bda89
|
9c52057c698fb96f8f07e7a4bcf4801a092bda89
|
Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hit IO errors during the directory insertion.
Along the way, we started testing only for EEXIST and the EOVERFLOW case
was dropped. The end result is that we may force the FS readonly if we
catch a directory hash bucket overflow.
This fixes a few problem spots. First I add tests for EOVERFLOW in the
places where we can safely just return the error up the chain.
btrfs_rename is harder though, because it tries to insert the new
directory item only after it has already unlinked anything the rename
was going to overwrite. Rather than adding very complex logic, I added
a helper to test for the hash overflow case early while it is still safe
to bail out.
Snapshot and subvolume creation had a similar problem, so they are using
the new helper now too.
Signed-off-by: Chris Mason <[email protected]>
Reported-by: Pascal Junod <[email protected]>
|
static long btrfs_ioctl_scrub_cancel(struct btrfs_root *root, void __user *arg)
{
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
return btrfs_scrub_cancel(root->fs_info);
}
|
static long btrfs_ioctl_scrub_cancel(struct btrfs_root *root, void __user *arg)
{
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
return btrfs_scrub_cancel(root->fs_info);
}
|
C
|
linux
| 0 |
CVE-2017-18079
|
https://www.cvedetails.com/cve/CVE-2017-18079/
|
CWE-476
|
https://github.com/torvalds/linux/commit/340d394a789518018f834ff70f7534fc463d3226
|
340d394a789518018f834ff70f7534fc463d3226
|
Input: i8042 - fix crash at boot time
The driver checks port->exists twice in i8042_interrupt(), first when
trying to assign temporary "serio" variable, and second time when deciding
whether it should call serio_interrupt(). The value of port->exists may
change between the 2 checks, and we may end up calling serio_interrupt()
with a NULL pointer:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000050
IP: [<ffffffff8150feaf>] _spin_lock_irqsave+0x1f/0x40
PGD 0
Oops: 0002 [#1] SMP
last sysfs file:
CPU 0
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.32-358.el6.x86_64 #1 QEMU Standard PC (i440FX + PIIX, 1996)
RIP: 0010:[<ffffffff8150feaf>] [<ffffffff8150feaf>] _spin_lock_irqsave+0x1f/0x40
RSP: 0018:ffff880028203cc0 EFLAGS: 00010082
RAX: 0000000000010000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000282 RSI: 0000000000000098 RDI: 0000000000000050
RBP: ffff880028203cc0 R08: ffff88013e79c000 R09: ffff880028203ee0
R10: 0000000000000298 R11: 0000000000000282 R12: 0000000000000050
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000098
FS: 0000000000000000(0000) GS:ffff880028200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000050 CR3: 0000000001a85000 CR4: 00000000001407f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 1, threadinfo ffff88013e79c000, task ffff88013e79b500)
Stack:
ffff880028203d00 ffffffff813de186 ffffffffffffff02 0000000000000000
<d> 0000000000000000 0000000000000000 0000000000000000 0000000000000098
<d> ffff880028203d70 ffffffff813e0162 ffff880028203d20 ffffffff8103b8ac
Call Trace:
<IRQ>
[<ffffffff813de186>] serio_interrupt+0x36/0xa0
[<ffffffff813e0162>] i8042_interrupt+0x132/0x3a0
[<ffffffff8103b8ac>] ? kvm_clock_read+0x1c/0x20
[<ffffffff8103b8b9>] ? kvm_clock_get_cycles+0x9/0x10
[<ffffffff810e1640>] handle_IRQ_event+0x60/0x170
[<ffffffff8103b154>] ? kvm_guest_apic_eoi_write+0x44/0x50
[<ffffffff810e3d8e>] handle_edge_irq+0xde/0x180
[<ffffffff8100de89>] handle_irq+0x49/0xa0
[<ffffffff81516c8c>] do_IRQ+0x6c/0xf0
[<ffffffff8100b9d3>] ret_from_intr+0x0/0x11
[<ffffffff81076f63>] ? __do_softirq+0x73/0x1e0
[<ffffffff8109b75b>] ? hrtimer_interrupt+0x14b/0x260
[<ffffffff8100c1cc>] ? call_softirq+0x1c/0x30
[<ffffffff8100de05>] ? do_softirq+0x65/0xa0
[<ffffffff81076d95>] ? irq_exit+0x85/0x90
[<ffffffff81516d80>] ? smp_apic_timer_interrupt+0x70/0x9b
[<ffffffff8100bb93>] ? apic_timer_interrupt+0x13/0x20
To avoid the issue let's change the second check to test whether serio is
NULL or not.
Also, let's take i8042_lock in i8042_start() and i8042_stop() instead of
trying to be overly smart and using memory barriers.
Signed-off-by: Chen Hong <[email protected]>
[dtor: take lock in i8042_start()/i8042_stop()]
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
static int i8042_aux_write(struct serio *serio, unsigned char c)
{
struct i8042_port *port = serio->port_data;
return i8042_command(&c, port->mux == -1 ?
I8042_CMD_AUX_SEND :
I8042_CMD_MUX_SEND + port->mux);
}
|
static int i8042_aux_write(struct serio *serio, unsigned char c)
{
struct i8042_port *port = serio->port_data;
return i8042_command(&c, port->mux == -1 ?
I8042_CMD_AUX_SEND :
I8042_CMD_MUX_SEND + port->mux);
}
|
C
|
linux
| 0 |
CVE-2010-4352
|
https://www.cvedetails.com/cve/CVE-2010-4352/
|
CWE-399
|
https://cgit.freedesktop.org/dbus/dbus/commit/?id=7d65a3a6ed8815e34a99c680ac3869fde49dbbd4
|
7d65a3a6ed8815e34a99c680ac3869fde49dbbd4
| null |
iter_recurse (DBusMessageDataIter *iter)
{
iter->depth += 1;
_dbus_assert (iter->depth < _DBUS_MESSAGE_DATA_MAX_NESTING);
_dbus_assert (iter->sequence_nos[iter->depth] >= 0);
}
|
iter_recurse (DBusMessageDataIter *iter)
{
iter->depth += 1;
_dbus_assert (iter->depth < _DBUS_MESSAGE_DATA_MAX_NESTING);
_dbus_assert (iter->sequence_nos[iter->depth] >= 0);
}
|
C
|
dbus
| 0 |
CVE-2014-1713
|
https://www.cvedetails.com/cve/CVE-2014-1713/
|
CWE-399
|
https://github.com/chromium/chromium/commit/f85a87ec670ad0fce9d98d90c9a705b72a288154
|
f85a87ec670ad0fce9d98d90c9a705b72a288154
|
document.location bindings fix
BUG=352374
[email protected]
Review URL: https://codereview.chromium.org/196343011
git-svn-id: svn://svn.chromium.org/blink/trunk@169176 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectPythonV8Internal::voidMethodNodeFilterArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
|
static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectPythonV8Internal::voidMethodNodeFilterArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
|
C
|
Chrome
| 0 |
CVE-2015-7513
|
https://www.cvedetails.com/cve/CVE-2015-7513/
| null |
https://github.com/torvalds/linux/commit/0185604c2d82c560dab2f2933a18f797e74ab5a8
|
0185604c2d82c560dab2f2933a18f797e74ab5a8
|
KVM: x86: Reload pit counters for all channels when restoring state
Currently if userspace restores the pit counters with a count of 0
on channels 1 or 2 and the guest attempts to read the count on those
channels, then KVM will perform a mod of 0 and crash. This will ensure
that 0 values are converted to 65536 as per the spec.
This is CVE-2015-7513.
Signed-off-by: Andy Honig <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu,
struct kvm_debugregs *dbgregs)
{
unsigned long val;
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
dbgregs->flags = 0;
memset(&dbgregs->reserved, 0, sizeof(dbgregs->reserved));
}
|
static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu,
struct kvm_debugregs *dbgregs)
{
unsigned long val;
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
dbgregs->flags = 0;
memset(&dbgregs->reserved, 0, sizeof(dbgregs->reserved));
}
|
C
|
linux
| 0 |
CVE-2017-7541
|
https://www.cvedetails.com/cve/CVE-2017-7541/
|
CWE-119
|
https://github.com/torvalds/linux/commit/8f44c9a41386729fea410e688959ddaa9d51be7c
|
8f44c9a41386729fea410e688959ddaa9d51be7c
|
brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx()
The lower level nl80211 code in cfg80211 ensures that "len" is between
25 and NL80211_ATTR_FRAME (2304). We subtract DOT11_MGMT_HDR_LEN (24) from
"len" so thats's max of 2280. However, the action_frame->data[] buffer is
only BRCMF_FIL_ACTION_FRAME_SIZE (1800) bytes long so this memcpy() can
overflow.
memcpy(action_frame->data, &buf[DOT11_MGMT_HDR_LEN],
le16_to_cpu(action_frame->len));
Cc: [email protected] # 3.9.x
Fixes: 18e2f61db3b70 ("brcmfmac: P2P action frame tx.")
Reported-by: "freenerguo(郭大兴)" <[email protected]>
Signed-off-by: Arend van Spriel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
brcmf_alloc_internal_escan_request(struct wiphy *wiphy, u32 n_netinfo) {
struct cfg80211_scan_request *req;
size_t req_size;
req_size = sizeof(*req) +
n_netinfo * sizeof(req->channels[0]) +
n_netinfo * sizeof(*req->ssids);
req = kzalloc(req_size, GFP_KERNEL);
if (req) {
req->wiphy = wiphy;
req->ssids = (void *)(&req->channels[0]) +
n_netinfo * sizeof(req->channels[0]);
}
return req;
}
|
brcmf_alloc_internal_escan_request(struct wiphy *wiphy, u32 n_netinfo) {
struct cfg80211_scan_request *req;
size_t req_size;
req_size = sizeof(*req) +
n_netinfo * sizeof(req->channels[0]) +
n_netinfo * sizeof(*req->ssids);
req = kzalloc(req_size, GFP_KERNEL);
if (req) {
req->wiphy = wiphy;
req->ssids = (void *)(&req->channels[0]) +
n_netinfo * sizeof(req->channels[0]);
}
return req;
}
|
C
|
linux
| 0 |
CVE-2017-6439
|
https://www.cvedetails.com/cve/CVE-2017-6439/
|
CWE-787
|
https://github.com/libimobiledevice/libplist/commit/32ee5213fe64f1e10ec76c1ee861ee6f233120dd
|
32ee5213fe64f1e10ec76c1ee861ee6f233120dd
|
bplist: Fix data range check for string/data/dict/array nodes
Passing a size of 0xFFFFFFFFFFFFFFFF to parse_string_node() might result
in a memcpy with a size of -1, leading to undefined behavior.
This commit makes sure that the actual node data (which depends on the size)
is in the range start_of_object..start_of_object+size.
Credit to OSS-Fuzz
|
static unsigned int plist_data_hash(const void* key)
{
plist_data_t data = plist_get_data((plist_t) key);
unsigned int hash = data->type;
unsigned int i = 0;
char *buff = NULL;
unsigned int size = 0;
switch (data->type)
{
case PLIST_BOOLEAN:
case PLIST_UINT:
case PLIST_REAL:
case PLIST_DATE:
case PLIST_UID:
buff = (char *) &data->intval; //works also for real as we use an union
size = 8;
break;
case PLIST_KEY:
case PLIST_STRING:
buff = data->strval;
size = data->length;
break;
case PLIST_DATA:
case PLIST_ARRAY:
case PLIST_DICT:
buff = (char *) &key;
size = sizeof(const void*);
break;
default:
break;
}
hash += 5381;
for (i = 0; i < size; buff++, i++) {
hash = ((hash << 5) + hash) + *buff;
}
return hash;
}
|
static unsigned int plist_data_hash(const void* key)
{
plist_data_t data = plist_get_data((plist_t) key);
unsigned int hash = data->type;
unsigned int i = 0;
char *buff = NULL;
unsigned int size = 0;
switch (data->type)
{
case PLIST_BOOLEAN:
case PLIST_UINT:
case PLIST_REAL:
case PLIST_DATE:
case PLIST_UID:
buff = (char *) &data->intval; //works also for real as we use an union
size = 8;
break;
case PLIST_KEY:
case PLIST_STRING:
buff = data->strval;
size = data->length;
break;
case PLIST_DATA:
case PLIST_ARRAY:
case PLIST_DICT:
buff = (char *) &key;
size = sizeof(const void*);
break;
default:
break;
}
hash += 5381;
for (i = 0; i < size; buff++, i++) {
hash = ((hash << 5) + hash) + *buff;
}
return hash;
}
|
C
|
libplist
| 0 |
CVE-2016-9317
|
https://www.cvedetails.com/cve/CVE-2016-9317/
|
CWE-20
|
https://github.com/libgd/libgd/commit/1846f48e5fcdde996e7c27a4bbac5d0aef183e4b
|
1846f48e5fcdde996e7c27a4bbac5d0aef183e4b
|
Fix #340: System frozen
gdImageCreate() doesn't check for oversized images and as such is prone
to DoS vulnerabilities. We fix that by applying the same overflow check
that is already in place for gdImageCreateTrueColor().
CVE-2016-9317
|
static void _gdImageFilledHRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
int color)
{
int x, y;
if (x1 == x2 && y1 == y2) {
gdImageSetPixel(im, x1, y1, color);
return;
}
if (x1 > x2) {
x = x1;
x1 = x2;
x2 = x;
}
if (y1 > y2) {
y = y1;
y1 = y2;
y2 = y;
}
if (x1 < 0) {
x1 = 0;
}
if (x2 >= gdImageSX(im)) {
x2 = gdImageSX(im) - 1;
}
if (y1 < 0) {
y1 = 0;
}
if (y2 >= gdImageSY(im)) {
y2 = gdImageSY(im) - 1;
}
for (x = x1; (x <= x2); x++) {
for (y = y1; (y <= y2); y++) {
gdImageSetPixel (im, x, y, color);
}
}
}
|
static void _gdImageFilledHRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
int color)
{
int x, y;
if (x1 == x2 && y1 == y2) {
gdImageSetPixel(im, x1, y1, color);
return;
}
if (x1 > x2) {
x = x1;
x1 = x2;
x2 = x;
}
if (y1 > y2) {
y = y1;
y1 = y2;
y2 = y;
}
if (x1 < 0) {
x1 = 0;
}
if (x2 >= gdImageSX(im)) {
x2 = gdImageSX(im) - 1;
}
if (y1 < 0) {
y1 = 0;
}
if (y2 >= gdImageSY(im)) {
y2 = gdImageSY(im) - 1;
}
for (x = x1; (x <= x2); x++) {
for (y = y1; (y <= y2); y++) {
gdImageSetPixel (im, x, y, color);
}
}
}
|
C
|
libgd
| 0 |
CVE-2017-9994
|
https://www.cvedetails.com/cve/CVE-2017-9994/
|
CWE-119
|
https://github.com/FFmpeg/FFmpeg/commit/6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
|
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
|
avcodec/webp: Always set pix_fmt
Fixes: out of array access
Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632
Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: "Ronald S. Bultje" <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int apply_predictor_transform(WebPContext *s)
{
ImageContext *img = &s->image[IMAGE_ROLE_ARGB];
ImageContext *pimg = &s->image[IMAGE_ROLE_PREDICTOR];
int x, y;
for (y = 0; y < img->frame->height; y++) {
for (x = 0; x < img->frame->width; x++) {
int tx = x >> pimg->size_reduction;
int ty = y >> pimg->size_reduction;
enum PredictionMode m = GET_PIXEL_COMP(pimg->frame, tx, ty, 2);
if (x == 0) {
if (y == 0)
m = PRED_MODE_BLACK;
else
m = PRED_MODE_T;
} else if (y == 0)
m = PRED_MODE_L;
if (m > 13) {
av_log(s->avctx, AV_LOG_ERROR,
"invalid predictor mode: %d\n", m);
return AVERROR_INVALIDDATA;
}
inverse_prediction(img->frame, m, x, y);
}
}
return 0;
}
|
static int apply_predictor_transform(WebPContext *s)
{
ImageContext *img = &s->image[IMAGE_ROLE_ARGB];
ImageContext *pimg = &s->image[IMAGE_ROLE_PREDICTOR];
int x, y;
for (y = 0; y < img->frame->height; y++) {
for (x = 0; x < img->frame->width; x++) {
int tx = x >> pimg->size_reduction;
int ty = y >> pimg->size_reduction;
enum PredictionMode m = GET_PIXEL_COMP(pimg->frame, tx, ty, 2);
if (x == 0) {
if (y == 0)
m = PRED_MODE_BLACK;
else
m = PRED_MODE_T;
} else if (y == 0)
m = PRED_MODE_L;
if (m > 13) {
av_log(s->avctx, AV_LOG_ERROR,
"invalid predictor mode: %d\n", m);
return AVERROR_INVALIDDATA;
}
inverse_prediction(img->frame, m, x, y);
}
}
return 0;
}
|
C
|
FFmpeg
| 0 |
CVE-2011-3346
|
https://www.cvedetails.com/cve/CVE-2011-3346/
|
CWE-119
|
https://github.com/bonzini/qemu/commit/7285477ab11831b1cf56e45878a89170dd06d9b9
|
7285477ab11831b1cf56e45878a89170dd06d9b9
|
scsi-disk: lazily allocate bounce buffer
It will not be needed for reads and writes if the HBA provides a sglist.
In addition, this lets scsi-disk refuse commands with an excessive
allocation length, as well as limit memory on usual well-behaved guests.
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
static uint32_t scsi_init_iovec(SCSIDiskReq *r)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
if (!r->iov.iov_base) {
r->buflen = SCSI_DMA_BUF_SIZE;
r->iov.iov_base = qemu_blockalign(s->bs, r->buflen);
}
r->iov.iov_len = MIN(r->sector_count * 512, r->buflen);
qemu_iovec_init_external(&r->qiov, &r->iov, 1);
return r->qiov.size / 512;
}
|
static uint32_t scsi_init_iovec(SCSIDiskReq *r)
{
r->iov.iov_len = MIN(r->sector_count * 512, SCSI_DMA_BUF_SIZE);
qemu_iovec_init_external(&r->qiov, &r->iov, 1);
return r->qiov.size / 512;
}
|
C
|
qemu
| 1 |
CVE-2012-6546
|
https://www.cvedetails.com/cve/CVE-2012-6546/
|
CWE-200
|
https://github.com/torvalds/linux/commit/e862f1a9b7df4e8196ebec45ac62295138aa3fc2
|
e862f1a9b7df4e8196ebec45ac62295138aa3fc2
|
atm: fix info leak in getsockopt(SO_ATMPVC)
The ATM code fails to initialize the two padding bytes of struct
sockaddr_atmpvc inserted for alignment. Add an explicit memset(0)
before filling the structure to avoid the info leak.
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
void atm_dev_release_vccs(struct atm_dev *dev)
{
int i;
write_lock_irq(&vcc_sklist_lock);
for (i = 0; i < VCC_HTABLE_SIZE; i++) {
struct hlist_head *head = &vcc_hash[i];
struct hlist_node *node, *tmp;
struct sock *s;
struct atm_vcc *vcc;
sk_for_each_safe(s, node, tmp, head) {
vcc = atm_sk(s);
if (vcc->dev == dev) {
vcc_release_async(vcc, -EPIPE);
sk_del_node_init(s);
}
}
}
write_unlock_irq(&vcc_sklist_lock);
}
|
void atm_dev_release_vccs(struct atm_dev *dev)
{
int i;
write_lock_irq(&vcc_sklist_lock);
for (i = 0; i < VCC_HTABLE_SIZE; i++) {
struct hlist_head *head = &vcc_hash[i];
struct hlist_node *node, *tmp;
struct sock *s;
struct atm_vcc *vcc;
sk_for_each_safe(s, node, tmp, head) {
vcc = atm_sk(s);
if (vcc->dev == dev) {
vcc_release_async(vcc, -EPIPE);
sk_del_node_init(s);
}
}
}
write_unlock_irq(&vcc_sklist_lock);
}
|
C
|
linux
| 0 |
CVE-2016-10048
|
https://www.cvedetails.com/cve/CVE-2016-10048/
|
CWE-22
|
https://github.com/ImageMagick/ImageMagick/commit/fc6080f1321fd21e86ef916195cc110b05d9effb
|
fc6080f1321fd21e86ef916195cc110b05d9effb
|
Coder path traversal is not authorized, bug report provided by Masaaki Chida
|
static XMLTreeInfo *ParseCloseTag(XMLTreeRoot *root,char *tag,
ExceptionInfo *exception)
{
if ((root->node == (XMLTreeInfo *) NULL) ||
(root->node->tag == (char *) NULL) || (strcmp(tag,root->node->tag) != 0))
{
(void) ThrowMagickException(exception,GetMagickModule(),OptionWarning,
"ParseError","unexpected closing tag </%s>",tag);
return(&root->root);
}
root->node=root->node->parent;
return((XMLTreeInfo *) NULL);
}
|
static XMLTreeInfo *ParseCloseTag(XMLTreeRoot *root,char *tag,
ExceptionInfo *exception)
{
if ((root->node == (XMLTreeInfo *) NULL) ||
(root->node->tag == (char *) NULL) || (strcmp(tag,root->node->tag) != 0))
{
(void) ThrowMagickException(exception,GetMagickModule(),OptionWarning,
"ParseError","unexpected closing tag </%s>",tag);
return(&root->root);
}
root->node=root->node->parent;
return((XMLTreeInfo *) NULL);
}
|
C
|
ImageMagick
| 0 |
CVE-2019-15920
|
https://www.cvedetails.com/cve/CVE-2019-15920/
|
CWE-416
|
https://github.com/torvalds/linux/commit/088aaf17aa79300cab14dbee2569c58cfafd7d6e
|
088aaf17aa79300cab14dbee2569c58cfafd7d6e
|
cifs: Fix use-after-free in SMB2_read
There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_read+0x1136/0x1190
Read of size 8 at addr ffff8880b4e45e50 by task ln/1009
Should not release the 'req' because it will use in the trace.
Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 debugging")
Signed-off-by: ZhangXiaoxu <[email protected]>
Signed-off-by: Steve French <[email protected]>
CC: Stable <[email protected]> 4.18+
Reviewed-by: Pavel Shilovsky <[email protected]>
|
add_durable_v2_context(struct kvec *iov, unsigned int *num_iovec,
struct cifs_open_parms *oparms)
{
struct smb2_create_req *req = iov[0].iov_base;
unsigned int num = *num_iovec;
iov[num].iov_base = create_durable_v2_buf(oparms);
if (iov[num].iov_base == NULL)
return -ENOMEM;
iov[num].iov_len = sizeof(struct create_durable_v2);
if (!req->CreateContextsOffset)
req->CreateContextsOffset =
cpu_to_le32(sizeof(struct smb2_create_req) +
iov[1].iov_len);
le32_add_cpu(&req->CreateContextsLength, sizeof(struct create_durable_v2));
*num_iovec = num + 1;
return 0;
}
|
add_durable_v2_context(struct kvec *iov, unsigned int *num_iovec,
struct cifs_open_parms *oparms)
{
struct smb2_create_req *req = iov[0].iov_base;
unsigned int num = *num_iovec;
iov[num].iov_base = create_durable_v2_buf(oparms);
if (iov[num].iov_base == NULL)
return -ENOMEM;
iov[num].iov_len = sizeof(struct create_durable_v2);
if (!req->CreateContextsOffset)
req->CreateContextsOffset =
cpu_to_le32(sizeof(struct smb2_create_req) +
iov[1].iov_len);
le32_add_cpu(&req->CreateContextsLength, sizeof(struct create_durable_v2));
*num_iovec = num + 1;
return 0;
}
|
C
|
linux
| 0 |
CVE-2011-3084
|
https://www.cvedetails.com/cve/CVE-2011-3084/
|
CWE-264
|
https://github.com/chromium/chromium/commit/744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
Allow browser to handle all WebUI navigations.
BUG=113496
TEST="Google Dashboard" link in Sync settings loads in new process.
Review URL: http://codereview.chromium.org/9663045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126949 0039d316-1c4b-4281-b951-d872f2087c98
|
void ExtensionDevToolsClientHost::SendDetachedEvent() {
Profile* profile =
Profile::FromBrowserContext(web_contents_->GetBrowserContext());
if (profile != NULL && profile->GetExtensionEventRouter()) {
ListValue args;
args.Append(CreateDebuggeeId(tab_id_));
std::string json_args;
base::JSONWriter::Write(&args, false, &json_args);
profile->GetExtensionEventRouter()->DispatchEventToExtension(
extension_id_, keys::kOnDetach, json_args, profile, GURL());
}
}
|
void ExtensionDevToolsClientHost::SendDetachedEvent() {
Profile* profile =
Profile::FromBrowserContext(web_contents_->GetBrowserContext());
if (profile != NULL && profile->GetExtensionEventRouter()) {
ListValue args;
args.Append(CreateDebuggeeId(tab_id_));
std::string json_args;
base::JSONWriter::Write(&args, false, &json_args);
profile->GetExtensionEventRouter()->DispatchEventToExtension(
extension_id_, keys::kOnDetach, json_args, profile, GURL());
}
}
|
C
|
Chrome
| 0 |
CVE-2018-6125
| null | null |
https://github.com/chromium/chromium/commit/ac149a8d4371c0e01e0934fdd57b09e86f96b5b9
|
ac149a8d4371c0e01e0934fdd57b09e86f96b5b9
|
Remove libusb-Windows support for HID devices
This patch removes the Windows-specific support in libusb that provided
a translation between the WinUSB API and the HID API. Applications
currently depending on this using the chrome.usb API should switch to
using the chrome.hid API.
Bug: 818592
Change-Id: I82ee6ccdcbccc21d2910dc62845c7785e78b64f6
Reviewed-on: https://chromium-review.googlesource.com/951635
Reviewed-by: Ken Rockot <[email protected]>
Commit-Queue: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/master@{#541265}
|
static void auto_release(struct usbi_transfer *itransfer)
{
struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
libusb_device_handle *dev_handle = transfer->dev_handle;
struct windows_device_handle_priv* handle_priv = _device_handle_priv(dev_handle);
int r;
usbi_mutex_lock(&autoclaim_lock);
if (handle_priv->autoclaim_count[transfer_priv->interface_number] > 0) {
handle_priv->autoclaim_count[transfer_priv->interface_number]--;
if (handle_priv->autoclaim_count[transfer_priv->interface_number] == 0) {
r = libusb_release_interface(dev_handle, transfer_priv->interface_number);
if (r == LIBUSB_SUCCESS) {
usbi_dbg("auto-released interface %d", transfer_priv->interface_number);
} else {
usbi_dbg("failed to auto-release interface %d (%s)",
transfer_priv->interface_number, libusb_error_name((enum libusb_error)r));
}
}
}
usbi_mutex_unlock(&autoclaim_lock);
}
|
static void auto_release(struct usbi_transfer *itransfer)
{
struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer);
struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
libusb_device_handle *dev_handle = transfer->dev_handle;
struct windows_device_handle_priv* handle_priv = _device_handle_priv(dev_handle);
int r;
usbi_mutex_lock(&autoclaim_lock);
if (handle_priv->autoclaim_count[transfer_priv->interface_number] > 0) {
handle_priv->autoclaim_count[transfer_priv->interface_number]--;
if (handle_priv->autoclaim_count[transfer_priv->interface_number] == 0) {
r = libusb_release_interface(dev_handle, transfer_priv->interface_number);
if (r == LIBUSB_SUCCESS) {
usbi_dbg("auto-released interface %d", transfer_priv->interface_number);
} else {
usbi_dbg("failed to auto-release interface %d (%s)",
transfer_priv->interface_number, libusb_error_name((enum libusb_error)r));
}
}
}
usbi_mutex_unlock(&autoclaim_lock);
}
|
C
|
Chrome
| 0 |
CVE-2017-6903
|
https://www.cvedetails.com/cve/CVE-2017-6903/
|
CWE-269
|
https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20
|
b6ff2bcb1e4e6976d61e316175c6d7c99860fe20
|
All: Don't load .pk3s as .dlls, and don't load user config files from .pk3s
|
qboolean CL_CheckPaused(void)
{
if(cl_paused->integer || cl_paused->modified)
return qtrue;
return qfalse;
}
|
qboolean CL_CheckPaused(void)
{
if(cl_paused->integer || cl_paused->modified)
return qtrue;
return qfalse;
}
|
C
|
OpenJK
| 0 |
CVE-2018-18350
|
https://www.cvedetails.com/cve/CVE-2018-18350/
| null |
https://github.com/chromium/chromium/commit/d683fb12566eaec180ee0e0506288f46cc7a43e7
|
d683fb12566eaec180ee0e0506288f46cc7a43e7
|
Inherit CSP when self-navigating to local-scheme URL
As the linked bug example shows, we should inherit CSP when we navigate
to a local-scheme URL (even if we are in a main browsing context).
Bug: 799747
Change-Id: I8413aa8e8049461ebcf0ffbf7b04c41d1340af02
Reviewed-on: https://chromium-review.googlesource.com/c/1234337
Reviewed-by: Mike West <[email protected]>
Commit-Queue: Andy Paicu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#597889}
|
void DocumentLoader::StopLoading() {
fetcher_->StopFetching();
if (frame_ && !SentDidFinishLoad())
LoadFailed(ResourceError::CancelledError(Url()));
}
|
void DocumentLoader::StopLoading() {
fetcher_->StopFetching();
if (frame_ && !SentDidFinishLoad())
LoadFailed(ResourceError::CancelledError(Url()));
}
|
C
|
Chrome
| 0 |
CVE-2013-1774
|
https://www.cvedetails.com/cve/CVE-2013-1774/
|
CWE-264
|
https://github.com/torvalds/linux/commit/1ee0a224bc9aad1de496c795f96bc6ba2c394811
|
1ee0a224bc9aad1de496c795f96bc6ba2c394811
|
USB: io_ti: Fix NULL dereference in chase_port()
The tty is NULL when the port is hanging up.
chase_port() needs to check for this.
This patch is intended for stable series.
The behavior was observed and tested in Linux 3.2 and 3.7.1.
Johan Hovold submitted a more elaborate patch for the mainline kernel.
[ 56.277883] usb 1-1: edge_bulk_in_callback - nonzero read bulk status received: -84
[ 56.278811] usb 1-1: USB disconnect, device number 3
[ 56.278856] usb 1-1: edge_bulk_in_callback - stopping read!
[ 56.279562] BUG: unable to handle kernel NULL pointer dereference at 00000000000001c8
[ 56.280536] IP: [<ffffffff8144e62a>] _raw_spin_lock_irqsave+0x19/0x35
[ 56.281212] PGD 1dc1b067 PUD 1e0f7067 PMD 0
[ 56.282085] Oops: 0002 [#1] SMP
[ 56.282744] Modules linked in:
[ 56.283512] CPU 1
[ 56.283512] Pid: 25, comm: khubd Not tainted 3.7.1 #1 innotek GmbH VirtualBox/VirtualBox
[ 56.283512] RIP: 0010:[<ffffffff8144e62a>] [<ffffffff8144e62a>] _raw_spin_lock_irqsave+0x19/0x35
[ 56.283512] RSP: 0018:ffff88001fa99ab0 EFLAGS: 00010046
[ 56.283512] RAX: 0000000000000046 RBX: 00000000000001c8 RCX: 0000000000640064
[ 56.283512] RDX: 0000000000010000 RSI: ffff88001fa99b20 RDI: 00000000000001c8
[ 56.283512] RBP: ffff88001fa99b20 R08: 0000000000000000 R09: 0000000000000000
[ 56.283512] R10: 0000000000000000 R11: ffffffff812fcb4c R12: ffff88001ddf53c0
[ 56.283512] R13: 0000000000000000 R14: 00000000000001c8 R15: ffff88001e19b9f4
[ 56.283512] FS: 0000000000000000(0000) GS:ffff88001fd00000(0000) knlGS:0000000000000000
[ 56.283512] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 56.283512] CR2: 00000000000001c8 CR3: 000000001dc51000 CR4: 00000000000006e0
[ 56.283512] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 56.283512] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 56.283512] Process khubd (pid: 25, threadinfo ffff88001fa98000, task ffff88001fa94f80)
[ 56.283512] Stack:
[ 56.283512] 0000000000000046 00000000000001c8 ffffffff810578ec ffffffff812fcb4c
[ 56.283512] ffff88001e19b980 0000000000002710 ffffffff812ffe81 0000000000000001
[ 56.283512] ffff88001fa94f80 0000000000000202 ffffffff00000001 0000000000000296
[ 56.283512] Call Trace:
[ 56.283512] [<ffffffff810578ec>] ? add_wait_queue+0x12/0x3c
[ 56.283512] [<ffffffff812fcb4c>] ? usb_serial_port_work+0x28/0x28
[ 56.283512] [<ffffffff812ffe81>] ? chase_port+0x84/0x2d6
[ 56.283512] [<ffffffff81063f27>] ? try_to_wake_up+0x199/0x199
[ 56.283512] [<ffffffff81263a5c>] ? tty_ldisc_hangup+0x222/0x298
[ 56.283512] [<ffffffff81300171>] ? edge_close+0x64/0x129
[ 56.283512] [<ffffffff810612f7>] ? __wake_up+0x35/0x46
[ 56.283512] [<ffffffff8106135b>] ? should_resched+0x5/0x23
[ 56.283512] [<ffffffff81264916>] ? tty_port_shutdown+0x39/0x44
[ 56.283512] [<ffffffff812fcb4c>] ? usb_serial_port_work+0x28/0x28
[ 56.283512] [<ffffffff8125d38c>] ? __tty_hangup+0x307/0x351
[ 56.283512] [<ffffffff812e6ddc>] ? usb_hcd_flush_endpoint+0xde/0xed
[ 56.283512] [<ffffffff8144e625>] ? _raw_spin_lock_irqsave+0x14/0x35
[ 56.283512] [<ffffffff812fd361>] ? usb_serial_disconnect+0x57/0xc2
[ 56.283512] [<ffffffff812ea99b>] ? usb_unbind_interface+0x5c/0x131
[ 56.283512] [<ffffffff8128d738>] ? __device_release_driver+0x7f/0xd5
[ 56.283512] [<ffffffff8128d9cd>] ? device_release_driver+0x1a/0x25
[ 56.283512] [<ffffffff8128d393>] ? bus_remove_device+0xd2/0xe7
[ 56.283512] [<ffffffff8128b7a3>] ? device_del+0x119/0x167
[ 56.283512] [<ffffffff812e8d9d>] ? usb_disable_device+0x6a/0x180
[ 56.283512] [<ffffffff812e2ae0>] ? usb_disconnect+0x81/0xe6
[ 56.283512] [<ffffffff812e4435>] ? hub_thread+0x577/0xe82
[ 56.283512] [<ffffffff8144daa7>] ? __schedule+0x490/0x4be
[ 56.283512] [<ffffffff8105798f>] ? abort_exclusive_wait+0x79/0x79
[ 56.283512] [<ffffffff812e3ebe>] ? usb_remote_wakeup+0x2f/0x2f
[ 56.283512] [<ffffffff812e3ebe>] ? usb_remote_wakeup+0x2f/0x2f
[ 56.283512] [<ffffffff810570b4>] ? kthread+0x81/0x89
[ 56.283512] [<ffffffff81057033>] ? __kthread_parkme+0x5c/0x5c
[ 56.283512] [<ffffffff8145387c>] ? ret_from_fork+0x7c/0xb0
[ 56.283512] [<ffffffff81057033>] ? __kthread_parkme+0x5c/0x5c
[ 56.283512] Code: 8b 7c 24 08 e8 17 0b c3 ff 48 8b 04 24 48 83 c4 10 c3 53 48 89 fb 41 50 e8 e0 0a c3 ff 48 89 04 24 e8 e7 0a c3 ff ba 00 00 01 00
<f0> 0f c1 13 48 8b 04 24 89 d1 c1 ea 10 66 39 d1 74 07 f3 90 66
[ 56.283512] RIP [<ffffffff8144e62a>] _raw_spin_lock_irqsave+0x19/0x35
[ 56.283512] RSP <ffff88001fa99ab0>
[ 56.283512] CR2: 00000000000001c8
[ 56.283512] ---[ end trace 49714df27e1679ce ]---
Signed-off-by: Wolfgang Frisch <[email protected]>
Cc: Johan Hovold <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static int edge_get_icount(struct tty_struct *tty,
struct serial_icounter_struct *icount)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
struct async_icount *ic = &edge_port->icount;
icount->cts = ic->cts;
icount->dsr = ic->dsr;
icount->rng = ic->rng;
icount->dcd = ic->dcd;
icount->tx = ic->tx;
icount->rx = ic->rx;
icount->frame = ic->frame;
icount->parity = ic->parity;
icount->overrun = ic->overrun;
icount->brk = ic->brk;
icount->buf_overrun = ic->buf_overrun;
return 0;
}
|
static int edge_get_icount(struct tty_struct *tty,
struct serial_icounter_struct *icount)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
struct async_icount *ic = &edge_port->icount;
icount->cts = ic->cts;
icount->dsr = ic->dsr;
icount->rng = ic->rng;
icount->dcd = ic->dcd;
icount->tx = ic->tx;
icount->rx = ic->rx;
icount->frame = ic->frame;
icount->parity = ic->parity;
icount->overrun = ic->overrun;
icount->brk = ic->brk;
icount->buf_overrun = ic->buf_overrun;
return 0;
}
|
C
|
linux
| 0 |
CVE-2016-2544
|
https://www.cvedetails.com/cve/CVE-2016-2544/
|
CWE-362
|
https://github.com/torvalds/linux/commit/3567eb6af614dac436c4b16a8d426f9faed639b3
|
3567eb6af614dac436c4b16a8d426f9faed639b3
|
ALSA: seq: Fix race at timer setup and close
ALSA sequencer code has an open race between the timer setup ioctl and
the close of the client. This was triggered by syzkaller fuzzer, and
a use-after-free was caught there as a result.
This patch papers over it by adding a proper queue->timer_mutex lock
around the timer-related calls in the relevant code path.
Reported-by: Dmitry Vyukov <[email protected]>
Tested-by: Dmitry Vyukov <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
|
struct snd_seq_queue *queueptr(int queueid)
{
struct snd_seq_queue *q;
unsigned long flags;
if (queueid < 0 || queueid >= SNDRV_SEQ_MAX_QUEUES)
return NULL;
spin_lock_irqsave(&queue_list_lock, flags);
q = queue_list[queueid];
if (q)
snd_use_lock_use(&q->use_lock);
spin_unlock_irqrestore(&queue_list_lock, flags);
return q;
}
|
struct snd_seq_queue *queueptr(int queueid)
{
struct snd_seq_queue *q;
unsigned long flags;
if (queueid < 0 || queueid >= SNDRV_SEQ_MAX_QUEUES)
return NULL;
spin_lock_irqsave(&queue_list_lock, flags);
q = queue_list[queueid];
if (q)
snd_use_lock_use(&q->use_lock);
spin_unlock_irqrestore(&queue_list_lock, flags);
return q;
}
|
C
|
linux
| 0 |
CVE-2014-4656
|
https://www.cvedetails.com/cve/CVE-2014-4656/
|
CWE-189
|
https://github.com/torvalds/linux/commit/ac902c112d90a89e59916f751c2745f4dbdbb4bd
|
ac902c112d90a89e59916f751c2745f4dbdbb4bd
|
ALSA: control: Handle numid overflow
Each control gets automatically assigned its numids when the control is created.
The allocation is done by incrementing the numid by the amount of allocated
numids per allocation. This means that excessive creation and destruction of
controls (e.g. via SNDRV_CTL_IOCTL_ELEM_ADD/REMOVE) can cause the id to
eventually overflow. Currently when this happens for the control that caused the
overflow kctl->id.numid + kctl->count will also over flow causing it to be
smaller than kctl->id.numid. Most of the code assumes that this is something
that can not happen, so we need to make sure that it won't happen
Signed-off-by: Lars-Peter Clausen <[email protected]>
Acked-by: Jaroslav Kysela <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
|
static int snd_ctl_dev_disconnect(struct snd_device *device)
{
struct snd_card *card = device->device_data;
struct snd_ctl_file *ctl;
int err, cardnum;
if (snd_BUG_ON(!card))
return -ENXIO;
cardnum = card->number;
if (snd_BUG_ON(cardnum < 0 || cardnum >= SNDRV_CARDS))
return -ENXIO;
read_lock(&card->ctl_files_rwlock);
list_for_each_entry(ctl, &card->ctl_files, list) {
wake_up(&ctl->change_sleep);
kill_fasync(&ctl->fasync, SIGIO, POLL_ERR);
}
read_unlock(&card->ctl_files_rwlock);
if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL,
card, -1)) < 0)
return err;
return 0;
}
|
static int snd_ctl_dev_disconnect(struct snd_device *device)
{
struct snd_card *card = device->device_data;
struct snd_ctl_file *ctl;
int err, cardnum;
if (snd_BUG_ON(!card))
return -ENXIO;
cardnum = card->number;
if (snd_BUG_ON(cardnum < 0 || cardnum >= SNDRV_CARDS))
return -ENXIO;
read_lock(&card->ctl_files_rwlock);
list_for_each_entry(ctl, &card->ctl_files, list) {
wake_up(&ctl->change_sleep);
kill_fasync(&ctl->fasync, SIGIO, POLL_ERR);
}
read_unlock(&card->ctl_files_rwlock);
if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL,
card, -1)) < 0)
return err;
return 0;
}
|
C
|
linux
| 0 |
CVE-2015-5195
|
https://www.cvedetails.com/cve/CVE-2015-5195/
|
CWE-20
|
https://github.com/ntp-project/ntp/commit/52e977d79a0c4ace997e5c74af429844da2f27be
|
52e977d79a0c4ace997e5c74af429844da2f27be
|
[Bug 1773] openssl not detected during ./configure.
[Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
|
config_vars(
config_tree *ptree
)
{
attr_val *curr_var;
int len;
curr_var = HEAD_PFIFO(ptree->vars);
for (; curr_var != NULL; curr_var = curr_var->link) {
/* Determine which variable to set and set it */
switch (curr_var->attr) {
case T_Broadcastdelay:
proto_config(PROTO_BROADDELAY, 0, curr_var->value.d, NULL);
break;
case T_Tick:
proto_config(PROTO_ADJ, 0, curr_var->value.d, NULL);
break;
case T_Driftfile:
if ('\0' == curr_var->value.s[0]) {
stats_drift_file = 0;
msyslog(LOG_INFO, "config: driftfile disabled\n");
} else
stats_config(STATS_FREQ_FILE, curr_var->value.s);
break;
case T_Ident:
sys_ident = curr_var->value.s;
break;
case T_WanderThreshold: /* FALLTHROUGH */
case T_Nonvolatile:
wander_threshold = curr_var->value.d;
break;
case T_Leapfile:
stats_config(STATS_LEAP_FILE, curr_var->value.s);
break;
case T_Pidfile:
stats_config(STATS_PID_FILE, curr_var->value.s);
break;
case T_Logfile:
if (-1 == change_logfile(curr_var->value.s, 0))
msyslog(LOG_ERR,
"Cannot open logfile %s: %m",
curr_var->value.s);
break;
case T_Saveconfigdir:
if (saveconfigdir != NULL)
free(saveconfigdir);
len = strlen(curr_var->value.s);
if (0 == len) {
saveconfigdir = NULL;
} else if (DIR_SEP != curr_var->value.s[len - 1]
#ifdef SYS_WINNT /* slash is also a dir. sep. on Windows */
&& '/' != curr_var->value.s[len - 1]
#endif
) {
len++;
saveconfigdir = emalloc(len + 1);
snprintf(saveconfigdir, len + 1,
"%s%c",
curr_var->value.s,
DIR_SEP);
} else {
saveconfigdir = estrdup(
curr_var->value.s);
}
break;
case T_Automax:
#ifdef AUTOKEY
sys_automax = curr_var->value.i;
#endif
break;
default:
msyslog(LOG_ERR,
"config_vars(): unexpected token %d",
curr_var->attr);
}
}
}
|
config_vars(
config_tree *ptree
)
{
attr_val *curr_var;
int len;
curr_var = HEAD_PFIFO(ptree->vars);
for (; curr_var != NULL; curr_var = curr_var->link) {
/* Determine which variable to set and set it */
switch (curr_var->attr) {
case T_Broadcastdelay:
proto_config(PROTO_BROADDELAY, 0, curr_var->value.d, NULL);
break;
case T_Tick:
proto_config(PROTO_ADJ, 0, curr_var->value.d, NULL);
break;
case T_Driftfile:
if ('\0' == curr_var->value.s[0]) {
stats_drift_file = 0;
msyslog(LOG_INFO, "config: driftfile disabled\n");
} else
stats_config(STATS_FREQ_FILE, curr_var->value.s);
break;
case T_Ident:
sys_ident = curr_var->value.s;
break;
case T_WanderThreshold: /* FALLTHROUGH */
case T_Nonvolatile:
wander_threshold = curr_var->value.d;
break;
case T_Leapfile:
stats_config(STATS_LEAP_FILE, curr_var->value.s);
break;
case T_Pidfile:
stats_config(STATS_PID_FILE, curr_var->value.s);
break;
case T_Logfile:
if (-1 == change_logfile(curr_var->value.s, 0))
msyslog(LOG_ERR,
"Cannot open logfile %s: %m",
curr_var->value.s);
break;
case T_Saveconfigdir:
if (saveconfigdir != NULL)
free(saveconfigdir);
len = strlen(curr_var->value.s);
if (0 == len) {
saveconfigdir = NULL;
} else if (DIR_SEP != curr_var->value.s[len - 1]
#ifdef SYS_WINNT /* slash is also a dir. sep. on Windows */
&& '/' != curr_var->value.s[len - 1]
#endif
) {
len++;
saveconfigdir = emalloc(len + 1);
snprintf(saveconfigdir, len + 1,
"%s%c",
curr_var->value.s,
DIR_SEP);
} else {
saveconfigdir = estrdup(
curr_var->value.s);
}
break;
case T_Automax:
#ifdef AUTOKEY
sys_automax = curr_var->value.i;
#endif
break;
default:
msyslog(LOG_ERR,
"config_vars(): unexpected token %d",
curr_var->attr);
}
}
}
|
C
|
ntp
| 0 |
CVE-2015-6787
|
https://www.cvedetails.com/cve/CVE-2015-6787/
| null |
https://github.com/chromium/chromium/commit/f911e11e7f6b5c0d6f5ee694a9871de6619889f7
|
f911e11e7f6b5c0d6f5ee694a9871de6619889f7
|
Reland "[CI] Make paint property nodes non-ref-counted"
This reverts commit 887383b30842d9d9006e11bb6932660a3cb5b1b7.
Reason for revert: Retry in M69.
Original change's description:
> Revert "[CI] Make paint property nodes non-ref-counted"
>
> This reverts commit 70fc0b018c9517558b7aa2be00edf2debb449123.
>
> Reason for revert: Caused bugs found by clusterfuzz
>
> Original change's description:
> > [CI] Make paint property nodes non-ref-counted
> >
> > Now all paint property nodes are owned by ObjectPaintProperties
> > (and LocalFrameView temporarily before removing non-RLS mode).
> > Others just use raw pointers or references.
> >
> > Bug: 833496
> > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> > Change-Id: I2d544fe153bb94698623248748df63c8aa2081ae
> > Reviewed-on: https://chromium-review.googlesource.com/1031101
> > Reviewed-by: Tien-Ren Chen <[email protected]>
> > Commit-Queue: Xianzhu Wang <[email protected]>
> > Cr-Commit-Position: refs/heads/master@{#554626}
>
> [email protected],[email protected],[email protected]
>
> Change-Id: I02bb50d6744cb81a797246a0116b677e80a3c69f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 833496,837932,837943
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Reviewed-on: https://chromium-review.googlesource.com/1034292
> Reviewed-by: Xianzhu Wang <[email protected]>
> Commit-Queue: Xianzhu Wang <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#554653}
[email protected],[email protected],[email protected]
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 833496, 837932, 837943
Change-Id: I0b4ef70db1f1f211ba97c30d617225355c750992
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/1083491
Commit-Queue: Xianzhu Wang <[email protected]>
Reviewed-by: Xianzhu Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#563930}
|
TestDisplayItemRequiringSeparateChunk(const DisplayItemClient& client)
: TestChunkerDisplayItem(client, DisplayItem::kForeignLayerPlugin) {}
|
TestDisplayItemRequiringSeparateChunk(const DisplayItemClient& client)
: TestChunkerDisplayItem(client, DisplayItem::kForeignLayerPlugin) {}
|
C
|
Chrome
| 0 |
CVE-2013-3301
|
https://www.cvedetails.com/cve/CVE-2013-3301/
| null |
https://github.com/torvalds/linux/commit/6a76f8c0ab19f215af2a3442870eeb5f0e81998d
|
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
|
tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic.
It can be easily reproduced with following command:
$ cd /sys/kernel/debug/tracing
$ echo 1234 | sudo tee -a set_ftrace_pid
In this example, GNU coreutils' tee opens the file with fopen(, "a")
and then the fopen() internally calls lseek().
Link: http://lkml.kernel.org/r/[email protected]
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: [email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
|
static int ftrace_profile_init_cpu(int cpu)
{
struct ftrace_profile_stat *stat;
int size;
stat = &per_cpu(ftrace_profile_stats, cpu);
if (stat->hash) {
/* If the profile is already created, simply reset it */
ftrace_profile_reset(stat);
return 0;
}
/*
* We are profiling all functions, but usually only a few thousand
* functions are hit. We'll make a hash of 1024 items.
*/
size = FTRACE_PROFILE_HASH_SIZE;
stat->hash = kzalloc(sizeof(struct hlist_head) * size, GFP_KERNEL);
if (!stat->hash)
return -ENOMEM;
if (!ftrace_profile_bits) {
size--;
for (; size; size >>= 1)
ftrace_profile_bits++;
}
/* Preallocate the function profiling pages */
if (ftrace_profile_pages_init(stat) < 0) {
kfree(stat->hash);
stat->hash = NULL;
return -ENOMEM;
}
return 0;
}
|
static int ftrace_profile_init_cpu(int cpu)
{
struct ftrace_profile_stat *stat;
int size;
stat = &per_cpu(ftrace_profile_stats, cpu);
if (stat->hash) {
/* If the profile is already created, simply reset it */
ftrace_profile_reset(stat);
return 0;
}
/*
* We are profiling all functions, but usually only a few thousand
* functions are hit. We'll make a hash of 1024 items.
*/
size = FTRACE_PROFILE_HASH_SIZE;
stat->hash = kzalloc(sizeof(struct hlist_head) * size, GFP_KERNEL);
if (!stat->hash)
return -ENOMEM;
if (!ftrace_profile_bits) {
size--;
for (; size; size >>= 1)
ftrace_profile_bits++;
}
/* Preallocate the function profiling pages */
if (ftrace_profile_pages_init(stat) < 0) {
kfree(stat->hash);
stat->hash = NULL;
return -ENOMEM;
}
return 0;
}
|
C
|
linux
| 0 |
CVE-2018-14568
|
https://www.cvedetails.com/cve/CVE-2018-14568/
| null |
https://github.com/OISF/suricata/pull/3428/commits/843d0b7a10bb45627f94764a6c5d468a24143345
|
843d0b7a10bb45627f94764a6c5d468a24143345
|
stream: support RST getting lost/ignored
In case of a valid RST on a SYN, the state is switched to 'TCP_CLOSED'.
However, the target of the RST may not have received it, or may not
have accepted it. Also, the RST may have been injected, so the supposed
sender may not actually be aware of the RST that was sent in it's name.
In this case the previous behavior was to switch the state to CLOSED and
accept no further TCP updates or stream reassembly.
This patch changes this. It still switches the state to CLOSED, as this
is by far the most likely to be correct. However, it will reconsider
the state if the receiver continues to talk.
To do this on each state change the previous state will be recorded in
TcpSession::pstate. If a non-RST packet is received after a RST, this
TcpSession::pstate is used to try to continue the conversation.
If the (supposed) sender of the RST is also continueing the conversation
as normal, it's highly likely it didn't send the RST. In this case
a stream event is generated.
Ticket: #2501
Reported-By: Kirill Shipulin
|
static int StreamTcpPacketIsBadWindowUpdate(TcpSession *ssn, Packet *p)
{
TcpStream *stream = NULL, *ostream = NULL;
uint32_t seq;
uint32_t ack;
uint32_t pkt_win;
if (p->flags & PKT_PSEUDO_STREAM_END)
return 0;
if (ssn->state < TCP_ESTABLISHED || ssn->state == TCP_CLOSED)
return 0;
if ((p->tcph->th_flags & (TH_SYN|TH_FIN|TH_RST)) != 0)
return 0;
if (PKT_IS_TOSERVER(p)) {
stream = &ssn->client;
ostream = &ssn->server;
} else {
stream = &ssn->server;
ostream = &ssn->client;
}
seq = TCP_GET_SEQ(p);
ack = TCP_GET_ACK(p);
pkt_win = TCP_GET_WINDOW(p) << ostream->wscale;
if (pkt_win < ostream->window) {
uint32_t diff = ostream->window - pkt_win;
if (diff > p->payload_len &&
SEQ_GT(ack, ostream->next_seq) &&
SEQ_GT(seq, stream->next_seq))
{
SCLogDebug("%"PRIu64", pkt_win %u, stream win %u, diff %u, dsize %u",
p->pcap_cnt, pkt_win, ostream->window, diff, p->payload_len);
SCLogDebug("%"PRIu64", pkt_win %u, stream win %u",
p->pcap_cnt, pkt_win, ostream->window);
SCLogDebug("%"PRIu64", seq %u ack %u ostream->next_seq %u ostream->last_ack %u, ostream->next_win %u, diff %u (%u)",
p->pcap_cnt, seq, ack, ostream->next_seq, ostream->last_ack, ostream->next_win,
ostream->next_seq - ostream->last_ack, stream->next_seq - stream->last_ack);
/* get the expected window shrinking from looking at ack vs last_ack.
* Observed a lot of just a little overrunning that value. So added some
* margin that is still ok. To make sure this isn't a loophole to still
* close the window, this is limited to windows above 1024. Both values
* are rather arbitrary. */
uint32_t adiff = ack - ostream->last_ack;
if (((pkt_win > 1024) && (diff > (adiff + 32))) ||
((pkt_win <= 1024) && (diff > adiff)))
{
SCLogDebug("pkt ACK %u is %u bytes beyond last_ack %u, shrinks window by %u "
"(allowing 32 bytes extra): pkt WIN %u", ack, adiff, ostream->last_ack, diff, pkt_win);
SCLogDebug("%u - %u = %u (state %u)", diff, adiff, diff - adiff, ssn->state);
StreamTcpSetEvent(p, STREAM_PKT_BAD_WINDOW_UPDATE);
return 1;
}
}
}
SCLogDebug("seq %u (%u), ack %u (%u)", seq, stream->next_seq, ack, ostream->last_ack);
return 0;
}
|
static int StreamTcpPacketIsBadWindowUpdate(TcpSession *ssn, Packet *p)
{
TcpStream *stream = NULL, *ostream = NULL;
uint32_t seq;
uint32_t ack;
uint32_t pkt_win;
if (p->flags & PKT_PSEUDO_STREAM_END)
return 0;
if (ssn->state < TCP_ESTABLISHED || ssn->state == TCP_CLOSED)
return 0;
if ((p->tcph->th_flags & (TH_SYN|TH_FIN|TH_RST)) != 0)
return 0;
if (PKT_IS_TOSERVER(p)) {
stream = &ssn->client;
ostream = &ssn->server;
} else {
stream = &ssn->server;
ostream = &ssn->client;
}
seq = TCP_GET_SEQ(p);
ack = TCP_GET_ACK(p);
pkt_win = TCP_GET_WINDOW(p) << ostream->wscale;
if (pkt_win < ostream->window) {
uint32_t diff = ostream->window - pkt_win;
if (diff > p->payload_len &&
SEQ_GT(ack, ostream->next_seq) &&
SEQ_GT(seq, stream->next_seq))
{
SCLogDebug("%"PRIu64", pkt_win %u, stream win %u, diff %u, dsize %u",
p->pcap_cnt, pkt_win, ostream->window, diff, p->payload_len);
SCLogDebug("%"PRIu64", pkt_win %u, stream win %u",
p->pcap_cnt, pkt_win, ostream->window);
SCLogDebug("%"PRIu64", seq %u ack %u ostream->next_seq %u ostream->last_ack %u, ostream->next_win %u, diff %u (%u)",
p->pcap_cnt, seq, ack, ostream->next_seq, ostream->last_ack, ostream->next_win,
ostream->next_seq - ostream->last_ack, stream->next_seq - stream->last_ack);
/* get the expected window shrinking from looking at ack vs last_ack.
* Observed a lot of just a little overrunning that value. So added some
* margin that is still ok. To make sure this isn't a loophole to still
* close the window, this is limited to windows above 1024. Both values
* are rather arbitrary. */
uint32_t adiff = ack - ostream->last_ack;
if (((pkt_win > 1024) && (diff > (adiff + 32))) ||
((pkt_win <= 1024) && (diff > adiff)))
{
SCLogDebug("pkt ACK %u is %u bytes beyond last_ack %u, shrinks window by %u "
"(allowing 32 bytes extra): pkt WIN %u", ack, adiff, ostream->last_ack, diff, pkt_win);
SCLogDebug("%u - %u = %u (state %u)", diff, adiff, diff - adiff, ssn->state);
StreamTcpSetEvent(p, STREAM_PKT_BAD_WINDOW_UPDATE);
return 1;
}
}
}
SCLogDebug("seq %u (%u), ack %u (%u)", seq, stream->next_seq, ack, ostream->last_ack);
return 0;
}
|
C
|
suricata
| 0 |
CVE-2016-5773
|
https://www.cvedetails.com/cve/CVE-2016-5773/
|
CWE-416
|
https://github.com/php/php-src/commit/f6aef68089221c5ea047d4a74224ee3deead99a6?w=1
|
f6aef68089221c5ea047d4a74224ee3deead99a6?w=1
|
Fix bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
|
static int php_zip_extract_file(struct zip * za, char *dest, char *file, int file_len TSRMLS_DC)
{
php_stream_statbuf ssb;
struct zip_file *zf;
struct zip_stat sb;
char b[8192];
int n, len, ret;
php_stream *stream;
char *fullpath;
char *file_dirname_fullpath;
char file_dirname[MAXPATHLEN];
size_t dir_len;
char *file_basename;
size_t file_basename_len;
int is_dir_only = 0;
char *path_cleaned;
size_t path_cleaned_len;
cwd_state new_state;
new_state.cwd = (char*)malloc(1);
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
/* Clean/normlize the path and then transform any path (absolute or relative)
to a path relative to cwd (../../mydir/foo.txt > mydir/foo.txt)
*/
virtual_file_ex(&new_state, file, NULL, CWD_EXPAND TSRMLS_CC);
path_cleaned = php_zip_make_relative_path(new_state.cwd, new_state.cwd_length);
if(!path_cleaned) {
return 0;
}
path_cleaned_len = strlen(path_cleaned);
if (path_cleaned_len >= MAXPATHLEN || zip_stat(za, file, 0, &sb) != 0) {
return 0;
}
/* it is a directory only, see #40228 */
if (path_cleaned_len > 1 && IS_SLASH(path_cleaned[path_cleaned_len - 1])) {
len = spprintf(&file_dirname_fullpath, 0, "%s/%s", dest, path_cleaned);
is_dir_only = 1;
} else {
memcpy(file_dirname, path_cleaned, path_cleaned_len);
dir_len = php_dirname(file_dirname, path_cleaned_len);
if (dir_len <= 0 || (dir_len == 1 && file_dirname[0] == '.')) {
len = spprintf(&file_dirname_fullpath, 0, "%s", dest);
} else {
len = spprintf(&file_dirname_fullpath, 0, "%s/%s", dest, file_dirname);
}
php_basename(path_cleaned, path_cleaned_len, NULL, 0, &file_basename, (size_t *)&file_basename_len TSRMLS_CC);
if (ZIP_OPENBASEDIR_CHECKPATH(file_dirname_fullpath)) {
efree(file_dirname_fullpath);
efree(file_basename);
free(new_state.cwd);
return 0;
}
}
/* let see if the path already exists */
if (php_stream_stat_path_ex(file_dirname_fullpath, PHP_STREAM_URL_STAT_QUIET, &ssb, NULL) < 0) {
#if defined(PHP_WIN32) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 1)
char *e;
e = file_dirname_fullpath;
while (*e) {
if (*e == '/') {
*e = DEFAULT_SLASH;
}
e++;
}
#endif
ret = php_stream_mkdir(file_dirname_fullpath, 0777, PHP_STREAM_MKDIR_RECURSIVE|REPORT_ERRORS, NULL);
if (!ret) {
efree(file_dirname_fullpath);
if (!is_dir_only) {
efree(file_basename);
free(new_state.cwd);
}
return 0;
}
}
/* it is a standalone directory, job done */
if (is_dir_only) {
efree(file_dirname_fullpath);
free(new_state.cwd);
return 1;
}
len = spprintf(&fullpath, 0, "%s/%s", file_dirname_fullpath, file_basename);
if (!len) {
efree(file_dirname_fullpath);
efree(file_basename);
free(new_state.cwd);
return 0;
} else if (len > MAXPATHLEN) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Full extraction path exceed MAXPATHLEN (%i)", MAXPATHLEN);
efree(file_dirname_fullpath);
efree(file_basename);
free(new_state.cwd);
return 0;
}
/* check again the full path, not sure if it
* is required, does a file can have a different
* safemode status as its parent folder?
*/
if (ZIP_OPENBASEDIR_CHECKPATH(fullpath)) {
efree(fullpath);
efree(file_dirname_fullpath);
efree(file_basename);
free(new_state.cwd);
return 0;
}
#if PHP_API_VERSION < 20100412
stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
#else
stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL);
#endif
if (stream == NULL) {
n = -1;
goto done;
}
zf = zip_fopen(za, file, 0);
if (zf == NULL) {
n = -1;
php_stream_close(stream);
goto done;
}
n = 0;
while ((n=zip_fread(zf, b, sizeof(b))) > 0) {
php_stream_write(stream, b, n);
}
php_stream_close(stream);
n = zip_fclose(zf);
done:
efree(fullpath);
efree(file_basename);
efree(file_dirname_fullpath);
free(new_state.cwd);
if (n<0) {
return 0;
} else {
return 1;
}
}
|
static int php_zip_extract_file(struct zip * za, char *dest, char *file, int file_len TSRMLS_DC)
{
php_stream_statbuf ssb;
struct zip_file *zf;
struct zip_stat sb;
char b[8192];
int n, len, ret;
php_stream *stream;
char *fullpath;
char *file_dirname_fullpath;
char file_dirname[MAXPATHLEN];
size_t dir_len;
char *file_basename;
size_t file_basename_len;
int is_dir_only = 0;
char *path_cleaned;
size_t path_cleaned_len;
cwd_state new_state;
new_state.cwd = (char*)malloc(1);
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
/* Clean/normlize the path and then transform any path (absolute or relative)
to a path relative to cwd (../../mydir/foo.txt > mydir/foo.txt)
*/
virtual_file_ex(&new_state, file, NULL, CWD_EXPAND TSRMLS_CC);
path_cleaned = php_zip_make_relative_path(new_state.cwd, new_state.cwd_length);
if(!path_cleaned) {
return 0;
}
path_cleaned_len = strlen(path_cleaned);
if (path_cleaned_len >= MAXPATHLEN || zip_stat(za, file, 0, &sb) != 0) {
return 0;
}
/* it is a directory only, see #40228 */
if (path_cleaned_len > 1 && IS_SLASH(path_cleaned[path_cleaned_len - 1])) {
len = spprintf(&file_dirname_fullpath, 0, "%s/%s", dest, path_cleaned);
is_dir_only = 1;
} else {
memcpy(file_dirname, path_cleaned, path_cleaned_len);
dir_len = php_dirname(file_dirname, path_cleaned_len);
if (dir_len <= 0 || (dir_len == 1 && file_dirname[0] == '.')) {
len = spprintf(&file_dirname_fullpath, 0, "%s", dest);
} else {
len = spprintf(&file_dirname_fullpath, 0, "%s/%s", dest, file_dirname);
}
php_basename(path_cleaned, path_cleaned_len, NULL, 0, &file_basename, (size_t *)&file_basename_len TSRMLS_CC);
if (ZIP_OPENBASEDIR_CHECKPATH(file_dirname_fullpath)) {
efree(file_dirname_fullpath);
efree(file_basename);
free(new_state.cwd);
return 0;
}
}
/* let see if the path already exists */
if (php_stream_stat_path_ex(file_dirname_fullpath, PHP_STREAM_URL_STAT_QUIET, &ssb, NULL) < 0) {
#if defined(PHP_WIN32) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 1)
char *e;
e = file_dirname_fullpath;
while (*e) {
if (*e == '/') {
*e = DEFAULT_SLASH;
}
e++;
}
#endif
ret = php_stream_mkdir(file_dirname_fullpath, 0777, PHP_STREAM_MKDIR_RECURSIVE|REPORT_ERRORS, NULL);
if (!ret) {
efree(file_dirname_fullpath);
if (!is_dir_only) {
efree(file_basename);
free(new_state.cwd);
}
return 0;
}
}
/* it is a standalone directory, job done */
if (is_dir_only) {
efree(file_dirname_fullpath);
free(new_state.cwd);
return 1;
}
len = spprintf(&fullpath, 0, "%s/%s", file_dirname_fullpath, file_basename);
if (!len) {
efree(file_dirname_fullpath);
efree(file_basename);
free(new_state.cwd);
return 0;
} else if (len > MAXPATHLEN) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Full extraction path exceed MAXPATHLEN (%i)", MAXPATHLEN);
efree(file_dirname_fullpath);
efree(file_basename);
free(new_state.cwd);
return 0;
}
/* check again the full path, not sure if it
* is required, does a file can have a different
* safemode status as its parent folder?
*/
if (ZIP_OPENBASEDIR_CHECKPATH(fullpath)) {
efree(fullpath);
efree(file_dirname_fullpath);
efree(file_basename);
free(new_state.cwd);
return 0;
}
#if PHP_API_VERSION < 20100412
stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
#else
stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL);
#endif
if (stream == NULL) {
n = -1;
goto done;
}
zf = zip_fopen(za, file, 0);
if (zf == NULL) {
n = -1;
php_stream_close(stream);
goto done;
}
n = 0;
while ((n=zip_fread(zf, b, sizeof(b))) > 0) {
php_stream_write(stream, b, n);
}
php_stream_close(stream);
n = zip_fclose(zf);
done:
efree(fullpath);
efree(file_basename);
efree(file_dirname_fullpath);
free(new_state.cwd);
if (n<0) {
return 0;
} else {
return 1;
}
}
|
C
|
php-src
| 0 |
CVE-2014-2972
|
https://www.cvedetails.com/cve/CVE-2014-2972/
|
CWE-189
|
https://git.exim.org/exim.git/commitdiff/7685ce68148a083d7759e78d01aa5198fc099c44
|
88a5ee399db9c15c2a94cd95aae6f364afab3249
| null |
eval_op_and(uschar **sptr, BOOL decimal, uschar **error)
{
uschar *s = *sptr;
int_eximarith_t x = eval_op_shift(&s, decimal, error);
if (*error == NULL)
{
while (*s == '&')
{
int_eximarith_t y;
s++;
y = eval_op_shift(&s, decimal, error);
if (*error != NULL) break;
x &= y;
}
}
*sptr = s;
return x;
}
|
eval_op_and(uschar **sptr, BOOL decimal, uschar **error)
{
uschar *s = *sptr;
int_eximarith_t x = eval_op_shift(&s, decimal, error);
if (*error == NULL)
{
while (*s == '&')
{
int_eximarith_t y;
s++;
y = eval_op_shift(&s, decimal, error);
if (*error != NULL) break;
x &= y;
}
}
*sptr = s;
return x;
}
|
C
|
exim
| 0 |
CVE-2011-4914
|
https://www.cvedetails.com/cve/CVE-2011-4914/
|
CWE-20
|
https://github.com/torvalds/linux/commit/e0bccd315db0c2f919e7fcf9cb60db21d9986f52
|
e0bccd315db0c2f919e7fcf9cb60db21d9986f52
|
rose: Add length checks to CALL_REQUEST parsing
Define some constant offsets for CALL_REQUEST based on the description
at <http://www.techfest.com/networking/wan/x25plp.htm> and the
definition of ROSE as using 10-digit (5-byte) addresses. Use them
consistently. Validate all implicit and explicit facilities lengths.
Validate the address length byte rather than either trusting or
assuming its value.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int rose_info_show(struct seq_file *seq, void *v)
{
char buf[11], rsbuf[11];
if (v == SEQ_START_TOKEN)
seq_puts(seq,
"dest_addr dest_call src_addr src_call dev lci neigh st vs vr va t t1 t2 t3 hb idle Snd-Q Rcv-Q inode\n");
else {
struct sock *s = sk_entry(v);
struct rose_sock *rose = rose_sk(s);
const char *devname, *callsign;
const struct net_device *dev = rose->device;
if (!dev)
devname = "???";
else
devname = dev->name;
seq_printf(seq, "%-10s %-9s ",
rose2asc(rsbuf, &rose->dest_addr),
ax2asc(buf, &rose->dest_call));
if (ax25cmp(&rose->source_call, &null_ax25_address) == 0)
callsign = "??????-?";
else
callsign = ax2asc(buf, &rose->source_call);
seq_printf(seq,
"%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n",
rose2asc(rsbuf, &rose->source_addr),
callsign,
devname,
rose->lci & 0x0FFF,
(rose->neighbour) ? rose->neighbour->number : 0,
rose->state,
rose->vs,
rose->vr,
rose->va,
ax25_display_timer(&rose->timer) / HZ,
rose->t1 / HZ,
rose->t2 / HZ,
rose->t3 / HZ,
rose->hb / HZ,
ax25_display_timer(&rose->idletimer) / (60 * HZ),
rose->idle / (60 * HZ),
sk_wmem_alloc_get(s),
sk_rmem_alloc_get(s),
s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L);
}
return 0;
}
|
static int rose_info_show(struct seq_file *seq, void *v)
{
char buf[11], rsbuf[11];
if (v == SEQ_START_TOKEN)
seq_puts(seq,
"dest_addr dest_call src_addr src_call dev lci neigh st vs vr va t t1 t2 t3 hb idle Snd-Q Rcv-Q inode\n");
else {
struct sock *s = sk_entry(v);
struct rose_sock *rose = rose_sk(s);
const char *devname, *callsign;
const struct net_device *dev = rose->device;
if (!dev)
devname = "???";
else
devname = dev->name;
seq_printf(seq, "%-10s %-9s ",
rose2asc(rsbuf, &rose->dest_addr),
ax2asc(buf, &rose->dest_call));
if (ax25cmp(&rose->source_call, &null_ax25_address) == 0)
callsign = "??????-?";
else
callsign = ax2asc(buf, &rose->source_call);
seq_printf(seq,
"%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n",
rose2asc(rsbuf, &rose->source_addr),
callsign,
devname,
rose->lci & 0x0FFF,
(rose->neighbour) ? rose->neighbour->number : 0,
rose->state,
rose->vs,
rose->vr,
rose->va,
ax25_display_timer(&rose->timer) / HZ,
rose->t1 / HZ,
rose->t2 / HZ,
rose->t3 / HZ,
rose->hb / HZ,
ax25_display_timer(&rose->idletimer) / (60 * HZ),
rose->idle / (60 * HZ),
sk_wmem_alloc_get(s),
sk_rmem_alloc_get(s),
s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L);
}
return 0;
}
|
C
|
linux
| 0 |
CVE-2011-3099
|
https://www.cvedetails.com/cve/CVE-2011-3099/
|
CWE-399
|
https://github.com/chromium/chromium/commit/3bbc818ed1a7b63b8290bbde9ae975956748cb8a
|
3bbc818ed1a7b63b8290bbde9ae975956748cb8a
|
[GTK] Inspector should set a default attached height before being attached
https://bugs.webkit.org/show_bug.cgi?id=90767
Reviewed by Xan Lopez.
We are currently using the minimum attached height in
WebKitWebViewBase as the default height for the inspector when
attached. It would be easier for WebKitWebViewBase and embedders
implementing attach() if the inspector already had an attached
height set when it's being attached.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseContainerAdd): Don't initialize
inspectorViewHeight.
(webkitWebViewBaseSetInspectorViewHeight): Allow to set the
inspector view height before having an inpector view, but only
queue a resize when the view already has an inspector view.
* UIProcess/API/gtk/tests/TestInspector.cpp:
(testInspectorDefault):
(testInspectorManualAttachDetach):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformAttach): Set the default
attached height before attach the inspector view.
git-svn-id: svn://svn.chromium.org/blink/trunk@124479 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
static gboolean webkitWebViewBaseDragMotion(GtkWidget* widget, GdkDragContext* context, gint x, gint y, guint time)
{
WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
OwnPtr<DragData> dragData(webViewBase->priv->dragAndDropHelper.handleDragMotion(context, IntPoint(x, y), time));
if (!dragData)
return TRUE;
webViewBase->priv->pageProxy->dragUpdated(dragData.get());
DragOperation operation = webViewBase->priv->pageProxy->dragSession().operation;
gdk_drag_status(context, dragOperationToSingleGdkDragAction(operation), time);
return TRUE;
}
|
static gboolean webkitWebViewBaseDragMotion(GtkWidget* widget, GdkDragContext* context, gint x, gint y, guint time)
{
WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
OwnPtr<DragData> dragData(webViewBase->priv->dragAndDropHelper.handleDragMotion(context, IntPoint(x, y), time));
if (!dragData)
return TRUE;
webViewBase->priv->pageProxy->dragUpdated(dragData.get());
DragOperation operation = webViewBase->priv->pageProxy->dragSession().operation;
gdk_drag_status(context, dragOperationToSingleGdkDragAction(operation), time);
return TRUE;
}
|
C
|
Chrome
| 0 |
CVE-2016-10051
|
https://www.cvedetails.com/cve/CVE-2016-10051/
|
CWE-416
|
https://github.com/ImageMagick/ImageMagick/commit/ecc03a2518c2b7dd375fde3a040fdae0bdf6a521
|
ecc03a2518c2b7dd375fde3a040fdae0bdf6a521
|
Prevent memory use after free
|
ModuleExport size_t RegisterPWPImage(void)
{
MagickInfo
*entry;
entry=SetMagickInfo("PWP");
entry->decoder=(DecodeImageHandler *) ReadPWPImage;
entry->magick=(IsImageFormatHandler *) IsPWP;
entry->description=ConstantString("Seattle Film Works");
entry->module=ConstantString("PWP");
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
}
|
ModuleExport size_t RegisterPWPImage(void)
{
MagickInfo
*entry;
entry=SetMagickInfo("PWP");
entry->decoder=(DecodeImageHandler *) ReadPWPImage;
entry->magick=(IsImageFormatHandler *) IsPWP;
entry->description=ConstantString("Seattle Film Works");
entry->module=ConstantString("PWP");
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
}
|
C
|
ImageMagick
| 0 |
CVE-2016-1662
|
https://www.cvedetails.com/cve/CVE-2016-1662/
| null |
https://github.com/chromium/chromium/commit/829f713b4c75ddbe7db806b551f1e3b08bb5e95c
|
829f713b4c75ddbe7db806b551f1e3b08bb5e95c
|
Add keepalive support to drivefs API
In some situations mounting drivefs may take very long time. To
distinguish it from a total hang we send periodic keepalives from drivefs.
BUG=chromium:899746
Change-Id: Iee906651557a8f8eab62d58298f33c7c3e61724e
Reviewed-on: https://chromium-review.googlesource.com/c/1305253
Commit-Queue: Sergei Datsenko <[email protected]>
Reviewed-by: Sam McNally <[email protected]>
Cr-Commit-Position: refs/heads/master@{#603732}
|
void GetAccessToken(bool use_cached,
const std::string& client_id,
const std::string& app_id,
const std::vector<std::string>& scopes,
mojom::DriveFsDelegate::GetAccessTokenCallback callback) {
DCHECK_CALLED_ON_VALID_SEQUENCE(host_->sequence_checker_);
if (get_access_token_callback_) {
std::move(callback).Run(mojom::AccessTokenStatus::kTransientError, "");
return;
}
DCHECK(!mint_token_flow_);
const std::string& token =
MaybeGetCachedToken(use_cached, client_id, app_id, scopes);
if (!token.empty()) {
std::move(callback).Run(mojom::AccessTokenStatus::kSuccess, token);
return;
}
get_access_token_callback_ = std::move(callback);
mint_token_flow_ =
host_->delegate_->CreateMintTokenFlow(this, client_id, app_id, scopes);
DCHECK(mint_token_flow_);
GetIdentityManager().GetPrimaryAccountWhenAvailable(base::BindOnce(
&AccountTokenDelegate::AccountReady, base::Unretained(this)));
}
|
void GetAccessToken(bool use_cached,
const std::string& client_id,
const std::string& app_id,
const std::vector<std::string>& scopes,
mojom::DriveFsDelegate::GetAccessTokenCallback callback) {
DCHECK_CALLED_ON_VALID_SEQUENCE(host_->sequence_checker_);
if (get_access_token_callback_) {
std::move(callback).Run(mojom::AccessTokenStatus::kTransientError, "");
return;
}
DCHECK(!mint_token_flow_);
const std::string& token =
MaybeGetCachedToken(use_cached, client_id, app_id, scopes);
if (!token.empty()) {
std::move(callback).Run(mojom::AccessTokenStatus::kSuccess, token);
return;
}
get_access_token_callback_ = std::move(callback);
mint_token_flow_ =
host_->delegate_->CreateMintTokenFlow(this, client_id, app_id, scopes);
DCHECK(mint_token_flow_);
GetIdentityManager().GetPrimaryAccountWhenAvailable(base::BindOnce(
&AccountTokenDelegate::AccountReady, base::Unretained(this)));
}
|
C
|
Chrome
| 0 |
CVE-2015-8126
|
https://www.cvedetails.com/cve/CVE-2015-8126/
|
CWE-119
|
https://github.com/chromium/chromium/commit/7f3d85b096f66870a15b37c2f40b219b2e292693
|
7f3d85b096f66870a15b37c2f40b219b2e292693
|
third_party/libpng: update to 1.2.54
[email protected]
BUG=560291
Review URL: https://codereview.chromium.org/1467263003
Cr-Commit-Position: refs/heads/master@{#362298}
|
png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
{
png_debug1(1, "in %s retrieval function", "oFFs");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
&& offset_x != NULL && offset_y != NULL && unit_type != NULL)
{
*offset_x = info_ptr->x_offset;
*offset_y = info_ptr->y_offset;
*unit_type = (int)info_ptr->offset_unit_type;
return (PNG_INFO_oFFs);
}
return (0);
}
|
png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
{
png_debug1(1, "in %s retrieval function", "oFFs");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
&& offset_x != NULL && offset_y != NULL && unit_type != NULL)
{
*offset_x = info_ptr->x_offset;
*offset_y = info_ptr->y_offset;
*unit_type = (int)info_ptr->offset_unit_type;
return (PNG_INFO_oFFs);
}
return (0);
}
|
C
|
Chrome
| 0 |
CVE-2011-2707
|
https://www.cvedetails.com/cve/CVE-2011-2707/
|
CWE-20
|
https://github.com/torvalds/linux/commit/0d0138ebe24b94065580bd2601f8bb7eb6152f56
|
0d0138ebe24b94065580bd2601f8bb7eb6152f56
|
xtensa: prevent arbitrary read in ptrace
Prevent an arbitrary kernel read. Check the user pointer with access_ok()
before copying data in.
[[email protected]: s/EIO/EFAULT/]
Signed-off-by: Dan Rosenberg <[email protected]>
Cc: Christian Zankel <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
int ptrace_getxregs(struct task_struct *child, void __user *uregs)
{
struct pt_regs *regs = task_pt_regs(child);
struct thread_info *ti = task_thread_info(child);
elf_xtregs_t __user *xtregs = uregs;
int ret = 0;
if (!access_ok(VERIFY_WRITE, uregs, sizeof(elf_xtregs_t)))
return -EIO;
#if XTENSA_HAVE_COPROCESSORS
/* Flush all coprocessor registers to memory. */
coprocessor_flush_all(ti);
ret |= __copy_to_user(&xtregs->cp0, &ti->xtregs_cp,
sizeof(xtregs_coprocessor_t));
#endif
ret |= __copy_to_user(&xtregs->opt, ®s->xtregs_opt,
sizeof(xtregs->opt));
ret |= __copy_to_user(&xtregs->user,&ti->xtregs_user,
sizeof(xtregs->user));
return ret ? -EFAULT : 0;
}
|
int ptrace_getxregs(struct task_struct *child, void __user *uregs)
{
struct pt_regs *regs = task_pt_regs(child);
struct thread_info *ti = task_thread_info(child);
elf_xtregs_t __user *xtregs = uregs;
int ret = 0;
if (!access_ok(VERIFY_WRITE, uregs, sizeof(elf_xtregs_t)))
return -EIO;
#if XTENSA_HAVE_COPROCESSORS
/* Flush all coprocessor registers to memory. */
coprocessor_flush_all(ti);
ret |= __copy_to_user(&xtregs->cp0, &ti->xtregs_cp,
sizeof(xtregs_coprocessor_t));
#endif
ret |= __copy_to_user(&xtregs->opt, ®s->xtregs_opt,
sizeof(xtregs->opt));
ret |= __copy_to_user(&xtregs->user,&ti->xtregs_user,
sizeof(xtregs->user));
return ret ? -EFAULT : 0;
}
|
C
|
linux
| 0 |
CVE-2018-7485
|
https://www.cvedetails.com/cve/CVE-2018-7485/
|
CWE-119
|
https://github.com/lurcher/unixODBC/commit/45ef78e037f578b15fc58938a3a3251655e71d6f#diff-d52750c7ba4e594410438569d8e2963aL24
|
45ef78e037f578b15fc58938a3a3251655e71d6f#diff-d52750c7ba4e594410438569d8e2963aL24
|
New Pre Source
|
BOOL SQLWriteFileDSN( LPCSTR pszFileName,
LPCSTR pszAppName,
LPCSTR pszKeyName,
LPCSTR pszString )
{
HINI hIni;
char szFileName[ODBC_FILENAME_MAX+1];
if ( pszFileName[0] == '/' )
{
strncpy( szFileName, pszFileName, sizeof(szFileName) - 5 );
}
else
{
char szPath[ODBC_FILENAME_MAX+1];
*szPath = '\0';
_odbcinst_FileINI( szPath );
snprintf( szFileName, sizeof(szFileName) - 5, "%s/%s", szPath, pszFileName );
}
if ( strlen( szFileName ) < 4 || strcmp( szFileName + strlen( szFileName ) - 4, ".dsn" ))
{
strcat( szFileName, ".dsn" );
}
#ifdef __OS2__
if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE, 0L ) != INI_SUCCESS )
#else
if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS )
#endif
{
inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_PATH, "" );
return FALSE;
}
/* delete section */
if ( pszString == NULL && pszKeyName == NULL )
{
if ( iniObjectSeek( hIni, (char *)pszAppName ) == INI_SUCCESS )
{
iniObjectDelete( hIni );
}
}
/* delete entry */
else if ( pszString == NULL )
{
if ( iniPropertySeek( hIni, (char *)pszAppName, (char *)pszKeyName, "" ) == INI_SUCCESS )
{
iniPropertyDelete( hIni );
}
}
else
{
/* add section */
if ( iniObjectSeek( hIni, (char *)pszAppName ) != INI_SUCCESS )
{
iniObjectInsert( hIni, (char *)pszAppName );
}
/* update entry */
if ( iniPropertySeek( hIni, (char *)pszAppName, (char *)pszKeyName, "" ) == INI_SUCCESS )
{
iniObjectSeek( hIni, (char *)pszAppName );
iniPropertyUpdate( hIni, (char *)pszKeyName, (char *)pszString );
}
/* add entry */
else
{
iniObjectSeek( hIni, (char *)pszAppName );
iniPropertyInsert( hIni, (char *)pszKeyName, (char *)pszString );
}
}
if ( iniCommit( hIni ) != INI_SUCCESS )
{
iniClose( hIni );
inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" );
return FALSE;
}
iniClose( hIni );
return TRUE;
}
|
BOOL SQLWriteFileDSN( LPCSTR pszFileName,
LPCSTR pszAppName,
LPCSTR pszKeyName,
LPCSTR pszString )
{
HINI hIni;
char szFileName[ODBC_FILENAME_MAX+1];
if ( pszFileName[0] == '/' )
{
strncpy( szFileName, sizeof(szFileName) - 5, pszFileName );
}
else
{
char szPath[ODBC_FILENAME_MAX+1];
*szPath = '\0';
_odbcinst_FileINI( szPath );
snprintf( szFileName, sizeof(szFileName) - 5, "%s/%s", szPath, pszFileName );
}
if ( strlen( szFileName ) < 4 || strcmp( szFileName + strlen( szFileName ) - 4, ".dsn" ))
{
strcat( szFileName, ".dsn" );
}
#ifdef __OS2__
if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE, 0L ) != INI_SUCCESS )
#else
if ( iniOpen( &hIni, szFileName, "#;", '[', ']', '=', TRUE ) != INI_SUCCESS )
#endif
{
inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_INVALID_PATH, "" );
return FALSE;
}
/* delete section */
if ( pszString == NULL && pszKeyName == NULL )
{
if ( iniObjectSeek( hIni, (char *)pszAppName ) == INI_SUCCESS )
{
iniObjectDelete( hIni );
}
}
/* delete entry */
else if ( pszString == NULL )
{
if ( iniPropertySeek( hIni, (char *)pszAppName, (char *)pszKeyName, "" ) == INI_SUCCESS )
{
iniPropertyDelete( hIni );
}
}
else
{
/* add section */
if ( iniObjectSeek( hIni, (char *)pszAppName ) != INI_SUCCESS )
{
iniObjectInsert( hIni, (char *)pszAppName );
}
/* update entry */
if ( iniPropertySeek( hIni, (char *)pszAppName, (char *)pszKeyName, "" ) == INI_SUCCESS )
{
iniObjectSeek( hIni, (char *)pszAppName );
iniPropertyUpdate( hIni, (char *)pszKeyName, (char *)pszString );
}
/* add entry */
else
{
iniObjectSeek( hIni, (char *)pszAppName );
iniPropertyInsert( hIni, (char *)pszKeyName, (char *)pszString );
}
}
if ( iniCommit( hIni ) != INI_SUCCESS )
{
iniClose( hIni );
inst_logPushMsg( __FILE__, __FILE__, __LINE__, LOG_CRITICAL, ODBC_ERROR_REQUEST_FAILED, "" );
return FALSE;
}
iniClose( hIni );
return TRUE;
}
|
C
|
unixODBC
| 1 |
CVE-2013-2871
|
https://www.cvedetails.com/cve/CVE-2013-2871/
|
CWE-20
|
https://github.com/chromium/chromium/commit/db97b49fdd856f33bd810db4564c6f2cc14be71a
|
db97b49fdd856f33bd810db4564c6f2cc14be71a
|
cc: Simplify raster task completion notification logic
(Relanding after missing activation bug fixed in https://codereview.chromium.org/131763003/)
Previously the pixel buffer raster worker pool used a combination of
polling and explicit notifications from the raster worker pool to decide
when to tell the client about the completion of 1) all tasks or 2) the
subset of tasks required for activation. This patch simplifies the logic
by only triggering the notification based on the OnRasterTasksFinished
and OnRasterTasksRequiredForActivationFinished calls from the worker
pool.
BUG=307841,331534
Review URL: https://codereview.chromium.org/99873007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243991 0039d316-1c4b-4281-b951-d872f2087c98
|
void PixelBufferRasterWorkerPool::FlushUploads() {
if (!has_performed_uploads_since_last_flush_)
return;
resource_provider()->ShallowFlushIfSupported();
has_performed_uploads_since_last_flush_ = false;
}
|
void PixelBufferRasterWorkerPool::FlushUploads() {
if (!has_performed_uploads_since_last_flush_)
return;
resource_provider()->ShallowFlushIfSupported();
has_performed_uploads_since_last_flush_ = false;
}
|
C
|
Chrome
| 0 |
CVE-2015-6761
|
https://www.cvedetails.com/cve/CVE-2015-6761/
|
CWE-362
|
https://github.com/chromium/chromium/commit/fd506b0ac6c7846ae45b5034044fe85c28ee68ac
|
fd506b0ac6c7846ae45b5034044fe85c28ee68ac
|
Fix detach with open()ed document leaving parent loading indefinitely
Change-Id: I26c2a054b9f1e5eb076acd677e1223058825f6d6
Bug: 803416
Test: fast/loader/document-open-iframe-then-detach.html
Change-Id: I26c2a054b9f1e5eb076acd677e1223058825f6d6
Reviewed-on: https://chromium-review.googlesource.com/887298
Reviewed-by: Mike West <[email protected]>
Commit-Queue: Nate Chapin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#532967}
|
void FrameLoader::Load(const FrameLoadRequest& passed_request,
FrameLoadType frame_load_type,
HistoryItem* history_item,
HistoryLoadType history_load_type) {
DCHECK(frame_->GetDocument());
if (IsBackForwardLoadType(frame_load_type) && !frame_->IsNavigationAllowed())
return;
if (in_stop_all_loaders_)
return;
FrameLoadRequest request(passed_request);
request.GetResourceRequest().SetHasUserGesture(
Frame::HasTransientUserActivation(frame_));
if (!PrepareRequestForThisFrame(request))
return;
Frame* target_frame = request.Form()
? nullptr
: frame_->FindFrameForNavigation(
AtomicString(request.FrameName()), *frame_,
request.GetResourceRequest().Url());
NavigationPolicy policy = NavigationPolicyForRequest(request);
if (target_frame && target_frame != frame_ &&
ShouldNavigateTargetFrame(policy)) {
if (target_frame->IsLocalFrame() &&
!ToLocalFrame(target_frame)->IsNavigationAllowed()) {
return;
}
bool was_in_same_page = target_frame->GetPage() == frame_->GetPage();
request.SetFrameName("_self");
target_frame->Navigate(request);
Page* page = target_frame->GetPage();
if (!was_in_same_page && page)
page->GetChromeClient().Focus();
return;
}
SetReferrerForFrameRequest(request);
if (!target_frame && !request.FrameName().IsEmpty()) {
if (policy == kNavigationPolicyDownload) {
Client()->DownloadURL(request.GetResourceRequest(), String());
return; // Navigation/download will be handled by the client.
} else if (ShouldNavigateTargetFrame(policy)) {
request.GetResourceRequest().SetFrameType(
network::mojom::RequestContextFrameType::kAuxiliary);
CreateWindowForRequest(request, *frame_, policy);
return; // Navigation will be handled by the new frame/window.
}
}
if (!frame_->IsNavigationAllowed())
return;
const KURL& url = request.GetResourceRequest().Url();
FrameLoadType new_load_type = (frame_load_type == kFrameLoadTypeStandard)
? DetermineFrameLoadType(request)
: frame_load_type;
bool same_document_history_navigation =
IsBackForwardLoadType(new_load_type) &&
history_load_type == kHistorySameDocumentLoad;
bool same_document_navigation =
policy == kNavigationPolicyCurrentTab &&
ShouldPerformFragmentNavigation(request.Form(),
request.GetResourceRequest().HttpMethod(),
new_load_type, url);
if (same_document_history_navigation || same_document_navigation) {
DCHECK(history_item || !same_document_history_navigation);
scoped_refptr<SerializedScriptValue> state_object =
same_document_history_navigation ? history_item->StateObject()
: nullptr;
if (!same_document_history_navigation) {
document_loader_->SetNavigationType(DetermineNavigationType(
new_load_type, false, request.TriggeringEvent()));
if (ShouldTreatURLAsSameAsCurrent(url))
new_load_type = kFrameLoadTypeReplaceCurrentItem;
}
LoadInSameDocument(url, state_object, new_load_type, history_item,
request.ClientRedirect(), request.OriginDocument());
return;
}
if (request.GetResourceRequest().IsSameDocumentNavigation())
return;
StartLoad(request, new_load_type, policy, history_item);
}
|
void FrameLoader::Load(const FrameLoadRequest& passed_request,
FrameLoadType frame_load_type,
HistoryItem* history_item,
HistoryLoadType history_load_type) {
DCHECK(frame_->GetDocument());
if (IsBackForwardLoadType(frame_load_type) && !frame_->IsNavigationAllowed())
return;
if (in_stop_all_loaders_)
return;
FrameLoadRequest request(passed_request);
request.GetResourceRequest().SetHasUserGesture(
Frame::HasTransientUserActivation(frame_));
if (!PrepareRequestForThisFrame(request))
return;
Frame* target_frame = request.Form()
? nullptr
: frame_->FindFrameForNavigation(
AtomicString(request.FrameName()), *frame_,
request.GetResourceRequest().Url());
NavigationPolicy policy = NavigationPolicyForRequest(request);
if (target_frame && target_frame != frame_ &&
ShouldNavigateTargetFrame(policy)) {
if (target_frame->IsLocalFrame() &&
!ToLocalFrame(target_frame)->IsNavigationAllowed()) {
return;
}
bool was_in_same_page = target_frame->GetPage() == frame_->GetPage();
request.SetFrameName("_self");
target_frame->Navigate(request);
Page* page = target_frame->GetPage();
if (!was_in_same_page && page)
page->GetChromeClient().Focus();
return;
}
SetReferrerForFrameRequest(request);
if (!target_frame && !request.FrameName().IsEmpty()) {
if (policy == kNavigationPolicyDownload) {
Client()->DownloadURL(request.GetResourceRequest(), String());
return; // Navigation/download will be handled by the client.
} else if (ShouldNavigateTargetFrame(policy)) {
request.GetResourceRequest().SetFrameType(
network::mojom::RequestContextFrameType::kAuxiliary);
CreateWindowForRequest(request, *frame_, policy);
return; // Navigation will be handled by the new frame/window.
}
}
if (!frame_->IsNavigationAllowed())
return;
const KURL& url = request.GetResourceRequest().Url();
FrameLoadType new_load_type = (frame_load_type == kFrameLoadTypeStandard)
? DetermineFrameLoadType(request)
: frame_load_type;
bool same_document_history_navigation =
IsBackForwardLoadType(new_load_type) &&
history_load_type == kHistorySameDocumentLoad;
bool same_document_navigation =
policy == kNavigationPolicyCurrentTab &&
ShouldPerformFragmentNavigation(request.Form(),
request.GetResourceRequest().HttpMethod(),
new_load_type, url);
if (same_document_history_navigation || same_document_navigation) {
DCHECK(history_item || !same_document_history_navigation);
scoped_refptr<SerializedScriptValue> state_object =
same_document_history_navigation ? history_item->StateObject()
: nullptr;
if (!same_document_history_navigation) {
document_loader_->SetNavigationType(DetermineNavigationType(
new_load_type, false, request.TriggeringEvent()));
if (ShouldTreatURLAsSameAsCurrent(url))
new_load_type = kFrameLoadTypeReplaceCurrentItem;
}
LoadInSameDocument(url, state_object, new_load_type, history_item,
request.ClientRedirect(), request.OriginDocument());
return;
}
if (request.GetResourceRequest().IsSameDocumentNavigation())
return;
StartLoad(request, new_load_type, policy, history_item);
}
|
C
|
Chrome
| 0 |
CVE-2016-5219
|
https://www.cvedetails.com/cve/CVE-2016-5219/
|
CWE-416
|
https://github.com/chromium/chromium/commit/a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
cheaper by minimizing the round-trip to the GPU thread.
Bug: 881152, 957001
Change-Id: Iadfa798af29225e752c710ca5c25f50b3dd3101a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586630
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657568}
|
error::Error GLES2DecoderImpl::HandleCompressedTexImage3DBucket(
uint32_t immediate_data_size, const volatile void* cmd_data) {
if (!feature_info_->IsWebGL2OrES3Context())
return error::kUnknownCommand;
const volatile gles2::cmds::CompressedTexImage3DBucket& c =
*static_cast<const volatile gles2::cmds::CompressedTexImage3DBucket*>(
cmd_data);
GLenum target = static_cast<GLenum>(c.target);
GLint level = static_cast<GLint>(c.level);
GLenum internal_format = static_cast<GLenum>(c.internalformat);
GLsizei width = static_cast<GLsizei>(c.width);
GLsizei height = static_cast<GLsizei>(c.height);
GLsizei depth = static_cast<GLsizei>(c.depth);
GLuint bucket_id = static_cast<GLuint>(c.bucket_id);
GLint border = static_cast<GLint>(c.border);
if (state_.bound_pixel_unpack_buffer.get()) {
return error::kInvalidArguments;
}
Bucket* bucket = GetBucket(bucket_id);
if (!bucket)
return error::kInvalidArguments;
uint32_t image_size = bucket->size();
const void* data = bucket->GetData(0, image_size);
DCHECK(data || !image_size);
return DoCompressedTexImage(target, level, internal_format, width, height,
depth, border, image_size, data,
ContextState::k3D);
}
|
error::Error GLES2DecoderImpl::HandleCompressedTexImage3DBucket(
uint32_t immediate_data_size, const volatile void* cmd_data) {
if (!feature_info_->IsWebGL2OrES3Context())
return error::kUnknownCommand;
const volatile gles2::cmds::CompressedTexImage3DBucket& c =
*static_cast<const volatile gles2::cmds::CompressedTexImage3DBucket*>(
cmd_data);
GLenum target = static_cast<GLenum>(c.target);
GLint level = static_cast<GLint>(c.level);
GLenum internal_format = static_cast<GLenum>(c.internalformat);
GLsizei width = static_cast<GLsizei>(c.width);
GLsizei height = static_cast<GLsizei>(c.height);
GLsizei depth = static_cast<GLsizei>(c.depth);
GLuint bucket_id = static_cast<GLuint>(c.bucket_id);
GLint border = static_cast<GLint>(c.border);
if (state_.bound_pixel_unpack_buffer.get()) {
return error::kInvalidArguments;
}
Bucket* bucket = GetBucket(bucket_id);
if (!bucket)
return error::kInvalidArguments;
uint32_t image_size = bucket->size();
const void* data = bucket->GetData(0, image_size);
DCHECK(data || !image_size);
return DoCompressedTexImage(target, level, internal_format, width, height,
depth, border, image_size, data,
ContextState::k3D);
}
|
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_ENDF( TT_ExecContext exc )
{
TT_CallRec* pRec;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
exc->sph_in_func_flags = 0x0000;
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
if ( exc->callTop <= 0 ) /* We encountered an ENDF without a call */
{
exc->error = FT_THROW( ENDF_In_Exec_Stream );
return;
}
exc->callTop--;
pRec = &exc->callStack[exc->callTop];
pRec->Cur_Count--;
exc->step_ins = FALSE;
if ( pRec->Cur_Count > 0 )
{
exc->callTop++;
exc->IP = pRec->Def->start;
}
else
/* Loop through the current function */
Ins_Goto_CodeRange( exc, pRec->Caller_Range, pRec->Caller_IP );
/* Exit the current call frame. */
/* NOTE: If the last instruction of a program is a */
/* CALL or LOOPCALL, the return address is */
/* always out of the code range. This is a */
/* valid address, and it is why we do not test */
/* the result of Ins_Goto_CodeRange() here! */
}
|
Ins_ENDF( TT_ExecContext exc )
{
TT_CallRec* pRec;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
exc->sph_in_func_flags = 0x0000;
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
if ( exc->callTop <= 0 ) /* We encountered an ENDF without a call */
{
exc->error = FT_THROW( ENDF_In_Exec_Stream );
return;
}
exc->callTop--;
pRec = &exc->callStack[exc->callTop];
pRec->Cur_Count--;
exc->step_ins = FALSE;
if ( pRec->Cur_Count > 0 )
{
exc->callTop++;
exc->IP = pRec->Def->start;
}
else
/* Loop through the current function */
Ins_Goto_CodeRange( exc, pRec->Caller_Range, pRec->Caller_IP );
/* Exit the current call frame. */
/* NOTE: If the last instruction of a program is a */
/* CALL or LOOPCALL, the return address is */
/* always out of the code range. This is a */
/* valid address, and it is why we do not test */
/* the result of Ins_Goto_CodeRange() here! */
}
|
C
|
savannah
| 0 |
CVE-2015-1265
|
https://www.cvedetails.com/cve/CVE-2015-1265/
| null |
https://github.com/chromium/chromium/commit/8ea5693d5cf304e56174bb6b65412f04209904db
|
8ea5693d5cf304e56174bb6b65412f04209904db
|
Move Editor::Transpose() out of Editor class
This patch moves |Editor::Transpose()| out of |Editor| class as preparation of
expanding it into |ExecutTranspose()| in "EditorCommand.cpp" to make |Editor|
class simpler for improving code health.
Following patch will expand |Transpose()| into |ExecutTranspose()|.
Bug: 672405
Change-Id: Icde253623f31813d2b4517c4da7d4798bd5fadf6
Reviewed-on: https://chromium-review.googlesource.com/583880
Reviewed-by: Xiaocheng Hu <[email protected]>
Commit-Queue: Yoshifumi Inoue <[email protected]>
Cr-Commit-Position: refs/heads/master@{#489518}
|
static TriState StateTextWritingDirectionRightToLeft(LocalFrame& frame,
Event*) {
return StateTextWritingDirection(frame, RightToLeftWritingDirection);
}
|
static TriState StateTextWritingDirectionRightToLeft(LocalFrame& frame,
Event*) {
return StateTextWritingDirection(frame, RightToLeftWritingDirection);
}
|
C
|
Chrome
| 0 |
CVE-2012-6657
|
https://www.cvedetails.com/cve/CVE-2012-6657/
|
CWE-264
|
https://github.com/torvalds/linux/commit/3e10986d1d698140747fcfc2761ec9cb64c1d582
|
3e10986d1d698140747fcfc2761ec9cb64c1d582
|
net: guard tcp_set_keepalive() to tcp sockets
Its possible to use RAW sockets to get a crash in
tcp_set_keepalive() / sk_reset_timer()
Fix is to make sure socket is a SOCK_STREAM one.
Reported-by: Dave Jones <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
struct proto *prot)
{
struct sock *sk;
sk = sk_prot_alloc(prot, priority | __GFP_ZERO, family);
if (sk) {
sk->sk_family = family;
/*
* See comment in struct sock definition to understand
* why we need sk_prot_creator -acme
*/
sk->sk_prot = sk->sk_prot_creator = prot;
sock_lock_init(sk);
sock_net_set(sk, get_net(net));
atomic_set(&sk->sk_wmem_alloc, 1);
sock_update_classid(sk);
sock_update_netprioidx(sk, current);
}
return sk;
}
|
struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
struct proto *prot)
{
struct sock *sk;
sk = sk_prot_alloc(prot, priority | __GFP_ZERO, family);
if (sk) {
sk->sk_family = family;
/*
* See comment in struct sock definition to understand
* why we need sk_prot_creator -acme
*/
sk->sk_prot = sk->sk_prot_creator = prot;
sock_lock_init(sk);
sock_net_set(sk, get_net(net));
atomic_set(&sk->sk_wmem_alloc, 1);
sock_update_classid(sk);
sock_update_netprioidx(sk, current);
}
return sk;
}
|
C
|
linux
| 0 |
CVE-2013-2887
|
https://www.cvedetails.com/cve/CVE-2013-2887/
| null |
https://github.com/chromium/chromium/commit/01924fbe6c0e0f059ca46a03f9f6b2670ae3e0fa
|
01924fbe6c0e0f059ca46a03f9f6b2670ae3e0fa
|
Pass ui::LatencyInfo correct with unified gesture detector on Aura.
BUG=379812
TEST=GestureRecognizerTest.LatencyPassedFromTouchEvent
Review URL: https://codereview.chromium.org/309823002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274602 0039d316-1c4b-4281-b951-d872f2087c98
|
bool scroll_update() const { return scroll_update_; }
|
bool scroll_update() const { return scroll_update_; }
|
C
|
Chrome
| 0 |
CVE-2013-4591
|
https://www.cvedetails.com/cve/CVE-2013-4591/
|
CWE-119
|
https://github.com/torvalds/linux/commit/7d3e91a89b7adbc2831334def9e494dd9892f9af
|
7d3e91a89b7adbc2831334def9e494dd9892f9af
|
NFSv4: Check for buffer length in __nfs4_get_acl_uncached
Commit 1f1ea6c "NFSv4: Fix buffer overflow checking in
__nfs4_get_acl_uncached" accidently dropped the checking for too small
result buffer length.
If someone uses getxattr on "system.nfs4_acl" on an NFSv4 mount
supporting ACLs, the ACL has not been cached and the buffer suplied is
too short, we still copy the complete ACL, resulting in kernel and user
space memory corruption.
Signed-off-by: Sven Wegener <[email protected]>
Cc: [email protected]
Signed-off-by: Trond Myklebust <[email protected]>
|
static void nfs4_proc_unlink_setup(struct rpc_message *msg, struct inode *dir)
{
struct nfs_server *server = NFS_SERVER(dir);
struct nfs_removeargs *args = msg->rpc_argp;
struct nfs_removeres *res = msg->rpc_resp;
res->server = server;
msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_REMOVE];
nfs41_init_sequence(&args->seq_args, &res->seq_res, 1);
}
|
static void nfs4_proc_unlink_setup(struct rpc_message *msg, struct inode *dir)
{
struct nfs_server *server = NFS_SERVER(dir);
struct nfs_removeargs *args = msg->rpc_argp;
struct nfs_removeres *res = msg->rpc_resp;
res->server = server;
msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_REMOVE];
nfs41_init_sequence(&args->seq_args, &res->seq_res, 1);
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/5041f984669fe3a989a84c348eb838c8f7233f6b
|
5041f984669fe3a989a84c348eb838c8f7233f6b
|
AutoFill: Release the cached frame when we receive the frameDestroyed() message
from WebKit.
BUG=48857
TEST=none
Review URL: http://codereview.chromium.org/3173005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55789 0039d316-1c4b-4281-b951-d872f2087c98
|
bool RenderView::RunJavaScriptMessage(int type,
const std::wstring& message,
const std::wstring& default_value,
const GURL& frame_url,
std::wstring* result) {
bool success = false;
std::wstring result_temp;
if (!result)
result = &result_temp;
SendAndRunNestedMessageLoop(new ViewHostMsg_RunJavaScriptMessage(
routing_id_, message, default_value, frame_url, type, &success, result));
return success;
}
|
bool RenderView::RunJavaScriptMessage(int type,
const std::wstring& message,
const std::wstring& default_value,
const GURL& frame_url,
std::wstring* result) {
bool success = false;
std::wstring result_temp;
if (!result)
result = &result_temp;
SendAndRunNestedMessageLoop(new ViewHostMsg_RunJavaScriptMessage(
routing_id_, message, default_value, frame_url, type, &success, result));
return success;
}
|
C
|
Chrome
| 0 |
CVE-2018-11383
|
https://www.cvedetails.com/cve/CVE-2018-11383/
|
CWE-416
|
https://github.com/radare/radare2/commit/9d348bcc2c4bbd3805e7eec97b594be9febbdf9a
|
9d348bcc2c4bbd3805e7eec97b594be9febbdf9a
|
Fix #9943 - Invalid free on RAnal.avr
|
INST_HANDLER (sbi) { // SBI A, b
int a = (buf[0] >> 3) & 0x1f;
int b = buf[0] & 0x07;
RStrBuf *io_port;
op->type2 = 1;
op->val = a;
op->family = R_ANAL_OP_FAMILY_IO;
io_port = __generic_io_dest (a, 0, cpu);
ESIL_A ("0xff,%d,1,<<,|,%s,&,", b, io_port);
r_strbuf_free (io_port);
io_port = __generic_io_dest (a, 1, cpu);
ESIL_A ("%s,", r_strbuf_get (io_port));
r_strbuf_free (io_port);
}
|
INST_HANDLER (sbi) { // SBI A, b
int a = (buf[0] >> 3) & 0x1f;
int b = buf[0] & 0x07;
RStrBuf *io_port;
op->type2 = 1;
op->val = a;
op->family = R_ANAL_OP_FAMILY_IO;
io_port = __generic_io_dest (a, 0, cpu);
ESIL_A ("0xff,%d,1,<<,|,%s,&,", b, io_port);
r_strbuf_free (io_port);
io_port = __generic_io_dest (a, 1, cpu);
ESIL_A ("%s,", r_strbuf_get (io_port));
r_strbuf_free (io_port);
}
|
C
|
radare2
| 0 |
CVE-2018-6063
|
https://www.cvedetails.com/cve/CVE-2018-6063/
|
CWE-787
|
https://github.com/chromium/chromium/commit/673ce95d481ea9368c4d4d43ac756ba1d6d9e608
|
673ce95d481ea9368c4d4d43ac756ba1d6d9e608
|
Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which
were assuming that the call actually has any control over the memory
protection applied to a handle when mapped.
Where fixing usage is infeasible for this CL, TODOs are added to
annotate follow-up work.
Also updates the API and documentation to (hopefully) improve clarity
and avoid similar mistakes from being made in the future.
BUG=792900
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I0578aaa9ca3bfcb01aaf2451315d1ede95458477
Reviewed-on: https://chromium-review.googlesource.com/818282
Reviewed-by: Wei Li <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Sadrul Chowdhury <[email protected]>
Reviewed-by: Yuzhu Shen <[email protected]>
Reviewed-by: Robert Sesek <[email protected]>
Commit-Queue: Ken Rockot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#530268}
|
explicit PdfCompositorTestService(const std::string& creator)
: PdfCompositorService(creator) {}
|
explicit PdfCompositorTestService(const std::string& creator)
: PdfCompositorService(creator) {}
|
C
|
Chrome
| 0 |
CVE-2011-2351
|
https://www.cvedetails.com/cve/CVE-2011-2351/
|
CWE-399
|
https://github.com/chromium/chromium/commit/bf381d8a02c3d272d4dd879ac719d8993dfb5ad6
|
bf381d8a02c3d272d4dd879ac719d8993dfb5ad6
|
Enable HistoryModelWorker by default, now that bug 69561 is fixed.
BUG=69561
TEST=Run sync manually and run integration tests, sync should not crash.
Review URL: http://codereview.chromium.org/7016007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85211 0039d316-1c4b-4281-b951-d872f2087c98
|
void SyncBackendHost::Core::NotifyPassphraseRequired(
sync_api::PassphraseRequiredReason reason) {
if (!host_ || !host_->frontend_)
return;
DCHECK_EQ(MessageLoop::current(), host_->frontend_loop_);
if (reason == sync_api::REASON_SET_PASSPHRASE_FAILED)
processing_passphrase_ = false;
if (processing_passphrase_) {
VLOG(1) << "Core received OnPassphraseRequired while processing a "
<< "passphrase. Silently dropping.";
return;
}
host_->frontend_->OnPassphraseRequired(reason);
}
|
void SyncBackendHost::Core::NotifyPassphraseRequired(
sync_api::PassphraseRequiredReason reason) {
if (!host_ || !host_->frontend_)
return;
DCHECK_EQ(MessageLoop::current(), host_->frontend_loop_);
if (reason == sync_api::REASON_SET_PASSPHRASE_FAILED)
processing_passphrase_ = false;
if (processing_passphrase_) {
VLOG(1) << "Core received OnPassphraseRequired while processing a "
<< "passphrase. Silently dropping.";
return;
}
host_->frontend_->OnPassphraseRequired(reason);
}
|
C
|
Chrome
| 0 |
CVE-2018-18386
|
https://www.cvedetails.com/cve/CVE-2018-18386/
|
CWE-704
|
https://github.com/torvalds/linux/commit/966031f340185eddd05affcf72b740549f056348
|
966031f340185eddd05affcf72b740549f056348
|
n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD)
We added support for EXTPROC back in 2010 in commit 26df6d13406d ("tty:
Add EXTPROC support for LINEMODE") and the intent was to allow it to
override some (all?) ICANON behavior. Quoting from that original commit
message:
There is a new bit in the termios local flag word, EXTPROC.
When this bit is set, several aspects of the terminal driver
are disabled. Input line editing, character echo, and mapping
of signals are all disabled. This allows the telnetd to turn
off these functions when in linemode, but still keep track of
what state the user wants the terminal to be in.
but the problem turns out that "several aspects of the terminal driver
are disabled" is a bit ambiguous, and you can really confuse the n_tty
layer by setting EXTPROC and then causing some of the ICANON invariants
to no longer be maintained.
This fixes at least one such case (TIOCINQ) becoming unhappy because of
the confusion over whether ICANON really means ICANON when EXTPROC is set.
This basically makes TIOCINQ match the case of read: if EXTPROC is set,
we ignore ICANON. Also, make sure to reset the ICANON state ie EXTPROC
changes, not just if ICANON changes.
Fixes: 26df6d13406d ("tty: Add EXTPROC support for LINEMODE")
Reported-by: Tetsuo Handa <[email protected]>
Reported-by: syzkaller <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
{
*ops = n_tty_ops;
ops->owner = NULL;
ops->refcount = ops->flags = 0;
}
|
void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
{
*ops = n_tty_ops;
ops->owner = NULL;
ops->refcount = ops->flags = 0;
}
|
C
|
linux
| 0 |
CVE-2013-6376
|
https://www.cvedetails.com/cve/CVE-2013-6376/
|
CWE-189
|
https://github.com/torvalds/linux/commit/17d68b763f09a9ce824ae23eb62c9efc57b69271
|
17d68b763f09a9ce824ae23eb62c9efc57b69271
|
KVM: x86: fix guest-initiated crash with x2apic (CVE-2013-6376)
A guest can cause a BUG_ON() leading to a host kernel crash.
When the guest writes to the ICR to request an IPI, while in x2apic
mode the following things happen, the destination is read from
ICR2, which is a register that the guest can control.
kvm_irq_delivery_to_apic_fast uses the high 16 bits of ICR2 as the
cluster id. A BUG_ON is triggered, which is a protection against
accessing map->logical_map with an out-of-bounds access and manages
to avoid that anything really unsafe occurs.
The logic in the code is correct from real HW point of view. The problem
is that KVM supports only one cluster with ID 0 in clustered mode, but
the code that has the bug does not take this into account.
Reported-by: Lars Bull <[email protected]>
Cc: [email protected]
Signed-off-by: Gleb Natapov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static inline void kvm_apic_set_id(struct kvm_lapic *apic, u8 id)
{
apic_set_reg(apic, APIC_ID, id << 24);
recalculate_apic_map(apic->vcpu->kvm);
}
|
static inline void kvm_apic_set_id(struct kvm_lapic *apic, u8 id)
{
apic_set_reg(apic, APIC_ID, id << 24);
recalculate_apic_map(apic->vcpu->kvm);
}
|
C
|
linux
| 0 |
CVE-2017-5044
|
https://www.cvedetails.com/cve/CVE-2017-5044/
|
CWE-119
|
https://github.com/chromium/chromium/commit/62154472bd2c43e1790dd1bd8a527c1db9118d88
|
62154472bd2c43e1790dd1bd8a527c1db9118d88
|
bluetooth: Implement getAvailability()
This change implements the getAvailability() method for
navigator.bluetooth as defined in the specification.
Bug: 707640
Change-Id: I9e9b3e7f8ea7f259e975f71cb6d9570e5f04b479
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1651516
Reviewed-by: Chris Harrelson <[email protected]>
Reviewed-by: Giovanni Ortuño Urquidi <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Commit-Queue: Ovidio de Jesús Ruiz-Henríquez <[email protected]>
Auto-Submit: Ovidio de Jesús Ruiz-Henríquez <[email protected]>
Cr-Commit-Position: refs/heads/master@{#688987}
|
void FakeCentral::StopScan(DiscoverySessionResultCallback callback) {
if (!IsPresent()) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(
std::move(callback), /*is_error=*/false,
device::UMABluetoothDiscoverySessionOutcome::ADAPTER_NOT_PRESENT));
return;
}
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(
std::move(callback), /*is_error=*/false,
device::UMABluetoothDiscoverySessionOutcome::ADAPTER_NOT_PRESENT));
}
|
void FakeCentral::StopScan(DiscoverySessionResultCallback callback) {
if (!IsPresent()) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(
std::move(callback), /*is_error=*/false,
device::UMABluetoothDiscoverySessionOutcome::ADAPTER_NOT_PRESENT));
return;
}
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(
std::move(callback), /*is_error=*/false,
device::UMABluetoothDiscoverySessionOutcome::ADAPTER_NOT_PRESENT));
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/ea3d1d84be3d6f97bf50e76511c9e26af6895533
|
ea3d1d84be3d6f97bf50e76511c9e26af6895533
|
Fix passing pointers between processes.
BUG=31880
Review URL: http://codereview.chromium.org/558036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37555 0039d316-1c4b-4281-b951-d872f2087c98
|
explicit MultiPartResponseClient(WebPluginResourceClient* resource_client)
: resource_client_(resource_client) {
Clear();
}
|
explicit MultiPartResponseClient(WebPluginResourceClient* resource_client)
: resource_client_(resource_client) {
Clear();
}
|
C
|
Chrome
| 0 |
CVE-2016-4303
|
https://www.cvedetails.com/cve/CVE-2016-4303/
|
CWE-119
|
https://github.com/esnet/iperf/commit/91f2fa59e8ed80dfbf400add0164ee0e508e412a
|
91f2fa59e8ed80dfbf400add0164ee0e508e412a
|
Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and reported by Dave McDaniel, Cisco Talos.
Based on a patch by @dopheide-esnet, with input from @DaveGamble.
Cross-references: TALOS-CAN-0164, ESNET-SECADV-2016-0001,
CVE-2016-4303
(cherry picked from commit ed94082be27d971a5e1b08b666e2c217cf470a40)
Signed-off-by: Bruce A. Mah <[email protected]>
|
static const char *parse_array( cJSON *item, const char *value )
static const char *parse_array(cJSON *item,const char *value,const char **ep)
{
cJSON *child;
if (*value!='[') {*ep=value;return 0;} /* not an array! */
item->type=cJSON_Array;
value=skip(value+1);
if (*value==']') return value+1; /* empty array. */
item->child=child=cJSON_New_Item();
if (!item->child) return 0; /* memory fail */
value=skip(parse_value(child,skip(value),ep)); /* skip any spacing, get the value. */
if (!value) return 0;
while (*value==',')
{
cJSON *new_item;
if (!(new_item=cJSON_New_Item())) return 0; /* memory fail */
child->next=new_item;new_item->prev=child;child=new_item;
value=skip(parse_value(child,skip(value+1),ep));
if (!value) return 0; /* memory fail */
}
if (*value==']') return value+1; /* end of array */
*ep=value;return 0; /* malformed. */
}
|
static const char *parse_array( cJSON *item, const char *value )
{
cJSON *child;
if ( *value != '[' ) {
/* Not an array! */
ep = value;
return 0;
}
item->type = cJSON_Array;
value = skip( value + 1 );
if ( *value == ']' )
return value + 1; /* empty array. */
if ( ! ( item->child = child = cJSON_New_Item() ) )
return 0; /* memory fail */
if ( ! ( value = skip( parse_value( child, skip( value ) ) ) ) )
return 0;
while ( *value == ',' ) {
cJSON *new_item;
if ( ! ( new_item = cJSON_New_Item() ) )
return 0; /* memory fail */
child->next = new_item;
new_item->prev = child;
child = new_item;
if ( ! ( value = skip( parse_value( child, skip( value+1 ) ) ) ) )
return 0; /* memory fail */
}
if ( *value == ']' )
return value + 1; /* end of array */
/* Malformed. */
ep = value;
return 0;
}
|
C
|
iperf
| 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 <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657568}
|
DrawingBufferClientRestorePixelUnpackBufferBinding() {}
|
DrawingBufferClientRestorePixelUnpackBufferBinding() {}
|
C
|
Chrome
| 0 |
CVE-2017-5093
|
https://www.cvedetails.com/cve/CVE-2017-5093/
|
CWE-20
|
https://github.com/chromium/chromium/commit/0720b02e4f303ea6b114d4ae9453e3a7ff55f8dc
|
0720b02e4f303ea6b114d4ae9453e3a7ff55f8dc
|
If JavaScript shows a dialog, cause the page to lose fullscreen.
BUG=670135, 550017, 726761, 728276
Review-Url: https://codereview.chromium.org/2906133004
Cr-Commit-Position: refs/heads/master@{#478884}
|
void WebContentsImpl::OnRequestPpapiBrokerPermission(
RenderViewHostImpl* source,
int ppb_broker_route_id,
const GURL& url,
const base::FilePath& plugin_path) {
base::Callback<void(bool)> permission_result_callback = base::Bind(
&WebContentsImpl::SendPpapiBrokerPermissionResult, base::Unretained(this),
source->GetProcess()->GetID(), ppb_broker_route_id);
if (!delegate_) {
permission_result_callback.Run(false);
return;
}
if (!delegate_->RequestPpapiBrokerPermission(this, url, plugin_path,
permission_result_callback)) {
NOTIMPLEMENTED();
permission_result_callback.Run(false);
}
}
|
void WebContentsImpl::OnRequestPpapiBrokerPermission(
RenderViewHostImpl* source,
int ppb_broker_route_id,
const GURL& url,
const base::FilePath& plugin_path) {
base::Callback<void(bool)> permission_result_callback = base::Bind(
&WebContentsImpl::SendPpapiBrokerPermissionResult, base::Unretained(this),
source->GetProcess()->GetID(), ppb_broker_route_id);
if (!delegate_) {
permission_result_callback.Run(false);
return;
}
if (!delegate_->RequestPpapiBrokerPermission(this, url, plugin_path,
permission_result_callback)) {
NOTIMPLEMENTED();
permission_result_callback.Run(false);
}
}
|
C
|
Chrome
| 0 |
CVE-2016-5219
|
https://www.cvedetails.com/cve/CVE-2016-5219/
|
CWE-416
|
https://github.com/chromium/chromium/commit/a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
cheaper by minimizing the round-trip to the GPU thread.
Bug: 881152, 957001
Change-Id: Iadfa798af29225e752c710ca5c25f50b3dd3101a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586630
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657568}
|
gl::GLSurface* GLES2DecoderPassthroughImpl::GetGLSurface() {
return surface_.get();
}
|
gl::GLSurface* GLES2DecoderPassthroughImpl::GetGLSurface() {
return surface_.get();
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/74c1ec481b33194dc7a428f2d58fc89640b313ae
|
74c1ec481b33194dc7a428f2d58fc89640b313ae
|
Fix glGetFramebufferAttachmentParameteriv so it returns
current names for buffers.
TEST=unit_tests and conformance tests
BUG=none
Review URL: http://codereview.chromium.org/3135003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55831 0039d316-1c4b-4281-b951-d872f2087c98
|
void set_index(GLuint index) {
index_ = index;
}
|
void set_index(GLuint index) {
index_ = index;
}
|
C
|
Chrome
| 0 |
CVE-2018-6096
|
https://www.cvedetails.com/cve/CVE-2018-6096/
| null |
https://github.com/chromium/chromium/commit/36f801fdbec07d116a6f4f07bb363f10897d6a51
|
36f801fdbec07d116a6f4f07bb363f10897d6a51
|
If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8fc017
Reviewed-on: https://chromium-review.googlesource.com/852378
Reviewed-by: Nasko Oskov <[email protected]>
Reviewed-by: Philip Jägenstedt <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#533790}
|
void RenderFrameHostImpl::OnSmartClipDataExtracted(int32_t callback_id,
const base::string16& text,
const base::string16& html) {
std::move(*smart_clip_callbacks_.Lookup(callback_id)).Run(text, html);
smart_clip_callbacks_.Remove(callback_id);
}
|
void RenderFrameHostImpl::OnSmartClipDataExtracted(int32_t callback_id,
const base::string16& text,
const base::string16& html) {
std::move(*smart_clip_callbacks_.Lookup(callback_id)).Run(text, html);
smart_clip_callbacks_.Remove(callback_id);
}
|
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::RenderViewCreated(RenderViewHost* render_view_host) {
if (!static_cast<RenderViewHostImpl*>(render_view_host)->is_active())
return;
if (delegate_)
view_->SetOverscrollControllerEnabled(CanOverscrollContent());
NotificationService::current()->Notify(
NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED,
Source<WebContents>(this),
Details<RenderViewHost>(render_view_host));
NavigationEntry* entry = controller_.GetPendingEntry();
if (entry && entry->IsViewSourceMode()) {
render_view_host->Send(
new ViewMsg_EnableViewSourceMode(render_view_host->GetRoutingID()));
}
view_->RenderViewCreated(render_view_host);
FOR_EACH_OBSERVER(
WebContentsObserver, observers_, RenderViewCreated(render_view_host));
}
|
void WebContentsImpl::RenderViewCreated(RenderViewHost* render_view_host) {
if (!static_cast<RenderViewHostImpl*>(render_view_host)->is_active())
return;
if (delegate_)
view_->SetOverscrollControllerEnabled(CanOverscrollContent());
NotificationService::current()->Notify(
NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED,
Source<WebContents>(this),
Details<RenderViewHost>(render_view_host));
NavigationEntry* entry = controller_.GetPendingEntry();
if (entry && entry->IsViewSourceMode()) {
render_view_host->Send(
new ViewMsg_EnableViewSourceMode(render_view_host->GetRoutingID()));
}
view_->RenderViewCreated(render_view_host);
FOR_EACH_OBSERVER(
WebContentsObserver, observers_, RenderViewCreated(render_view_host));
}
|
C
|
Chrome
| 0 |
CVE-2015-3835
|
https://www.cvedetails.com/cve/CVE-2015-3835/
|
CWE-119
|
https://android.googlesource.com/platform/frameworks/av/+/3cb1b6944e776863aea316e25fdc16d7f9962902
|
3cb1b6944e776863aea316e25fdc16d7f9962902
|
IOMX: Enable buffer ptr to buffer id translation for arm32
Bug: 20634516
Change-Id: Iac9eac3cb251eccd9bbad5df7421a07edc21da0c
(cherry picked from commit 2d6b6601743c3c6960c6511a2cb774ef902759f4)
|
status_t OMXNodeInstance::updateGraphicBufferInMeta(
OMX_U32 portIndex, const sp<GraphicBuffer>& graphicBuffer,
OMX::buffer_id buffer) {
Mutex::Autolock autoLock(mLock);
OMX_BUFFERHEADERTYPE *header = findBufferHeader(buffer);
VideoDecoderOutputMetaData *metadata =
(VideoDecoderOutputMetaData *)(header->pBuffer);
BufferMeta *bufferMeta = (BufferMeta *)(header->pAppPrivate);
bufferMeta->setGraphicBuffer(graphicBuffer);
metadata->eType = kMetadataBufferTypeGrallocSource;
metadata->pHandle = graphicBuffer->handle;
CLOG_BUFFER(updateGraphicBufferInMeta, "%s:%u, %#x := %p",
portString(portIndex), portIndex, buffer, graphicBuffer->handle);
return OK;
}
|
status_t OMXNodeInstance::updateGraphicBufferInMeta(
OMX_U32 portIndex, const sp<GraphicBuffer>& graphicBuffer,
OMX::buffer_id buffer) {
Mutex::Autolock autoLock(mLock);
OMX_BUFFERHEADERTYPE *header = findBufferHeader(buffer);
VideoDecoderOutputMetaData *metadata =
(VideoDecoderOutputMetaData *)(header->pBuffer);
BufferMeta *bufferMeta = (BufferMeta *)(header->pAppPrivate);
bufferMeta->setGraphicBuffer(graphicBuffer);
metadata->eType = kMetadataBufferTypeGrallocSource;
metadata->pHandle = graphicBuffer->handle;
CLOG_BUFFER(updateGraphicBufferInMeta, "%s:%u, %#x := %p",
portString(portIndex), portIndex, buffer, graphicBuffer->handle);
return OK;
}
|
C
|
Android
| 0 |
CVE-2017-2647
|
https://www.cvedetails.com/cve/CVE-2017-2647/
|
CWE-476
|
https://github.com/torvalds/linux/commit/c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81
|
c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81
|
KEYS: Remove key_type::match in favour of overriding default by match_preparse
A previous patch added a ->match_preparse() method to the key type. This is
allowed to override the function called by the iteration algorithm.
Therefore, we can just set a default that simply checks for an exact match of
the key description with the original criterion data and allow match_preparse
to override it as needed.
The key_type::match op is then redundant and can be removed, as can the
user_match() function.
Signed-off-by: David Howells <[email protected]>
Acked-by: Vivek Goyal <[email protected]>
|
key_ref_t key_create_or_update(key_ref_t keyring_ref,
const char *type,
const char *description,
const void *payload,
size_t plen,
key_perm_t perm,
unsigned long flags)
{
struct keyring_index_key index_key = {
.description = description,
};
struct key_preparsed_payload prep;
struct assoc_array_edit *edit;
const struct cred *cred = current_cred();
struct key *keyring, *key = NULL;
key_ref_t key_ref;
int ret;
/* look up the key type to see if it's one of the registered kernel
* types */
index_key.type = key_type_lookup(type);
if (IS_ERR(index_key.type)) {
key_ref = ERR_PTR(-ENODEV);
goto error;
}
key_ref = ERR_PTR(-EINVAL);
if (!index_key.type->instantiate ||
(!index_key.description && !index_key.type->preparse))
goto error_put_type;
keyring = key_ref_to_ptr(keyring_ref);
key_check(keyring);
key_ref = ERR_PTR(-ENOTDIR);
if (keyring->type != &key_type_keyring)
goto error_put_type;
memset(&prep, 0, sizeof(prep));
prep.data = payload;
prep.datalen = plen;
prep.quotalen = index_key.type->def_datalen;
prep.trusted = flags & KEY_ALLOC_TRUSTED;
prep.expiry = TIME_T_MAX;
if (index_key.type->preparse) {
ret = index_key.type->preparse(&prep);
if (ret < 0) {
key_ref = ERR_PTR(ret);
goto error_free_prep;
}
if (!index_key.description)
index_key.description = prep.description;
key_ref = ERR_PTR(-EINVAL);
if (!index_key.description)
goto error_free_prep;
}
index_key.desc_len = strlen(index_key.description);
key_ref = ERR_PTR(-EPERM);
if (!prep.trusted && test_bit(KEY_FLAG_TRUSTED_ONLY, &keyring->flags))
goto error_free_prep;
flags |= prep.trusted ? KEY_ALLOC_TRUSTED : 0;
ret = __key_link_begin(keyring, &index_key, &edit);
if (ret < 0) {
key_ref = ERR_PTR(ret);
goto error_free_prep;
}
/* if we're going to allocate a new key, we're going to have
* to modify the keyring */
ret = key_permission(keyring_ref, KEY_NEED_WRITE);
if (ret < 0) {
key_ref = ERR_PTR(ret);
goto error_link_end;
}
/* if it's possible to update this type of key, search for an existing
* key of the same type and description in the destination keyring and
* update that instead if possible
*/
if (index_key.type->update) {
key_ref = find_key_to_update(keyring_ref, &index_key);
if (key_ref)
goto found_matching_key;
}
/* if the client doesn't provide, decide on the permissions we want */
if (perm == KEY_PERM_UNDEF) {
perm = KEY_POS_VIEW | KEY_POS_SEARCH | KEY_POS_LINK | KEY_POS_SETATTR;
perm |= KEY_USR_VIEW;
if (index_key.type->read)
perm |= KEY_POS_READ;
if (index_key.type == &key_type_keyring ||
index_key.type->update)
perm |= KEY_POS_WRITE;
}
/* allocate a new key */
key = key_alloc(index_key.type, index_key.description,
cred->fsuid, cred->fsgid, cred, perm, flags);
if (IS_ERR(key)) {
key_ref = ERR_CAST(key);
goto error_link_end;
}
/* instantiate it and link it into the target keyring */
ret = __key_instantiate_and_link(key, &prep, keyring, NULL, &edit);
if (ret < 0) {
key_put(key);
key_ref = ERR_PTR(ret);
goto error_link_end;
}
key_ref = make_key_ref(key, is_key_possessed(keyring_ref));
error_link_end:
__key_link_end(keyring, &index_key, edit);
error_free_prep:
if (index_key.type->preparse)
index_key.type->free_preparse(&prep);
error_put_type:
key_type_put(index_key.type);
error:
return key_ref;
found_matching_key:
/* we found a matching key, so we're going to try to update it
* - we can drop the locks first as we have the key pinned
*/
__key_link_end(keyring, &index_key, edit);
key_ref = __key_update(key_ref, &prep);
goto error_free_prep;
}
|
key_ref_t key_create_or_update(key_ref_t keyring_ref,
const char *type,
const char *description,
const void *payload,
size_t plen,
key_perm_t perm,
unsigned long flags)
{
struct keyring_index_key index_key = {
.description = description,
};
struct key_preparsed_payload prep;
struct assoc_array_edit *edit;
const struct cred *cred = current_cred();
struct key *keyring, *key = NULL;
key_ref_t key_ref;
int ret;
/* look up the key type to see if it's one of the registered kernel
* types */
index_key.type = key_type_lookup(type);
if (IS_ERR(index_key.type)) {
key_ref = ERR_PTR(-ENODEV);
goto error;
}
key_ref = ERR_PTR(-EINVAL);
if (!index_key.type->match || !index_key.type->instantiate ||
(!index_key.description && !index_key.type->preparse))
goto error_put_type;
keyring = key_ref_to_ptr(keyring_ref);
key_check(keyring);
key_ref = ERR_PTR(-ENOTDIR);
if (keyring->type != &key_type_keyring)
goto error_put_type;
memset(&prep, 0, sizeof(prep));
prep.data = payload;
prep.datalen = plen;
prep.quotalen = index_key.type->def_datalen;
prep.trusted = flags & KEY_ALLOC_TRUSTED;
prep.expiry = TIME_T_MAX;
if (index_key.type->preparse) {
ret = index_key.type->preparse(&prep);
if (ret < 0) {
key_ref = ERR_PTR(ret);
goto error_free_prep;
}
if (!index_key.description)
index_key.description = prep.description;
key_ref = ERR_PTR(-EINVAL);
if (!index_key.description)
goto error_free_prep;
}
index_key.desc_len = strlen(index_key.description);
key_ref = ERR_PTR(-EPERM);
if (!prep.trusted && test_bit(KEY_FLAG_TRUSTED_ONLY, &keyring->flags))
goto error_free_prep;
flags |= prep.trusted ? KEY_ALLOC_TRUSTED : 0;
ret = __key_link_begin(keyring, &index_key, &edit);
if (ret < 0) {
key_ref = ERR_PTR(ret);
goto error_free_prep;
}
/* if we're going to allocate a new key, we're going to have
* to modify the keyring */
ret = key_permission(keyring_ref, KEY_NEED_WRITE);
if (ret < 0) {
key_ref = ERR_PTR(ret);
goto error_link_end;
}
/* if it's possible to update this type of key, search for an existing
* key of the same type and description in the destination keyring and
* update that instead if possible
*/
if (index_key.type->update) {
key_ref = find_key_to_update(keyring_ref, &index_key);
if (key_ref)
goto found_matching_key;
}
/* if the client doesn't provide, decide on the permissions we want */
if (perm == KEY_PERM_UNDEF) {
perm = KEY_POS_VIEW | KEY_POS_SEARCH | KEY_POS_LINK | KEY_POS_SETATTR;
perm |= KEY_USR_VIEW;
if (index_key.type->read)
perm |= KEY_POS_READ;
if (index_key.type == &key_type_keyring ||
index_key.type->update)
perm |= KEY_POS_WRITE;
}
/* allocate a new key */
key = key_alloc(index_key.type, index_key.description,
cred->fsuid, cred->fsgid, cred, perm, flags);
if (IS_ERR(key)) {
key_ref = ERR_CAST(key);
goto error_link_end;
}
/* instantiate it and link it into the target keyring */
ret = __key_instantiate_and_link(key, &prep, keyring, NULL, &edit);
if (ret < 0) {
key_put(key);
key_ref = ERR_PTR(ret);
goto error_link_end;
}
key_ref = make_key_ref(key, is_key_possessed(keyring_ref));
error_link_end:
__key_link_end(keyring, &index_key, edit);
error_free_prep:
if (index_key.type->preparse)
index_key.type->free_preparse(&prep);
error_put_type:
key_type_put(index_key.type);
error:
return key_ref;
found_matching_key:
/* we found a matching key, so we're going to try to update it
* - we can drop the locks first as we have the key pinned
*/
__key_link_end(keyring, &index_key, edit);
key_ref = __key_update(key_ref, &prep);
goto error_free_prep;
}
|
C
|
linux
| 1 |
CVE-2016-2384
|
https://www.cvedetails.com/cve/CVE-2016-2384/
| null |
https://github.com/torvalds/linux/commit/07d86ca93db7e5cdf4743564d98292042ec21af7
|
07d86ca93db7e5cdf4743564d98292042ec21af7
|
ALSA: usb-audio: avoid freeing umidi object twice
The 'umidi' object will be free'd on the error path by snd_usbmidi_free()
when tearing down the rawmidi interface. So we shouldn't try to free it
in snd_usbmidi_create() after having registered the rawmidi interface.
Found by KASAN.
Signed-off-by: Andrey Konovalov <[email protected]>
Acked-by: Clemens Ladisch <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
|
static void snd_usbmidi_emagic_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
/* FF indicates end of valid data */
for (i = 0; i < buffer_length; ++i)
if (buffer[i] == 0xff) {
buffer_length = i;
break;
}
/* handle F5 at end of last buffer */
if (ep->seen_f5)
goto switch_port;
while (buffer_length > 0) {
/* determine size of data until next F5 */
for (i = 0; i < buffer_length; ++i)
if (buffer[i] == 0xf5)
break;
snd_usbmidi_input_data(ep, ep->current_port, buffer, i);
buffer += i;
buffer_length -= i;
if (buffer_length <= 0)
break;
/* assert(buffer[0] == 0xf5); */
ep->seen_f5 = 1;
++buffer;
--buffer_length;
switch_port:
if (buffer_length <= 0)
break;
if (buffer[0] < 0x80) {
ep->current_port = (buffer[0] - 1) & 15;
++buffer;
--buffer_length;
}
ep->seen_f5 = 0;
}
}
|
static void snd_usbmidi_emagic_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
int i;
/* FF indicates end of valid data */
for (i = 0; i < buffer_length; ++i)
if (buffer[i] == 0xff) {
buffer_length = i;
break;
}
/* handle F5 at end of last buffer */
if (ep->seen_f5)
goto switch_port;
while (buffer_length > 0) {
/* determine size of data until next F5 */
for (i = 0; i < buffer_length; ++i)
if (buffer[i] == 0xf5)
break;
snd_usbmidi_input_data(ep, ep->current_port, buffer, i);
buffer += i;
buffer_length -= i;
if (buffer_length <= 0)
break;
/* assert(buffer[0] == 0xf5); */
ep->seen_f5 = 1;
++buffer;
--buffer_length;
switch_port:
if (buffer_length <= 0)
break;
if (buffer[0] < 0x80) {
ep->current_port = (buffer[0] - 1) & 15;
++buffer;
--buffer_length;
}
ep->seen_f5 = 0;
}
}
|
C
|
linux
| 0 |
CVE-2017-5093
|
https://www.cvedetails.com/cve/CVE-2017-5093/
|
CWE-20
|
https://github.com/chromium/chromium/commit/0720b02e4f303ea6b114d4ae9453e3a7ff55f8dc
|
0720b02e4f303ea6b114d4ae9453e3a7ff55f8dc
|
If JavaScript shows a dialog, cause the page to lose fullscreen.
BUG=670135, 550017, 726761, 728276
Review-Url: https://codereview.chromium.org/2906133004
Cr-Commit-Position: refs/heads/master@{#478884}
|
void WebContentsImpl::OnPepperInstanceCreated(RenderFrameHostImpl* source,
int32_t pp_instance) {
for (auto& observer : observers_)
observer.PepperInstanceCreated();
pepper_playback_observer_->PepperInstanceCreated(source, pp_instance);
}
|
void WebContentsImpl::OnPepperInstanceCreated(RenderFrameHostImpl* source,
int32_t pp_instance) {
for (auto& observer : observers_)
observer.PepperInstanceCreated();
pepper_playback_observer_->PepperInstanceCreated(source, pp_instance);
}
|
C
|
Chrome
| 0 |
CVE-2012-1179
|
https://www.cvedetails.com/cve/CVE-2012-1179/
|
CWE-264
|
https://github.com/torvalds/linux/commit/4a1d704194a441bf83c636004a479e01360ec850
|
4a1d704194a441bf83c636004a479e01360ec850
|
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
commit 1a5a9906d4e8d1976b701f889d8f35d54b928f25 upstream.
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad() that will not like to see a pmd
materializing as trans huge.
It's not khugepaged causing the problem, khugepaged holds the mmap_sem
in write mode (and all those sites must hold the mmap_sem in read mode
to prevent pagetables to go away from under them, during code review it
seems vm86 mode on 32bit kernels requires that too unless it's
restricted to 1 thread per process or UP builds). The race is only with
the huge pagefaults that can convert a pmd_none() into a
pmd_trans_huge().
Effectively all these pmd_none_or_clear_bad() sites running with
mmap_sem in read mode are somewhat speculative with the page faults, and
the result is always undefined when they run simultaneously. This is
probably why it wasn't common to run into this. For example if the
madvise(MADV_DONTNEED) runs zap_page_range() shortly before the page
fault, the hugepage will not be zapped, if the page fault runs first it
will be zapped.
Altering pmd_bad() not to error out if it finds hugepmds won't be enough
to fix this, because zap_pmd_range would then proceed to call
zap_pte_range (which would be incorrect if the pmd become a
pmd_trans_huge()).
The simplest way to fix this is to read the pmd in the local stack
(regardless of what we read, no need of actual CPU barriers, only
compiler barrier needed), and be sure it is not changing under the code
that computes its value. Even if the real pmd is changing under the
value we hold on the stack, we don't care. If we actually end up in
zap_pte_range it means the pmd was not none already and it was not huge,
and it can't become huge from under us (khugepaged locking explained
above).
All we need is to enforce that there is no way anymore that in a code
path like below, pmd_trans_huge can be false, but pmd_none_or_clear_bad
can run into a hugepmd. The overhead of a barrier() is just a compiler
tweak and should not be measurable (I only added it for THP builds). I
don't exclude different compiler versions may have prevented the race
too by caching the value of *pmd on the stack (that hasn't been
verified, but it wouldn't be impossible considering
pmd_none_or_clear_bad, pmd_bad, pmd_trans_huge, pmd_none are all inlines
and there's no external function called in between pmd_trans_huge and
pmd_none_or_clear_bad).
if (pmd_trans_huge(*pmd)) {
if (next-addr != HPAGE_PMD_SIZE) {
VM_BUG_ON(!rwsem_is_locked(&tlb->mm->mmap_sem));
split_huge_page_pmd(vma->vm_mm, pmd);
} else if (zap_huge_pmd(tlb, vma, pmd, addr))
continue;
/* fall through */
}
if (pmd_none_or_clear_bad(pmd))
Because this race condition could be exercised without special
privileges this was reported in CVE-2012-1179.
The race was identified and fully explained by Ulrich who debugged it.
I'm quoting his accurate explanation below, for reference.
====== start quote =======
mapcount 0 page_mapcount 1
kernel BUG at mm/huge_memory.c:1384!
At some point prior to the panic, a "bad pmd ..." message similar to the
following is logged on the console:
mm/memory.c:145: bad pmd ffff8800376e1f98(80000000314000e7).
The "bad pmd ..." message is logged by pmd_clear_bad() before it clears
the page's PMD table entry.
143 void pmd_clear_bad(pmd_t *pmd)
144 {
-> 145 pmd_ERROR(*pmd);
146 pmd_clear(pmd);
147 }
After the PMD table entry has been cleared, there is an inconsistency
between the actual number of PMD table entries that are mapping the page
and the page's map count (_mapcount field in struct page). When the page
is subsequently reclaimed, __split_huge_page() detects this inconsistency.
1381 if (mapcount != page_mapcount(page))
1382 printk(KERN_ERR "mapcount %d page_mapcount %d\n",
1383 mapcount, page_mapcount(page));
-> 1384 BUG_ON(mapcount != page_mapcount(page));
The root cause of the problem is a race of two threads in a multithreaded
process. Thread B incurs a page fault on a virtual address that has never
been accessed (PMD entry is zero) while Thread A is executing an madvise()
system call on a virtual address within the same 2 MB (huge page) range.
virtual address space
.---------------------.
| |
| |
.-|---------------------|
| | |
| | |<-- B(fault)
| | |
2 MB | |/////////////////////|-.
huge < |/////////////////////| > A(range)
page | |/////////////////////|-'
| | |
| | |
'-|---------------------|
| |
| |
'---------------------'
- Thread A is executing an madvise(..., MADV_DONTNEED) system call
on the virtual address range "A(range)" shown in the picture.
sys_madvise
// Acquire the semaphore in shared mode.
down_read(¤t->mm->mmap_sem)
...
madvise_vma
switch (behavior)
case MADV_DONTNEED:
madvise_dontneed
zap_page_range
unmap_vmas
unmap_page_range
zap_pud_range
zap_pmd_range
//
// Assume that this huge page has never been accessed.
// I.e. content of the PMD entry is zero (not mapped).
//
if (pmd_trans_huge(*pmd)) {
// We don't get here due to the above assumption.
}
//
// Assume that Thread B incurred a page fault and
.---------> // sneaks in here as shown below.
| //
| if (pmd_none_or_clear_bad(pmd))
| {
| if (unlikely(pmd_bad(*pmd)))
| pmd_clear_bad
| {
| pmd_ERROR
| // Log "bad pmd ..." message here.
| pmd_clear
| // Clear the page's PMD entry.
| // Thread B incremented the map count
| // in page_add_new_anon_rmap(), but
| // now the page is no longer mapped
| // by a PMD entry (-> inconsistency).
| }
| }
|
v
- Thread B is handling a page fault on virtual address "B(fault)" shown
in the picture.
...
do_page_fault
__do_page_fault
// Acquire the semaphore in shared mode.
down_read_trylock(&mm->mmap_sem)
...
handle_mm_fault
if (pmd_none(*pmd) && transparent_hugepage_enabled(vma))
// We get here due to the above assumption (PMD entry is zero).
do_huge_pmd_anonymous_page
alloc_hugepage_vma
// Allocate a new transparent huge page here.
...
__do_huge_pmd_anonymous_page
...
spin_lock(&mm->page_table_lock)
...
page_add_new_anon_rmap
// Here we increment the page's map count (starts at -1).
atomic_set(&page->_mapcount, 0)
set_pmd_at
// Here we set the page's PMD entry which will be cleared
// when Thread A calls pmd_clear_bad().
...
spin_unlock(&mm->page_table_lock)
The mmap_sem does not prevent the race because both threads are acquiring
it in shared mode (down_read). Thread B holds the page_table_lock while
the page's map count and PMD table entry are updated. However, Thread A
does not synchronize on that lock.
====== end quote =======
[[email protected]: checkpatch fixes]
Reported-by: Ulrich Obergfell <[email protected]>
Signed-off-by: Andrea Arcangeli <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Dave Jones <[email protected]>
Acked-by: Larry Woodman <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Cc: Mark Salter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static struct page *mc_handle_file_pte(struct vm_area_struct *vma,
unsigned long addr, pte_t ptent, swp_entry_t *entry)
{
struct page *page = NULL;
struct inode *inode;
struct address_space *mapping;
pgoff_t pgoff;
if (!vma->vm_file) /* anonymous vma */
return NULL;
if (!move_file())
return NULL;
inode = vma->vm_file->f_path.dentry->d_inode;
mapping = vma->vm_file->f_mapping;
if (pte_none(ptent))
pgoff = linear_page_index(vma, addr);
else /* pte_file(ptent) is true */
pgoff = pte_to_pgoff(ptent);
/* page is moved even if it's not RSS of this task(page-faulted). */
page = find_get_page(mapping, pgoff);
#ifdef CONFIG_SWAP
/* shmem/tmpfs may report page out on swap: account for that too. */
if (radix_tree_exceptional_entry(page)) {
swp_entry_t swap = radix_to_swp_entry(page);
if (do_swap_account)
*entry = swap;
page = find_get_page(&swapper_space, swap.val);
}
#endif
return page;
}
|
static struct page *mc_handle_file_pte(struct vm_area_struct *vma,
unsigned long addr, pte_t ptent, swp_entry_t *entry)
{
struct page *page = NULL;
struct inode *inode;
struct address_space *mapping;
pgoff_t pgoff;
if (!vma->vm_file) /* anonymous vma */
return NULL;
if (!move_file())
return NULL;
inode = vma->vm_file->f_path.dentry->d_inode;
mapping = vma->vm_file->f_mapping;
if (pte_none(ptent))
pgoff = linear_page_index(vma, addr);
else /* pte_file(ptent) is true */
pgoff = pte_to_pgoff(ptent);
/* page is moved even if it's not RSS of this task(page-faulted). */
page = find_get_page(mapping, pgoff);
#ifdef CONFIG_SWAP
/* shmem/tmpfs may report page out on swap: account for that too. */
if (radix_tree_exceptional_entry(page)) {
swp_entry_t swap = radix_to_swp_entry(page);
if (do_swap_account)
*entry = swap;
page = find_get_page(&swapper_space, swap.val);
}
#endif
return page;
}
|
C
|
linux
| 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.
[[email protected]: v2]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Alex Chen <[email protected]>
Reviewed-by: Jun Piao <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
struct o2nm_node *o2nm_get_node_by_num(u8 node_num)
{
struct o2nm_node *node = NULL;
if (node_num >= O2NM_MAX_NODES || o2nm_single_cluster == NULL)
goto out;
read_lock(&o2nm_single_cluster->cl_nodes_lock);
node = o2nm_single_cluster->cl_nodes[node_num];
if (node)
config_item_get(&node->nd_item);
read_unlock(&o2nm_single_cluster->cl_nodes_lock);
out:
return node;
}
|
struct o2nm_node *o2nm_get_node_by_num(u8 node_num)
{
struct o2nm_node *node = NULL;
if (node_num >= O2NM_MAX_NODES || o2nm_single_cluster == NULL)
goto out;
read_lock(&o2nm_single_cluster->cl_nodes_lock);
node = o2nm_single_cluster->cl_nodes[node_num];
if (node)
config_item_get(&node->nd_item);
read_unlock(&o2nm_single_cluster->cl_nodes_lock);
out:
return node;
}
|
C
|
linux
| 0 |
CVE-2012-0045
|
https://www.cvedetails.com/cve/CVE-2012-0045/
| null |
https://github.com/torvalds/linux/commit/c2226fc9e87ba3da060e47333657cd6616652b84
|
c2226fc9e87ba3da060e47333657cd6616652b84
|
KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit guests will crash (and 64bit guests
may behave in a wrong way) for example by simply executing following
nasm-demo-application:
[bits 32]
global _start
SECTION .text
_start: syscall
(I tested it with winxp and linux - both always crashed)
Disassembly of section .text:
00000000 <_start>:
0: 0f 05 syscall
The reason seems a missing "invalid opcode"-trap (int6) for the
syscall opcode "0f05", which is not available on Intel CPUs
within non-longmodes, as also on some AMD CPUs within legacy-mode.
(depending on CPU vendor, MSR_EFER and cpuid)
Because previous mentioned OSs may not engage corresponding
syscall target-registers (STAR, LSTAR, CSTAR), they remain
NULL and (non trapping) syscalls are leading to multiple
faults and finally crashs.
Depending on the architecture (AMD or Intel) pretended by
guests, various checks according to vendor's documentation
are implemented to overcome the current issue and behave
like the CPUs physical counterparts.
[mtosatti: cleanup/beautify code]
Signed-off-by: Stephan Baerwolf <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
|
static int emulate_ts(struct x86_emulate_ctxt *ctxt, int err)
{
return emulate_exception(ctxt, TS_VECTOR, err, true);
}
|
static int emulate_ts(struct x86_emulate_ctxt *ctxt, int err)
{
return emulate_exception(ctxt, TS_VECTOR, err, true);
}
|
C
|
linux
| 0 |
CVE-2016-7425
|
https://www.cvedetails.com/cve/CVE-2016-7425/
|
CWE-119
|
https://github.com/torvalds/linux/commit/7bc2b55a5c030685b399bb65b6baa9ccc3d1f167
|
7bc2b55a5c030685b399bb65b6baa9ccc3d1f167
|
scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.
Cc: <[email protected]>
Reported-by: Marco Grassi <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Tomas Henzl <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
static void arcmsr_hbaA_doorbell_isr(struct AdapterControlBlock *acb)
{
uint32_t outbound_doorbell;
struct MessageUnit_A __iomem *reg = acb->pmuA;
outbound_doorbell = readl(®->outbound_doorbell);
do {
writel(outbound_doorbell, ®->outbound_doorbell);
if (outbound_doorbell & ARCMSR_OUTBOUND_IOP331_DATA_WRITE_OK)
arcmsr_iop2drv_data_wrote_handle(acb);
if (outbound_doorbell & ARCMSR_OUTBOUND_IOP331_DATA_READ_OK)
arcmsr_iop2drv_data_read_handle(acb);
outbound_doorbell = readl(®->outbound_doorbell);
} while (outbound_doorbell & (ARCMSR_OUTBOUND_IOP331_DATA_WRITE_OK
| ARCMSR_OUTBOUND_IOP331_DATA_READ_OK));
}
|
static void arcmsr_hbaA_doorbell_isr(struct AdapterControlBlock *acb)
{
uint32_t outbound_doorbell;
struct MessageUnit_A __iomem *reg = acb->pmuA;
outbound_doorbell = readl(®->outbound_doorbell);
do {
writel(outbound_doorbell, ®->outbound_doorbell);
if (outbound_doorbell & ARCMSR_OUTBOUND_IOP331_DATA_WRITE_OK)
arcmsr_iop2drv_data_wrote_handle(acb);
if (outbound_doorbell & ARCMSR_OUTBOUND_IOP331_DATA_READ_OK)
arcmsr_iop2drv_data_read_handle(acb);
outbound_doorbell = readl(®->outbound_doorbell);
} while (outbound_doorbell & (ARCMSR_OUTBOUND_IOP331_DATA_WRITE_OK
| ARCMSR_OUTBOUND_IOP331_DATA_READ_OK));
}
|
C
|
linux
| 0 |
CVE-2013-0835
|
https://www.cvedetails.com/cve/CVE-2013-0835/
| null |
https://github.com/chromium/chromium/commit/8c7c42f5cd3d3cab81fad08b1159106184fa0c47
|
8c7c42f5cd3d3cab81fad08b1159106184fa0c47
|
Don't retain reference to ChromeGeolocationPermissionContext
ChromeGeolocationPermissionContext owns
GeolocationInfoBarQueueController, so make sure that the callback
passed to GeolocationInfoBarQueueController doesn't increase the
reference count on ChromeGeolocationPermissionContext (which
https://chromiumcodereview.appspot.com/11072012 accidentally does).
TBR=bulach
BUG=152921
TEST=unittest:chrome_geolocation_permission_context on memory.fyi bot
Review URL: https://chromiumcodereview.appspot.com/11087030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160881 0039d316-1c4b-4281-b951-d872f2087c98
|
void ChromeGeolocationPermissionContext::RegisterUserPrefs(
PrefService *user_prefs) {
#if defined(OS_ANDROID)
user_prefs->RegisterBooleanPref(prefs::kGeolocationEnabled, true,
PrefService::UNSYNCABLE_PREF);
#endif
}
|
void ChromeGeolocationPermissionContext::RegisterUserPrefs(
PrefService *user_prefs) {
#if defined(OS_ANDROID)
user_prefs->RegisterBooleanPref(prefs::kGeolocationEnabled, true,
PrefService::UNSYNCABLE_PREF);
#endif
}
|
C
|
Chrome
| 0 |
CVE-2018-20855
|
https://www.cvedetails.com/cve/CVE-2018-20855/
|
CWE-119
|
https://github.com/torvalds/linux/commit/0625b4ba1a5d4703c7fb01c497bd6c156908af00
|
0625b4ba1a5d4703c7fb01c497bd6c156908af00
|
IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <[email protected]>
Acked-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
|
static struct mlx5_ib_pd *get_pd(struct mlx5_ib_qp *qp)
{
return to_mpd(qp->ibqp.pd);
}
|
static struct mlx5_ib_pd *get_pd(struct mlx5_ib_qp *qp)
{
return to_mpd(qp->ibqp.pd);
}
|
C
|
linux
| 0 |
CVE-2016-1586
|
https://www.cvedetails.com/cve/CVE-2016-1586/
|
CWE-20
|
https://git.launchpad.net/oxide/commit/?id=29014da83e5fc358d6bff0f574e9ed45e61a35ac
|
29014da83e5fc358d6bff0f574e9ed45e61a35ac
| null |
void WebContext::DeliverSetCookiesResponse(
scoped_refptr<SetCookiesContext> ctxt) {
client_->CookiesSet(ctxt->request_id, ctxt->failed);
}
|
void WebContext::DeliverSetCookiesResponse(
scoped_refptr<SetCookiesContext> ctxt) {
client_->CookiesSet(ctxt->request_id, ctxt->failed);
}
|
CPP
|
launchpad
| 0 |
CVE-2013-6381
|
https://www.cvedetails.com/cve/CVE-2013-6381/
|
CWE-119
|
https://github.com/torvalds/linux/commit/6fb392b1a63ae36c31f62bc3fc8630b49d602b62
|
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
|
qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: Frank Blaschka <[email protected]>
Reviewed-by: Heiko Carstens <[email protected]>
Reported-by: Nico Golde <[email protected]>
Reported-by: Fabian Yamaguchi <[email protected]>
Cc: <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int qeth_query_ipassists_cb(struct qeth_card *card,
struct qeth_reply *reply, unsigned long data)
{
struct qeth_ipa_cmd *cmd;
QETH_DBF_TEXT(SETUP, 2, "qipasscb");
cmd = (struct qeth_ipa_cmd *) data;
switch (cmd->hdr.return_code) {
case IPA_RC_NOTSUPP:
case IPA_RC_L2_UNSUPPORTED_CMD:
QETH_DBF_TEXT(SETUP, 2, "ipaunsup");
card->options.ipa4.supported_funcs |= IPA_SETADAPTERPARMS;
card->options.ipa6.supported_funcs |= IPA_SETADAPTERPARMS;
return -0;
default:
if (cmd->hdr.return_code) {
QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Unhandled "
"rc=%d\n",
dev_name(&card->gdev->dev),
cmd->hdr.return_code);
return 0;
}
}
if (cmd->hdr.prot_version == QETH_PROT_IPV4) {
card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported;
card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled;
} else if (cmd->hdr.prot_version == QETH_PROT_IPV6) {
card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported;
card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled;
} else
QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Flawed LIC detected"
"\n", dev_name(&card->gdev->dev));
return 0;
}
|
static int qeth_query_ipassists_cb(struct qeth_card *card,
struct qeth_reply *reply, unsigned long data)
{
struct qeth_ipa_cmd *cmd;
QETH_DBF_TEXT(SETUP, 2, "qipasscb");
cmd = (struct qeth_ipa_cmd *) data;
switch (cmd->hdr.return_code) {
case IPA_RC_NOTSUPP:
case IPA_RC_L2_UNSUPPORTED_CMD:
QETH_DBF_TEXT(SETUP, 2, "ipaunsup");
card->options.ipa4.supported_funcs |= IPA_SETADAPTERPARMS;
card->options.ipa6.supported_funcs |= IPA_SETADAPTERPARMS;
return -0;
default:
if (cmd->hdr.return_code) {
QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Unhandled "
"rc=%d\n",
dev_name(&card->gdev->dev),
cmd->hdr.return_code);
return 0;
}
}
if (cmd->hdr.prot_version == QETH_PROT_IPV4) {
card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported;
card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled;
} else if (cmd->hdr.prot_version == QETH_PROT_IPV6) {
card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported;
card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled;
} else
QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Flawed LIC detected"
"\n", dev_name(&card->gdev->dev));
return 0;
}
|
C
|
linux
| 0 |
CVE-2016-5219
|
https://www.cvedetails.com/cve/CVE-2016-5219/
|
CWE-416
|
https://github.com/chromium/chromium/commit/a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
a4150b688a754d3d10d2ca385155b1c95d77d6ae
|
Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
cheaper by minimizing the round-trip to the GPU thread.
Bug: 881152, 957001
Change-Id: Iadfa798af29225e752c710ca5c25f50b3dd3101a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586630
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657568}
|
error::Error GLES2DecoderImpl::DoCompressedTexImage(
GLenum target, GLint level, GLenum internal_format, GLsizei width,
GLsizei height, GLsizei depth, GLint border, GLsizei image_size,
const void* data, ContextState::Dimension dimension) {
const char* func_name;
if (dimension == ContextState::k2D) {
func_name = "glCompressedTexImage2D";
if (!validators_->texture_target.IsValid(target)) {
LOCAL_SET_GL_ERROR_INVALID_ENUM(func_name, target, "target");
return error::kNoError;
}
if (target == GL_TEXTURE_RECTANGLE_ARB) {
LOCAL_SET_GL_ERROR_INVALID_ENUM(func_name, target, "target");
return error::kNoError;
}
} else {
DCHECK_EQ(ContextState::k3D, dimension);
func_name = "glCompressedTexImage3D";
if (!validators_->texture_3_d_target.IsValid(target)) {
LOCAL_SET_GL_ERROR_INVALID_ENUM(func_name, target, "target");
return error::kNoError;
}
}
if (!validators_->compressed_texture_format.IsValid(internal_format)) {
LOCAL_SET_GL_ERROR_INVALID_ENUM(
func_name, internal_format, "internalformat");
return error::kNoError;
}
if (image_size < 0) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "imageSize < 0");
return error::kNoError;
}
if (!texture_manager()->ValidForTarget(target, level, width, height, depth) ||
border != 0) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "dimensions out of range");
return error::kNoError;
}
TextureRef* texture_ref = texture_manager()->GetTextureInfoForTarget(
&state_, target);
if (!texture_ref) {
LOCAL_SET_GL_ERROR(
GL_INVALID_VALUE, func_name, "no texture bound at target");
return error::kNoError;
}
Texture* texture = texture_ref->texture();
if (texture->IsImmutable()) {
LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, func_name, "texture is immutable");
return error::kNoError;
}
if (!ValidateCompressedTexDimensions(func_name, target, level,
width, height, depth, internal_format) ||
!ValidateCompressedTexFuncData(func_name, width, height, depth,
internal_format, image_size, data)) {
return error::kNoError;
}
if (texture->IsAttachedToFramebuffer()) {
framebuffer_state_.clear_state_dirty = true;
}
std::unique_ptr<int8_t[]> zero;
if (!state_.bound_pixel_unpack_buffer && !data) {
zero.reset(new int8_t[image_size]);
memset(zero.get(), 0, image_size);
data = zero.get();
}
LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER(func_name);
const CompressedFormatInfo* format_info =
GetCompressedFormatInfo(internal_format);
if (format_info != nullptr && !format_info->support_check(*feature_info_)) {
std::unique_ptr<uint8_t[]> decompressed_data = DecompressTextureData(
state_, *format_info, width, height, depth, image_size, data);
if (!decompressed_data) {
MarkContextLost(error::kGuilty);
group_->LoseContexts(error::kInnocent);
return error::kLostContext;
}
ScopedPixelUnpackState reset_restore(&state_);
if (dimension == ContextState::k2D) {
api()->glTexImage2DFn(
target, level, format_info->decompressed_internal_format, width,
height, border, format_info->decompressed_format,
format_info->decompressed_type, decompressed_data.get());
} else {
api()->glTexImage3DFn(
target, level, format_info->decompressed_internal_format, width,
height, depth, border, format_info->decompressed_format,
format_info->decompressed_type, decompressed_data.get());
}
} else {
if (dimension == ContextState::k2D) {
api()->glCompressedTexImage2DFn(target, level, internal_format, width,
height, border, image_size, data);
} else {
api()->glCompressedTexImage3DFn(target, level, internal_format, width,
height, depth, border, image_size, data);
}
}
GLenum error = LOCAL_PEEK_GL_ERROR(func_name);
if (error == GL_NO_ERROR) {
texture_manager()->SetLevelInfo(texture_ref, target, level, internal_format,
width, height, depth, border, 0, 0,
gfx::Rect(width, height));
}
ExitCommandProcessingEarly();
return error::kNoError;
}
|
error::Error GLES2DecoderImpl::DoCompressedTexImage(
GLenum target, GLint level, GLenum internal_format, GLsizei width,
GLsizei height, GLsizei depth, GLint border, GLsizei image_size,
const void* data, ContextState::Dimension dimension) {
const char* func_name;
if (dimension == ContextState::k2D) {
func_name = "glCompressedTexImage2D";
if (!validators_->texture_target.IsValid(target)) {
LOCAL_SET_GL_ERROR_INVALID_ENUM(func_name, target, "target");
return error::kNoError;
}
if (target == GL_TEXTURE_RECTANGLE_ARB) {
LOCAL_SET_GL_ERROR_INVALID_ENUM(func_name, target, "target");
return error::kNoError;
}
} else {
DCHECK_EQ(ContextState::k3D, dimension);
func_name = "glCompressedTexImage3D";
if (!validators_->texture_3_d_target.IsValid(target)) {
LOCAL_SET_GL_ERROR_INVALID_ENUM(func_name, target, "target");
return error::kNoError;
}
}
if (!validators_->compressed_texture_format.IsValid(internal_format)) {
LOCAL_SET_GL_ERROR_INVALID_ENUM(
func_name, internal_format, "internalformat");
return error::kNoError;
}
if (image_size < 0) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "imageSize < 0");
return error::kNoError;
}
if (!texture_manager()->ValidForTarget(target, level, width, height, depth) ||
border != 0) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "dimensions out of range");
return error::kNoError;
}
TextureRef* texture_ref = texture_manager()->GetTextureInfoForTarget(
&state_, target);
if (!texture_ref) {
LOCAL_SET_GL_ERROR(
GL_INVALID_VALUE, func_name, "no texture bound at target");
return error::kNoError;
}
Texture* texture = texture_ref->texture();
if (texture->IsImmutable()) {
LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, func_name, "texture is immutable");
return error::kNoError;
}
if (!ValidateCompressedTexDimensions(func_name, target, level,
width, height, depth, internal_format) ||
!ValidateCompressedTexFuncData(func_name, width, height, depth,
internal_format, image_size, data)) {
return error::kNoError;
}
if (texture->IsAttachedToFramebuffer()) {
framebuffer_state_.clear_state_dirty = true;
}
std::unique_ptr<int8_t[]> zero;
if (!state_.bound_pixel_unpack_buffer && !data) {
zero.reset(new int8_t[image_size]);
memset(zero.get(), 0, image_size);
data = zero.get();
}
LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER(func_name);
const CompressedFormatInfo* format_info =
GetCompressedFormatInfo(internal_format);
if (format_info != nullptr && !format_info->support_check(*feature_info_)) {
std::unique_ptr<uint8_t[]> decompressed_data = DecompressTextureData(
state_, *format_info, width, height, depth, image_size, data);
if (!decompressed_data) {
MarkContextLost(error::kGuilty);
group_->LoseContexts(error::kInnocent);
return error::kLostContext;
}
ScopedPixelUnpackState reset_restore(&state_);
if (dimension == ContextState::k2D) {
api()->glTexImage2DFn(
target, level, format_info->decompressed_internal_format, width,
height, border, format_info->decompressed_format,
format_info->decompressed_type, decompressed_data.get());
} else {
api()->glTexImage3DFn(
target, level, format_info->decompressed_internal_format, width,
height, depth, border, format_info->decompressed_format,
format_info->decompressed_type, decompressed_data.get());
}
} else {
if (dimension == ContextState::k2D) {
api()->glCompressedTexImage2DFn(target, level, internal_format, width,
height, border, image_size, data);
} else {
api()->glCompressedTexImage3DFn(target, level, internal_format, width,
height, depth, border, image_size, data);
}
}
GLenum error = LOCAL_PEEK_GL_ERROR(func_name);
if (error == GL_NO_ERROR) {
texture_manager()->SetLevelInfo(texture_ref, target, level, internal_format,
width, height, depth, border, 0, 0,
gfx::Rect(width, height));
}
ExitCommandProcessingEarly();
return error::kNoError;
}
|
C
|
Chrome
| 0 |
CVE-2016-2315
|
https://www.cvedetails.com/cve/CVE-2016-2315/
|
CWE-119
|
https://github.com/git/git/commit/34fa79a6cde56d6d428ab0d3160cb094ebad3305
|
34fa79a6cde56d6d428ab0d3160cb094ebad3305
|
prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to strcpy, which make auditing
the code base harder.
Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
|
static void release_tree_content(struct tree_content *t)
{
struct avail_tree_content *f = (struct avail_tree_content*)t;
unsigned int hc = hc_entries(f->entry_capacity);
f->next_avail = avail_tree_table[hc];
avail_tree_table[hc] = f;
}
|
static void release_tree_content(struct tree_content *t)
{
struct avail_tree_content *f = (struct avail_tree_content*)t;
unsigned int hc = hc_entries(f->entry_capacity);
f->next_avail = avail_tree_table[hc];
avail_tree_table[hc] = f;
}
|
C
|
git
| 0 |
CVE-2018-8099
|
https://www.cvedetails.com/cve/CVE-2018-8099/
|
CWE-415
|
https://github.com/libgit2/libgit2/commit/58a6fe94cb851f71214dbefac3f9bffee437d6fe
|
58a6fe94cb851f71214dbefac3f9bffee437d6fe
|
index: convert `read_entry` to return entry size via an out-param
The function `read_entry` does not conform to our usual coding style of
returning stuff via the out parameter and to use the return value for
reporting errors. Due to most of our code conforming to that pattern, it
has become quite natural for us to actually return `-1` in case there is
any error, which has also slipped in with commit 5625d86b9 (index:
support index v4, 2016-05-17). As the function returns an `size_t` only,
though, the return value is wrapped around, causing the caller of
`read_tree` to continue with an invalid index entry. Ultimately, this
can lead to a double-free.
Improve code and fix the bug by converting the function to return the
index entry size via an out parameter and only using the return value to
indicate errors.
Reported-by: Krishna Ram Prakash R <[email protected]>
Reported-by: Vivek Parikh <[email protected]>
|
static void index_free(git_index *index)
{
/* index iterators increment the refcount of the index, so if we
* get here then there should be no outstanding iterators.
*/
assert(!git_atomic_get(&index->readers));
git_index_clear(index);
git_idxmap_free(index->entries_map);
git_vector_free(&index->entries);
git_vector_free(&index->names);
git_vector_free(&index->reuc);
git_vector_free(&index->deleted);
git__free(index->index_file_path);
git__memzero(index, sizeof(*index));
git__free(index);
}
|
static void index_free(git_index *index)
{
/* index iterators increment the refcount of the index, so if we
* get here then there should be no outstanding iterators.
*/
assert(!git_atomic_get(&index->readers));
git_index_clear(index);
git_idxmap_free(index->entries_map);
git_vector_free(&index->entries);
git_vector_free(&index->names);
git_vector_free(&index->reuc);
git_vector_free(&index->deleted);
git__free(index->index_file_path);
git__memzero(index, sizeof(*index));
git__free(index);
}
|
C
|
libgit2
| 0 |
CVE-2011-1019
|
https://www.cvedetails.com/cve/CVE-2011-1019/
|
CWE-264
|
https://github.com/torvalds/linux/commit/8909c9ad8ff03611c9c96c9a92656213e4bb495b
|
8909c9ad8ff03611c9c96c9a92656213e4bb495b
|
net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules
Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean
that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
limited to /lib/modules/**. However, CAP_NET_ADMIN capability shouldn't
allow anybody load any module not related to networking.
This patch restricts an ability of autoloading modules to netdev modules
with explicit aliases. This fixes CVE-2011-1019.
Arnd Bergmann suggested to leave untouched the old pre-v2.6.32 behavior
of loading netdev modules by name (without any prefix) for processes
with CAP_SYS_MODULE to maintain the compatibility with network scripts
that use autoloading netdev modules by aliases like "eth0", "wlan0".
Currently there are only three users of the feature in the upstream
kernel: ipip, ip_gre and sit.
root@albatros:~# capsh --drop=$(seq -s, 0 11),$(seq -s, 13 34) --
root@albatros:~# grep Cap /proc/$$/status
CapInh: 0000000000000000
CapPrm: fffffff800001000
CapEff: fffffff800001000
CapBnd: fffffff800001000
root@albatros:~# modprobe xfs
FATAL: Error inserting xfs
(/lib/modules/2.6.38-rc6-00001-g2bf4ca3/kernel/fs/xfs/xfs.ko): Operation not permitted
root@albatros:~# lsmod | grep xfs
root@albatros:~# ifconfig xfs
xfs: error fetching interface information: Device not found
root@albatros:~# lsmod | grep xfs
root@albatros:~# lsmod | grep sit
root@albatros:~# ifconfig sit
sit: error fetching interface information: Device not found
root@albatros:~# lsmod | grep sit
root@albatros:~# ifconfig sit0
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
root@albatros:~# lsmod | grep sit
sit 10457 0
tunnel4 2957 1 sit
For CAP_SYS_MODULE module loading is still relaxed:
root@albatros:~# grep Cap /proc/$$/status
CapInh: 0000000000000000
CapPrm: ffffffffffffffff
CapEff: ffffffffffffffff
CapBnd: ffffffffffffffff
root@albatros:~# ifconfig xfs
xfs: error fetching interface information: Device not found
root@albatros:~# lsmod | grep xfs
xfs 745319 0
Reference: https://lkml.org/lkml/2011/2/24/203
Signed-off-by: Vasiliy Kulikov <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
Acked-by: David S. Miller <[email protected]>
Acked-by: Kees Cook <[email protected]>
Signed-off-by: James Morris <[email protected]>
|
static struct ip_tunnel * ipgre_tunnel_lookup(struct net_device *dev,
__be32 remote, __be32 local,
__be32 key, __be16 gre_proto)
{
struct net *net = dev_net(dev);
int link = dev->ifindex;
unsigned int h0 = HASH(remote);
unsigned int h1 = HASH(key);
struct ip_tunnel *t, *cand = NULL;
struct ipgre_net *ign = net_generic(net, ipgre_net_id);
int dev_type = (gre_proto == htons(ETH_P_TEB)) ?
ARPHRD_ETHER : ARPHRD_IPGRE;
int score, cand_score = 4;
for_each_ip_tunnel_rcu(ign->tunnels_r_l[h0 ^ h1]) {
if (local != t->parms.iph.saddr ||
remote != t->parms.iph.daddr ||
key != t->parms.i_key ||
!(t->dev->flags & IFF_UP))
continue;
if (t->dev->type != ARPHRD_IPGRE &&
t->dev->type != dev_type)
continue;
score = 0;
if (t->parms.link != link)
score |= 1;
if (t->dev->type != dev_type)
score |= 2;
if (score == 0)
return t;
if (score < cand_score) {
cand = t;
cand_score = score;
}
}
for_each_ip_tunnel_rcu(ign->tunnels_r[h0 ^ h1]) {
if (remote != t->parms.iph.daddr ||
key != t->parms.i_key ||
!(t->dev->flags & IFF_UP))
continue;
if (t->dev->type != ARPHRD_IPGRE &&
t->dev->type != dev_type)
continue;
score = 0;
if (t->parms.link != link)
score |= 1;
if (t->dev->type != dev_type)
score |= 2;
if (score == 0)
return t;
if (score < cand_score) {
cand = t;
cand_score = score;
}
}
for_each_ip_tunnel_rcu(ign->tunnels_l[h1]) {
if ((local != t->parms.iph.saddr &&
(local != t->parms.iph.daddr ||
!ipv4_is_multicast(local))) ||
key != t->parms.i_key ||
!(t->dev->flags & IFF_UP))
continue;
if (t->dev->type != ARPHRD_IPGRE &&
t->dev->type != dev_type)
continue;
score = 0;
if (t->parms.link != link)
score |= 1;
if (t->dev->type != dev_type)
score |= 2;
if (score == 0)
return t;
if (score < cand_score) {
cand = t;
cand_score = score;
}
}
for_each_ip_tunnel_rcu(ign->tunnels_wc[h1]) {
if (t->parms.i_key != key ||
!(t->dev->flags & IFF_UP))
continue;
if (t->dev->type != ARPHRD_IPGRE &&
t->dev->type != dev_type)
continue;
score = 0;
if (t->parms.link != link)
score |= 1;
if (t->dev->type != dev_type)
score |= 2;
if (score == 0)
return t;
if (score < cand_score) {
cand = t;
cand_score = score;
}
}
if (cand != NULL)
return cand;
dev = ign->fb_tunnel_dev;
if (dev->flags & IFF_UP)
return netdev_priv(dev);
return NULL;
}
|
static struct ip_tunnel * ipgre_tunnel_lookup(struct net_device *dev,
__be32 remote, __be32 local,
__be32 key, __be16 gre_proto)
{
struct net *net = dev_net(dev);
int link = dev->ifindex;
unsigned int h0 = HASH(remote);
unsigned int h1 = HASH(key);
struct ip_tunnel *t, *cand = NULL;
struct ipgre_net *ign = net_generic(net, ipgre_net_id);
int dev_type = (gre_proto == htons(ETH_P_TEB)) ?
ARPHRD_ETHER : ARPHRD_IPGRE;
int score, cand_score = 4;
for_each_ip_tunnel_rcu(ign->tunnels_r_l[h0 ^ h1]) {
if (local != t->parms.iph.saddr ||
remote != t->parms.iph.daddr ||
key != t->parms.i_key ||
!(t->dev->flags & IFF_UP))
continue;
if (t->dev->type != ARPHRD_IPGRE &&
t->dev->type != dev_type)
continue;
score = 0;
if (t->parms.link != link)
score |= 1;
if (t->dev->type != dev_type)
score |= 2;
if (score == 0)
return t;
if (score < cand_score) {
cand = t;
cand_score = score;
}
}
for_each_ip_tunnel_rcu(ign->tunnels_r[h0 ^ h1]) {
if (remote != t->parms.iph.daddr ||
key != t->parms.i_key ||
!(t->dev->flags & IFF_UP))
continue;
if (t->dev->type != ARPHRD_IPGRE &&
t->dev->type != dev_type)
continue;
score = 0;
if (t->parms.link != link)
score |= 1;
if (t->dev->type != dev_type)
score |= 2;
if (score == 0)
return t;
if (score < cand_score) {
cand = t;
cand_score = score;
}
}
for_each_ip_tunnel_rcu(ign->tunnels_l[h1]) {
if ((local != t->parms.iph.saddr &&
(local != t->parms.iph.daddr ||
!ipv4_is_multicast(local))) ||
key != t->parms.i_key ||
!(t->dev->flags & IFF_UP))
continue;
if (t->dev->type != ARPHRD_IPGRE &&
t->dev->type != dev_type)
continue;
score = 0;
if (t->parms.link != link)
score |= 1;
if (t->dev->type != dev_type)
score |= 2;
if (score == 0)
return t;
if (score < cand_score) {
cand = t;
cand_score = score;
}
}
for_each_ip_tunnel_rcu(ign->tunnels_wc[h1]) {
if (t->parms.i_key != key ||
!(t->dev->flags & IFF_UP))
continue;
if (t->dev->type != ARPHRD_IPGRE &&
t->dev->type != dev_type)
continue;
score = 0;
if (t->parms.link != link)
score |= 1;
if (t->dev->type != dev_type)
score |= 2;
if (score == 0)
return t;
if (score < cand_score) {
cand = t;
cand_score = score;
}
}
if (cand != NULL)
return cand;
dev = ign->fb_tunnel_dev;
if (dev->flags & IFF_UP)
return netdev_priv(dev);
return NULL;
}
|
C
|
linux
| 0 |
CVE-2019-5796
|
https://www.cvedetails.com/cve/CVE-2019-5796/
|
CWE-362
|
https://github.com/chromium/chromium/commit/5bb223676defeba9c44a5ce42460c86e24561e73
|
5bb223676defeba9c44a5ce42460c86e24561e73
|
[GuestView] - Introduce MimeHandlerViewAttachHelper
This CL is for the most part a mechanical change which extracts almost
all the frame-based MimeHandlerView code out of
ExtensionsGuestViewMessageFilter. This change both removes the current
clutter form EGVMF as well as fixesa race introduced when the
frame-based logic was added to EGVMF. The reason for the race was that
EGVMF is destroyed on IO thread but all the access to it (for
frame-based MHV) are from UI.
[email protected],[email protected]
Bug: 659750, 896679, 911161, 918861
Change-Id: I6474b870e4d56daa68be03637bb633665d9f9dda
Reviewed-on: https://chromium-review.googlesource.com/c/1401451
Commit-Queue: Ehsan Karamad <[email protected]>
Reviewed-by: James MacLean <[email protected]>
Reviewed-by: Ehsan Karamad <[email protected]>
Cr-Commit-Position: refs/heads/master@{#621155}
|
void ChromeContentBrowserClient::AdjustUtilityServiceProcessCommandLine(
const service_manager::Identity& identity,
base::CommandLine* command_line) {
#if defined(OS_CHROMEOS)
bool copy_switches = false;
if (identity.name() == ash::mojom::kServiceName) {
copy_switches = true;
command_line->AppendSwitch(switches::kMessageLoopTypeUi);
}
if (ash_service_registry::IsAshRelatedServiceName(identity.name())) {
copy_switches = true;
command_line->AppendSwitchASCII(switches::kMashServiceName,
identity.name());
}
if (identity.name() == viz::mojom::kVizServiceName)
content::GpuDataManager::GetInstance()->AppendGpuCommandLine(command_line);
if (copy_switches) {
for (const auto& sw : base::CommandLine::ForCurrentProcess()->GetSwitches())
command_line->AppendSwitchNative(sw.first, sw.second);
}
#endif
#if defined(OS_MACOSX)
if (identity.name() == video_capture::mojom::kServiceName ||
identity.name() == audio::mojom::kServiceName)
command_line->AppendSwitch(switches::kMessageLoopTypeUi);
#endif
}
|
void ChromeContentBrowserClient::AdjustUtilityServiceProcessCommandLine(
const service_manager::Identity& identity,
base::CommandLine* command_line) {
#if defined(OS_CHROMEOS)
bool copy_switches = false;
if (identity.name() == ash::mojom::kServiceName) {
copy_switches = true;
command_line->AppendSwitch(switches::kMessageLoopTypeUi);
}
if (ash_service_registry::IsAshRelatedServiceName(identity.name())) {
copy_switches = true;
command_line->AppendSwitchASCII(switches::kMashServiceName,
identity.name());
}
if (identity.name() == viz::mojom::kVizServiceName)
content::GpuDataManager::GetInstance()->AppendGpuCommandLine(command_line);
if (copy_switches) {
for (const auto& sw : base::CommandLine::ForCurrentProcess()->GetSwitches())
command_line->AppendSwitchNative(sw.first, sw.second);
}
#endif
#if defined(OS_MACOSX)
if (identity.name() == video_capture::mojom::kServiceName ||
identity.name() == audio::mojom::kServiceName)
command_line->AppendSwitch(switches::kMessageLoopTypeUi);
#endif
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/d30a8bd191f17b61938fc87890bffc80049b0774
|
d30a8bd191f17b61938fc87890bffc80049b0774
|
[Extensions] Rework inline installation observation
Instead of observing through the WebstoreAPI, observe directly in the TabHelper.
This is a great deal less code, more direct, and also fixes a lifetime issue
with the TabHelper being deleted before the inline installation completes.
BUG=613949
Review-Url: https://codereview.chromium.org/2103663002
Cr-Commit-Position: refs/heads/master@{#403188}
|
void WebstoreAPI::OnDownloadProgress(const std::string& extension_id,
int percent_downloaded) {
for (ObservedInstallInfoList::const_iterator iter =
download_progress_listeners_.begin();
iter != download_progress_listeners_.end();
++iter) {
if (iter->extension_id == extension_id) {
iter->ipc_sender->Send(new ExtensionMsg_InlineInstallDownloadProgress(
iter->routing_id, percent_downloaded));
}
}
}
|
void WebstoreAPI::OnDownloadProgress(const std::string& extension_id,
int percent_downloaded) {
for (ObservedInstallInfoList::const_iterator iter =
download_progress_listeners_.begin();
iter != download_progress_listeners_.end();
++iter) {
if (iter->extension_id == extension_id) {
iter->ipc_sender->Send(new ExtensionMsg_InlineInstallDownloadProgress(
iter->routing_id, percent_downloaded));
}
}
}
|
C
|
Chrome
| 0 |
CVE-2015-1300
|
https://www.cvedetails.com/cve/CVE-2015-1300/
|
CWE-254
|
https://github.com/chromium/chromium/commit/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab
|
9c391ac04f9ac478c8b0e43b359c2b43a6c892ab
|
Use pdf compositor service for printing when OOPIF is enabled
When OOPIF is enabled (by site-per-process flag or
top-document-isolation feature), use the pdf compositor service for
converting PaintRecord to PDF on renderers.
In the future, this will make compositing PDF from multiple renderers
possible.
[email protected]
BUG=455764
Change-Id: I3c28f03f4358e4228239fe1a33384f85e7716e8f
Reviewed-on: https://chromium-review.googlesource.com/699765
Commit-Queue: Wei Li <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#511616}
|
explicit Delegate(HeadlessWebContentsImpl* headless_web_contents)
: headless_web_contents_(headless_web_contents) {}
|
explicit Delegate(HeadlessWebContentsImpl* headless_web_contents)
: headless_web_contents_(headless_web_contents) {}
|
C
|
Chrome
| 0 |
CVE-2013-4544
|
https://www.cvedetails.com/cve/CVE-2013-4544/
|
CWE-20
|
https://git.qemu.org/?p=qemu.git;a=commit;h=3c99afc779c2c78718a565ad8c5e98de7c2c7484
|
3c99afc779c2c78718a565ad8c5e98de7c2c7484
| null |
static void vmxnet3_set_events(VMXNET3State *s, uint32_t val)
{
uint32_t events;
VMW_CBPRN("Setting events: 0x%x", val);
events = VMXNET3_READ_DRV_SHARED32(s->drv_shmem, ecr) | val;
VMXNET3_WRITE_DRV_SHARED32(s->drv_shmem, ecr, events);
}
|
static void vmxnet3_set_events(VMXNET3State *s, uint32_t val)
{
uint32_t events;
VMW_CBPRN("Setting events: 0x%x", val);
events = VMXNET3_READ_DRV_SHARED32(s->drv_shmem, ecr) | val;
VMXNET3_WRITE_DRV_SHARED32(s->drv_shmem, ecr, events);
}
|
C
|
qemu
| 0 |
CVE-2014-3173
|
https://www.cvedetails.com/cve/CVE-2014-3173/
|
CWE-119
|
https://github.com/chromium/chromium/commit/ee7579229ff7e9e5ae28bf53aea069251499d7da
|
ee7579229ff7e9e5ae28bf53aea069251499d7da
|
Framebuffer clear() needs to consider the situation some draw buffers are disabled.
This is when we expose DrawBuffers extension.
BUG=376951
TEST=the attached test case, webgl conformance
[email protected],[email protected]
Review URL: https://codereview.chromium.org/315283002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275338 0039d316-1c4b-4281-b951-d872f2087c98
|
bool GLES2DecoderImpl::InitializeShaderTranslator() {
TRACE_EVENT0("gpu", "GLES2DecoderImpl::InitializeShaderTranslator");
if (!use_shader_translator_) {
return true;
}
ShBuiltInResources resources;
ShInitBuiltInResources(&resources);
resources.MaxVertexAttribs = group_->max_vertex_attribs();
resources.MaxVertexUniformVectors =
group_->max_vertex_uniform_vectors();
resources.MaxVaryingVectors = group_->max_varying_vectors();
resources.MaxVertexTextureImageUnits =
group_->max_vertex_texture_image_units();
resources.MaxCombinedTextureImageUnits = group_->max_texture_units();
resources.MaxTextureImageUnits = group_->max_texture_image_units();
resources.MaxFragmentUniformVectors =
group_->max_fragment_uniform_vectors();
resources.MaxDrawBuffers = group_->max_draw_buffers();
resources.MaxExpressionComplexity = 256;
resources.MaxCallStackDepth = 256;
#if (ANGLE_SH_VERSION >= 110)
GLint range[2] = { 0, 0 };
GLint precision = 0;
GetShaderPrecisionFormatImpl(GL_FRAGMENT_SHADER, GL_HIGH_FLOAT,
range, &precision);
resources.FragmentPrecisionHigh =
PrecisionMeetsSpecForHighpFloat(range[0], range[1], precision);
#endif
if (force_webgl_glsl_validation_) {
resources.OES_standard_derivatives = derivatives_explicitly_enabled_;
resources.EXT_frag_depth = frag_depth_explicitly_enabled_;
resources.EXT_draw_buffers = draw_buffers_explicitly_enabled_;
if (!draw_buffers_explicitly_enabled_)
resources.MaxDrawBuffers = 1;
#if (ANGLE_SH_VERSION >= 123)
resources.EXT_shader_texture_lod = shader_texture_lod_explicitly_enabled_;
#endif
} else {
resources.OES_standard_derivatives =
features().oes_standard_derivatives ? 1 : 0;
resources.ARB_texture_rectangle =
features().arb_texture_rectangle ? 1 : 0;
resources.OES_EGL_image_external =
features().oes_egl_image_external ? 1 : 0;
resources.EXT_draw_buffers =
features().ext_draw_buffers ? 1 : 0;
resources.EXT_frag_depth =
features().ext_frag_depth ? 1 : 0;
#if (ANGLE_SH_VERSION >= 123)
resources.EXT_shader_texture_lod =
features().ext_shader_texture_lod ? 1 : 0;
#endif
}
ShShaderSpec shader_spec = force_webgl_glsl_validation_ ? SH_WEBGL_SPEC
: SH_GLES2_SPEC;
if (shader_spec == SH_WEBGL_SPEC && features().enable_shader_name_hashing)
#if !defined(ANGLE_SH_VERSION) || ANGLE_SH_VERSION < 108
resources.HashFunction = &CityHashForAngle;
#else
resources.HashFunction = &CityHash64;
#endif
else
resources.HashFunction = NULL;
ShaderTranslatorInterface::GlslImplementationType implementation_type =
gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2 ?
ShaderTranslatorInterface::kGlslES : ShaderTranslatorInterface::kGlsl;
int driver_bug_workarounds = 0;
if (workarounds().needs_glsl_built_in_function_emulation)
driver_bug_workarounds |= SH_EMULATE_BUILT_IN_FUNCTIONS;
if (workarounds().init_gl_position_in_vertex_shader)
driver_bug_workarounds |= SH_INIT_GL_POSITION;
if (workarounds().unfold_short_circuit_as_ternary_operation)
driver_bug_workarounds |= SH_UNFOLD_SHORT_CIRCUIT;
if (workarounds().init_varyings_without_static_use)
driver_bug_workarounds |= SH_INIT_VARYINGS_WITHOUT_STATIC_USE;
if (workarounds().unroll_for_loop_with_sampler_array_index)
driver_bug_workarounds |= SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX;
vertex_translator_ = shader_translator_cache()->GetTranslator(
SH_VERTEX_SHADER,
shader_spec,
&resources,
implementation_type,
static_cast<ShCompileOptions>(driver_bug_workarounds));
if (!vertex_translator_.get()) {
LOG(ERROR) << "Could not initialize vertex shader translator.";
Destroy(true);
return false;
}
fragment_translator_ = shader_translator_cache()->GetTranslator(
SH_FRAGMENT_SHADER,
shader_spec,
&resources,
implementation_type,
static_cast<ShCompileOptions>(driver_bug_workarounds));
if (!fragment_translator_.get()) {
LOG(ERROR) << "Could not initialize fragment shader translator.";
Destroy(true);
return false;
}
return true;
}
|
bool GLES2DecoderImpl::InitializeShaderTranslator() {
TRACE_EVENT0("gpu", "GLES2DecoderImpl::InitializeShaderTranslator");
if (!use_shader_translator_) {
return true;
}
ShBuiltInResources resources;
ShInitBuiltInResources(&resources);
resources.MaxVertexAttribs = group_->max_vertex_attribs();
resources.MaxVertexUniformVectors =
group_->max_vertex_uniform_vectors();
resources.MaxVaryingVectors = group_->max_varying_vectors();
resources.MaxVertexTextureImageUnits =
group_->max_vertex_texture_image_units();
resources.MaxCombinedTextureImageUnits = group_->max_texture_units();
resources.MaxTextureImageUnits = group_->max_texture_image_units();
resources.MaxFragmentUniformVectors =
group_->max_fragment_uniform_vectors();
resources.MaxDrawBuffers = group_->max_draw_buffers();
resources.MaxExpressionComplexity = 256;
resources.MaxCallStackDepth = 256;
#if (ANGLE_SH_VERSION >= 110)
GLint range[2] = { 0, 0 };
GLint precision = 0;
GetShaderPrecisionFormatImpl(GL_FRAGMENT_SHADER, GL_HIGH_FLOAT,
range, &precision);
resources.FragmentPrecisionHigh =
PrecisionMeetsSpecForHighpFloat(range[0], range[1], precision);
#endif
if (force_webgl_glsl_validation_) {
resources.OES_standard_derivatives = derivatives_explicitly_enabled_;
resources.EXT_frag_depth = frag_depth_explicitly_enabled_;
resources.EXT_draw_buffers = draw_buffers_explicitly_enabled_;
if (!draw_buffers_explicitly_enabled_)
resources.MaxDrawBuffers = 1;
#if (ANGLE_SH_VERSION >= 123)
resources.EXT_shader_texture_lod = shader_texture_lod_explicitly_enabled_;
#endif
} else {
resources.OES_standard_derivatives =
features().oes_standard_derivatives ? 1 : 0;
resources.ARB_texture_rectangle =
features().arb_texture_rectangle ? 1 : 0;
resources.OES_EGL_image_external =
features().oes_egl_image_external ? 1 : 0;
resources.EXT_draw_buffers =
features().ext_draw_buffers ? 1 : 0;
resources.EXT_frag_depth =
features().ext_frag_depth ? 1 : 0;
#if (ANGLE_SH_VERSION >= 123)
resources.EXT_shader_texture_lod =
features().ext_shader_texture_lod ? 1 : 0;
#endif
}
ShShaderSpec shader_spec = force_webgl_glsl_validation_ ? SH_WEBGL_SPEC
: SH_GLES2_SPEC;
if (shader_spec == SH_WEBGL_SPEC && features().enable_shader_name_hashing)
#if !defined(ANGLE_SH_VERSION) || ANGLE_SH_VERSION < 108
resources.HashFunction = &CityHashForAngle;
#else
resources.HashFunction = &CityHash64;
#endif
else
resources.HashFunction = NULL;
ShaderTranslatorInterface::GlslImplementationType implementation_type =
gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2 ?
ShaderTranslatorInterface::kGlslES : ShaderTranslatorInterface::kGlsl;
int driver_bug_workarounds = 0;
if (workarounds().needs_glsl_built_in_function_emulation)
driver_bug_workarounds |= SH_EMULATE_BUILT_IN_FUNCTIONS;
if (workarounds().init_gl_position_in_vertex_shader)
driver_bug_workarounds |= SH_INIT_GL_POSITION;
if (workarounds().unfold_short_circuit_as_ternary_operation)
driver_bug_workarounds |= SH_UNFOLD_SHORT_CIRCUIT;
if (workarounds().init_varyings_without_static_use)
driver_bug_workarounds |= SH_INIT_VARYINGS_WITHOUT_STATIC_USE;
if (workarounds().unroll_for_loop_with_sampler_array_index)
driver_bug_workarounds |= SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX;
vertex_translator_ = shader_translator_cache()->GetTranslator(
SH_VERTEX_SHADER,
shader_spec,
&resources,
implementation_type,
static_cast<ShCompileOptions>(driver_bug_workarounds));
if (!vertex_translator_.get()) {
LOG(ERROR) << "Could not initialize vertex shader translator.";
Destroy(true);
return false;
}
fragment_translator_ = shader_translator_cache()->GetTranslator(
SH_FRAGMENT_SHADER,
shader_spec,
&resources,
implementation_type,
static_cast<ShCompileOptions>(driver_bug_workarounds));
if (!fragment_translator_.get()) {
LOG(ERROR) << "Could not initialize fragment shader translator.";
Destroy(true);
return false;
}
return true;
}
|
C
|
Chrome
| 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 int php_sockop_close(php_stream *stream, int close_handle)
{
php_netstream_data_t *sock = (php_netstream_data_t*)stream->abstract;
#ifdef PHP_WIN32
int n;
#endif
if (!sock) {
return 0;
}
if (close_handle) {
#ifdef PHP_WIN32
if (sock->socket == -1)
sock->socket = SOCK_ERR;
#endif
if (sock->socket != SOCK_ERR) {
#ifdef PHP_WIN32
/* prevent more data from coming in */
shutdown(sock->socket, SHUT_RD);
/* try to make sure that the OS sends all data before we close the connection.
* Essentially, we are waiting for the socket to become writeable, which means
* that all pending data has been sent.
* We use a small timeout which should encourage the OS to send the data,
* but at the same time avoid hanging indefinitely.
* */
do {
n = php_pollfd_for_ms(sock->socket, POLLOUT, 500);
} while (n == -1 && php_socket_errno() == EINTR);
#endif
closesocket(sock->socket);
sock->socket = SOCK_ERR;
}
}
pefree(sock, php_stream_is_persistent(stream));
return 0;
}
|
static int php_sockop_close(php_stream *stream, int close_handle)
{
php_netstream_data_t *sock = (php_netstream_data_t*)stream->abstract;
#ifdef PHP_WIN32
int n;
#endif
if (!sock) {
return 0;
}
if (close_handle) {
#ifdef PHP_WIN32
if (sock->socket == -1)
sock->socket = SOCK_ERR;
#endif
if (sock->socket != SOCK_ERR) {
#ifdef PHP_WIN32
/* prevent more data from coming in */
shutdown(sock->socket, SHUT_RD);
/* try to make sure that the OS sends all data before we close the connection.
* Essentially, we are waiting for the socket to become writeable, which means
* that all pending data has been sent.
* We use a small timeout which should encourage the OS to send the data,
* but at the same time avoid hanging indefinitely.
* */
do {
n = php_pollfd_for_ms(sock->socket, POLLOUT, 500);
} while (n == -1 && php_socket_errno() == EINTR);
#endif
closesocket(sock->socket);
sock->socket = SOCK_ERR;
}
}
pefree(sock, php_stream_is_persistent(stream));
return 0;
}
|
C
|
php-src
| 0 |
CVE-2011-3084
|
https://www.cvedetails.com/cve/CVE-2011-3084/
|
CWE-264
|
https://github.com/chromium/chromium/commit/744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
Allow browser to handle all WebUI navigations.
BUG=113496
TEST="Google Dashboard" link in Sync settings loads in new process.
Review URL: http://codereview.chromium.org/9663045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126949 0039d316-1c4b-4281-b951-d872f2087c98
|
void MockRenderThread::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) {
filter->OnFilterRemoved();
}
|
void MockRenderThread::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) {
filter->OnFilterRemoved();
}
|
C
|
Chrome
| 0 |
CVE-2013-4162
|
https://www.cvedetails.com/cve/CVE-2013-4162/
|
CWE-399
|
https://github.com/torvalds/linux/commit/8822b64a0fa64a5dd1dfcf837c5b0be83f8c05d1
|
8822b64a0fa64a5dd1dfcf837c5b0be83f8c05d1
|
ipv6: call udp_push_pending_frames when uncorking a socket with AF_INET pending data
We accidentally call down to ip6_push_pending_frames when uncorking
pending AF_INET data on a ipv6 socket. This results in the following
splat (from Dave Jones):
skbuff: skb_under_panic: text:ffffffff816765f6 len:48 put:40 head:ffff88013deb6df0 data:ffff88013deb6dec tail:0x2c end:0xc0 dev:<NULL>
------------[ cut here ]------------
kernel BUG at net/core/skbuff.c:126!
invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
Modules linked in: dccp_ipv4 dccp 8021q garp bridge stp dlci mpoa snd_seq_dummy sctp fuse hidp tun bnep nfnetlink scsi_transport_iscsi rfcomm can_raw can_bcm af_802154 appletalk caif_socket can caif ipt_ULOG x25 rose af_key pppoe pppox ipx phonet irda llc2 ppp_generic slhc p8023 psnap p8022 llc crc_ccitt atm bluetooth
+netrom ax25 nfc rfkill rds af_rxrpc coretemp hwmon kvm_intel kvm crc32c_intel snd_hda_codec_realtek ghash_clmulni_intel microcode pcspkr snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep usb_debug snd_seq snd_seq_device snd_pcm e1000e snd_page_alloc snd_timer ptp snd pps_core soundcore xfs libcrc32c
CPU: 2 PID: 8095 Comm: trinity-child2 Not tainted 3.10.0-rc7+ #37
task: ffff8801f52c2520 ti: ffff8801e6430000 task.ti: ffff8801e6430000
RIP: 0010:[<ffffffff816e759c>] [<ffffffff816e759c>] skb_panic+0x63/0x65
RSP: 0018:ffff8801e6431de8 EFLAGS: 00010282
RAX: 0000000000000086 RBX: ffff8802353d3cc0 RCX: 0000000000000006
RDX: 0000000000003b90 RSI: ffff8801f52c2ca0 RDI: ffff8801f52c2520
RBP: ffff8801e6431e08 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffff88022ea0c800
R13: ffff88022ea0cdf8 R14: ffff8802353ecb40 R15: ffffffff81cc7800
FS: 00007f5720a10740(0000) GS:ffff880244c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000005862000 CR3: 000000022843c000 CR4: 00000000001407e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Stack:
ffff88013deb6dec 000000000000002c 00000000000000c0 ffffffff81a3f6e4
ffff8801e6431e18 ffffffff8159a9aa ffff8801e6431e90 ffffffff816765f6
ffffffff810b756b 0000000700000002 ffff8801e6431e40 0000fea9292aa8c0
Call Trace:
[<ffffffff8159a9aa>] skb_push+0x3a/0x40
[<ffffffff816765f6>] ip6_push_pending_frames+0x1f6/0x4d0
[<ffffffff810b756b>] ? mark_held_locks+0xbb/0x140
[<ffffffff81694919>] udp_v6_push_pending_frames+0x2b9/0x3d0
[<ffffffff81694660>] ? udplite_getfrag+0x20/0x20
[<ffffffff8162092a>] udp_lib_setsockopt+0x1aa/0x1f0
[<ffffffff811cc5e7>] ? fget_light+0x387/0x4f0
[<ffffffff816958a4>] udpv6_setsockopt+0x34/0x40
[<ffffffff815949f4>] sock_common_setsockopt+0x14/0x20
[<ffffffff81593c31>] SyS_setsockopt+0x71/0xd0
[<ffffffff816f5d54>] tracesys+0xdd/0xe2
Code: 00 00 48 89 44 24 10 8b 87 d8 00 00 00 48 89 44 24 08 48 8b 87 e8 00 00 00 48 c7 c7 c0 04 aa 81 48 89 04 24 31 c0 e8 e1 7e ff ff <0f> 0b 55 48 89 e5 0f 0b 55 48 89 e5 0f 0b 55 48 89 e5 0f 0b 55
RIP [<ffffffff816e759c>] skb_panic+0x63/0x65
RSP <ffff8801e6431de8>
This patch adds a check if the pending data is of address family AF_INET
and directly calls udp_push_ending_frames from udp_v6_push_pending_frames
if that is the case.
This bug was found by Dave Jones with trinity.
(Also move the initialization of fl6 below the AF_INET check, even if
not strictly necessary.)
Cc: Dave Jones <[email protected]>
Cc: YOSHIFUJI Hideaki <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int __udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{
int rc;
if (!ipv6_addr_any(&inet6_sk(sk)->daddr))
sock_rps_save_rxhash(sk, skb);
rc = sock_queue_rcv_skb(sk, skb);
if (rc < 0) {
int is_udplite = IS_UDPLITE(sk);
/* Note that an ENOMEM error is charged twice */
if (rc == -ENOMEM)
UDP6_INC_STATS_BH(sock_net(sk),
UDP_MIB_RCVBUFERRORS, is_udplite);
UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
kfree_skb(skb);
return -1;
}
return 0;
}
|
static int __udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{
int rc;
if (!ipv6_addr_any(&inet6_sk(sk)->daddr))
sock_rps_save_rxhash(sk, skb);
rc = sock_queue_rcv_skb(sk, skb);
if (rc < 0) {
int is_udplite = IS_UDPLITE(sk);
/* Note that an ENOMEM error is charged twice */
if (rc == -ENOMEM)
UDP6_INC_STATS_BH(sock_net(sk),
UDP_MIB_RCVBUFERRORS, is_udplite);
UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
kfree_skb(skb);
return -1;
}
return 0;
}
|
C
|
linux
| 0 |
CVE-2013-2861
|
https://www.cvedetails.com/cve/CVE-2013-2861/
|
CWE-399
|
https://github.com/chromium/chromium/commit/508b89a64ab700aa09f21fc666a5588b47360eab
|
508b89a64ab700aa09f21fc666a5588b47360eab
|
Upgrade old app host to new app launcher on startup
This patch is a continuation of https://codereview.chromium.org/16805002/.
BUG=248825
Review URL: https://chromiumcodereview.appspot.com/17022015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209604 0039d316-1c4b-4281-b951-d872f2087c98
|
bool IsProductInstalled(InstallationLevel level, const wchar_t* app_guid) {
HKEY root_key = (level == USER_LEVEL_INSTALLATION) ?
HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
string16 subkey(kGoogleRegClientsKey);
subkey.append(1, L'\\').append(app_guid);
base::win::RegKey reg_key;
return reg_key.Open(root_key, subkey.c_str(),
KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS &&
reg_key.HasValue(kRegVersionField);
}
|
bool IsProductInstalled(InstallationLevel level, const wchar_t* app_guid) {
HKEY root_key = (level == USER_LEVEL_INSTALLATION) ?
HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
string16 subkey(kGoogleRegClientsKey);
subkey.append(1, L'\\').append(app_guid);
base::win::RegKey reg_key;
return reg_key.Open(root_key, subkey.c_str(),
KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS &&
reg_key.HasValue(kRegVersionField);
}
|
C
|
Chrome
| 0 |
Subsets and Splits
CWE-119 Function Changes
This query retrieves specific examples (before and after code changes) of vulnerabilities with CWE-119, providing basic filtering but limited insight.
Vulnerable Code with CWE IDs
The query filters and combines records from multiple datasets to list specific vulnerability details, providing a basic overview of vulnerable functions but lacking deeper insights.
Vulnerable Functions in BigVul
Retrieves details of vulnerable functions from both validation and test datasets where vulnerabilities are present, providing a basic set of data points for further analysis.
Vulnerable Code Functions
This query filters and shows raw data for vulnerable functions, which provides basic insight into specific vulnerabilities but lacks broader analytical value.
Top 100 Vulnerable Functions
Retrieves 100 samples of vulnerabilities from the training dataset, showing the CVE ID, CWE ID, and code changes before and after the vulnerability, which is a basic filtering of vulnerability data.