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-2018-12436
|
https://www.cvedetails.com/cve/CVE-2018-12436/
|
CWE-200
|
https://github.com/wolfSSL/wolfssl/commit/9b9568d500f31f964af26ba8d01e542e1f27e5ca
|
9b9568d500f31f964af26ba8d01e542e1f27e5ca
|
Change ECDSA signing to use blinding.
|
int wc_ecc_export_x963(ecc_key* key, byte* out, word32* outLen)
{
int ret = MP_OKAY;
word32 numlen;
#ifdef WOLFSSL_SMALL_STACK
byte* buf;
#else
byte buf[ECC_BUFSIZE];
#endif
word32 pubxlen, pubylen;
/* return length needed only */
if (key != NULL && out == NULL && outLen != NULL) {
numlen = key->dp->size;
*outLen = 1 + 2*numlen;
return LENGTH_ONLY_E;
}
if (key == NULL || out == NULL || outLen == NULL)
return ECC_BAD_ARG_E;
if (key->type == ECC_PRIVATEKEY_ONLY)
return ECC_PRIVATEONLY_E;
if (wc_ecc_is_valid_idx(key->idx) == 0) {
return ECC_BAD_ARG_E;
}
numlen = key->dp->size;
/* verify room in out buffer */
if (*outLen < (1 + 2*numlen)) {
*outLen = 1 + 2*numlen;
return BUFFER_E;
}
/* verify public key length is less than key size */
pubxlen = mp_unsigned_bin_size(key->pubkey.x);
pubylen = mp_unsigned_bin_size(key->pubkey.y);
if ((pubxlen > numlen) || (pubylen > numlen)) {
WOLFSSL_MSG("Public key x/y invalid!");
return BUFFER_E;
}
/* store byte point type */
out[0] = ECC_POINT_UNCOMP;
#ifdef WOLFSSL_SMALL_STACK
buf = (byte*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_ECC_BUFFER);
if (buf == NULL)
return MEMORY_E;
#endif
/* pad and store x */
XMEMSET(buf, 0, ECC_BUFSIZE);
ret = mp_to_unsigned_bin(key->pubkey.x, buf + (numlen - pubxlen));
if (ret != MP_OKAY)
goto done;
XMEMCPY(out+1, buf, numlen);
/* pad and store y */
XMEMSET(buf, 0, ECC_BUFSIZE);
ret = mp_to_unsigned_bin(key->pubkey.y, buf + (numlen - pubylen));
if (ret != MP_OKAY)
goto done;
XMEMCPY(out+1+numlen, buf, numlen);
*outLen = 1 + 2*numlen;
done:
#ifdef WOLFSSL_SMALL_STACK
XFREE(buf, NULL, DYNAMIC_TYPE_ECC_BUFFER);
#endif
return ret;
}
|
int wc_ecc_export_x963(ecc_key* key, byte* out, word32* outLen)
{
int ret = MP_OKAY;
word32 numlen;
#ifdef WOLFSSL_SMALL_STACK
byte* buf;
#else
byte buf[ECC_BUFSIZE];
#endif
word32 pubxlen, pubylen;
/* return length needed only */
if (key != NULL && out == NULL && outLen != NULL) {
numlen = key->dp->size;
*outLen = 1 + 2*numlen;
return LENGTH_ONLY_E;
}
if (key == NULL || out == NULL || outLen == NULL)
return ECC_BAD_ARG_E;
if (key->type == ECC_PRIVATEKEY_ONLY)
return ECC_PRIVATEONLY_E;
if (wc_ecc_is_valid_idx(key->idx) == 0) {
return ECC_BAD_ARG_E;
}
numlen = key->dp->size;
/* verify room in out buffer */
if (*outLen < (1 + 2*numlen)) {
*outLen = 1 + 2*numlen;
return BUFFER_E;
}
/* verify public key length is less than key size */
pubxlen = mp_unsigned_bin_size(key->pubkey.x);
pubylen = mp_unsigned_bin_size(key->pubkey.y);
if ((pubxlen > numlen) || (pubylen > numlen)) {
WOLFSSL_MSG("Public key x/y invalid!");
return BUFFER_E;
}
/* store byte point type */
out[0] = ECC_POINT_UNCOMP;
#ifdef WOLFSSL_SMALL_STACK
buf = (byte*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_ECC_BUFFER);
if (buf == NULL)
return MEMORY_E;
#endif
/* pad and store x */
XMEMSET(buf, 0, ECC_BUFSIZE);
ret = mp_to_unsigned_bin(key->pubkey.x, buf + (numlen - pubxlen));
if (ret != MP_OKAY)
goto done;
XMEMCPY(out+1, buf, numlen);
/* pad and store y */
XMEMSET(buf, 0, ECC_BUFSIZE);
ret = mp_to_unsigned_bin(key->pubkey.y, buf + (numlen - pubylen));
if (ret != MP_OKAY)
goto done;
XMEMCPY(out+1+numlen, buf, numlen);
*outLen = 1 + 2*numlen;
done:
#ifdef WOLFSSL_SMALL_STACK
XFREE(buf, NULL, DYNAMIC_TYPE_ECC_BUFFER);
#endif
return ret;
}
|
C
|
wolfssl
| 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 ChromeClientImpl::RequestDecode(LocalFrame* frame,
const PaintImage& image,
base::OnceCallback<void(bool)> callback) {
WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame);
web_frame->LocalRoot()->FrameWidget()->RequestDecode(image,
std::move(callback));
}
|
void ChromeClientImpl::RequestDecode(LocalFrame* frame,
const PaintImage& image,
base::OnceCallback<void(bool)> callback) {
WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame);
web_frame->LocalRoot()->FrameWidget()->RequestDecode(image,
std::move(callback));
}
|
C
|
Chrome
| 0 |
CVE-2019-6974
|
https://www.cvedetails.com/cve/CVE-2019-6974/
|
CWE-362
|
https://github.com/torvalds/linux/commit/cfa39381173d5f969daf43582c95ad679189cbc9
|
cfa39381173d5f969daf43582c95ad679189cbc9
|
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
kvm_ioctl_create_device() does the following:
1. creates a device that holds a reference to the VM object (with a borrowed
reference, the VM's refcount has not been bumped yet)
2. initializes the device
3. transfers the reference to the device to the caller's file descriptor table
4. calls kvm_get_kvm() to turn the borrowed reference to the VM into a real
reference
The ownership transfer in step 3 must not happen before the reference to the VM
becomes a proper, non-borrowed reference, which only happens in step 4.
After step 3, an attacker can close the file descriptor and drop the borrowed
reference, which can cause the refcount of the kvm object to drop to zero.
This means that we need to grab a reference for the device before
anon_inode_getfd(), otherwise the VM can disappear from under us.
Fixes: 852b6d57dc7f ("kvm: add device control API")
Cc: [email protected]
Signed-off-by: Jann Horn <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
static int kvm_vm_ioctl_enable_cap_generic(struct kvm *kvm,
struct kvm_enable_cap *cap)
{
switch (cap->cap) {
#ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT
case KVM_CAP_MANUAL_DIRTY_LOG_PROTECT:
if (cap->flags || (cap->args[0] & ~1))
return -EINVAL;
kvm->manual_dirty_log_protect = cap->args[0];
return 0;
#endif
default:
return kvm_vm_ioctl_enable_cap(kvm, cap);
}
}
|
static int kvm_vm_ioctl_enable_cap_generic(struct kvm *kvm,
struct kvm_enable_cap *cap)
{
switch (cap->cap) {
#ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT
case KVM_CAP_MANUAL_DIRTY_LOG_PROTECT:
if (cap->flags || (cap->args[0] & ~1))
return -EINVAL;
kvm->manual_dirty_log_protect = cap->args[0];
return 0;
#endif
default:
return kvm_vm_ioctl_enable_cap(kvm, cap);
}
}
|
C
|
linux
| 0 |
CVE-2016-1697
|
https://www.cvedetails.com/cve/CVE-2016-1697/
|
CWE-284
|
https://github.com/chromium/chromium/commit/1948aefa8901dca0ccb993753fca00b15d2a6e25
|
1948aefa8901dca0ccb993753fca00b15d2a6e25
|
Disable frame navigations during DocumentLoader detach in FrameLoader::startLoad
BUG=613266
Review-Url: https://codereview.chromium.org/2006033002
Cr-Commit-Position: refs/heads/master@{#396241}
|
bool FrameLoader::shouldContinueForNavigationPolicy(const ResourceRequest& request, const SubstituteData& substituteData,
DocumentLoader* loader, ContentSecurityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy,
NavigationType type, NavigationPolicy policy, bool replacesCurrentHistoryItem, bool isClientRedirect)
{
if (request.url().isEmpty() || substituteData.isValid())
return true;
if (shouldCheckMainWorldContentSecurityPolicy == CheckContentSecurityPolicy) {
Frame* parentFrame = m_frame->tree().parent();
if (parentFrame) {
ContentSecurityPolicy* parentPolicy = parentFrame->securityContext()->contentSecurityPolicy();
ContentSecurityPolicy::RedirectStatus redirectStatus = request.followedRedirect()
? ContentSecurityPolicy::DidRedirect
: ContentSecurityPolicy::DidNotRedirect;
if (!parentPolicy->allowChildFrameFromSource(request.url(), redirectStatus)) {
m_frame->document()->enforceSandboxFlags(SandboxOrigin);
m_frame->owner()->dispatchLoad();
return false;
}
}
}
bool isFormSubmission = type == NavigationTypeFormSubmitted || type == NavigationTypeFormResubmitted;
if (isFormSubmission && !m_frame->document()->contentSecurityPolicy()->allowFormAction(request.url()))
return false;
policy = client()->decidePolicyForNavigation(request, loader, type, policy, replacesCurrentHistoryItem, isClientRedirect);
if (policy == NavigationPolicyCurrentTab)
return true;
if (policy == NavigationPolicyIgnore)
return false;
if (policy == NavigationPolicyHandledByClient) {
m_progressTracker->progressStarted();
return false;
}
if (!LocalDOMWindow::allowPopUp(*m_frame) && !UserGestureIndicator::utilizeUserGesture())
return false;
client()->loadURLExternally(request, policy, String(), replacesCurrentHistoryItem);
return false;
}
|
bool FrameLoader::shouldContinueForNavigationPolicy(const ResourceRequest& request, const SubstituteData& substituteData,
DocumentLoader* loader, ContentSecurityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy,
NavigationType type, NavigationPolicy policy, bool replacesCurrentHistoryItem, bool isClientRedirect)
{
if (request.url().isEmpty() || substituteData.isValid())
return true;
if (shouldCheckMainWorldContentSecurityPolicy == CheckContentSecurityPolicy) {
Frame* parentFrame = m_frame->tree().parent();
if (parentFrame) {
ContentSecurityPolicy* parentPolicy = parentFrame->securityContext()->contentSecurityPolicy();
ContentSecurityPolicy::RedirectStatus redirectStatus = request.followedRedirect()
? ContentSecurityPolicy::DidRedirect
: ContentSecurityPolicy::DidNotRedirect;
if (!parentPolicy->allowChildFrameFromSource(request.url(), redirectStatus)) {
m_frame->document()->enforceSandboxFlags(SandboxOrigin);
m_frame->owner()->dispatchLoad();
return false;
}
}
}
bool isFormSubmission = type == NavigationTypeFormSubmitted || type == NavigationTypeFormResubmitted;
if (isFormSubmission && !m_frame->document()->contentSecurityPolicy()->allowFormAction(request.url()))
return false;
policy = client()->decidePolicyForNavigation(request, loader, type, policy, replacesCurrentHistoryItem, isClientRedirect);
if (policy == NavigationPolicyCurrentTab)
return true;
if (policy == NavigationPolicyIgnore)
return false;
if (policy == NavigationPolicyHandledByClient) {
m_progressTracker->progressStarted();
return false;
}
if (!LocalDOMWindow::allowPopUp(*m_frame) && !UserGestureIndicator::utilizeUserGesture())
return false;
client()->loadURLExternally(request, policy, String(), replacesCurrentHistoryItem);
return false;
}
|
C
|
Chrome
| 0 |
CVE-2018-6074
|
https://www.cvedetails.com/cve/CVE-2018-6074/
|
CWE-20
|
https://github.com/chromium/chromium/commit/c59ad14fc61393a50b2ca3e89c7ecaba7028c4c4
|
c59ad14fc61393a50b2ca3e89c7ecaba7028c4c4
|
DevTools: allow styling the page number element when printing over the protocol.
Bug: none
Change-Id: I13e6afbd86a7c6bcdedbf0645183194b9de7cfb4
Reviewed-on: https://chromium-review.googlesource.com/809759
Commit-Queue: Pavel Feldman <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: Jianzhou Feng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#523966}
|
void HeadlessPrintManager::GetPDFContents(content::RenderFrameHost* rfh,
const HeadlessPrintSettings& settings,
const GetPDFCallback& callback) {
DCHECK(callback);
if (callback_) {
callback.Run(SIMULTANEOUS_PRINT_ACTIVE, std::string());
return;
}
printing_rfh_ = rfh;
callback_ = callback;
print_params_ = GetPrintParamsFromSettings(settings);
page_ranges_text_ = settings.page_ranges;
ignore_invalid_page_ranges_ = settings.ignore_invalid_page_ranges;
rfh->Send(new PrintMsg_PrintPages(rfh->GetRoutingID()));
}
|
void HeadlessPrintManager::GetPDFContents(content::RenderFrameHost* rfh,
const HeadlessPrintSettings& settings,
const GetPDFCallback& callback) {
DCHECK(callback);
if (callback_) {
callback.Run(SIMULTANEOUS_PRINT_ACTIVE, std::string());
return;
}
printing_rfh_ = rfh;
callback_ = callback;
print_params_ = GetPrintParamsFromSettings(settings);
page_ranges_text_ = settings.page_ranges;
ignore_invalid_page_ranges_ = settings.ignore_invalid_page_ranges;
rfh->Send(new PrintMsg_PrintPages(rfh->GetRoutingID()));
}
|
C
|
Chrome
| 0 |
CVE-2018-11598
|
https://www.cvedetails.com/cve/CVE-2018-11598/
|
CWE-125
|
https://github.com/espruino/Espruino/commit/bf4416ab9129ee3afd56739ea4e3cd0da5484b6b
|
bf4416ab9129ee3afd56739ea4e3cd0da5484b6b
|
Fix bug if using an undefined member of an object for for..in (fix #1437)
|
NO_INLINE JsVar *jspeFactorArray() {
int idx = 0;
JsVar *contents = 0;
if (JSP_SHOULD_EXECUTE) {
contents = jsvNewEmptyArray();
if (!contents) { // out of memory
jspSetError(false);
return 0;
}
}
/* JSON-style array */
JSP_MATCH_WITH_RETURN('[', contents);
while (!JSP_SHOULDNT_PARSE && lex->tk != ']') {
if (JSP_SHOULD_EXECUTE) {
JsVar *aVar = 0;
JsVar *indexName = 0;
if (lex->tk != ',') { // #287 - [,] and [1,2,,4] are allowed
aVar = jsvSkipNameAndUnLock(jspeAssignmentExpression());
indexName = jsvMakeIntoVariableName(jsvNewFromInteger(idx), aVar);
}
if (indexName) { // could be out of memory
jsvAddName(contents, indexName);
jsvUnLock(indexName);
}
jsvUnLock(aVar);
} else {
jsvUnLock(jspeAssignmentExpression());
}
if (lex->tk != ']') JSP_MATCH_WITH_RETURN(',', contents);
idx++;
}
if (contents) jsvSetArrayLength(contents, idx, false);
JSP_MATCH_WITH_RETURN(']', contents);
return contents;
}
|
NO_INLINE JsVar *jspeFactorArray() {
int idx = 0;
JsVar *contents = 0;
if (JSP_SHOULD_EXECUTE) {
contents = jsvNewEmptyArray();
if (!contents) { // out of memory
jspSetError(false);
return 0;
}
}
/* JSON-style array */
JSP_MATCH_WITH_RETURN('[', contents);
while (!JSP_SHOULDNT_PARSE && lex->tk != ']') {
if (JSP_SHOULD_EXECUTE) {
JsVar *aVar = 0;
JsVar *indexName = 0;
if (lex->tk != ',') { // #287 - [,] and [1,2,,4] are allowed
aVar = jsvSkipNameAndUnLock(jspeAssignmentExpression());
indexName = jsvMakeIntoVariableName(jsvNewFromInteger(idx), aVar);
}
if (indexName) { // could be out of memory
jsvAddName(contents, indexName);
jsvUnLock(indexName);
}
jsvUnLock(aVar);
} else {
jsvUnLock(jspeAssignmentExpression());
}
if (lex->tk != ']') JSP_MATCH_WITH_RETURN(',', contents);
idx++;
}
if (contents) jsvSetArrayLength(contents, idx, false);
JSP_MATCH_WITH_RETURN(']', contents);
return contents;
}
|
C
|
Espruino
| 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.
|
iasecc_get_free_reference(struct sc_card *card, struct iasecc_ctl_get_free_reference *ctl_data)
{
struct sc_context *ctx = card->ctx;
struct iasecc_sdo *sdo = NULL;
int idx, rv;
LOG_FUNC_CALLED(ctx);
if ((ctl_data->key_size % 0x40) || ctl_data->index < 1 || (ctl_data->index > IASECC_OBJECT_REF_MAX))
LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_ARGUMENTS);
sc_log(ctx, "get reference for key(index:%i,usage:%X,access:%X)", ctl_data->index, ctl_data->usage, ctl_data->access);
/* TODO: when looking for the slot for the signature keys, check also PSO_SIGNATURE ACL */
for (idx = ctl_data->index; idx <= IASECC_OBJECT_REF_MAX; idx++) {
unsigned char sdo_tag[3] = {
IASECC_SDO_TAG_HEADER, IASECC_OBJECT_REF_LOCAL | IASECC_SDO_CLASS_RSA_PRIVATE, idx
};
size_t sz;
if (sdo)
iasecc_sdo_free(card, sdo);
rv = iasecc_sdo_allocate_and_parse(card, sdo_tag, 3, &sdo);
LOG_TEST_RET(ctx, rv, "cannot parse SDO data");
rv = iasecc_sdo_get_data(card, sdo);
if (rv == SC_ERROR_DATA_OBJECT_NOT_FOUND) {
iasecc_sdo_free(card, sdo);
sc_log(ctx, "found empty key slot %i", idx);
break;
}
else
LOG_TEST_RET(ctx, rv, "get new key reference failed");
sz = *(sdo->docp.size.value + 0) * 0x100 + *(sdo->docp.size.value + 1);
sc_log(ctx,
"SDO(idx:%i) size %"SC_FORMAT_LEN_SIZE_T"u; key_size %"SC_FORMAT_LEN_SIZE_T"u",
idx, sz, ctl_data->key_size);
if (sz != ctl_data->key_size / 8) {
sc_log(ctx,
"key index %i ignored: different key sizes %"SC_FORMAT_LEN_SIZE_T"u/%"SC_FORMAT_LEN_SIZE_T"u",
idx, sz, ctl_data->key_size / 8);
continue;
}
if (sdo->docp.non_repudiation.value) {
sc_log(ctx, "non repudiation flag %X", sdo->docp.non_repudiation.value[0]);
if ((ctl_data->usage & SC_PKCS15_PRKEY_USAGE_NONREPUDIATION) && !(*sdo->docp.non_repudiation.value)) {
sc_log(ctx, "key index %i ignored: need non repudiation", idx);
continue;
}
if (!(ctl_data->usage & SC_PKCS15_PRKEY_USAGE_NONREPUDIATION) && *sdo->docp.non_repudiation.value) {
sc_log(ctx, "key index %i ignored: don't need non-repudiation", idx);
continue;
}
}
if (ctl_data->access & SC_PKCS15_PRKEY_ACCESS_LOCAL) {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_GENERATE] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: GENERATE KEY not allowed", idx);
continue;
}
}
else {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_PUT_DATA] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: PUT DATA not allowed", idx);
continue;
}
}
if ((ctl_data->usage & SC_PKCS15_PRKEY_USAGE_NONREPUDIATION) && (ctl_data->usage & SC_PKCS15_PRKEY_USAGE_SIGN)) {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_PSO_SIGN] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: PSO SIGN not allowed", idx);
continue;
}
}
else if (ctl_data->usage & SC_PKCS15_PRKEY_USAGE_SIGN) {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_INTERNAL_AUTH] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: INTERNAL AUTHENTICATE not allowed", idx);
continue;
}
}
if (ctl_data->usage & (SC_PKCS15_PRKEY_USAGE_DECRYPT | SC_PKCS15_PRKEY_USAGE_UNWRAP)) {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_PSO_DECIPHER] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: PSO DECIPHER not allowed", idx);
continue;
}
}
break;
}
ctl_data->index = idx;
if (idx > IASECC_OBJECT_REF_MAX)
LOG_FUNC_RETURN(ctx, SC_ERROR_DATA_OBJECT_NOT_FOUND);
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
}
|
iasecc_get_free_reference(struct sc_card *card, struct iasecc_ctl_get_free_reference *ctl_data)
{
struct sc_context *ctx = card->ctx;
struct iasecc_sdo *sdo = NULL;
int idx, rv;
LOG_FUNC_CALLED(ctx);
if ((ctl_data->key_size % 0x40) || ctl_data->index < 1 || (ctl_data->index > IASECC_OBJECT_REF_MAX))
LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_ARGUMENTS);
sc_log(ctx, "get reference for key(index:%i,usage:%X,access:%X)", ctl_data->index, ctl_data->usage, ctl_data->access);
/* TODO: when looking for the slot for the signature keys, check also PSO_SIGNATURE ACL */
for (idx = ctl_data->index; idx <= IASECC_OBJECT_REF_MAX; idx++) {
unsigned char sdo_tag[3] = {
IASECC_SDO_TAG_HEADER, IASECC_OBJECT_REF_LOCAL | IASECC_SDO_CLASS_RSA_PRIVATE, idx
};
size_t sz;
if (sdo)
iasecc_sdo_free(card, sdo);
rv = iasecc_sdo_allocate_and_parse(card, sdo_tag, 3, &sdo);
LOG_TEST_RET(ctx, rv, "cannot parse SDO data");
rv = iasecc_sdo_get_data(card, sdo);
if (rv == SC_ERROR_DATA_OBJECT_NOT_FOUND) {
iasecc_sdo_free(card, sdo);
sc_log(ctx, "found empty key slot %i", idx);
break;
}
else
LOG_TEST_RET(ctx, rv, "get new key reference failed");
sz = *(sdo->docp.size.value + 0) * 0x100 + *(sdo->docp.size.value + 1);
sc_log(ctx,
"SDO(idx:%i) size %"SC_FORMAT_LEN_SIZE_T"u; key_size %"SC_FORMAT_LEN_SIZE_T"u",
idx, sz, ctl_data->key_size);
if (sz != ctl_data->key_size / 8) {
sc_log(ctx,
"key index %i ignored: different key sizes %"SC_FORMAT_LEN_SIZE_T"u/%"SC_FORMAT_LEN_SIZE_T"u",
idx, sz, ctl_data->key_size / 8);
continue;
}
if (sdo->docp.non_repudiation.value) {
sc_log(ctx, "non repudiation flag %X", sdo->docp.non_repudiation.value[0]);
if ((ctl_data->usage & SC_PKCS15_PRKEY_USAGE_NONREPUDIATION) && !(*sdo->docp.non_repudiation.value)) {
sc_log(ctx, "key index %i ignored: need non repudiation", idx);
continue;
}
if (!(ctl_data->usage & SC_PKCS15_PRKEY_USAGE_NONREPUDIATION) && *sdo->docp.non_repudiation.value) {
sc_log(ctx, "key index %i ignored: don't need non-repudiation", idx);
continue;
}
}
if (ctl_data->access & SC_PKCS15_PRKEY_ACCESS_LOCAL) {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_GENERATE] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: GENERATE KEY not allowed", idx);
continue;
}
}
else {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_PUT_DATA] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: PUT DATA not allowed", idx);
continue;
}
}
if ((ctl_data->usage & SC_PKCS15_PRKEY_USAGE_NONREPUDIATION) && (ctl_data->usage & SC_PKCS15_PRKEY_USAGE_SIGN)) {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_PSO_SIGN] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: PSO SIGN not allowed", idx);
continue;
}
}
else if (ctl_data->usage & SC_PKCS15_PRKEY_USAGE_SIGN) {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_INTERNAL_AUTH] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: INTERNAL AUTHENTICATE not allowed", idx);
continue;
}
}
if (ctl_data->usage & (SC_PKCS15_PRKEY_USAGE_DECRYPT | SC_PKCS15_PRKEY_USAGE_UNWRAP)) {
if (sdo->docp.scbs[IASECC_ACLS_RSAKEY_PSO_DECIPHER] == IASECC_SCB_NEVER) {
sc_log(ctx, "key index %i ignored: PSO DECIPHER not allowed", idx);
continue;
}
}
break;
}
ctl_data->index = idx;
if (idx > IASECC_OBJECT_REF_MAX)
LOG_FUNC_RETURN(ctx, SC_ERROR_DATA_OBJECT_NOT_FOUND);
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
}
|
C
|
OpenSC
| 0 |
CVE-2017-12146
|
https://www.cvedetails.com/cve/CVE-2017-12146/
|
CWE-362
|
https://github.com/torvalds/linux/commit/6265539776a0810b7ce6398c27866ddb9c6bd154
|
6265539776a0810b7ce6398c27866ddb9c6bd154
|
driver core: platform: fix race condition with driver_override
The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.
Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'driver_override'")
Cc: [email protected]
Signed-off-by: Adrian Salido <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static int platform_match(struct device *dev, struct device_driver *drv)
{
struct platform_device *pdev = to_platform_device(dev);
struct platform_driver *pdrv = to_platform_driver(drv);
/* When driver_override is set, only bind to the matching driver */
if (pdev->driver_override)
return !strcmp(pdev->driver_override, drv->name);
/* Attempt an OF style match first */
if (of_driver_match_device(dev, drv))
return 1;
/* Then try ACPI style match */
if (acpi_driver_match_device(dev, drv))
return 1;
/* Then try to match against the id table */
if (pdrv->id_table)
return platform_match_id(pdrv->id_table, pdev) != NULL;
/* fall-back to driver name match */
return (strcmp(pdev->name, drv->name) == 0);
}
|
static int platform_match(struct device *dev, struct device_driver *drv)
{
struct platform_device *pdev = to_platform_device(dev);
struct platform_driver *pdrv = to_platform_driver(drv);
/* When driver_override is set, only bind to the matching driver */
if (pdev->driver_override)
return !strcmp(pdev->driver_override, drv->name);
/* Attempt an OF style match first */
if (of_driver_match_device(dev, drv))
return 1;
/* Then try ACPI style match */
if (acpi_driver_match_device(dev, drv))
return 1;
/* Then try to match against the id table */
if (pdrv->id_table)
return platform_match_id(pdrv->id_table, pdev) != NULL;
/* fall-back to driver name match */
return (strcmp(pdev->name, drv->name) == 0);
}
|
C
|
linux
| 0 |
CVE-2017-5101
|
https://www.cvedetails.com/cve/CVE-2017-5101/
|
CWE-20
|
https://github.com/chromium/chromium/commit/29734f46c6dc9362783091180c2ee279ad53637f
|
29734f46c6dc9362783091180c2ee279ad53637f
|
media: remove base::SharedMemoryHandle usage in v4l2 encoder
This replaces a use of the legacy UnalignedSharedMemory ctor
taking a SharedMemoryHandle with the current ctor taking a
PlatformSharedMemoryRegion.
Bug: 849207
Change-Id: Iea24ebdcd941cf2fa97e19cf2aeac1a18f9773d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1697602
Commit-Queue: Matthew Cary (CET) <[email protected]>
Reviewed-by: Ricky Liang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#681740}
|
void V4L2JpegEncodeAccelerator::DestroyTask() {
DCHECK(encoder_task_runner_->BelongsToCurrentThread());
while (!encoded_instances_.empty()) {
encoded_instances_.front()->DestroyTask();
encoded_instances_.pop();
}
while (!encoded_instances_dma_buf_.empty()) {
encoded_instances_dma_buf_.front()->DestroyTask();
encoded_instances_dma_buf_.pop();
}
}
|
void V4L2JpegEncodeAccelerator::DestroyTask() {
DCHECK(encoder_task_runner_->BelongsToCurrentThread());
while (!encoded_instances_.empty()) {
encoded_instances_.front()->DestroyTask();
encoded_instances_.pop();
}
while (!encoded_instances_dma_buf_.empty()) {
encoded_instances_dma_buf_.front()->DestroyTask();
encoded_instances_dma_buf_.pop();
}
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/ee8d6fd30b022ac2c87b7a190c954e7bb3c9b21e
|
ee8d6fd30b022ac2c87b7a190c954e7bb3c9b21e
|
Clean up calls like "gfx::Rect(0, 0, size().width(), size().height()".
The caller can use the much shorter "gfx::Rect(size())", since gfx::Rect
has a constructor that just takes a Size.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2204001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48283 0039d316-1c4b-4281-b951-d872f2087c98
|
void ThumbnailGenerator::WidgetDidUpdateBackingStore(
RenderWidgetHost* widget) {
WidgetThumbnail* wt = GetThumbnailAccessor()->GetProperty(
widget->property_bag());
if (!wt)
return; // Nothing to do.
if (no_timeout_ ||
base::TimeTicks::Now() -
base::TimeDelta::FromMilliseconds(kVisibilitySlopMS) < wt->last_shown)
return; // TODO(brettw) schedule thumbnail generation for this renderer in
wt->thumbnail = SkBitmap();
}
|
void ThumbnailGenerator::WidgetDidUpdateBackingStore(
RenderWidgetHost* widget) {
WidgetThumbnail* wt = GetThumbnailAccessor()->GetProperty(
widget->property_bag());
if (!wt)
return; // Nothing to do.
if (no_timeout_ ||
base::TimeTicks::Now() -
base::TimeDelta::FromMilliseconds(kVisibilitySlopMS) < wt->last_shown)
return; // TODO(brettw) schedule thumbnail generation for this renderer in
wt->thumbnail = SkBitmap();
}
|
C
|
Chrome
| 0 |
CVE-2016-8666
|
https://www.cvedetails.com/cve/CVE-2016-8666/
|
CWE-400
|
https://github.com/torvalds/linux/commit/fac8e0f579695a3ecbc4d3cac369139d7f819971
|
fac8e0f579695a3ecbc4d3cac369139d7f819971
|
tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsulation device expresses support for handling offloaded
encapsulated packets, so we won't generate these types of frames
in the transmit path. However, GRO doesn't have a check for
multiple levels of encapsulation and will attempt to build them.
UDP tunnel GRO actually does prevent this situation but it only
handles multiple UDP tunnels stacked on top of each other. This
generalizes that solution to prevent any kind of tunnel stacking
that would cause problems.
Fixes: bf5a755f ("net-gre-gro: Add GRE support to the GRO stack")
Signed-off-by: Jesse Gross <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static netdev_features_t netdev_sync_upper_features(struct net_device *lower,
struct net_device *upper, netdev_features_t features)
{
netdev_features_t upper_disables = NETIF_F_UPPER_DISABLES;
netdev_features_t feature;
int feature_bit;
for_each_netdev_feature(&upper_disables, feature_bit) {
feature = __NETIF_F_BIT(feature_bit);
if (!(upper->wanted_features & feature)
&& (features & feature)) {
netdev_dbg(lower, "Dropping feature %pNF, upper dev %s has it off.\n",
&feature, upper->name);
features &= ~feature;
}
}
return features;
}
|
static netdev_features_t netdev_sync_upper_features(struct net_device *lower,
struct net_device *upper, netdev_features_t features)
{
netdev_features_t upper_disables = NETIF_F_UPPER_DISABLES;
netdev_features_t feature;
int feature_bit;
for_each_netdev_feature(&upper_disables, feature_bit) {
feature = __NETIF_F_BIT(feature_bit);
if (!(upper->wanted_features & feature)
&& (features & feature)) {
netdev_dbg(lower, "Dropping feature %pNF, upper dev %s has it off.\n",
&feature, upper->name);
features &= ~feature;
}
}
return features;
}
|
C
|
linux
| 0 |
CVE-2018-20839
|
https://www.cvedetails.com/cve/CVE-2018-20839/
|
CWE-255
|
https://github.com/systemd/systemd/commit/9725f1a10f80f5e0ae7d9b60547458622aeb322f
|
9725f1a10f80f5e0ae7d9b60547458622aeb322f
|
Merge pull request #12378 from rbalint/vt-kbd-reset-check
VT kbd reset check
|
static int verify_vc_kbmode(int fd) {
|
static int verify_vc_kbmode(int fd) {
int curr_mode;
/*
* Make sure we only adjust consoles in K_XLATE or K_UNICODE mode.
* Otherwise we would (likely) interfere with X11's processing of the
* key events.
*
* http://lists.freedesktop.org/archives/systemd-devel/2013-February/008573.html
*/
if (ioctl(fd, KDGKBMODE, &curr_mode) < 0)
return -errno;
return IN_SET(curr_mode, K_XLATE, K_UNICODE) ? 0 : -EBUSY;
}
|
C
|
systemd
| 1 |
CVE-2017-5508
|
https://www.cvedetails.com/cve/CVE-2017-5508/
|
CWE-119
|
https://github.com/ImageMagick/ImageMagick/commit/c073a7712d82476b5fbee74856c46b88af9c3175
|
c073a7712d82476b5fbee74856c46b88af9c3175
|
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31161
|
static MagickBooleanType GetTIFFInfo(const ImageInfo *image_info,TIFF *tiff,
TIFFInfo *tiff_info)
{
const char
*option;
MagickStatusType
flags;
uint32
tile_columns,
tile_rows;
assert(tiff_info != (TIFFInfo *) NULL);
(void) ResetMagickMemory(tiff_info,0,sizeof(*tiff_info));
option=GetImageOption(image_info,"tiff:tile-geometry");
if (option == (const char *) NULL)
{
uint32
rows_per_strip;
option=GetImageOption(image_info,"tiff:rows-per-strip");
if (option != (const char *) NULL)
rows_per_strip=(size_t) strtol(option,(char **) NULL,10);
else
if (TIFFGetField(tiff,TIFFTAG_IMAGELENGTH,&rows_per_strip) == 0)
rows_per_strip=0; /* use default */
rows_per_strip=TIFFDefaultStripSize(tiff,rows_per_strip);
(void) TIFFSetField(tiff,TIFFTAG_ROWSPERSTRIP,rows_per_strip);
return(MagickTrue);
}
flags=ParseAbsoluteGeometry(option,&tiff_info->tile_geometry);
if ((flags & HeightValue) == 0)
tiff_info->tile_geometry.height=tiff_info->tile_geometry.width;
tile_columns=(uint32) tiff_info->tile_geometry.width;
tile_rows=(uint32) tiff_info->tile_geometry.height;
TIFFDefaultTileSize(tiff,&tile_columns,&tile_rows);
(void) TIFFSetField(tiff,TIFFTAG_TILEWIDTH,tile_columns);
(void) TIFFSetField(tiff,TIFFTAG_TILELENGTH,tile_rows);
tiff_info->tile_geometry.width=tile_columns;
tiff_info->tile_geometry.height=tile_rows;
tiff_info->scanlines=(unsigned char *) AcquireQuantumMemory((size_t)
tile_rows*TIFFScanlineSize(tiff),sizeof(*tiff_info->scanlines));
tiff_info->pixels=(unsigned char *) AcquireQuantumMemory((size_t)
tile_rows*TIFFTileSize(tiff),sizeof(*tiff_info->scanlines));
if ((tiff_info->scanlines == (unsigned char *) NULL) ||
(tiff_info->pixels == (unsigned char *) NULL))
{
DestroyTIFFInfo(tiff_info);
return(MagickFalse);
}
return(MagickTrue);
}
|
static MagickBooleanType GetTIFFInfo(const ImageInfo *image_info,TIFF *tiff,
TIFFInfo *tiff_info)
{
const char
*option;
MagickStatusType
flags;
uint32
tile_columns,
tile_rows;
assert(tiff_info != (TIFFInfo *) NULL);
(void) ResetMagickMemory(tiff_info,0,sizeof(*tiff_info));
option=GetImageOption(image_info,"tiff:tile-geometry");
if (option == (const char *) NULL)
{
uint32
rows_per_strip;
option=GetImageOption(image_info,"tiff:rows-per-strip");
if (option != (const char *) NULL)
rows_per_strip=(size_t) strtol(option,(char **) NULL,10);
else
if (TIFFGetField(tiff,TIFFTAG_IMAGELENGTH,&rows_per_strip) == 0)
rows_per_strip=0; /* use default */
rows_per_strip=TIFFDefaultStripSize(tiff,rows_per_strip);
(void) TIFFSetField(tiff,TIFFTAG_ROWSPERSTRIP,rows_per_strip);
return(MagickTrue);
}
flags=ParseAbsoluteGeometry(option,&tiff_info->tile_geometry);
if ((flags & HeightValue) == 0)
tiff_info->tile_geometry.height=tiff_info->tile_geometry.width;
tile_columns=(uint32) tiff_info->tile_geometry.width;
tile_rows=(uint32) tiff_info->tile_geometry.height;
TIFFDefaultTileSize(tiff,&tile_columns,&tile_rows);
(void) TIFFSetField(tiff,TIFFTAG_TILEWIDTH,tile_columns);
(void) TIFFSetField(tiff,TIFFTAG_TILELENGTH,tile_rows);
tiff_info->tile_geometry.width=tile_columns;
tiff_info->tile_geometry.height=tile_rows;
tiff_info->scanlines=(unsigned char *) AcquireQuantumMemory((size_t)
tile_rows*TIFFScanlineSize(tiff),sizeof(*tiff_info->scanlines));
tiff_info->pixels=(unsigned char *) AcquireQuantumMemory((size_t)
tile_rows*TIFFTileSize(tiff),sizeof(*tiff_info->scanlines));
if ((tiff_info->scanlines == (unsigned char *) NULL) ||
(tiff_info->pixels == (unsigned char *) NULL))
{
DestroyTIFFInfo(tiff_info);
return(MagickFalse);
}
return(MagickTrue);
}
|
C
|
ImageMagick
| 0 |
CVE-2017-18248
|
https://www.cvedetails.com/cve/CVE-2017-18248/
|
CWE-20
|
https://github.com/apple/cups/commit/49fa4983f25b64ec29d548ffa3b9782426007df3
|
49fa4983f25b64ec29d548ffa3b9782426007df3
|
DBUS notifications could crash the scheduler (Issue #5143)
- scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8.
|
check_quotas(cupsd_client_t *con, /* I - Client connection */
cupsd_printer_t *p) /* I - Printer or class */
{
char username[33], /* Username */
*name; /* Current user name */
cupsd_quota_t *q; /* Quota data */
#ifdef HAVE_MBR_UID_TO_UUID
/*
* Use Apple membership APIs which require that all names represent
* valid user account or group records accessible by the server.
*/
uuid_t usr_uuid; /* UUID for job requesting user */
uuid_t usr2_uuid; /* UUID for ACL user name entry */
uuid_t grp_uuid; /* UUID for ACL group name entry */
int mbr_err; /* Error from membership function */
int is_member; /* Is this user a member? */
#else
/*
* Use standard POSIX APIs for checking users and groups...
*/
struct passwd *pw; /* User password data */
#endif /* HAVE_MBR_UID_TO_UUID */
cupsdLogMessage(CUPSD_LOG_DEBUG2, "check_quotas(%p[%d], %p[%s])",
con, con->number, p, p->name);
/*
* Figure out who is printing...
*/
strlcpy(username, get_username(con), sizeof(username));
if ((name = strchr(username, '@')) != NULL)
*name = '\0'; /* Strip @REALM */
/*
* Check global active job limits for printers and users...
*/
if (MaxJobsPerPrinter)
{
/*
* Check if there are too many pending jobs on this printer...
*/
if (cupsdGetPrinterJobCount(p->name) >= MaxJobsPerPrinter)
{
cupsdLogMessage(CUPSD_LOG_INFO, "Too many jobs for printer \"%s\"...",
p->name);
return (-1);
}
}
if (MaxJobsPerUser)
{
/*
* Check if there are too many pending jobs for this user...
*/
if (cupsdGetUserJobCount(username) >= MaxJobsPerUser)
{
cupsdLogMessage(CUPSD_LOG_INFO, "Too many jobs for user \"%s\"...",
username);
return (-1);
}
}
/*
* Check against users...
*/
if (cupsArrayCount(p->users) == 0 && p->k_limit == 0 && p->page_limit == 0)
return (1);
if (cupsArrayCount(p->users))
{
#ifdef HAVE_MBR_UID_TO_UUID
/*
* Get UUID for job requesting user...
*/
if (mbr_user_name_to_uuid((char *)username, usr_uuid))
{
/*
* Unknown user...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"check_quotas: UUID lookup failed for user \"%s\"",
username);
cupsdLogMessage(CUPSD_LOG_INFO,
"Denying user \"%s\" access to printer \"%s\" "
"(unknown user)...",
username, p->name);
return (0);
}
#else
/*
* Get UID and GID of requesting user...
*/
pw = getpwnam(username);
endpwent();
#endif /* HAVE_MBR_UID_TO_UUID */
for (name = (char *)cupsArrayFirst(p->users);
name;
name = (char *)cupsArrayNext(p->users))
if (name[0] == '@')
{
/*
* Check group membership...
*/
#ifdef HAVE_MBR_UID_TO_UUID
if (name[1] == '#')
{
if (uuid_parse(name + 2, grp_uuid))
uuid_clear(grp_uuid);
}
else if ((mbr_err = mbr_group_name_to_uuid(name + 1, grp_uuid)) != 0)
{
/*
* Invalid ACL entries are ignored for matching; just record a
* warning in the log...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"check_quotas: UUID lookup failed for ACL entry "
"\"%s\" (err=%d)", name, mbr_err);
cupsdLogMessage(CUPSD_LOG_WARN,
"Access control entry \"%s\" not a valid group name; "
"entry ignored", name);
}
if ((mbr_err = mbr_check_membership(usr_uuid, grp_uuid,
&is_member)) != 0)
{
/*
* At this point, there should be no errors, but check anyways...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"check_quotas: group \"%s\" membership check "
"failed (err=%d)", name + 1, mbr_err);
is_member = 0;
}
/*
* Stop if we found a match...
*/
if (is_member)
break;
#else
if (cupsdCheckGroup(username, pw, name + 1))
break;
#endif /* HAVE_MBR_UID_TO_UUID */
}
#ifdef HAVE_MBR_UID_TO_UUID
else
{
if (name[0] == '#')
{
if (uuid_parse(name + 1, usr2_uuid))
uuid_clear(usr2_uuid);
}
else if ((mbr_err = mbr_user_name_to_uuid(name, usr2_uuid)) != 0)
{
/*
* Invalid ACL entries are ignored for matching; just record a
* warning in the log...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"check_quotas: UUID lookup failed for ACL entry "
"\"%s\" (err=%d)", name, mbr_err);
cupsdLogMessage(CUPSD_LOG_WARN,
"Access control entry \"%s\" not a valid user name; "
"entry ignored", name);
}
if (!uuid_compare(usr_uuid, usr2_uuid))
break;
}
#else
else if (!_cups_strcasecmp(username, name))
break;
#endif /* HAVE_MBR_UID_TO_UUID */
if ((name != NULL) == p->deny_users)
{
cupsdLogMessage(CUPSD_LOG_INFO,
"Denying user \"%s\" access to printer \"%s\"...",
username, p->name);
return (0);
}
}
/*
* Check quotas...
*/
if (p->k_limit || p->page_limit)
{
if ((q = cupsdUpdateQuota(p, username, 0, 0)) == NULL)
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"Unable to allocate quota data for user \"%s\"",
username);
return (-1);
}
if ((q->k_count >= p->k_limit && p->k_limit) ||
(q->page_count >= p->page_limit && p->page_limit))
{
cupsdLogMessage(CUPSD_LOG_INFO, "User \"%s\" is over the quota limit...",
username);
return (-1);
}
}
/*
* If we have gotten this far, we're done!
*/
return (1);
}
|
check_quotas(cupsd_client_t *con, /* I - Client connection */
cupsd_printer_t *p) /* I - Printer or class */
{
char username[33], /* Username */
*name; /* Current user name */
cupsd_quota_t *q; /* Quota data */
#ifdef HAVE_MBR_UID_TO_UUID
/*
* Use Apple membership APIs which require that all names represent
* valid user account or group records accessible by the server.
*/
uuid_t usr_uuid; /* UUID for job requesting user */
uuid_t usr2_uuid; /* UUID for ACL user name entry */
uuid_t grp_uuid; /* UUID for ACL group name entry */
int mbr_err; /* Error from membership function */
int is_member; /* Is this user a member? */
#else
/*
* Use standard POSIX APIs for checking users and groups...
*/
struct passwd *pw; /* User password data */
#endif /* HAVE_MBR_UID_TO_UUID */
cupsdLogMessage(CUPSD_LOG_DEBUG2, "check_quotas(%p[%d], %p[%s])",
con, con->number, p, p->name);
/*
* Figure out who is printing...
*/
strlcpy(username, get_username(con), sizeof(username));
if ((name = strchr(username, '@')) != NULL)
*name = '\0'; /* Strip @REALM */
/*
* Check global active job limits for printers and users...
*/
if (MaxJobsPerPrinter)
{
/*
* Check if there are too many pending jobs on this printer...
*/
if (cupsdGetPrinterJobCount(p->name) >= MaxJobsPerPrinter)
{
cupsdLogMessage(CUPSD_LOG_INFO, "Too many jobs for printer \"%s\"...",
p->name);
return (-1);
}
}
if (MaxJobsPerUser)
{
/*
* Check if there are too many pending jobs for this user...
*/
if (cupsdGetUserJobCount(username) >= MaxJobsPerUser)
{
cupsdLogMessage(CUPSD_LOG_INFO, "Too many jobs for user \"%s\"...",
username);
return (-1);
}
}
/*
* Check against users...
*/
if (cupsArrayCount(p->users) == 0 && p->k_limit == 0 && p->page_limit == 0)
return (1);
if (cupsArrayCount(p->users))
{
#ifdef HAVE_MBR_UID_TO_UUID
/*
* Get UUID for job requesting user...
*/
if (mbr_user_name_to_uuid((char *)username, usr_uuid))
{
/*
* Unknown user...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"check_quotas: UUID lookup failed for user \"%s\"",
username);
cupsdLogMessage(CUPSD_LOG_INFO,
"Denying user \"%s\" access to printer \"%s\" "
"(unknown user)...",
username, p->name);
return (0);
}
#else
/*
* Get UID and GID of requesting user...
*/
pw = getpwnam(username);
endpwent();
#endif /* HAVE_MBR_UID_TO_UUID */
for (name = (char *)cupsArrayFirst(p->users);
name;
name = (char *)cupsArrayNext(p->users))
if (name[0] == '@')
{
/*
* Check group membership...
*/
#ifdef HAVE_MBR_UID_TO_UUID
if (name[1] == '#')
{
if (uuid_parse(name + 2, grp_uuid))
uuid_clear(grp_uuid);
}
else if ((mbr_err = mbr_group_name_to_uuid(name + 1, grp_uuid)) != 0)
{
/*
* Invalid ACL entries are ignored for matching; just record a
* warning in the log...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"check_quotas: UUID lookup failed for ACL entry "
"\"%s\" (err=%d)", name, mbr_err);
cupsdLogMessage(CUPSD_LOG_WARN,
"Access control entry \"%s\" not a valid group name; "
"entry ignored", name);
}
if ((mbr_err = mbr_check_membership(usr_uuid, grp_uuid,
&is_member)) != 0)
{
/*
* At this point, there should be no errors, but check anyways...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"check_quotas: group \"%s\" membership check "
"failed (err=%d)", name + 1, mbr_err);
is_member = 0;
}
/*
* Stop if we found a match...
*/
if (is_member)
break;
#else
if (cupsdCheckGroup(username, pw, name + 1))
break;
#endif /* HAVE_MBR_UID_TO_UUID */
}
#ifdef HAVE_MBR_UID_TO_UUID
else
{
if (name[0] == '#')
{
if (uuid_parse(name + 1, usr2_uuid))
uuid_clear(usr2_uuid);
}
else if ((mbr_err = mbr_user_name_to_uuid(name, usr2_uuid)) != 0)
{
/*
* Invalid ACL entries are ignored for matching; just record a
* warning in the log...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"check_quotas: UUID lookup failed for ACL entry "
"\"%s\" (err=%d)", name, mbr_err);
cupsdLogMessage(CUPSD_LOG_WARN,
"Access control entry \"%s\" not a valid user name; "
"entry ignored", name);
}
if (!uuid_compare(usr_uuid, usr2_uuid))
break;
}
#else
else if (!_cups_strcasecmp(username, name))
break;
#endif /* HAVE_MBR_UID_TO_UUID */
if ((name != NULL) == p->deny_users)
{
cupsdLogMessage(CUPSD_LOG_INFO,
"Denying user \"%s\" access to printer \"%s\"...",
username, p->name);
return (0);
}
}
/*
* Check quotas...
*/
if (p->k_limit || p->page_limit)
{
if ((q = cupsdUpdateQuota(p, username, 0, 0)) == NULL)
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"Unable to allocate quota data for user \"%s\"",
username);
return (-1);
}
if ((q->k_count >= p->k_limit && p->k_limit) ||
(q->page_count >= p->page_limit && p->page_limit))
{
cupsdLogMessage(CUPSD_LOG_INFO, "User \"%s\" is over the quota limit...",
username);
return (-1);
}
}
/*
* If we have gotten this far, we're done!
*/
return (1);
}
|
C
|
cups
| 0 |
CVE-2013-2908
|
https://www.cvedetails.com/cve/CVE-2013-2908/
| null |
https://github.com/chromium/chromium/commit/7edf2c655761e7505950013e62c89e3bd2f7e6dc
|
7edf2c655761e7505950013e62c89e3bd2f7e6dc
|
Call didAccessInitialDocument when javascript: URLs are used.
BUG=265221
TEST=See bug for repro.
Review URL: https://chromiumcodereview.appspot.com/22572004
git-svn-id: svn://svn.chromium.org/blink/trunk@155790 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
ScriptValue ScriptController::callFunctionEvenIfScriptDisabled(v8::Handle<v8::Function> function, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value> argv[])
{
return ScriptValue(callFunction(function, receiver, argc, argv));
}
|
ScriptValue ScriptController::callFunctionEvenIfScriptDisabled(v8::Handle<v8::Function> function, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value> argv[])
{
return ScriptValue(callFunction(function, receiver, argc, argv));
}
|
C
|
Chrome
| 0 |
CVE-2019-14980
|
https://www.cvedetails.com/cve/CVE-2019-14980/
|
CWE-416
|
https://github.com/ImageMagick/ImageMagick6/commit/614a257295bdcdeda347086761062ac7658b6830
|
614a257295bdcdeda347086761062ac7658b6830
|
https://github.com/ImageMagick/ImageMagick6/issues/43
|
MagickExport float ReadBlobFloat(Image *image)
{
union
{
unsigned int
unsigned_value;
float
float_value;
} quantum;
quantum.float_value=0.0;
quantum.unsigned_value=ReadBlobLong(image);
return(quantum.float_value);
}
|
MagickExport float ReadBlobFloat(Image *image)
{
union
{
unsigned int
unsigned_value;
float
float_value;
} quantum;
quantum.float_value=0.0;
quantum.unsigned_value=ReadBlobLong(image);
return(quantum.float_value);
}
|
C
|
ImageMagick6
| 0 |
CVE-2016-5194
| null | null |
https://github.com/chromium/chromium/commit/d4e0a7273cd8d7a9ee667ad5b5c8aad0f5f59251
|
d4e0a7273cd8d7a9ee667ad5b5c8aad0f5f59251
|
Clear Shill stub config in offline file manager tests
The Shill stub client fakes ethernet and wifi connections during
testing. Clear its config during offline tests to simulate a lack of
network connectivity.
As a side effect, fileManagerPrivate.getDriveConnectionState will no
longer need to be stubbed out, as it will now think the device is
offline and return the appropriate result.
Bug: 925272
Change-Id: Idd6cb44325cfde4991d3b1e64185a28e8655c733
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578149
Commit-Queue: Austin Tankiang <[email protected]>
Reviewed-by: Sam McNally <[email protected]>
Cr-Commit-Position: refs/heads/master@{#654782}
|
base::FilePath GetTargetPathForTestEntry(
const AddEntriesMessage::TestEntryInfo& entry) {
const base::FilePath target_path =
GetTargetBasePathForTestEntry(entry).Append(entry.target_path);
if (entry.name_text != entry.target_path)
return target_path.DirName().Append(entry.name_text);
return target_path;
}
|
base::FilePath GetTargetPathForTestEntry(
const AddEntriesMessage::TestEntryInfo& entry) {
const base::FilePath target_path =
GetTargetBasePathForTestEntry(entry).Append(entry.target_path);
if (entry.name_text != entry.target_path)
return target_path.DirName().Append(entry.name_text);
return target_path;
}
|
C
|
Chrome
| 0 |
CVE-2018-18352
|
https://www.cvedetails.com/cve/CVE-2018-18352/
|
CWE-732
|
https://github.com/chromium/chromium/commit/a9cbaa7a40e2b2723cfc2f266c42f4980038a949
|
a9cbaa7a40e2b2723cfc2f266c42f4980038a949
|
Simplify "WouldTaintOrigin" concept in media/blink
Currently WebMediaPlayer has three predicates:
- DidGetOpaqueResponseFromServiceWorker
- HasSingleSecurityOrigin
- DidPassCORSAccessCheck
. These are used to determine whether the response body is available
for scripts. They are known to be confusing, and actually
MediaElementAudioSourceHandler::WouldTaintOrigin misuses them.
This CL merges the three predicates to one, WouldTaintOrigin, to remove
the confusion. Now the "response type" concept is available and we
don't need a custom CORS check, so this CL removes
BaseAudioContext::WouldTaintOrigin. This CL also renames
URLData::has_opaque_data_ and its (direct and indirect) data accessors
to match the spec.
Bug: 849942, 875153
Change-Id: I6acf50169d7445c4ff614e80ac606f79ee577d2a
Reviewed-on: https://chromium-review.googlesource.com/c/1238098
Reviewed-by: Fredrik Hubinette <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Raymond Toy <[email protected]>
Commit-Queue: Yutaka Hirano <[email protected]>
Cr-Commit-Position: refs/heads/master@{#598258}
|
int64_t ResourceMultiBufferDataProvider::AvailableBytes() const {
int64_t bytes = 0;
for (const auto i : fifo_) {
if (i->end_of_stream())
break;
bytes += i->data_size();
}
return bytes;
}
|
int64_t ResourceMultiBufferDataProvider::AvailableBytes() const {
int64_t bytes = 0;
for (const auto i : fifo_) {
if (i->end_of_stream())
break;
bytes += i->data_size();
}
return bytes;
}
|
C
|
Chrome
| 0 |
CVE-2018-13006
|
https://www.cvedetails.com/cve/CVE-2018-13006/
|
CWE-125
|
https://github.com/gpac/gpac/commit/bceb03fd2be95097a7b409ea59914f332fb6bc86
|
bceb03fd2be95097a7b409ea59914f332fb6bc86
|
fixed 2 possible heap overflows (inc. #1088)
|
void audio_sample_entry_del(GF_Box *s)
{
GF_MPEGAudioSampleEntryBox *ptr = (GF_MPEGAudioSampleEntryBox *)s;
if (ptr == NULL) return;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)s);
if (ptr->esd) gf_isom_box_del((GF_Box *)ptr->esd);
if (ptr->slc) gf_odf_desc_del((GF_Descriptor *)ptr->slc);
if (ptr->cfg_ac3) gf_isom_box_del((GF_Box *)ptr->cfg_ac3);
if (ptr->cfg_3gpp) gf_isom_box_del((GF_Box *)ptr->cfg_3gpp);
gf_free(ptr);
}
|
void audio_sample_entry_del(GF_Box *s)
{
GF_MPEGAudioSampleEntryBox *ptr = (GF_MPEGAudioSampleEntryBox *)s;
if (ptr == NULL) return;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)s);
if (ptr->esd) gf_isom_box_del((GF_Box *)ptr->esd);
if (ptr->slc) gf_odf_desc_del((GF_Descriptor *)ptr->slc);
if (ptr->cfg_ac3) gf_isom_box_del((GF_Box *)ptr->cfg_ac3);
if (ptr->cfg_3gpp) gf_isom_box_del((GF_Box *)ptr->cfg_3gpp);
gf_free(ptr);
}
|
C
|
gpac
| 0 |
CVE-2016-3751
|
https://www.cvedetails.com/cve/CVE-2016-3751/
| null |
https://android.googlesource.com/platform/external/libpng/+/9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
DO NOT MERGE Update libpng to 1.6.20
BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082024b669fa508931042eed18f82)
|
static int fail(png_modifier *pm)
{
return !pm->log && !pm->this.verbose && (pm->this.nerrors > 0 ||
(pm->this.treat_warnings_as_errors && pm->this.nwarnings > 0));
}
|
static int fail(png_modifier *pm)
{
return !pm->log && !pm->this.verbose && (pm->this.nerrors > 0 ||
(pm->this.treat_warnings_as_errors && pm->this.nwarnings > 0));
}
|
C
|
Android
| 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 u8 count_vectors(void *bitmap)
{
int vec;
u32 *reg;
u8 count = 0;
for (vec = 0; vec < MAX_APIC_VECTOR; vec += APIC_VECTORS_PER_REG) {
reg = bitmap + REG_POS(vec);
count += hweight32(*reg);
}
return count;
}
|
static u8 count_vectors(void *bitmap)
{
int vec;
u32 *reg;
u8 count = 0;
for (vec = 0; vec < MAX_APIC_VECTOR; vec += APIC_VECTORS_PER_REG) {
reg = bitmap + REG_POS(vec);
count += hweight32(*reg);
}
return count;
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/4da7eefcaad044a6f919947a2a0e3d4fed87834c
|
4da7eefcaad044a6f919947a2a0e3d4fed87834c
|
[Qt] Remove QOpenGL specific code from GraphicsSurfaceGLX.
https://bugs.webkit.org/show_bug.cgi?id=100492
This patch removes most of the QOpenGLContext related code
from GraphicsSurfaceGLX. This allows sharing almost all
GraphicsSurfaceGLX code with EFL, by relying on pure GLX.
Patch by Zeno Albisser <[email protected]> on 2012-10-26
Reviewed by Kenneth Rohde Christiansen.
* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::OffScreenRootWindow::get):
(WebCore::OffScreenRootWindow::~OffScreenRootWindow):
(OffScreenRootWindow):
(WebCore):
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createSurface):
(WebCore::GraphicsSurfacePrivate::makeCurrent):
(WebCore::GraphicsSurfacePrivate::doneCurrent):
(WebCore::GraphicsSurfacePrivate::swapBuffers):
(WebCore::GraphicsSurfacePrivate::copyFromTexture):
(GraphicsSurfacePrivate):
(WebCore::resolveGLMethods):
git-svn-id: svn://svn.chromium.org/blink/trunk@132628 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void swapBuffers()
{
if (m_xPixmap)
return;
GLXContext glContext = glXGetCurrentContext();
if (m_surface && glContext) {
GLint oldFBO;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldFBO);
pGlBindFramebuffer(GL_FRAMEBUFFER, 0);
glXSwapBuffers(m_display, m_surface);
pGlBindFramebuffer(GL_FRAMEBUFFER, oldFBO);
}
}
|
void swapBuffers()
{
if (m_xPixmap)
return;
#if PLATFORM(QT)
if (!m_surface->isVisible())
return;
while (!m_surface->isExposed())
QCoreApplication::processEvents();
QOpenGLContext* glContext = QOpenGLContext::currentContext();
if (m_surface && glContext) {
GLint oldFBO;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldFBO);
pGlBindFramebuffer(GL_FRAMEBUFFER, glContext->defaultFramebufferObject());
glContext->swapBuffers(m_surface.get());
pGlBindFramebuffer(GL_FRAMEBUFFER, oldFBO);
}
#elif PLATFORM(EFL)
GLXContext glContext = glXGetCurrentContext();
if (m_surface && glContext) {
GLint oldFBO;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldFBO);
pGlBindFramebuffer(GL_FRAMEBUFFER, 0);
glXSwapBuffers(m_display, m_surface);
pGlBindFramebuffer(GL_FRAMEBUFFER, oldFBO);
}
#endif
}
|
C
|
Chrome
| 1 |
CVE-2011-3105
|
https://www.cvedetails.com/cve/CVE-2011-3105/
|
CWE-399
|
https://github.com/chromium/chromium/commit/d6cc2749d2f90acc2d92a526c1d2cbebbc101a19
|
d6cc2749d2f90acc2d92a526c1d2cbebbc101a19
|
sync: remove Chrome OS specific logic to deal with flimflam shutdown / sync race.
No longer necessary as the ProfileSyncService now aborts sync network traffic on shutdown.
BUG=chromium-os:20841
Review URL: http://codereview.chromium.org/9358007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120912 0039d316-1c4b-4281-b951-d872f2087c98
|
void SyncManager::RefreshNigori(const base::Closure& done_callback) {
DCHECK(thread_checker_.CalledOnValidThread());
data_->UpdateCryptographerAndNigori(base::Bind(
&SyncManager::DoneRefreshNigori,
base::Unretained(this),
done_callback));
}
|
void SyncManager::RefreshNigori(const base::Closure& done_callback) {
DCHECK(thread_checker_.CalledOnValidThread());
data_->UpdateCryptographerAndNigori(base::Bind(
&SyncManager::DoneRefreshNigori,
base::Unretained(this),
done_callback));
}
|
C
|
Chrome
| 0 |
CVE-2018-1000050
|
https://www.cvedetails.com/cve/CVE-2018-1000050/
|
CWE-119
|
https://github.com/nothings/stb/commit/244d83bc3d859293f55812d48b3db168e581f6ab
|
244d83bc3d859293f55812d48b3db168e581f6ab
|
fix unchecked length in stb_vorbis that could crash on corrupt/invalid files
|
int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts)
{
float **outputs;
int len = num_shorts / channels;
int n=0;
int z = f->channels;
if (z > channels) z = channels;
while (n < len) {
int k = f->channel_buffer_end - f->channel_buffer_start;
if (n+k >= len) k = len - n;
if (k)
convert_channels_short_interleaved(channels, buffer, f->channels, f->channel_buffers, f->channel_buffer_start, k);
buffer += k*channels;
n += k;
f->channel_buffer_start += k;
if (n == len) break;
if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break;
}
return n;
}
|
int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts)
{
float **outputs;
int len = num_shorts / channels;
int n=0;
int z = f->channels;
if (z > channels) z = channels;
while (n < len) {
int k = f->channel_buffer_end - f->channel_buffer_start;
if (n+k >= len) k = len - n;
if (k)
convert_channels_short_interleaved(channels, buffer, f->channels, f->channel_buffers, f->channel_buffer_start, k);
buffer += k*channels;
n += k;
f->channel_buffer_start += k;
if (n == len) break;
if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break;
}
return n;
}
|
C
|
stb
| 0 |
CVE-2016-3751
|
https://www.cvedetails.com/cve/CVE-2016-3751/
| null |
https://android.googlesource.com/platform/external/libpng/+/9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
DO NOT MERGE Update libpng to 1.6.20
BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082024b669fa508931042eed18f82)
|
int writepng_encode_finish(mainprog_info *mainprog_ptr) /* NON-interlaced! */
{
png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr;
png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr;
/* as always, setjmp() must be called in every function that calls a
* PNG-writing libpng function */
if (setjmp(mainprog_ptr->jmpbuf)) {
png_destroy_write_struct(&png_ptr, &info_ptr);
mainprog_ptr->png_ptr = NULL;
mainprog_ptr->info_ptr = NULL;
return 2;
}
/* close out PNG file; if we had any text or time info to write after
* the IDATs, second argument would be info_ptr: */
png_write_end(png_ptr, NULL);
return 0;
}
|
int writepng_encode_finish(mainprog_info *mainprog_ptr) /* NON-interlaced! */
{
png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr;
png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr;
/* as always, setjmp() must be called in every function that calls a
* PNG-writing libpng function */
if (setjmp(mainprog_ptr->jmpbuf)) {
png_destroy_write_struct(&png_ptr, &info_ptr);
mainprog_ptr->png_ptr = NULL;
mainprog_ptr->info_ptr = NULL;
return 2;
}
/* close out PNG file; if we had any text or time info to write after
* the IDATs, second argument would be info_ptr: */
png_write_end(png_ptr, NULL);
return 0;
}
|
C
|
Android
| 0 |
CVE-2011-2875
|
https://www.cvedetails.com/cve/CVE-2011-2875/
|
CWE-20
|
https://github.com/chromium/chromium/commit/ab5e55ff333def909d025ac45da9ffa0d88a63f2
|
ab5e55ff333def909d025ac45da9ffa0d88a63f2
|
Unreviewed, rolling out r127612, r127660, and r127664.
http://trac.webkit.org/changeset/127612
http://trac.webkit.org/changeset/127660
http://trac.webkit.org/changeset/127664
https://bugs.webkit.org/show_bug.cgi?id=95920
Source/Platform:
* Platform.gypi:
* chromium/public/WebRTCPeerConnectionHandler.h:
(WebKit):
(WebRTCPeerConnectionHandler):
* chromium/public/WebRTCVoidRequest.h: Removed.
Source/WebCore:
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/RTCErrorCallback.h:
(WebCore):
(RTCErrorCallback):
* Modules/mediastream/RTCErrorCallback.idl:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createOffer):
* Modules/mediastream/RTCPeerConnection.h:
(WebCore):
(RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.h:
(WebCore):
(RTCSessionDescriptionCallback):
* Modules/mediastream/RTCSessionDescriptionCallback.idl:
* Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
(WebCore::RTCSessionDescriptionRequestImpl::create):
(WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
(WebCore::RTCSessionDescriptionRequestImpl::requestSucceeded):
(WebCore::RTCSessionDescriptionRequestImpl::requestFailed):
(WebCore::RTCSessionDescriptionRequestImpl::clear):
* Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
(RTCSessionDescriptionRequestImpl):
* Modules/mediastream/RTCVoidRequestImpl.cpp: Removed.
* Modules/mediastream/RTCVoidRequestImpl.h: Removed.
* WebCore.gypi:
* platform/chromium/support/WebRTCVoidRequest.cpp: Removed.
* platform/mediastream/RTCPeerConnectionHandler.cpp:
(RTCPeerConnectionHandlerDummy):
(WebCore::RTCPeerConnectionHandlerDummy::RTCPeerConnectionHandlerDummy):
* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore):
(WebCore::RTCPeerConnectionHandler::~RTCPeerConnectionHandler):
(RTCPeerConnectionHandler):
(WebCore::RTCPeerConnectionHandler::RTCPeerConnectionHandler):
* platform/mediastream/RTCVoidRequest.h: Removed.
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
(RTCPeerConnectionHandlerChromium):
Tools:
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::SuccessCallbackTask::SuccessCallbackTask):
(MockWebRTCPeerConnectionHandler::SuccessCallbackTask::runIfValid):
(MockWebRTCPeerConnectionHandler::FailureCallbackTask::FailureCallbackTask):
(MockWebRTCPeerConnectionHandler::FailureCallbackTask::runIfValid):
(MockWebRTCPeerConnectionHandler::createOffer):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
(MockWebRTCPeerConnectionHandler):
(SuccessCallbackTask):
(FailureCallbackTask):
LayoutTests:
* fast/mediastream/RTCPeerConnection-createOffer.html:
* fast/mediastream/RTCPeerConnection-localDescription-expected.txt: Removed.
* fast/mediastream/RTCPeerConnection-localDescription.html: Removed.
* fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt: Removed.
* fast/mediastream/RTCPeerConnection-remoteDescription.html: Removed.
git-svn-id: svn://svn.chromium.org/blink/trunk@127679 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void WebRTCVoidRequest::setExtraData(ExtraData* extraData)
{
m_private->setExtraData(adoptRef(new ExtraDataContainer(extraData)));
}
|
void WebRTCVoidRequest::setExtraData(ExtraData* extraData)
{
m_private->setExtraData(adoptRef(new ExtraDataContainer(extraData)));
}
|
C
|
Chrome
| 0 |
CVE-2019-9578
|
https://www.cvedetails.com/cve/CVE-2019-9578/
|
CWE-119
|
https://github.com/Yubico/libu2f-host/commit/e4bb58cc8b6202a421e65f8230217d8ae6e16eb5
|
e4bb58cc8b6202a421e65f8230217d8ae6e16eb5
|
fix filling out of initresp
|
obtain_nonce(unsigned char* nonce)
{
int fd = -1;
int ok = -1;
ssize_t r;
if ((fd = open("/dev/urandom", O_RDONLY)) < 0)
goto fail;
if ((r = read(fd, nonce, 8)) < 0 || r != 8)
goto fail;
ok = 0;
fail:
if (fd != -1)
close(fd);
return (ok);
}
|
obtain_nonce(unsigned char* nonce)
{
int fd = -1;
int ok = -1;
ssize_t r;
if ((fd = open("/dev/urandom", O_RDONLY)) < 0)
goto fail;
if ((r = read(fd, nonce, 8)) < 0 || r != 8)
goto fail;
ok = 0;
fail:
if (fd != -1)
close(fd);
return (ok);
}
|
C
|
libu2f-host
| 0 |
CVE-2015-6780
|
https://www.cvedetails.com/cve/CVE-2015-6780/
| null |
https://github.com/chromium/chromium/commit/f2cba0d13b3a6d76dedede66731e5ca253d3b2af
|
f2cba0d13b3a6d76dedede66731e5ca253d3b2af
|
Fix UAF in Origin Info Bubble and permission settings UI.
In addition to fixing the UAF, will this also fix the problem of the bubble
showing over the previous tab (if the bubble is open when the tab it was opened
for closes).
BUG=490492
TBR=tedchoc
Review URL: https://codereview.chromium.org/1317443002
Cr-Commit-Position: refs/heads/master@{#346023}
|
WebsiteSettings::SiteIdentityStatus GetSiteIdentityStatusByCTInfo(
const content::SignedCertificateTimestampIDStatusList& scts,
bool is_ev) {
if (CertificateTransparencyStatusMatch(scts, net::ct::SCT_STATUS_INVALID))
return WebsiteSettings::SITE_IDENTITY_STATUS_ERROR;
return is_ev ? WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT
: WebsiteSettings::SITE_IDENTITY_STATUS_CERT;
}
|
WebsiteSettings::SiteIdentityStatus GetSiteIdentityStatusByCTInfo(
const content::SignedCertificateTimestampIDStatusList& scts,
bool is_ev) {
if (CertificateTransparencyStatusMatch(scts, net::ct::SCT_STATUS_INVALID))
return WebsiteSettings::SITE_IDENTITY_STATUS_ERROR;
return is_ev ? WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT
: WebsiteSettings::SITE_IDENTITY_STATUS_CERT;
}
|
C
|
Chrome
| 0 |
CVE-2019-17178
|
https://www.cvedetails.com/cve/CVE-2019-17178/
|
CWE-772
|
https://github.com/akallabeth/FreeRDP/commit/fc80ab45621bd966f70594c0b7393ec005a94007
|
fc80ab45621bd966f70594c0b7393ec005a94007
|
Fixed #5645: realloc return handling
|
static void LodePNGText_cleanup(LodePNGInfo* info)
{
size_t i;
for(i = 0; i < info->text_num; i++)
{
string_cleanup(&info->text_keys[i]);
string_cleanup(&info->text_strings[i]);
}
free(info->text_keys);
free(info->text_strings);
}
|
static void LodePNGText_cleanup(LodePNGInfo* info)
{
size_t i;
for(i = 0; i < info->text_num; i++)
{
string_cleanup(&info->text_keys[i]);
string_cleanup(&info->text_strings[i]);
}
free(info->text_keys);
free(info->text_strings);
}
|
C
|
FreeRDP
| 0 |
CVE-2013-4516
|
https://www.cvedetails.com/cve/CVE-2013-4516/
|
CWE-200
|
https://github.com/torvalds/linux/commit/a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
|
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
|
Staging: sb105x: info leak in mp_get_count()
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.
Reported-by: Nico Golde <[email protected]>
Reported-by: Fabian Yamaguchi <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
|
static void serial_unlink_irq_chain(struct mp_port *mtpt)
{
struct irq_info *i = irq_lists + mtpt->port.irq;
if (list_empty(i->head))
{
free_irq(mtpt->port.irq, i);
}
serial_do_unlink(i, mtpt);
}
|
static void serial_unlink_irq_chain(struct mp_port *mtpt)
{
struct irq_info *i = irq_lists + mtpt->port.irq;
if (list_empty(i->head))
{
free_irq(mtpt->port.irq, i);
}
serial_do_unlink(i, mtpt);
}
|
C
|
linux
| 0 |
CVE-2010-1152
|
https://www.cvedetails.com/cve/CVE-2010-1152/
|
CWE-20
|
https://github.com/memcached/memcached/commit/d9cd01ede97f4145af9781d448c62a3318952719
|
d9cd01ede97f4145af9781d448c62a3318952719
|
Use strncmp when checking for large ascii multigets.
|
static int add_msghdr(conn *c)
{
struct msghdr *msg;
assert(c != NULL);
if (c->msgsize == c->msgused) {
msg = realloc(c->msglist, c->msgsize * 2 * sizeof(struct msghdr));
if (! msg)
return -1;
c->msglist = msg;
c->msgsize *= 2;
}
msg = c->msglist + c->msgused;
/* this wipes msg_iovlen, msg_control, msg_controllen, and
msg_flags, the last 3 of which aren't defined on solaris: */
memset(msg, 0, sizeof(struct msghdr));
msg->msg_iov = &c->iov[c->iovused];
if (c->request_addr_size > 0) {
msg->msg_name = &c->request_addr;
msg->msg_namelen = c->request_addr_size;
}
c->msgbytes = 0;
c->msgused++;
if (IS_UDP(c->transport)) {
/* Leave room for the UDP header, which we'll fill in later. */
return add_iov(c, NULL, UDP_HEADER_SIZE);
}
return 0;
}
|
static int add_msghdr(conn *c)
{
struct msghdr *msg;
assert(c != NULL);
if (c->msgsize == c->msgused) {
msg = realloc(c->msglist, c->msgsize * 2 * sizeof(struct msghdr));
if (! msg)
return -1;
c->msglist = msg;
c->msgsize *= 2;
}
msg = c->msglist + c->msgused;
/* this wipes msg_iovlen, msg_control, msg_controllen, and
msg_flags, the last 3 of which aren't defined on solaris: */
memset(msg, 0, sizeof(struct msghdr));
msg->msg_iov = &c->iov[c->iovused];
if (c->request_addr_size > 0) {
msg->msg_name = &c->request_addr;
msg->msg_namelen = c->request_addr_size;
}
c->msgbytes = 0;
c->msgused++;
if (IS_UDP(c->transport)) {
/* Leave room for the UDP header, which we'll fill in later. */
return add_iov(c, NULL, UDP_HEADER_SIZE);
}
return 0;
}
|
C
|
memcached
| 0 |
CVE-2011-1927
|
https://www.cvedetails.com/cve/CVE-2011-1927/
| null |
https://github.com/torvalds/linux/commit/64f3b9e203bd06855072e295557dca1485a2ecba
|
64f3b9e203bd06855072e295557dca1485a2ecba
|
net: ip_expire() must revalidate route
Commit 4a94445c9a5c (net: Use ip_route_input_noref() in input path)
added a bug in IP defragmentation handling, in case timeout is fired.
When a frame is defragmented, we use last skb dst field when building
final skb. Its dst is valid, since we are in rcu read section.
But if a timeout occurs, we take first queued fragment to build one ICMP
TIME EXCEEDED message. Problem is all queued skb have weak dst pointers,
since we escaped RCU critical section after their queueing. icmp_send()
might dereference a now freed (and possibly reused) part of memory.
Calling skb_dst_drop() and ip_route_input_noref() to revalidate route is
the only possible choice.
Reported-by: Denys Fedoryshchenko <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int ip4_frag_match(struct inet_frag_queue *q, void *a)
{
struct ipq *qp;
struct ip4_create_arg *arg = a;
qp = container_of(q, struct ipq, q);
return qp->id == arg->iph->id &&
qp->saddr == arg->iph->saddr &&
qp->daddr == arg->iph->daddr &&
qp->protocol == arg->iph->protocol &&
qp->user == arg->user;
}
|
static int ip4_frag_match(struct inet_frag_queue *q, void *a)
{
struct ipq *qp;
struct ip4_create_arg *arg = a;
qp = container_of(q, struct ipq, q);
return qp->id == arg->iph->id &&
qp->saddr == arg->iph->saddr &&
qp->daddr == arg->iph->daddr &&
qp->protocol == arg->iph->protocol &&
qp->user == arg->user;
}
|
C
|
linux
| 0 |
CVE-2017-7495
|
https://www.cvedetails.com/cve/CVE-2017-7495/
|
CWE-200
|
https://github.com/torvalds/linux/commit/06bd3c36a733ac27962fea7d6f47168841376824
|
06bd3c36a733ac27962fea7d6f47168841376824
|
ext4: fix data exposure after a crash
Huang has reported that in his powerfail testing he is seeing stale
block contents in some of recently allocated blocks although he mounts
ext4 in data=ordered mode. After some investigation I have found out
that indeed when delayed allocation is used, we don't add inode to
transaction's list of inodes needing flushing before commit. Originally
we were doing that but commit f3b59291a69d removed the logic with a
flawed argument that it is not needed.
The problem is that although for delayed allocated blocks we write their
contents immediately after allocating them, there is no guarantee that
the IO scheduler or device doesn't reorder things and thus transaction
allocating blocks and attaching them to inode can reach stable storage
before actual block contents. Actually whenever we attach freshly
allocated blocks to inode using a written extent, we should add inode to
transaction's ordered inode list to make sure we properly wait for block
contents to be written before committing the transaction. So that is
what we do in this patch. This also handles other cases where stale data
exposure was possible - like filling hole via mmap in
data=ordered,nodelalloc mode.
The only exception to the above rule are extending direct IO writes where
blkdev_direct_IO() waits for IO to complete before increasing i_size and
thus stale data exposure is not possible. For now we don't complicate
the code with optimizing this special case since the overhead is pretty
low. In case this is observed to be a performance problem we can always
handle it using a special flag to ext4_map_blocks().
CC: [email protected]
Fixes: f3b59291a69d0b734be1fc8be489fef2dd846d3d
Reported-by: "HUANG Weller (CM/ESW12-CN)" <[email protected]>
Tested-by: "HUANG Weller (CM/ESW12-CN)" <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
|
int ext4_get_projid(struct inode *inode, kprojid_t *projid)
{
if (!EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb, EXT4_FEATURE_RO_COMPAT_PROJECT))
return -EOPNOTSUPP;
*projid = EXT4_I(inode)->i_projid;
return 0;
}
|
int ext4_get_projid(struct inode *inode, kprojid_t *projid)
{
if (!EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb, EXT4_FEATURE_RO_COMPAT_PROJECT))
return -EOPNOTSUPP;
*projid = EXT4_I(inode)->i_projid;
return 0;
}
|
C
|
linux
| 0 |
CVE-2017-7866
|
https://www.cvedetails.com/cve/CVE-2017-7866/
|
CWE-787
|
https://github.com/FFmpeg/FFmpeg/commit/e371f031b942d73e02c090170975561fabd5c264
|
e371f031b942d73e02c090170975561fabd5c264
|
avcodec/pngdec: Fix off by 1 size in decode_zbuf()
Fixes out of array access
Fixes: 444/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_PNG_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,
AVFrame *p, AVPacket *avpkt)
{
AVDictionary *metadata = NULL;
uint32_t tag, length;
int decode_next_dat = 0;
int ret;
for (;;) {
length = bytestream2_get_bytes_left(&s->gb);
if (length <= 0) {
if (avctx->codec_id == AV_CODEC_ID_PNG &&
avctx->skip_frame == AVDISCARD_ALL) {
av_frame_set_metadata(p, metadata);
return 0;
}
if (CONFIG_APNG_DECODER && avctx->codec_id == AV_CODEC_ID_APNG && length == 0) {
if (!(s->state & PNG_IDAT))
return 0;
else
goto exit_loop;
}
av_log(avctx, AV_LOG_ERROR, "%d bytes left\n", length);
if ( s->state & PNG_ALLIMAGE
&& avctx->strict_std_compliance <= FF_COMPLIANCE_NORMAL)
goto exit_loop;
ret = AVERROR_INVALIDDATA;
goto fail;
}
length = bytestream2_get_be32(&s->gb);
if (length > 0x7fffffff || length > bytestream2_get_bytes_left(&s->gb)) {
av_log(avctx, AV_LOG_ERROR, "chunk too big\n");
ret = AVERROR_INVALIDDATA;
goto fail;
}
tag = bytestream2_get_le32(&s->gb);
if (avctx->debug & FF_DEBUG_STARTCODE)
av_log(avctx, AV_LOG_DEBUG, "png: tag=%c%c%c%c length=%u\n",
(tag & 0xff),
((tag >> 8) & 0xff),
((tag >> 16) & 0xff),
((tag >> 24) & 0xff), length);
if (avctx->codec_id == AV_CODEC_ID_PNG &&
avctx->skip_frame == AVDISCARD_ALL) {
switch(tag) {
case MKTAG('I', 'H', 'D', 'R'):
case MKTAG('p', 'H', 'Y', 's'):
case MKTAG('t', 'E', 'X', 't'):
case MKTAG('I', 'D', 'A', 'T'):
case MKTAG('t', 'R', 'N', 'S'):
break;
default:
goto skip_tag;
}
}
switch (tag) {
case MKTAG('I', 'H', 'D', 'R'):
if ((ret = decode_ihdr_chunk(avctx, s, length)) < 0)
goto fail;
break;
case MKTAG('p', 'H', 'Y', 's'):
if ((ret = decode_phys_chunk(avctx, s)) < 0)
goto fail;
break;
case MKTAG('f', 'c', 'T', 'L'):
if (!CONFIG_APNG_DECODER || avctx->codec_id != AV_CODEC_ID_APNG)
goto skip_tag;
if ((ret = decode_fctl_chunk(avctx, s, length)) < 0)
goto fail;
decode_next_dat = 1;
break;
case MKTAG('f', 'd', 'A', 'T'):
if (!CONFIG_APNG_DECODER || avctx->codec_id != AV_CODEC_ID_APNG)
goto skip_tag;
if (!decode_next_dat) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
bytestream2_get_be32(&s->gb);
length -= 4;
/* fallthrough */
case MKTAG('I', 'D', 'A', 'T'):
if (CONFIG_APNG_DECODER && avctx->codec_id == AV_CODEC_ID_APNG && !decode_next_dat)
goto skip_tag;
if ((ret = decode_idat_chunk(avctx, s, length, p)) < 0)
goto fail;
break;
case MKTAG('P', 'L', 'T', 'E'):
if (decode_plte_chunk(avctx, s, length) < 0)
goto skip_tag;
break;
case MKTAG('t', 'R', 'N', 'S'):
if (decode_trns_chunk(avctx, s, length) < 0)
goto skip_tag;
break;
case MKTAG('t', 'E', 'X', 't'):
if (decode_text_chunk(s, length, 0, &metadata) < 0)
av_log(avctx, AV_LOG_WARNING, "Broken tEXt chunk\n");
bytestream2_skip(&s->gb, length + 4);
break;
case MKTAG('z', 'T', 'X', 't'):
if (decode_text_chunk(s, length, 1, &metadata) < 0)
av_log(avctx, AV_LOG_WARNING, "Broken zTXt chunk\n");
bytestream2_skip(&s->gb, length + 4);
break;
case MKTAG('s', 'T', 'E', 'R'): {
int mode = bytestream2_get_byte(&s->gb);
AVStereo3D *stereo3d = av_stereo3d_create_side_data(p);
if (!stereo3d)
goto fail;
if (mode == 0 || mode == 1) {
stereo3d->type = AV_STEREO3D_SIDEBYSIDE;
stereo3d->flags = mode ? 0 : AV_STEREO3D_FLAG_INVERT;
} else {
av_log(avctx, AV_LOG_WARNING,
"Unknown value in sTER chunk (%d)\n", mode);
}
bytestream2_skip(&s->gb, 4); /* crc */
break;
}
case MKTAG('I', 'E', 'N', 'D'):
if (!(s->state & PNG_ALLIMAGE))
av_log(avctx, AV_LOG_ERROR, "IEND without all image\n");
if (!(s->state & (PNG_ALLIMAGE|PNG_IDAT))) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
bytestream2_skip(&s->gb, 4); /* crc */
goto exit_loop;
default:
/* skip tag */
skip_tag:
bytestream2_skip(&s->gb, length + 4);
break;
}
}
exit_loop:
if (avctx->codec_id == AV_CODEC_ID_PNG &&
avctx->skip_frame == AVDISCARD_ALL) {
av_frame_set_metadata(p, metadata);
return 0;
}
if (s->bits_per_pixel <= 4)
handle_small_bpp(s, p);
/* apply transparency if needed */
if (s->has_trns && s->color_type != PNG_COLOR_TYPE_PALETTE) {
size_t byte_depth = s->bit_depth > 8 ? 2 : 1;
size_t raw_bpp = s->bpp - byte_depth;
unsigned x, y;
for (y = 0; y < s->height; ++y) {
uint8_t *row = &s->image_buf[s->image_linesize * y];
/* since we're updating in-place, we have to go from right to left */
for (x = s->width; x > 0; --x) {
uint8_t *pixel = &row[s->bpp * (x - 1)];
memmove(pixel, &row[raw_bpp * (x - 1)], raw_bpp);
if (!memcmp(pixel, s->transparent_color_be, raw_bpp)) {
memset(&pixel[raw_bpp], 0, byte_depth);
} else {
memset(&pixel[raw_bpp], 0xff, byte_depth);
}
}
}
}
/* handle P-frames only if a predecessor frame is available */
if (s->last_picture.f->data[0]) {
if ( !(avpkt->flags & AV_PKT_FLAG_KEY) && avctx->codec_tag != AV_RL32("MPNG")
&& s->last_picture.f->width == p->width
&& s->last_picture.f->height== p->height
&& s->last_picture.f->format== p->format
) {
if (CONFIG_PNG_DECODER && avctx->codec_id != AV_CODEC_ID_APNG)
handle_p_frame_png(s, p);
else if (CONFIG_APNG_DECODER &&
avctx->codec_id == AV_CODEC_ID_APNG &&
(ret = handle_p_frame_apng(avctx, s, p)) < 0)
goto fail;
}
}
ff_thread_report_progress(&s->picture, INT_MAX, 0);
ff_thread_report_progress(&s->previous_picture, INT_MAX, 0);
av_frame_set_metadata(p, metadata);
metadata = NULL;
return 0;
fail:
av_dict_free(&metadata);
ff_thread_report_progress(&s->picture, INT_MAX, 0);
ff_thread_report_progress(&s->previous_picture, INT_MAX, 0);
return ret;
}
|
static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,
AVFrame *p, AVPacket *avpkt)
{
AVDictionary *metadata = NULL;
uint32_t tag, length;
int decode_next_dat = 0;
int ret;
for (;;) {
length = bytestream2_get_bytes_left(&s->gb);
if (length <= 0) {
if (avctx->codec_id == AV_CODEC_ID_PNG &&
avctx->skip_frame == AVDISCARD_ALL) {
av_frame_set_metadata(p, metadata);
return 0;
}
if (CONFIG_APNG_DECODER && avctx->codec_id == AV_CODEC_ID_APNG && length == 0) {
if (!(s->state & PNG_IDAT))
return 0;
else
goto exit_loop;
}
av_log(avctx, AV_LOG_ERROR, "%d bytes left\n", length);
if ( s->state & PNG_ALLIMAGE
&& avctx->strict_std_compliance <= FF_COMPLIANCE_NORMAL)
goto exit_loop;
ret = AVERROR_INVALIDDATA;
goto fail;
}
length = bytestream2_get_be32(&s->gb);
if (length > 0x7fffffff || length > bytestream2_get_bytes_left(&s->gb)) {
av_log(avctx, AV_LOG_ERROR, "chunk too big\n");
ret = AVERROR_INVALIDDATA;
goto fail;
}
tag = bytestream2_get_le32(&s->gb);
if (avctx->debug & FF_DEBUG_STARTCODE)
av_log(avctx, AV_LOG_DEBUG, "png: tag=%c%c%c%c length=%u\n",
(tag & 0xff),
((tag >> 8) & 0xff),
((tag >> 16) & 0xff),
((tag >> 24) & 0xff), length);
if (avctx->codec_id == AV_CODEC_ID_PNG &&
avctx->skip_frame == AVDISCARD_ALL) {
switch(tag) {
case MKTAG('I', 'H', 'D', 'R'):
case MKTAG('p', 'H', 'Y', 's'):
case MKTAG('t', 'E', 'X', 't'):
case MKTAG('I', 'D', 'A', 'T'):
case MKTAG('t', 'R', 'N', 'S'):
break;
default:
goto skip_tag;
}
}
switch (tag) {
case MKTAG('I', 'H', 'D', 'R'):
if ((ret = decode_ihdr_chunk(avctx, s, length)) < 0)
goto fail;
break;
case MKTAG('p', 'H', 'Y', 's'):
if ((ret = decode_phys_chunk(avctx, s)) < 0)
goto fail;
break;
case MKTAG('f', 'c', 'T', 'L'):
if (!CONFIG_APNG_DECODER || avctx->codec_id != AV_CODEC_ID_APNG)
goto skip_tag;
if ((ret = decode_fctl_chunk(avctx, s, length)) < 0)
goto fail;
decode_next_dat = 1;
break;
case MKTAG('f', 'd', 'A', 'T'):
if (!CONFIG_APNG_DECODER || avctx->codec_id != AV_CODEC_ID_APNG)
goto skip_tag;
if (!decode_next_dat) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
bytestream2_get_be32(&s->gb);
length -= 4;
/* fallthrough */
case MKTAG('I', 'D', 'A', 'T'):
if (CONFIG_APNG_DECODER && avctx->codec_id == AV_CODEC_ID_APNG && !decode_next_dat)
goto skip_tag;
if ((ret = decode_idat_chunk(avctx, s, length, p)) < 0)
goto fail;
break;
case MKTAG('P', 'L', 'T', 'E'):
if (decode_plte_chunk(avctx, s, length) < 0)
goto skip_tag;
break;
case MKTAG('t', 'R', 'N', 'S'):
if (decode_trns_chunk(avctx, s, length) < 0)
goto skip_tag;
break;
case MKTAG('t', 'E', 'X', 't'):
if (decode_text_chunk(s, length, 0, &metadata) < 0)
av_log(avctx, AV_LOG_WARNING, "Broken tEXt chunk\n");
bytestream2_skip(&s->gb, length + 4);
break;
case MKTAG('z', 'T', 'X', 't'):
if (decode_text_chunk(s, length, 1, &metadata) < 0)
av_log(avctx, AV_LOG_WARNING, "Broken zTXt chunk\n");
bytestream2_skip(&s->gb, length + 4);
break;
case MKTAG('s', 'T', 'E', 'R'): {
int mode = bytestream2_get_byte(&s->gb);
AVStereo3D *stereo3d = av_stereo3d_create_side_data(p);
if (!stereo3d)
goto fail;
if (mode == 0 || mode == 1) {
stereo3d->type = AV_STEREO3D_SIDEBYSIDE;
stereo3d->flags = mode ? 0 : AV_STEREO3D_FLAG_INVERT;
} else {
av_log(avctx, AV_LOG_WARNING,
"Unknown value in sTER chunk (%d)\n", mode);
}
bytestream2_skip(&s->gb, 4); /* crc */
break;
}
case MKTAG('I', 'E', 'N', 'D'):
if (!(s->state & PNG_ALLIMAGE))
av_log(avctx, AV_LOG_ERROR, "IEND without all image\n");
if (!(s->state & (PNG_ALLIMAGE|PNG_IDAT))) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
bytestream2_skip(&s->gb, 4); /* crc */
goto exit_loop;
default:
/* skip tag */
skip_tag:
bytestream2_skip(&s->gb, length + 4);
break;
}
}
exit_loop:
if (avctx->codec_id == AV_CODEC_ID_PNG &&
avctx->skip_frame == AVDISCARD_ALL) {
av_frame_set_metadata(p, metadata);
return 0;
}
if (s->bits_per_pixel <= 4)
handle_small_bpp(s, p);
/* apply transparency if needed */
if (s->has_trns && s->color_type != PNG_COLOR_TYPE_PALETTE) {
size_t byte_depth = s->bit_depth > 8 ? 2 : 1;
size_t raw_bpp = s->bpp - byte_depth;
unsigned x, y;
for (y = 0; y < s->height; ++y) {
uint8_t *row = &s->image_buf[s->image_linesize * y];
/* since we're updating in-place, we have to go from right to left */
for (x = s->width; x > 0; --x) {
uint8_t *pixel = &row[s->bpp * (x - 1)];
memmove(pixel, &row[raw_bpp * (x - 1)], raw_bpp);
if (!memcmp(pixel, s->transparent_color_be, raw_bpp)) {
memset(&pixel[raw_bpp], 0, byte_depth);
} else {
memset(&pixel[raw_bpp], 0xff, byte_depth);
}
}
}
}
/* handle P-frames only if a predecessor frame is available */
if (s->last_picture.f->data[0]) {
if ( !(avpkt->flags & AV_PKT_FLAG_KEY) && avctx->codec_tag != AV_RL32("MPNG")
&& s->last_picture.f->width == p->width
&& s->last_picture.f->height== p->height
&& s->last_picture.f->format== p->format
) {
if (CONFIG_PNG_DECODER && avctx->codec_id != AV_CODEC_ID_APNG)
handle_p_frame_png(s, p);
else if (CONFIG_APNG_DECODER &&
avctx->codec_id == AV_CODEC_ID_APNG &&
(ret = handle_p_frame_apng(avctx, s, p)) < 0)
goto fail;
}
}
ff_thread_report_progress(&s->picture, INT_MAX, 0);
ff_thread_report_progress(&s->previous_picture, INT_MAX, 0);
av_frame_set_metadata(p, metadata);
metadata = NULL;
return 0;
fail:
av_dict_free(&metadata);
ff_thread_report_progress(&s->picture, INT_MAX, 0);
ff_thread_report_progress(&s->previous_picture, INT_MAX, 0);
return ret;
}
|
C
|
FFmpeg
| 0 |
CVE-2018-20066
|
https://www.cvedetails.com/cve/CVE-2018-20066/
|
CWE-416
|
https://github.com/chromium/chromium/commit/2f0b419df243400f954e11b649f4862a1e0ff367
|
2f0b419df243400f954e11b649f4862a1e0ff367
|
Fix the regression caused by http://crrev.com/c/1288350.
Bug: 900124,856135
Change-Id: Ie11ad406bd1ea383dc2a83cc8661076309154865
Reviewed-on: https://chromium-review.googlesource.com/c/1317010
Reviewed-by: Lan Wei <[email protected]>
Commit-Queue: Shu Chen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#605282}
|
InputImeEventRouterFactory::~InputImeEventRouterFactory() {
}
|
InputImeEventRouterFactory::~InputImeEventRouterFactory() {
}
|
C
|
Chrome
| 0 |
CVE-2016-10130
|
https://www.cvedetails.com/cve/CVE-2016-10130/
|
CWE-284
|
https://github.com/libgit2/libgit2/commit/9a64e62f0f20c9cf9b2e1609f037060eb2d8eb22
|
9a64e62f0f20c9cf9b2e1609f037060eb2d8eb22
|
http: check certificate validity before clobbering the error variable
|
static void http_free(git_smart_subtransport *subtransport)
{
http_subtransport *t = (http_subtransport *) subtransport;
http_close(subtransport);
git_vector_free(&t->auth_contexts);
git__free(t);
}
|
static void http_free(git_smart_subtransport *subtransport)
{
http_subtransport *t = (http_subtransport *) subtransport;
http_close(subtransport);
git_vector_free(&t->auth_contexts);
git__free(t);
}
|
C
|
libgit2
| 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 voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultUndefinedLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
V8TRYCATCH_EXCEPTION_VOID(int, defaultUndefinedLongArg, toInt32(info[0], exceptionState), exceptionState);
imp->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg);
}
|
static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultUndefinedLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
V8TRYCATCH_EXCEPTION_VOID(int, defaultUndefinedLongArg, toInt32(info[0], exceptionState), exceptionState);
imp->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg);
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa
|
a3e2afaedd8190398ae45ccef34fcdee00fb19aa
|
Fixed crash related to cellular network payment plan retreival.
BUG=chromium-os:8864
TEST=none
Review URL: http://codereview.chromium.org/4690002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65405 0039d316-1c4b-4281-b951-d872f2087c98
|
virtual bool cellular_connecting() const { return false; }
|
virtual bool cellular_connecting() const { return false; }
|
C
|
Chrome
| 0 |
CVE-2010-0011
|
https://www.cvedetails.com/cve/CVE-2010-0011/
|
CWE-264
|
https://github.com/Dieterbe/uzbl/commit/1958b52d41cba96956dc1995660de49525ed1047
|
1958b52d41cba96956dc1995660de49525ed1047
|
disable Uzbl javascript object because of security problem.
|
js_init() {
/* This function creates the class and its definition, only once */
if (!uzbl.js.initialized) {
/* it would be pretty cool to make this dynamic */
uzbl.js.classdef = kJSClassDefinitionEmpty;
uzbl.js.classdef.staticFunctions = js_static_functions;
uzbl.js.classref = JSClassCreate(&uzbl.js.classdef);
}
}
|
js_init() {
/* This function creates the class and its definition, only once */
if (!uzbl.js.initialized) {
/* it would be pretty cool to make this dynamic */
uzbl.js.classdef = kJSClassDefinitionEmpty;
uzbl.js.classdef.staticFunctions = js_static_functions;
uzbl.js.classref = JSClassCreate(&uzbl.js.classdef);
}
}
|
C
|
uzbl
| 0 |
CVE-2013-0281
|
https://www.cvedetails.com/cve/CVE-2013-0281/
|
CWE-399
|
https://github.com/ClusterLabs/pacemaker/commit/564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
|
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
|
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
|
print_date(time_t time)
{
int lpc = 0;
char date_str[26];
asctime_r(localtime(&time), date_str);
for (; lpc < 26; lpc++) {
if (date_str[lpc] == '\n') {
date_str[lpc] = 0;
}
}
print_as("'%s'", date_str);
}
|
print_date(time_t time)
{
int lpc = 0;
char date_str[26];
asctime_r(localtime(&time), date_str);
for (; lpc < 26; lpc++) {
if (date_str[lpc] == '\n') {
date_str[lpc] = 0;
}
}
print_as("'%s'", date_str);
}
|
C
|
pacemaker
| 0 |
CVE-2017-13038
|
https://www.cvedetails.com/cve/CVE-2017-13038/
|
CWE-125
|
https://github.com/the-tcpdump-group/tcpdump/commit/7335163a6ef82d46ff18f3e6099a157747241629
|
7335163a6ef82d46ff18f3e6099a157747241629
|
CVE-2017-13038/PPP: Do bounds checking.
This fixes a buffer over-read discovered by Brian 'geeknik' Carpenter.
Add a test using the capture file supplied by Katie Holly.
|
ppp_hdlc(netdissect_options *ndo,
const u_char *p, int length)
{
u_char *b, *t, c;
const u_char *s;
int i, proto;
const void *se;
if (length <= 0)
return;
b = (u_char *)malloc(length);
if (b == NULL)
return;
/*
* Unescape all the data into a temporary, private, buffer.
* Do this so that we dont overwrite the original packet
* contents.
*/
for (s = p, t = b, i = length; i > 0 && ND_TTEST(*s); i--) {
c = *s++;
if (c == 0x7d) {
if (i <= 1 || !ND_TTEST(*s))
break;
i--;
c = *s++ ^ 0x20;
}
*t++ = c;
}
se = ndo->ndo_snapend;
ndo->ndo_snapend = t;
length = t - b;
/* now lets guess about the payload codepoint format */
if (length < 1)
goto trunc;
proto = *b; /* start with a one-octet codepoint guess */
switch (proto) {
case PPP_IP:
ip_print(ndo, b + 1, length - 1);
goto cleanup;
case PPP_IPV6:
ip6_print(ndo, b + 1, length - 1);
goto cleanup;
default: /* no luck - try next guess */
break;
}
if (length < 2)
goto trunc;
proto = EXTRACT_16BITS(b); /* next guess - load two octets */
switch (proto) {
case (PPP_ADDRESS << 8 | PPP_CONTROL): /* looks like a PPP frame */
if (length < 4)
goto trunc;
proto = EXTRACT_16BITS(b+2); /* load the PPP proto-id */
handle_ppp(ndo, proto, b + 4, length - 4);
break;
default: /* last guess - proto must be a PPP proto-id */
handle_ppp(ndo, proto, b + 2, length - 2);
break;
}
cleanup:
ndo->ndo_snapend = se;
free(b);
return;
trunc:
ndo->ndo_snapend = se;
free(b);
ND_PRINT((ndo, "[|ppp]"));
}
|
ppp_hdlc(netdissect_options *ndo,
const u_char *p, int length)
{
u_char *b, *t, c;
const u_char *s;
int i, proto;
const void *se;
if (length <= 0)
return;
b = (u_char *)malloc(length);
if (b == NULL)
return;
/*
* Unescape all the data into a temporary, private, buffer.
* Do this so that we dont overwrite the original packet
* contents.
*/
for (s = p, t = b, i = length; i > 0 && ND_TTEST(*s); i--) {
c = *s++;
if (c == 0x7d) {
if (i <= 1 || !ND_TTEST(*s))
break;
i--;
c = *s++ ^ 0x20;
}
*t++ = c;
}
se = ndo->ndo_snapend;
ndo->ndo_snapend = t;
length = t - b;
/* now lets guess about the payload codepoint format */
if (length < 1)
goto trunc;
proto = *b; /* start with a one-octet codepoint guess */
switch (proto) {
case PPP_IP:
ip_print(ndo, b + 1, length - 1);
goto cleanup;
case PPP_IPV6:
ip6_print(ndo, b + 1, length - 1);
goto cleanup;
default: /* no luck - try next guess */
break;
}
if (length < 2)
goto trunc;
proto = EXTRACT_16BITS(b); /* next guess - load two octets */
switch (proto) {
case (PPP_ADDRESS << 8 | PPP_CONTROL): /* looks like a PPP frame */
if (length < 4)
goto trunc;
proto = EXTRACT_16BITS(b+2); /* load the PPP proto-id */
handle_ppp(ndo, proto, b + 4, length - 4);
break;
default: /* last guess - proto must be a PPP proto-id */
handle_ppp(ndo, proto, b + 2, length - 2);
break;
}
cleanup:
ndo->ndo_snapend = se;
free(b);
return;
trunc:
ndo->ndo_snapend = se;
free(b);
ND_PRINT((ndo, "[|ppp]"));
}
|
C
|
tcpdump
| 0 |
CVE-2017-5125
|
https://www.cvedetails.com/cve/CVE-2017-5125/
|
CWE-119
|
https://github.com/chromium/chromium/commit/1a90b2996bfd341a04073f0054047073865b485d
|
1a90b2996bfd341a04073f0054047073865b485d
|
Remove some senseless indirection from the Push API code
Four files to call one Java function. Let's just call it directly.
BUG=
Change-Id: I6e988e9a000051dd7e3dd2b517a33a09afc2fff6
Reviewed-on: https://chromium-review.googlesource.com/749147
Reviewed-by: Anita Woodruff <[email protected]>
Commit-Queue: Peter Beverloo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#513464}
|
void PushMessagingServiceImpl::DidSubscribe(
const PushMessagingAppIdentifier& app_identifier,
const std::string& sender_id,
const RegisterCallback& callback,
const std::string& subscription_id,
InstanceID::Result result) {
DecreasePushSubscriptionCount(1, true /* was_pending */);
content::mojom::PushRegistrationStatus status =
content::mojom::PushRegistrationStatus::SERVICE_ERROR;
switch (result) {
case InstanceID::SUCCESS:
GetEncryptionInfoForAppId(
app_identifier.app_id(), sender_id,
base::Bind(&PushMessagingServiceImpl::DidSubscribeWithEncryptionInfo,
weak_factory_.GetWeakPtr(), app_identifier, callback,
subscription_id));
return;
case InstanceID::INVALID_PARAMETER:
case InstanceID::DISABLED:
case InstanceID::ASYNC_OPERATION_PENDING:
case InstanceID::SERVER_ERROR:
case InstanceID::UNKNOWN_ERROR:
DLOG(ERROR) << "Push messaging subscription failed; InstanceID::Result = "
<< result;
status = content::mojom::PushRegistrationStatus::SERVICE_ERROR;
break;
case InstanceID::NETWORK_ERROR:
status = content::mojom::PushRegistrationStatus::NETWORK_ERROR;
break;
}
SubscribeEndWithError(callback, status);
}
|
void PushMessagingServiceImpl::DidSubscribe(
const PushMessagingAppIdentifier& app_identifier,
const std::string& sender_id,
const RegisterCallback& callback,
const std::string& subscription_id,
InstanceID::Result result) {
DecreasePushSubscriptionCount(1, true /* was_pending */);
content::mojom::PushRegistrationStatus status =
content::mojom::PushRegistrationStatus::SERVICE_ERROR;
switch (result) {
case InstanceID::SUCCESS:
GetEncryptionInfoForAppId(
app_identifier.app_id(), sender_id,
base::Bind(&PushMessagingServiceImpl::DidSubscribeWithEncryptionInfo,
weak_factory_.GetWeakPtr(), app_identifier, callback,
subscription_id));
return;
case InstanceID::INVALID_PARAMETER:
case InstanceID::DISABLED:
case InstanceID::ASYNC_OPERATION_PENDING:
case InstanceID::SERVER_ERROR:
case InstanceID::UNKNOWN_ERROR:
DLOG(ERROR) << "Push messaging subscription failed; InstanceID::Result = "
<< result;
status = content::mojom::PushRegistrationStatus::SERVICE_ERROR;
break;
case InstanceID::NETWORK_ERROR:
status = content::mojom::PushRegistrationStatus::NETWORK_ERROR;
break;
}
SubscribeEndWithError(callback, status);
}
|
C
|
Chrome
| 0 |
CVE-2018-17476
|
https://www.cvedetails.com/cve/CVE-2018-17476/
|
CWE-20
|
https://github.com/chromium/chromium/commit/3d41e77125f3de8d722b6d8303599abaf2a91667
|
3d41e77125f3de8d722b6d8303599abaf2a91667
|
If a dialog is shown, drop fullscreen.
BUG=875066, 817809, 792876, 812769, 813815
TEST=included
Change-Id: Ic3d697fa3c4b01f5d7fea77391857177ada660db
Reviewed-on: https://chromium-review.googlesource.com/1185208
Reviewed-by: Sidney San Martín <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586418}
|
void Browser::RendererUnresponsive(
WebContents* source,
content::RenderWidgetHost* render_widget_host,
base::RepeatingClosure hang_monitor_restarter) {
int index = tab_strip_model_->GetIndexOfWebContents(source);
DCHECK_NE(TabStripModel::kNoTab, index);
if (tab_strip_model_->IsTabBlocked(index))
return;
TabDialogs::FromWebContents(source)->ShowHungRendererDialog(
render_widget_host, std::move(hang_monitor_restarter));
}
|
void Browser::RendererUnresponsive(
WebContents* source,
content::RenderWidgetHost* render_widget_host,
base::RepeatingClosure hang_monitor_restarter) {
int index = tab_strip_model_->GetIndexOfWebContents(source);
DCHECK_NE(TabStripModel::kNoTab, index);
if (tab_strip_model_->IsTabBlocked(index))
return;
TabDialogs::FromWebContents(source)->ShowHungRendererDialog(
render_widget_host, std::move(hang_monitor_restarter));
}
|
C
|
Chrome
| 0 |
CVE-2018-12896
|
https://www.cvedetails.com/cve/CVE-2018-12896/
|
CWE-190
|
https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76
|
78c9c4dfbf8c04883941445a195276bb4bb92c76
|
posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callbacks return a 64 bit value now. Make
k_itimer::ti_overrun[_last] 64bit as well, so the kernel internal
accounting is correct. 3Remove the temporary (int) casts.
Add a helper function which clamps the overrun value returned to user space
via timer_getoverrun(2) or siginfo::si_overrun limited to a positive value
between 0 and INT_MAX. INT_MAX is an indicator for user space that the
overrun value has been clamped.
Reported-by: Team OWL337 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: John Stultz <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
|
void posix_cpu_timers_exit_group(struct task_struct *tsk)
{
cleanup_timers(tsk->signal->cpu_timers);
}
|
void posix_cpu_timers_exit_group(struct task_struct *tsk)
{
cleanup_timers(tsk->signal->cpu_timers);
}
|
C
|
linux
| 0 |
CVE-2017-13083
|
https://www.cvedetails.com/cve/CVE-2017-13083/
|
CWE-494
|
https://github.com/pbatard/rufus/commit/c3c39f7f8a11f612c4ebf7affce25ec6928eb1cb
|
c3c39f7f8a11f612c4ebf7affce25ec6928eb1cb
|
[pki] fix https://www.kb.cert.org/vuls/id/403768
* This commit effectively fixes https://www.kb.cert.org/vuls/id/403768 (CVE-2017-13083) as
it is described per its revision 11, which is the latest revision at the time of this commit,
by disabling Windows prompts, enacted during signature validation, that allow the user to
bypass the intended signature verification checks.
* It needs to be pointed out that the vulnerability ("allow(ing) the use of a self-signed
certificate"), which relies on the end-user actively ignoring a Windows prompt that tells
them that the update failed the signature validation whilst also advising against running it,
is being fully addressed, even as the update protocol remains HTTP.
* It also need to be pointed out that the extended delay (48 hours) between the time the
vulnerability was reported and the moment it is fixed in our codebase has to do with
the fact that the reporter chose to deviate from standard security practices by not
disclosing the details of the vulnerability with us, be it publicly or privately,
before creating the cert.org report. The only advance notification we received was a
generic note about the use of HTTP vs HTTPS, which, as have established, is not
immediately relevant to addressing the reported vulnerability.
* Closes #1009
* Note: The other vulnerability scenario described towards the end of #1009, which
doesn't have to do with the "lack of CA checking", will be addressed separately.
|
static __inline LPWORD lpwAlign(LPWORD addr)
{
return (LPWORD)((((uintptr_t)addr) + 3) & (~3));
}
|
static __inline LPWORD lpwAlign(LPWORD addr)
{
return (LPWORD)((((uintptr_t)addr) + 3) & (~3));
}
|
C
|
rufus
| 0 |
CVE-2013-2548
|
https://www.cvedetails.com/cve/CVE-2013-2548/
|
CWE-310
|
https://github.com/torvalds/linux/commit/9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
|
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
|
crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of the API. Switch to strncpy() to fix this.
2/ crypto_report_one() does not initialize all field of struct
crypto_user_alg. Fix this to fix the heap info leak.
3/ For the module name we should copy only as many bytes as
module_name() returns -- not as much as the destination buffer could
hold. But the current code does not and therefore copies random data
from behind the end of the module name, as the module name is always
shorter than CRYPTO_MAX_ALG_NAME.
Also switch to use strncpy() to copy the algorithm's name and
driver_name. They are strings, after all.
Signed-off-by: Mathias Krause <[email protected]>
Cc: Steffen Klassert <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
static inline unsigned int blkcipher_done_slow(struct crypto_blkcipher *tfm,
struct blkcipher_walk *walk,
unsigned int bsize)
{
u8 *addr;
unsigned int alignmask = crypto_blkcipher_alignmask(tfm);
addr = (u8 *)ALIGN((unsigned long)walk->buffer, alignmask + 1);
addr = blkcipher_get_spot(addr, bsize);
scatterwalk_copychunks(addr, &walk->out, bsize, 1);
return bsize;
}
|
static inline unsigned int blkcipher_done_slow(struct crypto_blkcipher *tfm,
struct blkcipher_walk *walk,
unsigned int bsize)
{
u8 *addr;
unsigned int alignmask = crypto_blkcipher_alignmask(tfm);
addr = (u8 *)ALIGN((unsigned long)walk->buffer, alignmask + 1);
addr = blkcipher_get_spot(addr, bsize);
scatterwalk_copychunks(addr, &walk->out, bsize, 1);
return bsize;
}
|
C
|
linux
| 0 |
CVE-2017-15088
|
https://www.cvedetails.com/cve/CVE-2017-15088/
|
CWE-119
|
https://github.com/krb5/krb5/commit/fbb687db1088ddd894d975996e5f6a4252b9a2b4
|
fbb687db1088ddd894d975996e5f6a4252b9a2b4
|
Fix PKINIT cert matching data construction
Rewrite X509_NAME_oneline_ex() and its call sites to use dynamic
allocation and to perform proper error checking.
ticket: 8617
target_version: 1.16
target_version: 1.15-next
target_version: 1.14-next
tags: pullup
|
static void compat_dh_get0_pqg(const DH *dh, const BIGNUM **p,
const BIGNUM **q, const BIGNUM **g)
{
if (p != NULL)
*p = dh->p;
if (q != NULL)
*q = dh->q;
if (g != NULL)
*g = dh->g;
}
|
static void compat_dh_get0_pqg(const DH *dh, const BIGNUM **p,
const BIGNUM **q, const BIGNUM **g)
{
if (p != NULL)
*p = dh->p;
if (q != NULL)
*q = dh->q;
if (g != NULL)
*g = dh->g;
}
|
C
|
krb5
| 0 |
CVE-2018-8897
|
https://www.cvedetails.com/cve/CVE-2018-8897/
|
CWE-362
|
https://github.com/torvalds/linux/commit/d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9
|
d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9
|
x86/entry/64: Don't use IST entry for #BP stack
There's nothing IST-worthy about #BP/int3. We don't allow kprobes
in the small handful of places in the kernel that run at CPL0 with
an invalid stack, and 32-bit kernels have used normal interrupt
gates for #BP forever.
Furthermore, we don't allow kprobes in places that have usergs while
in kernel mode, so "paranoid" is also unnecessary.
Signed-off-by: Andy Lutomirski <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
|
dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
{
#ifdef CONFIG_DYNAMIC_FTRACE
/*
* ftrace must be first, everything else may cause a recursive crash.
* See note by declaration of modifying_ftrace_code in ftrace.c
*/
if (unlikely(atomic_read(&modifying_ftrace_code)) &&
ftrace_int3_handler(regs))
return;
#endif
if (poke_int3_handler(regs))
return;
/*
* Use ist_enter despite the fact that we don't use an IST stack.
* We can be called from a kprobe in non-CONTEXT_KERNEL kernel
* mode or even during context tracking state changes.
*
* This means that we can't schedule. That's okay.
*/
ist_enter(regs);
RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP,
SIGTRAP) == NOTIFY_STOP)
goto exit;
#endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */
#ifdef CONFIG_KPROBES
if (kprobe_int3_handler(regs))
goto exit;
#endif
if (notify_die(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP,
SIGTRAP) == NOTIFY_STOP)
goto exit;
cond_local_irq_enable(regs);
do_trap(X86_TRAP_BP, SIGTRAP, "int3", regs, error_code, NULL);
cond_local_irq_disable(regs);
exit:
ist_exit(regs);
}
|
dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
{
#ifdef CONFIG_DYNAMIC_FTRACE
/*
* ftrace must be first, everything else may cause a recursive crash.
* See note by declaration of modifying_ftrace_code in ftrace.c
*/
if (unlikely(atomic_read(&modifying_ftrace_code)) &&
ftrace_int3_handler(regs))
return;
#endif
if (poke_int3_handler(regs))
return;
ist_enter(regs);
RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP,
SIGTRAP) == NOTIFY_STOP)
goto exit;
#endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */
#ifdef CONFIG_KPROBES
if (kprobe_int3_handler(regs))
goto exit;
#endif
if (notify_die(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP,
SIGTRAP) == NOTIFY_STOP)
goto exit;
/*
* Let others (NMI) know that the debug stack is in use
* as we may switch to the interrupt stack.
*/
debug_stack_usage_inc();
cond_local_irq_enable(regs);
do_trap(X86_TRAP_BP, SIGTRAP, "int3", regs, error_code, NULL);
cond_local_irq_disable(regs);
debug_stack_usage_dec();
exit:
ist_exit(regs);
}
|
C
|
linux
| 1 |
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::SendMessageToBackend(
SendCommandDebuggerFunction* function,
const std::string& method,
Value* params) {
DictionaryValue protocol_request;
int request_id = ++last_request_id_;
pending_requests_[request_id] = function;
protocol_request.SetInteger("id", request_id);
protocol_request.SetString("method", method);
if (params)
protocol_request.Set("params", params->DeepCopy());
std::string json_args;
base::JSONWriter::Write(&protocol_request, false, &json_args);
DevToolsManager::GetInstance()->DispatchOnInspectorBackend(this, json_args);
}
|
void ExtensionDevToolsClientHost::SendMessageToBackend(
SendCommandDebuggerFunction* function,
const std::string& method,
Value* params) {
DictionaryValue protocol_request;
int request_id = ++last_request_id_;
pending_requests_[request_id] = function;
protocol_request.SetInteger("id", request_id);
protocol_request.SetString("method", method);
if (params)
protocol_request.Set("params", params->DeepCopy());
std::string json_args;
base::JSONWriter::Write(&protocol_request, false, &json_args);
DevToolsManager::GetInstance()->DispatchOnInspectorBackend(this, json_args);
}
|
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]>
|
nfs4_atomic_open(struct inode *dir, struct nfs_open_context *ctx, int open_flags, struct iattr *attr)
{
struct nfs4_state *state;
/* Protect against concurrent sillydeletes */
state = nfs4_do_open(dir, ctx->dentry, ctx->mode, open_flags, attr,
ctx->cred, &ctx->mdsthreshold);
if (IS_ERR(state))
return ERR_CAST(state);
ctx->state = state;
return igrab(state->inode);
}
|
nfs4_atomic_open(struct inode *dir, struct nfs_open_context *ctx, int open_flags, struct iattr *attr)
{
struct nfs4_state *state;
/* Protect against concurrent sillydeletes */
state = nfs4_do_open(dir, ctx->dentry, ctx->mode, open_flags, attr,
ctx->cred, &ctx->mdsthreshold);
if (IS_ERR(state))
return ERR_CAST(state);
ctx->state = state;
return igrab(state->inode);
}
|
C
|
linux
| 0 |
CVE-2016-3881
|
https://www.cvedetails.com/cve/CVE-2016-3881/
|
CWE-119
|
https://android.googlesource.com/platform/external/libvpx/+/4974dcbd0289a2530df2ee2a25b5f92775df80da
|
4974dcbd0289a2530df2ee2a25b5f92775df80da
|
DO NOT MERGE | libvpx: cherry-pick aa1c813 from upstream
Description from upstream:
vp9: Fix potential SEGV in decoder_peek_si_internal
decoder_peek_si_internal could potentially read more bytes than
what actually exists in the input buffer. We check for the buffer
size to be at least 8, but we try to read up to 10 bytes in the
worst case. A well crafted file could thus cause a segfault.
Likely change that introduced this bug was:
https://chromium-review.googlesource.com/#/c/70439 (git hash:
7c43fb6)
Bug: 30013856
Change-Id: If556414cb5b82472d5673e045bc185cc57bb9af3
(cherry picked from commit bd57d587c2eb743c61b049add18f9fd72bf78c33)
|
static void init_buffer_callbacks(vpx_codec_alg_priv_t *ctx) {
int i;
for (i = 0; i < ctx->num_frame_workers; ++i) {
VPxWorker *const worker = &ctx->frame_workers[i];
FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
VP9_COMMON *const cm = &frame_worker_data->pbi->common;
BufferPool *const pool = cm->buffer_pool;
cm->new_fb_idx = INVALID_IDX;
cm->byte_alignment = ctx->byte_alignment;
cm->skip_loop_filter = ctx->skip_loop_filter;
if (ctx->get_ext_fb_cb != NULL && ctx->release_ext_fb_cb != NULL) {
pool->get_fb_cb = ctx->get_ext_fb_cb;
pool->release_fb_cb = ctx->release_ext_fb_cb;
pool->cb_priv = ctx->ext_priv;
} else {
pool->get_fb_cb = vp9_get_frame_buffer;
pool->release_fb_cb = vp9_release_frame_buffer;
if (vp9_alloc_internal_frame_buffers(&pool->int_frame_buffers))
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
"Failed to initialize internal frame buffers");
pool->cb_priv = &pool->int_frame_buffers;
}
}
}
|
static void init_buffer_callbacks(vpx_codec_alg_priv_t *ctx) {
int i;
for (i = 0; i < ctx->num_frame_workers; ++i) {
VPxWorker *const worker = &ctx->frame_workers[i];
FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
VP9_COMMON *const cm = &frame_worker_data->pbi->common;
BufferPool *const pool = cm->buffer_pool;
cm->new_fb_idx = INVALID_IDX;
cm->byte_alignment = ctx->byte_alignment;
cm->skip_loop_filter = ctx->skip_loop_filter;
if (ctx->get_ext_fb_cb != NULL && ctx->release_ext_fb_cb != NULL) {
pool->get_fb_cb = ctx->get_ext_fb_cb;
pool->release_fb_cb = ctx->release_ext_fb_cb;
pool->cb_priv = ctx->ext_priv;
} else {
pool->get_fb_cb = vp9_get_frame_buffer;
pool->release_fb_cb = vp9_release_frame_buffer;
if (vp9_alloc_internal_frame_buffers(&pool->int_frame_buffers))
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
"Failed to initialize internal frame buffers");
pool->cb_priv = &pool->int_frame_buffers;
}
}
}
|
C
|
Android
| 0 |
CVE-2019-15296
|
https://www.cvedetails.com/cve/CVE-2019-15296/
|
CWE-119
|
https://github.com/knik0/faad2/commit/942c3e0aee748ea6fe97cb2c1aa5893225316174
|
942c3e0aee748ea6fe97cb2c1aa5893225316174
|
Fix a couple buffer overflows
https://hackerone.com/reports/502816
https://hackerone.com/reports/507858
https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch
|
void get_adif_header(adif_header *adif, bitfile *ld)
{
uint8_t i;
/* adif_id[0] = */ faad_getbits(ld, 8
DEBUGVAR(1,106,"get_adif_header(): adif_id[0]"));
/* adif_id[1] = */ faad_getbits(ld, 8
DEBUGVAR(1,107,"get_adif_header(): adif_id[1]"));
/* adif_id[2] = */ faad_getbits(ld, 8
DEBUGVAR(1,108,"get_adif_header(): adif_id[2]"));
/* adif_id[3] = */ faad_getbits(ld, 8
DEBUGVAR(1,109,"get_adif_header(): adif_id[3]"));
adif->copyright_id_present = faad_get1bit(ld
DEBUGVAR(1,110,"get_adif_header(): copyright_id_present"));
if(adif->copyright_id_present)
{
for (i = 0; i < 72/8; i++)
{
adif->copyright_id[i] = (int8_t)faad_getbits(ld, 8
DEBUGVAR(1,111,"get_adif_header(): copyright_id"));
}
adif->copyright_id[i] = 0;
}
adif->original_copy = faad_get1bit(ld
DEBUGVAR(1,112,"get_adif_header(): original_copy"));
adif->home = faad_get1bit(ld
DEBUGVAR(1,113,"get_adif_header(): home"));
adif->bitstream_type = faad_get1bit(ld
DEBUGVAR(1,114,"get_adif_header(): bitstream_type"));
adif->bitrate = faad_getbits(ld, 23
DEBUGVAR(1,115,"get_adif_header(): bitrate"));
adif->num_program_config_elements = (uint8_t)faad_getbits(ld, 4
DEBUGVAR(1,116,"get_adif_header(): num_program_config_elements"));
for (i = 0; i < adif->num_program_config_elements + 1; i++)
{
if(adif->bitstream_type == 0)
{
adif->adif_buffer_fullness = faad_getbits(ld, 20
DEBUGVAR(1,117,"get_adif_header(): adif_buffer_fullness"));
} else {
adif->adif_buffer_fullness = 0;
}
program_config_element(&adif->pce[i], ld);
}
}
|
void get_adif_header(adif_header *adif, bitfile *ld)
{
uint8_t i;
/* adif_id[0] = */ faad_getbits(ld, 8
DEBUGVAR(1,106,"get_adif_header(): adif_id[0]"));
/* adif_id[1] = */ faad_getbits(ld, 8
DEBUGVAR(1,107,"get_adif_header(): adif_id[1]"));
/* adif_id[2] = */ faad_getbits(ld, 8
DEBUGVAR(1,108,"get_adif_header(): adif_id[2]"));
/* adif_id[3] = */ faad_getbits(ld, 8
DEBUGVAR(1,109,"get_adif_header(): adif_id[3]"));
adif->copyright_id_present = faad_get1bit(ld
DEBUGVAR(1,110,"get_adif_header(): copyright_id_present"));
if(adif->copyright_id_present)
{
for (i = 0; i < 72/8; i++)
{
adif->copyright_id[i] = (int8_t)faad_getbits(ld, 8
DEBUGVAR(1,111,"get_adif_header(): copyright_id"));
}
adif->copyright_id[i] = 0;
}
adif->original_copy = faad_get1bit(ld
DEBUGVAR(1,112,"get_adif_header(): original_copy"));
adif->home = faad_get1bit(ld
DEBUGVAR(1,113,"get_adif_header(): home"));
adif->bitstream_type = faad_get1bit(ld
DEBUGVAR(1,114,"get_adif_header(): bitstream_type"));
adif->bitrate = faad_getbits(ld, 23
DEBUGVAR(1,115,"get_adif_header(): bitrate"));
adif->num_program_config_elements = (uint8_t)faad_getbits(ld, 4
DEBUGVAR(1,116,"get_adif_header(): num_program_config_elements"));
for (i = 0; i < adif->num_program_config_elements + 1; i++)
{
if(adif->bitstream_type == 0)
{
adif->adif_buffer_fullness = faad_getbits(ld, 20
DEBUGVAR(1,117,"get_adif_header(): adif_buffer_fullness"));
} else {
adif->adif_buffer_fullness = 0;
}
program_config_element(&adif->pce[i], ld);
}
}
|
C
|
faad2
| 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::DidSendScreenRects(RenderWidgetHostImpl* rwh) {
if (browser_plugin_embedder_)
browser_plugin_embedder_->DidSendScreenRects();
}
|
void WebContentsImpl::DidSendScreenRects(RenderWidgetHostImpl* rwh) {
if (browser_plugin_embedder_)
browser_plugin_embedder_->DidSendScreenRects();
}
|
C
|
Chrome
| 0 |
CVE-2013-4483
|
https://www.cvedetails.com/cve/CVE-2013-4483/
|
CWE-189
|
https://github.com/torvalds/linux/commit/6062a8dc0517bce23e3c2f7d2fea5e22411269a3
|
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
|
ipc,sem: fine grained locking for semtimedop
Introduce finer grained locking for semtimedop, to handle the common case
of a program wanting to manipulate one semaphore from an array with
multiple semaphores.
If the call is a semop manipulating just one semaphore in an array with
multiple semaphores, only take the lock for that semaphore itself.
If the call needs to manipulate multiple semaphores, or another caller is
in a transaction that manipulates multiple semaphores, the sem_array lock
is taken, as well as all the locks for the individual semaphores.
On a 24 CPU system, performance numbers with the semop-multi
test with N threads and N semaphores, look like this:
vanilla Davidlohr's Davidlohr's + Davidlohr's +
threads patches rwlock patches v3 patches
10 610652 726325 1783589 2142206
20 341570 365699 1520453 1977878
30 288102 307037 1498167 2037995
40 290714 305955 1612665 2256484
50 288620 312890 1733453 2650292
60 289987 306043 1649360 2388008
70 291298 306347 1723167 2717486
80 290948 305662 1729545 2763582
90 290996 306680 1736021 2757524
100 292243 306700 1773700 3059159
[[email protected]: do not call sem_lock when bogus sma]
[[email protected]: make refcounter atomic]
Signed-off-by: Rik van Riel <[email protected]>
Suggested-by: Linus Torvalds <[email protected]>
Acked-by: Davidlohr Bueso <[email protected]>
Cc: Chegu Vinod <[email protected]>
Cc: Jason Low <[email protected]>
Reviewed-by: Michel Lespinasse <[email protected]>
Cc: Peter Hurley <[email protected]>
Cc: Stanislav Kinsbursky <[email protected]>
Tested-by: Emmanuel Benisty <[email protected]>
Tested-by: Sedat Dilek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
void* ipc_rcu_alloc(int size)
void *ipc_rcu_alloc(int size)
{
void *out;
/*
* We prepend the allocation with the rcu struct, and
* workqueue if necessary (for vmalloc).
*/
if (rcu_use_vmalloc(size)) {
out = vmalloc(HDRLEN_VMALLOC + size);
if (!out)
goto done;
out += HDRLEN_VMALLOC;
container_of(out, struct ipc_rcu_hdr, data)->is_vmalloc = 1;
} else {
out = kmalloc(HDRLEN_KMALLOC + size, GFP_KERNEL);
if (!out)
goto done;
out += HDRLEN_KMALLOC;
container_of(out, struct ipc_rcu_hdr, data)->is_vmalloc = 0;
}
/* set reference counter no matter what kind of allocation was done */
atomic_set(&container_of(out, struct ipc_rcu_hdr, data)->refcount, 1);
done:
return out;
}
|
void* ipc_rcu_alloc(int size)
{
void* out;
/*
* We prepend the allocation with the rcu struct, and
* workqueue if necessary (for vmalloc).
*/
if (rcu_use_vmalloc(size)) {
out = vmalloc(HDRLEN_VMALLOC + size);
if (out) {
out += HDRLEN_VMALLOC;
container_of(out, struct ipc_rcu_hdr, data)->is_vmalloc = 1;
container_of(out, struct ipc_rcu_hdr, data)->refcount = 1;
}
} else {
out = kmalloc(HDRLEN_KMALLOC + size, GFP_KERNEL);
if (out) {
out += HDRLEN_KMALLOC;
container_of(out, struct ipc_rcu_hdr, data)->is_vmalloc = 0;
container_of(out, struct ipc_rcu_hdr, data)->refcount = 1;
}
}
return out;
}
|
C
|
linux
| 1 |
CVE-2013-7421
|
https://www.cvedetails.com/cve/CVE-2013-7421/
|
CWE-264
|
https://github.com/torvalds/linux/commit/5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
5d26a105b5a73e5635eae0629b42fa0a90e07b7b
|
crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypto API,
as demonstrated by Mathias Krause:
https://lkml.org/lkml/2013/3/4/70
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
static int ap_probe_device_type(struct ap_device *ap_dev)
{
static unsigned char msg[] = {
0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x00,0x43,0x43,0x41,0x2d,0x41,0x50,
0x50,0x4c,0x20,0x20,0x20,0x01,0x01,0x01,
0x00,0x00,0x00,0x00,0x50,0x4b,0x00,0x00,
0x00,0x00,0x01,0x1c,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x05,0xb8,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x70,0x00,0x41,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x54,0x32,0x01,0x00,0xa0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xb8,0x05,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
0x49,0x43,0x53,0x46,0x20,0x20,0x20,0x20,
0x50,0x4b,0x0a,0x00,0x50,0x4b,0x43,0x53,
0x2d,0x31,0x2e,0x32,0x37,0x00,0x11,0x22,
0x33,0x44,0x55,0x66,0x77,0x88,0x99,0x00,
0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,
0x99,0x00,0x11,0x22,0x33,0x44,0x55,0x66,
0x77,0x88,0x99,0x00,0x11,0x22,0x33,0x44,
0x55,0x66,0x77,0x88,0x99,0x00,0x11,0x22,
0x33,0x44,0x55,0x66,0x77,0x88,0x99,0x00,
0x11,0x22,0x33,0x5d,0x00,0x5b,0x00,0x77,
0x88,0x1e,0x00,0x00,0x57,0x00,0x00,0x00,
0x00,0x04,0x00,0x00,0x4f,0x00,0x00,0x00,
0x03,0x02,0x00,0x00,0x40,0x01,0x00,0x01,
0xce,0x02,0x68,0x2d,0x5f,0xa9,0xde,0x0c,
0xf6,0xd2,0x7b,0x58,0x4b,0xf9,0x28,0x68,
0x3d,0xb4,0xf4,0xef,0x78,0xd5,0xbe,0x66,
0x63,0x42,0xef,0xf8,0xfd,0xa4,0xf8,0xb0,
0x8e,0x29,0xc2,0xc9,0x2e,0xd8,0x45,0xb8,
0x53,0x8c,0x6f,0x4e,0x72,0x8f,0x6c,0x04,
0x9c,0x88,0xfc,0x1e,0xc5,0x83,0x55,0x57,
0xf7,0xdd,0xfd,0x4f,0x11,0x36,0x95,0x5d,
};
struct ap_queue_status status;
unsigned long long psmid;
char *reply;
int rc, i;
reply = (void *) get_zeroed_page(GFP_KERNEL);
if (!reply) {
rc = -ENOMEM;
goto out;
}
status = __ap_send(ap_dev->qid, 0x0102030405060708ULL,
msg, sizeof(msg), 0);
if (status.response_code != AP_RESPONSE_NORMAL) {
rc = -ENODEV;
goto out_free;
}
/* Wait for the test message to complete. */
for (i = 0; i < 6; i++) {
mdelay(300);
status = __ap_recv(ap_dev->qid, &psmid, reply, 4096);
if (status.response_code == AP_RESPONSE_NORMAL &&
psmid == 0x0102030405060708ULL)
break;
}
if (i < 6) {
/* Got an answer. */
if (reply[0] == 0x00 && reply[1] == 0x86)
ap_dev->device_type = AP_DEVICE_TYPE_PCICC;
else
ap_dev->device_type = AP_DEVICE_TYPE_PCICA;
rc = 0;
} else
rc = -ENODEV;
out_free:
free_page((unsigned long) reply);
out:
return rc;
}
|
static int ap_probe_device_type(struct ap_device *ap_dev)
{
static unsigned char msg[] = {
0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x00,0x43,0x43,0x41,0x2d,0x41,0x50,
0x50,0x4c,0x20,0x20,0x20,0x01,0x01,0x01,
0x00,0x00,0x00,0x00,0x50,0x4b,0x00,0x00,
0x00,0x00,0x01,0x1c,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x05,0xb8,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x70,0x00,0x41,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x54,0x32,0x01,0x00,0xa0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xb8,0x05,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
0x49,0x43,0x53,0x46,0x20,0x20,0x20,0x20,
0x50,0x4b,0x0a,0x00,0x50,0x4b,0x43,0x53,
0x2d,0x31,0x2e,0x32,0x37,0x00,0x11,0x22,
0x33,0x44,0x55,0x66,0x77,0x88,0x99,0x00,
0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,
0x99,0x00,0x11,0x22,0x33,0x44,0x55,0x66,
0x77,0x88,0x99,0x00,0x11,0x22,0x33,0x44,
0x55,0x66,0x77,0x88,0x99,0x00,0x11,0x22,
0x33,0x44,0x55,0x66,0x77,0x88,0x99,0x00,
0x11,0x22,0x33,0x5d,0x00,0x5b,0x00,0x77,
0x88,0x1e,0x00,0x00,0x57,0x00,0x00,0x00,
0x00,0x04,0x00,0x00,0x4f,0x00,0x00,0x00,
0x03,0x02,0x00,0x00,0x40,0x01,0x00,0x01,
0xce,0x02,0x68,0x2d,0x5f,0xa9,0xde,0x0c,
0xf6,0xd2,0x7b,0x58,0x4b,0xf9,0x28,0x68,
0x3d,0xb4,0xf4,0xef,0x78,0xd5,0xbe,0x66,
0x63,0x42,0xef,0xf8,0xfd,0xa4,0xf8,0xb0,
0x8e,0x29,0xc2,0xc9,0x2e,0xd8,0x45,0xb8,
0x53,0x8c,0x6f,0x4e,0x72,0x8f,0x6c,0x04,
0x9c,0x88,0xfc,0x1e,0xc5,0x83,0x55,0x57,
0xf7,0xdd,0xfd,0x4f,0x11,0x36,0x95,0x5d,
};
struct ap_queue_status status;
unsigned long long psmid;
char *reply;
int rc, i;
reply = (void *) get_zeroed_page(GFP_KERNEL);
if (!reply) {
rc = -ENOMEM;
goto out;
}
status = __ap_send(ap_dev->qid, 0x0102030405060708ULL,
msg, sizeof(msg), 0);
if (status.response_code != AP_RESPONSE_NORMAL) {
rc = -ENODEV;
goto out_free;
}
/* Wait for the test message to complete. */
for (i = 0; i < 6; i++) {
mdelay(300);
status = __ap_recv(ap_dev->qid, &psmid, reply, 4096);
if (status.response_code == AP_RESPONSE_NORMAL &&
psmid == 0x0102030405060708ULL)
break;
}
if (i < 6) {
/* Got an answer. */
if (reply[0] == 0x00 && reply[1] == 0x86)
ap_dev->device_type = AP_DEVICE_TYPE_PCICC;
else
ap_dev->device_type = AP_DEVICE_TYPE_PCICA;
rc = 0;
} else
rc = -ENODEV;
out_free:
free_page((unsigned long) reply);
out:
return rc;
}
|
C
|
linux
| 0 |
CVE-2014-3200
|
https://www.cvedetails.com/cve/CVE-2014-3200/
| null |
https://github.com/chromium/chromium/commit/c0947dabeaa10da67798c1bbc668dca4b280cad5
|
c0947dabeaa10da67798c1bbc668dca4b280cad5
|
[Contextual Search] Change "Now on Tap" to "Contextual Cards"
BUG=644934
Review-Url: https://codereview.chromium.org/2361163003
Cr-Commit-Position: refs/heads/master@{#420899}
|
net::TestURLFetcher* fetcher() { return fetcher_; }
|
net::TestURLFetcher* fetcher() { return fetcher_; }
|
C
|
Chrome
| 0 |
CVE-2017-12187
|
https://www.cvedetails.com/cve/CVE-2017-12187/
|
CWE-20
|
https://cgit.freedesktop.org/xorg/xserver/commit/?id=cad5a1050b7184d828aef9c1dd151c3ab649d37e
|
cad5a1050b7184d828aef9c1dd151c3ab649d37e
| null |
SProcRenderAddGlyphs(ClientPtr client)
{
register int i;
CARD32 *gids;
void *end;
xGlyphInfo *gi;
REQUEST(xRenderAddGlyphsReq);
REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq);
swaps(&stuff->length);
swapl(&stuff->glyphset);
swapl(&stuff->nglyphs);
if (stuff->nglyphs & 0xe0000000)
return BadLength;
end = (CARD8 *) stuff + (client->req_len << 2);
gids = (CARD32 *) (stuff + 1);
gi = (xGlyphInfo *) (gids + stuff->nglyphs);
if ((char *) end - (char *) (gids + stuff->nglyphs) < 0)
return BadLength;
if ((char *) end - (char *) (gi + stuff->nglyphs) < 0)
return BadLength;
for (i = 0; i < stuff->nglyphs; i++) {
swapl(&gids[i]);
swaps(&gi[i].width);
swaps(&gi[i].height);
swaps(&gi[i].x);
swaps(&gi[i].y);
swaps(&gi[i].xOff);
swaps(&gi[i].yOff);
}
return (*ProcRenderVector[stuff->renderReqType]) (client);
}
|
SProcRenderAddGlyphs(ClientPtr client)
{
register int i;
CARD32 *gids;
void *end;
xGlyphInfo *gi;
REQUEST(xRenderAddGlyphsReq);
REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq);
swaps(&stuff->length);
swapl(&stuff->glyphset);
swapl(&stuff->nglyphs);
if (stuff->nglyphs & 0xe0000000)
return BadLength;
end = (CARD8 *) stuff + (client->req_len << 2);
gids = (CARD32 *) (stuff + 1);
gi = (xGlyphInfo *) (gids + stuff->nglyphs);
if ((char *) end - (char *) (gids + stuff->nglyphs) < 0)
return BadLength;
if ((char *) end - (char *) (gi + stuff->nglyphs) < 0)
return BadLength;
for (i = 0; i < stuff->nglyphs; i++) {
swapl(&gids[i]);
swaps(&gi[i].width);
swaps(&gi[i].height);
swaps(&gi[i].x);
swaps(&gi[i].y);
swaps(&gi[i].xOff);
swaps(&gi[i].yOff);
}
return (*ProcRenderVector[stuff->renderReqType]) (client);
}
|
C
|
xserver
| 0 |
CVE-2018-6085
|
https://www.cvedetails.com/cve/CVE-2018-6085/
|
CWE-20
|
https://github.com/chromium/chromium/commit/df5b1e1f88e013bc96107cc52c4a4f33a8238444
|
df5b1e1f88e013bc96107cc52c4a4f33a8238444
|
Blockfile cache: fix long-standing sparse + evict reentrancy problem
Thanks to nedwilliamson@ (on gmail) for an alternative perspective
plus a reduction to make fixing this much easier.
Bug: 826626, 518908, 537063, 802886
Change-Id: Ibfa01416f9a8e7f7b361e4f93b4b6b134728b85f
Reviewed-on: https://chromium-review.googlesource.com/985052
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Maks Orlovich <[email protected]>
Cr-Commit-Position: refs/heads/master@{#547103}
|
void BackendImpl::OnEvent(Stats::Counters an_event) {
stats_.OnEvent(an_event);
}
|
void BackendImpl::OnEvent(Stats::Counters an_event) {
stats_.OnEvent(an_event);
}
|
C
|
Chrome
| 0 |
CVE-2014-9683
|
https://www.cvedetails.com/cve/CVE-2014-9683/
|
CWE-189
|
https://github.com/torvalds/linux/commit/942080643bce061c3dd9d5718d3b745dcb39a8bc
|
942080643bce061c3dd9d5718d3b745dcb39a8bc
|
eCryptfs: Remove buggy and unnecessary write in file name decode routine
Dmitry Chernenkov used KASAN to discover that eCryptfs writes past the
end of the allocated buffer during encrypted filename decoding. This
fix corrects the issue by getting rid of the unnecessary 0 write when
the current bit offset is 2.
Signed-off-by: Michael Halcrow <[email protected]>
Reported-by: Dmitry Chernenkov <[email protected]>
Suggested-by: Kees Cook <[email protected]>
Cc: [email protected] # v2.6.29+: 51ca58d eCryptfs: Filename Encryption: Encoding and encryption functions
Signed-off-by: Tyler Hicks <[email protected]>
|
void ecryptfs_to_hex(char *dst, char *src, size_t src_size)
{
int x;
for (x = 0; x < src_size; x++)
sprintf(&dst[x * 2], "%.2x", (unsigned char)src[x]);
}
|
void ecryptfs_to_hex(char *dst, char *src, size_t src_size)
{
int x;
for (x = 0; x < src_size; x++)
sprintf(&dst[x * 2], "%.2x", (unsigned char)src[x]);
}
|
C
|
linux
| 0 |
CVE-2016-3899
|
https://www.cvedetails.com/cve/CVE-2016-3899/
|
CWE-284
|
https://android.googlesource.com/platform/frameworks/av/+/97837bb6cbac21ea679843a0037779d3834bed64
|
97837bb6cbac21ea679843a0037779d3834bed64
|
OMXCodec: check IMemory::pointer() before using allocation
Bug: 29421811
Change-Id: I0a73ba12bae4122f1d89fc92e5ea4f6a96cd1ed1
|
uint32_t OMXCodec::getComponentQuirks(
const sp<MediaCodecInfo> &info) {
uint32_t quirks = 0;
if (info->hasQuirk("requires-allocate-on-input-ports")) {
quirks |= kRequiresAllocateBufferOnInputPorts;
}
if (info->hasQuirk("requires-allocate-on-output-ports")) {
quirks |= kRequiresAllocateBufferOnOutputPorts;
}
if (info->hasQuirk("output-buffers-are-unreadable")) {
quirks |= kOutputBuffersAreUnreadable;
}
return quirks;
}
|
uint32_t OMXCodec::getComponentQuirks(
const sp<MediaCodecInfo> &info) {
uint32_t quirks = 0;
if (info->hasQuirk("requires-allocate-on-input-ports")) {
quirks |= kRequiresAllocateBufferOnInputPorts;
}
if (info->hasQuirk("requires-allocate-on-output-ports")) {
quirks |= kRequiresAllocateBufferOnOutputPorts;
}
if (info->hasQuirk("output-buffers-are-unreadable")) {
quirks |= kOutputBuffersAreUnreadable;
}
return quirks;
}
|
C
|
Android
| 0 |
CVE-2013-7020
|
https://www.cvedetails.com/cve/CVE-2013-7020/
|
CWE-119
|
https://github.com/FFmpeg/FFmpeg/commit/b05cd1ea7e45a836f7f6071a716c38bb30326e0f
|
b05cd1ea7e45a836f7f6071a716c38bb30326e0f
|
ffv1dec: Check bits_per_raw_sample and colorspace for equality in ver 0/1 headers
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int init_thread_copy(AVCodecContext *avctx)
{
FFV1Context *f = avctx->priv_data;
f->picture.f = NULL;
f->last_picture.f = NULL;
f->sample_buffer = NULL;
f->quant_table_count = 0;
f->slice_count = 0;
return 0;
}
|
static int init_thread_copy(AVCodecContext *avctx)
{
FFV1Context *f = avctx->priv_data;
f->picture.f = NULL;
f->last_picture.f = NULL;
f->sample_buffer = NULL;
f->quant_table_count = 0;
f->slice_count = 0;
return 0;
}
|
C
|
FFmpeg
| 0 |
CVE-2017-15951
|
https://www.cvedetails.com/cve/CVE-2017-15951/
|
CWE-20
|
https://github.com/torvalds/linux/commit/363b02dab09b3226f3bd1420dad9c72b79a42a76
|
363b02dab09b3226f3bd1420dad9c72b79a42a76
|
KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unioned with the payload pointers.
This deals with the problem that the state is spread over three different
objects (two bits and a separate variable) and reading or updating them
atomically isn't practical, given that not only can uninstantiated keys
change into instantiated or rejected keys, but rejected keys can also turn
into instantiated keys - and someone accessing the key might not be using
any locking.
The main side effect of this problem is that what was held in the payload
may change, depending on the state. For instance, you might observe the
key to be in the rejected state. You then read the cached error, but if
the key semaphore wasn't locked, the key might've become instantiated
between the two reads - and you might now have something in hand that isn't
actually an error code.
The state is now KEY_IS_UNINSTANTIATED, KEY_IS_POSITIVE or a negative error
code if the key is negatively instantiated. The key_is_instantiated()
function is replaced with key_is_positive() to avoid confusion as negative
keys are also 'instantiated'.
Additionally, barriering is included:
(1) Order payload-set before state-set during instantiation.
(2) Order state-read before payload-read when using the key.
Further separate barriering is necessary if RCU is being used to access the
payload content after reading the payload pointers.
Fixes: 146aa8b1453b ("KEYS: Merge the type-specific data with the payload data")
Cc: [email protected] # v4.4+
Reported-by: Eric Biggers <[email protected]>
Signed-off-by: David Howells <[email protected]>
Reviewed-by: Eric Biggers <[email protected]>
|
static void user_free_payload_rcu(struct rcu_head *head)
{
struct user_key_payload *payload;
payload = container_of(head, struct user_key_payload, rcu);
kzfree(payload);
}
|
static void user_free_payload_rcu(struct rcu_head *head)
{
struct user_key_payload *payload;
payload = container_of(head, struct user_key_payload, rcu);
kzfree(payload);
}
|
C
|
linux
| 0 |
CVE-2017-6850
|
https://www.cvedetails.com/cve/CVE-2017-6850/
|
CWE-476
|
https://github.com/mdadams/jasper/commit/e96fc4fdd525fa0ede28074a7e2b1caf94b58b0d
|
e96fc4fdd525fa0ede28074a7e2b1caf94b58b0d
|
Fixed bugs due to uninitialized data in the JP2 decoder.
Also, added some comments marking I/O stream interfaces that probably
need to be changed (in the long term) to fix integer overflow problems.
|
static int sfile_write(jas_stream_obj_t *obj, char *buf, int cnt)
{
FILE *fp;
size_t n;
JAS_DBGLOG(100, ("sfile_write(%p, %p, %d)\n", obj, buf, cnt));
fp = JAS_CAST(FILE *, obj);
n = fwrite(buf, 1, cnt, fp);
return (n != JAS_CAST(size_t, cnt)) ? (-1) : cnt;
}
|
static int sfile_write(jas_stream_obj_t *obj, char *buf, int cnt)
{
FILE *fp;
size_t n;
JAS_DBGLOG(100, ("sfile_write(%p, %p, %d)\n", obj, buf, cnt));
fp = JAS_CAST(FILE *, obj);
n = fwrite(buf, 1, cnt, fp);
return (n != JAS_CAST(size_t, cnt)) ? (-1) : cnt;
}
|
C
|
jasper
| 0 |
CVE-2016-3078
|
https://www.cvedetails.com/cve/CVE-2016-3078/
|
CWE-190
|
https://github.com/php/php-src/commit/3b8d4de300854b3517c7acb239b84f7726c1353c?w=1
|
3b8d4de300854b3517c7acb239b84f7726c1353c?w=1
|
Fix bug #71923 - integer overflow in ZipArchive::getFrom*
|
static void php_zip_entry_get_info(INTERNAL_FUNCTION_PARAMETERS, int opt) /* {{{ */
{
zval * zip_entry;
zip_read_rsrc * zr_rsrc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip_entry) == FAILURE) {
return;
}
if ((zr_rsrc = (zip_read_rsrc *)zend_fetch_resource(Z_RES_P(zip_entry), le_zip_entry_name, le_zip_entry)) == NULL) {
RETURN_FALSE;
}
if (!zr_rsrc->zf) {
RETURN_FALSE;
}
switch (opt) {
case 0:
RETURN_STRING((char *)zr_rsrc->sb.name);
break;
case 1:
RETURN_LONG((zend_long) (zr_rsrc->sb.comp_size));
break;
case 2:
RETURN_LONG((zend_long) (zr_rsrc->sb.size));
break;
case 3:
switch (zr_rsrc->sb.comp_method) {
case 0:
RETURN_STRING("stored");
break;
case 1:
RETURN_STRING("shrunk");
break;
case 2:
case 3:
case 4:
case 5:
RETURN_STRING("reduced");
break;
case 6:
RETURN_STRING("imploded");
break;
case 7:
RETURN_STRING("tokenized");
break;
case 8:
RETURN_STRING("deflated");
break;
case 9:
RETURN_STRING("deflatedX");
break;
case 10:
RETURN_STRING("implodedX");
break;
default:
RETURN_FALSE;
}
RETURN_LONG((zend_long) (zr_rsrc->sb.comp_method));
break;
}
}
/* }}} */
|
static void php_zip_entry_get_info(INTERNAL_FUNCTION_PARAMETERS, int opt) /* {{{ */
{
zval * zip_entry;
zip_read_rsrc * zr_rsrc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zip_entry) == FAILURE) {
return;
}
if ((zr_rsrc = (zip_read_rsrc *)zend_fetch_resource(Z_RES_P(zip_entry), le_zip_entry_name, le_zip_entry)) == NULL) {
RETURN_FALSE;
}
if (!zr_rsrc->zf) {
RETURN_FALSE;
}
switch (opt) {
case 0:
RETURN_STRING((char *)zr_rsrc->sb.name);
break;
case 1:
RETURN_LONG((zend_long) (zr_rsrc->sb.comp_size));
break;
case 2:
RETURN_LONG((zend_long) (zr_rsrc->sb.size));
break;
case 3:
switch (zr_rsrc->sb.comp_method) {
case 0:
RETURN_STRING("stored");
break;
case 1:
RETURN_STRING("shrunk");
break;
case 2:
case 3:
case 4:
case 5:
RETURN_STRING("reduced");
break;
case 6:
RETURN_STRING("imploded");
break;
case 7:
RETURN_STRING("tokenized");
break;
case 8:
RETURN_STRING("deflated");
break;
case 9:
RETURN_STRING("deflatedX");
break;
case 10:
RETURN_STRING("implodedX");
break;
default:
RETURN_FALSE;
}
RETURN_LONG((zend_long) (zr_rsrc->sb.comp_method));
break;
}
}
/* }}} */
|
C
|
php-src
| 0 |
CVE-2018-20169
|
https://www.cvedetails.com/cve/CVE-2018-20169/
|
CWE-400
|
https://github.com/torvalds/linux/commit/704620afc70cf47abb9d6a1a57f3825d2bca49cf
|
704620afc70cf47abb9d6a1a57f3825d2bca49cf
|
USB: check usb_get_extra_descriptor for proper size
When reading an extra descriptor, we need to properly check the minimum
and maximum size allowed, to prevent from invalid data being sent by a
device.
Reported-by: Hui Peng <[email protected]>
Reported-by: Mathias Payer <[email protected]>
Co-developed-by: Linus Torvalds <[email protected]>
Signed-off-by: Hui Peng <[email protected]>
Signed-off-by: Mathias Payer <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
void usb_put_dev(struct usb_device *dev)
{
if (dev)
put_device(&dev->dev);
}
|
void usb_put_dev(struct usb_device *dev)
{
if (dev)
put_device(&dev->dev);
}
|
C
|
linux
| 0 |
CVE-2012-2895
|
https://www.cvedetails.com/cve/CVE-2012-2895/
|
CWE-119
|
https://github.com/chromium/chromium/commit/3475f5e448ddf5e48888f3d0563245cc46e3c98b
|
3475f5e448ddf5e48888f3d0563245cc46e3c98b
|
ash: Add launcher overflow bubble.
- Host a LauncherView in bubble to display overflown items;
- Mouse wheel and two-finger scroll to scroll the LauncherView in bubble in case overflow bubble is overflown;
- Fit bubble when items are added/removed;
- Keep launcher bar on screen when the bubble is shown;
BUG=128054
TEST=Verify launcher overflown items are in a bubble instead of menu.
Review URL: https://chromiumcodereview.appspot.com/10659003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146460 0039d316-1c4b-4281-b951-d872f2087c98
|
void LauncherView::LayoutToIdealBounds() {
IdealBounds ideal_bounds;
CalculateIdealBounds(&ideal_bounds);
if (bounds_animator_->IsAnimating())
AnimateToIdealBounds();
else
views::ViewModelUtils::SetViewBoundsToIdealBounds(*view_model_);
overflow_button_->SetBoundsRect(ideal_bounds.overflow_bounds);
}
|
void LauncherView::LayoutToIdealBounds() {
IdealBounds ideal_bounds;
CalculateIdealBounds(&ideal_bounds);
if (bounds_animator_->IsAnimating())
AnimateToIdealBounds();
else
views::ViewModelUtils::SetViewBoundsToIdealBounds(*view_model_);
overflow_button_->SetBoundsRect(ideal_bounds.overflow_bounds);
}
|
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 RenderFrameImpl::OnExecuteNoValueEditCommand(const std::string& name) {
frame_->ExecuteCommand(WebString::FromUTF8(name));
}
|
void RenderFrameImpl::OnExecuteNoValueEditCommand(const std::string& name) {
frame_->ExecuteCommand(WebString::FromUTF8(name));
}
|
C
|
Chrome
| 0 |
CVE-2016-6836
|
https://www.cvedetails.com/cve/CVE-2016-6836/
|
CWE-200
|
https://git.qemu.org/?p=qemu.git;a=commit;h=fdda170e50b8af062cf5741e12c4fb5e57a2eacf
|
fdda170e50b8af062cf5741e12c4fb5e57a2eacf
| null |
vmxnet3_io_bar1_write(void *opaque,
hwaddr addr,
uint64_t val,
unsigned size)
{
VMXNET3State *s = opaque;
switch (addr) {
/* Vmxnet3 Revision Report Selection */
case VMXNET3_REG_VRRS:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_VRRS] = %" PRIx64 ", size %d",
val, size);
break;
/* UPT Version Report Selection */
case VMXNET3_REG_UVRS:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_UVRS] = %" PRIx64 ", size %d",
val, size);
break;
/* Driver Shared Address Low */
case VMXNET3_REG_DSAL:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_DSAL] = %" PRIx64 ", size %d",
val, size);
/*
* Guest driver will first write the low part of the shared
* memory address. We save it to temp variable and set the
* shared address only after we get the high part
*/
if (val == 0) {
vmxnet3_deactivate_device(s);
}
s->temp_shared_guest_driver_memory = val;
s->drv_shmem = 0;
break;
/* Driver Shared Address High */
case VMXNET3_REG_DSAH:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_DSAH] = %" PRIx64 ", size %d",
val, size);
/*
* Set the shared memory between guest driver and device.
* We already should have low address part.
*/
s->drv_shmem = s->temp_shared_guest_driver_memory | (val << 32);
break;
/* Command */
case VMXNET3_REG_CMD:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_CMD] = %" PRIx64 ", size %d",
val, size);
vmxnet3_handle_command(s, val);
break;
/* MAC Address Low */
case VMXNET3_REG_MACL:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_MACL] = %" PRIx64 ", size %d",
val, size);
s->temp_mac = val;
break;
/* MAC Address High */
case VMXNET3_REG_MACH:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_MACH] = %" PRIx64 ", size %d",
val, size);
vmxnet3_set_variable_mac(s, val, s->temp_mac);
break;
/* Interrupt Cause Register */
case VMXNET3_REG_ICR:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_ICR] = %" PRIx64 ", size %d",
val, size);
g_assert_not_reached();
break;
/* Event Cause Register */
case VMXNET3_REG_ECR:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_ECR] = %" PRIx64 ", size %d",
val, size);
vmxnet3_ack_events(s, val);
break;
default:
VMW_CBPRN("Unknown Write to BAR1 [%" PRIx64 "] = %" PRIx64 ", size %d",
addr, val, size);
break;
}
}
|
vmxnet3_io_bar1_write(void *opaque,
hwaddr addr,
uint64_t val,
unsigned size)
{
VMXNET3State *s = opaque;
switch (addr) {
/* Vmxnet3 Revision Report Selection */
case VMXNET3_REG_VRRS:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_VRRS] = %" PRIx64 ", size %d",
val, size);
break;
/* UPT Version Report Selection */
case VMXNET3_REG_UVRS:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_UVRS] = %" PRIx64 ", size %d",
val, size);
break;
/* Driver Shared Address Low */
case VMXNET3_REG_DSAL:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_DSAL] = %" PRIx64 ", size %d",
val, size);
/*
* Guest driver will first write the low part of the shared
* memory address. We save it to temp variable and set the
* shared address only after we get the high part
*/
if (val == 0) {
vmxnet3_deactivate_device(s);
}
s->temp_shared_guest_driver_memory = val;
s->drv_shmem = 0;
break;
/* Driver Shared Address High */
case VMXNET3_REG_DSAH:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_DSAH] = %" PRIx64 ", size %d",
val, size);
/*
* Set the shared memory between guest driver and device.
* We already should have low address part.
*/
s->drv_shmem = s->temp_shared_guest_driver_memory | (val << 32);
break;
/* Command */
case VMXNET3_REG_CMD:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_CMD] = %" PRIx64 ", size %d",
val, size);
vmxnet3_handle_command(s, val);
break;
/* MAC Address Low */
case VMXNET3_REG_MACL:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_MACL] = %" PRIx64 ", size %d",
val, size);
s->temp_mac = val;
break;
/* MAC Address High */
case VMXNET3_REG_MACH:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_MACH] = %" PRIx64 ", size %d",
val, size);
vmxnet3_set_variable_mac(s, val, s->temp_mac);
break;
/* Interrupt Cause Register */
case VMXNET3_REG_ICR:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_ICR] = %" PRIx64 ", size %d",
val, size);
g_assert_not_reached();
break;
/* Event Cause Register */
case VMXNET3_REG_ECR:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_ECR] = %" PRIx64 ", size %d",
val, size);
vmxnet3_ack_events(s, val);
break;
default:
VMW_CBPRN("Unknown Write to BAR1 [%" PRIx64 "] = %" PRIx64 ", size %d",
addr, val, size);
break;
}
}
|
C
|
qemu
| 0 |
CVE-2016-2464
|
https://www.cvedetails.com/cve/CVE-2016-2464/
|
CWE-20
|
https://android.googlesource.com/platform/external/libvpx/+/cc274e2abe8b2a6698a5c47d8aa4bb45f1f9538d
|
cc274e2abe8b2a6698a5c47d8aa4bb45f1f9538d
|
external/libvpx/libwebm: Update snapshot
Update libwebm snapshot. This update contains security fixes from upstream.
Upstream git hash: 229f49347d19b0ca0941e072b199a242ef6c5f2b
BUG=23167726
Change-Id: Id3e140e7b31ae11294724b1ecfe2e9c83b4d4207
(cherry picked from commit d0281a15b3c6bd91756e453cc9398c5ef412d99a)
|
long mkvparser::UnserializeString(IMkvReader* pReader, long long pos,
long UnserializeString(IMkvReader* pReader, long long pos, long long size,
char*& str) {
delete[] str;
str = NULL;
if (size >= LONG_MAX || size < 0)
return E_FILE_FORMAT_INVALID;
// +1 for '\0' terminator
const long required_size = static_cast<long>(size) + 1;
str = SafeArrayAlloc<char>(1, required_size);
if (str == NULL)
return E_FILE_FORMAT_INVALID;
unsigned char* const buf = reinterpret_cast<unsigned char*>(str);
const long status = pReader->Read(pos, size, buf);
if (status) {
delete[] str;
str = NULL;
return status;
}
str[required_size - 1] = '\0';
return 0;
}
|
long mkvparser::UnserializeString(IMkvReader* pReader, long long pos,
long long size_, char*& str) {
delete[] str;
str = NULL;
if (size_ >= LONG_MAX) // we need (size+1) chars
return E_FILE_FORMAT_INVALID;
const long size = static_cast<long>(size_);
str = new (std::nothrow) char[size + 1];
if (str == NULL)
return -1;
unsigned char* const buf = reinterpret_cast<unsigned char*>(str);
const long status = pReader->Read(pos, size, buf);
if (status) {
delete[] str;
str = NULL;
return status;
}
str[size] = '\0';
return 0; // success
}
|
C
|
Android
| 1 |
CVE-2016-2105
|
https://www.cvedetails.com/cve/CVE-2016-2105/
|
CWE-189
|
https://git.openssl.org/?p=openssl.git;a=commit;h=5b814481f3573fa9677f3a31ee51322e2a22ee6a
|
5b814481f3573fa9677f3a31ee51322e2a22ee6a
| null |
int EVP_DecodeValid(unsigned char *buf, int len)
{
int i, num = 0, bad = 0;
if (len == 0)
return (-1);
while (conv_ascii2bin(*buf) == B64_WS) {
buf++;
len--;
if (len == 0)
return (-1);
}
for (i = len; i >= 4; i -= 4) {
if ((conv_ascii2bin(buf[0]) >= 0x40) ||
(conv_ascii2bin(buf[1]) >= 0x40) ||
(conv_ascii2bin(buf[2]) >= 0x40) ||
(conv_ascii2bin(buf[3]) >= 0x40))
return (-1);
buf += 4;
num += 1 + (buf[2] != '=') + (buf[3] != '=');
}
if ((i == 1) && (conv_ascii2bin(buf[0]) == B64_EOLN))
return (num);
if ((i == 2) && (conv_ascii2bin(buf[0]) == B64_EOLN) &&
(conv_ascii2bin(buf[0]) == B64_EOLN))
return (num);
return (1);
}
|
int EVP_DecodeValid(unsigned char *buf, int len)
{
int i, num = 0, bad = 0;
if (len == 0)
return (-1);
while (conv_ascii2bin(*buf) == B64_WS) {
buf++;
len--;
if (len == 0)
return (-1);
}
for (i = len; i >= 4; i -= 4) {
if ((conv_ascii2bin(buf[0]) >= 0x40) ||
(conv_ascii2bin(buf[1]) >= 0x40) ||
(conv_ascii2bin(buf[2]) >= 0x40) ||
(conv_ascii2bin(buf[3]) >= 0x40))
return (-1);
buf += 4;
num += 1 + (buf[2] != '=') + (buf[3] != '=');
}
if ((i == 1) && (conv_ascii2bin(buf[0]) == B64_EOLN))
return (num);
if ((i == 2) && (conv_ascii2bin(buf[0]) == B64_EOLN) &&
(conv_ascii2bin(buf[0]) == B64_EOLN))
return (num);
return (1);
}
|
C
|
openssl
| 0 |
CVE-2012-0036
|
https://www.cvedetails.com/cve/CVE-2012-0036/
|
CWE-89
|
https://github.com/bagder/curl/commit/75ca568fa1c19de4c5358fed246686de8467c238
|
75ca568fa1c19de4c5358fed246686de8467c238
|
URL sanitize: reject URLs containing bad data
Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a
decoded manner now use the new Curl_urldecode() function to reject URLs
with embedded control codes (anything that is or decodes to a byte value
less than 32).
URLs containing such codes could easily otherwise be used to do harm and
allow users to do unintended actions with otherwise innocent tools and
applications. Like for example using a URL like
pop3://pop3.example.com/1%0d%0aDELE%201 when the app wants a URL to get
a mail and instead this would delete one.
This flaw is considered a security vulnerability: CVE-2012-0036
Security advisory at: http://curl.haxx.se/docs/adv_20120124.html
Reported by: Dan Fandrich
|
static int imap_endofresp(struct pingpong *pp, int *resp)
{
char *line = pp->linestart_resp;
size_t len = pp->nread_resp;
struct imap_conn *imapc = &pp->conn->proto.imapc;
const char *id = imapc->idstr;
size_t id_len = strlen(id);
if(len >= id_len + 3) {
if(!memcmp(id, line, id_len) && (line[id_len] == ' ') ) {
/* end of response */
*resp = line[id_len+1]; /* O, N or B */
return TRUE;
}
else if((imapc->state == IMAP_FETCH) &&
!memcmp("* ", line, 2) ) {
/* FETCH response we're interested in */
*resp = '*';
return TRUE;
}
}
return FALSE; /* nothing for us */
}
|
static int imap_endofresp(struct pingpong *pp, int *resp)
{
char *line = pp->linestart_resp;
size_t len = pp->nread_resp;
struct imap_conn *imapc = &pp->conn->proto.imapc;
const char *id = imapc->idstr;
size_t id_len = strlen(id);
if(len >= id_len + 3) {
if(!memcmp(id, line, id_len) && (line[id_len] == ' ') ) {
/* end of response */
*resp = line[id_len+1]; /* O, N or B */
return TRUE;
}
else if((imapc->state == IMAP_FETCH) &&
!memcmp("* ", line, 2) ) {
/* FETCH response we're interested in */
*resp = '*';
return TRUE;
}
}
return FALSE; /* nothing for us */
}
|
C
|
curl
| 0 |
CVE-2015-1294
|
https://www.cvedetails.com/cve/CVE-2015-1294/
| null |
https://github.com/chromium/chromium/commit/3ff403eecdd23a39853a4ebca52023fbba6c5d00
|
3ff403eecdd23a39853a4ebca52023fbba6c5d00
|
Introduce RunLoop::Type::NESTABLE_TASKS_ALLOWED to replace MessageLoop::ScopedNestableTaskAllower.
(as well as MessageLoop::SetNestableTasksAllowed())
Surveying usage: the scoped object is always instantiated right before
RunLoop().Run(). The intent is really to allow nestable tasks in that
RunLoop so it's better to explicitly label that RunLoop as such and it
allows us to break the last dependency that forced some RunLoop users
to use MessageLoop APIs.
There's also the odd case of allowing nestable tasks for loops that are
reentrant from a native task (without going through RunLoop), these
are the minority but will have to be handled (after cleaning up the
majority of cases that are RunLoop induced).
As highlighted by robliao@ in https://chromium-review.googlesource.com/c/600517
(which was merged in this CL).
[email protected]
Bug: 750779
Change-Id: I43d122c93ec903cff3a6fe7b77ec461ea0656448
Reviewed-on: https://chromium-review.googlesource.com/594713
Commit-Queue: Gabriel Charette <[email protected]>
Reviewed-by: Robert Liao <[email protected]>
Reviewed-by: danakj <[email protected]>
Cr-Commit-Position: refs/heads/master@{#492263}
|
MessageLoop::MessageLoop(std::unique_ptr<MessagePump> pump)
: MessageLoop(TYPE_CUSTOM, BindOnce(&ReturnPump, Passed(&pump))) {
BindToCurrentThread();
}
|
MessageLoop::MessageLoop(std::unique_ptr<MessagePump> pump)
: MessageLoop(TYPE_CUSTOM, BindOnce(&ReturnPump, Passed(&pump))) {
BindToCurrentThread();
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/019c7acc36b8893d060684fb3b5deb6156c92b9e
|
019c7acc36b8893d060684fb3b5deb6156c92b9e
|
Add a CHECK when an object tries to remove itself as an observer from NotificationService but no matching entry is found. This is most likely an object being deleted on the wrong thread, and it'll lead to a crash later.
BUG=25354
Review URL: http://codereview.chromium.org/342091
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30801 0039d316-1c4b-4281-b951-d872f2087c98
|
NotificationService::~NotificationService() {
lazy_tls_ptr.Pointer()->Set(NULL);
#ifndef NDEBUG
for (int i = 0; i < NotificationType::NOTIFICATION_TYPE_COUNT; i++) {
if (observer_counts_[i] > 0) {
LOG(INFO) << observer_counts_[i] << " notification observer(s) leaked"
<< " of notification type " << i;
}
}
#endif
for (int i = 0; i < NotificationType::NOTIFICATION_TYPE_COUNT; i++) {
NotificationSourceMap omap = observers_[i];
for (NotificationSourceMap::iterator it = omap.begin();
it != omap.end(); ++it) {
delete it->second;
}
}
}
|
NotificationService::~NotificationService() {
lazy_tls_ptr.Pointer()->Set(NULL);
#ifndef NDEBUG
for (int i = 0; i < NotificationType::NOTIFICATION_TYPE_COUNT; i++) {
if (observer_counts_[i] > 0) {
LOG(INFO) << observer_counts_[i] << " notification observer(s) leaked"
<< " of notification type " << i;
}
}
#endif
for (int i = 0; i < NotificationType::NOTIFICATION_TYPE_COUNT; i++) {
NotificationSourceMap omap = observers_[i];
for (NotificationSourceMap::iterator it = omap.begin();
it != omap.end(); ++it) {
delete it->second;
}
}
}
|
C
|
Chrome
| 0 |
CVE-2017-9993
|
https://www.cvedetails.com/cve/CVE-2017-9993/
|
CWE-200
|
https://github.com/FFmpeg/FFmpeg/commit/a5d849b149ca67ced2d271dc84db0bc95a548abb
|
a5d849b149ca67ced2d271dc84db0bc95a548abb
|
avformat/avidec: Limit formats in gab2 to srt and ass/ssa
This prevents part of one exploit leading to an information leak
Found-by: Emil Lerner and Pavel Cheremushkin
Reported-by: Thierry Foucu <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
|
static int calculate_bitrate(AVFormatContext *s)
{
AVIContext *avi = s->priv_data;
int i, j;
int64_t lensum = 0;
int64_t maxpos = 0;
for (i = 0; i<s->nb_streams; i++) {
int64_t len = 0;
AVStream *st = s->streams[i];
if (!st->nb_index_entries)
continue;
for (j = 0; j < st->nb_index_entries; j++)
len += st->index_entries[j].size;
maxpos = FFMAX(maxpos, st->index_entries[j-1].pos);
lensum += len;
}
if (maxpos < avi->io_fsize*9/10) // index does not cover the whole file
return 0;
if (lensum*9/10 > maxpos || lensum < maxpos*9/10) // frame sum and filesize mismatch
return 0;
for (i = 0; i<s->nb_streams; i++) {
int64_t len = 0;
AVStream *st = s->streams[i];
int64_t duration;
int64_t bitrate;
for (j = 0; j < st->nb_index_entries; j++)
len += st->index_entries[j].size;
if (st->nb_index_entries < 2 || st->codecpar->bit_rate > 0)
continue;
duration = st->index_entries[j-1].timestamp - st->index_entries[0].timestamp;
bitrate = av_rescale(8*len, st->time_base.den, duration * st->time_base.num);
if (bitrate <= INT_MAX && bitrate > 0) {
st->codecpar->bit_rate = bitrate;
}
}
return 1;
}
|
static int calculate_bitrate(AVFormatContext *s)
{
AVIContext *avi = s->priv_data;
int i, j;
int64_t lensum = 0;
int64_t maxpos = 0;
for (i = 0; i<s->nb_streams; i++) {
int64_t len = 0;
AVStream *st = s->streams[i];
if (!st->nb_index_entries)
continue;
for (j = 0; j < st->nb_index_entries; j++)
len += st->index_entries[j].size;
maxpos = FFMAX(maxpos, st->index_entries[j-1].pos);
lensum += len;
}
if (maxpos < avi->io_fsize*9/10) // index does not cover the whole file
return 0;
if (lensum*9/10 > maxpos || lensum < maxpos*9/10) // frame sum and filesize mismatch
return 0;
for (i = 0; i<s->nb_streams; i++) {
int64_t len = 0;
AVStream *st = s->streams[i];
int64_t duration;
int64_t bitrate;
for (j = 0; j < st->nb_index_entries; j++)
len += st->index_entries[j].size;
if (st->nb_index_entries < 2 || st->codecpar->bit_rate > 0)
continue;
duration = st->index_entries[j-1].timestamp - st->index_entries[0].timestamp;
bitrate = av_rescale(8*len, st->time_base.den, duration * st->time_base.num);
if (bitrate <= INT_MAX && bitrate > 0) {
st->codecpar->bit_rate = bitrate;
}
}
return 1;
}
|
C
|
FFmpeg
| 0 |
CVE-2011-3110
|
https://www.cvedetails.com/cve/CVE-2011-3110/
|
CWE-119
|
https://github.com/chromium/chromium/commit/23a52bd208885df236cde3ad2cd162b094c0bbe4
|
23a52bd208885df236cde3ad2cd162b094c0bbe4
|
Do not require DevTools extension resources to be white-listed in manifest.
Currently, resources used by DevTools extensions need to be white-listed as web_accessible_resources in manifest. This is quite inconvenitent and appears to be an overkill, given the fact that DevTools front-end is
(a) trusted and
(b) picky on the frames it loads.
This change adds resources that belong to DevTools extensions and are being loaded into a DevTools front-end page to the list of exceptions from web_accessible_resources check.
BUG=none
TEST=DevToolsExtensionTest.*
Review URL: https://chromiumcodereview.appspot.com/9663076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126378 0039d316-1c4b-4281-b951-d872f2087c98
|
ChromeContentRendererClient::OverrideCreateWebMediaPlayer(
content::RenderView* render_view,
WebKit::WebFrame* frame,
WebKit::WebMediaPlayerClient* client,
base::WeakPtr<webkit_media::WebMediaPlayerDelegate> delegate,
media::FilterCollection* collection,
WebKit::WebAudioSourceProvider* audio_source_provider,
media::MessageLoopFactory* message_loop_factory,
webkit_media::MediaStreamClient* media_stream_client,
media::MediaLog* media_log) {
if (!prerender::PrerenderHelper::IsPrerendering(render_view))
return NULL;
return new prerender::PrerenderWebMediaPlayer(render_view, frame, client,
delegate, collection, audio_source_provider, message_loop_factory,
media_stream_client, media_log);
}
|
ChromeContentRendererClient::OverrideCreateWebMediaPlayer(
content::RenderView* render_view,
WebKit::WebFrame* frame,
WebKit::WebMediaPlayerClient* client,
base::WeakPtr<webkit_media::WebMediaPlayerDelegate> delegate,
media::FilterCollection* collection,
WebKit::WebAudioSourceProvider* audio_source_provider,
media::MessageLoopFactory* message_loop_factory,
webkit_media::MediaStreamClient* media_stream_client,
media::MediaLog* media_log) {
if (!prerender::PrerenderHelper::IsPrerendering(render_view))
return NULL;
return new prerender::PrerenderWebMediaPlayer(render_view, frame, client,
delegate, collection, audio_source_provider, message_loop_factory,
media_stream_client, media_log);
}
|
C
|
Chrome
| 0 |
CVE-2018-6164
|
https://www.cvedetails.com/cve/CVE-2018-6164/
|
CWE-200
|
https://github.com/chromium/chromium/commit/0c45ffd2a1b2b6b91aaaac989ad10a76765083c6
|
0c45ffd2a1b2b6b91aaaac989ad10a76765083c6
|
Disallow access to opaque CSS responses.
Bug: 848786
Change-Id: Ie53fbf644afdd76d7c65649a05c939c63d89b4ec
Reviewed-on: https://chromium-review.googlesource.com/1088335
Reviewed-by: Kouhei Ueno <[email protected]>
Commit-Queue: Matt Falkenhagen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#565537}
|
void CSSStyleSheet::Trace(blink::Visitor* visitor) {
visitor->Trace(contents_);
visitor->Trace(owner_node_);
visitor->Trace(owner_rule_);
visitor->Trace(constructed_tree_scopes_);
visitor->Trace(media_cssom_wrapper_);
visitor->Trace(child_rule_cssom_wrappers_);
visitor->Trace(rule_list_cssom_wrapper_);
StyleSheet::Trace(visitor);
}
|
void CSSStyleSheet::Trace(blink::Visitor* visitor) {
visitor->Trace(contents_);
visitor->Trace(owner_node_);
visitor->Trace(owner_rule_);
visitor->Trace(constructed_tree_scopes_);
visitor->Trace(media_cssom_wrapper_);
visitor->Trace(child_rule_cssom_wrappers_);
visitor->Trace(rule_list_cssom_wrapper_);
StyleSheet::Trace(visitor);
}
|
C
|
Chrome
| 0 |
CVE-2016-10088
|
https://www.cvedetails.com/cve/CVE-2016-10088/
|
CWE-416
|
https://github.com/torvalds/linux/commit/128394eff343fc6d2f32172f03e24829539c5835
|
128394eff343fc6d2f32172f03e24829539c5835
|
sg_write()/bsg_write() is not fit to be called under KERNEL_DS
Both damn things interpret userland pointers embedded into the payload;
worse, they are actually traversing those. Leaving aside the bad
API design, this is very much _not_ safe to call with KERNEL_DS.
Bail out early if that happens.
Cc: [email protected]
Signed-off-by: Al Viro <[email protected]>
|
static struct bsg_command *bsg_alloc_command(struct bsg_device *bd)
{
struct bsg_command *bc = ERR_PTR(-EINVAL);
spin_lock_irq(&bd->lock);
if (bd->queued_cmds >= bd->max_queue)
goto out;
bd->queued_cmds++;
spin_unlock_irq(&bd->lock);
bc = kmem_cache_zalloc(bsg_cmd_cachep, GFP_KERNEL);
if (unlikely(!bc)) {
spin_lock_irq(&bd->lock);
bd->queued_cmds--;
bc = ERR_PTR(-ENOMEM);
goto out;
}
bc->bd = bd;
INIT_LIST_HEAD(&bc->list);
dprintk("%s: returning free cmd %p\n", bd->name, bc);
return bc;
out:
spin_unlock_irq(&bd->lock);
return bc;
}
|
static struct bsg_command *bsg_alloc_command(struct bsg_device *bd)
{
struct bsg_command *bc = ERR_PTR(-EINVAL);
spin_lock_irq(&bd->lock);
if (bd->queued_cmds >= bd->max_queue)
goto out;
bd->queued_cmds++;
spin_unlock_irq(&bd->lock);
bc = kmem_cache_zalloc(bsg_cmd_cachep, GFP_KERNEL);
if (unlikely(!bc)) {
spin_lock_irq(&bd->lock);
bd->queued_cmds--;
bc = ERR_PTR(-ENOMEM);
goto out;
}
bc->bd = bd;
INIT_LIST_HEAD(&bc->list);
dprintk("%s: returning free cmd %p\n", bd->name, bc);
return bc;
out:
spin_unlock_irq(&bd->lock);
return bc;
}
|
C
|
linux
| 0 |
CVE-2019-5757
|
https://www.cvedetails.com/cve/CVE-2019-5757/
|
CWE-704
|
https://github.com/chromium/chromium/commit/032c3339bfb454c65ce38e7eafe49a54bac83073
|
032c3339bfb454c65ce38e7eafe49a54bac83073
|
Fix SVG crash for v0 distribution into foreignObject.
We require a parent element to be an SVG element for non-svg-root
elements in order to create a LayoutObject for them. However, we checked
the light tree parent element, not the flat tree one which is the parent
for the layout tree construction. Note that this is just an issue in
Shadow DOM v0 since v1 does not allow shadow roots on SVG elements.
Bug: 915469
Change-Id: Id81843abad08814fae747b5bc81c09666583f130
Reviewed-on: https://chromium-review.googlesource.com/c/1382494
Reviewed-by: Fredrik Söderquist <[email protected]>
Commit-Queue: Rune Lillesveen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#617487}
|
bool SVGElement::IsOutermostSVGSVGElement() const {
if (!IsSVGSVGElement(*this))
return false;
if (!parentNode())
return true;
if (IsSVGForeignObjectElement(*parentNode()))
return true;
if (InUseShadowTree() && ParentOrShadowHostElement() &&
ParentOrShadowHostElement()->IsSVGElement())
return false;
return !parentNode()->IsSVGElement();
}
|
bool SVGElement::IsOutermostSVGSVGElement() const {
if (!IsSVGSVGElement(*this))
return false;
if (!parentNode())
return true;
if (IsSVGForeignObjectElement(*parentNode()))
return true;
if (InUseShadowTree() && ParentOrShadowHostElement() &&
ParentOrShadowHostElement()->IsSVGElement())
return false;
return !parentNode()->IsSVGElement();
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/df831400bcb63db4259b5858281b1727ba972a2a
|
df831400bcb63db4259b5858281b1727ba972a2a
|
WebKit2: Support window bounce when panning.
https://bugs.webkit.org/show_bug.cgi?id=58065
<rdar://problem/9244367>
Reviewed by Adam Roben.
Make gestureDidScroll synchronous, as once we scroll, we need to know
whether or not we are at the beginning or end of the scrollable document.
If we are at either end of the scrollable document, we call the Windows 7
API to bounce the window to give an indication that you are past an end
of the document.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::gestureDidScroll): Pass a boolean for the reply, and return it.
* UIProcess/WebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView): Inititalize a new variable.
(WebKit::WebView::onGesture): Once we send the message to scroll, check if have gone to
an end of the document, and if we have, bounce the window.
* UIProcess/win/WebView.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: GestureDidScroll is now sync.
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::gestureDidScroll): When we are done scrolling, check if we have a vertical
scrollbar and if we are at the beginning or the end of the scrollable document.
git-svn-id: svn://svn.chromium.org/blink/trunk@83197 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
LRESULT WebView::onKeyEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, bool& handled)
{
m_page->handleKeyboardEvent(NativeWebKeyboardEvent(hWnd, message, wParam, lParam));
handled = true;
return 0;
}
|
LRESULT WebView::onKeyEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, bool& handled)
{
m_page->handleKeyboardEvent(NativeWebKeyboardEvent(hWnd, message, wParam, lParam));
handled = true;
return 0;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/1161a49d663dd395bd639549c2dfe7324f847938
|
1161a49d663dd395bd639549c2dfe7324f847938
|
Don't populate URL data in WebDropData when dragging files.
This is considered a potential security issue as well, since it leaks
filesystem paths.
BUG=332579
Review URL: https://codereview.chromium.org/135633002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244538 0039d316-1c4b-4281-b951-d872f2087c98
|
void TabStrip::DragActiveTab(const std::vector<int>& initial_positions,
int delta) {
DCHECK_EQ(tab_count(), static_cast<int>(initial_positions.size()));
if (!touch_layout_.get()) {
StackDraggedTabs(delta);
return;
}
SetIdealBoundsFromPositions(initial_positions);
touch_layout_->DragActiveTab(delta);
DoLayout();
}
|
void TabStrip::DragActiveTab(const std::vector<int>& initial_positions,
int delta) {
DCHECK_EQ(tab_count(), static_cast<int>(initial_positions.size()));
if (!touch_layout_.get()) {
StackDraggedTabs(delta);
return;
}
SetIdealBoundsFromPositions(initial_positions);
touch_layout_->DragActiveTab(delta);
DoLayout();
}
|
C
|
Chrome
| 0 |
CVE-2017-9059
|
https://www.cvedetails.com/cve/CVE-2017-9059/
|
CWE-404
|
https://github.com/torvalds/linux/commit/c70422f760c120480fee4de6c38804c72aa26bc1
|
c70422f760c120480fee4de6c38804c72aa26bc1
|
Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"Another RDMA update from Chuck Lever, and a bunch of miscellaneous
bugfixes"
* tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux: (26 commits)
nfsd: Fix up the "supattr_exclcreat" attributes
nfsd: encoders mustn't use unitialized values in error cases
nfsd: fix undefined behavior in nfsd4_layout_verify
lockd: fix lockd shutdown race
NFSv4: Fix callback server shutdown
SUNRPC: Refactor svc_set_num_threads()
NFSv4.x/callback: Create the callback service through svc_create_pooled
lockd: remove redundant check on block
svcrdma: Clean out old XDR encoders
svcrdma: Remove the req_map cache
svcrdma: Remove unused RDMA Write completion handler
svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt
svcrdma: Clean up RPC-over-RDMA backchannel reply processing
svcrdma: Report Write/Reply chunk overruns
svcrdma: Clean up RDMA_ERROR path
svcrdma: Use rdma_rw API in RPC reply path
svcrdma: Introduce local rdma_rw API helpers
svcrdma: Clean up svc_rdma_get_inv_rkey()
svcrdma: Add helper to save pages under I/O
svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT
...
|
__be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words,
struct svc_fh *fhp, struct svc_export *exp,
struct dentry *dentry, u32 *bmval,
struct svc_rqst *rqstp, int ignore_crossmnt)
{
struct xdr_buf dummy;
struct xdr_stream xdr;
__be32 ret;
svcxdr_init_encode_from_buffer(&xdr, &dummy, *p, words << 2);
ret = nfsd4_encode_fattr(&xdr, fhp, exp, dentry, bmval, rqstp,
ignore_crossmnt);
*p = xdr.p;
return ret;
}
|
__be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words,
struct svc_fh *fhp, struct svc_export *exp,
struct dentry *dentry, u32 *bmval,
struct svc_rqst *rqstp, int ignore_crossmnt)
{
struct xdr_buf dummy;
struct xdr_stream xdr;
__be32 ret;
svcxdr_init_encode_from_buffer(&xdr, &dummy, *p, words << 2);
ret = nfsd4_encode_fattr(&xdr, fhp, exp, dentry, bmval, rqstp,
ignore_crossmnt);
*p = xdr.p;
return ret;
}
|
C
|
linux
| 0 |
CVE-2014-7822
|
https://www.cvedetails.com/cve/CVE-2014-7822/
|
CWE-264
|
https://github.com/torvalds/linux/commit/8d0207652cbe27d1f962050737848e5ad4671958
|
8d0207652cbe27d1f962050737848e5ad4671958
|
->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <[email protected]>
|
static void release_existing_page_budget(struct ubifs_info *c)
{
struct ubifs_budget_req req = { .dd_growth = c->bi.page_budget};
ubifs_release_budget(c, &req);
}
|
static void release_existing_page_budget(struct ubifs_info *c)
{
struct ubifs_budget_req req = { .dd_growth = c->bi.page_budget};
ubifs_release_budget(c, &req);
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/961d0cda4cfc3bcf04aa48ccc32772d63af12d9b
|
961d0cda4cfc3bcf04aa48ccc32772d63af12d9b
|
Extract generation logic from the accessory controller into a separate one
This change adds a controller that is responsible for mediating
communication between ChromePasswordManagerClient and
PasswordAccessoryController for password generation. It is also
responsible for managing the modal dialog used to present the generated
password.
In the future it will make it easier to add manual generation to the
password accessory.
Bug: 845458
Change-Id: I0adbb2de9b9f5012745ae3963154f7d3247b3051
Reviewed-on: https://chromium-review.googlesource.com/c/1448181
Commit-Queue: Ioana Pandele <[email protected]>
Reviewed-by: Fabio Tirelo <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Reviewed-by: Friedrich [CET] <[email protected]>
Cr-Commit-Position: refs/heads/master@{#629542}
|
void PasswordAccessoryControllerImpl::OnGenerationRequested() {
|
void PasswordAccessoryControllerImpl::OnGenerationRequested() {
if (!target_frame_driver_)
return;
dialog_view_ = create_dialog_factory_.Run(this);
uint32_t spec_priority = 0;
base::string16 password =
target_frame_driver_->GetPasswordGenerationManager()->GeneratePassword(
web_contents_->GetLastCommittedURL().GetOrigin(),
generation_element_data_->form_signature,
generation_element_data_->field_signature,
generation_element_data_->max_password_length, &spec_priority);
if (target_frame_driver_ && target_frame_driver_->GetPasswordManager()) {
target_frame_driver_->GetPasswordManager()
->ReportSpecPriorityForGeneratedPassword(generation_element_data_->form,
spec_priority);
}
dialog_view_->Show(password);
}
|
C
|
Chrome
| 1 |
CVE-2016-3119
|
https://www.cvedetails.com/cve/CVE-2016-3119/
| null |
https://github.com/krb5/krb5/commit/08c642c09c38a9c6454ab43a9b53b2a89b9eef99
|
08c642c09c38a9c6454ab43a9b53b2a89b9eef99
|
Fix LDAP null deref on empty arg [CVE-2016-3119]
In the LDAP KDB module's process_db_args(), strtok_r() may return NULL
if there is an empty string in the db_args array. Check for this case
and avoid dereferencing a null pointer.
CVE-2016-3119:
In MIT krb5 1.6 and later, an authenticated attacker with permission
to modify a principal entry can cause kadmind to dereference a null
pointer by supplying an empty DB argument to the modify_principal
command, if kadmind is configured to use the LDAP KDB module.
CVSSv2 Vector: AV:N/AC:H/Au:S/C:N/I:N/A:C/E:H/RL:OF/RC:ND
ticket: 8383 (new)
target_version: 1.14-next
target_version: 1.13-next
tags: pullup
|
krb5_decode_krbsecretkey(krb5_context context, krb5_db_entry *entries,
struct berval **bvalues, krb5_kvno *mkvno)
{
krb5_key_data *key_data = NULL, *tmp;
krb5_error_code err = 0;
ldap_seqof_key_data *keysets = NULL;
krb5_int16 i, n_keysets = 0, total_keys = 0;
err = decode_keys(bvalues, &keysets, &n_keysets, &total_keys);
if (err != 0) {
k5_prependmsg(context, err,
_("unable to decode stored principal key data"));
goto cleanup;
}
key_data = k5calloc(total_keys, sizeof(krb5_key_data), &err);
if (key_data == NULL)
goto cleanup;
memset(key_data, 0, total_keys * sizeof(krb5_key_data));
if (n_keysets > 0)
*mkvno = keysets[0].mkvno;
/* Transfer key data values from keysets to a flat list in entries. */
tmp = key_data;
for (i = 0; i < n_keysets; i++) {
memcpy(tmp, keysets[i].key_data,
sizeof(krb5_key_data) * keysets[i].n_key_data);
tmp += keysets[i].n_key_data;
keysets[i].n_key_data = 0;
}
entries->n_key_data = total_keys;
entries->key_data = key_data;
key_data = NULL;
cleanup:
free_ldap_seqof_key_data(keysets, n_keysets);
k5_free_key_data(total_keys, key_data);
return err;
}
|
krb5_decode_krbsecretkey(krb5_context context, krb5_db_entry *entries,
struct berval **bvalues, krb5_kvno *mkvno)
{
krb5_key_data *key_data = NULL, *tmp;
krb5_error_code err = 0;
ldap_seqof_key_data *keysets = NULL;
krb5_int16 i, n_keysets = 0, total_keys = 0;
err = decode_keys(bvalues, &keysets, &n_keysets, &total_keys);
if (err != 0) {
k5_prependmsg(context, err,
_("unable to decode stored principal key data"));
goto cleanup;
}
key_data = k5calloc(total_keys, sizeof(krb5_key_data), &err);
if (key_data == NULL)
goto cleanup;
memset(key_data, 0, total_keys * sizeof(krb5_key_data));
if (n_keysets > 0)
*mkvno = keysets[0].mkvno;
/* Transfer key data values from keysets to a flat list in entries. */
tmp = key_data;
for (i = 0; i < n_keysets; i++) {
memcpy(tmp, keysets[i].key_data,
sizeof(krb5_key_data) * keysets[i].n_key_data);
tmp += keysets[i].n_key_data;
keysets[i].n_key_data = 0;
}
entries->n_key_data = total_keys;
entries->key_data = key_data;
key_data = NULL;
cleanup:
free_ldap_seqof_key_data(keysets, n_keysets);
k5_free_key_data(total_keys, key_data);
return err;
}
|
C
|
krb5
| 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 int compat_x25_ioctl(struct socket *sock, unsigned int cmd,
unsigned long arg)
{
void __user *argp = compat_ptr(arg);
struct sock *sk = sock->sk;
int rc = -ENOIOCTLCMD;
switch(cmd) {
case TIOCOUTQ:
case TIOCINQ:
rc = x25_ioctl(sock, cmd, (unsigned long)argp);
break;
case SIOCGSTAMP:
rc = -EINVAL;
if (sk)
rc = compat_sock_get_timestamp(sk,
(struct timeval __user*)argp);
break;
case SIOCGSTAMPNS:
rc = -EINVAL;
if (sk)
rc = compat_sock_get_timestampns(sk,
(struct timespec __user*)argp);
break;
case SIOCGIFADDR:
case SIOCSIFADDR:
case SIOCGIFDSTADDR:
case SIOCSIFDSTADDR:
case SIOCGIFBRDADDR:
case SIOCSIFBRDADDR:
case SIOCGIFNETMASK:
case SIOCSIFNETMASK:
case SIOCGIFMETRIC:
case SIOCSIFMETRIC:
rc = -EINVAL;
break;
case SIOCADDRT:
case SIOCDELRT:
rc = -EPERM;
if (!capable(CAP_NET_ADMIN))
break;
rc = x25_route_ioctl(cmd, argp);
break;
case SIOCX25GSUBSCRIP:
rc = compat_x25_subscr_ioctl(cmd, argp);
break;
case SIOCX25SSUBSCRIP:
rc = -EPERM;
if (!capable(CAP_NET_ADMIN))
break;
rc = compat_x25_subscr_ioctl(cmd, argp);
break;
case SIOCX25GFACILITIES:
case SIOCX25SFACILITIES:
case SIOCX25GDTEFACILITIES:
case SIOCX25SDTEFACILITIES:
case SIOCX25GCALLUSERDATA:
case SIOCX25SCALLUSERDATA:
case SIOCX25GCAUSEDIAG:
case SIOCX25SCAUSEDIAG:
case SIOCX25SCUDMATCHLEN:
case SIOCX25CALLACCPTAPPRV:
case SIOCX25SENDCALLACCPT:
rc = x25_ioctl(sock, cmd, (unsigned long)argp);
break;
default:
rc = -ENOIOCTLCMD;
break;
}
return rc;
}
|
static int compat_x25_ioctl(struct socket *sock, unsigned int cmd,
unsigned long arg)
{
void __user *argp = compat_ptr(arg);
struct sock *sk = sock->sk;
int rc = -ENOIOCTLCMD;
switch(cmd) {
case TIOCOUTQ:
case TIOCINQ:
rc = x25_ioctl(sock, cmd, (unsigned long)argp);
break;
case SIOCGSTAMP:
rc = -EINVAL;
if (sk)
rc = compat_sock_get_timestamp(sk,
(struct timeval __user*)argp);
break;
case SIOCGSTAMPNS:
rc = -EINVAL;
if (sk)
rc = compat_sock_get_timestampns(sk,
(struct timespec __user*)argp);
break;
case SIOCGIFADDR:
case SIOCSIFADDR:
case SIOCGIFDSTADDR:
case SIOCSIFDSTADDR:
case SIOCGIFBRDADDR:
case SIOCSIFBRDADDR:
case SIOCGIFNETMASK:
case SIOCSIFNETMASK:
case SIOCGIFMETRIC:
case SIOCSIFMETRIC:
rc = -EINVAL;
break;
case SIOCADDRT:
case SIOCDELRT:
rc = -EPERM;
if (!capable(CAP_NET_ADMIN))
break;
rc = x25_route_ioctl(cmd, argp);
break;
case SIOCX25GSUBSCRIP:
rc = compat_x25_subscr_ioctl(cmd, argp);
break;
case SIOCX25SSUBSCRIP:
rc = -EPERM;
if (!capable(CAP_NET_ADMIN))
break;
rc = compat_x25_subscr_ioctl(cmd, argp);
break;
case SIOCX25GFACILITIES:
case SIOCX25SFACILITIES:
case SIOCX25GDTEFACILITIES:
case SIOCX25SDTEFACILITIES:
case SIOCX25GCALLUSERDATA:
case SIOCX25SCALLUSERDATA:
case SIOCX25GCAUSEDIAG:
case SIOCX25SCAUSEDIAG:
case SIOCX25SCUDMATCHLEN:
case SIOCX25CALLACCPTAPPRV:
case SIOCX25SENDCALLACCPT:
rc = x25_ioctl(sock, cmd, (unsigned long)argp);
break;
default:
rc = -ENOIOCTLCMD;
break;
}
return rc;
}
|
C
|
linux
| 0 |
CVE-2018-18358
|
https://www.cvedetails.com/cve/CVE-2018-18358/
|
CWE-20
|
https://github.com/chromium/chromium/commit/da790f920bbc169a6805a4fb83b4c2ab09532d91
|
da790f920bbc169a6805a4fb83b4c2ab09532d91
|
Implicitly bypass localhost when proxying requests.
This aligns Chrome's behavior with the Windows and macOS proxy resolvers (but not Firefox).
Concretely:
* localhost names (as determined by net::IsLocalhost) now implicitly bypass the proxy
* link-local IP addresses implicitly bypass the proxy
The implicit rules are handled by ProxyBypassRules, and it is possible to override them when manually configuring proxy settings (but not when using PAC or auto-detect).
This change also adds support for the "<-loopback>" proxy bypass rule, with similar semantics as it has on Windows (removes the implicit bypass rules for localhost and link-local).
The compatibility risk of this change should be low as proxying through localhost was not universally supported. It is however an idiom used in testing (a number of our own tests had such a dependency). Impacted users can use the "<-loopback>" bypass rule as a workaround.
Bug: 413511, 899126, 901896
Change-Id: I263ca21ef9f12d4759a20cb4751dc3261bda6ac0
Reviewed-on: https://chromium-review.googlesource.com/c/1303626
Commit-Queue: Eric Roman <[email protected]>
Reviewed-by: Dominick Ng <[email protected]>
Reviewed-by: Tarun Bansal <[email protected]>
Reviewed-by: Matt Menke <[email protected]>
Reviewed-by: Sami Kyöstilä <[email protected]>
Cr-Commit-Position: refs/heads/master@{#606112}
|
HttpAuthFilterWhitelist::HttpAuthFilterWhitelist(
const std::string& server_whitelist) {
SetWhitelist(server_whitelist);
}
|
HttpAuthFilterWhitelist::HttpAuthFilterWhitelist(
const std::string& server_whitelist) {
SetWhitelist(server_whitelist);
}
|
C
|
Chrome
| 0 |
CVE-2015-1281
|
https://www.cvedetails.com/cve/CVE-2015-1281/
|
CWE-254
|
https://github.com/chromium/chromium/commit/dff368031150a1033a1a3c913f8857679a0279be
|
dff368031150a1033a1a3c913f8857679a0279be
|
Correctly keep track of isolates for microtask execution
BUG=487155
[email protected]
Review URL: https://codereview.chromium.org/1161823002
git-svn-id: svn://svn.chromium.org/blink/trunk@195985 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
bool WorkerThread::doIdleGc(double deadlineSeconds)
{
bool gcFinished = false;
if (deadlineSeconds > Platform::current()->monotonicallyIncreasingTime())
gcFinished = isolate()->IdleNotificationDeadline(deadlineSeconds);
return gcFinished;
}
|
bool WorkerThread::doIdleGc(double deadlineSeconds)
{
bool gcFinished = false;
if (deadlineSeconds > Platform::current()->monotonicallyIncreasingTime())
gcFinished = isolate()->IdleNotificationDeadline(deadlineSeconds);
return gcFinished;
}
|
C
|
Chrome
| 0 |
CVE-2016-1631
|
https://www.cvedetails.com/cve/CVE-2016-1631/
|
CWE-264
|
https://github.com/chromium/chromium/commit/dd77c2a41c72589d929db0592565125ca629fb2c
|
dd77c2a41c72589d929db0592565125ca629fb2c
|
Fix PPB_Flash_MessageLoop.
This CL suspends script callbacks and resource loads while running nested message loop using PPB_Flash_MessageLoop.
BUG=569496
Review URL: https://codereview.chromium.org/1559113002
Cr-Commit-Position: refs/heads/master@{#374529}
|
void set_run_callback(const RunFromHostProxyCallback& run_callback) {
run_callback_ = run_callback;
}
|
void set_run_callback(const RunFromHostProxyCallback& run_callback) {
run_callback_ = run_callback;
}
|
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_write_png(png_structp png_ptr, png_infop info_ptr,
int transforms, voidp params)
{
if (png_ptr == NULL || info_ptr == NULL)
return;
/* Write the file header information. */
png_write_info(png_ptr, info_ptr);
/* ------ these transformations don't touch the info structure ------- */
#ifdef PNG_WRITE_INVERT_SUPPORTED
/* Invert monochrome pixels */
if (transforms & PNG_TRANSFORM_INVERT_MONO)
png_set_invert_mono(png_ptr);
#endif
#ifdef PNG_WRITE_SHIFT_SUPPORTED
/* Shift the pixels up to a legal bit depth and fill in
* as appropriate to correctly scale the image.
*/
if ((transforms & PNG_TRANSFORM_SHIFT)
&& (info_ptr->valid & PNG_INFO_sBIT))
png_set_shift(png_ptr, &info_ptr->sig_bit);
#endif
#ifdef PNG_WRITE_PACK_SUPPORTED
/* Pack pixels into bytes */
if (transforms & PNG_TRANSFORM_PACKING)
png_set_packing(png_ptr);
#endif
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
/* Swap location of alpha bytes from ARGB to RGBA */
if (transforms & PNG_TRANSFORM_SWAP_ALPHA)
png_set_swap_alpha(png_ptr);
#endif
#ifdef PNG_WRITE_FILLER_SUPPORTED
/* Pack XRGB/RGBX/ARGB/RGBA into * RGB (4 channels -> 3 channels) */
if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER)
png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
else if (transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE)
png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
#endif
#ifdef PNG_WRITE_BGR_SUPPORTED
/* Flip BGR pixels to RGB */
if (transforms & PNG_TRANSFORM_BGR)
png_set_bgr(png_ptr);
#endif
#ifdef PNG_WRITE_SWAP_SUPPORTED
/* Swap bytes of 16-bit files to most significant byte first */
if (transforms & PNG_TRANSFORM_SWAP_ENDIAN)
png_set_swap(png_ptr);
#endif
#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
/* Swap bits of 1, 2, 4 bit packed pixel formats */
if (transforms & PNG_TRANSFORM_PACKSWAP)
png_set_packswap(png_ptr);
#endif
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
/* Invert the alpha channel from opacity to transparency */
if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
png_set_invert_alpha(png_ptr);
#endif
/* ----------------------- end of transformations ------------------- */
/* Write the bits */
if (info_ptr->valid & PNG_INFO_IDAT)
png_write_image(png_ptr, info_ptr->row_pointers);
/* It is REQUIRED to call this to finish writing the rest of the file */
png_write_end(png_ptr, info_ptr);
PNG_UNUSED(transforms) /* Quiet compiler warnings */
PNG_UNUSED(params)
}
|
png_write_png(png_structp png_ptr, png_infop info_ptr,
int transforms, voidp params)
{
if (png_ptr == NULL || info_ptr == NULL)
return;
/* Write the file header information. */
png_write_info(png_ptr, info_ptr);
/* ------ these transformations don't touch the info structure ------- */
#ifdef PNG_WRITE_INVERT_SUPPORTED
/* Invert monochrome pixels */
if (transforms & PNG_TRANSFORM_INVERT_MONO)
png_set_invert_mono(png_ptr);
#endif
#ifdef PNG_WRITE_SHIFT_SUPPORTED
/* Shift the pixels up to a legal bit depth and fill in
* as appropriate to correctly scale the image.
*/
if ((transforms & PNG_TRANSFORM_SHIFT)
&& (info_ptr->valid & PNG_INFO_sBIT))
png_set_shift(png_ptr, &info_ptr->sig_bit);
#endif
#ifdef PNG_WRITE_PACK_SUPPORTED
/* Pack pixels into bytes */
if (transforms & PNG_TRANSFORM_PACKING)
png_set_packing(png_ptr);
#endif
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
/* Swap location of alpha bytes from ARGB to RGBA */
if (transforms & PNG_TRANSFORM_SWAP_ALPHA)
png_set_swap_alpha(png_ptr);
#endif
#ifdef PNG_WRITE_FILLER_SUPPORTED
/* Pack XRGB/RGBX/ARGB/RGBA into * RGB (4 channels -> 3 channels) */
if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER)
png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
else if (transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE)
png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
#endif
#ifdef PNG_WRITE_BGR_SUPPORTED
/* Flip BGR pixels to RGB */
if (transforms & PNG_TRANSFORM_BGR)
png_set_bgr(png_ptr);
#endif
#ifdef PNG_WRITE_SWAP_SUPPORTED
/* Swap bytes of 16-bit files to most significant byte first */
if (transforms & PNG_TRANSFORM_SWAP_ENDIAN)
png_set_swap(png_ptr);
#endif
#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
/* Swap bits of 1, 2, 4 bit packed pixel formats */
if (transforms & PNG_TRANSFORM_PACKSWAP)
png_set_packswap(png_ptr);
#endif
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
/* Invert the alpha channel from opacity to transparency */
if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
png_set_invert_alpha(png_ptr);
#endif
/* ----------------------- end of transformations ------------------- */
/* Write the bits */
if (info_ptr->valid & PNG_INFO_IDAT)
png_write_image(png_ptr, info_ptr->row_pointers);
/* It is REQUIRED to call this to finish writing the rest of the file */
png_write_end(png_ptr, info_ptr);
PNG_UNUSED(transforms) /* Quiet compiler warnings */
PNG_UNUSED(params)
}
|
C
|
Chrome
| 0 |
CVE-2015-1793
|
https://www.cvedetails.com/cve/CVE-2015-1793/
|
CWE-254
|
https://git.openssl.org/?p=openssl.git;a=commit;h=9a0db453ba017ebcaccbee933ee6511a9ae4d1c8
|
9a0db453ba017ebcaccbee933ee6511a9ae4d1c8
| null |
void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x)
{
ctx->cert = x;
}
|
void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x)
{
ctx->cert = x;
}
|
C
|
openssl
| 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 em_jcxz(struct x86_emulate_ctxt *ctxt)
{
if (address_mask(ctxt, ctxt->regs[VCPU_REGS_RCX]) == 0)
jmp_rel(ctxt, ctxt->src.val);
return X86EMUL_CONTINUE;
}
|
static int em_jcxz(struct x86_emulate_ctxt *ctxt)
{
if (address_mask(ctxt, ctxt->regs[VCPU_REGS_RCX]) == 0)
jmp_rel(ctxt, ctxt->src.val);
return X86EMUL_CONTINUE;
}
|
C
|
linux
| 0 |
CVE-2016-1647
|
https://www.cvedetails.com/cve/CVE-2016-1647/
| null |
https://github.com/chromium/chromium/commit/e5787005a9004d7be289cc649c6ae4f3051996cd
|
e5787005a9004d7be289cc649c6ae4f3051996cd
|
Check that RWHI isn't deleted manually while owned by a scoped_ptr in RVHI
BUG=590284
Review URL: https://codereview.chromium.org/1747183002
Cr-Commit-Position: refs/heads/master@{#378844}
|
void RenderWidgetHostImpl::DecrementInFlightEventCount() {
if (decrement_in_flight_event_count() <= 0) {
StopHangMonitorTimeout();
} else {
if (!is_hidden_)
RestartHangMonitorTimeout();
}
}
|
void RenderWidgetHostImpl::DecrementInFlightEventCount() {
if (decrement_in_flight_event_count() <= 0) {
StopHangMonitorTimeout();
} else {
if (!is_hidden_)
RestartHangMonitorTimeout();
}
}
|
C
|
Chrome
| 0 |
CVE-2013-2061
|
https://www.cvedetails.com/cve/CVE-2013-2061/
|
CWE-200
|
https://github.com/OpenVPN/openvpn/commit/11d21349a4e7e38a025849479b36ace7c2eec2ee
|
11d21349a4e7e38a025849479b36ace7c2eec2ee
|
Use constant time memcmp when comparing HMACs in openvpn_decrypt.
Signed-off-by: Steffan Karger <[email protected]>
Acked-by: Gert Doering <[email protected]>
Signed-off-by: Gert Doering <[email protected]>
|
cfb_ofb_mode (const struct key_type* kt)
{
if (kt && kt->cipher) {
const unsigned int mode = cipher_kt_mode (kt->cipher);
return mode == OPENVPN_MODE_CFB || mode == OPENVPN_MODE_OFB;
}
return false;
}
|
cfb_ofb_mode (const struct key_type* kt)
{
if (kt && kt->cipher) {
const unsigned int mode = cipher_kt_mode (kt->cipher);
return mode == OPENVPN_MODE_CFB || mode == OPENVPN_MODE_OFB;
}
return false;
}
|
C
|
openvpn
| 0 |
CVE-2018-9490
|
https://www.cvedetails.com/cve/CVE-2018-9490/
|
CWE-704
|
https://android.googlesource.com/platform/external/v8/+/a24543157ae2cdd25da43e20f4e48a07481e6ceb
|
a24543157ae2cdd25da43e20f4e48a07481e6ceb
|
Backport: Fix Object.entries/values with changing elements
Bug: 111274046
Test: m -j proxy_resolver_v8_unittest && adb sync && adb shell \
/data/nativetest64/proxy_resolver_v8_unittest/proxy_resolver_v8_unittest
Change-Id: I705fc512cc5837e9364ed187559cc75d079aa5cb
(cherry picked from commit d8be9a10287afed07705ac8af027d6a46d4def99)
|
static inline void SetImpl(FixedArrayBase* backing_store, uint32_t entry,
Object* value, WriteBarrierMode mode) {
FixedDoubleArray::cast(backing_store)->set(entry, value->Number());
}
|
static inline void SetImpl(FixedArrayBase* backing_store, uint32_t entry,
Object* value, WriteBarrierMode mode) {
FixedDoubleArray::cast(backing_store)->set(entry, value->Number());
}
|
C
|
Android
| 0 |
CVE-2012-5148
|
https://www.cvedetails.com/cve/CVE-2012-5148/
|
CWE-20
|
https://github.com/chromium/chromium/commit/e89cfcb9090e8c98129ae9160c513f504db74599
|
e89cfcb9090e8c98129ae9160c513f504db74599
|
Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167122 0039d316-1c4b-4281-b951-d872f2087c98
|
void NavigationNotificationObserver::ConditionMet(
AutomationMsg_NavigationResponseValues navigation_result) {
if (automation_) {
if (use_json_interface_) {
if (navigation_result == AUTOMATION_MSG_NAVIGATION_SUCCESS) {
DictionaryValue dict;
dict.SetInteger("result", navigation_result);
AutomationJSONReply(automation_, reply_message_.release()).SendSuccess(
&dict);
} else {
AutomationJSONReply(automation_, reply_message_.release()).SendError(
StringPrintf("Navigation failed with error code=%d.",
navigation_result));
}
} else {
IPC::ParamTraits<int>::Write(
reply_message_.get(), navigation_result);
automation_->Send(reply_message_.release());
}
}
delete this;
}
|
void NavigationNotificationObserver::ConditionMet(
AutomationMsg_NavigationResponseValues navigation_result) {
if (automation_) {
if (use_json_interface_) {
if (navigation_result == AUTOMATION_MSG_NAVIGATION_SUCCESS) {
DictionaryValue dict;
dict.SetInteger("result", navigation_result);
AutomationJSONReply(automation_, reply_message_.release()).SendSuccess(
&dict);
} else {
AutomationJSONReply(automation_, reply_message_.release()).SendError(
StringPrintf("Navigation failed with error code=%d.",
navigation_result));
}
} else {
IPC::ParamTraits<int>::Write(
reply_message_.get(), navigation_result);
automation_->Send(reply_message_.release());
}
}
delete this;
}
|
C
|
Chrome
| 0 |
CVE-2019-5838
|
https://www.cvedetails.com/cve/CVE-2019-5838/
|
CWE-20
|
https://github.com/chromium/chromium/commit/0660e08731fd42076d7242068e9eaed1482b14d5
|
0660e08731fd42076d7242068e9eaed1482b14d5
|
Call CanCaptureVisiblePage in page capture API.
Currently the pageCapture permission allows access
to arbitrary local files and chrome:// pages which
can be a security concern. In order to address this,
the page capture API needs to be changed similar to
the captureVisibleTab API. The API will now only allow
extensions to capture otherwise-restricted URLs if the
user has granted activeTab. In addition, file:// URLs are
only capturable with the "Allow on file URLs" option enabled.
Bug: 893087
Change-Id: I6d6225a3efb70fc033e2e1c031c633869afac624
Reviewed-on: https://chromium-review.googlesource.com/c/1330689
Commit-Queue: Bettina Dea <[email protected]>
Reviewed-by: Devlin <[email protected]>
Reviewed-by: Varun Khaneja <[email protected]>
Cr-Commit-Position: refs/heads/master@{#615248}
|
ExtensionFunction::ResponseAction TabsReloadFunction::Run() {
std::unique_ptr<tabs::Reload::Params> params(
tabs::Reload::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
bool bypass_cache = false;
if (params->reload_properties.get() &&
params->reload_properties->bypass_cache.get()) {
bypass_cache = *params->reload_properties->bypass_cache;
}
content::WebContents* web_contents = NULL;
Browser* current_browser =
ChromeExtensionFunctionDetails(this).GetCurrentBrowser();
if (!params->tab_id.get()) {
if (!current_browser)
return RespondNow(Error(tabs_constants::kNoCurrentWindowError));
if (!ExtensionTabUtil::GetDefaultTab(current_browser, &web_contents, NULL))
return RespondNow(Error(kUnknownErrorDoNotUse));
} else {
int tab_id = *params->tab_id;
Browser* browser = NULL;
std::string error;
if (!GetTabById(tab_id, browser_context(), include_incognito_information(),
&browser, NULL, &web_contents, NULL, &error)) {
return RespondNow(Error(error));
}
}
if (web_contents->ShowingInterstitialPage()) {
NavigationEntry* entry = web_contents->GetController().GetVisibleEntry();
GURL reload_url = entry ? entry->GetURL() : GURL(url::kAboutBlankURL);
OpenURLParams params(reload_url, Referrer(),
WindowOpenDisposition::CURRENT_TAB,
ui::PAGE_TRANSITION_RELOAD, false);
current_browser->OpenURL(params);
} else {
web_contents->GetController().Reload(
bypass_cache ? content::ReloadType::BYPASSING_CACHE
: content::ReloadType::NORMAL,
true);
}
return RespondNow(NoArguments());
}
|
ExtensionFunction::ResponseAction TabsReloadFunction::Run() {
std::unique_ptr<tabs::Reload::Params> params(
tabs::Reload::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
bool bypass_cache = false;
if (params->reload_properties.get() &&
params->reload_properties->bypass_cache.get()) {
bypass_cache = *params->reload_properties->bypass_cache;
}
content::WebContents* web_contents = NULL;
Browser* current_browser =
ChromeExtensionFunctionDetails(this).GetCurrentBrowser();
if (!params->tab_id.get()) {
if (!current_browser)
return RespondNow(Error(tabs_constants::kNoCurrentWindowError));
if (!ExtensionTabUtil::GetDefaultTab(current_browser, &web_contents, NULL))
return RespondNow(Error(kUnknownErrorDoNotUse));
} else {
int tab_id = *params->tab_id;
Browser* browser = NULL;
std::string error;
if (!GetTabById(tab_id, browser_context(), include_incognito_information(),
&browser, NULL, &web_contents, NULL, &error)) {
return RespondNow(Error(error));
}
}
if (web_contents->ShowingInterstitialPage()) {
NavigationEntry* entry = web_contents->GetController().GetVisibleEntry();
GURL reload_url = entry ? entry->GetURL() : GURL(url::kAboutBlankURL);
OpenURLParams params(reload_url, Referrer(),
WindowOpenDisposition::CURRENT_TAB,
ui::PAGE_TRANSITION_RELOAD, false);
current_browser->OpenURL(params);
} else {
web_contents->GetController().Reload(
bypass_cache ? content::ReloadType::BYPASSING_CACHE
: content::ReloadType::NORMAL,
true);
}
return RespondNow(NoArguments());
}
|
C
|
Chrome
| 0 |
CVE-2014-3171
|
https://www.cvedetails.com/cve/CVE-2014-3171/
| null |
https://github.com/chromium/chromium/commit/d10a8dac48d3a9467e81c62cb45208344f4542db
|
d10a8dac48d3a9467e81c62cb45208344f4542db
|
Replace further questionable HashMap::add usages in bindings
BUG=390928
[email protected]
Review URL: https://codereview.chromium.org/411273002
git-svn-id: svn://svn.chromium.org/blink/trunk@178823 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void doWriteRsaHashedKey(const blink::WebCryptoKey& key)
{
ASSERT(key.algorithm().rsaHashedParams());
append(static_cast<uint8_t>(RsaHashedKeyTag));
doWriteAlgorithmId(key.algorithm().id());
switch (key.type()) {
case blink::WebCryptoKeyTypePublic:
doWriteUint32(PublicKeyType);
break;
case blink::WebCryptoKeyTypePrivate:
doWriteUint32(PrivateKeyType);
break;
case blink::WebCryptoKeyTypeSecret:
ASSERT_NOT_REACHED();
}
const blink::WebCryptoRsaHashedKeyAlgorithmParams* params = key.algorithm().rsaHashedParams();
doWriteUint32(params->modulusLengthBits());
doWriteUint32(params->publicExponent().size());
append(params->publicExponent().data(), params->publicExponent().size());
doWriteAlgorithmId(key.algorithm().rsaHashedParams()->hash().id());
}
|
void doWriteRsaHashedKey(const blink::WebCryptoKey& key)
{
ASSERT(key.algorithm().rsaHashedParams());
append(static_cast<uint8_t>(RsaHashedKeyTag));
doWriteAlgorithmId(key.algorithm().id());
switch (key.type()) {
case blink::WebCryptoKeyTypePublic:
doWriteUint32(PublicKeyType);
break;
case blink::WebCryptoKeyTypePrivate:
doWriteUint32(PrivateKeyType);
break;
case blink::WebCryptoKeyTypeSecret:
ASSERT_NOT_REACHED();
}
const blink::WebCryptoRsaHashedKeyAlgorithmParams* params = key.algorithm().rsaHashedParams();
doWriteUint32(params->modulusLengthBits());
doWriteUint32(params->publicExponent().size());
append(params->publicExponent().data(), params->publicExponent().size());
doWriteAlgorithmId(key.algorithm().rsaHashedParams()->hash().id());
}
|
C
|
Chrome
| 0 |
CVE-2014-3122
|
https://www.cvedetails.com/cve/CVE-2014-3122/
|
CWE-264
|
https://github.com/torvalds/linux/commit/57e68e9cd65b4b8eb4045a1e0d0746458502554c
|
57e68e9cd65b4b8eb4045a1e0d0746458502554c
|
mm: try_to_unmap_cluster() should lock_page() before mlocking
A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin
fuzzing with trinity. The call site try_to_unmap_cluster() does not lock
the pages other than its check_page parameter (which is already locked).
The BUG_ON in mlock_vma_page() is not documented and its purpose is
somewhat unclear, but apparently it serializes against page migration,
which could otherwise fail to transfer the PG_mlocked flag. This would
not be fatal, as the page would be eventually encountered again, but
NR_MLOCK accounting would become distorted nevertheless. This patch adds
a comment to the BUG_ON in mlock_vma_page() and munlock_vma_page() to that
effect.
The call site try_to_unmap_cluster() is fixed so that for page !=
check_page, trylock_page() is attempted (to avoid possible deadlocks as we
already have check_page locked) and mlock_vma_page() is performed only
upon success. If the page lock cannot be obtained, the page is left
without PG_mlocked, which is again not a problem in the whole unevictable
memory design.
Signed-off-by: Vlastimil Babka <[email protected]>
Signed-off-by: Bob Liu <[email protected]>
Reported-by: Sasha Levin <[email protected]>
Cc: Wanpeng Li <[email protected]>
Cc: Michel Lespinasse <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
static inline void unlock_anon_vma_root(struct anon_vma *root)
{
if (root)
up_write(&root->rwsem);
}
|
static inline void unlock_anon_vma_root(struct anon_vma *root)
{
if (root)
up_write(&root->rwsem);
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/a46bcef82b29d30836a0f26226e3d4aca4fa9612
|
a46bcef82b29d30836a0f26226e3d4aca4fa9612
|
Access ChromotingHost::clients_ only on network thread.
Previously ChromotingHost was doing some work on the main thread and
some on the network thread. |clients_| and some other members were
accessed without lock on both of these threads. Moved most of the
ChromotingHost activity to the network thread to avoid possible
race conditions.
BUG=96325
TEST=Chromoting works
Review URL: http://codereview.chromium.org/8495024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109556 0039d316-1c4b-4281-b951-d872f2087c98
|
void ScreenRecorder::Stop(const base::Closure& done_task) {
if (MessageLoop::current() != capture_loop_) {
capture_loop_->PostTask(FROM_HERE, base::Bind(
&ScreenRecorder::Stop, this, done_task));
return;
}
DCHECK(!done_task.is_null());
capture_timer_.Stop();
is_recording_ = false;
network_loop_->PostTask(FROM_HERE, base::Bind(
&ScreenRecorder::DoStopOnNetworkThread, this, done_task));
}
|
void ScreenRecorder::Stop(const base::Closure& done_task) {
if (MessageLoop::current() != capture_loop_) {
capture_loop_->PostTask(FROM_HERE, base::Bind(
&ScreenRecorder::Stop, this, done_task));
return;
}
DCHECK(!done_task.is_null());
capture_timer_.Stop();
is_recording_ = false;
network_loop_->PostTask(FROM_HERE, base::Bind(
&ScreenRecorder::DoStopOnNetworkThread, this, done_task));
}
|
C
|
Chrome
| 0 |
CVE-2018-12460
|
https://www.cvedetails.com/cve/CVE-2018-12460/
|
CWE-476
|
https://github.com/FFmpeg/FFmpeg/commit/b3332a182f8ba33a34542e4a0370f38b914ccf7d
|
b3332a182f8ba33a34542e4a0370f38b914ccf7d
|
avcodec/idctdsp: Transmit studio_profile to init instead of using AVCodecContext profile
These 2 fields are not always the same, it is simpler to always use the same field
for detecting studio profile
Fixes: null pointer dereference
Fixes: ffmpeg_crash_3.avi
Found-by: Thuan Pham <[email protected]>, Marcel Böhme, Andrew Santosa and Alexandru RazvanCaciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <[email protected]>
|
static void ff_jref_idct2_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
{
ff_j_rev_dct2 (block);
add_pixels_clamped2_c(block, dest, line_size);
}
|
static void ff_jref_idct2_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
{
ff_j_rev_dct2 (block);
add_pixels_clamped2_c(block, dest, line_size);
}
|
C
|
FFmpeg
| 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.